add crc-32 package and rebuild package lock files

This commit is contained in:
2026-05-13 15:23:35 +02:00
parent e55f3b2a4b
commit f87b363963
3 changed files with 60 additions and 2 deletions
+21
View File
@@ -65,6 +65,27 @@ try {
}
}
// Import crc-32 for file integrity checks (try multiple locations)
let crc32;
try {
// Try local node_modules first
crc32 = require('crc-32');
} catch (err) {
try {
// Try to find npm global prefix and load from there
const npmPrefix = execSync('npm config get prefix', { encoding: 'utf-8' }).trim();
const globalCrc32 = join(npmPrefix, 'node_modules', 'crc-32');
crc32 = require(globalCrc32);
} catch (err2) {
console.error(
'\n❌ Missing dependency: crc-32\n' +
'Please install globally with: npm install -g crc-32\n' +
'Or locally in the current directory with: npm install crc-32\n'
);
process.exit(1);
}
}
// ============================================================================
// CONFIGURATION
// ============================================================================