@prisma/internals 6.20.0-dev.8 → 6.20.0-dev.9
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-73KNWD4T.js → chunk-57XKRBO4.js} +8 -10
- package/dist/{chunk-TQFONRJP.js → chunk-5BRXEOYH.js} +5 -5
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/chunk-5SAWCTGN.js +46 -0
- package/dist/{chunk-T4KYUNGO.js → chunk-63BLJTNP.js} +12 -12
- package/dist/{chunk-UHCUM4US.js → chunk-6AOQ56XS.js} +5 -5
- package/dist/{chunk-F7K755YZ.js → chunk-6XDWK3XF.js} +16 -38
- package/dist/{chunk-X24HKSTU.js → chunk-7AMQW56E.js} +5 -5
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-OJS6PNYD.js → chunk-AYH4F3GT.js} +5 -5
- package/dist/{chunk-7QC5VORA.js → chunk-BGMZPA2F.js} +5 -6
- package/dist/{chunk-GIXAB3OO.js → chunk-BKZWG6HK.js} +52 -133
- package/dist/{chunk-BVJP43JS.js → chunk-BXIKQUP5.js} +7 -7
- package/dist/{chunk-C3H5LCW7.js → chunk-DZUMYQIA.js} +5 -5
- package/dist/{chunk-FYZCPL2Z.js → chunk-FASYSGWP.js} +3 -6
- package/dist/{chunk-TXQN2QQI.js → chunk-FBHUMCED.js} +11 -11
- package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
- package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
- package/dist/{chunk-UQUWZJVN.js → chunk-GZLJZGHX.js} +5 -5
- package/dist/{chunk-BREG3SXT.js → chunk-J2WU5F65.js} +12 -12
- package/dist/{chunk-G7PC6PUN.js → chunk-JBAD62EV.js} +13 -13
- package/dist/{chunk-AX5N26KG.js → chunk-K4IC7NPI.js} +15 -10
- package/dist/{chunk-R3S5ZHUO.js → chunk-KV5M6BWD.js} +13 -13
- package/dist/{chunk-OAT7ZJED.js → chunk-MNP6VO5F.js} +7 -20
- package/dist/{chunk-BCQZ6JQE.js → chunk-NBWRGVYR.js} +4 -6
- package/dist/{chunk-W2C5H5H4.js → chunk-NHM75P2J.js} +7 -9
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-DT7GMC6R.js → chunk-PHCC4RQK.js} +11 -11
- package/dist/{chunk-F2OZV76L.js → chunk-PKOQQT7I.js} +7 -7
- package/dist/{chunk-75BIJ5PX.js → chunk-Q5XW7CMJ.js} +9 -9
- package/dist/{chunk-OSHZ4P3G.js → chunk-SP2ETLT2.js} +5 -5
- package/dist/{chunk-UHI6VYFX.js → chunk-TRAG7WPX.js} +15 -11
- package/dist/{chunk-27XVRCOV.js → chunk-UIA6QRTF.js} +5 -5
- package/dist/{chunk-HYJQ3CE6.js → chunk-UNTUCN6K.js} +16 -38
- package/dist/{chunk-QSE2V5UT.js → chunk-UUZVVTOP.js} +5 -5
- package/dist/{chunk-RF5CLPSL.js → chunk-UYMUOW4P.js} +52 -133
- package/dist/{chunk-GMW36QQF.js → chunk-V6DWK6TN.js} +7 -7
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/{chunk-LYKUEAOI.js → chunk-XV3WHAKH.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-YV4IFLW4.js} +128 -129
- package/dist/{chunk-HFFWZTVM.js → chunk-YXCPS3WU.js} +5 -15
- package/dist/{chunk-WPDUAPVD.js → chunk-YYNGIIPX.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.d.ts +7 -9
- package/dist/cli/checkUnsupportedDataProxy.js +52 -62
- package/dist/cli/directoryConfig.d.ts +5 -2
- package/dist/cli/directoryConfig.js +2 -2
- package/dist/cli/getGeneratorSuccessMessage.js +2 -3
- package/dist/cli/getSchema.d.ts +1 -15
- package/dist/cli/getSchema.js +4 -5
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +3 -20
- package/dist/cli/schemaContext.js +53 -62
- package/dist/cli/types.d.ts +1 -1
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +51 -61
- package/dist/engine-commands/getConfig.d.ts +1 -5
- package/dist/engine-commands/getConfig.js +10 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +4 -8
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +5 -8
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +61 -73
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/getGenerators.d.ts +0 -2
- package/dist/get-generators/getGenerators.js +54 -64
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/getPackedPackage.js +3 -3
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +4 -16
- package/dist/index.js +96 -120
- package/dist/resolveBinary.js +6 -6
- package/dist/schemaEngineCommands.js +7 -7
- package/dist/sendPanic.js +2 -3
- package/dist/types.d.ts +15 -0
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +4 -5
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/utils/toSchemasContainer.d.ts +1 -1
- package/dist/utils/toSchemasContainer.js +3 -3
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +15 -0
- package/dist/utils/{handleEngineLoadingErrors.js → validatePrismaConfigWithDatasource.js} +7 -6
- package/dist/wasm.js +5 -5
- package/package.json +15 -17
- package/dist/chunk-3FP46GUV.js +0 -471
- package/dist/chunk-46ABODUM.js +0 -186
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-D4VDA2TZ.js +0 -66
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-ERSH2BQA.js +0 -58
- package/dist/chunk-HO5HRHFZ.js +0 -30
- package/dist/chunk-KDHESRKE.js +0 -49
- package/dist/chunk-PZMRR772.js +0 -41
- package/dist/chunk-RFB2U4GQ.js +0 -41
- package/dist/chunk-T2PM5TKT.js +0 -55
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
- package/dist/client/getClientEngineType.d.ts +0 -7
- package/dist/client/getClientEngineType.js +0 -26
- package/dist/dotenvExpand.d.ts +0 -35
- package/dist/dotenvExpand.js +0 -25
- package/dist/utils/__tests__/maskSchema.test.js +0 -23
- package/dist/utils/cloudflareD1.d.ts +0 -5
- package/dist/utils/cloudflareD1.js +0 -27
- package/dist/utils/getEnvPaths.d.ts +0 -14
- package/dist/utils/getEnvPaths.js +0 -29
- package/dist/utils/getMigrateConfigDir.d.ts +0 -2
- package/dist/utils/getMigrateConfigDir.js +0 -25
- package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
- package/dist/utils/load.d.ts +0 -6
- package/dist/utils/load.js +0 -28
- package/dist/utils/loadEnvFile.d.ts +0 -10
- package/dist/utils/loadEnvFile.js +0 -30
- package/dist/utils/maskSchema.d.ts +0 -4
- package/dist/utils/maskSchema.js +0 -27
- package/dist/utils/serializeQueryEngineName.d.ts +0 -4
- package/dist/utils/serializeQueryEngineName.js +0 -25
- package/dist/utils/tryLoadEnvs.d.ts +0 -25
- package/dist/utils/tryLoadEnvs.js +0 -30
|
@@ -26,16 +26,16 @@ 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_J2WU5F65_exports = {};
|
|
30
|
+
__export(chunk_J2WU5F65_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_J2WU5F65_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_DZUMYQIA = require("./chunk-DZUMYQIA.js");
|
|
38
|
+
var import_chunk_7AMQW56E = require("./chunk-7AMQW56E.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_DZUMYQIA.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
async function getDMMF(options) {
|
|
66
|
-
const debugErrorType = (0,
|
|
66
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
|
|
67
67
|
debug(`Using getDmmf Wasm`);
|
|
68
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
|
69
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
70
70
|
() => {
|
|
71
|
-
if (process.env.
|
|
71
|
+
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_7AMQW56E.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_7AMQW56E.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -124,7 +124,7 @@ async function getDMMF(options) {
|
|
|
124
124
|
return panic;
|
|
125
125
|
}
|
|
126
126
|
const errorOutput = e.error.message;
|
|
127
|
-
return new GetDmmfError((0,
|
|
127
|
+
return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
128
128
|
}).with({ type: "parse-json" }, (e) => {
|
|
129
129
|
debugErrorType(e);
|
|
130
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
|
@@ -26,17 +26,17 @@ 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_JBAD62EV_exports = {};
|
|
30
|
+
__export(chunk_JBAD62EV_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_JBAD62EV_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_DZUMYQIA = require("./chunk-DZUMYQIA.js");
|
|
39
|
+
var import_chunk_7AMQW56E = require("./chunk-7AMQW56E.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_DZUMYQIA.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function validate(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
|
|
68
68
|
debug(`Using validate Wasm`);
|
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
71
71
|
() => {
|
|
72
|
-
if (process.env.
|
|
72
|
+
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_7AMQW56E.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_7AMQW56E.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
|
109
109
|
return panic;
|
|
110
110
|
}
|
|
111
111
|
const errorOutput = e.error.message;
|
|
112
|
-
return new ValidateError((0,
|
|
112
|
+
return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
113
113
|
}).exhaustive();
|
|
114
114
|
throw error;
|
|
115
115
|
}
|
|
@@ -16,27 +16,32 @@ 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_K4IC7NPI_exports = {};
|
|
20
|
+
__export(chunk_K4IC7NPI_exports, {
|
|
21
21
|
missingGeneratorMessage: () => missingGeneratorMessage,
|
|
22
22
|
missingModelMessage: () => missingModelMessage,
|
|
23
23
|
missingModelMessageMongoDB: () => missingModelMessageMongoDB
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_K4IC7NPI_exports);
|
|
26
26
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
|
28
28
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
29
29
|
var missingGeneratorMessage = `
|
|
30
30
|
${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
31
31
|
"schema.prisma"
|
|
32
32
|
)}, so nothing will be generated.
|
|
33
|
-
|
|
33
|
+
Add the Prisma Client generator like this:
|
|
34
34
|
|
|
35
35
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
36
|
-
(0,
|
|
37
|
-
provider = "prisma-client
|
|
36
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`generator client {
|
|
37
|
+
provider = "prisma-client"
|
|
38
|
+
output = "../src/generated/prisma"
|
|
38
39
|
}`)
|
|
39
|
-
)}
|
|
40
|
+
)}
|
|
41
|
+
|
|
42
|
+
More information in our documentation:
|
|
43
|
+
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
44
|
+
`;
|
|
40
45
|
var missingModelMessage = `
|
|
41
46
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
42
47
|
"schema.prisma"
|
|
@@ -44,7 +49,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
|
|
|
44
49
|
You can define a model like this:
|
|
45
50
|
|
|
46
51
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
47
|
-
(0,
|
|
52
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
|
48
53
|
id Int @id @default(autoincrement())
|
|
49
54
|
email String @unique
|
|
50
55
|
name String?
|
|
@@ -61,7 +66,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
|
|
|
61
66
|
You can define a model like this:
|
|
62
67
|
|
|
63
68
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
64
|
-
(0,
|
|
69
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
|
65
70
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
66
71
|
email String @unique
|
|
67
72
|
name String?
|
|
@@ -26,17 +26,17 @@ 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_KV5M6BWD_exports = {};
|
|
30
|
+
__export(chunk_KV5M6BWD_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_KV5M6BWD_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_UUZVVTOP = require("./chunk-UUZVVTOP.js");
|
|
39
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_UUZVVTOP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function validate(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
|
|
68
68
|
debug(`Using validate Wasm`);
|
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
71
71
|
() => {
|
|
72
|
-
if (process.env.
|
|
72
|
+
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_XV3WHAKH.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_XV3WHAKH.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
|
109
109
|
return panic;
|
|
110
110
|
}
|
|
111
111
|
const errorOutput = e.error.message;
|
|
112
|
-
return new ValidateError((0,
|
|
112
|
+
return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
113
113
|
}).exhaustive();
|
|
114
114
|
throw error;
|
|
115
115
|
}
|
|
@@ -16,33 +16,20 @@ 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_MNP6VO5F_exports = {};
|
|
20
|
+
__export(chunk_MNP6VO5F_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
|
|
24
|
+
module.exports = __toCommonJS(chunk_MNP6VO5F_exports);
|
|
26
25
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_FASYSGWP = require("./chunk-FASYSGWP.js");
|
|
28
27
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
29
|
-
var import_engines = require("@prisma/engines");
|
|
30
28
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
31
|
-
var import_get_platform = require("@prisma/get-platform");
|
|
32
29
|
async function getEngineVersion(enginePath, binaryName) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
enginePath = await (0, import_chunk_FYZCPL2Z.resolveBinary)(binaryName, enginePath);
|
|
37
|
-
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
|
38
|
-
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
39
|
-
(0, import_get_platform.assertNodeAPISupported)();
|
|
40
|
-
const QE = (0, import_chunk_6TTRTZXU.loadLibrary)(enginePath, platformInfo);
|
|
41
|
-
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
|
42
|
-
} else {
|
|
43
|
-
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
44
|
-
return stdout;
|
|
45
|
-
}
|
|
30
|
+
enginePath = await (0, import_chunk_FASYSGWP.resolveBinary)(binaryName ?? import_fetch_engine.BinaryType.SchemaEngineBinary, enginePath);
|
|
31
|
+
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
32
|
+
return stdout;
|
|
46
33
|
}
|
|
47
34
|
function safeGetEngineVersion(enginePath, binaryName) {
|
|
48
35
|
return (0, import_chunk_5DBOS77Y.tryCatch2)(
|
|
@@ -26,17 +26,15 @@ 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_NBWRGVYR_exports = {};
|
|
30
|
+
__export(chunk_NBWRGVYR_exports, {
|
|
31
31
|
inferDirectoryConfig: () => inferDirectoryConfig
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_NBWRGVYR_exports);
|
|
34
34
|
var import_node_path = __toESM(require("node:path"));
|
|
35
35
|
function inferDirectoryConfig(schemaContext, config, cwd = process.cwd()) {
|
|
36
36
|
const baseDir = (
|
|
37
|
-
//
|
|
38
|
-
// That schema file should usually be the users "root" aka main schema file.
|
|
39
|
-
schemaContext?.primaryDatasourceDirectory ?? // If no primary datasource exists we use the schemaRootDir.
|
|
37
|
+
// If no primary datasource exists we use the schemaRootDir.
|
|
40
38
|
// `schemaRootDir` is either the directory the user supplied as schemaPath or the directory the single schema file is in.
|
|
41
39
|
schemaContext?.schemaRootDir ?? // Should also that not be defined because there is no schema yet we fallback to CWD + `/prisma`.
|
|
42
40
|
import_node_path.default.join(cwd, "prisma")
|
|
@@ -16,11 +16,11 @@ 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_NHM75P2J_exports = {};
|
|
20
|
+
__export(chunk_NHM75P2J_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_NHM75P2J_exports);
|
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
26
26
|
"package.json"(exports, module2) {
|
|
@@ -48,7 +48,6 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
48
48
|
files: [
|
|
49
49
|
"README.md",
|
|
50
50
|
"dist",
|
|
51
|
-
"!**/libquery_engine*",
|
|
52
51
|
"!dist/get-generators/engines/*",
|
|
53
52
|
"scripts"
|
|
54
53
|
],
|
|
@@ -59,12 +58,11 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
59
58
|
"@swc/jest": "0.2.37",
|
|
60
59
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
61
60
|
"@types/jest": "29.5.14",
|
|
62
|
-
"@types/node": "
|
|
61
|
+
"@types/node": "~20.19.24",
|
|
63
62
|
"@types/resolve": "1.20.6",
|
|
64
63
|
archiver: "6.0.2",
|
|
65
64
|
"checkpoint-client": "1.1.33",
|
|
66
65
|
"cli-truncate": "4.0.0",
|
|
67
|
-
dotenv: "16.5.0",
|
|
68
66
|
empathic: "2.0.0",
|
|
69
67
|
"escape-string-regexp": "5.0.0",
|
|
70
68
|
execa: "8.0.1",
|
|
@@ -109,14 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
109
107
|
"@prisma/generator": "workspace:*",
|
|
110
108
|
"@prisma/generator-helper": "workspace:*",
|
|
111
109
|
"@prisma/get-platform": "workspace:*",
|
|
112
|
-
"@prisma/prisma-schema-wasm": "6.20.0-
|
|
113
|
-
"@prisma/schema-engine-wasm": "6.20.0-
|
|
110
|
+
"@prisma/prisma-schema-wasm": "6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513",
|
|
111
|
+
"@prisma/schema-engine-wasm": "6.20.0-16.next-0c19ccc313cf9911a90d99d2ac2eb0280c76c513",
|
|
114
112
|
"@prisma/schema-files-loader": "workspace:*",
|
|
115
113
|
arg: "5.0.2",
|
|
116
114
|
prompts: "2.4.2"
|
|
117
115
|
},
|
|
118
116
|
peerDependencies: {
|
|
119
|
-
typescript: ">=5.
|
|
117
|
+
typescript: ">=5.4.0"
|
|
120
118
|
},
|
|
121
119
|
peerDependenciesMeta: {
|
|
122
120
|
typescript: {
|
|
@@ -26,16 +26,14 @@ 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(
|
|
31
|
-
getSchemaFromPackageJson: () => getSchemaFromPackageJson,
|
|
29
|
+
var chunk_OKVM3CW4_exports = {};
|
|
30
|
+
__export(chunk_OKVM3CW4_exports, {
|
|
32
31
|
getSchemaWithPath: () => getSchemaWithPath,
|
|
33
32
|
getSchemaWithPathOptional: () => getSchemaWithPathOptional,
|
|
34
33
|
printSchemaLoadedMessage: () => printSchemaLoadedMessage
|
|
35
34
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(chunk_OKVM3CW4_exports);
|
|
37
36
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
38
|
-
var import_config = require("@prisma/config");
|
|
39
37
|
var import_debug = require("@prisma/debug");
|
|
40
38
|
var import_schema_files_loader = require("@prisma/schema-files-loader");
|
|
41
39
|
var import_fs = __toESM(require("fs"));
|
|
@@ -119,10 +117,6 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
|
|
|
119
117
|
if (prismaConfigResult.ok) {
|
|
120
118
|
return prismaConfigResult;
|
|
121
119
|
}
|
|
122
|
-
const pkgJsonResult = await getSchemaFromPackageJson(cwd);
|
|
123
|
-
if (pkgJsonResult.ok) {
|
|
124
|
-
return pkgJsonResult;
|
|
125
|
-
}
|
|
126
120
|
const defaultResult = await getDefaultSchema(cwd);
|
|
127
121
|
if (defaultResult.ok) {
|
|
128
122
|
return defaultResult;
|
|
@@ -179,36 +173,6 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
|
179
173
|
}
|
|
180
174
|
return schemaResult;
|
|
181
175
|
}
|
|
182
|
-
async function getSchemaFromPackageJson(cwd) {
|
|
183
|
-
const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
|
|
184
|
-
debug("prismaConfig", prismaConfig);
|
|
185
|
-
if (!prismaConfig || !prismaConfig.config?.schema) {
|
|
186
|
-
return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
|
|
187
|
-
}
|
|
188
|
-
const schemaPathFromPkgJson = prismaConfig.config.schema;
|
|
189
|
-
if (typeof schemaPathFromPkgJson !== "string") {
|
|
190
|
-
throw new Error(
|
|
191
|
-
`Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
|
|
192
|
-
cwd,
|
|
193
|
-
prismaConfig.loadedFromFile
|
|
194
|
-
)}\` must be of type string`
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
|
|
198
|
-
const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
|
|
199
|
-
if (!lookupResult.ok) {
|
|
200
|
-
throw new Error(
|
|
201
|
-
`Could not load schema from \`${import_path.default.relative(
|
|
202
|
-
cwd,
|
|
203
|
-
absoluteSchemaPath
|
|
204
|
-
)}\` provided by "prisma.schema" config of \`${import_path.default.relative(
|
|
205
|
-
cwd,
|
|
206
|
-
prismaConfig.loadedFromFile
|
|
207
|
-
)}\`: ${renderLookupError(lookupResult.error)}`
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
return lookupResult;
|
|
211
|
-
}
|
|
212
176
|
async function getDefaultSchema(cwd, failures = []) {
|
|
213
177
|
const lookupPaths = [import_path.default.join(cwd, "schema.prisma"), import_path.default.join(cwd, "prisma", "schema.prisma")];
|
|
214
178
|
for (const path2 of lookupPaths) {
|
|
@@ -26,17 +26,17 @@ 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_PHCC4RQK_exports = {};
|
|
30
|
+
__export(chunk_PHCC4RQK_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_PHCC4RQK_exports);
|
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
+
var import_chunk_UUZVVTOP = require("./chunk-UUZVVTOP.js");
|
|
39
|
+
var import_chunk_XV3WHAKH = require("./chunk-XV3WHAKH.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_UUZVVTOP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function mergeSchemas(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
|
|
|
72
72
|
const params = JSON.stringify({
|
|
73
73
|
schema: options.schemas
|
|
74
74
|
});
|
|
75
|
-
return
|
|
75
|
+
return import_chunk_XV3WHAKH.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
|
104
104
|
return panic;
|
|
105
105
|
}
|
|
106
106
|
const errorOutput = e.error.message;
|
|
107
|
-
return new MergeSchemasError((0,
|
|
107
|
+
return new MergeSchemasError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -26,13 +26,13 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_PKOQQT7I_exports = {};
|
|
30
|
+
__export(chunk_PKOQQT7I_exports, {
|
|
31
31
|
getBinaryPathsByVersion: () => getBinaryPathsByVersion
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_PKOQQT7I_exports);
|
|
34
|
+
var import_chunk_5I4ERIIY = require("./chunk-5I4ERIIY.js");
|
|
35
|
+
var import_chunk_GJSFP4V4 = require("./chunk-GJSFP4V4.js");
|
|
36
36
|
var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
|
|
37
37
|
var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
|
|
38
38
|
var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
|
|
@@ -91,7 +91,7 @@ async function getBinaryPathsByVersion({
|
|
|
91
91
|
}
|
|
92
92
|
const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
|
|
93
93
|
if (!binaryPathsOverride?.[curr]) {
|
|
94
|
-
acc[(0,
|
|
94
|
+
acc[(0, import_chunk_GJSFP4V4.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
|
|
95
95
|
}
|
|
96
96
|
return acc;
|
|
97
97
|
}, /* @__PURE__ */ Object.create(null));
|
|
@@ -107,7 +107,7 @@ async function getBinaryPathsByVersion({
|
|
|
107
107
|
skipDownload
|
|
108
108
|
};
|
|
109
109
|
const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
|
|
110
|
-
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType,
|
|
110
|
+
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_5I4ERIIY.binaryTypeToEngineType);
|
|
111
111
|
binaryPathsByVersion[currentVersion] = binaryPaths;
|
|
112
112
|
}
|
|
113
113
|
if (binaryPathsOverride) {
|
|
@@ -26,8 +26,8 @@ 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_Q5XW7CMJ_exports = {};
|
|
30
|
+
__export(chunk_Q5XW7CMJ_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists2,
|
|
32
32
|
fs_functional_exports: () => fs_functional_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir2,
|
|
@@ -37,8 +37,8 @@ __export(chunk_75BIJ5PX_exports, {
|
|
|
37
37
|
removeFile: () => removeFile,
|
|
38
38
|
writeFile: () => writeFile2
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
41
|
-
var
|
|
40
|
+
module.exports = __toCommonJS(chunk_Q5XW7CMJ_exports);
|
|
41
|
+
var import_chunk_5BRXEOYH = require("./chunk-5BRXEOYH.js");
|
|
42
42
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
43
43
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
|
|
|
3981
3981
|
});
|
|
3982
3982
|
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
|
3983
3983
|
var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
|
|
3984
|
-
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0,
|
|
3985
|
-
var writeFile2 = (params) => TE.tryCatch(() => (0,
|
|
3986
|
-
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0,
|
|
3984
|
+
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
|
|
3985
|
+
var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.writeFile)(params), createTaggedSystemError("fs-write-file", params));
|
|
3986
|
+
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
|
|
3987
3987
|
var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
|
|
3988
3988
|
var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
|
|
3989
|
-
var getNestedFoldersInDir2 = (dir) => () => (0,
|
|
3990
|
-
var getFilesInDir2 = (dir, pattern = "**") => () => (0,
|
|
3989
|
+
var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_5BRXEOYH.getNestedFoldersInDir)(dir);
|
|
3990
|
+
var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_5BRXEOYH.getFilesInDir)(dir, pattern);
|
|
3991
3991
|
function createTaggedSystemError(type, meta) {
|
|
3992
3992
|
return (e) => ({
|
|
3993
3993
|
type,
|
|
@@ -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_SP2ETLT2_exports = {};
|
|
20
|
+
__export(chunk_SP2ETLT2_exports, {
|
|
21
21
|
toSchemasContainer: () => toSchemasContainer,
|
|
22
22
|
toSchemasWithConfigDir: () => toSchemasWithConfigDir
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_SP2ETLT2_exports);
|
|
25
25
|
function toSchemasContainer(schemas) {
|
|
26
26
|
return {
|
|
27
27
|
files: multipleSchemasToSchemaContainers(schemas)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function toSchemasWithConfigDir(schemaContext) {
|
|
30
|
+
function toSchemasWithConfigDir(schemaContext, configDir) {
|
|
31
31
|
return {
|
|
32
32
|
files: multipleSchemasToSchemaContainers(schemaContext.schemaFiles),
|
|
33
|
-
configDir
|
|
33
|
+
configDir
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function multipleSchemasToSchemaContainers(schemas) {
|