@prisma/client-generator-ts 6.19.0-integration-next.20 → 6.19.0-integration-next.21
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
|
@@ -2937,44 +2937,12 @@ var import_internals3 = require("@prisma/internals");
|
|
|
2937
2937
|
var ts6 = __toESM(require("@prisma/ts-builders"));
|
|
2938
2938
|
var import_ci_info = __toESM(require("ci-info"));
|
|
2939
2939
|
|
|
2940
|
-
// src/utils/buildInjectableEdgeEnv.ts
|
|
2941
|
-
function buildInjectableEdgeEnv(edge, datasources) {
|
|
2942
|
-
if (edge === true) {
|
|
2943
|
-
return declareInjectableEdgeEnv(datasources);
|
|
2944
|
-
}
|
|
2945
|
-
return ``;
|
|
2946
|
-
}
|
|
2947
|
-
function declareInjectableEdgeEnv(datasources) {
|
|
2948
|
-
const injectableEdgeEnv = { parsed: {} };
|
|
2949
|
-
const envVarNames = getSelectedEnvVarNames(datasources);
|
|
2950
|
-
for (const envVarName of envVarNames) {
|
|
2951
|
-
injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName);
|
|
2952
|
-
}
|
|
2953
|
-
const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2);
|
|
2954
|
-
const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, "");
|
|
2955
|
-
return `
|
|
2956
|
-
config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`;
|
|
2957
|
-
}
|
|
2958
|
-
function getSelectedEnvVarNames(datasources) {
|
|
2959
|
-
return datasources.reduce((acc, datasource) => {
|
|
2960
|
-
if (datasource.url.fromEnvVar) {
|
|
2961
|
-
return [...acc, datasource.url.fromEnvVar];
|
|
2962
|
-
}
|
|
2963
|
-
return acc;
|
|
2964
|
-
}, []);
|
|
2965
|
-
}
|
|
2966
|
-
function getRuntimeEdgeEnvVar(envVarName) {
|
|
2967
|
-
const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`;
|
|
2968
|
-
const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`;
|
|
2969
|
-
return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`;
|
|
2970
|
-
}
|
|
2971
|
-
|
|
2972
2940
|
// src/utils/buildDebugInitialization.ts
|
|
2973
2941
|
function buildDebugInitialization(edge) {
|
|
2974
2942
|
if (!edge) {
|
|
2975
2943
|
return "";
|
|
2976
2944
|
}
|
|
2977
|
-
const debugVar =
|
|
2945
|
+
const debugVar = `typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined`;
|
|
2978
2946
|
return `if (${debugVar}) {
|
|
2979
2947
|
runtime.Debug.enable(${debugVar})
|
|
2980
2948
|
}
|
|
@@ -3900,7 +3868,6 @@ const config: runtime.GetPrismaClientConfig = ${JSON.stringify(config, null, 2)}
|
|
|
3900
3868
|
${buildRuntimeDataModel(context.dmmf.datamodel, runtimeName)}
|
|
3901
3869
|
${buildGetWasmModule({ component: "engine", runtimeBase, runtimeName, target, activeProvider, moduleFormat })}
|
|
3902
3870
|
${buildGetWasmModule({ component: "compiler", runtimeBase, runtimeName, target, activeProvider, moduleFormat })}
|
|
3903
|
-
${buildInjectableEdgeEnv(edge, datasources)}
|
|
3904
3871
|
${buildDebugInitialization(edge)}
|
|
3905
3872
|
`;
|
|
3906
3873
|
}
|
|
@@ -6480,7 +6447,7 @@ var import_internals8 = require("@prisma/internals");
|
|
|
6480
6447
|
var import_get_tsconfig = require("get-tsconfig");
|
|
6481
6448
|
|
|
6482
6449
|
// package.json
|
|
6483
|
-
var version = "6.19.0-integration-next.
|
|
6450
|
+
var version = "6.19.0-integration-next.21";
|
|
6484
6451
|
|
|
6485
6452
|
// src/module-format.ts
|
|
6486
6453
|
function parseModuleFormat(format) {
|
package/dist/index.mjs
CHANGED
|
@@ -2927,44 +2927,12 @@ import { pathToPosix } from "@prisma/internals";
|
|
|
2927
2927
|
import * as ts6 from "@prisma/ts-builders";
|
|
2928
2928
|
import ciInfo from "ci-info";
|
|
2929
2929
|
|
|
2930
|
-
// src/utils/buildInjectableEdgeEnv.ts
|
|
2931
|
-
function buildInjectableEdgeEnv(edge, datasources) {
|
|
2932
|
-
if (edge === true) {
|
|
2933
|
-
return declareInjectableEdgeEnv(datasources);
|
|
2934
|
-
}
|
|
2935
|
-
return ``;
|
|
2936
|
-
}
|
|
2937
|
-
function declareInjectableEdgeEnv(datasources) {
|
|
2938
|
-
const injectableEdgeEnv = { parsed: {} };
|
|
2939
|
-
const envVarNames = getSelectedEnvVarNames(datasources);
|
|
2940
|
-
for (const envVarName of envVarNames) {
|
|
2941
|
-
injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName);
|
|
2942
|
-
}
|
|
2943
|
-
const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2);
|
|
2944
|
-
const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, "");
|
|
2945
|
-
return `
|
|
2946
|
-
config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`;
|
|
2947
|
-
}
|
|
2948
|
-
function getSelectedEnvVarNames(datasources) {
|
|
2949
|
-
return datasources.reduce((acc, datasource) => {
|
|
2950
|
-
if (datasource.url.fromEnvVar) {
|
|
2951
|
-
return [...acc, datasource.url.fromEnvVar];
|
|
2952
|
-
}
|
|
2953
|
-
return acc;
|
|
2954
|
-
}, []);
|
|
2955
|
-
}
|
|
2956
|
-
function getRuntimeEdgeEnvVar(envVarName) {
|
|
2957
|
-
const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`;
|
|
2958
|
-
const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`;
|
|
2959
|
-
return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`;
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
2930
|
// src/utils/buildDebugInitialization.ts
|
|
2963
2931
|
function buildDebugInitialization(edge) {
|
|
2964
2932
|
if (!edge) {
|
|
2965
2933
|
return "";
|
|
2966
2934
|
}
|
|
2967
|
-
const debugVar =
|
|
2935
|
+
const debugVar = `typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined`;
|
|
2968
2936
|
return `if (${debugVar}) {
|
|
2969
2937
|
runtime.Debug.enable(${debugVar})
|
|
2970
2938
|
}
|
|
@@ -3893,7 +3861,6 @@ const config: runtime.GetPrismaClientConfig = ${JSON.stringify(config, null, 2)}
|
|
|
3893
3861
|
${buildRuntimeDataModel(context.dmmf.datamodel, runtimeName)}
|
|
3894
3862
|
${buildGetWasmModule({ component: "engine", runtimeBase, runtimeName, target, activeProvider, moduleFormat })}
|
|
3895
3863
|
${buildGetWasmModule({ component: "compiler", runtimeBase, runtimeName, target, activeProvider, moduleFormat })}
|
|
3896
|
-
${buildInjectableEdgeEnv(edge, datasources)}
|
|
3897
3864
|
${buildDebugInitialization(edge)}
|
|
3898
3865
|
`;
|
|
3899
3866
|
}
|
|
@@ -6473,7 +6440,7 @@ import { parseEnvValue } from "@prisma/internals";
|
|
|
6473
6440
|
import { getTsconfig } from "get-tsconfig";
|
|
6474
6441
|
|
|
6475
6442
|
// package.json
|
|
6476
|
-
var version = "6.19.0-integration-next.
|
|
6443
|
+
var version = "6.19.0-integration-next.21";
|
|
6477
6444
|
|
|
6478
6445
|
// src/module-format.ts
|
|
6479
6446
|
function parseModuleFormat(format) {
|
|
@@ -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 runtime.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-ts",
|
|
3
|
-
"version": "6.19.0-integration-next.
|
|
3
|
+
"version": "6.19.0-integration-next.21",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"package-up": "5.0.0",
|
|
35
35
|
"pluralize": "8.0.0",
|
|
36
36
|
"ts-pattern": "5.6.2",
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/client-common": "6.19.0-integration-next.
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/fetch-engine": "6.19.0-integration-next.
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/
|
|
44
|
-
"@prisma/ts-builders": "6.19.0-integration-next.
|
|
37
|
+
"@prisma/dmmf": "6.19.0-integration-next.21",
|
|
38
|
+
"@prisma/client-common": "6.19.0-integration-next.21",
|
|
39
|
+
"@prisma/debug": "6.19.0-integration-next.21",
|
|
40
|
+
"@prisma/fetch-engine": "6.19.0-integration-next.21",
|
|
41
|
+
"@prisma/get-platform": "6.19.0-integration-next.21",
|
|
42
|
+
"@prisma/generator": "6.19.0-integration-next.21",
|
|
43
|
+
"@prisma/internals": "6.19.0-integration-next.21",
|
|
44
|
+
"@prisma/ts-builders": "6.19.0-integration-next.21"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@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;
|