2024-03-11 14:33:30 -03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
// We boost the threadpool size as ext2fs can deadlock with some
|
|
|
|
// operations otherwise, if the pool runs out.
|
|
|
|
process.env.UV_THREADPOOL_SIZE = '64';
|
|
|
|
|
|
|
|
// Disable oclif registering ts-node
|
2024-12-16 11:11:57 -03:00
|
|
|
process.env.OCLIF_TS_NODE = '0';
|
2024-03-11 14:33:30 -03:00
|
|
|
|
|
|
|
async function run() {
|
|
|
|
// Use fast-boot to cache require lookups, speeding up startup
|
2024-12-19 15:31:07 -03:00
|
|
|
const { start } = await import('../build/fast-boot.js');
|
|
|
|
await start();
|
2024-03-11 14:33:30 -03:00
|
|
|
|
|
|
|
// Set the desired es version for downstream modules that support it
|
2024-12-19 15:31:07 -03:00
|
|
|
(await import('@balena/es-version')).set('es2018');
|
|
|
|
//
|
|
|
|
// // Run the CLI
|
|
|
|
const { run } = await import('../build/app.js');
|
|
|
|
run(undefined, { dir: import.meta.url });
|
2024-03-11 14:33:30 -03:00
|
|
|
}
|
|
|
|
|
2024-12-16 11:11:57 -03:00
|
|
|
void run();
|