@deepnote/database-integrations 1.7.1 → 2.0.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.
- package/dist/index.cjs +5 -8
- package/dist/index.d.cts +186 -4717
- package/dist/index.d.ts +186 -4717
- package/dist/index.js +3 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -23,8 +23,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
let zod = require("zod");
|
|
25
25
|
zod = __toESM(zod, 1);
|
|
26
|
-
let yaml = require("yaml");
|
|
27
26
|
let _deepnote_blocks = require("@deepnote/blocks");
|
|
27
|
+
let yaml = require("yaml");
|
|
28
28
|
//#region src/sql-integration-auth-methods.ts
|
|
29
29
|
const AwsAuthMethods = {
|
|
30
30
|
AccessKeys: "access-keys",
|
|
@@ -498,7 +498,7 @@ function getEnvironmentVariablesForIntegrations(integrations, params) {
|
|
|
498
498
|
const envVars = [];
|
|
499
499
|
const errors = [];
|
|
500
500
|
integrations.forEach((integration) => {
|
|
501
|
-
const namePrefix = convertToEnvironmentVariableName(integration.name);
|
|
501
|
+
const namePrefix = (0, _deepnote_blocks.convertToEnvironmentVariableName)(integration.name);
|
|
502
502
|
const envVarsForThisIntegration = Object.entries(integration.metadata).filter(([key]) => {
|
|
503
503
|
return key !== "caCertificateText";
|
|
504
504
|
}).map(([key, rawValue]) => {
|
|
@@ -847,11 +847,8 @@ const getMySqlSqlAlchemyInput = (integrationId, projectRootDirectory, { user, pa
|
|
|
847
847
|
function getCACertificatePath({ projectRoot, integrationId, caCertificateName }) {
|
|
848
848
|
return `${projectRoot}/.deepnote/${integrationId}/${caCertificateName}`;
|
|
849
849
|
}
|
|
850
|
-
function convertToEnvironmentVariableName(str) {
|
|
851
|
-
return (/^\d/.test(str) ? `_${str}` : str).toUpperCase().replace(/[^\w]/g, "_");
|
|
852
|
-
}
|
|
853
850
|
function getSqlEnvVarName(integrationId) {
|
|
854
|
-
return convertToEnvironmentVariableName(`SQL_${integrationId}`);
|
|
851
|
+
return (0, _deepnote_blocks.convertToEnvironmentVariableName)(`SQL_${integrationId}`);
|
|
855
852
|
}
|
|
856
853
|
function assertNever(value) {
|
|
857
854
|
throw new Error(`Unexpected value: ${value}`);
|
|
@@ -1018,7 +1015,7 @@ const apiIntegrationSchema = zod.z.object({
|
|
|
1018
1015
|
id: zod.z.string(),
|
|
1019
1016
|
name: zod.z.string(),
|
|
1020
1017
|
type: zod.z.string(),
|
|
1021
|
-
metadata: zod.z.unknown(),
|
|
1018
|
+
metadata: zod.z.unknown().optional(),
|
|
1022
1019
|
is_public: zod.z.boolean().nullish(),
|
|
1023
1020
|
created_at: zod.z.string().nullish(),
|
|
1024
1021
|
updated_at: zod.z.string().nullish(),
|
|
@@ -1127,7 +1124,7 @@ function serializeIntegrationsDocument(doc) {
|
|
|
1127
1124
|
* ...
|
|
1128
1125
|
* ```
|
|
1129
1126
|
*/
|
|
1130
|
-
const baseIntegrationsFileSchema = zod.z.object({ integrations: zod.z.array(zod.z.record(zod.z.unknown())).optional().default([]) });
|
|
1127
|
+
const baseIntegrationsFileSchema = zod.z.object({ integrations: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).optional().default([]) });
|
|
1131
1128
|
const integrationsFileSchema = zod.z.object({ integrations: zod.z.array(databaseIntegrationConfigSchema) });
|
|
1132
1129
|
//#endregion
|
|
1133
1130
|
//#region src/secret-field-paths.ts
|