17 lines
540 B
JavaScript
17 lines
540 B
JavaScript
import fs from 'node:fs/promises';
|
|
import path from 'node:path';
|
|
|
|
const manifestPath = path.join(process.cwd(), 'patches', 'patch-manifest.json');
|
|
|
|
try {
|
|
const content = await fs.readFile(manifestPath, 'utf8');
|
|
const manifest = JSON.parse(content);
|
|
if (!Array.isArray(manifest.patches)) {
|
|
throw new Error('Invalid patch manifest format.');
|
|
}
|
|
console.log(`Patch manifest verified with ${manifest.patches.length} entries.`);
|
|
} catch (error) {
|
|
console.error(`Patch verification failed: ${error.message}`);
|
|
process.exit(1);
|
|
}
|