@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,33 @@
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_X77CS5RK_exports = {};
20
+ __export(chunk_X77CS5RK_exports, {
21
+ fixBinaryTargets: () => fixBinaryTargets
22
+ });
23
+ module.exports = __toCommonJS(chunk_X77CS5RK_exports);
24
+ function transformBinaryTargetToEnvValue(binaryTarget) {
25
+ return { fromEnvVar: null, value: binaryTarget };
26
+ }
27
+ function fixBinaryTargets(schemaBinaryTargets, runtimeBinaryTarget) {
28
+ schemaBinaryTargets = schemaBinaryTargets || [];
29
+ if (!schemaBinaryTargets.find((object) => object.native === true)) {
30
+ return [transformBinaryTargetToEnvValue("native"), ...schemaBinaryTargets];
31
+ }
32
+ return [...schemaBinaryTargets, transformBinaryTargetToEnvValue(runtimeBinaryTarget)];
33
+ }
@@ -0,0 +1,110 @@
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_XAAVALN7_exports = {};
30
+ __export(chunk_XAAVALN7_exports, {
31
+ MergeSchemasError: () => MergeSchemasError,
32
+ mergeSchemas: () => mergeSchemas
33
+ });
34
+ module.exports = __toCommonJS(chunk_XAAVALN7_exports);
35
+ var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
36
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_5WRIOIZY = require("./chunk-5WRIOIZY.js");
39
+ var import_chunk_5BDP445D = require("./chunk-5BDP445D.js");
40
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
+ var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
42
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
43
+ var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
44
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
45
+ var import_debug = __toESM(require("@prisma/debug"));
46
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
47
+ var debug = (0, import_debug.default)("prisma:mergeSchemas");
48
+ var MergeSchemasError = class extends Error {
49
+ constructor(params) {
50
+ const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
51
+ const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
52
+ return `${reason}
53
+ ${errorCodeMessage}
54
+ ${(0, import_chunk_C47SCASR.relativizePathInPSLError)(message)}`;
55
+ }).with({ _tag: "unparsed" }, ({ message, reason }) => {
56
+ const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
57
+ return `${reason}
58
+ ${detailsHeader} ${message}`;
59
+ }).exhaustive();
60
+ const errorMessageWithContext = `${constructedErrorMessage}
61
+ [Context: mergeSchemas]`;
62
+ super((0, import_chunk_5WRIOIZY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ this.name = "MergeSchemasError";
64
+ }
65
+ };
66
+ function mergeSchemas(options) {
67
+ const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "mergeSchemasWasm");
68
+ debug(`Using mergeSchemas Wasm`);
69
+ const mergeSchemasEither = (0, import_function.pipe)(
70
+ (0, import_chunk_5DBOS77Y.tryCatch)(
71
+ () => {
72
+ const params = JSON.stringify({
73
+ schema: options.schemas
74
+ });
75
+ return import_chunk_5BDP445D.prismaSchemaWasm.merge_schemas(params);
76
+ },
77
+ (e) => ({
78
+ type: "wasm-error",
79
+ reason: "(mergeSchemas wasm)",
80
+ error: e
81
+ })
82
+ )
83
+ );
84
+ if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
85
+ return mergeSchemasEither.right;
86
+ }
87
+ const error = (0, import_chunk_YNDZCLVL.M)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
88
+ debugErrorType(e);
89
+ console.error("");
90
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
91
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
92
+ debug(`Error merging schemas: ${message}`);
93
+ debug(stack);
94
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
95
+ /* message */
96
+ message,
97
+ /* rustStack */
98
+ stack,
99
+ /* request */
100
+ "@prisma/prisma-schema-wasm merge_schemas",
101
+ "FMT_CLI"
102
+ /* FMT_CLI */
103
+ );
104
+ return panic;
105
+ }
106
+ const errorOutput = e.error.message;
107
+ return new MergeSchemasError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
108
+ }).exhaustive();
109
+ throw error;
110
+ }
@@ -0,0 +1,41 @@
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_XXTPN4LB_exports = {};
30
+ __export(chunk_XXTPN4LB_exports, {
31
+ isInContainer: () => isInContainer
32
+ });
33
+ module.exports = __toCommonJS(chunk_XXTPN4LB_exports);
34
+ var import_node_fs = __toESM(require("node:fs"));
35
+ function isInContainer() {
36
+ try {
37
+ return import_node_fs.default.existsSync("/.dockerenv") || import_node_fs.default.existsSync("/run/.containerenv") || process.pid === 1 || process.env.KUBERNETES_SERVICE_HOST !== void 0;
38
+ } catch {
39
+ return false;
40
+ }
41
+ }
@@ -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_XYCIH36R_exports = {};
20
+ __export(chunk_XYCIH36R_exports, {
21
+ formatms: () => formatms
22
+ });
23
+ module.exports = __toCommonJS(chunk_XYCIH36R_exports);
24
+ function formatms(ms) {
25
+ if (ms < 1e3) {
26
+ return `${ms}ms`;
27
+ }
28
+ return (ms / 1e3).toFixed(2) + "s";
29
+ }
@@ -0,0 +1,30 @@
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_Y4TOGY6I_exports = {};
20
+ __export(chunk_Y4TOGY6I_exports, {
21
+ assertAlways: () => assertAlways
22
+ });
23
+ module.exports = __toCommonJS(chunk_Y4TOGY6I_exports);
24
+ function assertAlways(condition, message) {
25
+ if (!condition) {
26
+ throw new Error(
27
+ `${message}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`
28
+ );
29
+ }
30
+ }
@@ -0,0 +1,307 @@
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_YNDZCLVL_exports = {};
20
+ __export(chunk_YNDZCLVL_exports, {
21
+ M: () => M,
22
+ z: () => z
23
+ });
24
+ module.exports = __toCommonJS(chunk_YNDZCLVL_exports);
25
+ var t = Symbol.for("@ts-pattern/matcher");
26
+ var e = Symbol.for("@ts-pattern/isVariadic");
27
+ var n = "@ts-pattern/anonymous-select-key";
28
+ var r = (t2) => Boolean(t2 && "object" == typeof t2);
29
+ var i = (e2) => e2 && !!e2[t];
30
+ var o = (n2, s2, c2) => {
31
+ if (i(n2)) {
32
+ const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(s2);
33
+ return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
34
+ }
35
+ if (r(n2)) {
36
+ if (!r(s2)) return false;
37
+ if (Array.isArray(n2)) {
38
+ if (!Array.isArray(s2)) return false;
39
+ let t2 = [], r2 = [], u2 = [];
40
+ for (const o2 of n2.keys()) {
41
+ const s3 = n2[o2];
42
+ i(s3) && s3[e] ? u2.push(s3) : u2.length ? r2.push(s3) : t2.push(s3);
43
+ }
44
+ if (u2.length) {
45
+ if (u2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
46
+ if (s2.length < t2.length + r2.length) return false;
47
+ const e2 = s2.slice(0, t2.length), n3 = 0 === r2.length ? [] : s2.slice(-r2.length), i2 = s2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
48
+ return t2.every((t3, n4) => o(t3, e2[n4], c2)) && r2.every((t3, e3) => o(t3, n3[e3], c2)) && (0 === u2.length || o(u2[0], i2, c2));
49
+ }
50
+ return n2.length === s2.length && n2.every((t3, e2) => o(t3, s2[e2], c2));
51
+ }
52
+ return Reflect.ownKeys(n2).every((e2) => {
53
+ const r2 = n2[e2];
54
+ return (e2 in s2 || i(u2 = r2) && "optional" === u2[t]().matcherType) && o(r2, s2[e2], c2);
55
+ var u2;
56
+ });
57
+ }
58
+ return Object.is(s2, n2);
59
+ };
60
+ var s = (e2) => {
61
+ var n2, o2, u2;
62
+ return r(e2) ? i(e2) ? null != (n2 = null == (o2 = (u2 = e2[t]()).getSelectionKeys) ? void 0 : o2.call(u2)) ? n2 : [] : Array.isArray(e2) ? c(e2, s) : c(Object.values(e2), s) : [];
63
+ };
64
+ var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
65
+ function u(...t2) {
66
+ if (1 === t2.length) {
67
+ const [e2] = t2;
68
+ return (t3) => o(e2, t3, () => {
69
+ });
70
+ }
71
+ if (2 === t2.length) {
72
+ const [e2, n2] = t2;
73
+ return o(e2, n2, () => {
74
+ });
75
+ }
76
+ throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t2.length}.`);
77
+ }
78
+ function a(t2) {
79
+ return Object.assign(t2, { optional: () => h(t2), and: (e2) => d(t2, e2), or: (e2) => y(t2, e2), select: (e2) => void 0 === e2 ? v(t2) : v(e2, t2) });
80
+ }
81
+ function l(t2) {
82
+ return Object.assign(((t3) => Object.assign(t3, { [Symbol.iterator]() {
83
+ let n2 = 0;
84
+ const r2 = [{ value: Object.assign(t3, { [e]: true }), done: false }, { done: true, value: void 0 }];
85
+ return { next: () => {
86
+ var t4;
87
+ return null != (t4 = r2[n2++]) ? t4 : r2.at(-1);
88
+ } };
89
+ } }))(t2), { optional: () => l(h(t2)), select: (e2) => l(void 0 === e2 ? v(t2) : v(e2, t2)) });
90
+ }
91
+ function h(e2) {
92
+ return a({ [t]: () => ({ match: (t2) => {
93
+ let n2 = {};
94
+ const r2 = (t3, e3) => {
95
+ n2[t3] = e3;
96
+ };
97
+ return void 0 === t2 ? (s(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: o(e2, t2, r2), selections: n2 };
98
+ }, getSelectionKeys: () => s(e2), matcherType: "optional" }) });
99
+ }
100
+ var f = (t2, e2) => {
101
+ for (const n2 of t2) if (!e2(n2)) return false;
102
+ return true;
103
+ };
104
+ var g = (t2, e2) => {
105
+ for (const [n2, r2] of t2.entries()) if (!e2(r2, n2)) return false;
106
+ return true;
107
+ };
108
+ var m = (t2, e2) => {
109
+ const n2 = Reflect.ownKeys(t2);
110
+ for (const r2 of n2) if (!e2(r2, t2[r2])) return false;
111
+ return true;
112
+ };
113
+ function d(...e2) {
114
+ return a({ [t]: () => ({ match: (t2) => {
115
+ let n2 = {};
116
+ const r2 = (t3, e3) => {
117
+ n2[t3] = e3;
118
+ };
119
+ return { matched: e2.every((e3) => o(e3, t2, r2)), selections: n2 };
120
+ }, getSelectionKeys: () => c(e2, s), matcherType: "and" }) });
121
+ }
122
+ function y(...e2) {
123
+ return a({ [t]: () => ({ match: (t2) => {
124
+ let n2 = {};
125
+ const r2 = (t3, e3) => {
126
+ n2[t3] = e3;
127
+ };
128
+ return c(e2, s).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => o(e3, t2, r2)), selections: n2 };
129
+ }, getSelectionKeys: () => c(e2, s), matcherType: "or" }) });
130
+ }
131
+ function p(e2) {
132
+ return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
133
+ }
134
+ function v(...e2) {
135
+ const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
136
+ return a({ [t]: () => ({ match: (t2) => {
137
+ let e3 = { [null != r2 ? r2 : n]: t2 };
138
+ return { matched: void 0 === i2 || o(i2, t2, (t3, n2) => {
139
+ e3[t3] = n2;
140
+ }), selections: e3 };
141
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : s(i2)) }) });
142
+ }
143
+ function b(t2) {
144
+ return true;
145
+ }
146
+ function w(t2) {
147
+ return "number" == typeof t2;
148
+ }
149
+ function S(t2) {
150
+ return "string" == typeof t2;
151
+ }
152
+ function j(t2) {
153
+ return "bigint" == typeof t2;
154
+ }
155
+ var K = a(p(b));
156
+ var O = a(p(b));
157
+ var E = K;
158
+ var x = (t2) => Object.assign(a(t2), { startsWith: (e2) => {
159
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.startsWith(n2)))));
160
+ var n2;
161
+ }, endsWith: (e2) => {
162
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.endsWith(n2)))));
163
+ var n2;
164
+ }, minLength: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length >= t3))(e2))), length: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length === t3))(e2))), maxLength: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length <= t3))(e2))), includes: (e2) => {
165
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.includes(n2)))));
166
+ var n2;
167
+ }, regex: (e2) => {
168
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && Boolean(t3.match(n2))))));
169
+ var n2;
170
+ } });
171
+ var A = x(p(S));
172
+ var N = (t2) => Object.assign(a(t2), { between: (e2, n2) => N(d(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), int: () => N(d(t2, p((t3) => w(t3) && Number.isInteger(t3)))), finite: () => N(d(t2, p((t3) => w(t3) && Number.isFinite(t3)))), positive: () => N(d(t2, p((t3) => w(t3) && t3 > 0))), negative: () => N(d(t2, p((t3) => w(t3) && t3 < 0))) });
173
+ var P = N(p(w));
174
+ var k = (t2) => Object.assign(a(t2), { between: (e2, n2) => k(d(t2, ((t3, e3) => p((n3) => j(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 < t3))(e2))), gt: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 > t3))(e2))), lte: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 <= t3))(e2))), gte: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 >= t3))(e2))), positive: () => k(d(t2, p((t3) => j(t3) && t3 > 0))), negative: () => k(d(t2, p((t3) => j(t3) && t3 < 0))) });
175
+ var T = k(p(j));
176
+ var B = a(p(function(t2) {
177
+ return "boolean" == typeof t2;
178
+ }));
179
+ var _ = a(p(function(t2) {
180
+ return "symbol" == typeof t2;
181
+ }));
182
+ var W = a(p(function(t2) {
183
+ return null == t2;
184
+ }));
185
+ var $ = a(p(function(t2) {
186
+ return null != t2;
187
+ }));
188
+ var z = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
189
+ return l({ [t]: () => ({ match: (t2) => {
190
+ if (!Array.isArray(t2)) return { matched: false };
191
+ if (0 === e2.length) return { matched: true };
192
+ const n2 = e2[0];
193
+ let r2 = {};
194
+ if (0 === t2.length) return s(n2).forEach((t3) => {
195
+ r2[t3] = [];
196
+ }), { matched: true, selections: r2 };
197
+ const i2 = (t3, e3) => {
198
+ r2[t3] = (r2[t3] || []).concat([e3]);
199
+ };
200
+ return { matched: t2.every((t3) => o(n2, t3, i2)), selections: r2 };
201
+ }, getSelectionKeys: () => 0 === e2.length ? [] : s(e2[0]) }) });
202
+ }, set: function(...e2) {
203
+ return a({ [t]: () => ({ match: (t2) => {
204
+ if (!(t2 instanceof Set)) return { matched: false };
205
+ let n2 = {};
206
+ if (0 === t2.size) return { matched: true, selections: n2 };
207
+ if (0 === e2.length) return { matched: true };
208
+ const r2 = (t3, e3) => {
209
+ n2[t3] = (n2[t3] || []).concat([e3]);
210
+ }, i2 = e2[0];
211
+ return { matched: f(t2, (t3) => o(i2, t3, r2)), selections: n2 };
212
+ }, getSelectionKeys: () => 0 === e2.length ? [] : s(e2[0]) }) });
213
+ }, map: function(...e2) {
214
+ return a({ [t]: () => ({ match: (t2) => {
215
+ if (!(t2 instanceof Map)) return { matched: false };
216
+ let n2 = {};
217
+ if (0 === t2.size) return { matched: true, selections: n2 };
218
+ const r2 = (t3, e3) => {
219
+ n2[t3] = (n2[t3] || []).concat([e3]);
220
+ };
221
+ if (0 === e2.length) return { matched: true };
222
+ var i2;
223
+ if (1 === e2.length) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
224
+ const [s2, c2] = e2;
225
+ return { matched: g(t2, (t3, e3) => {
226
+ const n3 = o(s2, e3, r2), i3 = o(c2, t3, r2);
227
+ return n3 && i3;
228
+ }), selections: n2 };
229
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...s(e2[0]), ...s(e2[1])] }) });
230
+ }, record: function(...e2) {
231
+ return a({ [t]: () => ({ match: (t2) => {
232
+ if (null === t2 || "object" != typeof t2 || Array.isArray(t2)) return { matched: false };
233
+ var n2;
234
+ if (0 === e2.length) throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${null == (n2 = e2[0]) ? void 0 : n2.toString()}`);
235
+ let r2 = {};
236
+ const i2 = (t3, e3) => {
237
+ r2[t3] = (r2[t3] || []).concat([e3]);
238
+ }, [s2, c2] = 1 === e2.length ? [A, e2[0]] : e2;
239
+ return { matched: m(t2, (t3, e3) => {
240
+ const n3 = "string" != typeof t3 || Number.isNaN(Number(t3)) ? null : Number(t3), r3 = null !== n3 && o(s2, n3, i2), u2 = o(s2, t3, i2), a2 = o(c2, e3, i2);
241
+ return (u2 || r3) && a2;
242
+ }), selections: r2 };
243
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...s(e2[0]), ...s(e2[1])] }) });
244
+ }, intersection: d, union: y, not: function(e2) {
245
+ return a({ [t]: () => ({ match: (t2) => ({ matched: !o(e2, t2, () => {
246
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
247
+ }, when: p, select: v, any: K, unknown: O, _: E, string: A, number: P, bigint: T, boolean: B, symbol: _, nullish: W, nonNullable: $, instanceOf: function(t2) {
248
+ return a(p(/* @__PURE__ */ function(t3) {
249
+ return (e2) => e2 instanceof t3;
250
+ }(t2)));
251
+ }, shape: function(t2) {
252
+ return a(p(u(t2)));
253
+ } };
254
+ var I = class extends Error {
255
+ constructor(t2) {
256
+ let e2;
257
+ try {
258
+ e2 = JSON.stringify(t2);
259
+ } catch (n2) {
260
+ e2 = t2;
261
+ }
262
+ super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
263
+ }
264
+ };
265
+ var L = { matched: false, value: void 0 };
266
+ function M(t2) {
267
+ return new R(t2, L);
268
+ }
269
+ var R = class _R {
270
+ constructor(t2, e2) {
271
+ this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
272
+ }
273
+ with(...t2) {
274
+ if (this.state.matched) return this;
275
+ const e2 = t2[t2.length - 1], r2 = [t2[0]];
276
+ let i2;
277
+ 3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
278
+ let s2 = false, c2 = {};
279
+ const u2 = (t3, e3) => {
280
+ s2 = true, c2[t3] = e3;
281
+ }, a2 = !r2.some((t3) => o(t3, this.input, u2)) || i2 && !Boolean(i2(this.input)) ? L : { matched: true, value: e2(s2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
282
+ return new _R(this.input, a2);
283
+ }
284
+ when(t2, e2) {
285
+ if (this.state.matched) return this;
286
+ const n2 = Boolean(t2(this.input));
287
+ return new _R(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : L);
288
+ }
289
+ otherwise(t2) {
290
+ return this.state.matched ? this.state.value : t2(this.input);
291
+ }
292
+ exhaustive(t2 = F) {
293
+ return this.state.matched ? this.state.value : t2(this.input);
294
+ }
295
+ run() {
296
+ return this.exhaustive();
297
+ }
298
+ returnType() {
299
+ return this;
300
+ }
301
+ narrow() {
302
+ return this;
303
+ }
304
+ };
305
+ function F(t2) {
306
+ throw new I(t2);
307
+ }