@naturalcycles/cli
Advanced tools
Comparing version 1.1.10 to 1.2.0
@@ -0,1 +1,8 @@ | ||
# [1.2.0](https://github.com/NaturalCycles/cli/compare/v1.1.10...v1.2.0) (2020-11-01) | ||
### Features | ||
* print Node version together with NODE_OPTIONS ([5bf263e](https://github.com/NaturalCycles/cli/commit/5bf263eaf7b305bc36aa1e2efd26fb88f51028de)) | ||
## [1.1.10](https://github.com/NaturalCycles/cli/compare/v1.1.9...v1.1.10) (2020-08-21) | ||
@@ -2,0 +9,0 @@ |
@@ -14,10 +14,13 @@ #!/usr/bin/env node | ||
const { CLI_DEBUG } = process.env; | ||
main().catch(err => { | ||
try { | ||
main(); | ||
} | ||
catch (err) { | ||
console.error(err); | ||
console.log({ argv: process.argv }); | ||
process.exit(1); | ||
}); | ||
} | ||
// todo: just use/exec freaking ts-node | ||
async function main() { | ||
const projectTsconfigPath = await ensureProjectTsconfigScripts(); | ||
function main() { | ||
const projectTsconfigPath = ensureProjectTsconfigScripts(); | ||
// remove argv[1] from the array | ||
@@ -67,9 +70,5 @@ // before: | ||
} | ||
const { NODE_OPTIONS } = process.env; | ||
if (NODE_OPTIONS) { | ||
console.log(`${c.dim.grey(`NODE_OPTIONS: ${NODE_OPTIONS}`)}`); | ||
} | ||
else { | ||
console.log(`${c.dim.grey('NODE_OPTIONS are not defined')}`); | ||
} | ||
const { NODE_OPTIONS = 'not defined' } = process.env; | ||
const { node } = process.versions; | ||
console.log(`${c.dim.grey(`node ${node}, NODE_OPTIONS: ${NODE_OPTIONS}`)}`); | ||
// Resolve path | ||
@@ -99,3 +98,3 @@ // ./scripts/ ... .ts | ||
*/ | ||
async function ensureProjectTsconfigScripts() { | ||
function ensureProjectTsconfigScripts() { | ||
const projectTsconfigPath = `./scripts/tsconfig.json`; | ||
@@ -105,4 +104,4 @@ if (!fs.existsSync(projectTsconfigPath)) { | ||
// So, it will be copied into the project | ||
const { kpy } = require('@naturalcycles/fs-lib'); | ||
await kpy({ | ||
const { kpySync } = require('@naturalcycles/fs-lib'); | ||
kpySync({ | ||
baseDir: `${cfgDir}/scripts/`, | ||
@@ -109,0 +108,0 @@ inputPatterns: ['tsconfig.json'], |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "1.1.10", | ||
"version": "1.2.0", | ||
"description": "CLI utils to be installed globally via 'npm i -g'", | ||
@@ -44,0 +44,0 @@ "author": "Natural Cycles Team", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9865
123