Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/core/src/loader/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ export class ManifestStore {
return new ManifestStore(data, baseDir);
}

/**
* Create a ManifestStore from pre-validated bundled data.
* Skips invalidation checks — the caller (bundler) is responsible for
* guaranteeing the data matches the shipped artifact.
*/
static fromBundle(data: StartupManifest, baseDir: string): ManifestStore {
if (data.version !== MANIFEST_VERSION) {
throw new Error(
`[@eggjs/core] bundled manifest version mismatch: expected ${MANIFEST_VERSION}, got ${data.version}`,
);
}
return new ManifestStore(data, baseDir);
Comment thread
killagu marked this conversation as resolved.
Outdated
}
Comment thread
killagu marked this conversation as resolved.

/**
* Create a collector-only ManifestStore (no cached data).
* Used during normal startup to collect data for future manifest generation.
Expand Down