task-fic-display

This commit is contained in:
phaichayon
2026-06-27 22:14:16 +07:00
parent 1c019d12f3
commit 071293b60f
30 changed files with 2329 additions and 107 deletions

View File

@@ -0,0 +1,19 @@
import { spawnSync } from 'node:child_process';
function run(label: string, args: string[]) {
const result = spawnSync(process.execPath, args, {
stdio: 'inherit',
env: process.env
});
if (result.status !== 0) {
throw new Error(`[seed:system] ${label} failed with exit code ${result.status ?? 1}`);
}
}
function main() {
run('super admin seed', ['scripts/seed-super-admin.js']);
run('foundation seed', ['--experimental-strip-types', 'src/db/seeds/foundation.seed.ts']);
}
main();

18
src/db/seeds/uat.seed.ts Normal file
View File

@@ -0,0 +1,18 @@
import { spawnSync } from 'node:child_process';
function main() {
const result = spawnSync(
process.execPath,
['--experimental-strip-types', 'src/db/seeds/crm-uat.seed.ts'],
{
stdio: 'inherit',
env: process.env
}
);
if (result.status !== 0) {
throw new Error(`[seed:uat] failed with exit code ${result.status ?? 1}`);
}
}
main();