@prisma/client-generator-ts 6.19.0-integration-next.2 → 6.19.0-integration-next.4
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/TSClient/TSClient.d.ts +1 -1
- package/dist/index.js +7 -9
- package/dist/index.mjs +7 -9
- package/package.json +9 -9
|
@@ -3,7 +3,7 @@ import { DMMFHelper } from '../dmmf';
|
|
|
3
3
|
import type { FileMap } from '../generateClient';
|
|
4
4
|
import { GenerateClientOptions } from '../generateClient';
|
|
5
5
|
import { GenericArgsInfo } from '../GenericsArgsInfo';
|
|
6
|
-
export type RuntimeName = 'binary' | 'library' | 'wasm-
|
|
6
|
+
export type RuntimeName = 'binary' | 'library' | 'wasm-compiler-edge' | 'react-native' | 'client' | (string & {});
|
|
7
7
|
export type TSClientOptions = O.Required<GenerateClientOptions, 'runtimeBase'> & {
|
|
8
8
|
/** The name of the runtime bundle to use */
|
|
9
9
|
runtimeName: RuntimeName;
|
package/dist/index.js
CHANGED
|
@@ -2939,7 +2939,6 @@ ${modelExports(context).join("\n")}
|
|
|
2939
2939
|
}
|
|
2940
2940
|
|
|
2941
2941
|
// src/TSClient/file-generators/ClassFile.ts
|
|
2942
|
-
var import_node_crypto = __toESM(require("node:crypto"));
|
|
2943
2942
|
var import_node_path2 = __toESM(require("node:path"));
|
|
2944
2943
|
var import_internals4 = require("@prisma/internals");
|
|
2945
2944
|
var ts6 = __toESM(require("@prisma/ts-builders"));
|
|
@@ -3456,7 +3455,7 @@ function escapeJson(str) {
|
|
|
3456
3455
|
function buildRuntimeDataModel(datamodel, runtimeName) {
|
|
3457
3456
|
const runtimeDataModel = (0, import_client_common10.dmmfToRuntimeDataModel)(datamodel);
|
|
3458
3457
|
let prunedDataModel;
|
|
3459
|
-
if (runtimeName === "wasm-
|
|
3458
|
+
if (runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
|
|
3460
3459
|
prunedDataModel = (0, import_client_common10.pruneRuntimeDataModel)(runtimeDataModel);
|
|
3461
3460
|
} else {
|
|
3462
3461
|
prunedDataModel = runtimeDataModel;
|
|
@@ -3488,7 +3487,7 @@ var import_debug = require("@prisma/debug");
|
|
|
3488
3487
|
var import_ts_pattern = require("ts-pattern");
|
|
3489
3488
|
var debug = (0, import_debug.Debug)("prisma:client-generator-ts:wasm");
|
|
3490
3489
|
function usesEdgeWasmRuntime(component, runtimeName) {
|
|
3491
|
-
return runtimeName === "wasm-
|
|
3490
|
+
return runtimeName === "wasm-compiler-edge" && component === "compiler";
|
|
3492
3491
|
}
|
|
3493
3492
|
function buildGetWasmModule({
|
|
3494
3493
|
component,
|
|
@@ -3930,7 +3929,6 @@ function clientConfig(context, options) {
|
|
|
3930
3929
|
} = options;
|
|
3931
3930
|
const clientEngineType = (0, import_internals4.getClientEngineType)(generator);
|
|
3932
3931
|
generator.config.engineType = clientEngineType;
|
|
3933
|
-
const inlineSchemaHash = import_node_crypto.default.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex");
|
|
3934
3932
|
const datasourceFilePath = datasources[0].sourceFilePath;
|
|
3935
3933
|
const config = {
|
|
3936
3934
|
generator,
|
|
@@ -3943,7 +3941,6 @@ function clientConfig(context, options) {
|
|
|
3943
3941
|
ciName: import_ci_info.default.name ?? void 0,
|
|
3944
3942
|
inlineDatasources: buildInlineDatasources(datasources),
|
|
3945
3943
|
inlineSchema,
|
|
3946
|
-
inlineSchemaHash,
|
|
3947
3944
|
copyEngine,
|
|
3948
3945
|
runtimeDataModel: { models: {}, enums: {}, types: {} },
|
|
3949
3946
|
dirname: ""
|
|
@@ -5936,7 +5933,7 @@ function buildClientOptions(context, options) {
|
|
|
5936
5933
|
timeout ?= 5000
|
|
5937
5934
|
`)
|
|
5938
5935
|
);
|
|
5939
|
-
if (["library", "client", "wasm-compiler-edge"
|
|
5936
|
+
if (["library", "client", "wasm-compiler-edge"].includes(options.runtimeName)) {
|
|
5940
5937
|
clientOptions.add(
|
|
5941
5938
|
ts19.property("adapter", ts19.unionType([ts19.namedType("runtime.SqlDriverAdapterFactory"), ts19.namedType("null")])).optional().setDocComment(
|
|
5942
5939
|
ts19.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
|
@@ -6268,6 +6265,7 @@ function buildTypedSql({
|
|
|
6268
6265
|
var generatedCodePreamble = `
|
|
6269
6266
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6270
6267
|
/* eslint-disable */
|
|
6268
|
+
// biome-ignore-all lint: generated file
|
|
6271
6269
|
`;
|
|
6272
6270
|
var tsNoCheckPreamble = `// @ts-nocheck
|
|
6273
6271
|
`;
|
|
@@ -6331,7 +6329,7 @@ function buildClient({
|
|
|
6331
6329
|
postinstall,
|
|
6332
6330
|
copyEngine,
|
|
6333
6331
|
datamodel,
|
|
6334
|
-
edge: ["
|
|
6332
|
+
edge: ["wasm-compiler-edge", "react-native"].includes(runtimeName),
|
|
6335
6333
|
runtimeName,
|
|
6336
6334
|
target,
|
|
6337
6335
|
generatedFileExtension,
|
|
@@ -6571,7 +6569,7 @@ function getRuntimeNameForTarget(target, engineType) {
|
|
|
6571
6569
|
return getNodeRuntimeName(engineType);
|
|
6572
6570
|
case "workerd":
|
|
6573
6571
|
case "vercel-edge":
|
|
6574
|
-
return
|
|
6572
|
+
return "wasm-compiler-edge";
|
|
6575
6573
|
case "react-native":
|
|
6576
6574
|
return "react-native";
|
|
6577
6575
|
default:
|
|
@@ -6631,7 +6629,7 @@ var import_get_tsconfig = require("get-tsconfig");
|
|
|
6631
6629
|
var import_ts_pattern2 = require("ts-pattern");
|
|
6632
6630
|
|
|
6633
6631
|
// package.json
|
|
6634
|
-
var version = "6.19.0-integration-next.
|
|
6632
|
+
var version = "6.19.0-integration-next.4";
|
|
6635
6633
|
|
|
6636
6634
|
// src/module-format.ts
|
|
6637
6635
|
function parseModuleFormat(format) {
|
package/dist/index.mjs
CHANGED
|
@@ -2935,7 +2935,6 @@ ${modelExports(context).join("\n")}
|
|
|
2935
2935
|
}
|
|
2936
2936
|
|
|
2937
2937
|
// src/TSClient/file-generators/ClassFile.ts
|
|
2938
|
-
import crypto from "node:crypto";
|
|
2939
2938
|
import path2 from "node:path";
|
|
2940
2939
|
import { getClientEngineType as getClientEngineType2, pathToPosix } from "@prisma/internals";
|
|
2941
2940
|
import * as ts6 from "@prisma/ts-builders";
|
|
@@ -3455,7 +3454,7 @@ function escapeJson(str) {
|
|
|
3455
3454
|
function buildRuntimeDataModel(datamodel, runtimeName) {
|
|
3456
3455
|
const runtimeDataModel = dmmfToRuntimeDataModel(datamodel);
|
|
3457
3456
|
let prunedDataModel;
|
|
3458
|
-
if (runtimeName === "wasm-
|
|
3457
|
+
if (runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
|
|
3459
3458
|
prunedDataModel = pruneRuntimeDataModel(runtimeDataModel);
|
|
3460
3459
|
} else {
|
|
3461
3460
|
prunedDataModel = runtimeDataModel;
|
|
@@ -3487,7 +3486,7 @@ import { Debug } from "@prisma/debug";
|
|
|
3487
3486
|
import { match } from "ts-pattern";
|
|
3488
3487
|
var debug = Debug("prisma:client-generator-ts:wasm");
|
|
3489
3488
|
function usesEdgeWasmRuntime(component, runtimeName) {
|
|
3490
|
-
return runtimeName === "wasm-
|
|
3489
|
+
return runtimeName === "wasm-compiler-edge" && component === "compiler";
|
|
3491
3490
|
}
|
|
3492
3491
|
function buildGetWasmModule({
|
|
3493
3492
|
component,
|
|
@@ -3929,7 +3928,6 @@ function clientConfig(context, options) {
|
|
|
3929
3928
|
} = options;
|
|
3930
3929
|
const clientEngineType = getClientEngineType2(generator);
|
|
3931
3930
|
generator.config.engineType = clientEngineType;
|
|
3932
|
-
const inlineSchemaHash = crypto.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex");
|
|
3933
3931
|
const datasourceFilePath = datasources[0].sourceFilePath;
|
|
3934
3932
|
const config = {
|
|
3935
3933
|
generator,
|
|
@@ -3942,7 +3940,6 @@ function clientConfig(context, options) {
|
|
|
3942
3940
|
ciName: ciInfo.name ?? void 0,
|
|
3943
3941
|
inlineDatasources: buildInlineDatasources(datasources),
|
|
3944
3942
|
inlineSchema,
|
|
3945
|
-
inlineSchemaHash,
|
|
3946
3943
|
copyEngine,
|
|
3947
3944
|
runtimeDataModel: { models: {}, enums: {}, types: {} },
|
|
3948
3945
|
dirname: ""
|
|
@@ -5935,7 +5932,7 @@ function buildClientOptions(context, options) {
|
|
|
5935
5932
|
timeout ?= 5000
|
|
5936
5933
|
`)
|
|
5937
5934
|
);
|
|
5938
|
-
if (["library", "client", "wasm-compiler-edge"
|
|
5935
|
+
if (["library", "client", "wasm-compiler-edge"].includes(options.runtimeName)) {
|
|
5939
5936
|
clientOptions.add(
|
|
5940
5937
|
ts19.property("adapter", ts19.unionType([ts19.namedType("runtime.SqlDriverAdapterFactory"), ts19.namedType("null")])).optional().setDocComment(
|
|
5941
5938
|
ts19.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
|
@@ -6267,6 +6264,7 @@ function buildTypedSql({
|
|
|
6267
6264
|
var generatedCodePreamble = `
|
|
6268
6265
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6269
6266
|
/* eslint-disable */
|
|
6267
|
+
// biome-ignore-all lint: generated file
|
|
6270
6268
|
`;
|
|
6271
6269
|
var tsNoCheckPreamble = `// @ts-nocheck
|
|
6272
6270
|
`;
|
|
@@ -6330,7 +6328,7 @@ function buildClient({
|
|
|
6330
6328
|
postinstall,
|
|
6331
6329
|
copyEngine,
|
|
6332
6330
|
datamodel,
|
|
6333
|
-
edge: ["
|
|
6331
|
+
edge: ["wasm-compiler-edge", "react-native"].includes(runtimeName),
|
|
6334
6332
|
runtimeName,
|
|
6335
6333
|
target,
|
|
6336
6334
|
generatedFileExtension,
|
|
@@ -6570,7 +6568,7 @@ function getRuntimeNameForTarget(target, engineType) {
|
|
|
6570
6568
|
return getNodeRuntimeName(engineType);
|
|
6571
6569
|
case "workerd":
|
|
6572
6570
|
case "vercel-edge":
|
|
6573
|
-
return
|
|
6571
|
+
return "wasm-compiler-edge";
|
|
6574
6572
|
case "react-native":
|
|
6575
6573
|
return "react-native";
|
|
6576
6574
|
default:
|
|
@@ -6630,7 +6628,7 @@ import { getTsconfig } from "get-tsconfig";
|
|
|
6630
6628
|
import { match as match2 } from "ts-pattern";
|
|
6631
6629
|
|
|
6632
6630
|
// package.json
|
|
6633
|
-
var version = "6.19.0-integration-next.
|
|
6631
|
+
var version = "6.19.0-integration-next.4";
|
|
6634
6632
|
|
|
6635
6633
|
// src/module-format.ts
|
|
6636
6634
|
function parseModuleFormat(format) {
|
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.4",
|
|
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/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/get-platform": "6.19.0-integration-next.
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/
|
|
44
|
-
"@prisma/
|
|
37
|
+
"@prisma/client-common": "6.19.0-integration-next.4",
|
|
38
|
+
"@prisma/debug": "6.19.0-integration-next.4",
|
|
39
|
+
"@prisma/dmmf": "6.19.0-integration-next.4",
|
|
40
|
+
"@prisma/fetch-engine": "6.19.0-integration-next.4",
|
|
41
|
+
"@prisma/get-platform": "6.19.0-integration-next.4",
|
|
42
|
+
"@prisma/generator": "6.19.0-integration-next.4",
|
|
43
|
+
"@prisma/internals": "6.19.0-integration-next.4",
|
|
44
|
+
"@prisma/ts-builders": "6.19.0-integration-next.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/pluralize": "0.0.33",
|