@ohos-ports/prisma-internals 7.10.0-beta.0
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/LICENSE +201 -0
- package/dist/Generator.d.ts +42 -0
- package/dist/Generator.js +29 -0
- package/dist/WasmPanicRegistry.d.ts +5 -0
- package/dist/WasmPanicRegistry.js +25 -0
- package/dist/WasmSchemaEngineLoader.d.ts +5 -0
- package/dist/WasmSchemaEngineLoader.js +25 -0
- package/dist/built-in-provider.d.ts +5 -0
- package/dist/built-in-provider.js +25 -0
- package/dist/chunk-2B26F5N3.js +72 -0
- package/dist/chunk-2IOZUH3U.js +26 -0
- package/dist/chunk-2SDPW6AX.js +39 -0
- package/dist/chunk-3IMRWXIL.js +176 -0
- package/dist/chunk-3TYD3ZGQ.js +115 -0
- package/dist/chunk-3U4QB2G3.js +166 -0
- package/dist/chunk-3VD46SL7.js +151 -0
- package/dist/chunk-3YOF262C.js +176 -0
- package/dist/chunk-3ZHE2IX4.js +55 -0
- package/dist/chunk-4VNS5WPM.js +61 -0
- package/dist/chunk-5AI4FIZ3.js +1342 -0
- package/dist/chunk-5BDP445D.js +51 -0
- package/dist/chunk-5DBOS77Y.js +609 -0
- package/dist/chunk-5FJ3MENK.js +30 -0
- package/dist/chunk-5I4ERIIY.js +30 -0
- package/dist/chunk-5PJQQKQI.js +106 -0
- package/dist/chunk-5VQNKCKW.js +38 -0
- package/dist/chunk-5WRIOIZY.js +31 -0
- package/dist/chunk-6JE6QGSJ.js +37 -0
- package/dist/chunk-6PWHYRKR.js +74 -0
- package/dist/chunk-6QMQ2JYG.js +122 -0
- package/dist/chunk-6Z766KGR.js +95 -0
- package/dist/chunk-74RGCSUJ.js +44 -0
- package/dist/chunk-7B5PXS6N.js +29 -0
- package/dist/chunk-ANU3HEGF.js +29 -0
- package/dist/chunk-BERN76ZI.js +347 -0
- package/dist/chunk-BGMZPA2F.js +39 -0
- package/dist/chunk-BPDMLM32.js +105 -0
- package/dist/chunk-C47SCASR.js +37 -0
- package/dist/chunk-CGFNDGGI.js +40 -0
- package/dist/chunk-CTQD6OLG.js +438 -0
- package/dist/chunk-CUD726EK.js +36 -0
- package/dist/chunk-CXEXLFVL.js +166 -0
- package/dist/chunk-CYAS6B5N.js +48 -0
- package/dist/chunk-D4VZUY3O.js +71 -0
- package/dist/chunk-DODIJPCS.js +34 -0
- package/dist/chunk-DTPFRZWV.js +31 -0
- package/dist/chunk-DUDEWDFC.js +101 -0
- package/dist/chunk-DZ4QWHTB.js +127 -0
- package/dist/chunk-E23HYCQJ.js +37 -0
- package/dist/chunk-E476ARWS.js +2091 -0
- package/dist/chunk-EKGEKB22.js +28 -0
- package/dist/chunk-EU6UOKRD.js +26 -0
- package/dist/chunk-EWPXLBGE.js +115 -0
- package/dist/chunk-FCYHZHVW.js +43 -0
- package/dist/chunk-FRVJZOHP.js +1823 -0
- package/dist/chunk-GJSFP4V4.js +30 -0
- package/dist/chunk-GXW4NTU2.js +34 -0
- package/dist/chunk-H4NI2RIK.js +35 -0
- package/dist/chunk-HHG4DGHC.js +496 -0
- package/dist/chunk-HPVMQFIY.js +407 -0
- package/dist/chunk-I2CBQZJY.js +122 -0
- package/dist/chunk-I4K46RGG.js +31 -0
- package/dist/chunk-I6WLABB2.js +429 -0
- package/dist/chunk-ICFLO5JW.js +26 -0
- package/dist/chunk-IL7PSY44.js +26 -0
- package/dist/chunk-IOIAK7V7.js +53 -0
- package/dist/chunk-IYN5VKMD.js +110 -0
- package/dist/chunk-J77ZIDXB.js +69 -0
- package/dist/chunk-J7ZPY2XA.js +47 -0
- package/dist/chunk-JFXHOFJA.js +46 -0
- package/dist/chunk-JOIHHXR6.js +2067 -0
- package/dist/chunk-JPZYSRK3.js +6412 -0
- package/dist/chunk-JTKAT4KZ.js +26 -0
- package/dist/chunk-K2EOOA2X.js +91 -0
- package/dist/chunk-KDP6C3CB.js +56 -0
- package/dist/chunk-L3LDE52J.js +51 -0
- package/dist/chunk-L6V54WGO.js +39 -0
- package/dist/chunk-LMVSIVKQ.js +62 -0
- package/dist/chunk-LPNBWFQ3.js +38 -0
- package/dist/chunk-LRBXMV4B.js +26 -0
- package/dist/chunk-LRU47BGE.js +78 -0
- package/dist/chunk-M3GBKLGE.js +24 -0
- package/dist/chunk-MCS5ZY6Y.js +27 -0
- package/dist/chunk-NBWRGVYR.js +47 -0
- package/dist/chunk-NIWBAJZV.js +36 -0
- package/dist/chunk-NTDBN2N2.js +104 -0
- package/dist/chunk-NVNI2SRU.js +4230 -0
- package/dist/chunk-OIVPX3BR.js +32 -0
- package/dist/chunk-PFYALFCY.js +26 -0
- package/dist/chunk-PG5FDKSF.js +79 -0
- package/dist/chunk-PKF53VLJ.js +26 -0
- package/dist/chunk-PTPRBA7K.js +6675 -0
- package/dist/chunk-QBNYSYZK.js +74 -0
- package/dist/chunk-QMNPESAP.js +124 -0
- package/dist/chunk-QN6PSQY7.js +37 -0
- package/dist/chunk-QVJ2BXKF.js +3997 -0
- package/dist/chunk-R47SFJ5Z.js +104 -0
- package/dist/chunk-R6QH57HZ.js +311 -0
- package/dist/chunk-RBDYOTWB.js +193 -0
- package/dist/chunk-SBUSVJCV.js +62 -0
- package/dist/chunk-SP2ETLT2.js +41 -0
- package/dist/chunk-TPCPXGC5.js +218 -0
- package/dist/chunk-TWSLDIFL.js +48 -0
- package/dist/chunk-UGR6KLZN.js +30 -0
- package/dist/chunk-UMM35VP5.js +1193 -0
- package/dist/chunk-VFNP7Q3Y.js +15529 -0
- package/dist/chunk-VNIE2AZB.js +41 -0
- package/dist/chunk-VUGB2H7M.js +438 -0
- package/dist/chunk-WFMA7DI5.js +92 -0
- package/dist/chunk-WV4QHCSM.js +26 -0
- package/dist/chunk-WXRVYSYN.js +33 -0
- package/dist/chunk-X3P4J7WW.js +28 -0
- package/dist/chunk-X77CS5RK.js +33 -0
- package/dist/chunk-XAAVALN7.js +110 -0
- package/dist/chunk-XXTPN4LB.js +41 -0
- package/dist/chunk-XYCIH36R.js +29 -0
- package/dist/chunk-Y4TOGY6I.js +30 -0
- package/dist/chunk-YNDZCLVL.js +307 -0
- package/dist/chunk-YXB6APHS.js +447 -0
- package/dist/chunk-ZJWZK45Z.js +68 -0
- package/dist/chunk-ZKWDIAVF.js +29 -0
- package/dist/cli/Help.d.ts +11 -0
- package/dist/cli/Help.js +27 -0
- package/dist/cli/checkUnsupportedDataProxy.d.ts +16 -0
- package/dist/cli/checkUnsupportedDataProxy.js +125 -0
- package/dist/cli/completion-values.d.ts +24 -0
- package/dist/cli/completion-values.js +47 -0
- package/dist/cli/directoryConfig.d.ts +11 -0
- package/dist/cli/directoryConfig.js +25 -0
- package/dist/cli/getGeneratorSuccessMessage.d.ts +7 -0
- package/dist/cli/getGeneratorSuccessMessage.js +29 -0
- package/dist/cli/getSchema.d.ts +46 -0
- package/dist/cli/getSchema.js +31 -0
- package/dist/cli/getTypescriptVersion.d.ts +1 -0
- package/dist/cli/getTypescriptVersion.js +25 -0
- package/dist/cli/hashes.d.ts +11 -0
- package/dist/cli/hashes.js +28 -0
- package/dist/cli/schemaContext.d.ts +56 -0
- package/dist/cli/schemaContext.js +126 -0
- package/dist/cli/types.d.ts +63 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/utils.d.ts +13 -0
- package/dist/cli/utils.js +27 -0
- package/dist/convertCredentials.d.ts +10 -0
- package/dist/convertCredentials.js +28 -0
- package/dist/engine-commands/errorHelpers.d.ts +4 -0
- package/dist/engine-commands/errorHelpers.js +28 -0
- package/dist/engine-commands/formatSchema.d.ts +22 -0
- package/dist/engine-commands/formatSchema.js +124 -0
- package/dist/engine-commands/getConfig.d.ts +27 -0
- package/dist/engine-commands/getConfig.js +39 -0
- package/dist/engine-commands/getDmmf.d.ts +21 -0
- package/dist/engine-commands/getDmmf.js +40 -0
- package/dist/engine-commands/getEngineVersion.d.ts +4 -0
- package/dist/engine-commands/getEngineVersion.js +33 -0
- package/dist/engine-commands/getEnginesInfo.d.ts +20 -0
- package/dist/engine-commands/getEnginesInfo.js +36 -0
- package/dist/engine-commands/index.d.ts +10 -0
- package/dist/engine-commands/index.js +136 -0
- package/dist/engine-commands/lintSchema.d.ts +26 -0
- package/dist/engine-commands/lintSchema.js +34 -0
- package/dist/engine-commands/mergeSchemas.d.ts +12 -0
- package/dist/engine-commands/mergeSchemas.js +39 -0
- package/dist/engine-commands/queryEngineCommons.d.ts +31 -0
- package/dist/engine-commands/queryEngineCommons.js +33 -0
- package/dist/engine-commands/relativizePathInPSLError.d.ts +1 -0
- package/dist/engine-commands/relativizePathInPSLError.js +25 -0
- package/dist/engine-commands/validate.d.ts +12 -0
- package/dist/engine-commands/validate.js +39 -0
- package/dist/errorReporting.d.ts +25 -0
- package/dist/errorReporting.js +29 -0
- package/dist/get-generators/getGenerators.d.ts +71 -0
- package/dist/get-generators/getGenerators.js +127 -0
- package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +3 -0
- package/dist/get-generators/utils/binaryTypeToEngineType.js +25 -0
- package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +3 -0
- package/dist/get-generators/utils/engineTypeToBinaryType.js +25 -0
- package/dist/get-generators/utils/fixBinaryTargets.d.ts +3 -0
- package/dist/get-generators/utils/fixBinaryTargets.js +25 -0
- package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +7 -0
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +30 -0
- package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +2 -0
- package/dist/get-generators/utils/getEngineVersionForGenerator.js +25 -0
- package/dist/get-generators/utils/printGeneratorConfig.d.ts +9 -0
- package/dist/get-generators/utils/printGeneratorConfig.js +29 -0
- package/dist/getPackedPackage.d.ts +1 -0
- package/dist/getPackedPackage.js +29 -0
- package/dist/highlight/highlight.d.ts +3 -0
- package/dist/highlight/highlight.js +32 -0
- package/dist/highlight/languages/dml.d.ts +2 -0
- package/dist/highlight/languages/dml.js +25 -0
- package/dist/highlight/languages/sql.d.ts +2 -0
- package/dist/highlight/languages/sql.js +25 -0
- package/dist/highlight/prism.d.ts +6 -0
- package/dist/highlight/prism.js +28 -0
- package/dist/highlight/theme.d.ts +2 -0
- package/dist/highlight/theme.js +26 -0
- package/dist/highlight/types.d.ts +35 -0
- package/dist/highlight/types.js +1 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +257 -0
- package/dist/logger.d.ts +14 -0
- package/dist/logger.js +32 -0
- package/dist/magic-string.es-B2CP4FDB.js +1324 -0
- package/dist/migrateTypes.d.ts +99 -0
- package/dist/migrateTypes.js +1 -0
- package/dist/multipart-parser-3AFJFP6K.js +374 -0
- package/dist/panic.d.ts +31 -0
- package/dist/panic.js +29 -0
- package/dist/resolveBinary.d.ts +6 -0
- package/dist/resolveBinary.js +34 -0
- package/dist/resolveOutput.d.ts +5 -0
- package/dist/resolveOutput.js +25 -0
- package/dist/resolvePkg.d.ts +7 -0
- package/dist/resolvePkg.js +25 -0
- package/dist/schemaEngineCommands.d.ts +36 -0
- package/dist/schemaEngineCommands.js +36 -0
- package/dist/sendPanic.d.ts +10 -0
- package/dist/sendPanic.js +29 -0
- package/dist/types.d.ts +34 -0
- package/dist/types.js +1 -0
- package/dist/utils/__tests__/isCi.test.js +58 -0
- package/dist/utils/__tests__/isInteractive.test.js +47 -0
- package/dist/utils/assertAlways.d.ts +14 -0
- package/dist/utils/assertAlways.js +25 -0
- package/dist/utils/assertNever.d.ts +27 -0
- package/dist/utils/assertNever.js +25 -0
- package/dist/utils/binaryTargetRegex.d.ts +8 -0
- package/dist/utils/binaryTargetRegex.js +25 -0
- package/dist/utils/callOnce.d.ts +13 -0
- package/dist/utils/callOnce.js +25 -0
- package/dist/utils/callOnce.test.d.ts +1 -0
- package/dist/utils/callOnce.test.js +36 -0
- package/dist/utils/canPrompt.d.ts +1 -0
- package/dist/utils/canPrompt.js +27 -0
- package/dist/utils/chmodPlusX.d.ts +1 -0
- package/dist/utils/chmodPlusX.js +25 -0
- package/dist/utils/drawBox.d.ts +9 -0
- package/dist/utils/drawBox.js +26 -0
- package/dist/utils/extractPreviewFeatures.d.ts +2 -0
- package/dist/utils/extractPreviewFeatures.js +28 -0
- package/dist/utils/formatTable.d.ts +5 -0
- package/dist/utils/formatTable.js +25 -0
- package/dist/utils/formatms.d.ts +5 -0
- package/dist/utils/formatms.js +25 -0
- package/dist/utils/fs-functional.d.ts +53 -0
- package/dist/utils/fs-functional.js +35 -0
- package/dist/utils/fs-utils.d.ts +30 -0
- package/dist/utils/fs-utils.js +32 -0
- package/dist/utils/getCommandWithExecutor.d.ts +1 -0
- package/dist/utils/getCommandWithExecutor.js +26 -0
- package/dist/utils/getGitHubIssueUrl.d.ts +18 -0
- package/dist/utils/getGitHubIssueUrl.js +27 -0
- package/dist/utils/getVersionFromPackageJson.d.ts +1 -0
- package/dist/utils/getVersionFromPackageJson.js +26 -0
- package/dist/utils/handlePanic.d.ts +11 -0
- package/dist/utils/handlePanic.js +36 -0
- package/dist/utils/hasOwnProperty.d.ts +1 -0
- package/dist/utils/hasOwnProperty.js +25 -0
- package/dist/utils/isCi.d.ts +1 -0
- package/dist/utils/isCi.js +25 -0
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -0
- package/dist/utils/isCurrentBinInstalledGlobally.js +25 -0
- package/dist/utils/isInContainer.d.ts +5 -0
- package/dist/utils/isInContainer.js +25 -0
- package/dist/utils/isInNpmLifecycleHook.d.ts +4 -0
- package/dist/utils/isInNpmLifecycleHook.js +25 -0
- package/dist/utils/isInteractive.d.ts +6 -0
- package/dist/utils/isInteractive.js +25 -0
- package/dist/utils/isPromiseLike.d.ts +1 -0
- package/dist/utils/isPromiseLike.js +25 -0
- package/dist/utils/isValidJsIdentifier.d.ts +1 -0
- package/dist/utils/isValidJsIdentifier.js +25 -0
- package/dist/utils/keyBy.d.ts +9 -0
- package/dist/utils/keyBy.js +25 -0
- package/dist/utils/link.d.ts +1 -0
- package/dist/utils/link.js +26 -0
- package/dist/utils/mapKeys.d.ts +1 -0
- package/dist/utils/mapKeys.js +25 -0
- package/dist/utils/mapObjectValues.d.ts +1 -0
- package/dist/utils/mapObjectValues.js +25 -0
- package/dist/utils/max.d.ts +11 -0
- package/dist/utils/max.js +26 -0
- package/dist/utils/max.test.d.ts +1 -0
- package/dist/utils/max.test.js +22 -0
- package/dist/utils/maybeInGitHook.d.ts +9 -0
- package/dist/utils/maybeInGitHook.js +25 -0
- package/dist/utils/missingDatasource.d.ts +1 -0
- package/dist/utils/missingDatasource.js +32 -0
- package/dist/utils/missingGeneratorMessage.d.ts +3 -0
- package/dist/utils/missingGeneratorMessage.js +34 -0
- package/dist/utils/now.d.ts +3 -0
- package/dist/utils/now.js +51 -0
- package/dist/utils/omit.d.ts +6 -0
- package/dist/utils/omit.js +30 -0
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.d.ts +1 -0
- package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +25 -0
- package/dist/utils/parseEnvValue.d.ts +17 -0
- package/dist/utils/parseEnvValue.js +27 -0
- package/dist/utils/path.d.ts +14 -0
- package/dist/utils/path.js +26 -0
- package/dist/utils/path.test.d.ts +1 -0
- package/dist/utils/path.test.js +54 -0
- package/dist/utils/pick.d.ts +1 -0
- package/dist/utils/pick.js +25 -0
- package/dist/utils/printConfigWarnings.d.ts +1 -0
- package/dist/utils/printConfigWarnings.js +26 -0
- package/dist/utils/prismaPostgres.d.ts +13 -0
- package/dist/utils/prismaPostgres.js +28 -0
- package/dist/utils/prismaPostgres.test.d.ts +1 -0
- package/dist/utils/prismaPostgres.test.js +33 -0
- package/dist/utils/schemaFileInput.d.ts +2 -0
- package/dist/utils/schemaFileInput.js +25 -0
- package/dist/utils/setClassName.d.ts +9 -0
- package/dist/utils/setClassName.js +25 -0
- package/dist/utils/toSchemasContainer.d.ts +5 -0
- package/dist/utils/toSchemasContainer.js +26 -0
- package/dist/utils/unique.d.ts +5 -0
- package/dist/utils/unique.js +38 -0
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +17 -0
- package/dist/utils/validatePrismaConfigWithDatasource.js +28 -0
- package/dist/utils/vercelPkgPathRegex.d.ts +1 -0
- package/dist/utils/vercelPkgPathRegex.js +25 -0
- package/dist/warnOnce.d.ts +1 -0
- package/dist/warnOnce.js +27 -0
- package/dist/wasm.d.ts +5 -0
- package/dist/wasm.js +29 -0
- package/package.json +93 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_YXB6APHS_exports = {};
|
|
30
|
+
__export(chunk_YXB6APHS_exports, {
|
|
31
|
+
getGitHubIssueUrl: () => getGitHubIssueUrl,
|
|
32
|
+
wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(chunk_YXB6APHS_exports);
|
|
35
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
36
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
37
|
+
var import_node_util = require("node:util");
|
|
38
|
+
var import_get_platform = require("@prisma/get-platform");
|
|
39
|
+
var import_node_process = __toESM(require("node:process"));
|
|
40
|
+
var import_node_os = __toESM(require("node:os"));
|
|
41
|
+
var import_node_fs = __toESM(require("node:fs"));
|
|
42
|
+
var import_node_fs2 = __toESM(require("node:fs"));
|
|
43
|
+
var import_node_fs3 = __toESM(require("node:fs"));
|
|
44
|
+
var import_prompts = __toESM(require("prompts"));
|
|
45
|
+
var require_is_windows = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
46
|
+
"../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports, module2) {
|
|
47
|
+
"use strict";
|
|
48
|
+
(function(factory) {
|
|
49
|
+
if (exports && typeof exports === "object" && typeof module2 !== "undefined") {
|
|
50
|
+
module2.exports = factory();
|
|
51
|
+
} else if (typeof define === "function" && define.amd) {
|
|
52
|
+
define([], factory);
|
|
53
|
+
} else if (typeof window !== "undefined") {
|
|
54
|
+
window.isWindows = factory();
|
|
55
|
+
} else if (typeof global !== "undefined") {
|
|
56
|
+
global.isWindows = factory();
|
|
57
|
+
} else if (typeof self !== "undefined") {
|
|
58
|
+
self.isWindows = factory();
|
|
59
|
+
} else {
|
|
60
|
+
this.isWindows = factory();
|
|
61
|
+
}
|
|
62
|
+
})(function() {
|
|
63
|
+
"use strict";
|
|
64
|
+
return function isWindows2() {
|
|
65
|
+
return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE));
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var require_new_github_issue_url = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
71
|
+
"../../node_modules/.pnpm/new-github-issue-url@0.2.1/node_modules/new-github-issue-url/index.js"(exports, module2) {
|
|
72
|
+
"use strict";
|
|
73
|
+
module2.exports = (options = {}) => {
|
|
74
|
+
let repoUrl;
|
|
75
|
+
if (options.repoUrl) {
|
|
76
|
+
repoUrl = options.repoUrl;
|
|
77
|
+
} else if (options.user && options.repo) {
|
|
78
|
+
repoUrl = `https://github.com/${options.user}/${options.repo}`;
|
|
79
|
+
} else {
|
|
80
|
+
throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");
|
|
81
|
+
}
|
|
82
|
+
const url = new URL(`${repoUrl}/issues/new`);
|
|
83
|
+
const types = [
|
|
84
|
+
"body",
|
|
85
|
+
"title",
|
|
86
|
+
"labels",
|
|
87
|
+
"template",
|
|
88
|
+
"milestone",
|
|
89
|
+
"assignee",
|
|
90
|
+
"projects"
|
|
91
|
+
];
|
|
92
|
+
for (const type of types) {
|
|
93
|
+
let value = options[type];
|
|
94
|
+
if (value === void 0) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (type === "labels" || type === "projects") {
|
|
98
|
+
if (!Array.isArray(value)) {
|
|
99
|
+
throw new TypeError(`The \`${type}\` option should be an array`);
|
|
100
|
+
}
|
|
101
|
+
value = value.join(",");
|
|
102
|
+
}
|
|
103
|
+
url.searchParams.set(type, value);
|
|
104
|
+
}
|
|
105
|
+
return url.toString();
|
|
106
|
+
};
|
|
107
|
+
module2.exports.default = module2.exports;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
var require_is_docker = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
111
|
+
"../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js"(exports, module2) {
|
|
112
|
+
"use strict";
|
|
113
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
|
114
|
+
var isDocker2;
|
|
115
|
+
function hasDockerEnv2() {
|
|
116
|
+
try {
|
|
117
|
+
fs4.statSync("/.dockerenv");
|
|
118
|
+
return true;
|
|
119
|
+
} catch (_) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function hasDockerCGroup2() {
|
|
124
|
+
try {
|
|
125
|
+
return fs4.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
126
|
+
} catch (_) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
module2.exports = () => {
|
|
131
|
+
if (isDocker2 === void 0) {
|
|
132
|
+
isDocker2 = hasDockerEnv2() || hasDockerCGroup2();
|
|
133
|
+
}
|
|
134
|
+
return isDocker2;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
var require_is_wsl = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
139
|
+
"../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports, module2) {
|
|
140
|
+
"use strict";
|
|
141
|
+
var os2 = (0, import_chunk_4VNS5WPM.__require)("os");
|
|
142
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
|
143
|
+
var isDocker2 = require_is_docker();
|
|
144
|
+
var isWsl2 = () => {
|
|
145
|
+
if (process.platform !== "linux") {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
if (os2.release().toLowerCase().includes("microsoft")) {
|
|
149
|
+
if (isDocker2()) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
return fs4.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker2() : false;
|
|
156
|
+
} catch (_) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
if (process.env.__IS_WSL_TEST__) {
|
|
161
|
+
module2.exports = isWsl2;
|
|
162
|
+
} else {
|
|
163
|
+
module2.exports = isWsl2();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
var require_open = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
168
|
+
"../../node_modules/.pnpm/open@7.4.2/node_modules/open/index.js"(exports, module2) {
|
|
169
|
+
"use strict";
|
|
170
|
+
var { promisify } = (0, import_chunk_4VNS5WPM.__require)("util");
|
|
171
|
+
var path = (0, import_chunk_4VNS5WPM.__require)("path");
|
|
172
|
+
var childProcess = (0, import_chunk_4VNS5WPM.__require)("child_process");
|
|
173
|
+
var fs4 = (0, import_chunk_4VNS5WPM.__require)("fs");
|
|
174
|
+
var isWsl2 = require_is_wsl();
|
|
175
|
+
var isDocker2 = require_is_docker();
|
|
176
|
+
var pAccess = promisify(fs4.access);
|
|
177
|
+
var pReadFile = promisify(fs4.readFile);
|
|
178
|
+
var localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
179
|
+
var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
180
|
+
const defaultMountPoint = "/mnt/";
|
|
181
|
+
let mountPoint;
|
|
182
|
+
return async function() {
|
|
183
|
+
if (mountPoint) {
|
|
184
|
+
return mountPoint;
|
|
185
|
+
}
|
|
186
|
+
const configFilePath = "/etc/wsl.conf";
|
|
187
|
+
let isConfigFileExists = false;
|
|
188
|
+
try {
|
|
189
|
+
await pAccess(configFilePath, fs4.constants.F_OK);
|
|
190
|
+
isConfigFileExists = true;
|
|
191
|
+
} catch (_) {
|
|
192
|
+
}
|
|
193
|
+
if (!isConfigFileExists) {
|
|
194
|
+
return defaultMountPoint;
|
|
195
|
+
}
|
|
196
|
+
const configContent = await pReadFile(configFilePath, { encoding: "utf8" });
|
|
197
|
+
const configMountPoint = /root\s*=\s*(.*)/g.exec(configContent);
|
|
198
|
+
if (!configMountPoint) {
|
|
199
|
+
return defaultMountPoint;
|
|
200
|
+
}
|
|
201
|
+
mountPoint = configMountPoint[1].trim();
|
|
202
|
+
mountPoint = mountPoint.endsWith("/") ? mountPoint : mountPoint + "/";
|
|
203
|
+
return mountPoint;
|
|
204
|
+
};
|
|
205
|
+
})();
|
|
206
|
+
module2.exports = async (target, options) => {
|
|
207
|
+
if (typeof target !== "string") {
|
|
208
|
+
throw new TypeError("Expected a `target`");
|
|
209
|
+
}
|
|
210
|
+
options = {
|
|
211
|
+
wait: false,
|
|
212
|
+
background: false,
|
|
213
|
+
allowNonzeroExitCode: false,
|
|
214
|
+
...options
|
|
215
|
+
};
|
|
216
|
+
let command;
|
|
217
|
+
let { app } = options;
|
|
218
|
+
let appArguments = [];
|
|
219
|
+
const cliArguments = [];
|
|
220
|
+
const childProcessOptions = {};
|
|
221
|
+
if (Array.isArray(app)) {
|
|
222
|
+
appArguments = app.slice(1);
|
|
223
|
+
app = app[0];
|
|
224
|
+
}
|
|
225
|
+
if (process.platform === "darwin") {
|
|
226
|
+
command = "open";
|
|
227
|
+
if (options.wait) {
|
|
228
|
+
cliArguments.push("--wait-apps");
|
|
229
|
+
}
|
|
230
|
+
if (options.background) {
|
|
231
|
+
cliArguments.push("--background");
|
|
232
|
+
}
|
|
233
|
+
if (app) {
|
|
234
|
+
cliArguments.push("-a", app);
|
|
235
|
+
}
|
|
236
|
+
} else if (process.platform === "win32" || isWsl2 && !isDocker2()) {
|
|
237
|
+
const mountPoint = await getWslDrivesMountPoint();
|
|
238
|
+
command = isWsl2 ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
|
|
239
|
+
cliArguments.push(
|
|
240
|
+
"-NoProfile",
|
|
241
|
+
"-NonInteractive",
|
|
242
|
+
"\u2013ExecutionPolicy",
|
|
243
|
+
"Bypass",
|
|
244
|
+
"-EncodedCommand"
|
|
245
|
+
);
|
|
246
|
+
if (!isWsl2) {
|
|
247
|
+
childProcessOptions.windowsVerbatimArguments = true;
|
|
248
|
+
}
|
|
249
|
+
const encodedArguments = ["Start"];
|
|
250
|
+
if (options.wait) {
|
|
251
|
+
encodedArguments.push("-Wait");
|
|
252
|
+
}
|
|
253
|
+
if (app) {
|
|
254
|
+
encodedArguments.push(`"\`"${app}\`""`, "-ArgumentList");
|
|
255
|
+
appArguments.unshift(target);
|
|
256
|
+
} else {
|
|
257
|
+
encodedArguments.push(`"${target}"`);
|
|
258
|
+
}
|
|
259
|
+
if (appArguments.length > 0) {
|
|
260
|
+
appArguments = appArguments.map((arg) => `"\`"${arg}\`""`);
|
|
261
|
+
encodedArguments.push(appArguments.join(","));
|
|
262
|
+
}
|
|
263
|
+
target = Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
|
|
264
|
+
} else {
|
|
265
|
+
if (app) {
|
|
266
|
+
command = app;
|
|
267
|
+
} else {
|
|
268
|
+
const isBundled = !__dirname || __dirname === "/";
|
|
269
|
+
let exeLocalXdgOpen = false;
|
|
270
|
+
try {
|
|
271
|
+
await pAccess(localXdgOpenPath, fs4.constants.X_OK);
|
|
272
|
+
exeLocalXdgOpen = true;
|
|
273
|
+
} catch (_) {
|
|
274
|
+
}
|
|
275
|
+
const useSystemXdgOpen = process.versions.electron || process.platform === "android" || isBundled || !exeLocalXdgOpen;
|
|
276
|
+
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
277
|
+
}
|
|
278
|
+
if (appArguments.length > 0) {
|
|
279
|
+
cliArguments.push(...appArguments);
|
|
280
|
+
}
|
|
281
|
+
if (!options.wait) {
|
|
282
|
+
childProcessOptions.stdio = "ignore";
|
|
283
|
+
childProcessOptions.detached = true;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
cliArguments.push(target);
|
|
287
|
+
if (process.platform === "darwin" && appArguments.length > 0) {
|
|
288
|
+
cliArguments.push("--args", ...appArguments);
|
|
289
|
+
}
|
|
290
|
+
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
291
|
+
if (options.wait) {
|
|
292
|
+
return new Promise((resolve, reject) => {
|
|
293
|
+
subprocess.once("error", reject);
|
|
294
|
+
subprocess.once("close", (exitCode) => {
|
|
295
|
+
if (options.allowNonzeroExitCode && exitCode > 0) {
|
|
296
|
+
reject(new Error(`Exited with code ${exitCode}`));
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
resolve(subprocess);
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
subprocess.unref();
|
|
304
|
+
return subprocess;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
var import_is_windows = (0, import_chunk_4VNS5WPM.__toESM)(require_is_windows());
|
|
309
|
+
var isDockerCached;
|
|
310
|
+
function hasDockerEnv() {
|
|
311
|
+
try {
|
|
312
|
+
import_node_fs3.default.statSync("/.dockerenv");
|
|
313
|
+
return true;
|
|
314
|
+
} catch {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function hasDockerCGroup() {
|
|
319
|
+
try {
|
|
320
|
+
return import_node_fs3.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
321
|
+
} catch {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
function isDocker() {
|
|
326
|
+
if (isDockerCached === void 0) {
|
|
327
|
+
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
328
|
+
}
|
|
329
|
+
return isDockerCached;
|
|
330
|
+
}
|
|
331
|
+
var cachedResult;
|
|
332
|
+
var hasContainerEnv = () => {
|
|
333
|
+
try {
|
|
334
|
+
import_node_fs2.default.statSync("/run/.containerenv");
|
|
335
|
+
return true;
|
|
336
|
+
} catch {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
function isInsideContainer() {
|
|
341
|
+
if (cachedResult === void 0) {
|
|
342
|
+
cachedResult = hasContainerEnv() || isDocker();
|
|
343
|
+
}
|
|
344
|
+
return cachedResult;
|
|
345
|
+
}
|
|
346
|
+
var isWsl = () => {
|
|
347
|
+
if (import_node_process.default.platform !== "linux") {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
if (import_node_os.default.release().toLowerCase().includes("microsoft")) {
|
|
351
|
+
if (isInsideContainer()) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
return true;
|
|
355
|
+
}
|
|
356
|
+
try {
|
|
357
|
+
return import_node_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
358
|
+
} catch {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
var is_wsl_default = import_node_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
363
|
+
var import_new_github_issue_url = (0, import_chunk_4VNS5WPM.__toESM)(require_new_github_issue_url());
|
|
364
|
+
var import_open = (0, import_chunk_4VNS5WPM.__toESM)(require_open());
|
|
365
|
+
function getGitHubIssueUrl({
|
|
366
|
+
title,
|
|
367
|
+
user = "prisma",
|
|
368
|
+
repo = "prisma",
|
|
369
|
+
template = "bug_report.yml",
|
|
370
|
+
body
|
|
371
|
+
}) {
|
|
372
|
+
return (0, import_new_github_issue_url.default)({
|
|
373
|
+
user,
|
|
374
|
+
repo,
|
|
375
|
+
template,
|
|
376
|
+
title,
|
|
377
|
+
body
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
async function wouldYouLikeToCreateANewIssue(options) {
|
|
381
|
+
const shouldCreateNewIssue = await (0, import_chunk_YNDZCLVL.M)(options.prompt).with(true, async () => {
|
|
382
|
+
const createNewIssueResponse = await (0, import_prompts.default)({
|
|
383
|
+
type: "select",
|
|
384
|
+
name: "value",
|
|
385
|
+
message: "Would you like to create a GitHub issue?",
|
|
386
|
+
initial: 0,
|
|
387
|
+
choices: [
|
|
388
|
+
{
|
|
389
|
+
title: "Yes",
|
|
390
|
+
value: true,
|
|
391
|
+
description: `Create a new GitHub issue`
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
title: "No",
|
|
395
|
+
value: false,
|
|
396
|
+
description: `Don't create a new GitHub issue`
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
});
|
|
400
|
+
return Boolean(createNewIssueResponse.value);
|
|
401
|
+
}).otherwise(() => Promise.resolve(true));
|
|
402
|
+
if (shouldCreateNewIssue) {
|
|
403
|
+
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
404
|
+
const url = getGitHubIssueUrl({
|
|
405
|
+
title: options.title ?? "",
|
|
406
|
+
body: issueTemplate(binaryTarget, options)
|
|
407
|
+
});
|
|
408
|
+
const shouldOpenWait = (0, import_is_windows.default)() || is_wsl_default;
|
|
409
|
+
await (0, import_open.default)(url, { wait: shouldOpenWait });
|
|
410
|
+
} else {
|
|
411
|
+
process.exit(130);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
var issueTemplate = (platform, options) => {
|
|
415
|
+
return (0, import_node_util.stripVTControlCharacters)(`
|
|
416
|
+
Hi Prisma Team! The following command just crashed.
|
|
417
|
+
${options.reportId ? `The report Id is: ${options.reportId}` : ""}
|
|
418
|
+
|
|
419
|
+
## Command
|
|
420
|
+
|
|
421
|
+
\`${options.command}\`
|
|
422
|
+
|
|
423
|
+
## Versions
|
|
424
|
+
|
|
425
|
+
| Name | Version |
|
|
426
|
+
|-------------|--------------------|
|
|
427
|
+
| Platform | ${platform.padEnd(19)}|
|
|
428
|
+
| Node | ${process.version.padEnd(19)}|
|
|
429
|
+
| Prisma CLI | ${options.cliVersion.padEnd(19)}|
|
|
430
|
+
| Engine | ${options.enginesVersion.padEnd(19)}|
|
|
431
|
+
|
|
432
|
+
## Error
|
|
433
|
+
\`\`\`
|
|
434
|
+
${options.error}
|
|
435
|
+
\`\`\`
|
|
436
|
+
`);
|
|
437
|
+
};
|
|
438
|
+
/*! Bundled license information:
|
|
439
|
+
|
|
440
|
+
is-windows/index.js:
|
|
441
|
+
(*!
|
|
442
|
+
* is-windows <https://github.com/jonschlinkert/is-windows>
|
|
443
|
+
*
|
|
444
|
+
* Copyright © 2015-2018, Jon Schlinkert.
|
|
445
|
+
* Released under the MIT License.
|
|
446
|
+
*)
|
|
447
|
+
*/
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_ZJWZK45Z_exports = {};
|
|
20
|
+
__export(chunk_ZJWZK45Z_exports, {
|
|
21
|
+
error: () => error,
|
|
22
|
+
info: () => info,
|
|
23
|
+
log: () => log,
|
|
24
|
+
logger_exports: () => logger_exports,
|
|
25
|
+
query: () => query,
|
|
26
|
+
should: () => should,
|
|
27
|
+
tags: () => tags,
|
|
28
|
+
warn: () => warn
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(chunk_ZJWZK45Z_exports);
|
|
31
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
33
|
+
var logger_exports = {};
|
|
34
|
+
(0, import_chunk_4VNS5WPM.__export)(logger_exports, {
|
|
35
|
+
error: () => error,
|
|
36
|
+
info: () => info,
|
|
37
|
+
log: () => log,
|
|
38
|
+
query: () => query,
|
|
39
|
+
should: () => should,
|
|
40
|
+
tags: () => tags,
|
|
41
|
+
warn: () => warn
|
|
42
|
+
});
|
|
43
|
+
var tags = {
|
|
44
|
+
error: (0, import_chunk_PG5FDKSF.red)("prisma:error"),
|
|
45
|
+
warn: (0, import_chunk_PG5FDKSF.yellow)("prisma:warn"),
|
|
46
|
+
info: (0, import_chunk_PG5FDKSF.cyan)("prisma:info"),
|
|
47
|
+
query: (0, import_chunk_PG5FDKSF.blue)("prisma:query")
|
|
48
|
+
};
|
|
49
|
+
var should = {
|
|
50
|
+
warn: () => !process.env.PRISMA_DISABLE_WARNINGS
|
|
51
|
+
};
|
|
52
|
+
function log(...data) {
|
|
53
|
+
console.log(...data);
|
|
54
|
+
}
|
|
55
|
+
function warn(message, ...optionalParams) {
|
|
56
|
+
if (should.warn()) {
|
|
57
|
+
console.warn(`${tags.warn} ${message}`, ...optionalParams);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function info(message, ...optionalParams) {
|
|
61
|
+
console.info(`${tags.info} ${message}`, ...optionalParams);
|
|
62
|
+
}
|
|
63
|
+
function error(message, ...optionalParams) {
|
|
64
|
+
console.error(`${tags.error} ${message}`, ...optionalParams);
|
|
65
|
+
}
|
|
66
|
+
function query(message, ...optionalParams) {
|
|
67
|
+
console.log(`${tags.query} ${message}`, ...optionalParams);
|
|
68
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_ZKWDIAVF_exports = {};
|
|
20
|
+
__export(chunk_ZKWDIAVF_exports, {
|
|
21
|
+
keyBy: () => keyBy
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(chunk_ZKWDIAVF_exports);
|
|
24
|
+
var keyBy = (collection, iteratee) => {
|
|
25
|
+
return collection.reduce((acc, curr) => {
|
|
26
|
+
acc[iteratee(curr)] = curr;
|
|
27
|
+
return acc;
|
|
28
|
+
}, {});
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unknown command
|
|
3
|
+
*/
|
|
4
|
+
export declare function unknownCommand(helpTemplate: string, cmd: string): HelpError;
|
|
5
|
+
/**
|
|
6
|
+
* Custom help error used to display help
|
|
7
|
+
* errors without printing a stack trace
|
|
8
|
+
*/
|
|
9
|
+
export declare class HelpError extends Error {
|
|
10
|
+
constructor(msg: string);
|
|
11
|
+
}
|
package/dist/cli/Help.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Help_exports = {};
|
|
20
|
+
__export(Help_exports, {
|
|
21
|
+
HelpError: () => import_chunk_6JE6QGSJ.HelpError,
|
|
22
|
+
unknownCommand: () => import_chunk_6JE6QGSJ.unknownCommand
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Help_exports);
|
|
25
|
+
var import_chunk_6JE6QGSJ = require("../chunk-6JE6QGSJ.js");
|
|
26
|
+
var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
|
|
27
|
+
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PrismaConfigWithDatasource } from '../utils/validatePrismaConfigWithDatasource';
|
|
2
|
+
/**
|
|
3
|
+
* Get the message to display when a command is forbidden with a data proxy flag
|
|
4
|
+
* @param command the full cli command (eg. prisma db push)
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const forbiddenCmdWithDataProxyFlagMessage: (command: string) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Check that the data proxy cannot be used through the given urls and schema contexts
|
|
10
|
+
* @param command the full cli command (eg. prisma db push)
|
|
11
|
+
* @param validatedConfig the validated Prisma Config value
|
|
12
|
+
*/
|
|
13
|
+
export declare function checkUnsupportedDataProxy({ command, validatedConfig, }: {
|
|
14
|
+
command: string;
|
|
15
|
+
validatedConfig: PrismaConfigWithDatasource;
|
|
16
|
+
}): void;
|