@lightdash/cli 2.360.2 → 2.361.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.
@@ -1 +1 @@
1
- {"version":3,"file":"getDbtVersion.d.ts","sourceRoot":"","sources":["../../../src/handlers/dbt/getDbtVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAMnB,MAAM,mBAAmB,CAAC;AA2E3B,MAAM,MAAM,UAAU,GAAG;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,gBAAgB,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,UAAU,CA+CxD,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAC7C;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAc9E,CAAC"}
1
+ {"version":3,"file":"getDbtVersion.d.ts","sourceRoot":"","sources":["../../../src/handlers/dbt/getDbtVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAMnB,MAAM,mBAAmB,CAAC;AAmF3B,MAAM,MAAM,UAAU,GAAG;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,gBAAgB,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,UAAU,CA+CxD,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAC7C;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAc9E,CAAC"}
@@ -12,6 +12,14 @@ const DBT_CLOUD_CLI_REGEX = /dbt Cloud CLI.*/;
12
12
  const DBT_FUSION_VERSION_REGEX = /dbt-fusion.*/;
13
13
  const DBT_V2_VERSION_REGEX = /^dbt 2\.\d+\.\d+\S*/m;
14
14
  const getDbtCLIVersion = async () => {
15
+ // Callers that already know the dbt version (the Learn sandbox pins the
16
+ // binary server-side) pass it here so the CLI doesn't start a Python
17
+ // interpreter just to ask. Each `dbt --version` costs seconds on a small
18
+ // machine and one deploy asks four times.
19
+ const knownVersion = process.env.LIGHTDASH_DBT_VERSION?.trim();
20
+ if (knownVersion) {
21
+ return knownVersion;
22
+ }
15
23
  try {
16
24
  const { all } = await (0, execa_1.default)('dbt', ['--version'], {
17
25
  all: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "2.360.2",
3
+ "version": "2.361.0",
4
4
  "description": "Lightdash CLI tool",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "@actions/core": "1.11.1",
23
23
  "@aws-sdk/credential-providers": "3.995.0",
24
24
  "@casl/ability": "6.8.0",
25
- "@lightdash/common": "2.360.2",
26
- "@lightdash/warehouses": "2.360.2",
25
+ "@lightdash/common": "2.361.0",
26
+ "@lightdash/warehouses": "2.361.0",
27
27
  "@sidvind/better-ajv-errors": "7.0.0",
28
28
  "@types/columnify": "1.5.1",
29
29
  "ajv": "8.18.0",