@equinor/fusion-framework-cli
Version:
[](./LICENSE)
21 lines • 1.03 kB
JavaScript
import { PortalManifestSchema } from './portal-manifest.schema.js';
// Re-export relevant manifest utilities and types for external use
export { loadPortalManifest, } from './load-portal-manifest.js';
export { createPortalManifestFromPackage } from './create-portal-manifest.js';
// Helper to define a typed portal manifest function
export const definePortalManifest = (fn) => fn;
export { PortalManifestSchema, PortalManifestBuildSchema, } from './portal-manifest.schema.js';
/**
* Validates a portal manifest object against the PortalManifestSchema.
*
* @param manifest - The manifest object to validate.
* @returns The validated manifest object (typed) if valid.
* @throws ZodError if validation fails.
*
* Use this utility to ensure a manifest conforms to the expected schema before further processing.
*/
export function validatePortalManifest(manifest) {
// Throws if validation fails; returns typed manifest if valid
return PortalManifestSchema.parse(manifest);
}
//# sourceMappingURL=portal-manifest.js.map