mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
488d9b901c
Change-type: minor
33 lines
1.3 KiB
JavaScript
Executable File
33 lines
1.3 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
// ****************************************************************************
|
|
// THIS IS FOR DEV PERROSES ONLY AND WILL NOT BE PART OF THE PUBLISHED PACKAGE
|
|
// Before opening a PR you should build and test your changes using bin/balena
|
|
// ****************************************************************************
|
|
|
|
// We boost the threadpool size as ext2fs can deadlock with some
|
|
// operations otherwise, if the pool runs out.
|
|
process.env.UV_THREADPOOL_SIZE = '64';
|
|
|
|
// Use fast-boot to cache require lookups, speeding up startup
|
|
require('fast-boot2').start({
|
|
cacheScope: __dirname + '/..',
|
|
cacheFile: '.fast-boot.json',
|
|
});
|
|
|
|
// Set the desired es version for downstream modules that support it
|
|
require('@balena/es-version').set('es2018');
|
|
|
|
const path = require('path');
|
|
const rootDir = path.join(__dirname, '..');
|
|
// Note: before ts-node v6.0.0, 'transpile-only' (no type checking) was the
|
|
// default option. We upgraded ts-node and found that adding 'transpile-only'
|
|
// was necessary to avoid a mysterious 'null' error message. On the plus side,
|
|
// it is supposed to run faster. We still benefit from type checking when
|
|
// running 'npm run build'.
|
|
require('ts-node').register({
|
|
project: path.join(rootDir, 'tsconfig.json'),
|
|
transpileOnly: true,
|
|
});
|
|
require('../lib/app').run();
|