@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.
Files changed (328) hide show
  1. package/LICENSE +201 -0
  2. package/dist/Generator.d.ts +42 -0
  3. package/dist/Generator.js +29 -0
  4. package/dist/WasmPanicRegistry.d.ts +5 -0
  5. package/dist/WasmPanicRegistry.js +25 -0
  6. package/dist/WasmSchemaEngineLoader.d.ts +5 -0
  7. package/dist/WasmSchemaEngineLoader.js +25 -0
  8. package/dist/built-in-provider.d.ts +5 -0
  9. package/dist/built-in-provider.js +25 -0
  10. package/dist/chunk-2B26F5N3.js +72 -0
  11. package/dist/chunk-2IOZUH3U.js +26 -0
  12. package/dist/chunk-2SDPW6AX.js +39 -0
  13. package/dist/chunk-3IMRWXIL.js +176 -0
  14. package/dist/chunk-3TYD3ZGQ.js +115 -0
  15. package/dist/chunk-3U4QB2G3.js +166 -0
  16. package/dist/chunk-3VD46SL7.js +151 -0
  17. package/dist/chunk-3YOF262C.js +176 -0
  18. package/dist/chunk-3ZHE2IX4.js +55 -0
  19. package/dist/chunk-4VNS5WPM.js +61 -0
  20. package/dist/chunk-5AI4FIZ3.js +1342 -0
  21. package/dist/chunk-5BDP445D.js +51 -0
  22. package/dist/chunk-5DBOS77Y.js +609 -0
  23. package/dist/chunk-5FJ3MENK.js +30 -0
  24. package/dist/chunk-5I4ERIIY.js +30 -0
  25. package/dist/chunk-5PJQQKQI.js +106 -0
  26. package/dist/chunk-5VQNKCKW.js +38 -0
  27. package/dist/chunk-5WRIOIZY.js +31 -0
  28. package/dist/chunk-6JE6QGSJ.js +37 -0
  29. package/dist/chunk-6PWHYRKR.js +74 -0
  30. package/dist/chunk-6QMQ2JYG.js +122 -0
  31. package/dist/chunk-6Z766KGR.js +95 -0
  32. package/dist/chunk-74RGCSUJ.js +44 -0
  33. package/dist/chunk-7B5PXS6N.js +29 -0
  34. package/dist/chunk-ANU3HEGF.js +29 -0
  35. package/dist/chunk-BERN76ZI.js +347 -0
  36. package/dist/chunk-BGMZPA2F.js +39 -0
  37. package/dist/chunk-BPDMLM32.js +105 -0
  38. package/dist/chunk-C47SCASR.js +37 -0
  39. package/dist/chunk-CGFNDGGI.js +40 -0
  40. package/dist/chunk-CTQD6OLG.js +438 -0
  41. package/dist/chunk-CUD726EK.js +36 -0
  42. package/dist/chunk-CXEXLFVL.js +166 -0
  43. package/dist/chunk-CYAS6B5N.js +48 -0
  44. package/dist/chunk-D4VZUY3O.js +71 -0
  45. package/dist/chunk-DODIJPCS.js +34 -0
  46. package/dist/chunk-DTPFRZWV.js +31 -0
  47. package/dist/chunk-DUDEWDFC.js +101 -0
  48. package/dist/chunk-DZ4QWHTB.js +127 -0
  49. package/dist/chunk-E23HYCQJ.js +37 -0
  50. package/dist/chunk-E476ARWS.js +2091 -0
  51. package/dist/chunk-EKGEKB22.js +28 -0
  52. package/dist/chunk-EU6UOKRD.js +26 -0
  53. package/dist/chunk-EWPXLBGE.js +115 -0
  54. package/dist/chunk-FCYHZHVW.js +43 -0
  55. package/dist/chunk-FRVJZOHP.js +1823 -0
  56. package/dist/chunk-GJSFP4V4.js +30 -0
  57. package/dist/chunk-GXW4NTU2.js +34 -0
  58. package/dist/chunk-H4NI2RIK.js +35 -0
  59. package/dist/chunk-HHG4DGHC.js +496 -0
  60. package/dist/chunk-HPVMQFIY.js +407 -0
  61. package/dist/chunk-I2CBQZJY.js +122 -0
  62. package/dist/chunk-I4K46RGG.js +31 -0
  63. package/dist/chunk-I6WLABB2.js +429 -0
  64. package/dist/chunk-ICFLO5JW.js +26 -0
  65. package/dist/chunk-IL7PSY44.js +26 -0
  66. package/dist/chunk-IOIAK7V7.js +53 -0
  67. package/dist/chunk-IYN5VKMD.js +110 -0
  68. package/dist/chunk-J77ZIDXB.js +69 -0
  69. package/dist/chunk-J7ZPY2XA.js +47 -0
  70. package/dist/chunk-JFXHOFJA.js +46 -0
  71. package/dist/chunk-JOIHHXR6.js +2067 -0
  72. package/dist/chunk-JPZYSRK3.js +6412 -0
  73. package/dist/chunk-JTKAT4KZ.js +26 -0
  74. package/dist/chunk-K2EOOA2X.js +91 -0
  75. package/dist/chunk-KDP6C3CB.js +56 -0
  76. package/dist/chunk-L3LDE52J.js +51 -0
  77. package/dist/chunk-L6V54WGO.js +39 -0
  78. package/dist/chunk-LMVSIVKQ.js +62 -0
  79. package/dist/chunk-LPNBWFQ3.js +38 -0
  80. package/dist/chunk-LRBXMV4B.js +26 -0
  81. package/dist/chunk-LRU47BGE.js +78 -0
  82. package/dist/chunk-M3GBKLGE.js +24 -0
  83. package/dist/chunk-MCS5ZY6Y.js +27 -0
  84. package/dist/chunk-NBWRGVYR.js +47 -0
  85. package/dist/chunk-NIWBAJZV.js +36 -0
  86. package/dist/chunk-NTDBN2N2.js +104 -0
  87. package/dist/chunk-NVNI2SRU.js +4230 -0
  88. package/dist/chunk-OIVPX3BR.js +32 -0
  89. package/dist/chunk-PFYALFCY.js +26 -0
  90. package/dist/chunk-PG5FDKSF.js +79 -0
  91. package/dist/chunk-PKF53VLJ.js +26 -0
  92. package/dist/chunk-PTPRBA7K.js +6675 -0
  93. package/dist/chunk-QBNYSYZK.js +74 -0
  94. package/dist/chunk-QMNPESAP.js +124 -0
  95. package/dist/chunk-QN6PSQY7.js +37 -0
  96. package/dist/chunk-QVJ2BXKF.js +3997 -0
  97. package/dist/chunk-R47SFJ5Z.js +104 -0
  98. package/dist/chunk-R6QH57HZ.js +311 -0
  99. package/dist/chunk-RBDYOTWB.js +193 -0
  100. package/dist/chunk-SBUSVJCV.js +62 -0
  101. package/dist/chunk-SP2ETLT2.js +41 -0
  102. package/dist/chunk-TPCPXGC5.js +218 -0
  103. package/dist/chunk-TWSLDIFL.js +48 -0
  104. package/dist/chunk-UGR6KLZN.js +30 -0
  105. package/dist/chunk-UMM35VP5.js +1193 -0
  106. package/dist/chunk-VFNP7Q3Y.js +15529 -0
  107. package/dist/chunk-VNIE2AZB.js +41 -0
  108. package/dist/chunk-VUGB2H7M.js +438 -0
  109. package/dist/chunk-WFMA7DI5.js +92 -0
  110. package/dist/chunk-WV4QHCSM.js +26 -0
  111. package/dist/chunk-WXRVYSYN.js +33 -0
  112. package/dist/chunk-X3P4J7WW.js +28 -0
  113. package/dist/chunk-X77CS5RK.js +33 -0
  114. package/dist/chunk-XAAVALN7.js +110 -0
  115. package/dist/chunk-XXTPN4LB.js +41 -0
  116. package/dist/chunk-XYCIH36R.js +29 -0
  117. package/dist/chunk-Y4TOGY6I.js +30 -0
  118. package/dist/chunk-YNDZCLVL.js +307 -0
  119. package/dist/chunk-YXB6APHS.js +447 -0
  120. package/dist/chunk-ZJWZK45Z.js +68 -0
  121. package/dist/chunk-ZKWDIAVF.js +29 -0
  122. package/dist/cli/Help.d.ts +11 -0
  123. package/dist/cli/Help.js +27 -0
  124. package/dist/cli/checkUnsupportedDataProxy.d.ts +16 -0
  125. package/dist/cli/checkUnsupportedDataProxy.js +125 -0
  126. package/dist/cli/completion-values.d.ts +24 -0
  127. package/dist/cli/completion-values.js +47 -0
  128. package/dist/cli/directoryConfig.d.ts +11 -0
  129. package/dist/cli/directoryConfig.js +25 -0
  130. package/dist/cli/getGeneratorSuccessMessage.d.ts +7 -0
  131. package/dist/cli/getGeneratorSuccessMessage.js +29 -0
  132. package/dist/cli/getSchema.d.ts +46 -0
  133. package/dist/cli/getSchema.js +31 -0
  134. package/dist/cli/getTypescriptVersion.d.ts +1 -0
  135. package/dist/cli/getTypescriptVersion.js +25 -0
  136. package/dist/cli/hashes.d.ts +11 -0
  137. package/dist/cli/hashes.js +28 -0
  138. package/dist/cli/schemaContext.d.ts +56 -0
  139. package/dist/cli/schemaContext.js +126 -0
  140. package/dist/cli/types.d.ts +63 -0
  141. package/dist/cli/types.js +1 -0
  142. package/dist/cli/utils.d.ts +13 -0
  143. package/dist/cli/utils.js +27 -0
  144. package/dist/convertCredentials.d.ts +10 -0
  145. package/dist/convertCredentials.js +28 -0
  146. package/dist/engine-commands/errorHelpers.d.ts +4 -0
  147. package/dist/engine-commands/errorHelpers.js +28 -0
  148. package/dist/engine-commands/formatSchema.d.ts +22 -0
  149. package/dist/engine-commands/formatSchema.js +124 -0
  150. package/dist/engine-commands/getConfig.d.ts +27 -0
  151. package/dist/engine-commands/getConfig.js +39 -0
  152. package/dist/engine-commands/getDmmf.d.ts +21 -0
  153. package/dist/engine-commands/getDmmf.js +40 -0
  154. package/dist/engine-commands/getEngineVersion.d.ts +4 -0
  155. package/dist/engine-commands/getEngineVersion.js +33 -0
  156. package/dist/engine-commands/getEnginesInfo.d.ts +20 -0
  157. package/dist/engine-commands/getEnginesInfo.js +36 -0
  158. package/dist/engine-commands/index.d.ts +10 -0
  159. package/dist/engine-commands/index.js +136 -0
  160. package/dist/engine-commands/lintSchema.d.ts +26 -0
  161. package/dist/engine-commands/lintSchema.js +34 -0
  162. package/dist/engine-commands/mergeSchemas.d.ts +12 -0
  163. package/dist/engine-commands/mergeSchemas.js +39 -0
  164. package/dist/engine-commands/queryEngineCommons.d.ts +31 -0
  165. package/dist/engine-commands/queryEngineCommons.js +33 -0
  166. package/dist/engine-commands/relativizePathInPSLError.d.ts +1 -0
  167. package/dist/engine-commands/relativizePathInPSLError.js +25 -0
  168. package/dist/engine-commands/validate.d.ts +12 -0
  169. package/dist/engine-commands/validate.js +39 -0
  170. package/dist/errorReporting.d.ts +25 -0
  171. package/dist/errorReporting.js +29 -0
  172. package/dist/get-generators/getGenerators.d.ts +71 -0
  173. package/dist/get-generators/getGenerators.js +127 -0
  174. package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +3 -0
  175. package/dist/get-generators/utils/binaryTypeToEngineType.js +25 -0
  176. package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +3 -0
  177. package/dist/get-generators/utils/engineTypeToBinaryType.js +25 -0
  178. package/dist/get-generators/utils/fixBinaryTargets.d.ts +3 -0
  179. package/dist/get-generators/utils/fixBinaryTargets.js +25 -0
  180. package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +7 -0
  181. package/dist/get-generators/utils/getBinaryPathsByVersion.js +30 -0
  182. package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +2 -0
  183. package/dist/get-generators/utils/getEngineVersionForGenerator.js +25 -0
  184. package/dist/get-generators/utils/printGeneratorConfig.d.ts +9 -0
  185. package/dist/get-generators/utils/printGeneratorConfig.js +29 -0
  186. package/dist/getPackedPackage.d.ts +1 -0
  187. package/dist/getPackedPackage.js +29 -0
  188. package/dist/highlight/highlight.d.ts +3 -0
  189. package/dist/highlight/highlight.js +32 -0
  190. package/dist/highlight/languages/dml.d.ts +2 -0
  191. package/dist/highlight/languages/dml.js +25 -0
  192. package/dist/highlight/languages/sql.d.ts +2 -0
  193. package/dist/highlight/languages/sql.js +25 -0
  194. package/dist/highlight/prism.d.ts +6 -0
  195. package/dist/highlight/prism.js +28 -0
  196. package/dist/highlight/theme.d.ts +2 -0
  197. package/dist/highlight/theme.js +26 -0
  198. package/dist/highlight/types.d.ts +35 -0
  199. package/dist/highlight/types.js +1 -0
  200. package/dist/index.d.ts +80 -0
  201. package/dist/index.js +257 -0
  202. package/dist/logger.d.ts +14 -0
  203. package/dist/logger.js +32 -0
  204. package/dist/magic-string.es-B2CP4FDB.js +1324 -0
  205. package/dist/migrateTypes.d.ts +99 -0
  206. package/dist/migrateTypes.js +1 -0
  207. package/dist/multipart-parser-3AFJFP6K.js +374 -0
  208. package/dist/panic.d.ts +31 -0
  209. package/dist/panic.js +29 -0
  210. package/dist/resolveBinary.d.ts +6 -0
  211. package/dist/resolveBinary.js +34 -0
  212. package/dist/resolveOutput.d.ts +5 -0
  213. package/dist/resolveOutput.js +25 -0
  214. package/dist/resolvePkg.d.ts +7 -0
  215. package/dist/resolvePkg.js +25 -0
  216. package/dist/schemaEngineCommands.d.ts +36 -0
  217. package/dist/schemaEngineCommands.js +36 -0
  218. package/dist/sendPanic.d.ts +10 -0
  219. package/dist/sendPanic.js +29 -0
  220. package/dist/types.d.ts +34 -0
  221. package/dist/types.js +1 -0
  222. package/dist/utils/__tests__/isCi.test.js +58 -0
  223. package/dist/utils/__tests__/isInteractive.test.js +47 -0
  224. package/dist/utils/assertAlways.d.ts +14 -0
  225. package/dist/utils/assertAlways.js +25 -0
  226. package/dist/utils/assertNever.d.ts +27 -0
  227. package/dist/utils/assertNever.js +25 -0
  228. package/dist/utils/binaryTargetRegex.d.ts +8 -0
  229. package/dist/utils/binaryTargetRegex.js +25 -0
  230. package/dist/utils/callOnce.d.ts +13 -0
  231. package/dist/utils/callOnce.js +25 -0
  232. package/dist/utils/callOnce.test.d.ts +1 -0
  233. package/dist/utils/callOnce.test.js +36 -0
  234. package/dist/utils/canPrompt.d.ts +1 -0
  235. package/dist/utils/canPrompt.js +27 -0
  236. package/dist/utils/chmodPlusX.d.ts +1 -0
  237. package/dist/utils/chmodPlusX.js +25 -0
  238. package/dist/utils/drawBox.d.ts +9 -0
  239. package/dist/utils/drawBox.js +26 -0
  240. package/dist/utils/extractPreviewFeatures.d.ts +2 -0
  241. package/dist/utils/extractPreviewFeatures.js +28 -0
  242. package/dist/utils/formatTable.d.ts +5 -0
  243. package/dist/utils/formatTable.js +25 -0
  244. package/dist/utils/formatms.d.ts +5 -0
  245. package/dist/utils/formatms.js +25 -0
  246. package/dist/utils/fs-functional.d.ts +53 -0
  247. package/dist/utils/fs-functional.js +35 -0
  248. package/dist/utils/fs-utils.d.ts +30 -0
  249. package/dist/utils/fs-utils.js +32 -0
  250. package/dist/utils/getCommandWithExecutor.d.ts +1 -0
  251. package/dist/utils/getCommandWithExecutor.js +26 -0
  252. package/dist/utils/getGitHubIssueUrl.d.ts +18 -0
  253. package/dist/utils/getGitHubIssueUrl.js +27 -0
  254. package/dist/utils/getVersionFromPackageJson.d.ts +1 -0
  255. package/dist/utils/getVersionFromPackageJson.js +26 -0
  256. package/dist/utils/handlePanic.d.ts +11 -0
  257. package/dist/utils/handlePanic.js +36 -0
  258. package/dist/utils/hasOwnProperty.d.ts +1 -0
  259. package/dist/utils/hasOwnProperty.js +25 -0
  260. package/dist/utils/isCi.d.ts +1 -0
  261. package/dist/utils/isCi.js +25 -0
  262. package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -0
  263. package/dist/utils/isCurrentBinInstalledGlobally.js +25 -0
  264. package/dist/utils/isInContainer.d.ts +5 -0
  265. package/dist/utils/isInContainer.js +25 -0
  266. package/dist/utils/isInNpmLifecycleHook.d.ts +4 -0
  267. package/dist/utils/isInNpmLifecycleHook.js +25 -0
  268. package/dist/utils/isInteractive.d.ts +6 -0
  269. package/dist/utils/isInteractive.js +25 -0
  270. package/dist/utils/isPromiseLike.d.ts +1 -0
  271. package/dist/utils/isPromiseLike.js +25 -0
  272. package/dist/utils/isValidJsIdentifier.d.ts +1 -0
  273. package/dist/utils/isValidJsIdentifier.js +25 -0
  274. package/dist/utils/keyBy.d.ts +9 -0
  275. package/dist/utils/keyBy.js +25 -0
  276. package/dist/utils/link.d.ts +1 -0
  277. package/dist/utils/link.js +26 -0
  278. package/dist/utils/mapKeys.d.ts +1 -0
  279. package/dist/utils/mapKeys.js +25 -0
  280. package/dist/utils/mapObjectValues.d.ts +1 -0
  281. package/dist/utils/mapObjectValues.js +25 -0
  282. package/dist/utils/max.d.ts +11 -0
  283. package/dist/utils/max.js +26 -0
  284. package/dist/utils/max.test.d.ts +1 -0
  285. package/dist/utils/max.test.js +22 -0
  286. package/dist/utils/maybeInGitHook.d.ts +9 -0
  287. package/dist/utils/maybeInGitHook.js +25 -0
  288. package/dist/utils/missingDatasource.d.ts +1 -0
  289. package/dist/utils/missingDatasource.js +32 -0
  290. package/dist/utils/missingGeneratorMessage.d.ts +3 -0
  291. package/dist/utils/missingGeneratorMessage.js +34 -0
  292. package/dist/utils/now.d.ts +3 -0
  293. package/dist/utils/now.js +51 -0
  294. package/dist/utils/omit.d.ts +6 -0
  295. package/dist/utils/omit.js +30 -0
  296. package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.d.ts +1 -0
  297. package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +25 -0
  298. package/dist/utils/parseEnvValue.d.ts +17 -0
  299. package/dist/utils/parseEnvValue.js +27 -0
  300. package/dist/utils/path.d.ts +14 -0
  301. package/dist/utils/path.js +26 -0
  302. package/dist/utils/path.test.d.ts +1 -0
  303. package/dist/utils/path.test.js +54 -0
  304. package/dist/utils/pick.d.ts +1 -0
  305. package/dist/utils/pick.js +25 -0
  306. package/dist/utils/printConfigWarnings.d.ts +1 -0
  307. package/dist/utils/printConfigWarnings.js +26 -0
  308. package/dist/utils/prismaPostgres.d.ts +13 -0
  309. package/dist/utils/prismaPostgres.js +28 -0
  310. package/dist/utils/prismaPostgres.test.d.ts +1 -0
  311. package/dist/utils/prismaPostgres.test.js +33 -0
  312. package/dist/utils/schemaFileInput.d.ts +2 -0
  313. package/dist/utils/schemaFileInput.js +25 -0
  314. package/dist/utils/setClassName.d.ts +9 -0
  315. package/dist/utils/setClassName.js +25 -0
  316. package/dist/utils/toSchemasContainer.d.ts +5 -0
  317. package/dist/utils/toSchemasContainer.js +26 -0
  318. package/dist/utils/unique.d.ts +5 -0
  319. package/dist/utils/unique.js +38 -0
  320. package/dist/utils/validatePrismaConfigWithDatasource.d.ts +17 -0
  321. package/dist/utils/validatePrismaConfigWithDatasource.js +28 -0
  322. package/dist/utils/vercelPkgPathRegex.d.ts +1 -0
  323. package/dist/utils/vercelPkgPathRegex.js +25 -0
  324. package/dist/warnOnce.d.ts +1 -0
  325. package/dist/warnOnce.js +27 -0
  326. package/dist/wasm.d.ts +5 -0
  327. package/dist/wasm.js +29 -0
  328. package/package.json +93 -0
