MCPcopy Create free account
hub / github.com/decaporg/decap-cms / main

Function main

scripts/test-package-integrity.mjs:275–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273}
274
275async function main() {
276 log('Starting pnpm package integrity tests...');
277 log(`Root directory: ${ROOT_DIR}`);
278
279 let allPassed = true;
280
281 const publishablePackages = getPublishablePackages();
282 log(`\n=== Checking packed manifests for ${publishablePackages.length} publishable packages ===`);
283
284 for (const { name, dir } of publishablePackages) {
285 if (!testPackagePack(name, dir)) {
286 allPassed = false;
287 }
288 }
289
290 for (const packageName of BROWSER_PACKAGES) {
291 log(`\n=== Testing ${packageName} ===`);
292
293 const browserOk = testBrowserCompatibility(packageName);
294 const pkgJsonOk = testPackageJson(packageName);
295
296 if (!browserOk || !pkgJsonOk) {
297 allPassed = false;
298 }
299 }
300
301 log('\n=== Summary ===');
302 if (allPassed) {
303 log('All package integrity tests passed!');
304 process.exit(0);
305 } else {
306 error('Some package integrity tests failed!');
307 process.exit(1);
308 }
309}
310
311main().catch(e => {
312 error(e.message);

Callers 1

Calls 6

testPackagePackFunction · 0.85
testBrowserCompatibilityFunction · 0.85
testPackageJsonFunction · 0.85
logFunction · 0.70
getPublishablePackagesFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected