Files
Deep-Package-Inspection/test/test-all-assets.js
T
rafif dd4c8f6876 feat(source2): push all latest files - device labeling, help system, proxy docs, database isolation fix
- Added DOKUMENTASI-FILTER-PER-SITE.md (site isolation docs)
- Fixed start-with-env.js to force-load .env.production
- Fixed MONGODB_URI hostname from mongodb-netify to mongodb.prod.proit.id
- Updated .gitignore to exclude sensitive scripts and credential files
- Minor UI and labeling improvements
2026-07-29 14:14:29 +07:00

33 lines
1.0 KiB
JavaScript

const axios = require('axios');
async function main() {
console.log('Fetching /login HTML to find all asset paths...');
const res = await axios.get('https://demoplace.my.id/login');
const html = res.data;
// Extract all /_next/static/ paths
const matches = html.match(/\/(_next|public)\/[a-zA-Z0-9_\-\.\/]+/g) || [];
const uniquePaths = [...new Set(matches)];
console.log(`Found ${uniquePaths.length} unique asset paths to check:`);
let failed = 0;
for (const assetPath of uniquePaths) {
const url = `https://demoplace.my.id${assetPath}`;
try {
const assetRes = await axios.get(url);
console.log(`✓ [200 OK] ${assetPath} (${assetRes.headers['content-length'] || assetRes.data.length} bytes)`);
} catch (err) {
console.error(`✗ [FAIL] ${assetPath}: ${err.message}`);
failed++;
}
}
console.log(`\n=== Verification Complete: ${uniquePaths.length - failed} passed, ${failed} failed ===`);
if (failed > 0) {
process.exit(1);
}
}
main().catch(console.error);