@prisma/client-generator-js 6.19.0-integration-next.20 → 6.19.0-integration-next.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
CHANGED
|
@@ -5074,44 +5074,12 @@ var GenericArgsInfo = class {
|
|
|
5074
5074
|
}
|
|
5075
5075
|
};
|
|
5076
5076
|
|
|
5077
|
-
// src/utils/buildInjectableEdgeEnv.ts
|
|
5078
|
-
function buildInjectableEdgeEnv(edge, datasources) {
|
|
5079
|
-
if (edge === true) {
|
|
5080
|
-
return declareInjectableEdgeEnv(datasources);
|
|
5081
|
-
}
|
|
5082
|
-
return ``;
|
|
5083
|
-
}
|
|
5084
|
-
function declareInjectableEdgeEnv(datasources) {
|
|
5085
|
-
const injectableEdgeEnv = { parsed: {} };
|
|
5086
|
-
const envVarNames = getSelectedEnvVarNames(datasources);
|
|
5087
|
-
for (const envVarName of envVarNames) {
|
|
5088
|
-
injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName);
|
|
5089
|
-
}
|
|
5090
|
-
const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2);
|
|
5091
|
-
const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, "");
|
|
5092
|
-
return `
|
|
5093
|
-
config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`;
|
|
5094
|
-
}
|
|
5095
|
-
function getSelectedEnvVarNames(datasources) {
|
|
5096
|
-
return datasources.reduce((acc, datasource) => {
|
|
5097
|
-
if (datasource.url.fromEnvVar) {
|
|
5098
|
-
return [...acc, datasource.url.fromEnvVar];
|
|
5099
|
-
}
|
|
5100
|
-
return acc;
|
|
5101
|
-
}, []);
|
|
5102
|
-
}
|
|
5103
|
-
function getRuntimeEdgeEnvVar(envVarName) {
|
|
5104
|
-
const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`;
|
|
5105
|
-
const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`;
|
|
5106
|
-
return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`;
|
|
5107
|
-
}
|
|
5108
|
-
|
|
5109
5077
|
// src/utils/buildDebugInitialization.ts
|
|
5110
5078
|
function buildDebugInitialization(edge) {
|
|
5111
5079
|
if (!edge) {
|
|
5112
5080
|
return "";
|
|
5113
5081
|
}
|
|
5114
|
-
const debugVar =
|
|
5082
|
+
const debugVar = `typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined`;
|
|
5115
5083
|
return `if (${debugVar}) {
|
|
5116
5084
|
Debug.enable(${debugVar})
|
|
5117
5085
|
}
|
|
@@ -6487,7 +6455,6 @@ ${buildDirname(edge, relativeOutdir)}
|
|
|
6487
6455
|
${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)}
|
|
6488
6456
|
${buildQueryEngineWasmModule(runtimeNameJs)}
|
|
6489
6457
|
${buildQueryCompilerWasmModule(wasm, runtimeNameJs)}
|
|
6490
|
-
${buildInjectableEdgeEnv(edge, datasources)}
|
|
6491
6458
|
${buildDebugInitialization(edge)}
|
|
6492
6459
|
const PrismaClient = getPrismaClient(config)
|
|
6493
6460
|
exports.PrismaClient = PrismaClient
|
|
@@ -7480,7 +7447,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
7480
7447
|
var import_internals11 = require("@prisma/internals");
|
|
7481
7448
|
|
|
7482
7449
|
// package.json
|
|
7483
|
-
var version = "6.19.0-integration-next.
|
|
7450
|
+
var version = "6.19.0-integration-next.22";
|
|
7484
7451
|
|
|
7485
7452
|
// src/resolvePrismaClient.ts
|
|
7486
7453
|
var import_promises3 = __toESM(require("node:fs/promises"));
|
package/dist/index.mjs
CHANGED
|
@@ -5063,44 +5063,12 @@ var GenericArgsInfo = class {
|
|
|
5063
5063
|
}
|
|
5064
5064
|
};
|
|
5065
5065
|
|
|
5066
|
-
// src/utils/buildInjectableEdgeEnv.ts
|
|
5067
|
-
function buildInjectableEdgeEnv(edge, datasources) {
|
|
5068
|
-
if (edge === true) {
|
|
5069
|
-
return declareInjectableEdgeEnv(datasources);
|
|
5070
|
-
}
|
|
5071
|
-
return ``;
|
|
5072
|
-
}
|
|
5073
|
-
function declareInjectableEdgeEnv(datasources) {
|
|
5074
|
-
const injectableEdgeEnv = { parsed: {} };
|
|
5075
|
-
const envVarNames = getSelectedEnvVarNames(datasources);
|
|
5076
|
-
for (const envVarName of envVarNames) {
|
|
5077
|
-
injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName);
|
|
5078
|
-
}
|
|
5079
|
-
const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2);
|
|
5080
|
-
const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, "");
|
|
5081
|
-
return `
|
|
5082
|
-
config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`;
|
|
5083
|
-
}
|
|
5084
|
-
function getSelectedEnvVarNames(datasources) {
|
|
5085
|
-
return datasources.reduce((acc, datasource) => {
|
|
5086
|
-
if (datasource.url.fromEnvVar) {
|
|
5087
|
-
return [...acc, datasource.url.fromEnvVar];
|
|
5088
|
-
}
|
|
5089
|
-
return acc;
|
|
5090
|
-
}, []);
|
|
5091
|
-
}
|
|
5092
|
-
function getRuntimeEdgeEnvVar(envVarName) {
|
|
5093
|
-
const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`;
|
|
5094
|
-
const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`;
|
|
5095
|
-
return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`;
|
|
5096
|
-
}
|
|
5097
|
-
|
|
5098
5066
|
// src/utils/buildDebugInitialization.ts
|
|
5099
5067
|
function buildDebugInitialization(edge) {
|
|
5100
5068
|
if (!edge) {
|
|
5101
5069
|
return "";
|
|
5102
5070
|
}
|
|
5103
|
-
const debugVar =
|
|
5071
|
+
const debugVar = `typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined`;
|
|
5104
5072
|
return `if (${debugVar}) {
|
|
5105
5073
|
Debug.enable(${debugVar})
|
|
5106
5074
|
}
|
|
@@ -6479,7 +6447,6 @@ ${buildDirname(edge, relativeOutdir)}
|
|
|
6479
6447
|
${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)}
|
|
6480
6448
|
${buildQueryEngineWasmModule(runtimeNameJs)}
|
|
6481
6449
|
${buildQueryCompilerWasmModule(wasm, runtimeNameJs)}
|
|
6482
|
-
${buildInjectableEdgeEnv(edge, datasources)}
|
|
6483
6450
|
${buildDebugInitialization(edge)}
|
|
6484
6451
|
const PrismaClient = getPrismaClient(config)
|
|
6485
6452
|
exports.PrismaClient = PrismaClient
|
|
@@ -7472,7 +7439,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
7472
7439
|
import { parseEnvValue } from "@prisma/internals";
|
|
7473
7440
|
|
|
7474
7441
|
// package.json
|
|
7475
|
-
var version = "6.19.0-integration-next.
|
|
7442
|
+
var version = "6.19.0-integration-next.22";
|
|
7476
7443
|
|
|
7477
7444
|
// src/resolvePrismaClient.ts
|
|
7478
7445
|
import fs2 from "node:fs/promises";
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @param edge Whether the edge runtime is used
|
|
11
11
|
*/
|
|
12
|
-
export declare function buildDebugInitialization(edge: boolean):
|
|
12
|
+
export declare function buildDebugInitialization(edge: boolean): "" | "if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined) {\n Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined)\n}\n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-js",
|
|
3
|
-
"version": "6.19.0-integration-next.
|
|
3
|
+
"version": "6.19.0-integration-next.22",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"package-up": "5.0.0",
|
|
34
34
|
"pluralize": "8.0.0",
|
|
35
35
|
"ts-pattern": "5.6.2",
|
|
36
|
-
"@prisma/client-common": "6.19.0-integration-next.
|
|
37
|
-
"@prisma/debug": "6.19.0-integration-next.
|
|
38
|
-
"@prisma/dmmf": "6.19.0-integration-next.
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/internals": "6.19.0-integration-next.
|
|
43
|
-
"@prisma/
|
|
36
|
+
"@prisma/client-common": "6.19.0-integration-next.22",
|
|
37
|
+
"@prisma/debug": "6.19.0-integration-next.22",
|
|
38
|
+
"@prisma/dmmf": "6.19.0-integration-next.22",
|
|
39
|
+
"@prisma/generator": "6.19.0-integration-next.22",
|
|
40
|
+
"@prisma/fetch-engine": "6.19.0-integration-next.22",
|
|
41
|
+
"@prisma/ts-builders": "6.19.0-integration-next.22",
|
|
42
|
+
"@prisma/internals": "6.19.0-integration-next.22",
|
|
43
|
+
"@prisma/get-platform": "6.19.0-integration-next.22"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/pluralize": "0.0.33",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { DataSource } from '@prisma/generator';
|
|
2
|
-
/**
|
|
3
|
-
* Builds an injectable environment for the data proxy edge client. It's useful
|
|
4
|
-
* because it is designed to run in browser-like environments where things like
|
|
5
|
-
* `fs`, `process.env`, and .env file loading are not available. That means env
|
|
6
|
-
* vars are represented as a global variable or injected at build time. This is
|
|
7
|
-
* the glue code to make this work with our existing env var loading logic. It
|
|
8
|
-
* is the place where we make collect the env vars for the edge client. To
|
|
9
|
-
* understand this better, take a look at the generated code in the edge client.
|
|
10
|
-
* @see {@link declareInjectableEdgeEnv}
|
|
11
|
-
* @param edge
|
|
12
|
-
* @param datasources
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
export declare function buildInjectableEdgeEnv(edge: boolean, datasources: DataSource[]): string;
|
|
16
|
-
/**
|
|
17
|
-
* Builds the expression to get the value of an environment variable at run time.
|
|
18
|
-
* @param envVarName Name of the environment variable
|
|
19
|
-
*/
|
|
20
|
-
export declare function getRuntimeEdgeEnvVar(envVarName: string): string;
|