@prisma/internals 7.10.0-dev.5 → 7.10.0-dev.58

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 (62) hide show
  1. package/dist/{chunk-ABMDX4EQ.js → chunk-3IMRWXIL.js} +15 -15
  2. package/dist/{chunk-EBLNHWW6.js → chunk-3VD46SL7.js} +9 -9
  3. package/dist/{chunk-AEI5DILY.js → chunk-5BDP445D.js} +5 -5
  4. package/dist/{chunk-4YZJJPK2.js → chunk-5P43324W.js} +15 -15
  5. package/dist/{chunk-GZY7QBBF.js → chunk-5WRIOIZY.js} +5 -5
  6. package/dist/{chunk-5SEUFFRY.js → chunk-6DUJVBF7.js} +29 -29
  7. package/dist/{chunk-LZ2DP3UC.js → chunk-6QMQ2JYG.js} +7 -7
  8. package/dist/{chunk-TZJROXB3.js → chunk-6Z766KGR.js} +6 -6
  9. package/dist/{chunk-KAH2NIWC.js → chunk-74RGCSUJ.js} +5 -5
  10. package/dist/{chunk-XAOAQYNN.js → chunk-AD2DKMII.js} +8 -8
  11. package/dist/{chunk-GZLJZGHX.js → chunk-DUDEWDFC.js} +7 -7
  12. package/dist/{chunk-2ZCAUSNJ.js → chunk-EWPXLBGE.js} +14 -14
  13. package/dist/{chunk-YXCPS3WU.js → chunk-FRVJZOHP.js} +6 -6
  14. package/dist/{chunk-MD47SEWA.js → chunk-HRNTJEMX.js} +14 -14
  15. package/dist/{chunk-HCOBBU2Q.js → chunk-IPVRPART.js} +5 -5
  16. package/dist/{chunk-QKQKSUQO.js → chunk-JFXHOFJA.js} +5 -5
  17. package/dist/{chunk-PP22IZ7I.js → chunk-JLFNVBTN.js} +5 -5
  18. package/dist/{chunk-PPSXRKJR.js → chunk-MBFQWFUB.js} +13 -13
  19. package/dist/{chunk-3RMP5ALU.js → chunk-MLTMKT3L.js} +5 -5
  20. package/dist/{chunk-3GIVRMID.js → chunk-PKF53VLJ.js} +5 -5
  21. package/dist/{chunk-L2BUQUNG.js → chunk-QBNYSYZK.js} +5 -5
  22. package/dist/{chunk-6S5MN3NA.js → chunk-QMNPESAP.js} +4 -4
  23. package/dist/{chunk-MAUT575G.js → chunk-R47SFJ5Z.js} +10 -10
  24. package/dist/{chunk-ZB2V476P.js → chunk-R4FWYJP7.js} +10 -10
  25. package/dist/{chunk-2BXDHSSY.js → chunk-TPCPXGC5.js} +5 -5
  26. package/dist/{chunk-6PILE32P.js → chunk-VUGB2H7M.js} +29 -29
  27. package/dist/{chunk-NUKBOD54.js → chunk-WFMA7DI5.js} +26 -22
  28. package/dist/{chunk-ZXAKMDG4.js → chunk-WOKQ6ZNV.js} +5 -5
  29. package/dist/{chunk-5P4WR3QW.js → chunk-XAAVALN7.js} +13 -13
  30. package/dist/chunk-YNDZCLVL.js +307 -0
  31. package/dist/{chunk-7IKUTPWQ.js → chunk-YXB6APHS.js} +5 -5
  32. package/dist/cli/checkUnsupportedDataProxy.d.ts +5 -5
  33. package/dist/cli/checkUnsupportedDataProxy.js +23 -23
  34. package/dist/cli/completion-values.js +24 -24
  35. package/dist/cli/getSchema.js +7 -7
  36. package/dist/cli/hashes.js +4 -4
  37. package/dist/cli/schemaContext.js +24 -24
  38. package/dist/engine-commands/errorHelpers.js +4 -4
  39. package/dist/engine-commands/formatSchema.js +22 -22
  40. package/dist/engine-commands/getConfig.js +9 -9
  41. package/dist/engine-commands/getDmmf.js +10 -10
  42. package/dist/engine-commands/getEnginesInfo.js +4 -4
  43. package/dist/engine-commands/index.js +33 -33
  44. package/dist/engine-commands/lintSchema.js +8 -8
  45. package/dist/engine-commands/mergeSchemas.js +9 -9
  46. package/dist/engine-commands/queryEngineCommons.js +6 -6
  47. package/dist/engine-commands/validate.js +9 -9
  48. package/dist/get-generators/getGenerators.d.ts +1 -0
  49. package/dist/get-generators/getGenerators.js +25 -25
  50. package/dist/index.js +75 -75
  51. package/dist/migrateTypes.d.ts +1 -1
  52. package/dist/sendPanic.js +3 -3
  53. package/dist/utils/getGitHubIssueUrl.js +4 -4
  54. package/dist/utils/getVersionFromPackageJson.js +3 -3
  55. package/dist/utils/handlePanic.js +5 -5
  56. package/dist/utils/missingGeneratorMessage.d.ts +3 -3
  57. package/dist/utils/missingGeneratorMessage.js +4 -4
  58. package/dist/utils/validatePrismaConfigWithDatasource.d.ts +2 -2
  59. package/dist/utils/validatePrismaConfigWithDatasource.js +3 -3
  60. package/dist/wasm.js +5 -5
  61. package/package.json +16 -16
  62. package/dist/chunk-XKZ6CBLA.js +0 -281
