@prisma/client-generator-ts 6.19.0-integration-next.6 → 6.19.0-integration-feat-remove-binary-engine.1
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 +5 -18
- package/dist/index.mjs +5 -18
- 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 = '
|
|
6
|
+
export type RuntimeName = 'library' | 'wasm-compiler-edge' | '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
|
@@ -3766,13 +3766,6 @@ function runCommandRawDefinition(context) {
|
|
|
3766
3766
|
`);
|
|
3767
3767
|
return ts5.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
3768
3768
|
}
|
|
3769
|
-
function eventRegistrationMethodDeclaration(runtimeName) {
|
|
3770
|
-
if (runtimeName === "binary") {
|
|
3771
|
-
return `$on<V extends (LogOpts | 'beforeExit')>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => runtime.Types.Utils.JsPromise<void> : Prisma.LogEvent) => void): PrismaClient;`;
|
|
3772
|
-
} else {
|
|
3773
|
-
return `$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;`;
|
|
3774
|
-
}
|
|
3775
|
-
}
|
|
3776
3769
|
function getPrismaClientClassDocComment({ dmmf }) {
|
|
3777
3770
|
let example;
|
|
3778
3771
|
if (dmmf.mappings.modelOperations.length) {
|
|
@@ -3828,7 +3821,7 @@ export interface PrismaClient<
|
|
|
3828
3821
|
> {
|
|
3829
3822
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
3830
3823
|
|
|
3831
|
-
$
|
|
3824
|
+
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
3832
3825
|
|
|
3833
3826
|
/**
|
|
3834
3827
|
* Connect with the database
|
|
@@ -3978,9 +3971,6 @@ function getQueryEngineFilename(engineType, binaryTarget) {
|
|
|
3978
3971
|
if (engineType === import_internals5.ClientEngineType.Library) {
|
|
3979
3972
|
return (0, import_get_platform.getNodeAPIName)(binaryTarget, "fs");
|
|
3980
3973
|
}
|
|
3981
|
-
if (engineType === import_internals5.ClientEngineType.Binary) {
|
|
3982
|
-
return `query-engine-${binaryTarget}`;
|
|
3983
|
-
}
|
|
3984
3974
|
return void 0;
|
|
3985
3975
|
}
|
|
3986
3976
|
function buildNFTAnnotation(fileName, relativeOutdir) {
|
|
@@ -4027,7 +4017,7 @@ function createClientFile(context, options) {
|
|
|
4027
4017
|
)
|
|
4028
4018
|
)
|
|
4029
4019
|
].map((e) => ts7.stringify(e));
|
|
4030
|
-
const binaryTargets = clientEngineType === import_internals6.ClientEngineType.Library ? Object.keys(options.binaryPaths.libqueryEngine ?? {}) :
|
|
4020
|
+
const binaryTargets = clientEngineType === import_internals6.ClientEngineType.Library ? Object.keys(options.binaryPaths.libqueryEngine ?? {}) : [];
|
|
4031
4021
|
const relativeOutdir = import_node_path3.default.relative(process.cwd(), options.outputDir);
|
|
4032
4022
|
return `${jsDocHeader3}
|
|
4033
4023
|
${buildPreamble(options.edge, options.moduleFormat)}
|
|
@@ -6424,7 +6414,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6424
6414
|
await deleteOutputDir(outputDir);
|
|
6425
6415
|
await (0, import_fs_extra.ensureDir)(outputDir);
|
|
6426
6416
|
await writeFileMap(outputDir, fileMap);
|
|
6427
|
-
const enginePath = clientEngineType === import_internals10.ClientEngineType.Library ? binaryPaths.libqueryEngine :
|
|
6417
|
+
const enginePath = clientEngineType === import_internals10.ClientEngineType.Library ? binaryPaths.libqueryEngine : void 0;
|
|
6428
6418
|
if (enginePath) {
|
|
6429
6419
|
if (process.env.NETLIFY) {
|
|
6430
6420
|
await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines");
|
|
@@ -6556,9 +6546,6 @@ function getRuntimeNameForTarget(target, engineType) {
|
|
|
6556
6546
|
}
|
|
6557
6547
|
}
|
|
6558
6548
|
function getNodeRuntimeName(engineType) {
|
|
6559
|
-
if (engineType === import_internals10.ClientEngineType.Binary) {
|
|
6560
|
-
return "binary";
|
|
6561
|
-
}
|
|
6562
6549
|
if (engineType === import_internals10.ClientEngineType.Library) {
|
|
6563
6550
|
return "library";
|
|
6564
6551
|
}
|
|
@@ -6608,7 +6595,7 @@ var import_get_tsconfig = require("get-tsconfig");
|
|
|
6608
6595
|
var import_ts_pattern2 = require("ts-pattern");
|
|
6609
6596
|
|
|
6610
6597
|
// package.json
|
|
6611
|
-
var version = "6.19.0-integration-
|
|
6598
|
+
var version = "6.19.0-integration-feat-remove-binary-engine.1";
|
|
6612
6599
|
|
|
6613
6600
|
// src/module-format.ts
|
|
6614
6601
|
function parseModuleFormat(format) {
|
|
@@ -6698,7 +6685,7 @@ function getOutputPath(config) {
|
|
|
6698
6685
|
var PrismaClientTsGenerator = class {
|
|
6699
6686
|
name = "prisma-client-ts";
|
|
6700
6687
|
getManifest(config) {
|
|
6701
|
-
const requiresEngines = (0, import_ts_pattern2.match)((0, import_internals11.getClientEngineType)(config)).with(import_internals11.ClientEngineType.Library, () => ["libqueryEngine"]).with(import_internals11.ClientEngineType.
|
|
6688
|
+
const requiresEngines = (0, import_ts_pattern2.match)((0, import_internals11.getClientEngineType)(config)).with(import_internals11.ClientEngineType.Library, () => ["libqueryEngine"]).with(import_internals11.ClientEngineType.Client, () => []).exhaustive();
|
|
6702
6689
|
debug2("requiresEngines", requiresEngines);
|
|
6703
6690
|
return Promise.resolve({
|
|
6704
6691
|
defaultOutput: getOutputPath(config),
|
package/dist/index.mjs
CHANGED
|
@@ -3765,13 +3765,6 @@ function runCommandRawDefinition(context) {
|
|
|
3765
3765
|
`);
|
|
3766
3766
|
return ts5.stringify(method3, { indentLevel: 1, newLine: "leading" });
|
|
3767
3767
|
}
|
|
3768
|
-
function eventRegistrationMethodDeclaration(runtimeName) {
|
|
3769
|
-
if (runtimeName === "binary") {
|
|
3770
|
-
return `$on<V extends (LogOpts | 'beforeExit')>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => runtime.Types.Utils.JsPromise<void> : Prisma.LogEvent) => void): PrismaClient;`;
|
|
3771
|
-
} else {
|
|
3772
|
-
return `$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;`;
|
|
3773
|
-
}
|
|
3774
|
-
}
|
|
3775
3768
|
function getPrismaClientClassDocComment({ dmmf }) {
|
|
3776
3769
|
let example;
|
|
3777
3770
|
if (dmmf.mappings.modelOperations.length) {
|
|
@@ -3827,7 +3820,7 @@ export interface PrismaClient<
|
|
|
3827
3820
|
> {
|
|
3828
3821
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
3829
3822
|
|
|
3830
|
-
$
|
|
3823
|
+
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
3831
3824
|
|
|
3832
3825
|
/**
|
|
3833
3826
|
* Connect with the database
|
|
@@ -3977,9 +3970,6 @@ function getQueryEngineFilename(engineType, binaryTarget) {
|
|
|
3977
3970
|
if (engineType === ClientEngineType.Library) {
|
|
3978
3971
|
return getNodeAPIName(binaryTarget, "fs");
|
|
3979
3972
|
}
|
|
3980
|
-
if (engineType === ClientEngineType.Binary) {
|
|
3981
|
-
return `query-engine-${binaryTarget}`;
|
|
3982
|
-
}
|
|
3983
3973
|
return void 0;
|
|
3984
3974
|
}
|
|
3985
3975
|
function buildNFTAnnotation(fileName, relativeOutdir) {
|
|
@@ -4026,7 +4016,7 @@ function createClientFile(context, options) {
|
|
|
4026
4016
|
)
|
|
4027
4017
|
)
|
|
4028
4018
|
].map((e) => ts7.stringify(e));
|
|
4029
|
-
const binaryTargets = clientEngineType === ClientEngineType2.Library ? Object.keys(options.binaryPaths.libqueryEngine ?? {}) :
|
|
4019
|
+
const binaryTargets = clientEngineType === ClientEngineType2.Library ? Object.keys(options.binaryPaths.libqueryEngine ?? {}) : [];
|
|
4030
4020
|
const relativeOutdir = path4.relative(process.cwd(), options.outputDir);
|
|
4031
4021
|
return `${jsDocHeader3}
|
|
4032
4022
|
${buildPreamble(options.edge, options.moduleFormat)}
|
|
@@ -6423,7 +6413,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6423
6413
|
await deleteOutputDir(outputDir);
|
|
6424
6414
|
await (0, import_fs_extra.ensureDir)(outputDir);
|
|
6425
6415
|
await writeFileMap(outputDir, fileMap);
|
|
6426
|
-
const enginePath = clientEngineType === ClientEngineType3.Library ? binaryPaths.libqueryEngine :
|
|
6416
|
+
const enginePath = clientEngineType === ClientEngineType3.Library ? binaryPaths.libqueryEngine : void 0;
|
|
6427
6417
|
if (enginePath) {
|
|
6428
6418
|
if (process.env.NETLIFY) {
|
|
6429
6419
|
await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines");
|
|
@@ -6555,9 +6545,6 @@ function getRuntimeNameForTarget(target, engineType) {
|
|
|
6555
6545
|
}
|
|
6556
6546
|
}
|
|
6557
6547
|
function getNodeRuntimeName(engineType) {
|
|
6558
|
-
if (engineType === ClientEngineType3.Binary) {
|
|
6559
|
-
return "binary";
|
|
6560
|
-
}
|
|
6561
6548
|
if (engineType === ClientEngineType3.Library) {
|
|
6562
6549
|
return "library";
|
|
6563
6550
|
}
|
|
@@ -6607,7 +6594,7 @@ import { getTsconfig } from "get-tsconfig";
|
|
|
6607
6594
|
import { match as match2 } from "ts-pattern";
|
|
6608
6595
|
|
|
6609
6596
|
// package.json
|
|
6610
|
-
var version = "6.19.0-integration-
|
|
6597
|
+
var version = "6.19.0-integration-feat-remove-binary-engine.1";
|
|
6611
6598
|
|
|
6612
6599
|
// src/module-format.ts
|
|
6613
6600
|
function parseModuleFormat(format) {
|
|
@@ -6697,7 +6684,7 @@ function getOutputPath(config) {
|
|
|
6697
6684
|
var PrismaClientTsGenerator = class {
|
|
6698
6685
|
name = "prisma-client-ts";
|
|
6699
6686
|
getManifest(config) {
|
|
6700
|
-
const requiresEngines = match2(getClientEngineType5(config)).with(ClientEngineType4.Library, () => ["libqueryEngine"]).with(ClientEngineType4.
|
|
6687
|
+
const requiresEngines = match2(getClientEngineType5(config)).with(ClientEngineType4.Library, () => ["libqueryEngine"]).with(ClientEngineType4.Client, () => []).exhaustive();
|
|
6701
6688
|
debug2("requiresEngines", requiresEngines);
|
|
6702
6689
|
return Promise.resolve({
|
|
6703
6690
|
defaultOutput: getOutputPath(config),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-ts",
|
|
3
|
-
"version": "6.19.0-integration-
|
|
3
|
+
"version": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
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/client-common": "6.19.0-integration-
|
|
38
|
-
"@prisma/dmmf": "6.19.0-integration-
|
|
39
|
-
"@prisma/debug": "6.19.0-integration-
|
|
40
|
-
"@prisma/fetch-engine": "6.19.0-integration-
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/internals": "6.19.0-integration-
|
|
44
|
-
"@prisma/ts-builders": "6.19.0-integration-
|
|
37
|
+
"@prisma/client-common": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
38
|
+
"@prisma/dmmf": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
39
|
+
"@prisma/debug": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
40
|
+
"@prisma/fetch-engine": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
41
|
+
"@prisma/generator": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
42
|
+
"@prisma/get-platform": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
43
|
+
"@prisma/internals": "6.19.0-integration-feat-remove-binary-engine.1",
|
|
44
|
+
"@prisma/ts-builders": "6.19.0-integration-feat-remove-binary-engine.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/pluralize": "0.0.33",
|