@lightdash/cli 0.2436.2 → 0.2436.4

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":"deploy.d.ts","sourceRoot":"","sources":["../../src/handlers/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,YAAY,EASf,MAAM,mBAAmB,CAAC;AAiB3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,KAAK,oBAAoB,GAAG,iBAAiB,GAAG;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAkCF,eAAO,MAAM,MAAM,aACL,CAAC,OAAO,GAAG,YAAY,CAAC,EAAE,WAC3B,UAAU,KACpB,OAAO,CAAC,IAAI,CAmEd,CAAC;AA+FF,eAAO,MAAM,aAAa,oBAA2B,oBAAoB,kBAwFxE,CAAC"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/handlers/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,YAAY,EASf,MAAM,mBAAmB,CAAC;AAkB3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,KAAK,oBAAoB,GAAG,iBAAiB,GAAG;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAkCF,eAAO,MAAM,MAAM,aACL,CAAC,OAAO,GAAG,YAAY,CAAC,EAAE,WAC3B,UAAU,KACpB,OAAO,CAAC,IAAI,CAmEd,CAAC;AA+FF,eAAO,MAAM,aAAa,oBAA2B,oBAAoB,kBAuGxE,CAAC"}
@@ -12,6 +12,7 @@ const config_1 = require("../config");
12
12
  const context_1 = require("../dbt/context");
13
13
  const globalState_1 = tslib_1.__importDefault(require("../globalState"));
14
14
  const lightdash_config_1 = require("../lightdash-config");
15
+ const loader_1 = require("../lightdash/loader");
15
16
  const styles = tslib_1.__importStar(require("../styles"));
16
17
  const compile_1 = require("./compile");
17
18
  const createProject_1 = require("./createProject");
@@ -163,6 +164,17 @@ const deployHandler = async (originalOptions) => {
163
164
  ...originalOptions,
164
165
  };
165
166
  globalState_1.default.setVerbose(options.verbose);
167
+ // Check if this is a Lightdash YAML-only project (no dbt required)
168
+ // Auto-detect unless user explicitly passed --organization-credentials
169
+ // Note: --no-warehouse-credentials defaults to true in Commander.js
170
+ if (options.organizationCredentials === undefined) {
171
+ const absoluteProjectPath = path_1.default.resolve(options.projectDir);
172
+ const yamlModelFiles = await (0, loader_1.findLightdashModelFiles)(absoluteProjectPath);
173
+ if (yamlModelFiles.length > 0) {
174
+ globalState_1.default.debug(`> Found ${yamlModelFiles.length} Lightdash YAML models, skipping dbt requirements`);
175
+ options.warehouseCredentials = false;
176
+ }
177
+ }
166
178
  // No warehouse credentials assumes we skip dbt compile and warehouse catalog
