@prisma/query-plan-executor 6.17.0-dev.21 → 6.17.0-dev.22
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.js +184 -81
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -53639,8 +53639,8 @@ var require_lrucache = __commonJS({
|
|
|
53639
53639
|
const deleted = this.delete(key);
|
|
53640
53640
|
if (!deleted && value !== void 0) {
|
|
53641
53641
|
if (this.map.size >= this.max) {
|
|
53642
|
-
const
|
|
53643
|
-
this.delete(
|
|
53642
|
+
const firstKey2 = this.map.keys().next().value;
|
|
53643
|
+
this.delete(firstKey2);
|
|
53644
53644
|
}
|
|
53645
53645
|
this.map.set(key, value);
|
|
53646
53646
|
}
|
|
@@ -108555,7 +108555,7 @@ function isPromiseLike(value) {
|
|
|
108555
108555
|
}
|
|
108556
108556
|
|
|
108557
108557
|
// package.json
|
|
108558
|
-
var version = "6.17.0-dev.
|
|
108558
|
+
var version = "6.17.0-dev.22";
|
|
108559
108559
|
|
|
108560
108560
|
// src/utils/error.ts
|
|
108561
108561
|
function extractErrorFromUnknown(value) {
|
|
@@ -109273,97 +109273,200 @@ function parseConnectionString(connectionString) {
|
|
|
109273
109273
|
}
|
|
109274
109274
|
config3.port = port;
|
|
109275
109275
|
}
|
|
109276
|
+
const parameters = {};
|
|
109276
109277
|
for (const part of paramParts) {
|
|
109277
109278
|
const [key, value] = part.split("=", 2);
|
|
109278
109279
|
if (!key) continue;
|
|
109279
109280
|
const trimmedKey = key.trim();
|
|
109280
|
-
|
|
109281
|
-
|
|
109282
|
-
|
|
109283
|
-
|
|
109284
|
-
|
|
109285
|
-
|
|
109286
|
-
|
|
109287
|
-
|
|
109288
|
-
|
|
109289
|
-
|
|
109290
|
-
|
|
109291
|
-
|
|
109292
|
-
|
|
109293
|
-
|
|
109294
|
-
|
|
109295
|
-
|
|
109296
|
-
|
|
109297
|
-
|
|
109298
|
-
|
|
109299
|
-
|
|
109300
|
-
|
|
109301
|
-
|
|
109302
|
-
|
|
109303
|
-
|
|
109304
|
-
|
|
109305
|
-
|
|
109306
|
-
|
|
109307
|
-
|
|
109308
|
-
|
|
109309
|
-
|
|
109310
|
-
|
|
109311
|
-
|
|
109312
|
-
|
|
109313
|
-
|
|
109314
|
-
|
|
109315
|
-
|
|
109316
|
-
|
|
109317
|
-
|
|
109318
|
-
|
|
109319
|
-
|
|
109320
|
-
|
|
109321
|
-
|
|
109322
|
-
|
|
109323
|
-
|
|
109324
|
-
|
|
109325
|
-
|
|
109326
|
-
|
|
109327
|
-
|
|
109328
|
-
|
|
109281
|
+
if (trimmedKey in parameters) {
|
|
109282
|
+
throw new Error(`Duplication configuration parameter: ${trimmedKey}`);
|
|
109283
|
+
}
|
|
109284
|
+
parameters[trimmedKey] = value.trim();
|
|
109285
|
+
if (!handledParameters.includes(trimmedKey)) {
|
|
109286
|
+
debug5(`Unknown connection string parameter: ${trimmedKey}`);
|
|
109287
|
+
}
|
|
109288
|
+
}
|
|
109289
|
+
const database = firstKey(parameters, "database", "initial catalog");
|
|
109290
|
+
if (database !== null) {
|
|
109291
|
+
config3.database = database;
|
|
109292
|
+
}
|
|
109293
|
+
const user = firstKey(parameters, "user", "username", "uid", "userid");
|
|
109294
|
+
if (user !== null) {
|
|
109295
|
+
config3.user = user;
|
|
109296
|
+
}
|
|
109297
|
+
const password = firstKey(parameters, "password", "pwd");
|
|
109298
|
+
if (password !== null) {
|
|
109299
|
+
config3.password = password;
|
|
109300
|
+
}
|
|
109301
|
+
const encrypt = firstKey(parameters, "encrypt");
|
|
109302
|
+
if (encrypt !== null) {
|
|
109303
|
+
config3.options = config3.options || {};
|
|
109304
|
+
config3.options.encrypt = encrypt.toLowerCase() === "true";
|
|
109305
|
+
}
|
|
109306
|
+
const trustServerCertificate = firstKey(parameters, "trustServerCertificate");
|
|
109307
|
+
if (trustServerCertificate !== null) {
|
|
109308
|
+
config3.options = config3.options || {};
|
|
109309
|
+
config3.options.trustServerCertificate = trustServerCertificate.toLowerCase() === "true";
|
|
109310
|
+
}
|
|
109311
|
+
const connectionLimit = firstKey(parameters, "connectionLimit");
|
|
109312
|
+
if (connectionLimit !== null) {
|
|
109313
|
+
config3.pool = config3.pool || {};
|
|
109314
|
+
const limit = parseInt(connectionLimit, 10);
|
|
109315
|
+
if (isNaN(limit)) {
|
|
109316
|
+
throw new Error(`Invalid connection limit: ${connectionLimit}`);
|
|
109317
|
+
}
|
|
109318
|
+
config3.pool.max = limit;
|
|
109319
|
+
}
|
|
109320
|
+
const connectionTimeout = firstKey(parameters, "connectionTimeout", "connectTimeout");
|
|
109321
|
+
if (connectionTimeout !== null) {
|
|
109322
|
+
const timeout = parseInt(connectionTimeout, 10);
|
|
109323
|
+
if (isNaN(timeout)) {
|
|
109324
|
+
throw new Error(`Invalid connection timeout: ${connectionTimeout}`);
|
|
109325
|
+
}
|
|
109326
|
+
config3.connectionTimeout = timeout;
|
|
109327
|
+
}
|
|
109328
|
+
const loginTimeout = firstKey(parameters, "loginTimeout");
|
|
109329
|
+
if (loginTimeout !== null) {
|
|
109330
|
+
const timeout = parseInt(loginTimeout, 10);
|
|
109331
|
+
if (isNaN(timeout)) {
|
|
109332
|
+
throw new Error(`Invalid login timeout: ${loginTimeout}`);
|
|
109333
|
+
}
|
|
109334
|
+
config3.connectionTimeout = timeout;
|
|
109335
|
+
}
|
|
109336
|
+
const socketTimeout = firstKey(parameters, "socketTimeout");
|
|
109337
|
+
if (socketTimeout !== null) {
|
|
109338
|
+
const timeout = parseInt(socketTimeout, 10);
|
|
109339
|
+
if (isNaN(timeout)) {
|
|
109340
|
+
throw new Error(`Invalid socket timeout: ${socketTimeout}`);
|
|
109341
|
+
}
|
|
109342
|
+
config3.requestTimeout = timeout;
|
|
109343
|
+
}
|
|
109344
|
+
const poolTimeout = firstKey(parameters, "poolTimeout");
|
|
109345
|
+
if (poolTimeout !== null) {
|
|
109346
|
+
const timeout = parseInt(poolTimeout, 10);
|
|
109347
|
+
if (isNaN(timeout)) {
|
|
109348
|
+
throw new Error(`Invalid pool timeout: ${poolTimeout}`);
|
|
109349
|
+
}
|
|
109350
|
+
config3.pool = config3.pool || {};
|
|
109351
|
+
config3.pool.acquireTimeoutMillis = timeout * 1e3;
|
|
109352
|
+
}
|
|
109353
|
+
const appName = firstKey(parameters, "applicationName", "application name");
|
|
109354
|
+
if (appName !== null) {
|
|
109355
|
+
config3.options = config3.options || {};
|
|
109356
|
+
config3.options.appName = appName;
|
|
109357
|
+
}
|
|
109358
|
+
const isolationLevel = firstKey(parameters, "isolationLevel");
|
|
109359
|
+
if (isolationLevel !== null) {
|
|
109360
|
+
config3.options = config3.options || {};
|
|
109361
|
+
config3.options.isolationLevel = mapIsolationLevelFromString(isolationLevel);
|
|
109362
|
+
}
|
|
109363
|
+
const authentication = firstKey(parameters, "authentication");
|
|
109364
|
+
if (authentication !== null) {
|
|
109365
|
+
config3.authentication = parseAuthenticationOptions(parameters, authentication);
|
|
109366
|
+
}
|
|
109367
|
+
if (!config3.server || config3.server.trim() === "") {
|
|
109368
|
+
throw new Error("Server host is required in connection string");
|
|
109369
|
+
}
|
|
109370
|
+
return config3;
|
|
109371
|
+
}
|
|
109372
|
+
function parseAuthenticationOptions(parameters, authenticationValue) {
|
|
109373
|
+
switch (authenticationValue) {
|
|
109374
|
+
/**
|
|
109375
|
+
* 'DefaultAzureCredential' is not listed in the JDBC driver spec
|
|
109376
|
+
* https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver15#properties
|
|
109377
|
+
* but is supported by tedious so included here
|
|
109378
|
+
*/
|
|
109379
|
+
case "DefaultAzureCredential":
|
|
109380
|
+
case "ActiveDirectoryIntegrated":
|
|
109381
|
+
case "ActiveDirectoryInteractive":
|
|
109382
|
+
return { type: "azure-active-directory-default", options: {} };
|
|
109383
|
+
case "ActiveDirectoryPassword": {
|
|
109384
|
+
const userName = firstKey(parameters, "userName");
|
|
109385
|
+
const password = firstKey(parameters, "password");
|
|
109386
|
+
const clientId = firstKey(parameters, "clientId");
|
|
109387
|
+
const tenantId = firstKey(parameters, "tenantId");
|
|
109388
|
+
if (!userName || !password || !clientId) {
|
|
109389
|
+
throw new Error(`Invalid authentication, ActiveDirectoryPassword requires userName, password, clientId`);
|
|
109329
109390
|
}
|
|
109330
|
-
|
|
109331
|
-
|
|
109332
|
-
|
|
109333
|
-
|
|
109391
|
+
return {
|
|
109392
|
+
type: "azure-active-directory-password",
|
|
109393
|
+
options: {
|
|
109394
|
+
userName,
|
|
109395
|
+
password,
|
|
109396
|
+
clientId,
|
|
109397
|
+
tenantId: tenantId || ""
|
|
109334
109398
|
}
|
|
109335
|
-
|
|
109336
|
-
|
|
109399
|
+
};
|
|
109400
|
+
}
|
|
109401
|
+
case "ActiveDirectoryManagedIdentity":
|
|
109402
|
+
case "ActiveDirectoryMSI": {
|
|
109403
|
+
const clientId = firstKey(parameters, "clientId");
|
|
109404
|
+
const msiEndpoint = firstKey(parameters, "msiEndpoint");
|
|
109405
|
+
const msiSecret = firstKey(parameters, "msiSecret");
|
|
109406
|
+
if (!msiEndpoint || !msiSecret) {
|
|
109407
|
+
throw new Error(`Invalid authentication, ActiveDirectoryManagedIdentity requires msiEndpoint, msiSecret`);
|
|
109337
109408
|
}
|
|
109338
|
-
|
|
109339
|
-
|
|
109340
|
-
|
|
109341
|
-
|
|
109409
|
+
return {
|
|
109410
|
+
type: "azure-active-directory-msi-app-service",
|
|
109411
|
+
options: {
|
|
109412
|
+
clientId: clientId || void 0,
|
|
109413
|
+
// @ts-expect-error TODO: tedious typings don't define msiEndpoint and msiSecret -- needs to be fixed upstream
|
|
109414
|
+
msiEndpoint,
|
|
109415
|
+
msiSecret
|
|
109342
109416
|
}
|
|
109343
|
-
|
|
109344
|
-
|
|
109345
|
-
|
|
109417
|
+
};
|
|
109418
|
+
}
|
|
109419
|
+
case "ActiveDirectoryServicePrincipal": {
|
|
109420
|
+
const clientId = firstKey(parameters, "userName");
|
|
109421
|
+
const clientSecret = firstKey(parameters, "password");
|
|
109422
|
+
const tenantId = firstKey(parameters, "tenantId");
|
|
109423
|
+
if (clientId && clientSecret) {
|
|
109424
|
+
return {
|
|
109425
|
+
type: "azure-active-directory-service-principal-secret",
|
|
109426
|
+
options: {
|
|
109427
|
+
clientId,
|
|
109428
|
+
clientSecret,
|
|
109429
|
+
tenantId: tenantId || ""
|
|
109430
|
+
}
|
|
109431
|
+
};
|
|
109432
|
+
} else {
|
|
109433
|
+
throw new Error(
|
|
109434
|
+
`Invalid authentication, ActiveDirectoryServicePrincipal requires userName (clientId), password (clientSecret)`
|
|
109435
|
+
);
|
|
109346
109436
|
}
|
|
109347
|
-
case "applicationName":
|
|
109348
|
-
case "application name":
|
|
109349
|
-
config3.options = config3.options || {};
|
|
109350
|
-
config3.options.appName = trimmedValue;
|
|
109351
|
-
break;
|
|
109352
|
-
case "isolationLevel":
|
|
109353
|
-
config3.options = config3.options || {};
|
|
109354
|
-
config3.options.isolationLevel = mapIsolationLevelFromString(trimmedValue);
|
|
109355
|
-
break;
|
|
109356
|
-
case "schema":
|
|
109357
|
-
break;
|
|
109358
|
-
default:
|
|
109359
|
-
debug5(`Unknown connection string parameter: ${trimmedKey}`);
|
|
109360
109437
|
}
|
|
109361
109438
|
}
|
|
109362
|
-
|
|
109363
|
-
|
|
109439
|
+
return void 0;
|
|
109440
|
+
}
|
|
109441
|
+
function firstKey(parameters, ...keys) {
|
|
109442
|
+
for (const key of keys) {
|
|
109443
|
+
if (key in parameters) {
|
|
109444
|
+
return parameters[key];
|
|
109445
|
+
}
|
|
109364
109446
|
}
|
|
109365
|
-
return
|
|
109447
|
+
return null;
|
|
109366
109448
|
}
|
|
109449
|
+
var handledParameters = [
|
|
109450
|
+
"application name",
|
|
109451
|
+
"applicationName",
|
|
109452
|
+
"connectTimeout",
|
|
109453
|
+
"connectionLimit",
|
|
109454
|
+
"connectionTimeout",
|
|
109455
|
+
"database",
|
|
109456
|
+
"encrypt",
|
|
109457
|
+
"initial catalog",
|
|
109458
|
+
"isolationLevel",
|
|
109459
|
+
"loginTimeout",
|
|
109460
|
+
"password",
|
|
109461
|
+
"poolTimeout",
|
|
109462
|
+
"pwd",
|
|
109463
|
+
"socketTimeout",
|
|
109464
|
+
"trustServerCertificate",
|
|
109465
|
+
"uid",
|
|
109466
|
+
"user",
|
|
109467
|
+
"userid",
|
|
109468
|
+
"username"
|
|
109469
|
+
];
|
|
109367
109470
|
function mapColumnType2(col) {
|
|
109368
109471
|
switch (col.type) {
|
|
109369
109472
|
case import_mssql3.default.VarChar:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/query-plan-executor",
|
|
3
|
-
"version": "6.17.0-dev.
|
|
3
|
+
"version": "6.17.0-dev.22",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"temporal-polyfill": "0.3.0",
|
|
21
21
|
"vitest": "3.2.4",
|
|
22
22
|
"zod": "4.1.3",
|
|
23
|
-
"@prisma/adapter-pg": "6.17.0-dev.
|
|
24
|
-
"@prisma/adapter-mariadb": "6.17.0-dev.
|
|
25
|
-
"@prisma/
|
|
26
|
-
"@prisma/driver-adapter-utils": "6.17.0-dev.
|
|
27
|
-
"@prisma/
|
|
23
|
+
"@prisma/adapter-pg": "6.17.0-dev.22",
|
|
24
|
+
"@prisma/adapter-mariadb": "6.17.0-dev.22",
|
|
25
|
+
"@prisma/client-engine-runtime": "6.17.0-dev.22",
|
|
26
|
+
"@prisma/driver-adapter-utils": "6.17.0-dev.22",
|
|
27
|
+
"@prisma/adapter-mssql": "6.17.0-dev.22"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|