25 lines
733 B
TypeScript
25 lines
733 B
TypeScript
/**
|
|
* Top-level baker orchestrator (`tools/pack-all.ts`).
|
|
*
|
|
* Delegates asset packing and offline verification to `src/baker/cli.ts`.
|
|
*/
|
|
|
|
import { resolve } from 'node:path'
|
|
import { pathToFileURL } from 'node:url'
|
|
import { UNIVERSAL_DT1_PATHS, validatePackManifest } from '../src/baker/index.ts'
|
|
import { runBakerCli, runBakerVerify } from '../src/baker/cli.ts'
|
|
|
|
export { UNIVERSAL_DT1_PATHS, validatePackManifest, runBakerCli, runBakerVerify }
|
|
|
|
const isMain =
|
|
process.argv[1] !== undefined &&
|
|
import.meta.url === pathToFileURL(resolve(process.argv[1])).href
|
|
|
|
if (isMain) {
|
|
const args = process.argv.slice(2)
|
|
runBakerCli(args.length > 0 ? args : ['all']).catch(err => {
|
|
console.error(err)
|
|
process.exit(1)
|
|
})
|
|
}
|