tema 5a0c5272e0 Update SIM management calculations and configurations
- Changed the base URL for Freebit API in environment validation to the new test URL.
- Updated data usage calculations in SimManagementService and related components to use 1000 instead of 1024 for MB to GB conversions.
- Adjusted the top-up modal and related components to reflect the new GB input method and validation rules.
- Enhanced documentation to align with the updated API and usage metrics.
2025-09-06 17:02:20 +09:00

30 lines
995 B
JavaScript

#!/usr/bin/env node
// Ensure dev-time Next.js manifests exist to avoid noisy ENOENT errors
import { mkdirSync, existsSync, writeFileSync } from 'fs';
import { join } from 'path';
const root = new URL('..', import.meta.url).pathname; // apps/portal
const nextDir = join(root, '.next');
const routesManifestPath = join(nextDir, 'routes-manifest.json');
try {
mkdirSync(nextDir, { recursive: true });
if (!existsSync(routesManifestPath)) {
const minimalManifest = {
version: 5,
pages404: true,
basePath: '',
redirects: [],
rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
headers: [],
};
writeFileSync(routesManifestPath, JSON.stringify(minimalManifest, null, 2));
// eslint-disable-next-line no-console
console.log('[dev-prep] Created minimal .next/routes-manifest.json');
}
} catch (err) {
// eslint-disable-next-line no-console
console.warn('[dev-prep] Failed to prepare Next dev files:', err?.message || err);
}