MCPcopy Create free account
hub / github.com/arktypeio/arktype / readManifest

Function readManifest

ark/type/cli.ts:67–77  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

65 join(arktypeRoot, "skills", "arktype")
66
67const readManifest = (dir: string): PackageManifest | undefined => {
68 const path = join(dir, "package.json")
69 if (!existsSync(path)) return undefined
70 try {
71 return JSON.parse(
72 readFileSync(path, "utf8").replace(/^\uFEFF/, "")
73 ) as PackageManifest
74 } catch {
75 return undefined
76 }
77}
78
79const locateProjectRoot = (startDir: string): string | undefined => {
80 for (let dir = resolve(startDir); ; dir = dirname(dir)) {

Callers 5

findAotManifestFunction · 0.85
findAotInNodeModulesFunction · 0.85
findAotViaRequireFunction · 0.85
runInitFunction · 0.85
runMigrateFunction · 0.85

Calls 3

joinFunction · 0.85
replaceMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected