-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating min node version, and bash declare (#132)
Signed-off-by: Derek Anderson <[email protected]>
- Loading branch information
Showing
6 changed files
with
41 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
#!/usr/bin/env node | ||
const compareVersions = require("compare-versions") | ||
const MIN_NODE_VERSION = '14.17.6' | ||
|
||
if (compareVersions.compare(process.versions.node, MIN_NODE_VERSION, '<')) { | ||
console.error( | ||
`Bls CLI requires at least node.js v${MIN_NODE_VERSION}.\nYou are using v${process.versions.node}. Please update your version of node.js. Consider using Node.js version manager https://github.com/nvm-sh/nvm.` | ||
) | ||
process.exit(1) | ||
} else { | ||
const { main } = require("./dist/src/index"); | ||
const { version } = require("./package.json"); | ||
|
||
main(process.argv.slice(2), { version }); | ||
} | ||
#!/usr/bin/env node --no-warnings | ||
const compareVersions = require("compare-versions"); | ||
|
||
|
||
const { main } = require("./dist/src/index"); | ||
const { version } = require("./package.json"); | ||
|
||
main(process.argv.slice(2), { version }); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
#!/usr/bin/env node | ||
#!/usr/bin/env node --no-warnings | ||
require("ts-node/register"); | ||
const compareVersions = require("compare-versions"); | ||
const MIN_NODE_VERSION = "14.17.6"; | ||
|
||
if (compareVersions.compare(process.versions.node, MIN_NODE_VERSION, "<")) { | ||
console.error( | ||
`Bls CLI requires at least node.js v${MIN_NODE_VERSION}.\nYou are using v${process.versions.node}. Please update your version of node.js. Consider using Node.js version manager https://github.com/nvm-sh/nvm.`, | ||
); | ||
process.exit(1); | ||
} else { | ||
const { main } = require("./src/index"); | ||
const { version } = require("./package.json"); | ||
const { main } = require("./src/index"); | ||
const { version } = require("./package.json"); | ||
|
||
const runCLI = (args) => { | ||
main(args, { version }); | ||
}; | ||
const runCLI = (args) => { | ||
main(args, { version }); | ||
}; | ||
|
||
// Export the runCLI function for testing | ||
module.exports = { runCLI }; | ||
// Export the runCLI function for testing | ||
module.exports = { runCLI }; | ||
|
||
// Run the CLI if executed directly | ||
if (require.main === module) { | ||
runCLI(process.argv.slice(2)); | ||
} | ||
} | ||
// Run the CLI if executed directly | ||
if (require.main === module) { | ||
runCLI(process.argv.slice(2)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters