MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getPackageJson

Function getPackageJson

packages/cli/src/utils/package.ts:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24let packageJson: PackageJson | undefined;
25
26export async function getPackageJson(): Promise<PackageJson | undefined> {
27 if (packageJson) {
28 return packageJson;
29 }
30
31 const result = await readPackageUp({ cwd: __dirname });
32 if (!result) {
33 // TODO: Maybe bubble this up as an error.
34 return;
35 }
36
37 packageJson = result.packageJson;
38 return packageJson;
39}

Callers 4

getInstallationInfoFunction · 0.85
getCliVersionFunction · 0.85
checkForUpdatesFunction · 0.85
loadSandboxConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected