balena-cli/bin/run.js
Otavio Jacobi b11bfa2395 Move to ESM
Change-type: major
2025-01-06 08:24:49 -03:00

24 lines
660 B
JavaScript
Executable File

#!/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
process.env.OCLIF_TS_NODE = '0';
async function run() {
// Use fast-boot to cache require lookups, speeding up startup
const { start } = await import('../build/fast-boot.js');
await start();
// Set the desired es version for downstream modules that support it
(await import('@balena/es-version')).set('es2018');
//
// // Run the CLI
const { run } = await import('../build/app.js');
run(undefined, { dir: import.meta.url });
}
void run();