cubejs-cli 1.7.44 → 1.7.45

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.
package/README.md CHANGED
@@ -7,6 +7,16 @@
7
7
 
8
8
  # Cube CLI
9
9
 
10
+ > [!WARNING]
11
+ > `cubejs-cli` is deprecated. Please use the new native Cube CLI (`cube`) instead:
12
+ >
13
+ > ```bash
14
+ > curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh
15
+ > ```
16
+ >
17
+ > See the [Cube CLI reference](https://docs.cube.dev/reference/cli) for details.
18
+ > Set `CUBEJS_CLI_NO_DEPRECATION_WARNING=true` to suppress the warning.
19
+
10
20
  Install:
11
21
 
12
22
  ```
package/dist/src/cli.js CHANGED
@@ -13,6 +13,7 @@ const typegen_1 = require("./command/typegen");
13
13
  const auth_1 = require("./command/auth");
14
14
  const utils_1 = require("./utils");
15
15
  const validate_1 = require("./command/validate");
16
+ const deprecation_1 = require("./deprecation");
16
17
  const packageJson = (0, utils_1.loadCliManifest)();
17
18
  commander_1.default.name(Object.keys(packageJson.bin)[0])
18
19
  .version(packageJson.version);
@@ -23,6 +24,7 @@ commander_1.default
23
24
  console.log('Use cubejs <command> --help for more information about a command.');
24
25
  console.log('');
25
26
  });
27
+ (0, deprecation_1.displayDeprecationWarning)();
26
28
  (async () => {
27
29
  await (0, auth_1.configureAuthCommand)(commander_1.default);
28
30
  await (0, token_1.configureTokenCommand)(commander_1.default);
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,0DAAgC;AAEhC,6CAA0D;AAC1D,6CAA0D;AAC1D,6CAA0D;AAC1D,iDAA8D;AAC9D,2CAAwD;AACxD,+CAA4D;AAC5D,yCAAsD;AACtD,mCAA0C;AAC1C,iDAA8D;AAE9D,MAAM,WAAW,GAAG,IAAA,uBAAe,GAAE,CAAC;AAEtC,mBAAO,CAAC,I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,CAAC,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const NEW_CLI_DOCS_URL = "https://docs.cube.dev/reference/cli";
2
+ export declare const NEW_CLI_INSTALL_SH = "curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh";
3
+ export declare const NEW_CLI_INSTALL_PS = "irm https://raw.githubusercontent.com/cube-js/cube/master/install-cli.ps1 | iex";
4
+ export declare const COMMAND_REPLACEMENTS: ReadonlyMap<string, string>;
5
+ export declare const isDeprecationWarningDisabled: (env?: NodeJS.ProcessEnv) => boolean;
6
+ export declare const deprecationMessage: (command?: string) => string[];
7
+ export declare const shouldDisplayDeprecationWarning: (argv: string[]) => boolean;
8
+ export declare const displayDeprecationWarning: (argv?: string[]) => void;
9
+ //# sourceMappingURL=deprecation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../src/deprecation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wCAAwC,CAAC;AACtE,eAAO,MAAM,kBAAkB,yFAAyF,CAAC;AACzH,eAAO,MAAM,kBAAkB,oFAAoF,CAAC;AAGpH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAG3D,CAAC;AAEH,eAAO,MAAM,4BAA4B,GAAI,MAAK,MAAM,CAAC,UAAwB,YAGhF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,MAAM,EAiB3D,CAAC;AASF,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,EAAE,YAEX,CAAC;AAIpD,eAAO,MAAM,yBAAyB,GAAI,OAAM,MAAM,EAA0B,SAQ/E,CAAC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.displayDeprecationWarning = exports.shouldDisplayDeprecationWarning = exports.deprecationMessage = exports.isDeprecationWarningDisabled = exports.COMMAND_REPLACEMENTS = exports.NEW_CLI_INSTALL_PS = exports.NEW_CLI_INSTALL_SH = exports.NEW_CLI_DOCS_URL = void 0;
4
+ exports.NEW_CLI_DOCS_URL = 'https://docs.cube.dev/reference/cli';
5
+ exports.NEW_CLI_INSTALL_SH = 'curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh';
6
+ exports.NEW_CLI_INSTALL_PS = 'irm https://raw.githubusercontent.com/cube-js/cube/master/install-cli.ps1 | iex';
7
+ // Legacy commands that have a direct counterpart in the new `cube` CLI.
8
+ exports.COMMAND_REPLACEMENTS = new Map([
9
+ ['auth', 'cube login'],
10
+ ['deploy', 'cube deploy <deployment-id>'],
11
+ ]);
12
+ const isDeprecationWarningDisabled = (env = process.env) => {
13
+ const value = (env.CUBEJS_CLI_NO_DEPRECATION_WARNING || '').trim().toLowerCase();
14
+ return value !== '' && value !== 'false' && value !== '0';
15
+ };
16
+ exports.isDeprecationWarningDisabled = isDeprecationWarningDisabled;
17
+ const deprecationMessage = (command) => {
18
+ const lines = [
19
+ 'Deprecation warning. The `cubejs` CLI (npm package `cubejs-cli`) is deprecated and will stop receiving updates.',
20
+ 'Please switch to the new native Cube CLI (`cube`):',
21
+ ` Linux / macOS: ${exports.NEW_CLI_INSTALL_SH}`,
22
+ ` Windows (PowerShell): ${exports.NEW_CLI_INSTALL_PS}`,
23
+ ];
24
+ const replacement = command && exports.COMMAND_REPLACEMENTS.get(command);
25
+ if (replacement) {
26
+ lines.push(`Instead of \`cubejs ${command}\`, use \`${replacement}\`.`);
27
+ }
28
+ lines.push(`Learn more: ${exports.NEW_CLI_DOCS_URL}`);
29
+ lines.push('Set CUBEJS_CLI_NO_DEPRECATION_WARNING=true to hide this message.');
30
+ return lines;
31
+ };
32
+ exports.deprecationMessage = deprecationMessage;
33
+ const HELP_FLAGS = new Set(['--help', '-h']);
34
+ const commandFrom = (argv) => (argv[0] && !argv[0].startsWith('-') ? argv[0] : undefined);
35
+ // `server` is the Docker image entrypoint (`CMD ["cubejs", "server"]`) and
36
+ // `--version` output gets parsed by scripts, so both stay silent, like every
37
+ // run that has no `cube` counterpart.
38
+ const shouldDisplayDeprecationWarning = (argv) => !argv.length ||
39
+ HELP_FLAGS.has(argv[0]) ||
40
+ exports.COMMAND_REPLACEMENTS.has(commandFrom(argv) ?? '');
41
+ exports.shouldDisplayDeprecationWarning = shouldDisplayDeprecationWarning;
42
+ // Printed to stderr so the command's own stdout (e.g. `cubejs deploy`)
43
+ // stays intact for scripts that consume it.
44
+ const displayDeprecationWarning = (argv = process.argv.slice(2)) => {
45
+ if ((0, exports.isDeprecationWarningDisabled)() || !(0, exports.shouldDisplayDeprecationWarning)(argv)) {
46
+ return;
47
+ }
48
+ console.error('');
49
+ (0, exports.deprecationMessage)(commandFrom(argv)).forEach((line) => console.error(line));
50
+ console.error('');
51
+ };
52
+ exports.displayDeprecationWarning = displayDeprecationWarning;
53
+ //# sourceMappingURL=deprecation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecation.js","sourceRoot":"","sources":["../../src/deprecation.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,qCAAqC,CAAC;AACzD,QAAA,kBAAkB,GAAG,sFAAsF,CAAC;AAC5G,QAAA,kBAAkB,GAAG,iFAAiF,CAAC;AAEpH,wEAAwE;AAC3D,QAAA,oBAAoB,GAAgC,IAAI,GAAG,CAAC;IACvE,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,QAAQ,EAAE,6BAA6B,CAAC;CAC1C,CAAC,CAAC;AAEI,MAAM,4BAA4B,GAAG,CAAC,MAAyB,OAAO,CAAC,GAAG,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACjF,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,GAAG,CAAC;AAC5D,CAAC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vE,4CAA4C;AACrC,MAAM,yBAAyB,GAAG,CAAC,OAAiB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IAClF,IAAI,IAAA,oCAA4B,GAAE,IAAI,CAAC,IAAA,uCAA+B,EAAC,IAAI,CAAC,EAAE,CAAC;QAC7E,OAAO;IACT,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,IAAA,0BAAkB,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC,CAAC;AARW,QAAA,yBAAyB,6BAQpC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "cubejs-cli",
3
3
  "description": "Cube Command Line Interface",
