Skip to main content

resolveManifest

Resolve a selected manifest and validate its complete v3 document.

Import​

import { resolveManifest } from '@bedrock-core/builder/manifest';

Signature​

function resolveManifest(file: string, options?: ManifestResolveOptions): Promise<ResolvedManifest>;

Parameters​

ParameterTypeDefaultDescription
filestring—Selected path, absolute or relative to the process working directory
options.rootstring—Restrict the file and all ancestors to this directory
options.signalAbortSignal—Cooperative cancellation

Returns​

ResolvedManifest contains manifest, the complete document without extends, and inputs, the absolute paths read to assemble it. The function writes no files.

Usage​

import { resolveManifest } from '@bedrock-core/builder/manifest';

const result = await resolveManifest('./packs/BP/manifest.test.json', {
root: process.cwd(),
});
console.warn(result.manifest, result.inputs);

Notes​

Each extends reference is relative to its declaring file. Objects merge recursively; arrays and scalars replace inherited values. Missing files, cycles, project-boundary escapes and invalid resolved manifests reject the promise.

The built-in stage additionally writes canonical manifests and removes staged variants. See Stages.