MCPcopy Index your code
hub / github.com/subquery/subql / validateCommonProjectManifest

Function validateCommonProjectManifest

packages/common/src/project/load.ts:90–98  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

88
89// Validate generic/common section for project manifest
90export function validateCommonProjectManifest(raw: unknown): void {
91 const projectManifest = plainToClass<CommonProjectManifestV1_0_0Impl, unknown>(CommonProjectManifestV1_0_0Impl, raw);
92 const errors = validateSync(projectManifest, {whitelist: true});
93 if (errors?.length) {
94 // TODO: print error details
95 const errorMsgs = errors.map((e) => e.toString()).join('\n');
96 throw new Error(`project validation failed.\n${errorMsgs}`);
97 }
98}

Callers 1

uploadToIpfsFunction · 0.90

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected