@prisma/client-generator-js 7.3.0-dev.1 → 7.3.0-dev.3
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/generateClient.d.ts +2 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +38 -19
- package/dist/index.mjs +38 -19
- package/dist/utils/buildGetQueryCompilerWasmModule.d.ts +1 -1
- package/package.json +10 -10
package/dist/generateClient.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface GenerateClientOptions {
|
|
|
22
22
|
clientVersion: string;
|
|
23
23
|
activeProvider: ActiveConnectorType;
|
|
24
24
|
typedSql?: SqlQueryOutput[];
|
|
25
|
+
compilerBuild: 'fast' | 'small';
|
|
25
26
|
}
|
|
26
27
|
export interface FileMap {
|
|
27
28
|
[name: string]: string | FileMap;
|
|
@@ -30,5 +31,5 @@ export interface BuildClientResult {
|
|
|
30
31
|
fileMap: FileMap;
|
|
31
32
|
prismaClientDmmf: DMMF.Document;
|
|
32
33
|
}
|
|
33
|
-
export declare function buildClient({ schemaPath, runtimeBase, runtimeSourcePath, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, typedSql, }: O.Required<GenerateClientOptions, 'runtimeBase'>): Promise<BuildClientResult>;
|
|
34
|
+
export declare function buildClient({ schemaPath, runtimeBase, runtimeSourcePath, datamodel, binaryPaths, outputDir, generator, dmmf, datasources, engineVersion, clientVersion, activeProvider, typedSql, compilerBuild, }: O.Required<GenerateClientOptions, 'runtimeBase'>): Promise<BuildClientResult>;
|
|
34
35
|
export declare function generateClient(options: GenerateClientOptions): Promise<void>;
|
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,7 @@ export declare interface GenerateClientOptions {
|
|
|
41
41
|
clientVersion: string;
|
|
42
42
|
activeProvider: ActiveConnectorType;
|
|
43
43
|
typedSql?: SqlQueryOutput[];
|
|
44
|
+
compilerBuild: 'fast' | 'small';
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare interface GenerateClientOptions {
|
|
|
41
41
|
clientVersion: string;
|
|
42
42
|
activeProvider: ActiveConnectorType;
|
|
43
43
|
typedSql?: SqlQueryOutput[];
|
|
44
|
+
compilerBuild: 'fast' | 'small';
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export declare function getDMMF(options: GetDMMFOptions): Promise<DMMF.Document>;
|
package/dist/index.js
CHANGED
|
@@ -2483,7 +2483,7 @@ var package_default = {
|
|
|
2483
2483
|
"@prisma/dmmf": "workspace:*",
|
|
2484
2484
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
2485
2485
|
"@prisma/engines": "workspace:*",
|
|
2486
|
-
"@prisma/engines-version": "7.
|
|
2486
|
+
"@prisma/engines-version": "7.3.0-5.76bb4681f1254d55b127394fc978e3295d676a01",
|
|
2487
2487
|
"@prisma/fetch-engine": "workspace:*",
|
|
2488
2488
|
"@prisma/generator": "workspace:*",
|
|
2489
2489
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -2493,7 +2493,7 @@ var package_default = {
|
|
|
2493
2493
|
"@prisma/internals": "workspace:*",
|
|
2494
2494
|
"@prisma/json-protocol": "workspace:*",
|
|
2495
2495
|
"@prisma/migrate": "workspace:*",
|
|
2496
|
-
"@prisma/query-compiler-wasm": "7.
|
|
2496
|
+
"@prisma/query-compiler-wasm": "7.3.0-5.76bb4681f1254d55b127394fc978e3295d676a01",
|
|
2497
2497
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2498
2498
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2499
2499
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -4560,27 +4560,30 @@ defineDmmfProperty(exports.Prisma, config.runtimeDataModel)`;
|
|
|
4560
4560
|
}
|
|
4561
4561
|
|
|
4562
4562
|
// src/utils/buildGetQueryCompilerWasmModule.ts
|
|
4563
|
-
function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeName) {
|
|
4563
|
+
function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeName, compilerBuild) {
|
|
4564
|
+
const artifactName = `query_compiler_${compilerBuild}_bg`;
|
|
4564
4565
|
if (runtimeName === "client" && !forceEdgeWasmLoader) {
|
|
4565
4566
|
return `config.compilerWasm = {
|
|
4566
|
-
getRuntime: async () => require('
|
|
4567
|
+
getRuntime: async () => require('./${artifactName}.js'),
|
|
4567
4568
|
getQueryCompilerWasmModule: async () => {
|
|
4568
4569
|
const { Buffer } = require('node:buffer')
|
|
4569
|
-
const { wasm } = require('
|
|
4570
|
+
const { wasm } = require('./${artifactName}.wasm-base64.js')
|
|
4570
4571
|
const queryCompilerWasmFileBytes = Buffer.from(wasm, 'base64')
|
|
4571
4572
|
|
|
4572
4573
|
return new WebAssembly.Module(queryCompilerWasmFileBytes)
|
|
4573
|
-
}
|
|
4574
|
+
},
|
|
4575
|
+
importName: './${artifactName}.js',
|
|
4574
4576
|
}`;
|
|
4575
4577
|
}
|
|
4576
4578
|
if (runtimeName === "client" && forceEdgeWasmLoader || runtimeName === "wasm-compiler-edge") {
|
|
4577
4579
|
return `config.compilerWasm = {
|
|
4578
|
-
getRuntime: async () => require('
|
|
4580
|
+
getRuntime: async () => require('./${artifactName}.js'),
|
|
4579
4581
|
getQueryCompilerWasmModule: async () => {
|
|
4580
4582
|
const loader = (await import('#wasm-compiler-loader')).default
|
|
4581
4583
|
const compiler = (await loader).default
|
|
4582
4584
|
return compiler
|
|
4583
|
-
}
|
|
4585
|
+
},
|
|
4586
|
+
importName: './${artifactName}.js',
|
|
4584
4587
|
}`;
|
|
4585
4588
|
}
|
|
4586
4589
|
return `config.compilerWasm = undefined`;
|
|
@@ -5801,7 +5804,7 @@ var TSClient = class {
|
|
|
5801
5804
|
dmmf;
|
|
5802
5805
|
genericsInfo;
|
|
5803
5806
|
toJS() {
|
|
5804
|
-
const { edge, wasm, generator, datamodel: inlineSchema, runtimeName, reusedJs } = this.options;
|
|
5807
|
+
const { edge, wasm, generator, datamodel: inlineSchema, runtimeName, reusedJs, compilerBuild } = this.options;
|
|
5805
5808
|
if (reusedJs) {
|
|
5806
5809
|
return `module.exports = { ...require('${reusedJs}') }`;
|
|
5807
5810
|
}
|
|
@@ -5836,7 +5839,7 @@ ${new Enum(
|
|
|
5836
5839
|
*/
|
|
5837
5840
|
const config = ${JSON.stringify(config, null, 2)}
|
|
5838
5841
|
${buildRuntimeDataModel(this.dmmf.datamodel, runtimeName)}
|
|
5839
|
-
${buildQueryCompilerWasmModule(wasm, runtimeName)}
|
|
5842
|
+
${buildQueryCompilerWasmModule(wasm, runtimeName, compilerBuild)}
|
|
5840
5843
|
${buildDebugInitialization(edge)}
|
|
5841
5844
|
const PrismaClient = getPrismaClient(config)
|
|
5842
5845
|
exports.PrismaClient = PrismaClient
|
|
@@ -6368,7 +6371,8 @@ async function buildClient({
|
|
|
6368
6371
|
engineVersion,
|
|
6369
6372
|
clientVersion,
|
|
6370
6373
|
activeProvider,
|
|
6371
|
-
typedSql
|
|
6374
|
+
typedSql,
|
|
6375
|
+
compilerBuild
|
|
6372
6376
|
}) {
|
|
6373
6377
|
const baseClientOptions = {
|
|
6374
6378
|
dmmf: getPrismaClientDMMF(dmmf),
|
|
@@ -6383,6 +6387,7 @@ async function buildClient({
|
|
|
6383
6387
|
engineVersion,
|
|
6384
6388
|
activeProvider,
|
|
6385
6389
|
datamodel,
|
|
6390
|
+
compilerBuild,
|
|
6386
6391
|
browser: false,
|
|
6387
6392
|
edge: false,
|
|
6388
6393
|
wasm: false
|
|
@@ -6445,8 +6450,9 @@ async function buildClient({
|
|
|
6445
6450
|
fileMap["client.d.ts"] = TS(defaultClient);
|
|
6446
6451
|
fileMap["default.js"] = JS(trampolineTsClient);
|
|
6447
6452
|
fileMap["default.d.ts"] = TS(trampolineTsClient);
|
|
6448
|
-
|
|
6449
|
-
fileMap["wasm-
|
|
6453
|
+
const qcArtifactName = `query_compiler_${compilerBuild}_bg`;
|
|
6454
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./${qcArtifactName}.wasm')`;
|
|
6455
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./${qcArtifactName}.wasm?module')`;
|
|
6450
6456
|
pkgJson["browser"] = "default.js";
|
|
6451
6457
|
pkgJson["imports"] = {
|
|
6452
6458
|
// when `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
@@ -6552,7 +6558,8 @@ async function generateClient(options) {
|
|
|
6552
6558
|
clientVersion,
|
|
6553
6559
|
engineVersion,
|
|
6554
6560
|
activeProvider,
|
|
6555
|
-
typedSql
|
|
6561
|
+
typedSql,
|
|
6562
|
+
compilerBuild
|
|
6556
6563
|
} = options;
|
|
6557
6564
|
const { runtimeBase, outputDir } = await getGenerationDirs(options);
|
|
6558
6565
|
const { prismaClientDmmf, fileMap } = await buildClient({
|
|
@@ -6569,7 +6576,8 @@ async function generateClient(options) {
|
|
|
6569
6576
|
engineVersion,
|
|
6570
6577
|
activeProvider,
|
|
6571
6578
|
testMode,
|
|
6572
|
-
typedSql
|
|
6579
|
+
typedSql,
|
|
6580
|
+
compilerBuild
|
|
6573
6581
|
});
|
|
6574
6582
|
const provider = datasources[0].provider;
|
|
6575
6583
|
const denylistsErrors = validateDmmfAgainstDenylists(prismaClientDmmf);
|
|
@@ -6601,7 +6609,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6601
6609
|
await import_promises.default.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
|
|
6602
6610
|
if (isWasmEngineSupported(provider)) {
|
|
6603
6611
|
const suffix = provider === "postgres" ? "postgresql" : provider;
|
|
6604
|
-
const filename =
|
|
6612
|
+
const filename = `query_compiler_${compilerBuild}_bg`;
|
|
6605
6613
|
const wasmJsBundlePath = import_path.default.join(runtimeSourcePath, `${filename}.${suffix}.wasm-base64.js`);
|
|
6606
6614
|
const wasmBase64 = require(wasmJsBundlePath).wasm;
|
|
6607
6615
|
await import_promises.default.writeFile(import_path.default.join(outputDir, `${filename}.wasm`), Buffer.from(wasmBase64, "base64"));
|
|
@@ -6816,7 +6824,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
6816
6824
|
var import_internals9 = require("@prisma/internals");
|
|
6817
6825
|
|
|
6818
6826
|
// package.json
|
|
6819
|
-
var version = "7.3.0-dev.
|
|
6827
|
+
var version = "7.3.0-dev.3";
|
|
6820
6828
|
|
|
6821
6829
|
// src/resolvePrismaClient.ts
|
|
6822
6830
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
|
@@ -6892,7 +6900,8 @@ var PrismaClientJsGenerator = class {
|
|
|
6892
6900
|
engineVersion: options.version,
|
|
6893
6901
|
clientVersion: version,
|
|
6894
6902
|
activeProvider: options.datasources[0]?.activeProvider,
|
|
6895
|
-
typedSql: options.typedSql
|
|
6903
|
+
typedSql: options.typedSql,
|
|
6904
|
+
compilerBuild: parseCompilerBuildFromUnknown(options.generator.config.compilerBuild)
|
|
6896
6905
|
});
|
|
6897
6906
|
}
|
|
6898
6907
|
async #getPrismaClientPath(config) {
|
|
@@ -6910,6 +6919,15 @@ var PrismaClientJsGenerator = class {
|
|
|
6910
6919
|
return this.#runtimePath;
|
|
6911
6920
|
}
|
|
6912
6921
|
};
|
|
6922
|
+
function parseCompilerBuildFromUnknown(value) {
|
|
6923
|
+
if (value === void 0) {
|
|
6924
|
+
return "fast";
|
|
6925
|
+
}
|
|
6926
|
+
if (value === "small" || value === "fast") {
|
|
6927
|
+
return value;
|
|
6928
|
+
}
|
|
6929
|
+
throw new Error(`Invalid compiler build: ${JSON.stringify(value)}, expected one of: "fast", "small"`);
|
|
6930
|
+
}
|
|
6913
6931
|
|
|
6914
6932
|
// src/utils/types/dmmfToTypes.ts
|
|
6915
6933
|
var import_node_path3 = __toESM(require("node:path"));
|
|
@@ -6939,7 +6957,8 @@ function dmmfToTypes(dmmf) {
|
|
|
6939
6957
|
datamodel: "",
|
|
6940
6958
|
browser: false,
|
|
6941
6959
|
edge: false,
|
|
6942
|
-
wasm: false
|
|
6960
|
+
wasm: false,
|
|
6961
|
+
compilerBuild: "fast"
|
|
6943
6962
|
}).toTS();
|
|
6944
6963
|
}
|
|
6945
6964
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -2472,7 +2472,7 @@ var package_default = {
|
|
|
2472
2472
|
"@prisma/dmmf": "workspace:*",
|
|
2473
2473
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
2474
2474
|
"@prisma/engines": "workspace:*",
|
|
2475
|
-
"@prisma/engines-version": "7.
|
|
2475
|
+
"@prisma/engines-version": "7.3.0-5.76bb4681f1254d55b127394fc978e3295d676a01",
|
|
2476
2476
|
"@prisma/fetch-engine": "workspace:*",
|
|
2477
2477
|
"@prisma/generator": "workspace:*",
|
|
2478
2478
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -2482,7 +2482,7 @@ var package_default = {
|
|
|
2482
2482
|
"@prisma/internals": "workspace:*",
|
|
2483
2483
|
"@prisma/json-protocol": "workspace:*",
|
|
2484
2484
|
"@prisma/migrate": "workspace:*",
|
|
2485
|
-
"@prisma/query-compiler-wasm": "7.
|
|
2485
|
+
"@prisma/query-compiler-wasm": "7.3.0-5.76bb4681f1254d55b127394fc978e3295d676a01",
|
|
2486
2486
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2487
2487
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2488
2488
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -4552,27 +4552,30 @@ defineDmmfProperty(exports.Prisma, config.runtimeDataModel)`;
|
|
|
4552
4552
|
}
|
|
4553
4553
|
|
|
4554
4554
|
// src/utils/buildGetQueryCompilerWasmModule.ts
|
|
4555
|
-
function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeName) {
|
|
4555
|
+
function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeName, compilerBuild) {
|
|
4556
|
+
const artifactName = `query_compiler_${compilerBuild}_bg`;
|
|
4556
4557
|
if (runtimeName === "client" && !forceEdgeWasmLoader) {
|
|
4557
4558
|
return `config.compilerWasm = {
|
|
4558
|
-
getRuntime: async () => require('
|
|
4559
|
+
getRuntime: async () => require('./${artifactName}.js'),
|
|
4559
4560
|
getQueryCompilerWasmModule: async () => {
|
|
4560
4561
|
const { Buffer } = require('node:buffer')
|
|
4561
|
-
const { wasm } = require('
|
|
4562
|
+
const { wasm } = require('./${artifactName}.wasm-base64.js')
|
|
4562
4563
|
const queryCompilerWasmFileBytes = Buffer.from(wasm, 'base64')
|
|
4563
4564
|
|
|
4564
4565
|
return new WebAssembly.Module(queryCompilerWasmFileBytes)
|
|
4565
|
-
}
|
|
4566
|
+
},
|
|
4567
|
+
importName: './${artifactName}.js',
|
|
4566
4568
|
}`;
|
|
4567
4569
|
}
|
|
4568
4570
|
if (runtimeName === "client" && forceEdgeWasmLoader || runtimeName === "wasm-compiler-edge") {
|
|
4569
4571
|
return `config.compilerWasm = {
|
|
4570
|
-
getRuntime: async () => require('
|
|
4572
|
+
getRuntime: async () => require('./${artifactName}.js'),
|
|
4571
4573
|
getQueryCompilerWasmModule: async () => {
|
|
4572
4574
|
const loader = (await import('#wasm-compiler-loader')).default
|
|
4573
4575
|
const compiler = (await loader).default
|
|
4574
4576
|
return compiler
|
|
4575
|
-
}
|
|
4577
|
+
},
|
|
4578
|
+
importName: './${artifactName}.js',
|
|
4576
4579
|
}`;
|
|
4577
4580
|
}
|
|
4578
4581
|
return `config.compilerWasm = undefined`;
|
|
@@ -5793,7 +5796,7 @@ var TSClient = class {
|
|
|
5793
5796
|
dmmf;
|
|
5794
5797
|
genericsInfo;
|
|
5795
5798
|
toJS() {
|
|
5796
|
-
const { edge, wasm, generator, datamodel: inlineSchema, runtimeName, reusedJs } = this.options;
|
|
5799
|
+
const { edge, wasm, generator, datamodel: inlineSchema, runtimeName, reusedJs, compilerBuild } = this.options;
|
|
5797
5800
|
if (reusedJs) {
|
|
5798
5801
|
return `module.exports = { ...require('${reusedJs}') }`;
|
|
5799
5802
|
}
|
|
@@ -5828,7 +5831,7 @@ ${new Enum(
|
|
|
5828
5831
|
*/
|
|
5829
5832
|
const config = ${JSON.stringify(config, null, 2)}
|
|
5830
5833
|
${buildRuntimeDataModel(this.dmmf.datamodel, runtimeName)}
|
|
5831
|
-
${buildQueryCompilerWasmModule(wasm, runtimeName)}
|
|
5834
|
+
${buildQueryCompilerWasmModule(wasm, runtimeName, compilerBuild)}
|
|
5832
5835
|
${buildDebugInitialization(edge)}
|
|
5833
5836
|
const PrismaClient = getPrismaClient(config)
|
|
5834
5837
|
exports.PrismaClient = PrismaClient
|
|
@@ -6360,7 +6363,8 @@ async function buildClient({
|
|
|
6360
6363
|
engineVersion,
|
|
6361
6364
|
clientVersion,
|
|
6362
6365
|
activeProvider,
|
|
6363
|
-
typedSql
|
|
6366
|
+
typedSql,
|
|
6367
|
+
compilerBuild
|
|
6364
6368
|
}) {
|
|
6365
6369
|
const baseClientOptions = {
|
|
6366
6370
|
dmmf: getPrismaClientDMMF(dmmf),
|
|
@@ -6375,6 +6379,7 @@ async function buildClient({
|
|
|
6375
6379
|
engineVersion,
|
|
6376
6380
|
activeProvider,
|
|
6377
6381
|
datamodel,
|
|
6382
|
+
compilerBuild,
|
|
6378
6383
|
browser: false,
|
|
6379
6384
|
edge: false,
|
|
6380
6385
|
wasm: false
|
|
@@ -6437,8 +6442,9 @@ async function buildClient({
|
|
|
6437
6442
|
fileMap["client.d.ts"] = TS(defaultClient);
|
|
6438
6443
|
fileMap["default.js"] = JS(trampolineTsClient);
|
|
6439
6444
|
fileMap["default.d.ts"] = TS(trampolineTsClient);
|
|
6440
|
-
|
|
6441
|
-
fileMap["wasm-
|
|
6445
|
+
const qcArtifactName = `query_compiler_${compilerBuild}_bg`;
|
|
6446
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./${qcArtifactName}.wasm')`;
|
|
6447
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./${qcArtifactName}.wasm?module')`;
|
|
6442
6448
|
pkgJson["browser"] = "default.js";
|
|
6443
6449
|
pkgJson["imports"] = {
|
|
6444
6450
|
// when `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
@@ -6544,7 +6550,8 @@ async function generateClient(options) {
|
|
|
6544
6550
|
clientVersion,
|
|
6545
6551
|
engineVersion,
|
|
6546
6552
|
activeProvider,
|
|
6547
|
-
typedSql
|
|
6553
|
+
typedSql,
|
|
6554
|
+
compilerBuild
|
|
6548
6555
|
} = options;
|
|
6549
6556
|
const { runtimeBase, outputDir } = await getGenerationDirs(options);
|
|
6550
6557
|
const { prismaClientDmmf, fileMap } = await buildClient({
|
|
@@ -6561,7 +6568,8 @@ async function generateClient(options) {
|
|
|
6561
6568
|
engineVersion,
|
|
6562
6569
|
activeProvider,
|
|
6563
6570
|
testMode,
|
|
6564
|
-
typedSql
|
|
6571
|
+
typedSql,
|
|
6572
|
+
compilerBuild
|
|
6565
6573
|
});
|
|
6566
6574
|
const provider = datasources[0].provider;
|
|
6567
6575
|
const denylistsErrors = validateDmmfAgainstDenylists(prismaClientDmmf);
|
|
@@ -6593,7 +6601,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6593
6601
|
await fs.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
|
|
6594
6602
|
if (isWasmEngineSupported(provider)) {
|
|
6595
6603
|
const suffix = provider === "postgres" ? "postgresql" : provider;
|
|
6596
|
-
const filename =
|
|
6604
|
+
const filename = `query_compiler_${compilerBuild}_bg`;
|
|
6597
6605
|
const wasmJsBundlePath = path.join(runtimeSourcePath, `${filename}.${suffix}.wasm-base64.js`);
|
|
6598
6606
|
const wasmBase64 = __require(wasmJsBundlePath).wasm;
|
|
6599
6607
|
await fs.writeFile(path.join(outputDir, `${filename}.wasm`), Buffer.from(wasmBase64, "base64"));
|
|
@@ -6808,7 +6816,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
6808
6816
|
import { parseEnvValue } from "@prisma/internals";
|
|
6809
6817
|
|
|
6810
6818
|
// package.json
|
|
6811
|
-
var version = "7.3.0-dev.
|
|
6819
|
+
var version = "7.3.0-dev.3";
|
|
6812
6820
|
|
|
6813
6821
|
// src/resolvePrismaClient.ts
|
|
6814
6822
|
import fs2 from "node:fs/promises";
|
|
@@ -6884,7 +6892,8 @@ var PrismaClientJsGenerator = class {
|
|
|
6884
6892
|
engineVersion: options.version,
|
|
6885
6893
|
clientVersion: version,
|
|
6886
6894
|
activeProvider: options.datasources[0]?.activeProvider,
|
|
6887
|
-
typedSql: options.typedSql
|
|
6895
|
+
typedSql: options.typedSql,
|
|
6896
|
+
compilerBuild: parseCompilerBuildFromUnknown(options.generator.config.compilerBuild)
|
|
6888
6897
|
});
|
|
6889
6898
|
}
|
|
6890
6899
|
async #getPrismaClientPath(config) {
|
|
@@ -6902,6 +6911,15 @@ var PrismaClientJsGenerator = class {
|
|
|
6902
6911
|
return this.#runtimePath;
|
|
6903
6912
|
}
|
|
6904
6913
|
};
|
|
6914
|
+
function parseCompilerBuildFromUnknown(value) {
|
|
6915
|
+
if (value === void 0) {
|
|
6916
|
+
return "fast";
|
|
6917
|
+
}
|
|
6918
|
+
if (value === "small" || value === "fast") {
|
|
6919
|
+
return value;
|
|
6920
|
+
}
|
|
6921
|
+
throw new Error(`Invalid compiler build: ${JSON.stringify(value)}, expected one of: "fast", "small"`);
|
|
6922
|
+
}
|
|
6905
6923
|
|
|
6906
6924
|
// src/utils/types/dmmfToTypes.ts
|
|
6907
6925
|
import path4 from "node:path";
|
|
@@ -6931,7 +6949,8 @@ function dmmfToTypes(dmmf) {
|
|
|
6931
6949
|
datamodel: "",
|
|
6932
6950
|
browser: false,
|
|
6933
6951
|
edge: false,
|
|
6934
|
-
wasm: false
|
|
6952
|
+
wasm: false,
|
|
6953
|
+
compilerBuild: "fast"
|
|
6935
6954
|
}).toTS();
|
|
6936
6955
|
}
|
|
6937
6956
|
export {
|
|
@@ -3,4 +3,4 @@ import { TSClientOptions } from '../TSClient/TSClient';
|
|
|
3
3
|
* Builds the necessary glue code to load the query compiler wasm module.
|
|
4
4
|
* @returns
|
|
5
5
|
*/
|
|
6
|
-
export declare function buildQueryCompilerWasmModule(forceEdgeWasmLoader: boolean, runtimeName: TSClientOptions['runtimeName']
|
|
6
|
+
export declare function buildQueryCompilerWasmModule(forceEdgeWasmLoader: boolean, runtimeName: TSClientOptions['runtimeName'], compilerBuild: TSClientOptions['compilerBuild']): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-js",
|
|
3
|
-
"version": "7.3.0-dev.
|
|
3
|
+
"version": "7.3.0-dev.3",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@antfu/ni": "0.21.12",
|
|
28
|
-
"@prisma/engines-version": "7.
|
|
28
|
+
"@prisma/engines-version": "7.3.0-5.76bb4681f1254d55b127394fc978e3295d676a01",
|
|
29
29
|
"env-paths": "2.2.1",
|
|
30
30
|
"indent-string": "4.0.0",
|
|
31
31
|
"klona": "2.0.6",
|
|
32
32
|
"package-up": "5.0.0",
|
|
33
33
|
"pluralize": "8.0.0",
|
|
34
34
|
"ts-pattern": "5.6.2",
|
|
35
|
-
"@prisma/client-common": "7.3.0-dev.
|
|
36
|
-
"@prisma/debug": "7.3.0-dev.
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/internals": "7.3.0-dev.
|
|
42
|
-
"@prisma/
|
|
35
|
+
"@prisma/client-common": "7.3.0-dev.3",
|
|
36
|
+
"@prisma/debug": "7.3.0-dev.3",
|
|
37
|
+
"@prisma/dmmf": "7.3.0-dev.3",
|
|
38
|
+
"@prisma/fetch-engine": "7.3.0-dev.3",
|
|
39
|
+
"@prisma/generator": "7.3.0-dev.3",
|
|
40
|
+
"@prisma/get-platform": "7.3.0-dev.3",
|
|
41
|
+
"@prisma/internals": "7.3.0-dev.3",
|
|
42
|
+
"@prisma/ts-builders": "7.3.0-dev.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/pluralize": "0.0.33",
|