@prisma/internals 5.17.0-integration-show-platform-auth-token.3 → 5.17.0-integration-show-platform-auth-token.4
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/{chunk-EOTOEWEG.js → chunk-2QFQJTM3.js} +16 -16
- package/dist/{chunk-JM6ICT4D.js → chunk-4A5ZK522.js} +3 -3
- package/dist/{chunk-22WWDCBL.js → chunk-5R627ZMI.js} +7 -7
- package/dist/chunk-5XRQ7ONW.js +122 -0
- package/dist/{chunk-7QFKPVEI.js → chunk-63WDBN55.js} +5 -5
- package/dist/{chunk-KRU3ZK3W.js → chunk-6GOPQDH2.js} +19 -19
- package/dist/{chunk-3CRBDWPU.js → chunk-6QMBX5PW.js} +5 -5
- package/dist/{chunk-HNFCHBPX.js → chunk-6WETF56C.js} +5 -5
- package/dist/{chunk-V3GTH2TA.js → chunk-7GBD3GZZ.js} +5 -5
- package/dist/{chunk-IEOLMIMU.js → chunk-ALIEF3BE.js} +15 -15
- package/dist/{chunk-OI5GDSG6.js → chunk-EDDYQ5ZF.js} +5 -5
- package/dist/{chunk-6HXOL3QF.js → chunk-EYOPVHNV.js} +28 -28
- package/dist/{chunk-Z2NHAREC.js → chunk-GHYJGM56.js} +5 -5
- package/dist/{chunk-BDXNOGJ3.js → chunk-GJMGCWTR.js} +5 -5
- package/dist/chunk-JTMEVPXK.js +177 -0
- package/dist/chunk-JUIG32DW.js +110 -0
- package/dist/{chunk-EKSAMZHR.js → chunk-KUMD5MBR.js} +10 -10
- package/dist/{chunk-IJK3NGWG.js → chunk-NCYBGN3M.js} +5 -5
- package/dist/chunk-PN2OFBAO.js +166 -0
- package/dist/{chunk-5TGIEWON.js → chunk-QCERIVWN.js} +22 -22
- package/dist/chunk-QIVUAERL.js +2202 -0
- package/dist/chunk-QL3K6JIN.js +54 -0
- package/dist/{chunk-SMHAELKS.js → chunk-QOTVZEEZ.js} +17 -17
- package/dist/{chunk-LQD72ZI2.js → chunk-QTT3VIQ3.js} +15 -15
- package/dist/{chunk-WPDXG7BG.js → chunk-QVK4UV4F.js} +5 -5
- package/dist/{chunk-4SKD6RMZ.js → chunk-TEGKDZJW.js} +6 -6
- package/dist/{chunk-HHHZRX5T.js → chunk-TWCV53Y5.js} +16 -16
- package/dist/{chunk-ZMLBYV2S.js → chunk-U3FOR7Z4.js} +24 -795
- package/dist/{chunk-FTFPVECN.js → chunk-UGBKVZL5.js} +5 -5
- package/dist/{chunk-P6T3CL5R.js → chunk-W4W3SS5M.js} +5 -5
- package/dist/{chunk-5SEXCYQP.js → chunk-WZYDGIB3.js} +23 -23
- package/dist/{chunk-BQ3ZVZLP.js → chunk-XY27KEAX.js} +22 -22
- package/dist/{chunk-QEMHOJR6.js → chunk-YM3CE76B.js} +147 -160
- package/dist/{chunk-2HYB2BOP.js → chunk-ZH2S54SA.js} +23 -23
- package/dist/cli/checkUnsupportedDataProxy.js +20 -20
- package/dist/cli/getSchema.js +25 -25
- package/dist/cli/hashes.js +20 -20
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +19 -19
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -8
- package/dist/engine-commands/index.js +30 -30
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +20 -20
- package/dist/get-generators/getGenerators.js +22 -22
- package/dist/index.js +57 -57
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +19 -19
- package/dist/utils/fs-functional.js +9 -9
- package/dist/utils/getEnvPaths.js +19 -19
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +19 -19
- package/dist/utils/loadEnvFile.js +19 -19
- package/dist/wasm.js +4 -4
- package/package.json +9 -9
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_UGBKVZL5_exports = {};
|
|
20
|
+
__export(chunk_UGBKVZL5_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_UGBKVZL5_exports);
|
|
24
|
+
var import_chunk_QVK4UV4F = require("./chunk-QVK4UV4F.js");
|
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_QVK4UV4F.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -16,21 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_W4W3SS5M_exports = {};
|
|
20
|
+
__export(chunk_W4W3SS5M_exports, {
|
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
|
24
24
|
lintSchema: () => lintSchema,
|
|
25
25
|
warningToString: () => warningToString
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_W4W3SS5M_exports);
|
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_7GBD3GZZ = require("./chunk-7GBD3GZZ.js");
|
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
32
|
function lintSchema({ schemas }) {
|
|
33
|
-
const lintResult =
|
|
33
|
+
const lintResult = import_chunk_7GBD3GZZ.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
35
35
|
return lintDiagnostics;
|
|
36
36
|
}
|
|
@@ -26,29 +26,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_WZYDGIB3_exports = {};
|
|
30
|
+
__export(chunk_WZYDGIB3_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig,
|
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
35
|
resolveUrl: () => resolveUrl
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(chunk_WZYDGIB3_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
40
40
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var import_chunk_63WDBN55 = require("./chunk-63WDBN55.js");
|
|
42
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
44
|
-
var
|
|
44
|
+
var import_chunk_7GBD3GZZ = require("./chunk-7GBD3GZZ.js");
|
|
45
45
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
46
|
-
var
|
|
46
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
|
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
48
48
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
49
49
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
50
50
|
var import_get_platform = require("@prisma/get-platform");
|
|
51
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
51
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
52
52
|
var debug = (0, import_debug.default)("prisma:getConfig");
|
|
53
53
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
|
54
54
|
var GetConfigError = class extends Error {
|
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
|
65
65
|
}).exhaustive();
|
|
66
66
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
67
67
|
[Context: getConfig]`;
|
|
68
|
-
super((0,
|
|
68
|
+
super((0, import_chunk_63WDBN55.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
69
69
|
this.name = "GetConfigError";
|
|
70
70
|
}
|
|
71
71
|
};
|
|
@@ -83,14 +83,14 @@ function resolveUrl(envValue) {
|
|
|
83
83
|
return urlFromValue ?? urlEnvVarValue;
|
|
84
84
|
}
|
|
85
85
|
async function getConfig(options) {
|
|
86
|
-
const debugErrorType = (0,
|
|
86
|
+
const debugErrorType = (0, import_chunk_KUMD5MBR.createDebugErrorType)(debug, "getConfigWasm");
|
|
87
87
|
debug(`Using getConfig Wasm`);
|
|
88
88
|
const configEither = (0, import_function.pipe)(
|
|
89
|
-
(0,
|
|
89
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
90
90
|
() => {
|
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
92
92
|
debug("Triggering a Rust panic...");
|
|
93
|
-
|
|
93
|
+
import_chunk_7GBD3GZZ.prismaSchemaWasm.debug_panic();
|
|
94
94
|
}
|
|
95
95
|
const params = JSON.stringify({
|
|
96
96
|
prismaSchema: options.datamodel,
|
|
@@ -98,7 +98,7 @@ async function getConfig(options) {
|
|
|
98
98
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
99
99
|
env: process.env
|
|
100
100
|
});
|
|
101
|
-
const data =
|
|
101
|
+
const data = import_chunk_7GBD3GZZ.prismaSchemaWasm.get_config(params);
|
|
102
102
|
return data;
|
|
103
103
|
},
|
|
104
104
|
(e) => ({
|
|
@@ -107,11 +107,11 @@ async function getConfig(options) {
|
|
|
107
107
|
error: e
|
|
108
108
|
})
|
|
109
109
|
),
|
|
110
|
-
(0,
|
|
111
|
-
(0,
|
|
110
|
+
(0, import_chunk_4A5ZK522.map)((result) => ({ result })),
|
|
111
|
+
(0, import_chunk_4A5ZK522.chainW)(
|
|
112
112
|
({ result }) => (
|
|
113
113
|
// NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
|
|
114
|
-
(0,
|
|
114
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
115
115
|
() => JSON.parse(result),
|
|
116
116
|
(e) => ({
|
|
117
117
|
type: "parse-json",
|
|
@@ -121,18 +121,18 @@ async function getConfig(options) {
|
|
|
121
121
|
)
|
|
122
122
|
)
|
|
123
123
|
),
|
|
124
|
-
(0,
|
|
124
|
+
(0, import_chunk_4A5ZK522.chainW)((response) => {
|
|
125
125
|
if (response.errors.length > 0) {
|
|
126
|
-
return (0,
|
|
126
|
+
return (0, import_chunk_4A5ZK522.left)({
|
|
127
127
|
type: "validation-error",
|
|
128
128
|
reason: "(get-config wasm)",
|
|
129
129
|
error: response.errors
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
return (0,
|
|
132
|
+
return (0, import_chunk_4A5ZK522.right)(response.config);
|
|
133
133
|
})
|
|
134
134
|
);
|
|
135
|
-
if ((0,
|
|
135
|
+
if ((0, import_chunk_4A5ZK522.isRight)(configEither)) {
|
|
136
136
|
debug("config data retrieved without errors in getConfig Wasm");
|
|
137
137
|
const { right: data } = configEither;
|
|
138
138
|
for (const generator of data.generators) {
|
|
@@ -160,12 +160,12 @@ async function getConfig(options) {
|
|
|
160
160
|
return panic;
|
|
161
161
|
}
|
|
162
162
|
const errorOutput = e.error.message;
|
|
163
|
-
return new GetConfigError((0,
|
|
163
|
+
return new GetConfigError((0, import_chunk_KUMD5MBR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
164
164
|
}).with({ type: "validation-error" }, (e) => {
|
|
165
165
|
return new GetConfigError({
|
|
166
166
|
_tag: "parsed",
|
|
167
167
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
168
|
-
reason: (0,
|
|
168
|
+
reason: (0, import_chunk_KUMD5MBR.createSchemaValidationError)(e.reason),
|
|
169
169
|
message: formatErrors(e.error)
|
|
170
170
|
});
|
|
171
171
|
}).otherwise((e) => {
|
|
@@ -26,25 +26,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_XY27KEAX_exports = {};
|
|
30
|
+
__export(chunk_XY27KEAX_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_XY27KEAX_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
|
+
var import_chunk_63WDBN55 = require("./chunk-63WDBN55.js");
|
|
38
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_7GBD3GZZ = require("./chunk-7GBD3GZZ.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
|
-
var
|
|
42
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
45
45
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
46
46
|
var import_fs = __toESM(require("fs"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
49
49
|
var GetDmmfError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -60,16 +60,16 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: getDmmf]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_63WDBN55.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "GetDmmfError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
async function getDMMF(options) {
|
|
68
68
|
warnOnDeprecatedFeatureFlag(options.previewFeatures);
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_KUMD5MBR.createDebugErrorType)(debug, "getDmmfWasm");
|
|
70
70
|
debug(`Using getDmmf Wasm`);
|
|
71
71
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
72
|
-
(0,
|
|
72
|
+
(0, import_chunk_4A5ZK522.tryCatch2)(
|
|
73
73
|
() => {
|
|
74
74
|
if (options.datamodel) {
|
|
75
75
|
debug("Using given datamodel");
|
|
@@ -85,19 +85,19 @@ async function getDMMF(options) {
|
|
|
85
85
|
datamodelPath: options.datamodelPath
|
|
86
86
|
})
|
|
87
87
|
),
|
|
88
|
-
(0,
|
|
88
|
+
(0, import_chunk_4A5ZK522.chainW2)((datamodel) => {
|
|
89
89
|
return (0, import_function.pipe)(
|
|
90
|
-
(0,
|
|
90
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
91
91
|
() => {
|
|
92
92
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
93
93
|
debug("Triggering a Rust panic...");
|
|
94
|
-
|
|
94
|
+
import_chunk_7GBD3GZZ.prismaSchemaWasm.debug_panic();
|
|
95
95
|
}
|
|
96
96
|
const params = JSON.stringify({
|
|
97
97
|
prismaSchema: datamodel,
|
|
98
98
|
noColor: Boolean(process.env.NO_COLOR)
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_7GBD3GZZ.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|
|
@@ -106,11 +106,11 @@ async function getDMMF(options) {
|
|
|
106
106
|
error: e
|
|
107
107
|
})
|
|
108
108
|
),
|
|
109
|
-
(0,
|
|
110
|
-
(0,
|
|
109
|
+
(0, import_chunk_4A5ZK522.map)((result) => ({ result })),
|
|
110
|
+
(0, import_chunk_4A5ZK522.chainW)(
|
|
111
111
|
({ result }) => (
|
|
112
112
|
// NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
|
|
113
|
-
(0,
|
|
113
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
114
114
|
() => JSON.parse(result),
|
|
115
115
|
(e) => ({
|
|
116
116
|
type: "parse-json",
|
|
@@ -120,12 +120,12 @@ async function getDMMF(options) {
|
|
|
120
120
|
)
|
|
121
121
|
)
|
|
122
122
|
),
|
|
123
|
-
|
|
123
|
+
import_chunk_4A5ZK522.fromEither
|
|
124
124
|
);
|
|
125
125
|
})
|
|
126
126
|
);
|
|
127
127
|
const dmmfEither = await dmmfPipeline();
|
|
128
|
-
if ((0,
|
|
128
|
+
if ((0, import_chunk_4A5ZK522.isRight)(dmmfEither)) {
|
|
129
129
|
debug("dmmf data retrieved without errors in getDmmf Wasm");
|
|
130
130
|
const { right: data } = dmmfEither;
|
|
131
131
|
return Promise.resolve(data);
|
|
@@ -158,7 +158,7 @@ Datamodel path: "${e.datamodelPath}"`,
|
|
|
158
158
|
return panic;
|
|
159
159
|
}
|
|
160
160
|
const errorOutput = e.error.message;
|
|
161
|
-
return new GetDmmfError((0,
|
|
161
|
+
return new GetDmmfError((0, import_chunk_KUMD5MBR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
162
162
|
}).with({ type: "parse-json" }, (e) => {
|
|
163
163
|
debugErrorType(e);
|
|
164
164
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|