package/dist/sendPanic.js CHANGED
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var sendPanic_exports = {};
20
20
  __export(sendPanic_exports, {
21
- sendPanic: () => import_chunk_YXCPS3WU.sendPanic
21
+ sendPanic: () => import_chunk_FRVJZOHP.sendPanic
22
22
  });
23
23
  module.exports = __toCommonJS(sendPanic_exports);
24
- var import_chunk_YXCPS3WU = require("./chunk-YXCPS3WU.js");
25
- var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
24
+ var import_chunk_FRVJZOHP = require("./chunk-FRVJZOHP.js");
25
+ var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
26
26
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
27
27
  var import_chunk_5AI4FIZ3 = require("./chunk-5AI4FIZ3.js");
28
28
  var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.js");
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var getGitHubIssueUrl_exports = {};
20
20
  __export(getGitHubIssueUrl_exports, {
21
- getGitHubIssueUrl: () => import_chunk_7IKUTPWQ.getGitHubIssueUrl,
22
- wouldYouLikeToCreateANewIssue: () => import_chunk_7IKUTPWQ.wouldYouLikeToCreateANewIssue
21
+ getGitHubIssueUrl: () => import_chunk_YXB6APHS.getGitHubIssueUrl,
22
+ wouldYouLikeToCreateANewIssue: () => import_chunk_YXB6APHS.wouldYouLikeToCreateANewIssue
23
23
  });
24
24
  module.exports = __toCommonJS(getGitHubIssueUrl_exports);
25
- var import_chunk_7IKUTPWQ = require("../chunk-7IKUTPWQ.js");
26
- var import_chunk_XKZ6CBLA = require("../chunk-XKZ6CBLA.js");
25
+ var import_chunk_YXB6APHS = require("../chunk-YXB6APHS.js");
26
+ var import_chunk_YNDZCLVL = require("../chunk-YNDZCLVL.js");
27
27
  var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
@@ -18,9 +18,9 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var getVersionFromPackageJson_exports = {};
20
20
  __export(getVersionFromPackageJson_exports, {
21
- version: () => import_chunk_HCOBBU2Q.version
21
+ version: () => import_chunk_IPVRPART.version
22
22
  });
23
23
  module.exports = __toCommonJS(getVersionFromPackageJson_exports);
24
- var import_chunk_HCOBBU2Q = require("../chunk-HCOBBU2Q.js");
25
- var import_chunk_XAOAQYNN = require("../chunk-XAOAQYNN.js");
24
+ var import_chunk_IPVRPART = require("../chunk-IPVRPART.js");
25
+ var import_chunk_AD2DKMII = require("../chunk-AD2DKMII.js");
26
26
  var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
@@ -18,17 +18,17 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var handlePanic_exports = {};
20
20
  __export(handlePanic_exports, {
21
- handlePanic: () => import_chunk_GZLJZGHX.handlePanic
21
+ handlePanic: () => import_chunk_DUDEWDFC.handlePanic
22
22
  });
23
23
  module.exports = __toCommonJS(handlePanic_exports);