167
179
  if (options.warehouseCredentials === false) {
168
180
  options.skipDbtCompile = true;
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/handlers/preview.ts"],"names":[],"mappings":"AACA,OAAO,EACH,+BAA+B,EAIlC,MAAM,mBAAmB,CAAC;AAe3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,KAAK,qBAAqB,GAAG,iBAAiB,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,+BAA+B,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAyEF,eAAO,MAAM,cAAc,YACd,qBAAqB,KAC/B,OAAO,CAAC,IAAI,CAkPd,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACnB,qBAAqB,KAC/B,OAAO,CAAC,IAAI,CAqId,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAClB,yBAAyB,KACnC,OAAO,CAAC,IAAI,CA0Cd,CAAC"}
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/handlers/preview.ts"],"names":[],"mappings":"AACA,OAAO,EACH,+BAA+B,EAIlC,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,KAAK,qBAAqB,GAAG,iBAAiB,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,+BAA+B,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAyEF,eAAO,MAAM,cAAc,YACd,qBAAqB,KAC/B,OAAO,CAAC,IAAI,CA8Pd,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACnB,qBAAqB,KAC/B,OAAO,CAAC,IAAI,CAiJd,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAClB,yBAAyB,KACnC,OAAO,CAAC,IAAI,CA0Cd,CAAC"}
@@ -14,6 +14,7 @@ const analytics_1 = require("../analytics/analytics");
14
14
  const config_1 = require("../config");
15
15
  const context_1 = require("../dbt/context");
16
16
  const globalState_1 = tslib_1.__importDefault(require("../globalState"));
17
+ const loader_1 = require("../lightdash/loader");
17
18
  const styles = tslib_1.__importStar(require("../styles"));
18
19
  const compile_1 = require("./compile");
19
20
  const createProject_1 = require("./createProject");
@@ -73,6 +74,13 @@ const previewHandler = async (options) => {
73
74
  globalState_1.default.setVerbose(options.verbose);
74
75
  const executionId = (0, uuid_1.v4)();
75
76
  await (0, apiClient_1.checkLightdashVersion)();
77
+ // Check if this is a Lightdash YAML-only project (no dbt required)
78
+ const absoluteProjectPath = path_1.default.resolve(options.projectDir);
79
+ const yamlModelFiles = await (0, loader_1.findLightdashModelFiles)(absoluteProjectPath);
80
+ const isYamlOnlyProject = yamlModelFiles.length > 0 && !options.organizationCredentials;
81
+ if (isYamlOnlyProject) {
82
+ globalState_1.default.debug(`> Found ${yamlModelFiles.length} Lightdash YAML models, skipping dbt requirements`);
83
+ }
76
84
  let name = options?.name;
77
85
  if (name === undefined) {
78
86
  name = (0, unique_names_generator_1.uniqueNamesGenerator)({
@@ -140,6 +148,7 @@ const previewHandler = async (options) => {
140
148
  ? config.context.project
141
149
  : undefined,
142
150
  copyContent: !options.skipCopyContent && upstreamProjectValid,
151
+ warehouseCredentials: isYamlOnlyProject ? false : undefined,
143
152
  });
144
153
  project = results?.project;
145
154
  hasContentCopy = Boolean(results?.hasContentCopy);
@@ -197,7 +206,6 @@ const previewHandler = async (options) => {
197
206
  projectId: project.projectUuid,
198
207
  },
199
208
  });
200
- const absoluteProjectPath = path_1.default.resolve(options.projectDir);
201
209
  const context = await (0, context_1.getDbtContext)({
202
210
  projectDir: absoluteProjectPath,
203
211
  targetPath: options.targetPath,
@@ -256,6 +264,13 @@ const startPreviewHandler = async (options) => {
256
264
  console.error(styles.error(`--name argument is required`));
257
265
  return;
258
266
  }
267
+ // Check if this is a Lightdash YAML-only project (no dbt required)
268
+ const absoluteProjectPath = path_1.default.resolve(options.projectDir);
269
+ const yamlModelFiles = await (0, loader_1.findLightdashModelFiles)(absoluteProjectPath);
270
+ const isYamlOnlyProject = yamlModelFiles.length > 0 && !options.organizationCredentials;
271
+ if (isYamlOnlyProject) {
272
+ globalState_1.default.debug(`> Found ${yamlModelFiles.length} Lightdash YAML models, skipping dbt requirements`);
273
+ }
259
274
  const projectName = options.name;
260
275
  const config = await (0, config_1.getConfig)();
261
276
  // Log current source project info if copying content
@@ -305,6 +320,7 @@ const startPreviewHandler = async (options) => {
305
320
  type: common_1.ProjectType.PREVIEW,
306
321
  upstreamProjectUuid: config.context?.project,
307
322
  copyContent: !options.skipCopyContent,
323
+ warehouseCredentials: isYamlOnlyProject ? false : undefined,
308
324
  });
309
325
  const project = results?.project;
310
326
  const hasContentCopy = Boolean(results?.hasContentCopy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.2436.2",
3
+ "version": "0.2436.4",
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.2436.2",
42
- "@lightdash/warehouses": "0.2436.2"
41
+ "@lightdash/common": "0.2436.4",
42
+ "@lightdash/warehouses": "0.2436.4"
43
43
  },
44
44
  "description": "Lightdash CLI tool",
45
45
  "devDependencies": {