@deepnote/database-integrations 1.1.0 → 1.1.1
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/index.cjs +13 -4
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +11 -1
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -21,8 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
}) : target, mod));
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
|
-
let build_url_ts = require("build-url-ts");
|
|
25
|
-
build_url_ts = __toESM(build_url_ts);
|
|
26
24
|
let zod = require("zod");
|
|
27
25
|
zod = __toESM(zod);
|
|
28
26
|
|
|
@@ -64,10 +62,21 @@ function isFederatedAuthMetadata(metadata) {
|
|
|
64
62
|
|
|
65
63
|
//#endregion
|
|
66
64
|
//#region src/snowflake-integration-env-vars.ts
|
|
65
|
+
/**
|
|
66
|
+
* Build a URL with path and query parameters using native URL API
|
|
67
|
+
*/
|
|
68
|
+
function buildUrl(baseUrl, options) {
|
|
69
|
+
const url = new URL(baseUrl.replace(/^(\w+):\/\//, "http://"));
|
|
70
|
+
if (options.path) url.pathname = options.path;
|
|
71
|
+
if (options.queryParams) {
|
|
72
|
+
for (const [key, value] of Object.entries(options.queryParams)) if (value !== void 0) url.searchParams.set(key, value);
|
|
73
|
+
}
|
|
74
|
+
return url.href.replace(/^http:\/\//, baseUrl.match(/^(\w+):\/\//)?.[0] || "http://");
|
|
75
|
+
}
|
|
67
76
|
function getSnowflakeSqlAlchemyInput(metadata, params) {
|
|
68
77
|
if (isFederatedAuthMetadata(metadata)) return null;
|
|
69
78
|
const { username, accountName, database, authMethod } = metadata;
|
|
70
|
-
if (authMethod === SnowflakeAuthMethods.ServiceAccountKeyPair) return createSqlAlchemyInputFromUrl((
|
|
79
|
+
if (authMethod === SnowflakeAuthMethods.ServiceAccountKeyPair) return createSqlAlchemyInputFromUrl(buildUrl(`snowflake://${encodeURIComponent(username)}@${encodeURIComponent(accountName)}`, {
|
|
71
80
|
path: database,
|
|
72
81
|
queryParams: {
|
|
73
82
|
...createBaseQueryParams(metadata, params.snowflakePartnerIdentifier),
|
|
@@ -78,7 +87,7 @@ function getSnowflakeSqlAlchemyInput(metadata, params) {
|
|
|
78
87
|
password: metadata.privateKeyPassphrase,
|
|
79
88
|
username: metadata.username
|
|
80
89
|
});
|
|
81
|
-
return createSqlAlchemyInputFromUrl((
|
|
90
|
+
return createSqlAlchemyInputFromUrl(buildUrl(`snowflake://${encodeURIComponent(username)}:${encodeURIComponent(metadata.password)}@${encodeURIComponent(accountName)}`, {
|
|
82
91
|
path: database,
|
|
83
92
|
queryParams: { ...createBaseQueryParams(metadata, params.snowflakePartnerIdentifier) }
|
|
84
93
|
}));
|
package/dist/index.d.cts
CHANGED
|
@@ -25,9 +25,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
25
25
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
26
26
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
password: string;
|
|
28
29
|
host: string;
|
|
29
30
|
user: string;
|
|
30
|
-
password: string;
|
|
31
31
|
database: string;
|
|
32
32
|
sshEnabled?: boolean | undefined;
|
|
33
33
|
sshHost?: string | undefined;
|
|
@@ -38,9 +38,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
38
38
|
caCertificateName?: string | undefined;
|
|
39
39
|
caCertificateText?: string | undefined;
|
|
40
40
|
}, {
|
|
41
|
+
password: string;
|
|
41
42
|
host: string;
|
|
42
43
|
user: string;
|
|
43
|
-
password: string;
|
|
44
44
|
database: string;
|
|
45
45
|
sshEnabled?: boolean | undefined;
|
|
46
46
|
sshHost?: string | undefined;
|
|
@@ -210,9 +210,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
210
210
|
port: z.ZodOptional<z.ZodString>;
|
|
211
211
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
212
212
|
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
password: string;
|
|
213
214
|
host: string;
|
|
214
215
|
user: string;
|
|
215
|
-
password: string;
|
|
216
216
|
database: string;
|
|
217
217
|
sshEnabled?: boolean | undefined;
|
|
218
218
|
sshHost?: string | undefined;
|
|
@@ -221,9 +221,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
221
221
|
port?: string | undefined;
|
|
222
222
|
caCertificateName?: string | undefined;
|
|
223
223
|
}, {
|
|
224
|
+
password: string;
|
|
224
225
|
host: string;
|
|
225
226
|
user: string;
|
|
226
|
-
password: string;
|
|
227
227
|
database: string;
|
|
228
228
|
sshEnabled?: boolean | undefined;
|
|
229
229
|
sshHost?: string | undefined;
|
|
@@ -249,9 +249,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
249
249
|
} & {
|
|
250
250
|
cluster: z.ZodString;
|
|
251
251
|
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
password: string;
|
|
252
253
|
host: string;
|
|
253
254
|
user: string;
|
|
254
|
-
password: string;
|
|
255
255
|
database: string;
|
|
256
256
|
cluster: string;
|
|
257
257
|
sshEnabled?: boolean | undefined;
|
|
@@ -263,9 +263,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
263
263
|
caCertificateName?: string | undefined;
|
|
264
264
|
caCertificateText?: string | undefined;
|
|
265
265
|
}, {
|
|
266
|
+
password: string;
|
|
266
267
|
host: string;
|
|
267
268
|
user: string;
|
|
268
|
-
password: string;
|
|
269
269
|
database: string;
|
|
270
270
|
cluster: string;
|
|
271
271
|
sshEnabled?: boolean | undefined;
|
|
@@ -290,9 +290,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
290
290
|
port: z.ZodOptional<z.ZodString>;
|
|
291
291
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
292
292
|
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
password: string;
|
|
293
294
|
host: string;
|
|
294
295
|
user: string;
|
|
295
|
-
password: string;
|
|
296
296
|
database: string;
|
|
297
297
|
sshEnabled?: boolean | undefined;
|
|
298
298
|
sshHost?: string | undefined;
|
|
@@ -301,9 +301,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
301
301
|
port?: string | undefined;
|
|
302
302
|
caCertificateName?: string | undefined;
|
|
303
303
|
}, {
|
|
304
|
+
password: string;
|
|
304
305
|
host: string;
|
|
305
306
|
user: string;
|
|
306
|
-
password: string;
|
|
307
307
|
database: string;
|
|
308
308
|
sshEnabled?: boolean | undefined;
|
|
309
309
|
sshHost?: string | undefined;
|
|
@@ -331,9 +331,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
331
331
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
332
332
|
}, "strip", z.ZodTypeAny, {
|
|
333
333
|
connection_string: string;
|
|
334
|
+
password?: string | undefined;
|
|
334
335
|
host?: string | undefined;
|
|
335
336
|
user?: string | undefined;
|
|
336
|
-
password?: string | undefined;
|
|
337
337
|
database?: string | undefined;
|
|
338
338
|
sshEnabled?: boolean | undefined;
|
|
339
339
|
sshHost?: string | undefined;
|
|
@@ -348,9 +348,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
348
348
|
prefix?: string | undefined;
|
|
349
349
|
}, {
|
|
350
350
|
connection_string: string;
|
|
351
|
+
password?: string | undefined;
|
|
351
352
|
host?: string | undefined;
|
|
352
353
|
user?: string | undefined;
|
|
353
|
-
password?: string | undefined;
|
|
354
354
|
database?: string | undefined;
|
|
355
355
|
sshEnabled?: boolean | undefined;
|
|
356
356
|
sshHost?: string | undefined;
|
|
@@ -377,9 +377,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
377
377
|
port: z.ZodOptional<z.ZodString>;
|
|
378
378
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
379
379
|
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
password: string;
|
|
380
381
|
host: string;
|
|
381
382
|
user: string;
|
|
382
|
-
password: string;
|
|
383
383
|
database: string;
|
|
384
384
|
sshEnabled?: boolean | undefined;
|
|
385
385
|
sshHost?: string | undefined;
|
|
@@ -388,9 +388,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
388
388
|
port?: string | undefined;
|
|
389
389
|
caCertificateName?: string | undefined;
|
|
390
390
|
}, {
|
|
391
|
+
password: string;
|
|
391
392
|
host: string;
|
|
392
393
|
user: string;
|
|
393
|
-
password: string;
|
|
394
394
|
database: string;
|
|
395
395
|
sshEnabled?: boolean | undefined;
|
|
396
396
|
sshHost?: string | undefined;
|
|
@@ -415,9 +415,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
415
415
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
416
416
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
417
417
|
}, "strip", z.ZodTypeAny, {
|
|
418
|
+
password: string;
|
|
418
419
|
host: string;
|
|
419
420
|
user: string;
|
|
420
|
-
password: string;
|
|
421
421
|
database: string;
|
|
422
422
|
sshEnabled?: boolean | undefined;
|
|
423
423
|
sshHost?: string | undefined;
|
|
@@ -428,9 +428,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
428
428
|
caCertificateName?: string | undefined;
|
|
429
429
|
caCertificateText?: string | undefined;
|
|
430
430
|
}, {
|
|
431
|
+
password: string;
|
|
431
432
|
host: string;
|
|
432
433
|
user: string;
|
|
433
|
-
password: string;
|
|
434
434
|
database: string;
|
|
435
435
|
sshEnabled?: boolean | undefined;
|
|
436
436
|
sshHost?: string | undefined;
|
|
@@ -457,9 +457,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
457
457
|
user: z.ZodString;
|
|
458
458
|
password: z.ZodString;
|
|
459
459
|
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
password: string;
|
|
460
461
|
host: string;
|
|
461
462
|
user: string;
|
|
462
|
-
password: string;
|
|
463
463
|
database: string;
|
|
464
464
|
authMethod: "username-and-password";
|
|
465
465
|
sshEnabled?: boolean | undefined;
|
|
@@ -471,9 +471,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
471
471
|
caCertificateName?: string | undefined;
|
|
472
472
|
caCertificateText?: string | undefined;
|
|
473
473
|
}, {
|
|
474
|
+
password: string;
|
|
474
475
|
host: string;
|
|
475
476
|
user: string;
|
|
476
|
-
password: string;
|
|
477
477
|
database: string;
|
|
478
478
|
authMethod: "username-and-password";
|
|
479
479
|
sshEnabled?: boolean | undefined;
|
|
@@ -759,9 +759,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
759
759
|
} & {
|
|
760
760
|
port: z.ZodString;
|
|
761
761
|
}, "strip", z.ZodTypeAny, {
|
|
762
|
+
password: string;
|
|
762
763
|
host: string;
|
|
763
764
|
user: string;
|
|
764
|
-
password: string;
|
|
765
765
|
database: string;
|
|
766
766
|
port: string;
|
|
767
767
|
sshEnabled?: boolean | undefined;
|
|
@@ -769,9 +769,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
769
769
|
sshPort?: string | undefined;
|
|
770
770
|
sshUser?: string | undefined;
|
|
771
771
|
}, {
|
|
772
|
+
password: string;
|
|
772
773
|
host: string;
|
|
773
774
|
user: string;
|
|
774
|
-
password: string;
|
|
775
775
|
database: string;
|
|
776
776
|
port: string;
|
|
777
777
|
sshEnabled?: boolean | undefined;
|
|
@@ -793,9 +793,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
793
793
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
794
794
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
795
795
|
}, "strip", z.ZodTypeAny, {
|
|
796
|
+
password: string;
|
|
796
797
|
host: string;
|
|
797
798
|
user: string;
|
|
798
|
-
password: string;
|
|
799
799
|
database: string;
|
|
800
800
|
port: string;
|
|
801
801
|
sshEnabled?: boolean | undefined;
|
|
@@ -806,9 +806,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
806
806
|
caCertificateName?: string | undefined;
|
|
807
807
|
caCertificateText?: string | undefined;
|
|
808
808
|
}, {
|
|
809
|
+
password: string;
|
|
809
810
|
host: string;
|
|
810
811
|
user: string;
|
|
811
|
-
password: string;
|
|
812
812
|
database: string;
|
|
813
813
|
port: string;
|
|
814
814
|
sshEnabled?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
25
25
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
26
26
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
password: string;
|
|
28
29
|
host: string;
|
|
29
30
|
user: string;
|
|
30
|
-
password: string;
|
|
31
31
|
database: string;
|
|
32
32
|
sshEnabled?: boolean | undefined;
|
|
33
33
|
sshHost?: string | undefined;
|
|
@@ -38,9 +38,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
38
38
|
caCertificateName?: string | undefined;
|
|
39
39
|
caCertificateText?: string | undefined;
|
|
40
40
|
}, {
|
|
41
|
+
password: string;
|
|
41
42
|
host: string;
|
|
42
43
|
user: string;
|
|
43
|
-
password: string;
|
|
44
44
|
database: string;
|
|
45
45
|
sshEnabled?: boolean | undefined;
|
|
46
46
|
sshHost?: string | undefined;
|
|
@@ -210,9 +210,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
210
210
|
port: z.ZodOptional<z.ZodString>;
|
|
211
211
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
212
212
|
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
password: string;
|
|
213
214
|
host: string;
|
|
214
215
|
user: string;
|
|
215
|
-
password: string;
|
|
216
216
|
database: string;
|
|
217
217
|
sshEnabled?: boolean | undefined;
|
|
218
218
|
sshHost?: string | undefined;
|
|
@@ -221,9 +221,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
221
221
|
port?: string | undefined;
|
|
222
222
|
caCertificateName?: string | undefined;
|
|
223
223
|
}, {
|
|
224
|
+
password: string;
|
|
224
225
|
host: string;
|
|
225
226
|
user: string;
|
|
226
|
-
password: string;
|
|
227
227
|
database: string;
|
|
228
228
|
sshEnabled?: boolean | undefined;
|
|
229
229
|
sshHost?: string | undefined;
|
|
@@ -249,9 +249,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
249
249
|
} & {
|
|
250
250
|
cluster: z.ZodString;
|
|
251
251
|
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
password: string;
|
|
252
253
|
host: string;
|
|
253
254
|
user: string;
|
|
254
|
-
password: string;
|
|
255
255
|
database: string;
|
|
256
256
|
cluster: string;
|
|
257
257
|
sshEnabled?: boolean | undefined;
|
|
@@ -263,9 +263,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
263
263
|
caCertificateName?: string | undefined;
|
|
264
264
|
caCertificateText?: string | undefined;
|
|
265
265
|
}, {
|
|
266
|
+
password: string;
|
|
266
267
|
host: string;
|
|
267
268
|
user: string;
|
|
268
|
-
password: string;
|
|
269
269
|
database: string;
|
|
270
270
|
cluster: string;
|
|
271
271
|
sshEnabled?: boolean | undefined;
|
|
@@ -290,9 +290,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
290
290
|
port: z.ZodOptional<z.ZodString>;
|
|
291
291
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
292
292
|
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
password: string;
|
|
293
294
|
host: string;
|
|
294
295
|
user: string;
|
|
295
|
-
password: string;
|
|
296
296
|
database: string;
|
|
297
297
|
sshEnabled?: boolean | undefined;
|
|
298
298
|
sshHost?: string | undefined;
|
|
@@ -301,9 +301,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
301
301
|
port?: string | undefined;
|
|
302
302
|
caCertificateName?: string | undefined;
|
|
303
303
|
}, {
|
|
304
|
+
password: string;
|
|
304
305
|
host: string;
|
|
305
306
|
user: string;
|
|
306
|
-
password: string;
|
|
307
307
|
database: string;
|
|
308
308
|
sshEnabled?: boolean | undefined;
|
|
309
309
|
sshHost?: string | undefined;
|
|
@@ -331,9 +331,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
331
331
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
332
332
|
}, "strip", z.ZodTypeAny, {
|
|
333
333
|
connection_string: string;
|
|
334
|
+
password?: string | undefined;
|
|
334
335
|
host?: string | undefined;
|
|
335
336
|
user?: string | undefined;
|
|
336
|
-
password?: string | undefined;
|
|
337
337
|
database?: string | undefined;
|
|
338
338
|
sshEnabled?: boolean | undefined;
|
|
339
339
|
sshHost?: string | undefined;
|
|
@@ -348,9 +348,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
348
348
|
prefix?: string | undefined;
|
|
349
349
|
}, {
|
|
350
350
|
connection_string: string;
|
|
351
|
+
password?: string | undefined;
|
|
351
352
|
host?: string | undefined;
|
|
352
353
|
user?: string | undefined;
|
|
353
|
-
password?: string | undefined;
|
|
354
354
|
database?: string | undefined;
|
|
355
355
|
sshEnabled?: boolean | undefined;
|
|
356
356
|
sshHost?: string | undefined;
|
|
@@ -377,9 +377,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
377
377
|
port: z.ZodOptional<z.ZodString>;
|
|
378
378
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
379
379
|
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
password: string;
|
|
380
381
|
host: string;
|
|
381
382
|
user: string;
|
|
382
|
-
password: string;
|
|
383
383
|
database: string;
|
|
384
384
|
sshEnabled?: boolean | undefined;
|
|
385
385
|
sshHost?: string | undefined;
|
|
@@ -388,9 +388,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
388
388
|
port?: string | undefined;
|
|
389
389
|
caCertificateName?: string | undefined;
|
|
390
390
|
}, {
|
|
391
|
+
password: string;
|
|
391
392
|
host: string;
|
|
392
393
|
user: string;
|
|
393
|
-
password: string;
|
|
394
394
|
database: string;
|
|
395
395
|
sshEnabled?: boolean | undefined;
|
|
396
396
|
sshHost?: string | undefined;
|
|
@@ -415,9 +415,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
415
415
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
416
416
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
417
417
|
}, "strip", z.ZodTypeAny, {
|
|
418
|
+
password: string;
|
|
418
419
|
host: string;
|
|
419
420
|
user: string;
|
|
420
|
-
password: string;
|
|
421
421
|
database: string;
|
|
422
422
|
sshEnabled?: boolean | undefined;
|
|
423
423
|
sshHost?: string | undefined;
|
|
@@ -428,9 +428,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
428
428
|
caCertificateName?: string | undefined;
|
|
429
429
|
caCertificateText?: string | undefined;
|
|
430
430
|
}, {
|
|
431
|
+
password: string;
|
|
431
432
|
host: string;
|
|
432
433
|
user: string;
|
|
433
|
-
password: string;
|
|
434
434
|
database: string;
|
|
435
435
|
sshEnabled?: boolean | undefined;
|
|
436
436
|
sshHost?: string | undefined;
|
|
@@ -457,9 +457,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
457
457
|
user: z.ZodString;
|
|
458
458
|
password: z.ZodString;
|
|
459
459
|
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
password: string;
|
|
460
461
|
host: string;
|
|
461
462
|
user: string;
|
|
462
|
-
password: string;
|
|
463
463
|
database: string;
|
|
464
464
|
authMethod: "username-and-password";
|
|
465
465
|
sshEnabled?: boolean | undefined;
|
|
@@ -471,9 +471,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
471
471
|
caCertificateName?: string | undefined;
|
|
472
472
|
caCertificateText?: string | undefined;
|
|
473
473
|
}, {
|
|
474
|
+
password: string;
|
|
474
475
|
host: string;
|
|
475
476
|
user: string;
|
|
476
|
-
password: string;
|
|
477
477
|
database: string;
|
|
478
478
|
authMethod: "username-and-password";
|
|
479
479
|
sshEnabled?: boolean | undefined;
|
|
@@ -759,9 +759,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
759
759
|
} & {
|
|
760
760
|
port: z.ZodString;
|
|
761
761
|
}, "strip", z.ZodTypeAny, {
|
|
762
|
+
password: string;
|
|
762
763
|
host: string;
|
|
763
764
|
user: string;
|
|
764
|
-
password: string;
|
|
765
765
|
database: string;
|
|
766
766
|
port: string;
|
|
767
767
|
sshEnabled?: boolean | undefined;
|
|
@@ -769,9 +769,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
769
769
|
sshPort?: string | undefined;
|
|
770
770
|
sshUser?: string | undefined;
|
|
771
771
|
}, {
|
|
772
|
+
password: string;
|
|
772
773
|
host: string;
|
|
773
774
|
user: string;
|
|
774
|
-
password: string;
|
|
775
775
|
database: string;
|
|
776
776
|
port: string;
|
|
777
777
|
sshEnabled?: boolean | undefined;
|
|
@@ -793,9 +793,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
793
793
|
caCertificateName: z.ZodOptional<z.ZodString>;
|
|
794
794
|
caCertificateText: z.ZodOptional<z.ZodString>;
|
|
795
795
|
}, "strip", z.ZodTypeAny, {
|
|
796
|
+
password: string;
|
|
796
797
|
host: string;
|
|
797
798
|
user: string;
|
|
798
|
-
password: string;
|
|
799
799
|
database: string;
|
|
800
800
|
port: string;
|
|
801
801
|
sshEnabled?: boolean | undefined;
|
|
@@ -806,9 +806,9 @@ declare const databaseMetadataSchemasByType: {
|
|
|
806
806
|
caCertificateName?: string | undefined;
|
|
807
807
|
caCertificateText?: string | undefined;
|
|
808
808
|
}, {
|
|
809
|
+
password: string;
|
|
809
810
|
host: string;
|
|
810
811
|
user: string;
|
|
811
|
-
password: string;
|
|
812
812
|
database: string;
|
|
813
813
|
port: string;
|
|
814
814
|
sshEnabled?: boolean | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import buildUrl from "build-url-ts";
|
|
2
1
|
import { z } from "zod";
|
|
3
2
|
|
|
4
3
|
//#region src/sql-integration-auth-methods.ts
|
|
@@ -39,6 +38,17 @@ function isFederatedAuthMetadata(metadata) {
|
|
|
39
38
|
|
|
40
39
|
//#endregion
|
|
41
40
|
//#region src/snowflake-integration-env-vars.ts
|
|
41
|
+
/**
|
|
42
|
+
* Build a URL with path and query parameters using native URL API
|
|
43
|
+
*/
|
|
44
|
+
function buildUrl(baseUrl, options) {
|
|
45
|
+
const url = new URL(baseUrl.replace(/^(\w+):\/\//, "http://"));
|
|
46
|
+
if (options.path) url.pathname = options.path;
|
|
47
|
+
if (options.queryParams) {
|
|
48
|
+
for (const [key, value] of Object.entries(options.queryParams)) if (value !== void 0) url.searchParams.set(key, value);
|
|
49
|
+
}
|
|
50
|
+
return url.href.replace(/^http:\/\//, baseUrl.match(/^(\w+):\/\//)?.[0] || "http://");
|
|
51
|
+
}
|
|
42
52
|
function getSnowflakeSqlAlchemyInput(metadata, params) {
|
|
43
53
|
if (isFederatedAuthMetadata(metadata)) return null;
|
|
44
54
|
const { username, accountName, database, authMethod } = metadata;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepnote/database-integrations",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Deepnote database integration definitions",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"package.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"build-url-ts": "^6.1.7",
|
|
31
30
|
"zod": "3.25.76"
|
|
32
31
|
},
|
|
33
32
|
"publishConfig": {
|