@lightdash/cli 3.357.1 → 3.357.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.
@@ -1 +1 @@
1
- {"version":3,"file":"snowflake.d.ts","sourceRoot":"","sources":["../../../src/dbt/targets/snowflake.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,0BAA0B,EAK7B,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAsGlC,eAAO,MAAM,sBAAsB,WACvB,MAAM,KACf,OAAO,CAAC,0BAA0B,CA0DpC,CAAC"}
1
+ {"version":3,"file":"snowflake.d.ts","sourceRoot":"","sources":["../../../src/dbt/targets/snowflake.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,0BAA0B,EAK7B,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA8HlC,eAAO,MAAM,sBAAsB,WACvB,MAAM,KACf,OAAO,CAAC,0BAA0B,CA4FpC,CAAC"}
@@ -18,6 +18,7 @@ const snowflakeSchema = {
18
18
  },
19
19
  user: {
20
20
  type: 'string',
21
+ nullable: true,
21
22
  },
22
23
  password: {
23
24
  type: 'string',
@@ -27,6 +28,18 @@ const snowflakeSchema = {
27
28
  type: 'string',
28
29
  nullable: true,
29
30
  },
31
+ token: {
32
+ type: 'string',
33
+ nullable: true,
34
+ },
35
+ oauth_client_id: {
36
+ type: 'string',
37
+ nullable: true,
38
+ },
39
+ oauth_client_secret: {
40
+ type: 'string',
41
+ nullable: true,
42
+ },
30
43
  private_key_path: {
31
44
  type: 'string',
32
45
  nullable: true,
@@ -81,8 +94,10 @@ const snowflakeSchema = {
81
94
  nullable: true,
82
95
  },
83
96
  },
84
- required: ['type', 'account', 'user', 'database', 'warehouse', 'schema'],
97
+ required: ['type', 'account', 'database', 'warehouse', 'schema'],
85
98
  };
99
+ const SKIP_FLAGS_HINT = 'To continue without a warehouse connection, use --skip-warehouse-catalog (deploy also needs --no-warehouse-credentials when creating a project).';
100
+ const unsupportedAuthError = (reason) => new common_1.ParseError(`Lightdash CLI can't connect to Snowflake with this profile: ${reason}\n${SKIP_FLAGS_HINT}`);
86
101
  const convertSnowflakeSchema = async (target) => {
87
102
  const validate = ajv_1.ajv.compile(snowflakeSchema);
88
103
  if (validate(target)) {
@@ -100,32 +115,58 @@ const convertSnowflakeSchema = async (target) => {
100
115
  if (target.private_key) {
101
116
  privateKey = target.private_key;
102
117
  }
118
+ const authenticator = target.authenticator?.toLowerCase();
119
+ const common = {
120
+ type: common_1.WarehouseTypes.SNOWFLAKE,
121
+ account: target.account,
122
+ role: target.role,
123
+ warehouse: target.warehouse,
124
+ database: target.database,
125
+ schema: target.schema,
126
+ clientSessionKeepAlive: target.client_session_keep_alive,
127
+ queryTag: target.query_tag,
128
+ };
129
+ if (authenticator === 'oauth') {
130
+ if (target.oauth_client_id || target.oauth_client_secret) {
131
+ // dbt treats `token` as a refresh token here; we don't exchange it
132
+ throw unsupportedAuthError('"authenticator: oauth" with oauth_client_id / oauth_client_secret (refresh token) is not supported. Set "token" to an OAuth access token and remove the client id and secret.');
133
+ }
134
+ if (!target.token) {
135
+ throw unsupportedAuthError('"authenticator: oauth" needs "token" set to an OAuth access token.');
136
+ }
137
+ return {
138
+ ...common,
139
+ user: target.user ?? '',
140
+ authenticationType: common_1.SnowflakeAuthenticationType.SSO,
141
+ token: target.token,
142
+ };
143
+ }
144
+ if (!target.user) {
145
+ throw new common_1.ParseError(`Couldn't read profiles.yml file for ${target.type}:\n"user" is required`);
146
+ }
103
147
  // Determine authentication type based on authenticator field or credentials present
104
148
  let authenticationType;
105
- if (target.authenticator &&
106
- target.authenticator.toLowerCase() === 'externalbrowser') {
149
+ if (authenticator === 'externalbrowser') {
107
150
  authenticationType = common_1.SnowflakeAuthenticationType.EXTERNAL_BROWSER;
108
151
  }
109
152
  else if (privateKey) {
110
153
  authenticationType = common_1.SnowflakeAuthenticationType.PRIVATE_KEY;
111
154
  }
112
- else {
155
+ else if (target.password) {
113
156
  authenticationType = common_1.SnowflakeAuthenticationType.PASSWORD;
114
157
  }
158
+ else {
159
+ throw unsupportedAuthError(target.authenticator
160
+ ? `"authenticator: ${target.authenticator}" is not supported without a password or private key.`
161
+ : 'no password, private key or supported authenticator found.');
162
+ }
115
163
  return {
116
- type: common_1.WarehouseTypes.SNOWFLAKE,
117
- account: target.account,
164
+ ...common,
118
165
  user: target.user,
119
166
  password: target.password,
120
167
  privateKey,
121
168
  privateKeyPass: target.private_key_passphrase,
122
169
  authenticationType,
123
- role: target.role,
124
- warehouse: target.warehouse,
125
- database: target.database,
126
- schema: target.schema,
127
- clientSessionKeepAlive: target.client_session_keep_alive,
128
- queryTag: target.query_tag,
129
170
  };
130
171
  }
131
172
  const errs = (0, better_ajv_errors_1.default)(snowflakeSchema, target, validate.errors || []);
@@ -17,6 +17,7 @@ type CreateProjectOptions = {
17
17
  expiresIn?: number;
18
18
  disableTimestampConversion?: boolean;
19
19
  };
20
+ export declare const applySnowflakeSsoHandling: (credentials: CreateWarehouseCredentials) => Promise<CreateWarehouseCredentials | null>;
20
21
  type LoadWarehouseCredentialsOptions = {
21
22
  projectDir: string;
22
23
  profilesDir: string;
@@ -27,7 +28,7 @@ type LoadWarehouseCredentialsOptions = {
27
28
  targetPath?: string;
28
29
  };
29
30
  type LoadWarehouseCredentialsResult = {
30
- credentials: CreateWarehouseCredentials;
31
+ credentials: CreateWarehouseCredentials | null;
31
32
  targetName: string;
32
33
  dbtVersionOption: DbtVersionOption;
33
34
  isDbtCloudCLI: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"createProject.d.ts","sourceRoot":"","sources":["../../src/handlers/createProject.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,+BAA+B,EAI/B,WAAW,EAGX,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACxB,MAAM,mBAAmB,CAAC;AAkE3B,KAAK,oBAAoB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,GAAG;IAClC,WAAW,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,oCAAoC,YACpC,+BAA+B,KACzC,OAAO,CAAC,8BAA8B,GAAG,IAAI,CA2F/C,CAAC;AAEF,eAAO,MAAM,aAAa,YACb,oBAAoB,KAC9B,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAmF7C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProject = exports.loadWarehouseCredentialsFromProfiles = void 0;
3
+ exports.createProject = exports.loadWarehouseCredentialsFromProfiles = exports.applySnowflakeSsoHandling = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const common_1 = require("@lightdash/common");
6
6
  const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
@@ -68,9 +68,28 @@ const isSnowflakeSsoEnabled = async () => {
68
68
  return response?.auth?.snowflake?.enabled ?? false;
69
69
  };
70
70
  const applySnowflakeSsoHandling = async (credentials) => {
71
- if (credentials.type !== common_1.WarehouseTypes.SNOWFLAKE ||
72
- credentials.authenticationType !==
73
- common_1.SnowflakeAuthenticationType.EXTERNAL_BROWSER) {
71
+ if (credentials.type !== common_1.WarehouseTypes.SNOWFLAKE) {
72
+ return credentials;
73
+ }
74
+ if (credentials.authenticationType === common_1.SnowflakeAuthenticationType.SSO) {
75
+ // The profile's OAuth access token is short-lived, never store it on the project
76
+ if (await isSnowflakeSsoEnabled()) {
77
+ console.error(styles.info(`\nLightdash server has Snowflake OAuth authentication enabled.
78
+ We will ask for user credentials again on the Lightdash UI.\n`));
79
+ // Same shape as externalbrowser: the server accepts it without a stored token
80
+ return {
81
+ ...credentials,
82
+ token: undefined,
83
+ authenticationType: common_1.SnowflakeAuthenticationType.EXTERNAL_BROWSER,
84
+ requireUserCredentials: true,
85
+ };
86
+ }
87
+ console.error(styles.warning(`Your dbt profile uses a Snowflake OAuth access token, which can't be saved as project credentials because it expires.
88
+ Snowflake OAuth authentication is disabled on the server. Continuing without storing warehouse credentials, as with --no-warehouse-credentials.`));
89
+ return null;
90
+ }
91
+ if (credentials.authenticationType !==
92
+ common_1.SnowflakeAuthenticationType.EXTERNAL_BROWSER) {
74
93
  return credentials;
75
94
  }
76
95
  const snowflakeSsoEnabled = await isSnowflakeSsoEnabled();
@@ -92,6 +111,7 @@ For a better user experience, we recommend enabling Snowflake OAuth authenticati
92
111
  password: patToken,
93
112
  };
94
113
  };
114
+ exports.applySnowflakeSsoHandling = applySnowflakeSsoHandling;
95
115
  const loadWarehouseCredentialsFromProfiles = async (options) => {
96
116
  const absoluteProjectPath = path_1.default.resolve(options.projectDir);
97
117
  const dbtVersionResult = await (0, getDbtVersion_1.tryGetDbtVersion)();
@@ -151,7 +171,7 @@ const loadWarehouseCredentialsFromProfiles = async (options) => {
151
171
  spinner?.start();
152
172
  }
153
173
  }
154
- const finalCredentials = await applySnowflakeSsoHandling(credentials);
174
+ const finalCredentials = await (0, exports.applySnowflakeSsoHandling)(credentials);
155
175
  return {
156
176
  credentials: finalCredentials,
157
177
  targetName,
@@ -186,12 +206,12 @@ const createProject = async (options) => {
186
206
  globalState_1.default.debug('> User declined to store warehouse credentials use --no-warehouse-credentials to create a project without warehouse credentials');
187
207
  return undefined;
188
208
  }
189
- credentials = loaded.credentials;
209
+ credentials = loaded.credentials ?? undefined;
190
210
  targetName = loaded.targetName;
191
211
  isDbtCloudCLI = loaded.isDbtCloudCLI;
192
212
  dbtVersionOption = loaded.dbtVersionOption;
193
213
  if (options.disableTimestampConversion !== undefined &&
194
- credentials.type === common_1.WarehouseTypes.SNOWFLAKE) {
214
+ credentials?.type === common_1.WarehouseTypes.SNOWFLAKE) {
195
215
  credentials = {
196
216
  ...credentials,
197
217
  disableTimestampConversion: options.disableTimestampConversion,
@@ -203,7 +223,7 @@ const createProject = async (options) => {
203
223
  type: options.type,
204
224
  warehouseConnection: credentials,
205
225
  copyWarehouseConnectionFromUpstreamProject: isDbtCloudCLI ||
206
- (options.warehouseCredentials === false &&
226
+ (credentials === undefined &&
207
227
  options.upstreamProjectUuid !== undefined),
208
228
  dbtConnection: {
209
229
  type: common_1.DbtProjectType.NONE,
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/handlers/preview.ts"],"names":[],"mappings":"AACA,OAAO,EACH,+BAA+B,EAUlC,MAAM,mBAAmB,CAAC;AAoB3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAalD,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,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,wBAAwB,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0BAA0B,CAAC,EA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ACnB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,wBAAwB,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAoBF,KAAK,yBAAyB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAsQF,eAAO,MAAM,cAAc,oBACN,qBAAqB,KACvC,OAAO,CAAC,IAAI,CAsWd,CAAC;AAEF,eAAO,MAAM,mBAAmB,oBACX,qBAAqB,KACvC,OAAO,CAAC,IAAI,CAyQd,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAClB,yBAAyB,KACnC,OAAO,CAAC,IAAI,CA2Cd,CAAC"}
@@ -164,6 +164,9 @@ const refreshPreviewWarehouseCredentials = async (projectUuid, options, upstream
164
164
  console.error(styles.warning('Keeping the warehouse credentials already stored on the preview.'));
165
165
  return;
166
166
  }
167
+ if (loaded.credentials === null) {
168
+ return;
169
+ }
167
170
  const project = await (0, refresh_1.getProject)(projectUuid);
168
171
  const { connection: sourceConnection } = await resolveSourceConnection(project, options.source, upstreamProjectUuid);
169
172
  if (sourceConnection.kind === 'unknown') {
@@ -1 +1 @@
1
- {"version":3,"file":"setWarehouse.d.ts","sourceRoot":"","sources":["../../src/handlers/setWarehouse.ts"],"names":[],"mappings":"AAYA,KAAK,0BAA0B,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAeF,eAAO,MAAM,mBAAmB,YACnB,0BAA0B,kBA2EtC,CAAC"}
1
+ {"version":3,"file":"setWarehouse.d.ts","sourceRoot":"","sources":["../../src/handlers/setWarehouse.ts"],"names":[],"mappings":"AAYA,KAAK,0BAA0B,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AAeF,eAAO,MAAM,mBAAmB,YACnB,0BAA0B,kBA8EtC,CAAC"}
@@ -43,6 +43,9 @@ const setWarehouseHandler = async (options) => {
43
43
  return;
44
44
  }
45
45
  const { credentials } = loaded;
46
+ if (credentials === null) {
47
+ return;
48
+ }
46
49
  // Fetch existing project to preserve its settings
47
50
  const existingProject = await (0, refresh_1.getProject)(projectUuid);
48
51
  // Confirmation prompt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "3.357.1",
3
+ "version": "3.357.2",
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": "3.357.1",
26
- "@lightdash/warehouses": "3.357.1",
25
+ "@lightdash/common": "3.357.2",
26
+ "@lightdash/warehouses": "3.357.2",
27
27
  "@sidvind/better-ajv-errors": "7.0.0",
28
28
  "@types/columnify": "1.5.1",
29
29
  "ajv": "8.18.0",