24
- var import_chunk_GZLJZGHX = require("../chunk-GZLJZGHX.js");
24
+ var import_chunk_DUDEWDFC = require("../chunk-DUDEWDFC.js");
25
25
  var import_chunk_I6WLABB2 = require("../chunk-I6WLABB2.js");
26
- var import_chunk_7IKUTPWQ = require("../chunk-7IKUTPWQ.js");
26
+ var import_chunk_YXB6APHS = require("../chunk-YXB6APHS.js");
27
27
  var import_chunk_FCYHZHVW = require("../chunk-FCYHZHVW.js");
28
28
  var import_chunk_H4NI2RIK = require("../chunk-H4NI2RIK.js");
29
29
  var import_chunk_ICFLO5JW = require("../chunk-ICFLO5JW.js");
30
- var import_chunk_YXCPS3WU = require("../chunk-YXCPS3WU.js");
31
- var import_chunk_XKZ6CBLA = require("../chunk-XKZ6CBLA.js");
30
+ var import_chunk_FRVJZOHP = require("../chunk-FRVJZOHP.js");
31
+ var import_chunk_YNDZCLVL = require("../chunk-YNDZCLVL.js");
32
32
  var import_chunk_LMVSIVKQ = require("../chunk-LMVSIVKQ.js");
33
33
  var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
34
34
  var import_chunk_5AI4FIZ3 = require("../chunk-5AI4FIZ3.js");
@@ -1,3 +1,3 @@
1
- export declare const missingGeneratorMessage: string;
2
- export declare const missingModelMessage: string;
3
- export declare const missingModelMessageMongoDB: string;
1
+ export declare function missingGeneratorMessage(cliCommand: string): string;
2
+ export declare function missingModelMessage(cliCommand: string): string;
3
+ export declare function missingModelMessageMongoDB(cliCommand: string): string;
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var missingGeneratorMessage_exports = {};
20
20
  __export(missingGeneratorMessage_exports, {
21
- missingGeneratorMessage: () => import_chunk_NUKBOD54.missingGeneratorMessage,
22
- missingModelMessage: () => import_chunk_NUKBOD54.missingModelMessage,
23
- missingModelMessageMongoDB: () => import_chunk_NUKBOD54.missingModelMessageMongoDB
21
+ missingGeneratorMessage: () => import_chunk_WFMA7DI5.missingGeneratorMessage,
22
+ missingModelMessage: () => import_chunk_WFMA7DI5.missingModelMessage,
23
+ missingModelMessageMongoDB: () => import_chunk_WFMA7DI5.missingModelMessageMongoDB
24
24
  });
25
25
  module.exports = __toCommonJS(missingGeneratorMessage_exports);
26
- var import_chunk_NUKBOD54 = require("../chunk-NUKBOD54.js");
26
+ var import_chunk_WFMA7DI5 = require("../chunk-WFMA7DI5.js");
27
27
  var import_chunk_I6WLABB2 = require("../chunk-I6WLABB2.js");
28
28
  var import_chunk_VNIE2AZB = require("../chunk-VNIE2AZB.js");
29
29
  var import_chunk_CYAS6B5N = require("../chunk-CYAS6B5N.js");
@@ -11,7 +11,7 @@ export type PrismaConfigWithDatasource = RequireKey<PrismaConfig, 'datasource'>
11
11
  };
12
12
  type ValidatePrismaConfigWithDatasourceInput = {
13
13
  config: Pick<PrismaConfig, 'datasource'>;
14
- cmd: string;
14
+ command: string;
15
15
  };
16
- export declare function validatePrismaConfigWithDatasource({ config, cmd, }: ValidatePrismaConfigWithDatasourceInput): PrismaConfigWithDatasource;
16
+ export declare function validatePrismaConfigWithDatasource({ config, command, }: ValidatePrismaConfigWithDatasourceInput): PrismaConfigWithDatasource;
17
17
  export {};
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var validatePrismaConfigWithDatasource_exports = {};
20
20
  __export(validatePrismaConfigWithDatasource_exports, {
21
- ConfigValidationError: () => import_chunk_QKQKSUQO.ConfigValidationError,
22
- validatePrismaConfigWithDatasource: () => import_chunk_QKQKSUQO.validatePrismaConfigWithDatasource
21
+ ConfigValidationError: () => import_chunk_JFXHOFJA.ConfigValidationError,
22
+ validatePrismaConfigWithDatasource: () => import_chunk_JFXHOFJA.validatePrismaConfigWithDatasource
23
23
  });
