@prisma/client-generator-js 7.10.0-dev.5 → 7.10.0-dev.58
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/generator.d.ts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -10
- package/dist/index.mjs +12 -10
- package/dist/resolvePrismaClient.d.ts +1 -1
- package/package.json +12 -12
package/dist/generator.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Generator, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator';
|
|
2
2
|
type PrismaClientJsGeneratorOptions = {
|
|
3
|
+
cliCommand: string;
|
|
3
4
|
shouldResolvePrismaClient?: boolean;
|
|
4
5
|
shouldInstallMissingPackages?: boolean;
|
|
5
6
|
runtimePath?: string;
|
|
@@ -7,7 +8,7 @@ type PrismaClientJsGeneratorOptions = {
|
|
|
7
8
|
export declare class PrismaClientJsGenerator implements Generator {
|
|
8
9
|
#private;
|
|
9
10
|
readonly name: "prisma-client-js";
|
|
10
|
-
constructor({ shouldResolvePrismaClient, runtimePath }
|
|
11
|
+
constructor({ cliCommand, shouldResolvePrismaClient, runtimePath }: PrismaClientJsGeneratorOptions);
|
|
11
12
|
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
12
13
|
generate(options: GeneratorOptions): Promise<void>;
|
|
13
14
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -43,12 +43,13 @@ export { getDMMF }
|
|
|
43
43
|
export declare class PrismaClientJsGenerator implements Generator_2 {
|
|
44
44
|
#private;
|
|
45
45
|
readonly name: "prisma-client-js";
|
|
46
|
-
constructor({ shouldResolvePrismaClient, runtimePath }
|
|
46
|
+
constructor({ cliCommand, shouldResolvePrismaClient, runtimePath }: PrismaClientJsGeneratorOptions);
|
|
47
47
|
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
48
48
|
generate(options: GeneratorOptions): Promise<void>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
declare type PrismaClientJsGeneratorOptions = {
|
|
52
|
+
cliCommand: string;
|
|
52
53
|
shouldResolvePrismaClient?: boolean;
|
|
53
54
|
shouldInstallMissingPackages?: boolean;
|
|
54
55
|
runtimePath?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -43,12 +43,13 @@ export { getDMMF }
|
|
|
43
43
|
export declare class PrismaClientJsGenerator implements Generator_2 {
|
|
44
44
|
#private;
|
|
45
45
|
readonly name: "prisma-client-js";
|
|
46
|
-
constructor({ shouldResolvePrismaClient, runtimePath }
|
|
46
|
+
constructor({ cliCommand, shouldResolvePrismaClient, runtimePath }: PrismaClientJsGeneratorOptions);
|
|
47
47
|
getManifest(config: GeneratorConfig): Promise<GeneratorManifest>;
|
|
48
48
|
generate(options: GeneratorOptions): Promise<void>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
declare type PrismaClientJsGeneratorOptions = {
|
|
52
|
+
cliCommand: string;
|
|
52
53
|
shouldResolvePrismaClient?: boolean;
|
|
53
54
|
shouldInstallMissingPackages?: boolean;
|
|
54
55
|
runtimePath?: string;
|
package/dist/index.js
CHANGED
|
@@ -2429,7 +2429,7 @@ var package_default = {
|
|
|
2429
2429
|
"@prisma/dmmf": "workspace:*",
|
|
2430
2430
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
2431
2431
|
"@prisma/engines": "workspace:*",
|
|
2432
|
-
"@prisma/engines-version": "7.
|
|
2432
|
+
"@prisma/engines-version": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
2433
2433
|
"@prisma/fetch-engine": "workspace:*",
|
|
2434
2434
|
"@prisma/generator": "workspace:*",
|
|
2435
2435
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -2441,7 +2441,7 @@ var package_default = {
|
|
|
2441
2441
|
"@prisma/migrate": "workspace:*",
|
|
2442
2442
|
"@prisma/param-graph": "workspace:*",
|
|
2443
2443
|
"@prisma/param-graph-builder": "workspace:*",
|
|
2444
|
-
"@prisma/query-compiler-wasm": "7.
|
|
2444
|
+
"@prisma/query-compiler-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
2445
2445
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2446
2446
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2447
2447
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -2469,7 +2469,7 @@ var package_default = {
|
|
|
2469
2469
|
"indent-string": "4.0.0",
|
|
2470
2470
|
jest: "29.7.0",
|
|
2471
2471
|
"jest-extended": "4.0.2",
|
|
2472
|
-
"jest-junit": "
|
|
2472
|
+
"jest-junit": "17.0.0",
|
|
2473
2473
|
"jest-serializer-ansi-escapes": "4.0.0",
|
|
2474
2474
|
"jest-snapshot": "29.7.0",
|
|
2475
2475
|
"js-levenshtein": "1.1.6",
|
|
@@ -2489,7 +2489,7 @@ var package_default = {
|
|
|
2489
2489
|
"strip-ansi": "7.1.0",
|
|
2490
2490
|
"strip-indent": "4.0.0",
|
|
2491
2491
|
tempy: "3.0.0",
|
|
2492
|
-
"ts-pattern": "5.
|
|
2492
|
+
"ts-pattern": "5.9.0",
|
|
2493
2493
|
tsd: "0.31.2",
|
|
2494
2494
|
typescript: "5.4.5",
|
|
2495
2495
|
undici: "7.4.0",
|
|
@@ -6311,7 +6311,7 @@ function buildTypedSql({
|
|
|
6311
6311
|
|
|
6312
6312
|
// src/utils/addPreamble.ts
|
|
6313
6313
|
var generatedCodePreamble = `
|
|
6314
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
6314
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6315
6315
|
/* eslint-disable */
|
|
6316
6316
|
// biome-ignore-all lint: generated file
|
|
6317
6317
|
`;
|
|
@@ -6802,7 +6802,7 @@ var import_engines_version = require("@prisma/engines-version");
|
|
|
6802
6802
|
var import_internals9 = require("@prisma/internals");
|
|
6803
6803
|
|
|
6804
6804
|
// package.json
|
|
6805
|
-
var version = "7.10.0-dev.
|
|
6805
|
+
var version = "7.10.0-dev.58";
|
|
6806
6806
|
|
|
6807
6807
|
// src/resolvePrismaClient.ts
|
|
6808
6808
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
|
@@ -6811,7 +6811,7 @@ var import_ni = require("@antfu/ni");
|
|
|
6811
6811
|
var import_debug = require("@prisma/debug");
|
|
6812
6812
|
var import_internals8 = require("@prisma/internals");
|
|
6813
6813
|
var debug = (0, import_debug.Debug)("prisma:generator");
|
|
6814
|
-
async function resolvePrismaClient(baseDir) {
|
|
6814
|
+
async function resolvePrismaClient(baseDir, cliCommand) {
|
|
6815
6815
|
const prismaClientDir = await findPrismaClientDir(baseDir);
|
|
6816
6816
|
debug("baseDir", baseDir);
|
|
6817
6817
|
if (!prismaClientDir) {
|
|
@@ -6819,7 +6819,7 @@ async function resolvePrismaClient(baseDir) {
|
|
|
6819
6819
|
`Could not resolve @prisma/client.
|
|
6820
6820
|
Please try to install it with ${bold(
|
|
6821
6821
|
green(await getPackageCmd(baseDir, "install", "@prisma/client"))
|
|
6822
|
-
)} and rerun ${bold(await getPackageCmd(baseDir, "execute",
|
|
6822
|
+
)} and rerun ${bold(await getPackageCmd(baseDir, "execute", `${cliCommand} generate`))} \u{1F64F}.`
|
|
6823
6823
|
);
|
|
6824
6824
|
}
|
|
6825
6825
|
return prismaClientDir;
|
|
@@ -6845,10 +6845,12 @@ async function getPackageCmd(cwd, cmd, ...args) {
|
|
|
6845
6845
|
// src/generator.ts
|
|
6846
6846
|
var PrismaClientJsGenerator = class {
|
|
6847
6847
|
name = import_internals9.BuiltInProvider.PrismaClientJs;
|
|
6848
|
+
#cliCommand;
|
|
6848
6849
|
#shouldResolvePrismaClient;
|
|
6849
6850
|
#runtimePath;
|
|
6850
6851
|
#cachedPrismaClientPath;
|
|
6851
|
-
constructor({ shouldResolvePrismaClient = true, runtimePath }
|
|
6852
|
+
constructor({ cliCommand, shouldResolvePrismaClient = true, runtimePath }) {
|
|
6853
|
+
this.#cliCommand = cliCommand;
|
|
6852
6854
|
this.#shouldResolvePrismaClient = shouldResolvePrismaClient;
|
|
6853
6855
|
this.#runtimePath = runtimePath;
|
|
6854
6856
|
}
|
|
@@ -6886,7 +6888,7 @@ var PrismaClientJsGenerator = class {
|
|
|
6886
6888
|
if (this.#cachedPrismaClientPath) {
|
|
6887
6889
|
return this.#cachedPrismaClientPath;
|
|
6888
6890
|
}
|
|
6889
|
-
this.#cachedPrismaClientPath = await resolvePrismaClient(import_node_path2.default.dirname(config.sourceFilePath));
|
|
6891
|
+
this.#cachedPrismaClientPath = await resolvePrismaClient(import_node_path2.default.dirname(config.sourceFilePath), this.#cliCommand);
|
|
6890
6892
|
return this.#cachedPrismaClientPath;
|
|
6891
6893
|
}
|
|
6892
6894
|
async #getRuntimePath(config) {
|
package/dist/index.mjs
CHANGED
|
@@ -2419,7 +2419,7 @@ var package_default = {
|
|
|
2419
2419
|
"@prisma/dmmf": "workspace:*",
|
|
2420
2420
|
"@prisma/driver-adapter-utils": "workspace:*",
|
|
2421
2421
|
"@prisma/engines": "workspace:*",
|
|
2422
|
-
"@prisma/engines-version": "7.
|
|
2422
|
+
"@prisma/engines-version": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
2423
2423
|
"@prisma/fetch-engine": "workspace:*",
|
|
2424
2424
|
"@prisma/generator": "workspace:*",
|
|
2425
2425
|
"@prisma/generator-helper": "workspace:*",
|
|
@@ -2431,7 +2431,7 @@ var package_default = {
|
|
|
2431
2431
|
"@prisma/migrate": "workspace:*",
|
|
2432
2432
|
"@prisma/param-graph": "workspace:*",
|
|
2433
2433
|
"@prisma/param-graph-builder": "workspace:*",
|
|
2434
|
-
"@prisma/query-compiler-wasm": "7.
|
|
2434
|
+
"@prisma/query-compiler-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
2435
2435
|
"@prisma/query-plan-executor": "workspace:*",
|
|
2436
2436
|
"@prisma/sqlcommenter": "workspace:*",
|
|
2437
2437
|
"@prisma/sqlcommenter-trace-context": "workspace:*",
|
|
@@ -2459,7 +2459,7 @@ var package_default = {
|
|
|
2459
2459
|
"indent-string": "4.0.0",
|
|
2460
2460
|
jest: "29.7.0",
|
|
2461
2461
|
"jest-extended": "4.0.2",
|
|
2462
|
-
"jest-junit": "
|
|
2462
|
+
"jest-junit": "17.0.0",
|
|
2463
2463
|
"jest-serializer-ansi-escapes": "4.0.0",
|
|
2464
2464
|
"jest-snapshot": "29.7.0",
|
|
2465
2465
|
"js-levenshtein": "1.1.6",
|
|
@@ -2479,7 +2479,7 @@ var package_default = {
|
|
|
2479
2479
|
"strip-ansi": "7.1.0",
|
|
2480
2480
|
"strip-indent": "4.0.0",
|
|
2481
2481
|
tempy: "3.0.0",
|
|
2482
|
-
"ts-pattern": "5.
|
|
2482
|
+
"ts-pattern": "5.9.0",
|
|
2483
2483
|
tsd: "0.31.2",
|
|
2484
2484
|
typescript: "5.4.5",
|
|
2485
2485
|
undici: "7.4.0",
|
|
@@ -6304,7 +6304,7 @@ function buildTypedSql({
|
|
|
6304
6304
|
|
|
6305
6305
|
// src/utils/addPreamble.ts
|
|
6306
6306
|
var generatedCodePreamble = `
|
|
6307
|
-
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
6307
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
6308
6308
|
/* eslint-disable */
|
|
6309
6309
|
// biome-ignore-all lint: generated file
|
|
6310
6310
|
`;
|
|
@@ -6795,7 +6795,7 @@ import { enginesVersion } from "@prisma/engines-version";
|
|
|
6795
6795
|
import { BuiltInProvider, parseEnvValue } from "@prisma/internals";
|
|
6796
6796
|
|
|
6797
6797
|
// package.json
|
|
6798
|
-
var version = "7.10.0-dev.
|
|
6798
|
+
var version = "7.10.0-dev.58";
|
|
6799
6799
|
|
|
6800
6800
|
// src/resolvePrismaClient.ts
|
|
6801
6801
|
import fs2 from "node:fs/promises";
|
|
@@ -6804,7 +6804,7 @@ import { detect, getCommand } from "@antfu/ni";
|
|
|
6804
6804
|
import { Debug } from "@prisma/debug";
|
|
6805
6805
|
import { resolvePkg } from "@prisma/internals";
|
|
6806
6806
|
var debug = Debug("prisma:generator");
|
|
6807
|
-
async function resolvePrismaClient(baseDir) {
|
|
6807
|
+
async function resolvePrismaClient(baseDir, cliCommand) {
|
|
6808
6808
|
const prismaClientDir = await findPrismaClientDir(baseDir);
|
|
6809
6809
|
debug("baseDir", baseDir);
|
|
6810
6810
|
if (!prismaClientDir) {
|
|
@@ -6812,7 +6812,7 @@ async function resolvePrismaClient(baseDir) {
|
|
|
6812
6812
|
`Could not resolve @prisma/client.
|
|
6813
6813
|
Please try to install it with ${bold(
|
|
6814
6814
|
green(await getPackageCmd(baseDir, "install", "@prisma/client"))
|
|
6815
|
-
)} and rerun ${bold(await getPackageCmd(baseDir, "execute",
|
|
6815
|
+
)} and rerun ${bold(await getPackageCmd(baseDir, "execute", `${cliCommand} generate`))} \u{1F64F}.`
|
|
6816
6816
|
);
|
|
6817
6817
|
}
|
|
6818
6818
|
return prismaClientDir;
|
|
@@ -6838,10 +6838,12 @@ async function getPackageCmd(cwd, cmd, ...args) {
|
|
|
6838
6838
|
// src/generator.ts
|
|
6839
6839
|
var PrismaClientJsGenerator = class {
|
|
6840
6840
|
name = BuiltInProvider.PrismaClientJs;
|
|
6841
|
+
#cliCommand;
|
|
6841
6842
|
#shouldResolvePrismaClient;
|
|
6842
6843
|
#runtimePath;
|
|
6843
6844
|
#cachedPrismaClientPath;
|
|
6844
|
-
constructor({ shouldResolvePrismaClient = true, runtimePath }
|
|
6845
|
+
constructor({ cliCommand, shouldResolvePrismaClient = true, runtimePath }) {
|
|
6846
|
+
this.#cliCommand = cliCommand;
|
|
6845
6847
|
this.#shouldResolvePrismaClient = shouldResolvePrismaClient;
|
|
6846
6848
|
this.#runtimePath = runtimePath;
|
|
6847
6849
|
}
|
|
@@ -6879,7 +6881,7 @@ var PrismaClientJsGenerator = class {
|
|
|
6879
6881
|
if (this.#cachedPrismaClientPath) {
|
|
6880
6882
|
return this.#cachedPrismaClientPath;
|
|
6881
6883
|
}
|
|
6882
|
-
this.#cachedPrismaClientPath = await resolvePrismaClient(path3.dirname(config.sourceFilePath));
|
|
6884
|
+
this.#cachedPrismaClientPath = await resolvePrismaClient(path3.dirname(config.sourceFilePath), this.#cliCommand);
|
|
6883
6885
|
return this.#cachedPrismaClientPath;
|
|
6884
6886
|
}
|
|
6885
6887
|
async #getRuntimePath(config) {
|
|
@@ -8,4 +8,4 @@ export declare const debug: ((...args: any[]) => void) & {
|
|
|
8
8
|
/**
|
|
9
9
|
* Resolves the path to the Prisma Client to determine the default output directory.
|
|
10
10
|
*/
|
|
11
|
-
export declare function resolvePrismaClient(baseDir: string): Promise<string>;
|
|
11
|
+
export declare function resolvePrismaClient(baseDir: string, cliCommand: string): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-generator-js",
|
|
3
|
-
"version": "7.10.0-dev.
|
|
3
|
+
"version": "7.10.0-dev.58",
|
|
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,22 +25,22 @@
|
|
|
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.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
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
|
-
"ts-pattern": "5.
|
|
35
|
-
"@prisma/client-common": "7.10.0-dev.
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/debug": "7.10.0-dev.
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/
|
|
43
|
-
"@prisma/
|
|
34
|
+
"ts-pattern": "5.9.0",
|
|
35
|
+
"@prisma/client-common": "7.10.0-dev.58",
|
|
36
|
+
"@prisma/fetch-engine": "7.10.0-dev.58",
|
|
37
|
+
"@prisma/generator": "7.10.0-dev.58",
|
|
38
|
+
"@prisma/debug": "7.10.0-dev.58",
|
|
39
|
+
"@prisma/get-platform": "7.10.0-dev.58",
|
|
40
|
+
"@prisma/internals": "7.10.0-dev.58",
|
|
41
|
+
"@prisma/ts-builders": "7.10.0-dev.58",
|
|
42
|
+
"@prisma/param-graph-builder": "7.10.0-dev.58",
|
|
43
|
+
"@prisma/dmmf": "7.10.0-dev.58"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/pluralize": "0.0.33"
|