MCPcopy
hub / github.com/prisma/prisma / getPackages

Function getPackages

scripts/ci/publish.ts:87–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85type RawPackages = { [packageName: string]: RawPackage }
86
87export async function getPackages(): Promise<RawPackages> {
88 const packagePaths = await globby(['packages/*/package.json'], {
89 ignore: ['**/node_modules/**', '**/examples/**', '**/fixtures/**'],
90 })
91 const packages = await Promise.all(
92 packagePaths.map(async (p) => ({
93 path: p,
94 packageJson: JSON.parse(await fs.promises.readFile(p, 'utf-8')),
95 })),
96 )
97
98 return packages.reduce<RawPackages>((acc, p) => {
99 if (p.packageJson.name) {
100 acc[p.packageJson.name] = p
101 }
102 return acc
103 }, {})
104}
105
106interface Package {
107 private?: boolean

Callers 1

publishFunction · 0.85

Calls 1

parseMethod · 0.65

Tested by

no test coverage detected