24
24
  module.exports = __toCommonJS(validatePrismaConfigWithDatasource_exports);
25
- var import_chunk_QKQKSUQO = require("../chunk-QKQKSUQO.js");
25
+ var import_chunk_JFXHOFJA = require("../chunk-JFXHOFJA.js");
26
26
  var import_chunk_ANU3HEGF = require("../chunk-ANU3HEGF.js");
27
27
  var import_chunk_PG5FDKSF = require("../chunk-PG5FDKSF.js");
28
28
  var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
package/dist/wasm.js CHANGED
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var wasm_exports = {};
20
20
  __export(wasm_exports, {
21
- prismaSchemaWasm: () => import_chunk_AEI5DILY.prismaSchemaWasm,
22
- prismaSchemaWasmVersion: () => import_chunk_AEI5DILY.prismaSchemaWasmVersion,
23
- schemaEngineWasmVersion: () => import_chunk_AEI5DILY.schemaEngineWasmVersion
21
+ prismaSchemaWasm: () => import_chunk_JLFNVBTN.prismaSchemaWasm,
22
+ prismaSchemaWasmVersion: () => import_chunk_JLFNVBTN.prismaSchemaWasmVersion,
23
+ schemaEngineWasmVersion: () => import_chunk_JLFNVBTN.schemaEngineWasmVersion
24
24
  });
25
25
  module.exports = __toCommonJS(wasm_exports);
26
- var import_chunk_AEI5DILY = require("./chunk-AEI5DILY.js");
27
- var import_chunk_XAOAQYNN = require("./chunk-XAOAQYNN.js");
26
+ var import_chunk_JLFNVBTN = require("./chunk-JLFNVBTN.js");
27
+ var import_chunk_AD2DKMII = require("./chunk-AD2DKMII.js");
28
28
  var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
29
29
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/internals",
3
- "version": "7.10.0-dev.5",
3
+ "version": "7.10.0-dev.58",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "empathic": "2.0.0",
31
31
  "escape-string-regexp": "5.0.0",
32
32
  "execa": "8.0.1",
33
- "find-up": "7.0.0",
33
+ "find-up": "8.0.0",
34
34
  "fp-ts": "2.16.9",
35
35
  "fs-extra": "11.3.0",
36
36
  "global-directory": "4.0.0",
@@ -53,28 +53,28 @@
53
53
  "tempy": "1.0.1",
54
54
  "terminal-link": "4.0.0",
55
55
  "tmp": "0.2.3",
56
- "ts-pattern": "5.6.2",
56
+ "ts-pattern": "5.9.0",
57
57
  "ts-toolbelt": "9.6.0",
58
58
  "typescript": "5.4.5",
59
59
  "yarn": "1.22.22"
60
60
  },
