@lightdash/cli 0.2285.0 → 0.2285.2
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/dist/.tsbuildinfo +1 -1
- package/dist/env.d.ts +4 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +29 -1
- package/dist/handlers/dbt/apiClient.js +1 -1
- package/package.json +3 -3
package/dist/env.d.ts
CHANGED
|
@@ -5,4 +5,8 @@ export declare const OPTIMIZED_NODE_VERSION = 20;
|
|
|
5
5
|
export declare const CLI_VERSION: string;
|
|
6
6
|
export declare const DEFAULT_DBT_PROJECT_DIR: string;
|
|
7
7
|
export declare const DEFAULT_DBT_PROFILES_DIR: string;
|
|
8
|
+
type InstallMethod = 'npm' | 'homebrew' | 'binary';
|
|
9
|
+
export declare const getInstallMethod: () => InstallMethod;
|
|
10
|
+
export declare const getUpdateInstructions: (version: string) => string;
|
|
11
|
+
export {};
|
|
8
12
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;CAAqD,CAAC;AAE/E,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAiB,WAAW,QAAgB,CAAC;AAEpD,eAAO,MAAM,uBAAuB,QAAqC,CAAC;AAC1E,eAAO,MAAM,wBAAwB,EAAE,MAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;CAAqD,CAAC;AAE/E,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAiB,WAAW,QAAgB,CAAC;AAEpD,eAAO,MAAM,uBAAuB,QAAqC,CAAC;AAC1E,eAAO,MAAM,wBAAwB,EAAE,MAAgC,CAAC;AAExE,KAAK,aAAa,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnD,eAAO,MAAM,gBAAgB,QAAO,aAiBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAAa,MAAM,KAAG,MAWvD,CAAC"}
|
package/dist/env.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_DBT_PROFILES_DIR = exports.DEFAULT_DBT_PROJECT_DIR = exports.CLI_VERSION = exports.OPTIMIZED_NODE_VERSION = exports.NODE_VERSION = void 0;
|
|
3
|
+
exports.getUpdateInstructions = exports.getInstallMethod = exports.DEFAULT_DBT_PROFILES_DIR = exports.DEFAULT_DBT_PROJECT_DIR = exports.CLI_VERSION = exports.OPTIMIZED_NODE_VERSION = exports.NODE_VERSION = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parse_node_version_1 = tslib_1.__importDefault(require("parse-node-version"));
|
|
6
6
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
@@ -10,3 +10,31 @@ exports.OPTIMIZED_NODE_VERSION = 20;
|
|
|
10
10
|
exports.CLI_VERSION = package_json_1.default.version;
|
|
11
11
|
exports.DEFAULT_DBT_PROJECT_DIR = process.env.DBT_PROJECT_DIR || '.';
|
|
12
12
|
exports.DEFAULT_DBT_PROFILES_DIR = (0, profile_1.findDbtDefaultProfile)();
|
|
13
|
+
const getInstallMethod = () => {
|
|
14
|
+
// pkg-compiled binary
|
|
15
|
+
if (process.pkg) {
|
|
16
|
+
return 'binary';
|
|
17
|
+
}
|
|
18
|
+
const { execPath } = process;
|
|
19
|
+
// Homebrew: macOS (Apple Silicon, Intel) or Linux (Linuxbrew)
|
|
20
|
+
if (execPath.includes('/opt/homebrew/') ||
|
|
21
|
+
execPath.includes('/usr/local/Cellar/') ||
|
|
22
|
+
execPath.includes('linuxbrew')) {
|
|
23
|
+
return 'homebrew';
|
|
24
|
+
}
|
|
25
|
+
return 'npm';
|
|
26
|
+
};
|
|
27
|
+
exports.getInstallMethod = getInstallMethod;
|
|
28
|
+
const getUpdateInstructions = (version) => {
|
|
29
|
+
const method = (0, exports.getInstallMethod)();
|
|
30
|
+
switch (method) {
|
|
31
|
+
case 'homebrew':
|
|
32
|
+
return 'running: brew upgrade lightdash';
|
|
33
|
+
case 'binary':
|
|
34
|
+
return 'downloading from: https://github.com/lightdash/lightdash/releases';
|
|
35
|
+
case 'npm':
|
|
36
|
+
default:
|
|
37
|
+
return `running: npm install -g @lightdash/cli@${version}`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.getUpdateInstructions = getUpdateInstructions;
|
|
@@ -134,7 +134,7 @@ const checkLightdashVersion = async () => {
|
|
|
134
134
|
});
|
|
135
135
|
if (health.version !== env_1.CLI_VERSION) {
|
|
136
136
|
const config = await (0, config_1.getConfig)();
|
|
137
|
-
console.error(`${styles.title('Warning')}: CLI (${env_1.CLI_VERSION}) is running a different version than Lightdash (${health.version}) on ${config.context?.serverUrl}.\n Some commands may fail, consider upgrading your CLI by
|
|
137
|
+
console.error(`${styles.title('Warning')}: CLI (${env_1.CLI_VERSION}) is running a different version than Lightdash (${health.version}) on ${config.context?.serverUrl}.\n Some commands may fail, consider upgrading your CLI by ${styles.secondary((0, env_1.getUpdateInstructions)(health.version))}`);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash/cli",
|
|
3
|
-
"version": "0.2285.
|
|
3
|
+
"version": "0.2285.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"unique-names-generator": "^4.7.1",
|
|
39
39
|
"uuid": "^11.0.3",
|
|
40
40
|
"yaml": "^2.7.0",
|
|
41
|
-
"@lightdash/common": "0.2285.
|
|
42
|
-
"@lightdash/warehouses": "0.2285.
|
|
41
|
+
"@lightdash/common": "0.2285.2",
|
|
42
|
+
"@lightdash/warehouses": "0.2285.2"
|
|
43
43
|
},
|
|
44
44
|
"description": "Lightdash CLI tool",
|
|
45
45
|
"devDependencies": {
|