Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@deepnote/database-integrations

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deepnote/database-integrations - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+13
-4
dist/index.cjs

@@ -24,4 +24,2 @@ //#region rolldown:runtime

//#endregion
let build_url_ts = require("build-url-ts");
build_url_ts = __toESM(build_url_ts);
let zod = require("zod");

@@ -68,6 +66,17 @@ zod = __toESM(zod);

//#region src/snowflake-integration-env-vars.ts
/**
* Build a URL with path and query parameters using native URL API
*/
function buildUrl(baseUrl, options) {
const url = new URL(baseUrl.replace(/^(\w+):\/\//, "http://"));
if (options.path) url.pathname = options.path;
if (options.queryParams) {
for (const [key, value] of Object.entries(options.queryParams)) if (value !== void 0) url.searchParams.set(key, value);
}
return url.href.replace(/^http:\/\//, baseUrl.match(/^(\w+):\/\//)?.[0] || "http://");
}
function getSnowflakeSqlAlchemyInput(metadata, params) {
if (isFederatedAuthMetadata(metadata)) return null;
const { username, accountName, database, authMethod } = metadata;
if (authMethod === SnowflakeAuthMethods.ServiceAccountKeyPair) return createSqlAlchemyInputFromUrl((0, build_url_ts.default)(`snowflake://${encodeURIComponent(username)}@${encodeURIComponent(accountName)}`, {
if (authMethod === SnowflakeAuthMethods.ServiceAccountKeyPair) return createSqlAlchemyInputFromUrl(buildUrl(`snowflake://${encodeURIComponent(username)}@${encodeURIComponent(accountName)}`, {
path: database,

@@ -83,3 +92,3 @@ queryParams: {

});
return createSqlAlchemyInputFromUrl((0, build_url_ts.default)(`snowflake://${encodeURIComponent(username)}:${encodeURIComponent(metadata.password)}@${encodeURIComponent(accountName)}`, {
return createSqlAlchemyInputFromUrl(buildUrl(`snowflake://${encodeURIComponent(username)}:${encodeURIComponent(metadata.password)}@${encodeURIComponent(accountName)}`, {
path: database,

@@ -86,0 +95,0 @@ queryParams: { ...createBaseQueryParams(metadata, params.snowflakePartnerIdentifier) }

@@ -28,5 +28,5 @@ import { z } from "zod";

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -42,5 +42,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -215,5 +215,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -227,5 +227,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -256,5 +256,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -271,5 +271,5 @@ cluster: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -299,5 +299,5 @@ cluster: string;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -311,5 +311,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -342,5 +342,5 @@ sshEnabled?: boolean | undefined;

connection_string: string;
password?: string | undefined;
host?: string | undefined;
user?: string | undefined;
password?: string | undefined;
database?: string | undefined;

@@ -360,5 +360,5 @@ sshEnabled?: boolean | undefined;

connection_string: string;
password?: string | undefined;
host?: string | undefined;
user?: string | undefined;
password?: string | undefined;
database?: string | undefined;

@@ -390,5 +390,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -402,5 +402,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -430,5 +430,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -444,5 +444,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -474,5 +474,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -489,5 +489,5 @@ authMethod: "username-and-password";

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -778,5 +778,5 @@ authMethod: "username-and-password";

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -789,5 +789,5 @@ port: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -814,5 +814,5 @@ port: string;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -828,5 +828,5 @@ port: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -833,0 +833,0 @@ port: string;

@@ -28,5 +28,5 @@ import { z } from "zod";

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -42,5 +42,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -215,5 +215,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -227,5 +227,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -256,5 +256,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -271,5 +271,5 @@ cluster: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -299,5 +299,5 @@ cluster: string;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -311,5 +311,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -342,5 +342,5 @@ sshEnabled?: boolean | undefined;

connection_string: string;
password?: string | undefined;
host?: string | undefined;
user?: string | undefined;
password?: string | undefined;
database?: string | undefined;

@@ -360,5 +360,5 @@ sshEnabled?: boolean | undefined;

connection_string: string;
password?: string | undefined;
host?: string | undefined;
user?: string | undefined;
password?: string | undefined;
database?: string | undefined;

@@ -390,5 +390,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -402,5 +402,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -430,5 +430,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -444,5 +444,5 @@ sshEnabled?: boolean | undefined;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -474,5 +474,5 @@ sshEnabled?: boolean | undefined;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -489,5 +489,5 @@ authMethod: "username-and-password";

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -778,5 +778,5 @@ authMethod: "username-and-password";

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -789,5 +789,5 @@ port: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -814,5 +814,5 @@ port: string;

}, "strip", z.ZodTypeAny, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -828,5 +828,5 @@ port: string;

}, {
password: string;
host: string;
user: string;
password: string;
database: string;

@@ -833,0 +833,0 @@ port: string;

@@ -1,2 +0,1 @@

import buildUrl from "build-url-ts";
import { z } from "zod";

@@ -42,2 +41,13 @@

//#region src/snowflake-integration-env-vars.ts
/**
* Build a URL with path and query parameters using native URL API
*/
function buildUrl(baseUrl, options) {
const url = new URL(baseUrl.replace(/^(\w+):\/\//, "http://"));
if (options.path) url.pathname = options.path;
if (options.queryParams) {
for (const [key, value] of Object.entries(options.queryParams)) if (value !== void 0) url.searchParams.set(key, value);
}
return url.href.replace(/^http:\/\//, baseUrl.match(/^(\w+):\/\//)?.[0] || "http://");
}
function getSnowflakeSqlAlchemyInput(metadata, params) {

@@ -44,0 +54,0 @@ if (isFederatedAuthMetadata(metadata)) return null;

{
"name": "@deepnote/database-integrations",
"version": "1.1.0",
"version": "1.1.1",
"description": "Deepnote database integration definitions",

@@ -30,3 +30,2 @@ "keywords": [],

"dependencies": {
"build-url-ts": "^6.1.7",
"zod": "3.25.76"

@@ -33,0 +32,0 @@ },