@zuplo/cli 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +18 -8
  2. package/package.json +3 -1
package/dist/cli.js CHANGED
@@ -1,15 +1,25 @@
1
1
  import * as dotenv from "dotenv";
2
2
  dotenv.config();
3
+ import { gte } from "semver";
3
4
  import { hideBin } from "yargs/helpers";
4
5
  import yargs from "yargs/yargs";
5
6
  import deploy from "./cmds/deploy.js";
6
7
  import test from "./cmds/test.js";
7
- void yargs(hideBin(process.argv))
8
- .env("ZUPLO")
9
- .version(false)
10
- .command(deploy)
11
- .command(test)
12
- .demandCommand()
13
- .strictCommands()
14
- .help().argv;
8
+ import { printCriticalFailureToConsoleAndExit } from "./common/output.js";
9
+ const MIN_NODE_VERSION = "18.0.0";
10
+ if (gte(process.versions.node, MIN_NODE_VERSION)) {
11
+ void yargs(hideBin(process.argv))
12
+ .env("ZUPLO")
13
+ .version(false)
14
+ .command(deploy)
15
+ .command(test)
16
+ .demandCommand()
17
+ .strictCommands()
18
+ .help().argv;
19
+ }
20
+ else {
21
+ printCriticalFailureToConsoleAndExit(`The zup CLI requires at least node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of node.js.
22
+
23
+ Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
24
+ }
15
25
  //# sourceMappingURL=cli.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "author": "Zuplo, Inc.",
@@ -25,6 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@types/node": "^18.11.5",
27
27
  "@types/rimraf": "^3.0.2",
28
+ "@types/semver": "^7.3.13",
28
29
  "@types/tar": "^6.1.3",
29
30
  "@types/temp": "^0.9.1",
30
31
  "@types/yargs": "^17.0.13",
@@ -52,6 +53,7 @@
52
53
  "pino": "^8.7.0",
53
54
  "pino-pretty": "^9.1.1",
54
55
  "rimraf": "^3.0.2",
56
+ "semver": "^7.3.8",
55
57
  "simple-git": "^3.14.1",
56
58
  "tar": "^6.1.11",
57
59
  "temp": "^0.9.4",