@@ -0,0 +1,347 @@
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_BERN76ZI_exports = {};
30
+ __export(chunk_BERN76ZI_exports, {
31
+ isCurrentBinInstalledGlobally: () => isCurrentBinInstalledGlobally
32
+ });
33
+ module.exports = __toCommonJS(chunk_BERN76ZI_exports);
34
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
35
+ var import_fs = __toESM(require("fs"));
36
+ var import_node_process = __toESM(require("node:process"));
37
+ var import_node_path = __toESM(require("node:path"));
38
+ var import_node_os = __toESM(require("node:os"));
39
+ var import_node_fs = __toESM(require("node:fs"));
40
+ var require_ini = (0, import_chunk_4VNS5WPM.__commonJS)({
41
+ "../../node_modules/.pnpm/ini@4.1.1/node_modules/ini/lib/ini.js"(exports, module2) {
42
+ "use strict";
43
+ var { hasOwnProperty } = Object.prototype;
44
+ var encode = (obj, opt = {}) => {
45
+ if (typeof opt === "string") {
46
+ opt = { section: opt };
47
+ }
48
+ opt.align = opt.align === true;
49
+ opt.newline = opt.newline === true;
50
+ opt.sort = opt.sort === true;
51
+ opt.whitespace = opt.whitespace === true || opt.align === true;
52
+ opt.platform = opt.platform || typeof process !== "undefined" && process.platform;
53
+ opt.bracketedArray = opt.bracketedArray !== false;
54
+ const eol = opt.platform === "win32" ? "\r\n" : "\n";
55
+ const separator = opt.whitespace ? " = " : "=";
56
+ const children = [];
57
+ const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj);
58
+ let padToChars = 0;
59
+ if (opt.align) {
60
+ padToChars = safe(
61
+ keys.filter((k) => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== "object").map((k) => Array.isArray(obj[k]) ? `${k}[]` : k).concat([""]).reduce((a, b) => safe(a).length >= safe(b).length ? a : b)
62
+ ).length;
63
+ }
64
+ let out = "";
65
+ const arraySuffix = opt.bracketedArray ? "[]" : "";
66
+ for (const k of keys) {
67
+ const val = obj[k];
68
+ if (val && Array.isArray(val)) {
69
+ for (const item of val) {
70
+ out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item) + eol;
71
+ }
72
+ } else if (val && typeof val === "object") {
73
+ children.push(k);
74
+ } else {
75
+ out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol;
76
+ }
77
+ }
78
+ if (opt.section && out.length) {
79
+ out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out;
80
+ }
81
+ for (const k of children) {
82
+ const nk = splitSections(k, ".").join("\\.");
83
+ const section = (opt.section ? opt.section + "." : "") + nk;
84
+ const child = encode(obj[k], {
85
+ ...opt,
86
+ section
87
+ });
88
+ if (out.length && child.length) {
89
+ out += eol;
90
+ }
91
+ out += child;
92
+ }
93
+ return out;
94
+ };
95
+ function splitSections(str, separator) {
96
+ var lastMatchIndex = 0;
97
+ var lastSeparatorIndex = 0;
98
+ var nextIndex = 0;
99
+ var sections = [];
100
+ do {
101
+ nextIndex = str.indexOf(separator, lastMatchIndex);
102
+ if (nextIndex !== -1) {
103
+ lastMatchIndex = nextIndex + separator.length;
104
+ if (nextIndex > 0 && str[nextIndex - 1] === "\\") {
105
+ continue;
106
+ }
107
+ sections.push(str.slice(lastSeparatorIndex, nextIndex));
108
+ lastSeparatorIndex = nextIndex + separator.length;
109
+ }
110
+ } while (nextIndex !== -1);
111
+ sections.push(str.slice(lastSeparatorIndex));
112
+ return sections;
113
+ }
114
+ var decode = (str, opt = {}) => {
115
+ opt.bracketedArray = opt.bracketedArray !== false;
116
+ const out = /* @__PURE__ */ Object.create(null);
117
+ let p = out;
118
+ let section = null;
119
+ const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
120
+ const lines = str.split(/[\r\n]+/g);
121
+ const duplicates = {};
122
+ for (const line of lines) {
123
+ if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
124
+ continue;
125
+ }
126
+ const match = line.match(re);
127
+ if (!match) {
128
+ continue;
129
+ }
130
+ if (match[1] !== void 0) {
131
+ section = unsafe(match[1]);
132
+ if (section === "__proto__") {
133
+ p = /* @__PURE__ */ Object.create(null);
134
+ continue;
135
+ }
136
+ p = out[section] = out[section] || /* @__PURE__ */ Object.create(null);
137
+ continue;
138
+ }
139
+ const keyRaw = unsafe(match[2]);
140
+ let isArray;
141
+ if (opt.bracketedArray) {
142
+ isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
143
+ } else {
144
+ duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1;
145
+ isArray = duplicates[keyRaw] > 1;
146
+ }
147
+ const key = isArray ? keyRaw.slice(0, -2) : keyRaw;
148
+ if (key === "__proto__") {
149
+ continue;
150
+ }
151
+ const valueRaw = match[3] ? unsafe(match[4]) : true;
152
+ const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw;
153
+ if (isArray) {
154
+ if (!hasOwnProperty.call(p, key)) {
155
+ p[key] = [];
156
+ } else if (!Array.isArray(p[key])) {
157
+ p[key] = [p[key]];
158
+ }
159
+ }
160
+ if (Array.isArray(p[key])) {
161
+ p[key].push(value);
162
+ } else {
163
+ p[key] = value;
164
+ }
165
+ }
166
+ const remove = [];
167
+ for (const k of Object.keys(out)) {
168
+ if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) {
169
+ continue;
170
+ }
171
+ const parts = splitSections(k, ".");
172
+ p = out;
173
+ const l = parts.pop();
174
+ const nl = l.replace(/\\\./g, ".");
175
+ for (const part of parts) {
176
+ if (part === "__proto__") {
177
+ continue;
178
+ }
179
+ if (!hasOwnProperty.call(p, part) || typeof p[part] !== "object") {
180
+ p[part] = /* @__PURE__ */ Object.create(null);
181
+ }
182
+ p = p[part];
183
+ }
184
+ if (p === out && nl === l) {
185
+ continue;
186
+ }
187
+ p[nl] = out[k];
188
+ remove.push(k);
189
+ }
190
+ for (const del of remove) {
191
+ delete out[del];
192
+ }
193
+ return out;
194
+ };
195
+ var isQuoted = (val) => {
196
+ return val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'");
197
+ };
198
+ var safe = (val) => {
199
+ if (typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim()) {
200
+ return JSON.stringify(val);
201
+ }
202
+ return val.split(";").join("\\;").split("#").join("\\#");
203
+ };
204
+ var unsafe = (val, doUnesc) => {
205
+ val = (val || "").trim();
206
+ if (isQuoted(val)) {
207
+ if (val.charAt(0) === "'") {
208
+ val = val.slice(1, -1);
209
+ }
210
+ try {
211
+ val = JSON.parse(val);
212
+ } catch {
213
+ }
214
+ } else {
215
+ let esc = false;
216
+ let unesc = "";
217
+ for (let i = 0, l = val.length; i < l; i++) {
218
+ const c = val.charAt(i);
219
+ if (esc) {
220
+ if ("\\;#".indexOf(c) !== -1) {
221
+ unesc += c;
222
+ } else {
223
+ unesc += "\\" + c;
224
+ }
225
+ esc = false;
226
+ } else if (";#".indexOf(c) !== -1) {
227
+ break;
228
+ } else if (c === "\\") {
229
+ esc = true;
230
+ } else {
231
+ unesc += c;
232
+ }
233
+ }
234
+ if (esc) {
235
+ unesc += "\\";
236
+ }
237
+ return unesc.trim();
238
+ }
239
+ return val;
240
+ };
241
+ module2.exports = {
242
+ parse: decode,
243
+ decode,
244
+ stringify: encode,
245
+ encode,
246
+ safe,
247
+ unsafe
248
+ };
249
+ }
250
+ });
251
+ var import_ini = (0, import_chunk_4VNS5WPM.__toESM)(require_ini(), 1);
252
+ var isWindows = import_node_process.default.platform === "win32";
253
+ var readRc = (filePath) => {
254
+ try {
255
+ return import_ini.default.parse(import_node_fs.default.readFileSync(filePath, "utf8")).prefix;
256
+ } catch {
257
+ }
258
+ };
259
+ var getEnvNpmPrefix = () => Object.keys(import_node_process.default.env).reduce((prefix, name) => /^npm_config_prefix$/i.test(name) ? import_node_process.default.env[name] : prefix, void 0);
260
+ var getGlobalNpmrc = () => {
261
+ if (isWindows && import_node_process.default.env.APPDATA) {
262
+ return import_node_path.default.join(import_node_process.default.env.APPDATA, "/npm/etc/npmrc");
263
+ }
264
+ if (import_node_process.default.execPath.includes("/Cellar/node")) {
265
+ const homebrewPrefix = import_node_process.default.execPath.slice(0, import_node_process.default.execPath.indexOf("/Cellar/node"));
266
+ return import_node_path.default.join(homebrewPrefix, "/lib/node_modules/npm/npmrc");
267
+ }
268
+ if (import_node_process.default.execPath.endsWith("/bin/node")) {
269
+ const installDir = import_node_path.default.dirname(import_node_path.default.dirname(import_node_process.default.execPath));
270
+ return import_node_path.default.join(installDir, "/etc/npmrc");
271
+ }
272
+ };
273
+ var getDefaultNpmPrefix = () => {
274
+ if (isWindows) {
275
+ const { APPDATA } = import_node_process.default.env;
276
+ return APPDATA ? import_node_path.default.join(APPDATA, "npm") : import_node_path.default.dirname(import_node_process.default.execPath);
277
+ }
278
+ return import_node_path.default.dirname(import_node_path.default.dirname(import_node_process.default.execPath));
279
+ };
280
+ var getNpmPrefix = () => {
281
+ const envPrefix = getEnvNpmPrefix();
282
+ if (envPrefix) {
283
+ return envPrefix;
284
+ }
285
+ const homePrefix = readRc(import_node_path.default.join(import_node_os.default.homedir(), ".npmrc"));
286
+ if (homePrefix) {
287
+ return homePrefix;
288
+ }
289
+ if (import_node_process.default.env.PREFIX) {
290
+ return import_node_process.default.env.PREFIX;
291
+ }
292
+ const globalPrefix = readRc(getGlobalNpmrc());
293
+ if (globalPrefix) {
294
+ return globalPrefix;
295
+ }
296
+ return getDefaultNpmPrefix();
297
+ };
298
+ var npmPrefix = import_node_path.default.resolve(getNpmPrefix());
299
+ var getYarnWindowsDirectory = () => {
300
+ if (isWindows && import_node_process.default.env.LOCALAPPDATA) {
301
+ const dir = import_node_path.default.join(import_node_process.default.env.LOCALAPPDATA, "Yarn");
302
+ if (import_node_fs.default.existsSync(dir)) {
303
+ return dir;
304
+ }
305
+ }
306
+ return false;
307
+ };
308
+ var getYarnPrefix = () => {
309
+ if (import_node_process.default.env.PREFIX) {
310
+ return import_node_process.default.env.PREFIX;
311
+ }
312
+ const windowsPrefix = getYarnWindowsDirectory();
313
+ if (windowsPrefix) {
314
+ return windowsPrefix;
315
+ }
316
+ const configPrefix = import_node_path.default.join(import_node_os.default.homedir(), ".config/yarn");
317
+ if (import_node_fs.default.existsSync(configPrefix)) {
318
+ return configPrefix;
319
+ }
320
+ const homePrefix = import_node_path.default.join(import_node_os.default.homedir(), ".yarn-config");
321
+ if (import_node_fs.default.existsSync(homePrefix)) {
322
+ return homePrefix;
323
+ }
324
+ return npmPrefix;
325
+ };
326
+ var globalDirectory = {};
327
+ globalDirectory.npm = {};
328
+ globalDirectory.npm.prefix = npmPrefix;
329
+ globalDirectory.npm.packages = import_node_path.default.join(npmPrefix, isWindows ? "node_modules" : "lib/node_modules");
330
+ globalDirectory.npm.binaries = isWindows ? npmPrefix : import_node_path.default.join(npmPrefix, "bin");
331
+ var yarnPrefix = import_node_path.default.resolve(getYarnPrefix());
332
+ globalDirectory.yarn = {};
333
+ globalDirectory.yarn.prefix = yarnPrefix;
334
+ globalDirectory.yarn.packages = import_node_path.default.join(yarnPrefix, getYarnWindowsDirectory() ? "Data/global/node_modules" : "global/node_modules");
335
+ globalDirectory.yarn.binaries = import_node_path.default.join(globalDirectory.yarn.packages, ".bin");
336
+ var global_directory_default = globalDirectory;
337
+ function isCurrentBinInstalledGlobally() {
338
+ try {
339
+ const realPrismaPath = import_fs.default.realpathSync(process.argv[1]);
340
+ const usingGlobalNpm = realPrismaPath.indexOf(import_fs.default.realpathSync(global_directory_default.npm.packages)) === 0;
341
+ if (usingGlobalNpm) {
342
+ return "npm";
343
+ }
344
+ } catch (e) {
345
+ }
346
+ return false;
347
+ }
@@ -0,0 +1,39 @@
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_BGMZPA2F_exports = {};
20
+ __export(chunk_BGMZPA2F_exports, {
21
+ missingDatasource: () => missingDatasource
22
+ });
23
+ module.exports = __toCommonJS(chunk_BGMZPA2F_exports);
24
+ var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
25
+ var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
26
+ var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
27
+ var missingDatasource = `
28
+ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("datasource")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}.
29
+ You can define a datasource like this:
30
+
31
+ ${(0, import_chunk_PG5FDKSF.bold)(
32
+ (0, import_chunk_VNIE2AZB.highlightDatamodel)(`datasource db {
33
+ provider = "postgresql"
34
+ }`)
35
+ )}
36
+
37
+ More information in our documentation:
38
+ ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
39
+ `;
@@ -0,0 +1,105 @@
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_BPDMLM32_exports = {};
20
+ __export(chunk_BPDMLM32_exports, {
21
+ Generator: () => Generator,
22
+ InProcessGenerator: () => InProcessGenerator,
23
+ JsonRpcGenerator: () => JsonRpcGenerator
24
+ });
25
+ module.exports = __toCommonJS(chunk_BPDMLM32_exports);
26
+ var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
27
+ var import_generator_helper = require("@prisma/generator-helper");
28
+ var Generator = class {
29
+ manifest = null;
30
+ config;
31
+ options;
32
+ constructor(config) {
33
+ this.config = config;
34
+ }
35
+ async init() {
36
+ await this.initImpl();
37
+ this.manifest = await this.getManifest();
38
+ }
39
+ generate() {
40
+ if (!this.options) {
41
+ throw new Error(`Please first run .setOptions() on the Generator to initialize the options`);
42
+ }
43
+ return this.generateImpl(this.options);
44
+ }
45
+ setOptions(options) {
46
+ this.options = options;
47
+ }
48
+ setBinaryPaths(binaryPaths) {
49
+ if (!this.options) {
50
+ throw new Error(`Please first run .setOptions() on the Generator to initialize the options`);
51
+ }
52
+ this.options.binaryPaths = binaryPaths;
53
+ }
54
+ /**
55
+ * Returns the pretty name of the generator specified in the manifest (e.g.,
56
+ * "Prisma Client"), or, if the former is not defined, the generator's
57
+ * provider name (e.g., "prisma-client-js") as a fallback.
58
+ */
59
+ getPrettyName() {
60
+ return this.manifest?.prettyName ?? this.getProvider();
61
+ }
62
+ /**
63
+ * Returns the provider name, parsed and resolved from environment variable
64
+ * if necessary.
65
+ */
66
+ getProvider() {
67
+ return (0, import_chunk_IOIAK7V7.parseEnvValue)(this.config.provider);
68
+ }
69
+ };
70
+ var JsonRpcGenerator = class extends Generator {
71
+ #generatorProcess;
72
+ constructor(executablePath, config, isNode) {
73
+ super(config);
74
+ this.#generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
75
+ }
76
+ async initImpl() {
77
+ await this.#generatorProcess.init();
78
+ }
79
+ async getManifest() {
80
+ return await this.#generatorProcess.getManifest(this.config);
81
+ }
82
+ async generateImpl(options) {
83
+ await this.#generatorProcess.generate(options);
84
+ }
85
+ stop() {
86
+ this.#generatorProcess.stop();
87
+ }
88
+ };
89
+ var InProcessGenerator = class extends Generator {
90
+ #generator;
91
+ constructor(config, generator) {
92
+ super(config);
93
+ this.#generator = generator;
94
+ }
95
+ async initImpl() {
96
+ }
97
+ async getManifest() {
98
+ return await this.#generator.getManifest(this.config);
99
+ }
100
+ async generateImpl(options) {
101
+ await this.#generator.generate(options);
102
+ }
103
+ stop() {
104
+ }
105
+ };
@@ -0,0 +1,37 @@
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_C47SCASR_exports = {};
30
+ __export(chunk_C47SCASR_exports, {
31
+ relativizePathInPSLError: () => relativizePathInPSLError
32
+ });
33
+ module.exports = __toCommonJS(chunk_C47SCASR_exports);
34
+ var import_node_path = __toESM(require("node:path"));
35
+ function relativizePathInPSLError(error) {
36
+ return error.replaceAll(process.cwd() + import_node_path.default.sep, "");
37
+ }
@@ -0,0 +1,40 @@
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_CGFNDGGI_exports = {};
20
+ __export(chunk_CGFNDGGI_exports, {
21
+ maxBy: () => maxBy,
22
+ maxWithComparator: () => maxWithComparator
23
+ });
24
+ module.exports = __toCommonJS(chunk_CGFNDGGI_exports);
25
+ function maxWithComparator(items, comparator) {
26
+ if (items.length === 0) {
27
+ return void 0;
28
+ }
29
+ let result = items[0];
30
+ for (let i = 1; i < items.length; i++) {
31
+ const compareValue = comparator(result, items[i]);
32
+ if (compareValue < 0) {
33
+ result = items[i];
34
+ }
35
+ }
36
+ return result;
37
+ }
38
+ function maxBy(items, callback) {
39
+ return maxWithComparator(items, (a, b) => callback(a) - callback(b));
40
+ }