Files
KArtSell.Aegis/docs/Design/kbx-foundation-v60-status-canonical-contract-hardening/scripts/report-fe-runtime-readiness.mjs
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

25 lines
1.2 KiB
JavaScript

import fs from 'node:fs'
import process from 'node:process'
const exists=p=>fs.existsSync(p)
const pkg=JSON.parse(fs.readFileSync('package.json','utf8'))
const result={
generatedAt:new Date().toISOString(),
node:process.version,
packageManager:pkg.packageManager,
lockfile:exists('pnpm-lock.yaml'),
nodeModules:exists('node_modules'),
playwrightConfig:exists('playwright.config.ts'),
playwrightInstalled:exists('node_modules/@playwright/test'),
vitestInstalled:exists('node_modules/vitest'),
demoRuntimeScript:Boolean(pkg.scripts?.['dev:web:demo']),
e2eScript:Boolean(pkg.scripts?.['test:e2e']),
}
result.status=result.lockfile&&result.playwrightInstalled&&result.vitestInstalled?'ready':'blocked'
result.blockers=[]
if(!result.lockfile)result.blockers.push('pnpm-lock.yaml is absent; reproducible dependency install evidence is not available.')
if(!result.nodeModules)result.blockers.push('node_modules is absent in this artifact environment.')
if(!result.playwrightInstalled)result.blockers.push('@playwright/test is declared but not installed in this artifact environment.')
if(!result.vitestInstalled)result.blockers.push('vitest is declared but not installed in this artifact environment.')
console.log(JSON.stringify(result,null,2))