4
4
  "author": "Cube Dev, Inc.",
5
- "version": "1.7.44",
5
+ "version": "1.7.45",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/cube-js/cube.git",
@@ -28,10 +28,10 @@
28
28
  "LICENSE"
29
29
  ],
30
30
  "dependencies": {
31
- "@cubejs-backend/cloud": "1.7.44",
31
+ "@cubejs-backend/cloud": "1.7.45",
32
32
  "@cubejs-backend/dotenv": "^9.0.2",
33
- "@cubejs-backend/schema-compiler": "1.7.44",
34
- "@cubejs-backend/shared": "1.7.44",
33
+ "@cubejs-backend/schema-compiler": "1.7.45",
34
+ "@cubejs-backend/shared": "1.7.45",
35
35
  "chalk": "^2.4.2",
36
36
  "cli-progress": "^3.10.0",
37
37
  "commander": "^2.19.0",
@@ -48,8 +48,8 @@
48
48
  "colors": "1.4.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@cubejs-backend/linter": "1.7.44",
52
- "@cubejs-backend/server": "1.7.44",
51
+ "@cubejs-backend/linter": "1.7.45",
52
+ "@cubejs-backend/server": "1.7.45",
53
53
  "@oclif/command": "^1.8.13",
54
54
  "@types/cli-progress": "^3.9.1",
55
55
  "@types/cross-spawn": "^6.0.2",
@@ -63,5 +63,5 @@
63
63
  "typescript": "~6.0.3"
64
64
  },
65
65
  "license": "Apache-2.0",
66
- "gitHead": "7b6d5b5edf1bdba261106fbd45c2ba00f2bdbd0e"
66
+ "gitHead": "f2c28b80562b3e30ddfd4850d8b45ffffd95cabd"
67
67
  }