@prisma/client-generator-js 6.16.0-dev.31 → 6.16.0-dev.33
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 +53 -63
- package/dist/index.mjs +53 -63
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -4423,12 +4423,10 @@ var package_default = {
|
|
|
4423
4423
|
test: "dotenv -e ../../.db.env -- jest --silent",
|
|
4424
4424
|
"test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
|
|
4425
4425
|
"test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
|
|
4426
|
-
"test:functional:client": "pnpm run test:functional --client-runtime client --
|
|
4426
|
+
"test:functional:client": "pnpm run test:functional --client-runtime client --engine-type client --runInBand --json --outputFile tests/functional/results.json",
|
|
4427
4427
|
"test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
|
|
4428
4428
|
"test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
|
|
4429
4429
|
"test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
|
|
4430
|
-
"test:knownQueryCompilerFailures:check": "tsx helpers/functional-test/check-known-failures.ts",
|
|
4431
|
-
"test:knownQueryCompilerFailures:record": "tsx helpers/functional-test/check-known-failures.ts --record",
|
|
4432
4430
|
"test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
|
|
4433
4431
|
generate: "node scripts/postinstall.js",
|
|
4434
4432
|
postinstall: "node scripts/postinstall.js",
|
|
@@ -4493,7 +4491,7 @@ var package_default = {
|
|
|
4493
4491
|
"@prisma/dmmf": "workspace:*",
|
|
4494
4492
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
4495
4493
|
"@prisma/engines": "workspace:*",
|
|
4496
|
-
"@prisma/engines-version": "6.16.0-
|
|
4494
|
+
"@prisma/engines-version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4497
4495
|
"@prisma/fetch-engine": "workspace:*",
|
|
4498
4496
|
"@prisma/generator": "workspace:*",
|
|
4499
4497
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -4502,8 +4500,8 @@ var package_default = {
|
|
|
4502
4500
|
"@prisma/internals": "workspace:*",
|
|
4503
4501
|
"@prisma/migrate": "workspace:*",
|
|
4504
4502
|
"@prisma/mini-proxy": "0.9.5",
|
|
4505
|
-
"@prisma/query-compiler-wasm": "6.16.0-
|
|
4506
|
-
"@prisma/query-engine-wasm": "6.16.0-
|
|
4503
|
+
"@prisma/query-compiler-wasm": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4504
|
+
"@prisma/query-engine-wasm": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4507
4505
|
"@prisma/query-plan-executor": "workspace:*",
|
|
4508
4506
|
"@prisma/ts-builders": "workspace:*",
|
|
4509
4507
|
"@snaplet/copycat": "6.0.0",
|
|
@@ -7962,7 +7960,8 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
|
|
|
7962
7960
|
timeout ?= 5000
|
|
7963
7961
|
`)
|
|
7964
7962
|
);
|
|
7965
|
-
if (["library.js", "client.js"].includes(this.runtimeNameTs) &&
|
|
7963
|
+
if (["library.js", "client.js"].includes(this.runtimeNameTs) && // We don't support a custom adapter with MongoDB for now.
|
|
7964
|
+
this.internalDatasources.some((d) => d.provider !== "mongodb")) {
|
|
7966
7965
|
clientOptions.add(
|
|
7967
7966
|
ts11.property("adapter", ts11.unionType([ts11.namedType("runtime.SqlDriverAdapterFactory"), ts11.namedType("null")])).optional().setDocComment(
|
|
7968
7967
|
ts11.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
|
@@ -8689,60 +8688,54 @@ async function buildClient({
|
|
|
8689
8688
|
fileMap["react-native.js"] = JS(rnTsClient);
|
|
8690
8689
|
fileMap["react-native.d.ts"] = TS(rnTsClient);
|
|
8691
8690
|
}
|
|
8692
|
-
const usesWasmRuntime = generator.previewFeatures.includes("driverAdapters");
|
|
8693
8691
|
const usesClientEngine = clientEngineType === import_internals10.ClientEngineType.Client;
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_compiler_bg.wasm?module')`;
|
|
8700
|
-
} else {
|
|
8701
|
-
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`;
|
|
8702
|
-
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`;
|
|
8703
|
-
}
|
|
8704
|
-
pkgJson["browser"] = "default.js";
|
|
8705
|
-
pkgJson["imports"] = {
|
|
8706
|
-
// when `import('#wasm-engine-loader')` or `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
8707
|
-
[usesClientEngine ? "#wasm-compiler-loader" : "#wasm-engine-loader"]: {
|
|
8708
|
-
// Keys reference: https://runtime-keys.proposal.wintercg.org/#keys
|
|
8709
|
-
/**
|
|
8710
|
-
* Vercel Edge Functions / Next.js Middlewares
|
|
8711
|
-
*/
|
|
8712
|
-
"edge-light": "./wasm-edge-light-loader.mjs",
|
|
8713
|
-
/**
|
|
8714
|
-
* Cloudflare Workers, Cloudflare Pages
|
|
8715
|
-
*/
|
|
8716
|
-
workerd: "./wasm-worker-loader.mjs",
|
|
8717
|
-
/**
|
|
8718
|
-
* (Old) Cloudflare Workers
|
|
8719
|
-
* @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested.
|
|
8720
|
-
*/
|
|
8721
|
-
worker: "./wasm-worker-loader.mjs",
|
|
8722
|
-
/**
|
|
8723
|
-
* Fallback for every other JavaScript runtime
|
|
8724
|
-
*/
|
|
8725
|
-
default: "./wasm-worker-loader.mjs"
|
|
8726
|
-
},
|
|
8727
|
-
// when `require('#main-entry-point')` is called, it will be resolved to the correct file
|
|
8728
|
-
"#main-entry-point": exportsMapDefault
|
|
8729
|
-
};
|
|
8730
|
-
const wasmClient = new TSClient({
|
|
8731
|
-
...baseClientOptions,
|
|
8732
|
-
runtimeNameJs: usesClientEngine ? "wasm-compiler-edge" : "wasm-engine-edge",
|
|
8733
|
-
runtimeNameTs: "library.js",
|
|
8734
|
-
reusedTs: "default",
|
|
8735
|
-
edge: true,
|
|
8736
|
-
wasm: true
|
|
8737
|
-
});
|
|
8738
|
-
fileMap["wasm.js"] = JS(wasmClient);
|
|
8739
|
-
fileMap["wasm.d.ts"] = TS(wasmClient);
|
|
8692
|
+
fileMap["default.js"] = JS(trampolineTsClient);
|
|
8693
|
+
fileMap["default.d.ts"] = TS(trampolineTsClient);
|
|
8694
|
+
if (usesClientEngine) {
|
|
8695
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_compiler_bg.wasm')`;
|
|
8696
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_compiler_bg.wasm?module')`;
|
|
8740
8697
|
} else {
|
|
8741
|
-
fileMap["wasm.
|
|
8742
|
-
fileMap["wasm.
|
|
8743
|
-
}
|
|
8698
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`;
|
|
8699
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`;
|
|
8700
|
+
}
|
|
8701
|
+
pkgJson["browser"] = "default.js";
|
|
8702
|
+
pkgJson["imports"] = {
|
|
8703
|
+
// when `import('#wasm-engine-loader')` or `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
8704
|
+
[usesClientEngine ? "#wasm-compiler-loader" : "#wasm-engine-loader"]: {
|
|
8705
|
+
// Keys reference: https://runtime-keys.proposal.wintercg.org/#keys
|
|
8706
|
+
/**
|
|
8707
|
+
* Vercel Edge Functions / Next.js Middlewares
|
|
8708
|
+
*/
|
|
8709
|
+
"edge-light": "./wasm-edge-light-loader.mjs",
|
|
8710
|
+
/**
|
|
8711
|
+
* Cloudflare Workers, Cloudflare Pages
|
|
8712
|
+
*/
|
|
8713
|
+
workerd: "./wasm-worker-loader.mjs",
|
|
8714
|
+
/**
|
|
8715
|
+
* (Old) Cloudflare Workers
|
|
8716
|
+
* @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested.
|
|
8717
|
+
*/
|
|
8718
|
+
worker: "./wasm-worker-loader.mjs",
|
|
8719
|
+
/**
|
|
8720
|
+
* Fallback for every other JavaScript runtime
|
|
8721
|
+
*/
|
|
8722
|
+
default: "./wasm-worker-loader.mjs"
|
|
8723
|
+
},
|
|
8724
|
+
// when `require('#main-entry-point')` is called, it will be resolved to the correct file
|
|
8725
|
+
"#main-entry-point": exportsMapDefault
|
|
8726
|
+
};
|
|
8727
|
+
const wasmClient = new TSClient({
|
|
8728
|
+
...baseClientOptions,
|
|
8729
|
+
runtimeNameJs: usesClientEngine ? "wasm-compiler-edge" : "wasm-engine-edge",
|
|
8730
|
+
runtimeNameTs: "library.js",
|
|
8731
|
+
reusedTs: "default",
|
|
8732
|
+
edge: true,
|
|
8733
|
+
wasm: true
|
|
8734
|
+
});
|
|
8735
|
+
fileMap["wasm.js"] = JS(wasmClient);
|
|
8736
|
+
fileMap["wasm.d.ts"] = TS(wasmClient);
|
|
8744
8737
|
if (typedSql && typedSql.length > 0) {
|
|
8745
|
-
const edgeRuntimeName =
|
|
8738
|
+
const edgeRuntimeName = usesClientEngine ? "wasm-compiler-edge" : "edge";
|
|
8746
8739
|
const cjsEdgeIndex = `./sql/index.${edgeRuntimeName}.js`;
|
|
8747
8740
|
const esmEdgeIndex = `./sql/index.${edgeRuntimeName}.mjs`;
|
|
8748
8741
|
pkgJson.exports["./sql"] = {
|
|
@@ -8826,9 +8819,6 @@ async function generateClient(options) {
|
|
|
8826
8819
|
typedSql
|
|
8827
8820
|
} = options;
|
|
8828
8821
|
const clientEngineType = (0, import_internals10.getClientEngineType)(generator);
|
|
8829
|
-
if (clientEngineType === import_internals10.ClientEngineType.Client && !generator.previewFeatures.includes("queryCompiler")) {
|
|
8830
|
-
throw new Error('`engineType = "client"` requires enabling the `queryCompiler` preview feature');
|
|
8831
|
-
}
|
|
8832
8822
|
const { runtimeBase, outputDir } = await getGenerationDirs(options);
|
|
8833
8823
|
const { prismaClientDmmf, fileMap } = await buildClient({
|
|
8834
8824
|
datamodel,
|
|
@@ -8896,7 +8886,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
8896
8886
|
}
|
|
8897
8887
|
const schemaTargetPath = import_path3.default.join(outputDir, "schema.prisma");
|
|
8898
8888
|
await import_promises.default.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
|
|
8899
|
-
const runtimeNeedsWasmEngine = clientEngineType === import_internals10.ClientEngineType.Client ||
|
|
8889
|
+
const runtimeNeedsWasmEngine = clientEngineType === import_internals10.ClientEngineType.Client || copyEngine;
|
|
8900
8890
|
if (runtimeNeedsWasmEngine && isWasmEngineSupported(provider) && !testMode) {
|
|
8901
8891
|
const suffix = provider === "postgres" ? "postgresql" : provider;
|
|
8902
8892
|
const filename = clientEngineType === import_internals10.ClientEngineType.Client ? "query_compiler_bg" : "query_engine_bg";
|
|
@@ -9153,7 +9143,7 @@ var import_internals12 = require("@prisma/internals");
|
|
|
9153
9143
|
var import_ts_pattern = require("ts-pattern");
|
|
9154
9144
|
|
|
9155
9145
|
// package.json
|
|
9156
|
-
var version = "6.16.0-dev.
|
|
9146
|
+
var version = "6.16.0-dev.33";
|
|
9157
9147
|
|
|
9158
9148
|
// src/resolvePrismaClient.ts
|
|
9159
9149
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
package/dist/index.mjs
CHANGED
|
@@ -4418,12 +4418,10 @@ var package_default = {
|
|
|
4418
4418
|
test: "dotenv -e ../../.db.env -- jest --silent",
|
|
4419
4419
|
"test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
|
|
4420
4420
|
"test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
|
|
4421
|
-
"test:functional:client": "pnpm run test:functional --client-runtime client --
|
|
4421
|
+
"test:functional:client": "pnpm run test:functional --client-runtime client --engine-type client --runInBand --json --outputFile tests/functional/results.json",
|
|
4422
4422
|
"test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
|
|
4423
4423
|
"test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
|
|
4424
4424
|
"test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
|
|
4425
|
-
"test:knownQueryCompilerFailures:check": "tsx helpers/functional-test/check-known-failures.ts",
|
|
4426
|
-
"test:knownQueryCompilerFailures:record": "tsx helpers/functional-test/check-known-failures.ts --record",
|
|
4427
4425
|
"test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
|
|
4428
4426
|
generate: "node scripts/postinstall.js",
|
|
4429
4427
|
postinstall: "node scripts/postinstall.js",
|
|
@@ -4488,7 +4486,7 @@ var package_default = {
|
|
|
4488
4486
|
"@prisma/dmmf": "workspace:*",
|
|
4489
4487
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
4490
4488
|
"@prisma/engines": "workspace:*",
|
|
4491
|
-
"@prisma/engines-version": "6.16.0-
|
|
4489
|
+
"@prisma/engines-version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4492
4490
|
"@prisma/fetch-engine": "workspace:*",
|
|
4493
4491
|
"@prisma/generator": "workspace:*",
|
|
4494
4492
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -4497,8 +4495,8 @@ var package_default = {
|
|
|
4497
4495
|
"@prisma/internals": "workspace:*",
|
|
4498
4496
|
"@prisma/migrate": "workspace:*",
|
|
4499
4497
|
"@prisma/mini-proxy": "0.9.5",
|
|
4500
|
-
"@prisma/query-compiler-wasm": "6.16.0-
|
|
4501
|
-
"@prisma/query-engine-wasm": "6.16.0-
|
|
4498
|
+
"@prisma/query-compiler-wasm": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4499
|
+
"@prisma/query-engine-wasm": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
4502
4500
|
"@prisma/query-plan-executor": "workspace:*",
|
|
4503
4501
|
"@prisma/ts-builders": "workspace:*",
|
|
4504
4502
|
"@snaplet/copycat": "6.0.0",
|
|
@@ -7960,7 +7958,8 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
|
|
|
7960
7958
|
timeout ?= 5000
|
|
7961
7959
|
`)
|
|
7962
7960
|
);
|
|
7963
|
-
if (["library.js", "client.js"].includes(this.runtimeNameTs) &&
|
|
7961
|
+
if (["library.js", "client.js"].includes(this.runtimeNameTs) && // We don't support a custom adapter with MongoDB for now.
|
|
7962
|
+
this.internalDatasources.some((d) => d.provider !== "mongodb")) {
|
|
7964
7963
|
clientOptions.add(
|
|
7965
7964
|
ts11.property("adapter", ts11.unionType([ts11.namedType("runtime.SqlDriverAdapterFactory"), ts11.namedType("null")])).optional().setDocComment(
|
|
7966
7965
|
ts11.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
|
@@ -8687,60 +8686,54 @@ async function buildClient({
|
|
|
8687
8686
|
fileMap["react-native.js"] = JS(rnTsClient);
|
|
8688
8687
|
fileMap["react-native.d.ts"] = TS(rnTsClient);
|
|
8689
8688
|
}
|
|
8690
|
-
const usesWasmRuntime = generator.previewFeatures.includes("driverAdapters");
|
|
8691
8689
|
const usesClientEngine = clientEngineType === ClientEngineType3.Client;
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_compiler_bg.wasm?module')`;
|
|
8698
|
-
} else {
|
|
8699
|
-
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`;
|
|
8700
|
-
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`;
|
|
8701
|
-
}
|
|
8702
|
-
pkgJson["browser"] = "default.js";
|
|
8703
|
-
pkgJson["imports"] = {
|
|
8704
|
-
// when `import('#wasm-engine-loader')` or `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
8705
|
-
[usesClientEngine ? "#wasm-compiler-loader" : "#wasm-engine-loader"]: {
|
|
8706
|
-
// Keys reference: https://runtime-keys.proposal.wintercg.org/#keys
|
|
8707
|
-
/**
|
|
8708
|
-
* Vercel Edge Functions / Next.js Middlewares
|
|
8709
|
-
*/
|
|
8710
|
-
"edge-light": "./wasm-edge-light-loader.mjs",
|
|
8711
|
-
/**
|
|
8712
|
-
* Cloudflare Workers, Cloudflare Pages
|
|
8713
|
-
*/
|
|
8714
|
-
workerd: "./wasm-worker-loader.mjs",
|
|
8715
|
-
/**
|
|
8716
|
-
* (Old) Cloudflare Workers
|
|
8717
|
-
* @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested.
|
|
8718
|
-
*/
|
|
8719
|
-
worker: "./wasm-worker-loader.mjs",
|
|
8720
|
-
/**
|
|
8721
|
-
* Fallback for every other JavaScript runtime
|
|
8722
|
-
*/
|
|
8723
|
-
default: "./wasm-worker-loader.mjs"
|
|
8724
|
-
},
|
|
8725
|
-
// when `require('#main-entry-point')` is called, it will be resolved to the correct file
|
|
8726
|
-
"#main-entry-point": exportsMapDefault
|
|
8727
|
-
};
|
|
8728
|
-
const wasmClient = new TSClient({
|
|
8729
|
-
...baseClientOptions,
|
|
8730
|
-
runtimeNameJs: usesClientEngine ? "wasm-compiler-edge" : "wasm-engine-edge",
|
|
8731
|
-
runtimeNameTs: "library.js",
|
|
8732
|
-
reusedTs: "default",
|
|
8733
|
-
edge: true,
|
|
8734
|
-
wasm: true
|
|
8735
|
-
});
|
|
8736
|
-
fileMap["wasm.js"] = JS(wasmClient);
|
|
8737
|
-
fileMap["wasm.d.ts"] = TS(wasmClient);
|
|
8690
|
+
fileMap["default.js"] = JS(trampolineTsClient);
|
|
8691
|
+
fileMap["default.d.ts"] = TS(trampolineTsClient);
|
|
8692
|
+
if (usesClientEngine) {
|
|
8693
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_compiler_bg.wasm')`;
|
|
8694
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_compiler_bg.wasm?module')`;
|
|
8738
8695
|
} else {
|
|
8739
|
-
fileMap["wasm.
|
|
8740
|
-
fileMap["wasm.
|
|
8741
|
-
}
|
|
8696
|
+
fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`;
|
|
8697
|
+
fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`;
|
|
8698
|
+
}
|
|
8699
|
+
pkgJson["browser"] = "default.js";
|
|
8700
|
+
pkgJson["imports"] = {
|
|
8701
|
+
// when `import('#wasm-engine-loader')` or `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
|
|
8702
|
+
[usesClientEngine ? "#wasm-compiler-loader" : "#wasm-engine-loader"]: {
|
|
8703
|
+
// Keys reference: https://runtime-keys.proposal.wintercg.org/#keys
|
|
8704
|
+
/**
|
|
8705
|
+
* Vercel Edge Functions / Next.js Middlewares
|
|
8706
|
+
*/
|
|
8707
|
+
"edge-light": "./wasm-edge-light-loader.mjs",
|
|
8708
|
+
/**
|
|
8709
|
+
* Cloudflare Workers, Cloudflare Pages
|
|
8710
|
+
*/
|
|
8711
|
+
workerd: "./wasm-worker-loader.mjs",
|
|
8712
|
+
/**
|
|
8713
|
+
* (Old) Cloudflare Workers
|
|
8714
|
+
* @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested.
|
|
8715
|
+
*/
|
|
8716
|
+
worker: "./wasm-worker-loader.mjs",
|
|
8717
|
+
/**
|
|
8718
|
+
* Fallback for every other JavaScript runtime
|
|
8719
|
+
*/
|
|
8720
|
+
default: "./wasm-worker-loader.mjs"
|
|
8721
|
+
},
|
|
8722
|
+
// when `require('#main-entry-point')` is called, it will be resolved to the correct file
|
|
8723
|
+
"#main-entry-point": exportsMapDefault
|
|
8724
|
+
};
|
|
8725
|
+
const wasmClient = new TSClient({
|
|
8726
|
+
...baseClientOptions,
|
|
8727
|
+
runtimeNameJs: usesClientEngine ? "wasm-compiler-edge" : "wasm-engine-edge",
|
|
8728
|
+
runtimeNameTs: "library.js",
|
|
8729
|
+
reusedTs: "default",
|
|
8730
|
+
edge: true,
|
|
8731
|
+
wasm: true
|
|
8732
|
+
});
|
|
8733
|
+
fileMap["wasm.js"] = JS(wasmClient);
|
|
8734
|
+
fileMap["wasm.d.ts"] = TS(wasmClient);
|
|
8742
8735
|
if (typedSql && typedSql.length > 0) {
|
|
8743
|
-
const edgeRuntimeName =
|
|
8736
|
+
const edgeRuntimeName = usesClientEngine ? "wasm-compiler-edge" : "edge";
|
|
8744
8737
|
const cjsEdgeIndex = `./sql/index.${edgeRuntimeName}.js`;
|
|
8745
8738
|
const esmEdgeIndex = `./sql/index.${edgeRuntimeName}.mjs`;
|
|
8746
8739
|
pkgJson.exports["./sql"] = {
|
|
@@ -8824,9 +8817,6 @@ async function generateClient(options) {
|
|
|
8824
8817
|
typedSql
|
|
8825
8818
|
} = options;
|
|
8826
8819
|
const clientEngineType = getClientEngineType2(generator);
|
|
8827
|
-
if (clientEngineType === ClientEngineType3.Client && !generator.previewFeatures.includes("queryCompiler")) {
|
|
8828
|
-
throw new Error('`engineType = "client"` requires enabling the `queryCompiler` preview feature');
|
|
8829
|
-
}
|
|
8830
8820
|
const { runtimeBase, outputDir } = await getGenerationDirs(options);
|
|
8831
8821
|
const { prismaClientDmmf, fileMap } = await buildClient({
|
|
8832
8822
|
datamodel,
|
|
@@ -8894,7 +8884,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
8894
8884
|
}
|
|
8895
8885
|
const schemaTargetPath = path3.join(outputDir, "schema.prisma");
|
|
8896
8886
|
await fs.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
|
|
8897
|
-
const runtimeNeedsWasmEngine = clientEngineType === ClientEngineType3.Client ||
|
|
8887
|
+
const runtimeNeedsWasmEngine = clientEngineType === ClientEngineType3.Client || copyEngine;
|
|
8898
8888
|
if (runtimeNeedsWasmEngine && isWasmEngineSupported(provider) && !testMode) {
|
|
8899
8889
|
const suffix = provider === "postgres" ? "postgresql" : provider;
|
|
8900
8890
|
const filename = clientEngineType === ClientEngineType3.Client ? "query_compiler_bg" : "query_engine_bg";
|
|
@@ -9151,7 +9141,7 @@ import { ClientEngineType as ClientEngineType4, getClientEngineType as getClient
|
|
|
9151
9141
|
import { match } from "ts-pattern";
|
|
9152
9142
|
|
|
9153
9143
|
// package.json
|
|
9154
|
-
var version = "6.16.0-dev.
|
|
9144
|
+
var version = "6.16.0-dev.33";
|
|
9155
9145
|
|
|
9156
9146
|
// src/resolvePrismaClient.ts
|
|
9157
9147
|
var import_execa = __toESM(require_execa());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-js",
|
|
3
|
-
"version": "6.16.0-dev.
|
|
3
|
+
"version": "6.16.0-dev.33",
|
|
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,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@antfu/ni": "0.21.12",
|
|
28
|
-
"@prisma/engines-version": "6.16.0-
|
|
28
|
+
"@prisma/engines-version": "6.16.0-7.1c57fdcd7e44b29b9313256c76699e91c3ac3c43",
|
|
29
29
|
"ci-info": "4.2.0",
|
|
30
30
|
"env-paths": "2.2.1",
|
|
31
31
|
"indent-string": "4.0.0",
|
|
@@ -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.16.0-dev.
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/fetch-engine": "6.16.0-dev.
|
|
39
|
-
"@prisma/generator": "6.16.0-dev.
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/
|
|
36
|
+
"@prisma/client-common": "6.16.0-dev.33",
|
|
37
|
+
"@prisma/dmmf": "6.16.0-dev.33",
|
|
38
|
+
"@prisma/fetch-engine": "6.16.0-dev.33",
|
|
39
|
+
"@prisma/generator": "6.16.0-dev.33",
|
|
40
|
+
"@prisma/get-platform": "6.16.0-dev.33",
|
|
41
|
+
"@prisma/internals": "6.16.0-dev.33",
|
|
42
|
+
"@prisma/ts-builders": "6.16.0-dev.33",
|
|
43
|
+
"@prisma/debug": "6.16.0-dev.33"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/pluralize": "0.0.33",
|