61
61
  "dependencies": {
62
- "@prisma/prisma-schema-wasm": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
63
- "@prisma/schema-engine-wasm": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
62
+ "@prisma/prisma-schema-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
63
+ "@prisma/schema-engine-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
64
64
  "@streamparser/json": "0.0.22",
65
65
  "arg": "5.0.2",
66
66
  "prompts": "2.4.2",
67
- "@prisma/config": "7.10.0-dev.5",
68
- "@prisma/engines": "7.10.0-dev.5",
69
- "@prisma/debug": "7.10.0-dev.5",
70
- "@prisma/driver-adapter-utils": "7.10.0-dev.5",
71
- "@prisma/fetch-engine": "7.10.0-dev.5",
72
- "@prisma/dmmf": "7.10.0-dev.5",
73
- "@prisma/generator": "7.10.0-dev.5",
74
- "@prisma/generator-helper": "7.10.0-dev.5",
75
- "@prisma/get-dmmf": "7.10.0-dev.5",
76
- "@prisma/schema-files-loader": "7.10.0-dev.5",
77
- "@prisma/get-platform": "7.10.0-dev.5"
67
+ "@prisma/dmmf": "7.10.0-dev.58",
68
+ "@prisma/debug": "7.10.0-dev.58",
69
+ "@prisma/driver-adapter-utils": "7.10.0-dev.58",
70
+ "@prisma/config": "7.10.0-dev.58",
71
+ "@prisma/engines": "7.10.0-dev.58",
72
+ "@prisma/fetch-engine": "7.10.0-dev.58",
73
+ "@prisma/generator": "7.10.0-dev.58",
74
+ "@prisma/generator-helper": "7.10.0-dev.58",
75
+ "@prisma/get-platform": "7.10.0-dev.58",
76
+ "@prisma/schema-files-loader": "7.10.0-dev.58",
77
+ "@prisma/get-dmmf": "7.10.0-dev.58"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "typescript": ">=5.4.0"
@@ -1,281 +0,0 @@
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_XKZ6CBLA_exports = {};
20
- __export(chunk_XKZ6CBLA_exports, {
21
- N: () => N,
22
- z: () => z
23
- });
24
- module.exports = __toCommonJS(chunk_XKZ6CBLA_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 s = (n2, o2, c2) => {
31
- if (i(n2)) {
32
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
33
- return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
34
- }
35
- if (r(n2)) {
36
- if (!r(o2)) return false;
37
- if (Array.isArray(n2)) {
38
- if (!Array.isArray(o2)) return false;
39
- let t2 = [], r2 = [], a2 = [];
40
- for (const s2 of n2.keys()) {
41
- const o3 = n2[s2];
42
- i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
43
- }
44
- if (a2.length) {
45
- if (a2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
46
- if (o2.length < t2.length + r2.length) return false;
47
- const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
48
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
49
- }
50
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
51
- }
52
- return Reflect.ownKeys(n2).every((e2) => {
53
- const r2 = n2[e2];
54
- return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
55
- var a2;
56
- });
57
- }
58
- return Object.is(o2, n2);
59
- };
60
- var o = (e2) => {
61
- var n2, s2, a2;
62
- return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
63
- };
64
- var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
65
- function a(...t2) {
66
- if (1 === t2.length) {
67
- const [e2] = t2;
68
- return (t3) => s(e2, t3, () => {
69
- });
70
- }
71
- if (2 === t2.length) {
72
- const [e2, n2] = t2;
73
- return s(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 u(t2) {
79
- return Object.assign(t2, { optional: () => h(t2), and: (e2) => m(t2, e2), or: (e2) => d(t2, e2), select: (e2) => void 0 === e2 ? y(t2) : y(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 ? y(t2) : y(e2, t2)) });
90
- }
91
- function h(e2) {
92
- return u({ [t]: () => ({ match: (t2) => {
93
- let n2 = {};
94
- const r2 = (t3, e3) => {
95
- n2[t3] = e3;
96
- };
97
- return void 0 === t2 ? (o(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
98
- }, getSelectionKeys: () => o(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
- function m(...e2) {
109
- return u({ [t]: () => ({ match: (t2) => {
110
- let n2 = {};
111
- const r2 = (t3, e3) => {
112
- n2[t3] = e3;
113
- };
114
- return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
115
- }, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
116
- }
117
- function d(...e2) {
118
- return u({ [t]: () => ({ match: (t2) => {
119
- let n2 = {};
120
- const r2 = (t3, e3) => {
121
- n2[t3] = e3;
122
- };
123
- return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
124
- }, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
125
- }
126
- function p(e2) {
127
- return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
128
- }
129
- function y(...e2) {
130
- const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
131
- return u({ [t]: () => ({ match: (t2) => {
132
- let e3 = { [null != r2 ? r2 : n]: t2 };
133
- return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
134
- e3[t3] = n2;
135
- }), selections: e3 };
136
- }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o(i2)) }) });
137
- }
138
- function v(t2) {
139
- return "number" == typeof t2;
140
- }
141
- function b(t2) {
142
- return "string" == typeof t2;
143
- }
144
- function w(t2) {
145
- return "bigint" == typeof t2;
146
- }
147
- var S = u(p(function(t2) {
148
- return true;
149
- }));
150
- var O = S;
151
- var j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
152
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.startsWith(n2)))));
153
- var n2;
154
- }, endsWith: (e2) => {
155
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.endsWith(n2)))));
156
- var n2;
157
- }, minLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length >= t3))(e2))), length: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length === t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
158
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.includes(n2)))));
159
- var n2;
160
- }, regex: (e2) => {
161
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && Boolean(t3.match(n2))))));
162
- var n2;
163
- } });
164
- var K = j(p(b));
165
- var x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => p((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 >= t3))(e2))), int: () => x(m(t2, p((t3) => v(t3) && Number.isInteger(t3)))), finite: () => x(m(t2, p((t3) => v(t3) && Number.isFinite(t3)))), positive: () => x(m(t2, p((t3) => v(t3) && t3 > 0))), negative: () => x(m(t2, p((t3) => v(t3) && t3 < 0))) });
166
- var E = x(p(v));
167
- var A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, p((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, p((t3) => w(t3) && t3 < 0))) });
168
- var P = A(p(w));
169
- var T = u(p(function(t2) {
170
- return "boolean" == typeof t2;
171
- }));
172
- var B = u(p(function(t2) {
173
- return "symbol" == typeof t2;
174
- }));
175
- var _ = u(p(function(t2) {
176
- return null == t2;
177
- }));
178
- var k = u(p(function(t2) {
179
- return null != t2;
180
- }));
181
- var N = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
182
- return l({ [t]: () => ({ match: (t2) => {
183
- if (!Array.isArray(t2)) return { matched: false };
184
- if (0 === e2.length) return { matched: true };
185
- const n2 = e2[0];
186
- let r2 = {};
187
- if (0 === t2.length) return o(n2).forEach((t3) => {
188
- r2[t3] = [];
189
- }), { matched: true, selections: r2 };
190
- const i2 = (t3, e3) => {
191
- r2[t3] = (r2[t3] || []).concat([e3]);
192
- };
193
- return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
194
- }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
195
- }, set: function(...e2) {
196
- return u({ [t]: () => ({ match: (t2) => {
197
- if (!(t2 instanceof Set)) return { matched: false };
198
- let n2 = {};
199
- if (0 === t2.size) return { matched: true, selections: n2 };
200
- if (0 === e2.length) return { matched: true };
201
- const r2 = (t3, e3) => {
202
- n2[t3] = (n2[t3] || []).concat([e3]);
203
- }, i2 = e2[0];
204
- return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
205
- }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
206
- }, map: function(...e2) {
207
- return u({ [t]: () => ({ match: (t2) => {
208
- if (!(t2 instanceof Map)) return { matched: false };
209
- let n2 = {};
210
- if (0 === t2.size) return { matched: true, selections: n2 };
211
- const r2 = (t3, e3) => {
212
- n2[t3] = (n2[t3] || []).concat([e3]);
213
- };
214
- if (0 === e2.length) return { matched: true };
215
- var i2;
216
- 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()}`);
217
- const [o2, c2] = e2;
218
- return { matched: g(t2, (t3, e3) => {
219
- const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
220
- return n3 && i3;
221
- }), selections: n2 };
222
- }, getSelectionKeys: () => 0 === e2.length ? [] : [...o(e2[0]), ...o(e2[1])] }) });
223
- }, intersection: m, union: d, not: function(e2) {
224
- return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
225
- }) }), getSelectionKeys: () => [], matcherType: "not" }) });
226
- }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(t2) {
227
- return u(p(/* @__PURE__ */ function(t3) {
228
- return (e2) => e2 instanceof t3;
229
- }(t2)));
230
- }, shape: function(t2) {
231
- return u(p(a(t2)));
232
- } };
233
- var W = class extends Error {
234
- constructor(t2) {
235
- let e2;
236
- try {
237
- e2 = JSON.stringify(t2);
238
- } catch (n2) {
239
- e2 = t2;
240
- }
241
- super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
242
- }
243
- };
244
- var $ = { matched: false, value: void 0 };
245
- function z(t2) {
246
- return new I(t2, $);
247
- }
248
- var I = class _I {
249
- constructor(t2, e2) {
250
- this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
251
- }
252
- with(...t2) {
253
- if (this.state.matched) return this;
254
- const e2 = t2[t2.length - 1], r2 = [t2[0]];
255
- let i2;
256
- 3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
257
- let o2 = false, c2 = {};
258
- const a2 = (t3, e3) => {
259
- o2 = true, c2[t3] = e3;
260
- }, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? $ : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
261
- return new _I(this.input, u2);
262
- }
263
- when(t2, e2) {
264
- if (this.state.matched) return this;
265
- const n2 = Boolean(t2(this.input));
266
- return new _I(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : $);
267
- }
268
- otherwise(t2) {
269
- return this.state.matched ? this.state.value : t2(this.input);
270
- }
271
- exhaustive() {
272
- if (this.state.matched) return this.state.value;
273
- throw new W(this.input);
274
- }
275
- run() {
276
- return this.exhaustive();
277
- }
278
- returnType() {
279
- return this;
280
- }
281
- };