@prisma/internals 6.6.0-dev.4 → 6.6.0-dev.41
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.js +3 -3
- package/dist/WasmPanicRegistry.js +3 -3
- package/dist/chunk-2QTAK7KO.js +101 -0
- package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
- package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
- package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
- package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
- package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
- package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
- package/dist/{chunk-MGZOEY6N.js → chunk-72UZXEBG.js} +6 -6
- package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
- package/dist/{chunk-RLDUMTXD.js → chunk-ANZ7I7BV.js} +46 -79
- package/dist/{chunk-BGFWFIPR.js → chunk-AZV6HVKA.js} +5 -5
- package/dist/{chunk-VRT7T6MF.js → chunk-BWGDP6B5.js} +94 -105
- package/dist/{chunk-5CIZXUQR.js → chunk-CPF2U6TN.js} +30 -34
- package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
- package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
- package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
- package/dist/{chunk-MUPZUVSI.js → chunk-D4VZUY3O.js} +14 -20
- package/dist/{chunk-IPG5ZT4T.js → chunk-D6UC363D.js} +23 -27
- package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
- package/dist/chunk-DODIJPCS.js +34 -0
- package/dist/{chunk-45HF3I7B.js → chunk-DQTWQONJ.js} +5 -5
- package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
- package/dist/{chunk-ZYW3HGSH.js → chunk-DYVL6P7F.js} +7 -8
- package/dist/{chunk-RUIW2PYP.js → chunk-E34H3BUU.js} +5 -5
- package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
- package/dist/{chunk-QXWVKT6L.js → chunk-EQVDLWDC.js} +22 -26
- package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
- package/dist/{chunk-PIPE5DSU.js → chunk-EWWOTVR3.js} +6 -6
- package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
- package/dist/{chunk-S57RMXZW.js → chunk-GHHABGYW.js} +5 -5
- package/dist/{chunk-C4HY6GXT.js → chunk-GLCSJAWZ.js} +11 -15
- package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
- package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
- package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
- package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
- package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
- package/dist/{chunk-C2WD2XUT.js → chunk-K5W6WZ6E.js} +971 -991
- package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
- package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
- package/dist/{chunk-VRBR7UXP.js → chunk-KG27IPLK.js} +30 -34
- package/dist/{chunk-A3N2Q2GK.js → chunk-KP4NQ45I.js} +11 -15
- package/dist/{chunk-SNAZMEHK.js → chunk-L5NNYEH3.js} +9 -9
- package/dist/{chunk-PJYVXCB6.js → chunk-LGHB6ROF.js} +5 -5
- package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
- package/dist/{chunk-VJRLBRVK.js → chunk-LQNSUOK4.js} +9 -9
- package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
- package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
- package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
- package/dist/{chunk-3J24J2TX.js → chunk-NOFAEZS3.js} +10 -10
- package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
- package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
- package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
- package/dist/{chunk-77IC3DNO.js → chunk-QGJH4P4N.js} +8 -8
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
- package/dist/chunk-RKTHINSX.js +1076 -0
- package/dist/{chunk-6AAPRN4H.js → chunk-SVZEB4RG.js} +22 -26
- package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
- package/dist/{chunk-BVKTPL5A.js → chunk-TTOY2EQP.js} +5 -5
- package/dist/chunk-TV34NMBZ.js +46 -0
- package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
- package/dist/{chunk-WUDS3ABI.js → chunk-UYCSSJQD.js} +46 -79
- package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
- package/dist/{chunk-YXD4CJDK.js → chunk-VVPSLVOR.js} +27 -27
- package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
- package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
- package/dist/{chunk-2MWIMEFK.js → chunk-XLTQGAI2.js} +6 -6
- package/dist/{chunk-FIWY5LGI.js → chunk-XWWRHR2Z.js} +9 -9
- package/dist/chunk-YR5KNFKN.js +1834 -0
- package/dist/{chunk-BMJOVREG.js → chunk-Z6ZBU4HL.js} +23 -27
- package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
- package/dist/chunk-ZKZRTPBY.js +1076 -0
- package/dist/chunk-ZSINRHD4.js +43 -0
- package/dist/cli/Help.js +1 -1
- package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
- package/dist/cli/checkUnsupportedDataProxy.js +77 -74
- package/dist/cli/directoryConfig.d.ts +7 -0
- package/dist/{get-generators/utils/check-feature-flags/checkFeatureFlags.js → cli/directoryConfig.js} +6 -6
- package/dist/cli/getGeneratorSuccessMessage.js +1 -1
- package/dist/cli/getSchema.js +81 -78
- package/dist/cli/getTypescriptVersion.js +1 -1
- package/dist/cli/hashes.js +77 -74
- package/dist/cli/schemaContext.d.ts +58 -0
- package/dist/cli/schemaContext.js +139 -0
- package/dist/cli/utils.js +5 -5
- package/dist/client/getClientEngineType.js +1 -1
- package/dist/convertCredentials.js +1 -1
- package/dist/dotenvExpand.js +1 -1
- package/dist/engine-commands/errorHelpers.js +5 -5
- package/dist/engine-commands/formatSchema.js +76 -73
- package/dist/engine-commands/getConfig.d.ts +0 -4
- package/dist/engine-commands/getConfig.js +16 -17
- package/dist/engine-commands/getDmmf.d.ts +1 -5
- package/dist/engine-commands/getDmmf.js +13 -14
- package/dist/engine-commands/getEngineVersion.js +12 -12
- package/dist/engine-commands/getEnginesMetaInfo.js +15 -15
- package/dist/engine-commands/index.js +87 -84
- package/dist/engine-commands/lintSchema.d.ts +1 -1
- package/dist/engine-commands/lintSchema.js +11 -12
- package/dist/engine-commands/mergeSchemas.js +13 -14
- package/dist/engine-commands/queryEngineCommons.js +8 -8
- package/dist/engine-commands/relativizePathInPSLError.js +1 -1
- package/dist/engine-commands/validate.js +13 -14
- package/dist/errorReporting.d.ts +0 -1
- package/dist/errorReporting.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +76 -73
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +7 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +76 -73
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +1 -1
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +77 -74
- package/dist/get-generators/getGenerators.d.ts +7 -3
- package/dist/get-generators/getGenerators.js +79 -76
- package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
- package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
- package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
- package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
- package/dist/getPackedPackage.js +9 -9
- package/dist/highlight/highlight.js +1 -1
- package/dist/highlight/languages/dml.js +1 -1
- package/dist/highlight/languages/sql.js +1 -1
- package/dist/highlight/prism.js +1 -1
- package/dist/highlight/theme.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +144 -141
- package/dist/logger.js +9 -9
- package/dist/migrateTypes.d.ts +63 -0
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
- package/dist/panic.d.ts +1 -4
- package/dist/panic.js +7 -7
- package/dist/resolveBinary.js +10 -10
- package/dist/resolveOutput.js +1 -1
- package/dist/schemaEngineCommands.js +13 -13
- package/dist/sendPanic.js +7 -111
- package/dist/utils/__tests__/isCi.test.js +1 -1
- package/dist/utils/__tests__/isInteractive.test.js +1 -1
- package/dist/utils/__tests__/maskSchema.test.js +1 -1
- package/dist/utils/assertAlways.js +1 -1
- package/dist/utils/assertNever.js +1 -1
- package/dist/utils/binaryTargetRegex.js +3 -3
- package/dist/utils/byline.js +1 -1
- package/dist/utils/callOnce.js +1 -1
- package/dist/utils/callOnce.test.js +1 -1
- package/dist/utils/canPrompt.js +4 -4
- package/dist/utils/chmodPlusX.js +1 -1
- package/dist/utils/cloudflareD1.js +4 -4
- package/dist/utils/drawBox.js +1 -1
- package/dist/utils/extractPreviewFeatures.d.ts +2 -2
- package/dist/utils/extractPreviewFeatures.js +3 -3
- package/dist/utils/formatTable.js +1 -1
- package/dist/utils/formatms.js +1 -1
- package/dist/utils/fs-functional.js +12 -12
- package/dist/utils/fs-utils.js +9 -9
- package/dist/utils/getCommandWithExecutor.js +4 -4
- package/dist/utils/getEnvPaths.js +76 -73
- package/dist/utils/getGitHubIssueUrl.js +5 -4
- package/dist/utils/getMigrateConfigDir.js +1 -1
- package/dist/utils/getVersionFromPackageJson.js +4 -4
- package/dist/utils/handleEngineLoadingErrors.js +1 -1
- package/dist/utils/handlePanic.js +13 -110
- package/dist/utils/hasOwnProperty.js +1 -1
- package/dist/utils/isCi.js +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +3 -3
- package/dist/utils/isInContainer.js +1 -1
- package/dist/utils/isInNpmLifecycleHook.js +1 -1
- package/dist/utils/isInteractive.js +1 -1
- package/dist/utils/isPromiseLike.js +1 -1
- package/dist/utils/isValidJsIdentifier.js +4 -4
- package/dist/utils/keyBy.js +1 -1
- package/dist/utils/link.js +3 -3
- package/dist/utils/load.js +3 -3
- package/dist/utils/loadEnvFile.js +76 -73
- package/dist/utils/mapKeys.js +1 -1
- package/dist/utils/mapObjectValues.js +1 -1
- package/dist/utils/maskSchema.js +1 -1
- package/dist/utils/max.js +1 -1
- package/dist/utils/max.test.js +1 -1
- package/dist/utils/maybeInGitHook.js +1 -1
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/utils/now.js +1 -1
- package/dist/utils/omit.js +1 -1
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +1 -1
- package/dist/utils/parseEnvValue.js +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/path.test.js +1 -1
- package/dist/utils/pick.js +1 -1
- package/dist/utils/printConfigWarnings.js +1 -1
- package/dist/utils/prismaPostgres.js +1 -1
- package/dist/utils/prismaPostgres.test.js +1 -1
- package/dist/utils/schemaFileInput.d.ts +0 -4
- package/dist/utils/schemaFileInput.js +3 -7
- package/dist/utils/serializeQueryEngineName.js +1 -1
- package/dist/utils/setClassName.js +1 -1
- package/dist/utils/toSchemasContainer.d.ts +2 -3
- package/dist/utils/toSchemasContainer.js +4 -5
- package/dist/utils/tryLoadEnvs.js +6 -6
- package/dist/utils/unique.js +1 -1
- package/dist/utils/vercelPkgPathRegex.js +1 -1
- package/dist/warnOnce.js +4 -4
- package/dist/wasm.js +6 -6
- package/package.json +12 -12
- package/dist/chunk-AOQIUJT4.js +0 -41
- package/dist/chunk-M3NNYQXQ.js +0 -15631
- package/dist/chunk-W5PGH43I.js +0 -15631
- package/dist/chunk-YRBRUREX.js +0 -57
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
@@ -26,13 +26,12 @@ 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_BWGDP6B5_exports = {};
|
30
|
+
__export(chunk_BWGDP6B5_exports, {
|
31
31
|
detect: () => detect,
|
32
32
|
getCommand: () => getCommand
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
34
|
+
module.exports = __toCommonJS(chunk_BWGDP6B5_exports);
|
36
35
|
var import_node_fs = __toESM(require("node:fs"));
|
37
36
|
var import_node_path = __toESM(require("node:path"));
|
38
37
|
var import_node_process = __toESM(require("node:process"));
|
@@ -1169,17 +1168,17 @@ var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
1169
1168
|
var global$1 = globalThis;
|
1170
1169
|
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
1171
1170
|
var Emitter = class {
|
1171
|
+
emitted = {
|
1172
|
+
afterExit: false,
|
1173
|
+
exit: false
|
1174
|
+
};
|
1175
|
+
listeners = {
|
1176
|
+
afterExit: [],
|
1177
|
+
exit: []
|
1178
|
+
};
|
1179
|
+
count = 0;
|
1180
|
+
id = Math.random();
|
1172
1181
|
constructor() {
|
1173
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "emitted", {
|
1174
|
-
afterExit: false,
|
1175
|
-
exit: false
|
1176
|
-
});
|
1177
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "listeners", {
|
1178
|
-
afterExit: [],
|
1179
|
-
exit: []
|
1180
|
-
});
|
1181
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "count", 0);
|
1182
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "id", Math.random());
|
1183
1182
|
if (global$1[kExitEmitter]) {
|
1184
1183
|
return global$1[kExitEmitter];
|
1185
1184
|
}
|
@@ -1245,125 +1244,119 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
1245
1244
|
unload() {
|
1246
1245
|
}
|
1247
1246
|
};
|
1248
|
-
var _hupSig, _emitter, _process, _originalProcessEmit, _originalProcessReallyExit, _sigListeners, _loaded, _SignalExit_instances, processReallyExit_fn, processEmit_fn;
|
1249
1247
|
var SignalExit = class extends SignalExitBase {
|
1248
|
+
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
1249
|
+
// so use a supported signal instead
|
1250
|
+
/* c8 ignore start */
|
1251
|
+
#hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
|
1252
|
+
/* c8 ignore stop */
|
1253
|
+
#emitter = new Emitter();
|
1254
|
+
#process;
|
1255
|
+
#originalProcessEmit;
|
1256
|
+
#originalProcessReallyExit;
|
1257
|
+
#sigListeners = {};
|
1258
|
+
#loaded = false;
|
1250
1259
|
constructor(process2) {
|
1251
1260
|
super();
|
1252
|
-
|
1253
|
-
|
1254
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _emitter, new Emitter());
|
1255
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _process);
|
1256
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _originalProcessEmit);
|
1257
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _originalProcessReallyExit);
|
1258
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _sigListeners, {});
|
1259
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _loaded, false);
|
1260
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _process, process2);
|
1261
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _sigListeners, {});
|
1261
|
+
this.#process = process2;
|
1262
|
+
this.#sigListeners = {};
|
1262
1263
|
for (const sig of signals) {
|
1263
|
-
|
1264
|
-
const listeners =
|
1265
|
-
let { count } =
|
1264
|
+
this.#sigListeners[sig] = () => {
|
1265
|
+
const listeners = this.#process.listeners(sig);
|
1266
|
+
let { count } = this.#emitter;
|
1266
1267
|
const p = process2;
|
1267
1268
|
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
1268
1269
|
count += p.__signal_exit_emitter__.count;
|
1269
1270
|
}
|
1270
1271
|
if (listeners.length === count) {
|
1271
1272
|
this.unload();
|
1272
|
-
const ret =
|
1273
|
-
const s = sig === "SIGHUP" ?
|
1273
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
1274
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
1274
1275
|
if (!ret)
|
1275
1276
|
process2.kill(process2.pid, s);
|
1276
1277
|
}
|
1277
1278
|
};
|
1278
1279
|
}
|
1279
|
-
|
1280
|
-
|
1280
|
+
this.#originalProcessReallyExit = process2.reallyExit;
|
1281
|
+
this.#originalProcessEmit = process2.emit;
|
1281
1282
|
}
|
1282
1283
|
onExit(cb, opts) {
|
1283
|
-
if (!processOk(
|
1284
|
+
if (!processOk(this.#process)) {
|
1284
1285
|
return () => {
|
1285
1286
|
};
|
1286
1287
|
}
|
1287
|
-
if (
|
1288
|
+
if (this.#loaded === false) {
|
1288
1289
|
this.load();
|
1289
1290
|
}
|
1290
1291
|
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
1291
|
-
|
1292
|
+
this.#emitter.on(ev, cb);
|
1292
1293
|
return () => {
|
1293
|
-
|
1294
|
-
if (
|
1294
|
+
this.#emitter.removeListener(ev, cb);
|
1295
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
1295
1296
|
this.unload();
|
1296
1297
|
}
|
1297
1298
|
};
|
1298
1299
|
}
|
1299
1300
|
load() {
|
1300
|
-
if (
|
1301
|
+
if (this.#loaded) {
|
1301
1302
|
return;
|
1302
1303
|
}
|
1303
|
-
|
1304
|
-
|
1304
|
+
this.#loaded = true;
|
1305
|
+
this.#emitter.count += 1;
|
1305
1306
|
for (const sig of signals) {
|
1306
1307
|
try {
|
1307
|
-
const fn =
|
1308
|
+
const fn = this.#sigListeners[sig];
|
1308
1309
|
if (fn)
|
1309
|
-
|
1310
|
+
this.#process.on(sig, fn);
|
1310
1311
|
} catch (_) {
|
1311
1312
|
}
|
1312
1313
|
}
|
1313
|
-
|
1314
|
-
return
|
1314
|
+
this.#process.emit = (ev, ...a) => {
|
1315
|
+
return this.#processEmit(ev, ...a);
|
1315
1316
|
};
|
1316
|
-
|
1317
|
-
return
|
1317
|
+
this.#process.reallyExit = (code) => {
|
1318
|
+
return this.#processReallyExit(code);
|
1318
1319
|
};
|
1319
1320
|
}
|
1320
1321
|
unload() {
|
1321
|
-
if (!
|
1322
|
+
if (!this.#loaded) {
|
1322
1323
|
return;
|
1323
1324
|
}
|
1324
|
-
|
1325
|
+
this.#loaded = false;
|
1325
1326
|
signals.forEach((sig) => {
|
1326
|
-
const listener =
|
1327
|
+
const listener = this.#sigListeners[sig];
|
1327
1328
|
if (!listener) {
|
1328
1329
|
throw new Error("Listener not defined for signal: " + sig);
|
1329
1330
|
}
|
1330
1331
|
try {
|
1331
|
-
|
1332
|
+
this.#process.removeListener(sig, listener);
|
1332
1333
|
} catch (_) {
|
1333
1334
|
}
|
1334
1335
|
});
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
if (ev === "exit" && processOk((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process))) {
|
1359
|
-
if (typeof args[0] === "number") {
|
1360
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode = args[0];
|
1336
|
+
this.#process.emit = this.#originalProcessEmit;
|
1337
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
1338
|
+
this.#emitter.count -= 1;
|
1339
|
+
}
|
1340
|
+
#processReallyExit(code) {
|
1341
|
+
if (!processOk(this.#process)) {
|
1342
|
+
return 0;
|
1343
|
+
}
|
1344
|
+
this.#process.exitCode = code || 0;
|
1345
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
1346
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
1347
|
+
}
|
1348
|
+
#processEmit(ev, ...args) {
|
1349
|
+
const og = this.#originalProcessEmit;
|
1350
|
+
if (ev === "exit" && processOk(this.#process)) {
|
1351
|
+
if (typeof args[0] === "number") {
|
1352
|
+
this.#process.exitCode = args[0];
|
1353
|
+
}
|
1354
|
+
const ret = og.call(this.#process, ev, ...args);
|
1355
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
1356
|
+
return ret;
|
1357
|
+
} else {
|
1358
|
+
return og.call(this.#process, ev, ...args);
|
1361
1359
|
}
|
1362
|
-
const ret = og.call((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process), ev, ...args);
|
1363
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).emit("exit", (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode, null);
|
1364
|
-
return ret;
|
1365
|
-
} else {
|
1366
|
-
return og.call((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process), ev, ...args);
|
1367
1360
|
}
|
1368
1361
|
};
|
1369
1362
|
var process$1 = globalThis.process;
|
@@ -1569,9 +1562,9 @@ var getChunkType = (chunk) => {
|
|
1569
1562
|
};
|
1570
1563
|
var { toString: objectToString } = Object.prototype;
|
1571
1564
|
var MaxBufferError = class extends Error {
|
1565
|
+
name = "MaxBufferError";
|
1572
1566
|
constructor() {
|
1573
1567
|
super("maxBuffer exceeded");
|
1574
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "name", "MaxBufferError");
|
1575
1568
|
}
|
1576
1569
|
};
|
1577
1570
|
var identity = (value) => value;
|
@@ -1979,59 +1972,55 @@ function execaCommand(command, options2) {
|
|
1979
1972
|
return execa(file, args, options2);
|
1980
1973
|
}
|
1981
1974
|
var Node = class {
|
1975
|
+
value;
|
1976
|
+
next;
|
1982
1977
|
constructor(value) {
|
1983
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "value");
|
1984
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "next");
|
1985
1978
|
this.value = value;
|
1986
1979
|
}
|
1987
1980
|
};
|
1988
|
-
var _head, _tail, _size;
|
1989
1981
|
var Queue = class {
|
1982
|
+
#head;
|
1983
|
+
#tail;
|
1984
|
+
#size;
|
1990
1985
|
constructor() {
|
1991
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _head);
|
1992
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _tail);
|
1993
|
-
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _size);
|
1994
1986
|
this.clear();
|
1995
1987
|
}
|
1996
1988
|
enqueue(value) {
|
1997
1989
|
const node = new Node(value);
|
1998
|
-
if (
|
1999
|
-
|
2000
|
-
|
1990
|
+
if (this.#head) {
|
1991
|
+
this.#tail.next = node;
|
1992
|
+
this.#tail = node;
|
2001
1993
|
} else {
|
2002
|
-
|
2003
|
-
|
1994
|
+
this.#head = node;
|
1995
|
+
this.#tail = node;
|
2004
1996
|
}
|
2005
|
-
|
1997
|
+
this.#size++;
|
2006
1998
|
}
|
2007
1999
|
dequeue() {
|
2008
|
-
const current =
|
2000
|
+
const current = this.#head;
|
2009
2001
|
if (!current) {
|
2010
2002
|
return;
|
2011
2003
|
}
|
2012
|
-
|
2013
|
-
|
2004
|
+
this.#head = this.#head.next;
|
2005
|
+
this.#size--;
|
2014
2006
|
return current.value;
|
2015
2007
|
}
|
2016
2008
|
clear() {
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2009
|
+
this.#head = void 0;
|
2010
|
+
this.#tail = void 0;
|
2011
|
+
this.#size = 0;
|
2020
2012
|
}
|
2021
2013
|
get size() {
|
2022
|
-
return
|
2014
|
+
return this.#size;
|
2023
2015
|
}
|
2024
2016
|
*[Symbol.iterator]() {
|
2025
|
-
let current =
|
2017
|
+
let current = this.#head;
|
2026
2018
|
while (current) {
|
2027
2019
|
yield current.value;
|
2028
2020
|
current = current.next;
|
2029
2021
|
}
|
2030
2022
|
}
|
2031
2023
|
};
|
2032
|
-
_head = /* @__PURE__ */ new WeakMap();
|
2033
|
-
_tail = /* @__PURE__ */ new WeakMap();
|
2034
|
-
_size = /* @__PURE__ */ new WeakMap();
|
2035
2024
|
function pLimit(concurrency) {
|
2036
2025
|
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
2037
2026
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
@@ -26,29 +26,28 @@ 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_CPF2U6TN_exports = {};
|
30
|
+
__export(chunk_CPF2U6TN_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(
|
38
|
-
var
|
39
|
-
var
|
37
|
+
module.exports = __toCommonJS(chunk_CPF2U6TN_exports);
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
39
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
40
40
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_DQTWQONJ = require("./chunk-DQTWQONJ.js");
|
42
|
+
var import_chunk_L5NNYEH3 = require("./chunk-L5NNYEH3.js");
|
43
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
43
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
44
|
-
var
|
45
|
-
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
46
|
-
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
45
|
+
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
47
46
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
48
|
-
var
|
47
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
49
48
|
var import_debug = __toESM(require("@prisma/debug"));
|
50
49
|
var import_get_platform = require("@prisma/get-platform");
|
51
|
-
var import_function = (0,
|
50
|
+
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
52
51
|
var debug = (0, import_debug.default)("prisma:getConfig");
|
53
52
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
54
53
|
var GetConfigError = class extends Error {
|
@@ -65,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
65
64
|
}).exhaustive();
|
66
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
67
66
|
[Context: getConfig]`;
|
68
|
-
super((0,
|
67
|
+
super((0, import_chunk_DQTWQONJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
69
68
|
this.name = "GetConfigError";
|
70
69
|
}
|
71
70
|
};
|
@@ -83,14 +82,14 @@ function resolveUrl(envValue) {
|
|
83
82
|
return urlFromValue ?? urlEnvVarValue;
|
84
83
|
}
|
85
84
|
async function getConfig(options) {
|
86
|
-
const debugErrorType = (0,
|
85
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
87
86
|
debug(`Using getConfig Wasm`);
|
88
87
|
const configEither = (0, import_function.pipe)(
|
89
|
-
(0,
|
88
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
90
89
|
() => {
|
91
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
92
91
|
debug("Triggering a Rust panic...");
|
93
|
-
|
92
|
+
import_chunk_L5NNYEH3.prismaSchemaWasm.debug_panic();
|
94
93
|
}
|
95
94
|
const params = JSON.stringify({
|
96
95
|
prismaSchema: options.datamodel,
|
@@ -98,7 +97,7 @@ async function getConfig(options) {
|
|
98
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
99
98
|
env: process.env
|
100
99
|
});
|
101
|
-
const data =
|
100
|
+
const data = import_chunk_L5NNYEH3.prismaSchemaWasm.get_config(params);
|
102
101
|
return data;
|
103
102
|
},
|
104
103
|
(e) => ({
|
@@ -107,11 +106,11 @@ async function getConfig(options) {
|
|
107
106
|
error: e
|
108
107
|
})
|
109
108
|
),
|
110
|
-
(0,
|
111
|
-
(0,
|
109
|
+
(0, import_chunk_5DBOS77Y.map)((result) => ({ result })),
|
110
|
+
(0, import_chunk_5DBOS77Y.chainW)(
|
112
111
|
({ result }) => (
|
113
112
|
// NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
|
114
|
-
(0,
|
113
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
115
114
|
() => JSON.parse(result),
|
116
115
|
(e) => ({
|
117
116
|
type: "parse-json",
|
@@ -121,18 +120,18 @@ async function getConfig(options) {
|
|
121
120
|
)
|
122
121
|
)
|
123
122
|
),
|
124
|
-
(0,
|
123
|
+
(0, import_chunk_5DBOS77Y.chainW)((response) => {
|
125
124
|
if (response.errors.length > 0) {
|
126
|
-
return (0,
|
125
|
+
return (0, import_chunk_5DBOS77Y.left)({
|
127
126
|
type: "validation-error",
|
128
127
|
reason: "(get-config wasm)",
|
129
128
|
error: response.errors
|
130
129
|
});
|
131
130
|
}
|
132
|
-
return (0,
|
131
|
+
return (0, import_chunk_5DBOS77Y.right)(response.config);
|
133
132
|
})
|
134
133
|
);
|
135
|
-
if ((0,
|
134
|
+
if ((0, import_chunk_5DBOS77Y.isRight)(configEither)) {
|
136
135
|
debug("config data retrieved without errors in getConfig Wasm");
|
137
136
|
const { right: data } = configEither;
|
138
137
|
for (const generator of data.generators) {
|
@@ -142,30 +141,27 @@ async function getConfig(options) {
|
|
142
141
|
}
|
143
142
|
const error = (0, import_chunk_XKZ6CBLA.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
144
143
|
debugErrorType(e);
|
145
|
-
if ((0,
|
146
|
-
const { message, stack } = (0,
|
147
|
-
const panic = new
|
144
|
+
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
145
|
+
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
146
|
+
const panic = new import_chunk_LMVSIVKQ.RustPanic(
|
148
147
|
/* message */
|
149
148
|
message,
|
150
149
|
/* rustStack */
|
151
150
|
stack,
|
152
151
|
/* request */
|
153
152
|
"@prisma/prisma-schema-wasm get_config",
|
154
|
-
"FMT_CLI"
|
155
|
-
/*
|
156
|
-
options.prismaPath,
|
157
|
-
/* schema */
|
158
|
-
(0, import_chunk_YRBRUREX.toMultipleSchemas)(options.datamodel)
|
153
|
+
"FMT_CLI"
|
154
|
+
/* FMT_CLI */
|
159
155
|
);
|
160
156
|
return panic;
|
161
157
|
}
|
162
158
|
const errorOutput = e.error.message;
|
163
|
-
return new GetConfigError((0,
|
159
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
164
160
|
}).with({ type: "validation-error" }, (e) => {
|
165
161
|
return new GetConfigError({
|
166
162
|
_tag: "parsed",
|
167
163
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
168
|
-
reason: (0,
|
164
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
169
165
|
message: formatErrors(e.error)
|
170
166
|
});
|
171
167
|
}).otherwise((e) => {
|
@@ -26,14 +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(
|
29
|
+
var chunk_CR3XKUEA_exports = {};
|
30
|
+
__export(chunk_CR3XKUEA_exports, {
|
31
31
|
isCurrentBinInstalledGlobally: () => isCurrentBinInstalledGlobally
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
34
|
-
var
|
33
|
+
module.exports = __toCommonJS(chunk_CR3XKUEA_exports);
|
34
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
35
35
|
var import_fs = __toESM(require("fs"));
|
36
|
-
var require_ini = (0,
|
36
|
+
var require_ini = (0, import_chunk_4VNS5WPM.__commonJS)({
|
37
37
|
"../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports, module2) {
|
38
38
|
"use strict";
|
39
39
|
var { hasOwnProperty } = Object.prototype;
|
@@ -186,12 +186,12 @@ var require_ini = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
186
186
|
};
|
187
187
|
}
|
188
188
|
});
|
189
|
-
var require_global_dirs = (0,
|
189
|
+
var require_global_dirs = (0, import_chunk_4VNS5WPM.__commonJS)({
|
190
190
|
"../../node_modules/.pnpm/global-dirs@4.0.0/node_modules/global-dirs/index.js"(exports) {
|
191
191
|
"use strict";
|
192
|
-
var path = (0,
|
193
|
-
var os = (0,
|
194
|
-
var fs2 = (0,
|
192
|
+
var path = (0, import_chunk_4VNS5WPM.__require)("path");
|
193
|
+
var os = (0, import_chunk_4VNS5WPM.__require)("os");
|
194
|
+
var fs2 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
195
195
|
var ini = require_ini();
|
196
196
|
var isWindows = process.platform === "win32";
|
197
197
|
var readRc = (filePath) => {
|
@@ -282,7 +282,7 @@ var require_global_dirs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
282
282
|
exports.yarn.binaries = path.join(exports.yarn.packages, ".bin");
|
283
283
|
}
|
284
284
|
});
|
285
|
-
var import_global_dirs = (0,
|
285
|
+
var import_global_dirs = (0, import_chunk_4VNS5WPM.__toESM)(require_global_dirs());
|
286
286
|
function isCurrentBinInstalledGlobally() {
|
287
287
|
try {
|
288
288
|
const realPrismaPath = import_fs.default.realpathSync(process.argv[1]);
|
@@ -16,12 +16,12 @@ 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_CRVLHWC5_exports = {};
|
20
|
+
__export(chunk_CRVLHWC5_exports, {
|
21
21
|
extractPreviewFeatures: () => extractPreviewFeatures
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_CRVLHWC5_exports);
|
24
24
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
25
|
-
function extractPreviewFeatures(
|
26
|
-
return
|
25
|
+
function extractPreviewFeatures(generators) {
|
26
|
+
return generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) === "prisma-client-js")?.previewFeatures || [];
|
27
27
|
}
|
@@ -26,18 +26,18 @@ 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_D4VDA2TZ_exports = {};
|
30
|
+
__export(chunk_D4VDA2TZ_exports, {
|
31
31
|
locateLocalCloudflareD1: () => locateLocalCloudflareD1
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
33
|
+
module.exports = __toCommonJS(chunk_D4VDA2TZ_exports);
|
34
34
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
35
|
-
var
|
36
|
-
var
|
35
|
+
var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
|
36
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
37
37
|
var import_node_path = __toESM(require("node:path"));
|
38
38
|
var import_node_process = __toESM(require("node:process"));
|
39
|
-
var import_fast_glob = (0,
|
40
|
-
var import_globby = (0,
|
39
|
+
var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_out)());
|
40
|
+
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
|
41
41
|
var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
|
42
42
|
async function locateLocalCloudflareD1({ arg }) {
|
43
43
|
const cwd = import_node_process.default.cwd();
|
@@ -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_D4VZUY3O_exports = {};
|
30
|
+
__export(chunk_D4VZUY3O_exports, {
|
31
31
|
arg: () => arg,
|
32
32
|
format: () => format,
|
33
33
|
isError: () => isError
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_D4VZUY3O_exports);
|
36
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
37
37
|
var import_arg = __toESM(require("arg"));
|
38
|
-
var require_min_indent = (0,
|
38
|
+
var require_min_indent = (0, import_chunk_4VNS5WPM.__commonJS)({
|
39
39
|
"../../node_modules/.pnpm/min-indent@1.0.1/node_modules/min-indent/index.js"(exports, module2) {
|
40
40
|
"use strict";
|
41
41
|
module2.exports = (string) => {
|
@@ -47,23 +47,17 @@ var require_min_indent = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
47
47
|
};
|
48
48
|
}
|
49
49
|
});
|
50
|
-
var
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
const indent = minIndent(string);
|
56
|
-
if (indent === 0) {
|
57
|
-
return string;
|
58
|
-
}
|
59
|
-
const regex = new RegExp(`^[ \\t]{${indent}}`, "gm");
|
60
|
-
return string.replace(regex, "");
|
61
|
-
};
|
50
|
+
var import_min_indent = (0, import_chunk_4VNS5WPM.__toESM)(require_min_indent(), 1);
|
51
|
+
function stripIndent(string) {
|
52
|
+
const indent = (0, import_min_indent.default)(string);
|
53
|
+
if (indent === 0) {
|
54
|
+
return string;
|
62
55
|
}
|
63
|
-
});
|
64
|
-
|
56
|
+
const regex = new RegExp(`^[ \\t]{${indent}}`, "gm");
|
57
|
+
return string.replace(regex, "");
|
58
|
+
}
|
65
59
|
function format(input = "") {
|
66
|
-
return (
|
60
|
+
return stripIndent(input).trimRight() + "\n";
|
67
61
|
}
|
68
62
|
function arg(argv, spec, stopAtPositional = true, permissive = false) {
|
69
63
|
try {
|