Skip to content

readSfdxProject

readSfdxProject(projectDir?): Promise<SfdxProject>

Defined in: packages/simply-core/src/project/sfdxProject.ts:80

Read and parse a Salesforce DX project manifest.

Validates only that packageDirectories is present and an array — the one invariant every caller depends on. Anything beyond that is left to the caller, since each reads a different subset and treats a missing value differently (some default, some throw).

string = ...

Directory containing sfdx-project.json. Defaults to the current working directory, matching how these commands run inside a CI job’s checkout.

Promise<SfdxProject>

The parsed project manifest.

If the file can’t be read — code is 'ENOENT' when it’s simply absent, which callers treating a missing project as non-fatal can check for.

If the file isn’t valid JSON.

If packageDirectories is missing or isn’t an array.