@prisma/client-generator-js 7.10.0-dev.49 → 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 +7 -5
- package/dist/index.mjs +7 -5
- package/dist/resolvePrismaClient.d.ts +1 -1
- package/package.json +10 -10
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
|
@@ -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
|
@@ -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",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"package-up": "5.0.0",
|
|
33
33
|
"pluralize": "8.0.0",
|
|
34
34
|
"ts-pattern": "5.9.0",
|
|
35
|
-
"@prisma/client-common": "7.10.0-dev.
|
|
36
|
-
"@prisma/fetch-engine": "7.10.0-dev.
|
|
37
|
-
"@prisma/generator": "7.10.0-dev.
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/
|
|
40
|
-
"@prisma/
|
|
41
|
-
"@prisma/
|
|
42
|
-
"@prisma/param-graph-builder": "7.10.0-dev.
|
|
43
|
-
"@prisma/
|
|
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"
|