@foldkit/oxlint-plugin 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +554 -427
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __export = (target, all3) => {
|
|
|
4
4
|
__defProp(target, name, { get: all3[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
7
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Pipeable.js
|
|
8
8
|
var pipeArguments = (self, args2) => {
|
|
9
9
|
switch (args2.length) {
|
|
10
10
|
case 0:
|
|
@@ -48,7 +48,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
48
48
|
return PipeableBase;
|
|
49
49
|
})();
|
|
50
50
|
|
|
51
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
51
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Function.js
|
|
52
52
|
var dual = function(arity, body) {
|
|
53
53
|
if (typeof arity === "function") {
|
|
54
54
|
return function() {
|
|
@@ -98,45 +98,6 @@ var constVoid = constUndefined;
|
|
|
98
98
|
function pipe(a, ...args2) {
|
|
99
99
|
return pipeArguments(a, args2);
|
|
100
100
|
}
|
|
101
|
-
function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
102
|
-
switch (arguments.length) {
|
|
103
|
-
case 1:
|
|
104
|
-
return ab;
|
|
105
|
-
case 2:
|
|
106
|
-
return function() {
|
|
107
|
-
return bc(ab.apply(this, arguments));
|
|
108
|
-
};
|
|
109
|
-
case 3:
|
|
110
|
-
return function() {
|
|
111
|
-
return cd(bc(ab.apply(this, arguments)));
|
|
112
|
-
};
|
|
113
|
-
case 4:
|
|
114
|
-
return function() {
|
|
115
|
-
return de(cd(bc(ab.apply(this, arguments))));
|
|
116
|
-
};
|
|
117
|
-
case 5:
|
|
118
|
-
return function() {
|
|
119
|
-
return ef(de(cd(bc(ab.apply(this, arguments)))));
|
|
120
|
-
};
|
|
121
|
-
case 6:
|
|
122
|
-
return function() {
|
|
123
|
-
return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
|
|
124
|
-
};
|
|
125
|
-
case 7:
|
|
126
|
-
return function() {
|
|
127
|
-
return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
|
|
128
|
-
};
|
|
129
|
-
case 8:
|
|
130
|
-
return function() {
|
|
131
|
-
return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
|
|
132
|
-
};
|
|
133
|
-
case 9:
|
|
134
|
-
return function() {
|
|
135
|
-
return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
101
|
function memoize(f) {
|
|
141
102
|
const cache = /* @__PURE__ */ new WeakMap();
|
|
142
103
|
return (a) => {
|
|
@@ -149,7 +110,7 @@ function memoize(f) {
|
|
|
149
110
|
};
|
|
150
111
|
}
|
|
151
112
|
|
|
152
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
113
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/equal.js
|
|
153
114
|
var getAllObjectKeys = (obj) => {
|
|
154
115
|
const keys2 = new Set(Reflect.ownKeys(obj));
|
|
155
116
|
if (obj.constructor === Object) return keys2;
|
|
@@ -172,7 +133,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
172
133
|
};
|
|
173
134
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
174
135
|
|
|
175
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
136
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Predicate.js
|
|
176
137
|
function isString(input) {
|
|
177
138
|
return typeof input === "string";
|
|
178
139
|
}
|
|
@@ -206,7 +167,7 @@ function isIterable(input) {
|
|
|
206
167
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
207
168
|
}
|
|
208
169
|
|
|
209
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
170
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Hash.js
|
|
210
171
|
var symbol = "~effect/interfaces/Hash";
|
|
211
172
|
var hash = (self) => {
|
|
212
173
|
switch (typeof self) {
|
|
@@ -325,7 +286,7 @@ function withVisitedTracking(obj, fn3) {
|
|
|
325
286
|
return result3;
|
|
326
287
|
}
|
|
327
288
|
|
|
328
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
289
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Equal.js
|
|
329
290
|
var symbol2 = "~effect/interfaces/Equal";
|
|
330
291
|
function equals() {
|
|
331
292
|
if (arguments.length === 1) {
|
|
@@ -507,23 +468,23 @@ var byReferenceUnsafe = (obj) => {
|
|
|
507
468
|
return obj;
|
|
508
469
|
};
|
|
509
470
|
|
|
510
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
471
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/array.js
|
|
511
472
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
512
473
|
|
|
513
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
514
|
-
var let_ = (
|
|
474
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/doNotation.js
|
|
475
|
+
var let_ = (map8) => dual(3, (self, name, f) => map8(self, (a) => ({
|
|
515
476
|
...a,
|
|
516
477
|
[name]: f(a)
|
|
517
478
|
})));
|
|
518
|
-
var bindTo = (
|
|
479
|
+
var bindTo = (map8) => dual(2, (self, name) => map8(self, (a) => ({
|
|
519
480
|
[name]: a
|
|
520
481
|
})));
|
|
521
|
-
var bind = (
|
|
482
|
+
var bind = (map8, flatMap5) => dual(3, (self, name, f) => flatMap5(self, (a) => map8(f(a), (b) => ({
|
|
522
483
|
...a,
|
|
523
484
|
[name]: b
|
|
524
485
|
}))));
|
|
525
486
|
|
|
526
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
487
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Redactable.js
|
|
527
488
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
528
489
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
529
490
|
function redact(u) {
|
|
@@ -542,7 +503,7 @@ var emptyContext = {
|
|
|
542
503
|
}
|
|
543
504
|
};
|
|
544
505
|
|
|
545
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
506
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Formatter.js
|
|
546
507
|
function format(input, options) {
|
|
547
508
|
const space = options?.space ?? 0;
|
|
548
509
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
@@ -641,7 +602,7 @@ function formatJson(input, options) {
|
|
|
641
602
|
}, options?.space);
|
|
642
603
|
}
|
|
643
604
|
|
|
644
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
605
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Inspectable.js
|
|
645
606
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
646
607
|
var toJson = (input) => {
|
|
647
608
|
try {
|
|
@@ -705,7 +666,7 @@ var Class2 = class {
|
|
|
705
666
|
}
|
|
706
667
|
};
|
|
707
668
|
|
|
708
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
669
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Utils.js
|
|
709
670
|
var SingleShotGen = class _SingleShotGen {
|
|
710
671
|
called = false;
|
|
711
672
|
self;
|
|
@@ -765,7 +726,7 @@ var pickInternalCall = () => {
|
|
|
765
726
|
};
|
|
766
727
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
767
728
|
|
|
768
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
729
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/core.js
|
|
769
730
|
var EffectTypeId = `~effect/Effect`;
|
|
770
731
|
var ExitTypeId = `~effect/Exit`;
|
|
771
732
|
var effectVariance = {
|
|
@@ -1125,7 +1086,7 @@ var done = (value) => {
|
|
|
1125
1086
|
return exitFail(Done(value));
|
|
1126
1087
|
};
|
|
1127
1088
|
|
|
1128
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1089
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/option.js
|
|
1129
1090
|
var TypeId = "~effect/data/Option";
|
|
1130
1091
|
var CommonProto = {
|
|
1131
1092
|
[TypeId]: {
|
|
@@ -1191,7 +1152,7 @@ var some = (value) => {
|
|
|
1191
1152
|
return a;
|
|
1192
1153
|
};
|
|
1193
1154
|
|
|
1194
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1155
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/result.js
|
|
1195
1156
|
var TypeId2 = "~effect/data/Result";
|
|
1196
1157
|
var CommonProto2 = {
|
|
1197
1158
|
[TypeId2]: {
|
|
@@ -1259,7 +1220,7 @@ var succeed = (success) => {
|
|
|
1259
1220
|
};
|
|
1260
1221
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
|
|
1261
1222
|
|
|
1262
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1223
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Order.js
|
|
1263
1224
|
function make(compare) {
|
|
1264
1225
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
1265
1226
|
}
|
|
@@ -1273,7 +1234,7 @@ var mapInput = /* @__PURE__ */ dual(2, (self, f) => make((b1, b2) => self(f(b1),
|
|
|
1273
1234
|
var Date2 = /* @__PURE__ */ mapInput(Number2, (date) => date.getTime());
|
|
1274
1235
|
var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
1275
1236
|
|
|
1276
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1237
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Option.js
|
|
1277
1238
|
var none2 = () => none;
|
|
1278
1239
|
var some2 = some;
|
|
1279
1240
|
var isNone2 = isNone;
|
|
@@ -1290,7 +1251,7 @@ var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some2(f
|
|
|
1290
1251
|
var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
|
|
1291
1252
|
var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some2(self.value) : none2());
|
|
1292
1253
|
|
|
1293
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1254
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Result.js
|
|
1294
1255
|
var succeed2 = succeed;
|
|
1295
1256
|
var fail2 = fail;
|
|
1296
1257
|
var fromOption2 = fromOption;
|
|
@@ -1301,7 +1262,7 @@ var match2 = /* @__PURE__ */ dual(2, (self, {
|
|
|
1301
1262
|
onSuccess
|
|
1302
1263
|
}) => isFailure2(self) ? onFailure(self.failure) : onSuccess(self.success));
|
|
1303
1264
|
|
|
1304
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1265
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Iterable.js
|
|
1305
1266
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
1306
1267
|
let i = 0;
|
|
1307
1268
|
for (const a of self) {
|
|
@@ -1344,7 +1305,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
|
|
|
1344
1305
|
}
|
|
1345
1306
|
}));
|
|
1346
1307
|
|
|
1347
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1308
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Record.js
|
|
1348
1309
|
var empty = () => ({});
|
|
1349
1310
|
var isEmptyRecord = (self) => Object.keys(self).length === 0;
|
|
1350
1311
|
var fromEntries = Object.fromEntries;
|
|
@@ -1386,7 +1347,7 @@ var union = /* @__PURE__ */ dual(3, (self, that, combine2) => {
|
|
|
1386
1347
|
return out;
|
|
1387
1348
|
});
|
|
1388
1349
|
|
|
1389
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1350
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Array.js
|
|
1390
1351
|
var Array2 = globalThis.Array;
|
|
1391
1352
|
var fromIterable = (collection) => Array2.isArray(collection) ? collection : Array2.from(collection);
|
|
1392
1353
|
var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
|
|
@@ -1498,19 +1459,39 @@ var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
|
1498
1459
|
});
|
|
1499
1460
|
var join = /* @__PURE__ */ dual(2, (self, sep) => fromIterable(self).join(sep));
|
|
1500
1461
|
|
|
1501
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1462
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Effectable.js
|
|
1502
1463
|
var Prototype2 = (options) => makePrimitiveProto({
|
|
1503
1464
|
op: options.label,
|
|
1504
1465
|
[evaluate]: options.evaluate
|
|
1505
1466
|
});
|
|
1506
1467
|
|
|
1507
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1468
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
1469
|
+
var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1470
|
+
var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1471
|
+
var ObjectIsExtensible = Object.isExtensible;
|
|
1472
|
+
var isStackTraceLimitWritable = () => {
|
|
1473
|
+
const desc = ObjectGetOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
1474
|
+
if (desc === void 0) {
|
|
1475
|
+
return ObjectIsExtensible(Error);
|
|
1476
|
+
}
|
|
1477
|
+
return ObjectPrototypeHasOwnProperty.call(desc, "writable") ? desc.writable === true : desc.set !== void 0;
|
|
1478
|
+
};
|
|
1479
|
+
var canWriteStackTraceLimit = /* @__PURE__ */ isStackTraceLimitWritable();
|
|
1480
|
+
var getStackTraceLimit = () => Error.stackTraceLimit;
|
|
1481
|
+
var setStackTraceLimit = (value) => {
|
|
1482
|
+
if (canWriteStackTraceLimit) {
|
|
1483
|
+
;
|
|
1484
|
+
Error.stackTraceLimit = value;
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1488
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Context.js
|
|
1508
1489
|
var ServiceTypeId = "~effect/Context/Service";
|
|
1509
1490
|
var Service = function() {
|
|
1510
|
-
const prevLimit =
|
|
1511
|
-
|
|
1491
|
+
const prevLimit = getStackTraceLimit();
|
|
1492
|
+
setStackTraceLimit(2);
|
|
1512
1493
|
const err = new Error();
|
|
1513
|
-
|
|
1494
|
+
setStackTraceLimit(prevLimit);
|
|
1514
1495
|
function KeyClass() {
|
|
1515
1496
|
}
|
|
1516
1497
|
const self = KeyClass;
|
|
@@ -1605,8 +1586,8 @@ var isReference = (u) => hasProperty(u, ReferenceTypeId);
|
|
|
1605
1586
|
var empty3 = () => emptyContext2;
|
|
1606
1587
|
var emptyContext2 = /* @__PURE__ */ makeUnsafe(/* @__PURE__ */ new Map());
|
|
1607
1588
|
var make2 = (key, service3) => makeUnsafe(/* @__PURE__ */ new Map([[key.key, service3]]));
|
|
1608
|
-
var add = /* @__PURE__ */ dual(3, (self, key, service3) => withMapUnsafe(self, (
|
|
1609
|
-
|
|
1589
|
+
var add = /* @__PURE__ */ dual(3, (self, key, service3) => withMapUnsafe(self, (map8) => {
|
|
1590
|
+
map8.set(key.key, service3);
|
|
1610
1591
|
}));
|
|
1611
1592
|
var getOrElse2 = /* @__PURE__ */ dual(3, (self, key, orElse2) => {
|
|
1612
1593
|
if (self.mapUnsafe.has(key.key)) {
|
|
@@ -1662,31 +1643,31 @@ var getOption = /* @__PURE__ */ dual(2, (self, service3) => {
|
|
|
1662
1643
|
var merge = /* @__PURE__ */ dual(2, (self, that) => {
|
|
1663
1644
|
if (self.mapUnsafe.size === 0) return that;
|
|
1664
1645
|
if (that.mapUnsafe.size === 0) return self;
|
|
1665
|
-
return withMapUnsafe(self, (
|
|
1666
|
-
that.mapUnsafe.forEach((value, key) =>
|
|
1646
|
+
return withMapUnsafe(self, (map8) => {
|
|
1647
|
+
that.mapUnsafe.forEach((value, key) => map8.set(key, value));
|
|
1667
1648
|
});
|
|
1668
1649
|
});
|
|
1669
1650
|
var mergeAll = (...ctxs) => {
|
|
1670
|
-
const
|
|
1651
|
+
const map8 = /* @__PURE__ */ new Map();
|
|
1671
1652
|
for (let i = 0; i < ctxs.length; i++) {
|
|
1672
1653
|
ctxs[i].mapUnsafe.forEach((value, key) => {
|
|
1673
|
-
|
|
1654
|
+
map8.set(key, value);
|
|
1674
1655
|
});
|
|
1675
1656
|
}
|
|
1676
|
-
return makeUnsafe(
|
|
1657
|
+
return makeUnsafe(map8);
|
|
1677
1658
|
};
|
|
1678
1659
|
var withMapUnsafe = (self, f) => {
|
|
1679
1660
|
if (self.mutable) {
|
|
1680
1661
|
f(self.mapUnsafe);
|
|
1681
1662
|
return self;
|
|
1682
1663
|
}
|
|
1683
|
-
const
|
|
1684
|
-
f(
|
|
1685
|
-
return makeUnsafe(
|
|
1664
|
+
const map8 = new Map(self.mapUnsafe);
|
|
1665
|
+
f(map8);
|
|
1666
|
+
return makeUnsafe(map8);
|
|
1686
1667
|
};
|
|
1687
1668
|
var Reference = Service;
|
|
1688
1669
|
|
|
1689
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1670
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Duration.js
|
|
1690
1671
|
var TypeId4 = "~effect/time/Duration";
|
|
1691
1672
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
1692
1673
|
var bigint1 = /* @__PURE__ */ BigInt(1);
|
|
@@ -1933,7 +1914,7 @@ var subtract = /* @__PURE__ */ dual(2, (self, that) => matchPair(self, that, {
|
|
|
1933
1914
|
}));
|
|
1934
1915
|
var equals2 = /* @__PURE__ */ dual(2, (self, that) => Equivalence(self, that));
|
|
1935
1916
|
|
|
1936
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1917
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Filter.js
|
|
1937
1918
|
var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
1938
1919
|
const leftOut = left(input);
|
|
1939
1920
|
if (isFailure2(leftOut)) return fail2(input);
|
|
@@ -1942,7 +1923,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
|
1942
1923
|
return rightOut;
|
|
1943
1924
|
});
|
|
1944
1925
|
|
|
1945
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1926
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Scheduler.js
|
|
1946
1927
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
1947
1928
|
defaultValue: () => new MixedScheduler()
|
|
1948
1929
|
});
|
|
@@ -2067,7 +2048,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
2067
2048
|
defaultValue: () => false
|
|
2068
2049
|
});
|
|
2069
2050
|
|
|
2070
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2051
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Tracer.js
|
|
2071
2052
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
2072
2053
|
var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey)) {
|
|
2073
2054
|
};
|
|
@@ -2147,10 +2128,10 @@ var randomHexString = /* @__PURE__ */ (function() {
|
|
|
2147
2128
|
};
|
|
2148
2129
|
})();
|
|
2149
2130
|
|
|
2150
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2131
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/metric.js
|
|
2151
2132
|
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
2152
2133
|
|
|
2153
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2134
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/references.js
|
|
2154
2135
|
var CurrentConcurrency = /* @__PURE__ */ Reference("effect/References/CurrentConcurrency", {
|
|
2155
2136
|
defaultValue: () => "unbounded"
|
|
2156
2137
|
});
|
|
@@ -2185,17 +2166,17 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
2185
2166
|
defaultValue: () => []
|
|
2186
2167
|
});
|
|
2187
2168
|
|
|
2188
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2169
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/tracer.js
|
|
2189
2170
|
var addSpanStackTrace = (options) => {
|
|
2190
2171
|
if (options?.captureStackTrace === false) {
|
|
2191
2172
|
return options;
|
|
2192
2173
|
} else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") {
|
|
2193
2174
|
return options;
|
|
2194
2175
|
}
|
|
2195
|
-
const limit =
|
|
2196
|
-
|
|
2176
|
+
const limit = getStackTraceLimit();
|
|
2177
|
+
setStackTraceLimit(3);
|
|
2197
2178
|
const traceError = new Error();
|
|
2198
|
-
|
|
2179
|
+
setStackTraceLimit(limit);
|
|
2199
2180
|
return {
|
|
2200
2181
|
...options,
|
|
2201
2182
|
captureStackTrace: spanCleaner(() => traceError.stack)
|
|
@@ -2216,10 +2197,10 @@ var makeStackCleaner = (line) => (stack) => {
|
|
|
2216
2197
|
};
|
|
2217
2198
|
var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
|
|
2218
2199
|
|
|
2219
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2200
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/version.js
|
|
2220
2201
|
var version = "dev";
|
|
2221
2202
|
|
|
2222
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
2203
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/effect.js
|
|
2223
2204
|
var Interrupt = class extends ReasonBase {
|
|
2224
2205
|
fiberId;
|
|
2225
2206
|
constructor(fiberId3, annotations = constEmptyAnnotations) {
|
|
@@ -2283,6 +2264,17 @@ var causeCombine = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
2283
2264
|
const newCause = new CauseImpl(union2(self.reasons, that.reasons));
|
|
2284
2265
|
return equals(self, newCause) ? self : newCause;
|
|
2285
2266
|
});
|
|
2267
|
+
var causeMap = /* @__PURE__ */ dual(2, (self, f) => {
|
|
2268
|
+
let hasFail = false;
|
|
2269
|
+
const failures = self.reasons.map((failure) => {
|
|
2270
|
+
if (isFailReason(failure)) {
|
|
2271
|
+
hasFail = true;
|
|
2272
|
+
return new Fail(f(failure.error));
|
|
2273
|
+
}
|
|
2274
|
+
return failure;
|
|
2275
|
+
});
|
|
2276
|
+
return hasFail ? causeFromReasons(failures) : self;
|
|
2277
|
+
});
|
|
2286
2278
|
var causePartition = (self) => {
|
|
2287
2279
|
const obj = {
|
|
2288
2280
|
Fail: [],
|
|
@@ -2309,8 +2301,8 @@ var causePrettyErrors = (self) => {
|
|
|
2309
2301
|
const errors = [];
|
|
2310
2302
|
const interrupts = [];
|
|
2311
2303
|
if (self.reasons.length === 0) return errors;
|
|
2312
|
-
const prevStackLimit =
|
|
2313
|
-
|
|
2304
|
+
const prevStackLimit = getStackTraceLimit();
|
|
2305
|
+
setStackTraceLimit(1);
|
|
2314
2306
|
for (const failure of self.reasons) {
|
|
2315
2307
|
if (failure._tag === "Interrupt") {
|
|
2316
2308
|
interrupts.push(failure);
|
|
@@ -2329,8 +2321,7 @@ var causePrettyErrors = (self) => {
|
|
|
2329
2321
|
error.stack = `${error.name}: ${error.message}`;
|
|
2330
2322
|
errors.push(causePrettyError(error, interrupts[0].annotations));
|
|
2331
2323
|
}
|
|
2332
|
-
;
|
|
2333
|
-
Error.stackTraceLimit = prevStackLimit;
|
|
2324
|
+
setStackTraceLimit(prevStackLimit);
|
|
2334
2325
|
return errors;
|
|
2335
2326
|
};
|
|
2336
2327
|
var causePrettyError = (original, annotations) => {
|
|
@@ -2736,17 +2727,22 @@ var yieldNowWith = /* @__PURE__ */ makePrimitive({
|
|
|
2736
2727
|
var yieldNow = /* @__PURE__ */ yieldNowWith(0);
|
|
2737
2728
|
var succeedSome = (a) => succeed3(some2(a));
|
|
2738
2729
|
var succeedNone = /* @__PURE__ */ succeed3(/* @__PURE__ */ none2());
|
|
2730
|
+
var transposeOption = (self) => isNone2(self) ? succeedNone : map4(self.value, some2);
|
|
2739
2731
|
var failCauseSync = (evaluate2) => suspend(() => failCause(internalCall(evaluate2)));
|
|
2740
2732
|
var die = (defect) => exitDie(defect);
|
|
2741
2733
|
var failSync = (error) => suspend(() => fail3(internalCall(error)));
|
|
2742
2734
|
var void_ = /* @__PURE__ */ succeed3(void 0);
|
|
2743
|
-
var try_ = (options) =>
|
|
2744
|
-
try
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
})
|
|
2735
|
+
var try_ = (options) => {
|
|
2736
|
+
const evaluate2 = typeof options === "function" ? options : options.try;
|
|
2737
|
+
const catcher = typeof options === "function" ? (cause) => new UnknownError(cause, "An error occurred in Effect.try") : options.catch;
|
|
2738
|
+
return suspend(() => {
|
|
2739
|
+
try {
|
|
2740
|
+
return succeed3(internalCall(evaluate2));
|
|
2741
|
+
} catch (err) {
|
|
2742
|
+
return fail3(internalCall(() => catcher(err)));
|
|
2743
|
+
}
|
|
2744
|
+
});
|
|
2745
|
+
};
|
|
2750
2746
|
var promise = (evaluate2) => callbackOptions(function(resume, signal) {
|
|
2751
2747
|
internalCall(() => evaluate2(signal)).then((a) => resume(succeed3(a)), (e) => resume(die(e)));
|
|
2752
2748
|
}, evaluate2.length !== 0);
|
|
@@ -2754,12 +2750,19 @@ var tryPromise = (options) => {
|
|
|
2754
2750
|
const f = typeof options === "function" ? options : options.try;
|
|
2755
2751
|
const catcher = typeof options === "function" ? (cause) => new UnknownError(cause, "An error occurred in Effect.tryPromise") : options.catch;
|
|
2756
2752
|
return callbackOptions(function(resume, signal) {
|
|
2753
|
+
const failWithCatch = (cause) => {
|
|
2754
|
+
try {
|
|
2755
|
+
resume(fail3(internalCall(() => catcher(cause))));
|
|
2756
|
+
} catch (err) {
|
|
2757
|
+
resume(die(err));
|
|
2758
|
+
}
|
|
2759
|
+
};
|
|
2757
2760
|
try {
|
|
2758
|
-
internalCall(() => f(signal)).then((a) => resume(succeed3(a)),
|
|
2761
|
+
internalCall(() => f(signal)).then((a) => resume(succeed3(a)), failWithCatch);
|
|
2759
2762
|
} catch (err) {
|
|
2760
|
-
|
|
2763
|
+
failWithCatch(err);
|
|
2761
2764
|
}
|
|
2762
|
-
},
|
|
2765
|
+
}, f.length !== 0);
|
|
2763
2766
|
};
|
|
2764
2767
|
var withFiberId = (f) => withFiber((fiber3) => f(fiber3.id));
|
|
2765
2768
|
var fiber = /* @__PURE__ */ withFiber(succeed3);
|
|
@@ -2833,10 +2836,10 @@ var fn = function() {
|
|
|
2833
2836
|
const nameFirst = typeof arguments[0] === "string";
|
|
2834
2837
|
const name = nameFirst ? arguments[0] : "Effect.fn";
|
|
2835
2838
|
const spanOptions = nameFirst ? arguments[1] : void 0;
|
|
2836
|
-
const prevLimit =
|
|
2837
|
-
|
|
2839
|
+
const prevLimit = getStackTraceLimit();
|
|
2840
|
+
setStackTraceLimit(2);
|
|
2838
2841
|
const defError = new globalThis.Error();
|
|
2839
|
-
|
|
2842
|
+
setStackTraceLimit(prevLimit);
|
|
2840
2843
|
if (nameFirst) {
|
|
2841
2844
|
return (body, ...pipeables) => makeFn(name, body, defError, pipeables, nameFirst, spanOptions);
|
|
2842
2845
|
}
|
|
@@ -2855,10 +2858,10 @@ var makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) =>
|
|
|
2855
2858
|
if (!isEffect(result3)) {
|
|
2856
2859
|
return result3;
|
|
2857
2860
|
}
|
|
2858
|
-
const prevLimit =
|
|
2859
|
-
|
|
2861
|
+
const prevLimit = getStackTraceLimit();
|
|
2862
|
+
setStackTraceLimit(2);
|
|
2860
2863
|
const callError = new globalThis.Error();
|
|
2861
|
-
|
|
2864
|
+
setStackTraceLimit(prevLimit);
|
|
2862
2865
|
return updateService(addSpan ? useSpan(name, spanOptions, (span) => provideParentSpan(result3, span)) : result3, CurrentStackFrame, (prev) => ({
|
|
2863
2866
|
name,
|
|
2864
2867
|
stack: fnStackCleaner(() => callError.stack),
|
|
@@ -3077,7 +3080,6 @@ var exitAsVoidAll = (exits) => {
|
|
|
3077
3080
|
}
|
|
3078
3081
|
return failures.length === 0 ? exitVoid : exitFailCause(causeFromReasons(failures));
|
|
3079
3082
|
};
|
|
3080
|
-
var exitGetSuccess = (self) => exitIsSuccess(self) ? some2(self.value) : none2();
|
|
3081
3083
|
var service = (service3) => service3;
|
|
3082
3084
|
var serviceOption = (service3) => withFiber((fiber3) => succeed3(getOption(fiber3.context, service3)));
|
|
3083
3085
|
var serviceOptional = (service3) => withFiber((fiber3) => fiber3.context.mapUnsafe.has(service3.key) ? succeed3(getUnsafe2(fiber3.context, service3)) : fail3(new NoSuchElementError()));
|
|
@@ -3993,9 +3995,9 @@ var succeedFalse = /* @__PURE__ */ succeed3(false);
|
|
|
3993
3995
|
var Latch = class {
|
|
3994
3996
|
waiters = [];
|
|
3995
3997
|
scheduled = false;
|
|
3996
|
-
|
|
3998
|
+
_isOpen;
|
|
3997
3999
|
constructor(isOpen) {
|
|
3998
|
-
this.
|
|
4000
|
+
this._isOpen = isOpen;
|
|
3999
4001
|
}
|
|
4000
4002
|
scheduleUnsafe(fiber3) {
|
|
4001
4003
|
if (this.scheduled || this.waiters.length === 0) {
|
|
@@ -4014,19 +4016,19 @@ var Latch = class {
|
|
|
4014
4016
|
}
|
|
4015
4017
|
};
|
|
4016
4018
|
open = /* @__PURE__ */ withFiber((fiber3) => {
|
|
4017
|
-
if (this.
|
|
4018
|
-
this.
|
|
4019
|
+
if (this._isOpen) return succeedFalse;
|
|
4020
|
+
this._isOpen = true;
|
|
4019
4021
|
return this.scheduleUnsafe(fiber3);
|
|
4020
4022
|
});
|
|
4021
|
-
release = /* @__PURE__ */ withFiber((fiber3) => this.
|
|
4023
|
+
release = /* @__PURE__ */ withFiber((fiber3) => this._isOpen ? succeedFalse : this.scheduleUnsafe(fiber3));
|
|
4022
4024
|
openUnsafe() {
|
|
4023
|
-
if (this.
|
|
4024
|
-
this.
|
|
4025
|
+
if (this._isOpen) return false;
|
|
4026
|
+
this._isOpen = true;
|
|
4025
4027
|
this.flushWaiters();
|
|
4026
4028
|
return true;
|
|
4027
4029
|
}
|
|
4028
4030
|
await = /* @__PURE__ */ callback((resume) => {
|
|
4029
|
-
if (this.
|
|
4031
|
+
if (this._isOpen) {
|
|
4030
4032
|
return resume(void_);
|
|
4031
4033
|
}
|
|
4032
4034
|
this.waiters.push(resume);
|
|
@@ -4038,12 +4040,15 @@ var Latch = class {
|
|
|
4038
4040
|
});
|
|
4039
4041
|
});
|
|
4040
4042
|
closeUnsafe() {
|
|
4041
|
-
if (!this.
|
|
4042
|
-
this.
|
|
4043
|
+
if (!this._isOpen) return false;
|
|
4044
|
+
this._isOpen = false;
|
|
4043
4045
|
return true;
|
|
4044
4046
|
}
|
|
4045
4047
|
close = /* @__PURE__ */ sync(() => this.closeUnsafe());
|
|
4046
4048
|
whenOpen = (self) => flatMap3(this.await, () => self);
|
|
4049
|
+
isOpen() {
|
|
4050
|
+
return this._isOpen;
|
|
4051
|
+
}
|
|
4047
4052
|
};
|
|
4048
4053
|
var makeLatchUnsafe = (open) => new Latch(open ?? false);
|
|
4049
4054
|
var tracer = /* @__PURE__ */ withFiber((fiber3) => succeed3(fiber3.getRef(Tracer)));
|
|
@@ -4253,18 +4258,19 @@ var performanceNowNanos = /* @__PURE__ */ (function() {
|
|
|
4253
4258
|
const bigint1e6 = /* @__PURE__ */ BigInt(1e6);
|
|
4254
4259
|
if (typeof performance === "undefined" || typeof performance.now === "undefined") {
|
|
4255
4260
|
return () => BigInt(Date.now()) * bigint1e6;
|
|
4256
|
-
} else if (typeof performance.timeOrigin === "number" && performance.timeOrigin === 0) {
|
|
4257
|
-
return () => BigInt(Math.round(performance.now() * 1e6));
|
|
4258
4261
|
}
|
|
4259
|
-
|
|
4260
|
-
return () =>
|
|
4262
|
+
let origin;
|
|
4263
|
+
return () => {
|
|
4264
|
+
origin ??= BigInt(Date.now()) * bigint1e6 - BigInt(Math.round(performance.now() * 1e6));
|
|
4265
|
+
return origin + BigInt(Math.round(performance.now() * 1e6));
|
|
4266
|
+
};
|
|
4261
4267
|
})();
|
|
4262
4268
|
var processOrPerformanceNow = /* @__PURE__ */ (function() {
|
|
4263
4269
|
const processHrtime = typeof process === "object" && "hrtime" in process && typeof process.hrtime.bigint === "function" ? process.hrtime : void 0;
|
|
4264
4270
|
if (!processHrtime) {
|
|
4265
4271
|
return performanceNowNanos;
|
|
4266
4272
|
}
|
|
4267
|
-
const origin = /* @__PURE__ */
|
|
4273
|
+
const origin = /* @__PURE__ */ BigInt(/* @__PURE__ */ Date.now()) * /* @__PURE__ */ BigInt(1e6) - /* @__PURE__ */ processHrtime.bigint();
|
|
4268
4274
|
return () => origin + processHrtime.bigint();
|
|
4269
4275
|
})();
|
|
4270
4276
|
var clockWith = (f) => withFiber((fiber3) => f(fiber3.getRef(ClockRef)));
|
|
@@ -4528,12 +4534,14 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
|
|
|
4528
4534
|
reporters.forEach((reporter) => reporter.report(opts));
|
|
4529
4535
|
};
|
|
4530
4536
|
|
|
4531
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4537
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Cause.js
|
|
4538
|
+
var isFailReason2 = isFailReason;
|
|
4539
|
+
var map5 = causeMap;
|
|
4532
4540
|
var findError2 = findError;
|
|
4533
4541
|
var isDone2 = isDone;
|
|
4534
4542
|
var done2 = done;
|
|
4535
4543
|
|
|
4536
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4544
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Effect.js
|
|
4537
4545
|
var Effect_exports = {};
|
|
4538
4546
|
__export(Effect_exports, {
|
|
4539
4547
|
Do: () => Do2,
|
|
@@ -4585,7 +4593,7 @@ __export(Effect_exports, {
|
|
|
4585
4593
|
eventually: () => eventually2,
|
|
4586
4594
|
exit: () => exit2,
|
|
4587
4595
|
fail: () => fail5,
|
|
4588
|
-
failCause: () =>
|
|
4596
|
+
failCause: () => failCause3,
|
|
4589
4597
|
failCauseSync: () => failCauseSync2,
|
|
4590
4598
|
failSync: () => failSync2,
|
|
4591
4599
|
fiber: () => fiber2,
|
|
@@ -4637,7 +4645,7 @@ __export(Effect_exports, {
|
|
|
4637
4645
|
logWithLevel: () => logWithLevel2,
|
|
4638
4646
|
makeSpan: () => makeSpan2,
|
|
4639
4647
|
makeSpanScoped: () => makeSpanScoped2,
|
|
4640
|
-
map: () =>
|
|
4648
|
+
map: () => map6,
|
|
4641
4649
|
mapBoth: () => mapBoth2,
|
|
4642
4650
|
mapBothEager: () => mapBothEager2,
|
|
4643
4651
|
mapEager: () => mapEager2,
|
|
@@ -4729,6 +4737,7 @@ __export(Effect_exports, {
|
|
|
4729
4737
|
trackDuration: () => trackDuration,
|
|
4730
4738
|
trackErrors: () => trackErrors,
|
|
4731
4739
|
trackSuccesses: () => trackSuccesses,
|
|
4740
|
+
transposeOption: () => transposeOption2,
|
|
4732
4741
|
try: () => try_2,
|
|
4733
4742
|
tryPromise: () => tryPromise2,
|
|
4734
4743
|
tx: () => tx,
|
|
@@ -4762,13 +4771,13 @@ __export(Effect_exports, {
|
|
|
4762
4771
|
zipWith: () => zipWith2
|
|
4763
4772
|
});
|
|
4764
4773
|
|
|
4765
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4774
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Exit.js
|
|
4775
|
+
var failCause2 = exitFailCause;
|
|
4766
4776
|
var fail4 = exitFail;
|
|
4767
4777
|
var void_2 = exitVoid;
|
|
4768
4778
|
var isSuccess4 = exitIsSuccess;
|
|
4769
|
-
var getSuccess2 = exitGetSuccess;
|
|
4770
4779
|
|
|
4771
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4780
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Deferred.js
|
|
4772
4781
|
var TypeId5 = "~effect/Deferred";
|
|
4773
4782
|
var DeferredProto = {
|
|
4774
4783
|
[TypeId5]: {
|
|
@@ -4808,16 +4817,16 @@ var doneUnsafe = (self, effect) => {
|
|
|
4808
4817
|
return true;
|
|
4809
4818
|
};
|
|
4810
4819
|
|
|
4811
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4820
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/References.js
|
|
4812
4821
|
var CurrentLogAnnotations2 = CurrentLogAnnotations;
|
|
4813
4822
|
var CurrentLogSpans2 = CurrentLogSpans;
|
|
4814
4823
|
|
|
4815
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4824
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Scope.js
|
|
4816
4825
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
4817
4826
|
var forkUnsafe2 = scopeForkUnsafe;
|
|
4818
4827
|
var close = scopeClose;
|
|
4819
4828
|
|
|
4820
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4829
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Layer.js
|
|
4821
4830
|
var TypeId6 = "~effect/Layer";
|
|
4822
4831
|
var MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
4823
4832
|
var memoMapReuse = (entry, scope3) => {
|
|
@@ -4906,7 +4915,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
|
|
|
4906
4915
|
var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap3(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context3) => self.build(memoMap, scope3).pipe(provideContext(context3), map4((merged) => f(merged, context3)))));
|
|
4907
4916
|
var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
|
|
4908
4917
|
|
|
4909
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4918
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/ExecutionPlan.js
|
|
4910
4919
|
var TypeId7 = "~effect/ExecutionPlan";
|
|
4911
4920
|
var Proto2 = {
|
|
4912
4921
|
[TypeId7]: TypeId7,
|
|
@@ -4933,10 +4942,10 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
|
|
|
4933
4942
|
})
|
|
4934
4943
|
});
|
|
4935
4944
|
|
|
4936
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4945
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Data.js
|
|
4937
4946
|
var TaggedError2 = TaggedError;
|
|
4938
4947
|
|
|
4939
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4948
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Pull.js
|
|
4940
4949
|
var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
4941
4950
|
var filterDone = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e) : fail2(e));
|
|
4942
4951
|
var filterDoneLeftover = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e.value) : fail2(e));
|
|
@@ -4948,7 +4957,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
|
|
|
4948
4957
|
}
|
|
4949
4958
|
}));
|
|
4950
4959
|
|
|
4951
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
4960
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Schedule.js
|
|
4952
4961
|
var TypeId8 = "~effect/Schedule";
|
|
4953
4962
|
var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
|
|
4954
4963
|
defaultValue: /* @__PURE__ */ constant({
|
|
@@ -5040,11 +5049,11 @@ var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map4(toStep(s
|
|
|
5040
5049
|
})));
|
|
5041
5050
|
var forever2 = /* @__PURE__ */ spaced(zero);
|
|
5042
5051
|
|
|
5043
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5052
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/layer.js
|
|
5044
5053
|
var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap3(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
|
|
5045
5054
|
var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
|
|
5046
5055
|
|
|
5047
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5056
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/schedule.js
|
|
5048
5057
|
var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse2) => flatMap3(toStepWithMetadata(schedule2), (step) => {
|
|
5049
5058
|
let meta2 = CurrentMetadata2.defaultValue();
|
|
5050
5059
|
return catch_(forever(tap(flatMap3(suspend(() => provideService(self, CurrentMetadata2, meta2)), step), (meta_) => sync(() => {
|
|
@@ -5115,7 +5124,7 @@ var buildFromOptions = (options) => {
|
|
|
5115
5124
|
return schedule2;
|
|
5116
5125
|
};
|
|
5117
5126
|
|
|
5118
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5127
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/executionPlan.js
|
|
5119
5128
|
var withExecutionPlan = /* @__PURE__ */ dual(2, (self, plan) => suspend(() => {
|
|
5120
5129
|
let i = 0;
|
|
5121
5130
|
let meta2 = {
|
|
@@ -5174,7 +5183,7 @@ var scheduleFromStep = (step, first) => {
|
|
|
5174
5183
|
};
|
|
5175
5184
|
var scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
5176
5185
|
|
|
5177
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5186
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Request.js
|
|
5178
5187
|
var TypeId9 = "~effect/Request";
|
|
5179
5188
|
var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
5180
5189
|
/* c8 ignore next */
|
|
@@ -5190,7 +5199,7 @@ var RequestPrototype = {
|
|
|
5190
5199
|
};
|
|
5191
5200
|
var makeEntry = (options) => options;
|
|
5192
5201
|
|
|
5193
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5202
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/request.js
|
|
5194
5203
|
var request = /* @__PURE__ */ dual(2, (self, resolver) => {
|
|
5195
5204
|
const withResolver = (resolver2) => callback((resume) => {
|
|
5196
5205
|
const entry = addEntry(resolver2, self, resume, getCurrentFiber());
|
|
@@ -5300,7 +5309,7 @@ function runBatch(batch) {
|
|
|
5300
5309
|
return batch.run;
|
|
5301
5310
|
}
|
|
5302
5311
|
|
|
5303
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5312
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Metric.js
|
|
5304
5313
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
5305
5314
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
5306
5315
|
defaultValue: () => ({})
|
|
@@ -5403,7 +5412,7 @@ function attributesToRecord(attributes) {
|
|
|
5403
5412
|
return attributes;
|
|
5404
5413
|
}
|
|
5405
5414
|
|
|
5406
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5415
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Effect.js
|
|
5407
5416
|
var TypeId11 = EffectTypeId;
|
|
5408
5417
|
var isEffect2 = isEffect;
|
|
5409
5418
|
var all2 = all;
|
|
@@ -5431,7 +5440,7 @@ var bind3 = bind2;
|
|
|
5431
5440
|
var gen2 = gen;
|
|
5432
5441
|
var fail5 = fail3;
|
|
5433
5442
|
var failSync2 = failSync;
|
|
5434
|
-
var
|
|
5443
|
+
var failCause3 = failCause;
|
|
5435
5444
|
var failCauseSync2 = failCauseSync;
|
|
5436
5445
|
var die2 = die;
|
|
5437
5446
|
var try_2 = try_;
|
|
@@ -5440,6 +5449,7 @@ var yieldNowWith2 = yieldNowWith;
|
|
|
5440
5449
|
var withFiber2 = withFiber;
|
|
5441
5450
|
var fromResult2 = fromResult;
|
|
5442
5451
|
var fromOption4 = fromOption3;
|
|
5452
|
+
var transposeOption2 = transposeOption;
|
|
5443
5453
|
var fromNullishOr3 = fromNullishOr2;
|
|
5444
5454
|
var flatMap4 = flatMap3;
|
|
5445
5455
|
var flatten2 = flatten;
|
|
@@ -5448,7 +5458,7 @@ var tap2 = tap;
|
|
|
5448
5458
|
var result2 = result;
|
|
5449
5459
|
var option2 = option;
|
|
5450
5460
|
var exit2 = exit;
|
|
5451
|
-
var
|
|
5461
|
+
var map6 = map4;
|
|
5452
5462
|
var as2 = as;
|
|
5453
5463
|
var asSome2 = asSome;
|
|
5454
5464
|
var asVoid2 = asVoid;
|
|
@@ -5752,7 +5762,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
5752
5762
|
var catchEager2 = catchEager;
|
|
5753
5763
|
var fnUntracedEager2 = fnUntracedEager;
|
|
5754
5764
|
|
|
5755
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5765
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/record.js
|
|
5756
5766
|
function set(self, key, value) {
|
|
5757
5767
|
if (key === "__proto__") {
|
|
5758
5768
|
Object.defineProperty(self, key, {
|
|
@@ -5767,7 +5777,7 @@ function set(self, key, value) {
|
|
|
5767
5777
|
return self;
|
|
5768
5778
|
}
|
|
5769
5779
|
|
|
5770
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5780
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/schema/annotations.js
|
|
5771
5781
|
function resolve(ast) {
|
|
5772
5782
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
5773
5783
|
}
|
|
@@ -5781,103 +5791,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
5781
5791
|
return ast.getExpected(getExpected);
|
|
5782
5792
|
});
|
|
5783
5793
|
|
|
5784
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
5785
|
-
var RegExp2 = globalThis.RegExp;
|
|
5786
|
-
var escape = (string3) => string3.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
5787
|
-
|
|
5788
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.83/node_modules/effect/dist/Encoding.js
|
|
5789
|
-
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
5790
|
-
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
5791
|
-
/**
|
|
5792
|
-
* Marks this value as an encoding or decoding error for runtime guards.
|
|
5793
|
-
*
|
|
5794
|
-
* **When to use**
|
|
5795
|
-
*
|
|
5796
|
-
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
5797
|
-
*
|
|
5798
|
-
* @since 4.0.0
|
|
5799
|
-
*/
|
|
5800
|
-
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
5801
|
-
};
|
|
5802
|
-
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
5803
|
-
var decodeBase64 = (str) => {
|
|
5804
|
-
const stripped = stripCrlf(str);
|
|
5805
|
-
const length = stripped.length;
|
|
5806
|
-
if (length % 4 !== 0) {
|
|
5807
|
-
return fail2(new EncodingError({
|
|
5808
|
-
kind: "Decode",
|
|
5809
|
-
module: "Base64",
|
|
5810
|
-
input: stripped,
|
|
5811
|
-
message: `Length must be a multiple of 4, but is ${length}`
|
|
5812
|
-
}));
|
|
5813
|
-
}
|
|
5814
|
-
const index = stripped.indexOf("=");
|
|
5815
|
-
if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) {
|
|
5816
|
-
return fail2(new EncodingError({
|
|
5817
|
-
kind: "Decode",
|
|
5818
|
-
module: "Base64",
|
|
5819
|
-
input: stripped,
|
|
5820
|
-
message: `Found a '=' character, but it is not at the end`
|
|
5821
|
-
}));
|
|
5822
|
-
}
|
|
5823
|
-
try {
|
|
5824
|
-
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
5825
|
-
const result3 = new Uint8Array(3 * (length / 4) - missingOctets);
|
|
5826
|
-
for (let i = 0, j = 0; i < length; i += 4, j += 3) {
|
|
5827
|
-
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
5828
|
-
result3[j] = buffer >> 16;
|
|
5829
|
-
result3[j + 1] = buffer >> 8 & 255;
|
|
5830
|
-
result3[j + 2] = buffer & 255;
|
|
5831
|
-
}
|
|
5832
|
-
return succeed2(result3);
|
|
5833
|
-
} catch (e) {
|
|
5834
|
-
return fail2(new EncodingError({
|
|
5835
|
-
kind: "Decode",
|
|
5836
|
-
module: "Base64",
|
|
5837
|
-
input: stripped,
|
|
5838
|
-
message: e instanceof Error ? e.message : "Invalid input"
|
|
5839
|
-
}));
|
|
5840
|
-
}
|
|
5841
|
-
};
|
|
5842
|
-
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
5843
|
-
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
5844
|
-
var base64EncodeUint8Array = (bytes) => {
|
|
5845
|
-
const length = bytes.length;
|
|
5846
|
-
let result3 = "";
|
|
5847
|
-
let i;
|
|
5848
|
-
for (i = 2; i < length; i += 3) {
|
|
5849
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
5850
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
5851
|
-
result3 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
5852
|
-
result3 += base64abc[bytes[i] & 63];
|
|
5853
|
-
}
|
|
5854
|
-
if (i === length + 1) {
|
|
5855
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
5856
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
5857
|
-
result3 += "==";
|
|
5858
|
-
}
|
|
5859
|
-
if (i === length) {
|
|
5860
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
5861
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
5862
|
-
result3 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
5863
|
-
result3 += "=";
|
|
5864
|
-
}
|
|
5865
|
-
return result3;
|
|
5866
|
-
};
|
|
5867
|
-
function getBase64Code(charCode) {
|
|
5868
|
-
if (charCode >= base64codes.length) {
|
|
5869
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
5870
|
-
}
|
|
5871
|
-
const code = base64codes[charCode];
|
|
5872
|
-
if (code === 255) {
|
|
5873
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
5874
|
-
}
|
|
5875
|
-
return code;
|
|
5876
|
-
}
|
|
5877
|
-
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
5878
|
-
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
5879
|
-
|
|
5880
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.83/node_modules/effect/dist/SchemaIssue.js
|
|
5794
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/SchemaIssue.js
|
|
5881
5795
|
var TypeId12 = "~effect/SchemaIssue/Issue";
|
|
5882
5796
|
function isIssue(u) {
|
|
5883
5797
|
return hasProperty(u, TypeId12);
|
|
@@ -6227,7 +6141,120 @@ function formatOption(actual) {
|
|
|
6227
6141
|
return format(actual.value);
|
|
6228
6142
|
}
|
|
6229
6143
|
|
|
6230
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
6144
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/schema/cause.js
|
|
6145
|
+
function getSchemaIssue(cause) {
|
|
6146
|
+
let issue;
|
|
6147
|
+
for (const reason of cause.reasons) {
|
|
6148
|
+
if (!isFailReason2(reason) || !isIssue(reason.error)) {
|
|
6149
|
+
return void 0;
|
|
6150
|
+
}
|
|
6151
|
+
issue ??= reason.error;
|
|
6152
|
+
}
|
|
6153
|
+
return issue;
|
|
6154
|
+
}
|
|
6155
|
+
function getSchemaIssueOrThrow(cause, message) {
|
|
6156
|
+
const issue = getSchemaIssue(cause);
|
|
6157
|
+
if (issue === void 0) {
|
|
6158
|
+
throw new Error(message, {
|
|
6159
|
+
cause
|
|
6160
|
+
});
|
|
6161
|
+
}
|
|
6162
|
+
return issue;
|
|
6163
|
+
}
|
|
6164
|
+
|
|
6165
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Encoding.js
|
|
6166
|
+
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
6167
|
+
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
6168
|
+
/**
|
|
6169
|
+
* Marks this value as an encoding or decoding error for runtime guards.
|
|
6170
|
+
*
|
|
6171
|
+
* **When to use**
|
|
6172
|
+
*
|
|
6173
|
+
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
6174
|
+
*
|
|
6175
|
+
* @since 4.0.0
|
|
6176
|
+
*/
|
|
6177
|
+
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
6178
|
+
};
|
|
6179
|
+
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
6180
|
+
var decodeBase64 = (str) => {
|
|
6181
|
+
const stripped = stripCrlf(str);
|
|
6182
|
+
const length = stripped.length;
|
|
6183
|
+
if (length % 4 !== 0) {
|
|
6184
|
+
return fail2(new EncodingError({
|
|
6185
|
+
kind: "Decode",
|
|
6186
|
+
module: "Base64",
|
|
6187
|
+
input: stripped,
|
|
6188
|
+
message: `Length must be a multiple of 4, but is ${length}`
|
|
6189
|
+
}));
|
|
6190
|
+
}
|
|
6191
|
+
const index = stripped.indexOf("=");
|
|
6192
|
+
if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) {
|
|
6193
|
+
return fail2(new EncodingError({
|
|
6194
|
+
kind: "Decode",
|
|
6195
|
+
module: "Base64",
|
|
6196
|
+
input: stripped,
|
|
6197
|
+
message: `Found a '=' character, but it is not at the end`
|
|
6198
|
+
}));
|
|
6199
|
+
}
|
|
6200
|
+
try {
|
|
6201
|
+
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
6202
|
+
const result3 = new Uint8Array(3 * (length / 4) - missingOctets);
|
|
6203
|
+
for (let i = 0, j = 0; i < length; i += 4, j += 3) {
|
|
6204
|
+
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
6205
|
+
result3[j] = buffer >> 16;
|
|
6206
|
+
result3[j + 1] = buffer >> 8 & 255;
|
|
6207
|
+
result3[j + 2] = buffer & 255;
|
|
6208
|
+
}
|
|
6209
|
+
return succeed2(result3);
|
|
6210
|
+
} catch (e) {
|
|
6211
|
+
return fail2(new EncodingError({
|
|
6212
|
+
kind: "Decode",
|
|
6213
|
+
module: "Base64",
|
|
6214
|
+
input: stripped,
|
|
6215
|
+
message: e instanceof Error ? e.message : "Invalid input"
|
|
6216
|
+
}));
|
|
6217
|
+
}
|
|
6218
|
+
};
|
|
6219
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
6220
|
+
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
6221
|
+
var base64EncodeUint8Array = (bytes) => {
|
|
6222
|
+
const length = bytes.length;
|
|
6223
|
+
let result3 = "";
|
|
6224
|
+
let i;
|
|
6225
|
+
for (i = 2; i < length; i += 3) {
|
|
6226
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
6227
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
6228
|
+
result3 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
6229
|
+
result3 += base64abc[bytes[i] & 63];
|
|
6230
|
+
}
|
|
6231
|
+
if (i === length + 1) {
|
|
6232
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
6233
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
6234
|
+
result3 += "==";
|
|
6235
|
+
}
|
|
6236
|
+
if (i === length) {
|
|
6237
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
6238
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
6239
|
+
result3 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
6240
|
+
result3 += "=";
|
|
6241
|
+
}
|
|
6242
|
+
return result3;
|
|
6243
|
+
};
|
|
6244
|
+
function getBase64Code(charCode) {
|
|
6245
|
+
if (charCode >= base64codes.length) {
|
|
6246
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
6247
|
+
}
|
|
6248
|
+
const code = base64codes[charCode];
|
|
6249
|
+
if (code === 255) {
|
|
6250
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
6251
|
+
}
|
|
6252
|
+
return code;
|
|
6253
|
+
}
|
|
6254
|
+
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
6255
|
+
var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
6256
|
+
|
|
6257
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/SchemaGetter.js
|
|
6231
6258
|
var Getter = class _Getter extends Class {
|
|
6232
6259
|
run;
|
|
6233
6260
|
constructor(run2) {
|
|
@@ -6290,7 +6317,7 @@ function decodeBase642() {
|
|
|
6290
6317
|
})));
|
|
6291
6318
|
}
|
|
6292
6319
|
|
|
6293
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
6320
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/SchemaTransformation.js
|
|
6294
6321
|
var TypeId13 = "~effect/SchemaTransformation/Transformation";
|
|
6295
6322
|
var Transformation = class _Transformation {
|
|
6296
6323
|
[TypeId13] = TypeId13;
|
|
@@ -6330,17 +6357,14 @@ function passthrough3() {
|
|
|
6330
6357
|
var numberFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number3(), /* @__PURE__ */ String2());
|
|
6331
6358
|
var dateFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Date3(), /* @__PURE__ */ transform(formatDate));
|
|
6332
6359
|
var urlFromString = /* @__PURE__ */ transformOrFail2({
|
|
6333
|
-
decode: (s) =>
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
message: `Invalid URL string: ${s}`
|
|
6337
|
-
})
|
|
6338
|
-
}),
|
|
6360
|
+
decode: (s) => URL.canParse(s) ? succeed4(new URL(s)) : fail5(new InvalidValue(some2(s), {
|
|
6361
|
+
message: `Invalid URL string: ${s}`
|
|
6362
|
+
})),
|
|
6339
6363
|
encode: (url) => succeed4(url.href)
|
|
6340
6364
|
});
|
|
6341
6365
|
var uint8ArrayFromBase64String = /* @__PURE__ */ new Transformation(/* @__PURE__ */ decodeBase642(), /* @__PURE__ */ encodeBase642());
|
|
6342
6366
|
|
|
6343
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
6367
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/SchemaAST.js
|
|
6344
6368
|
function makeGuard(tag2) {
|
|
6345
6369
|
return (ast) => ast._tag === tag2;
|
|
6346
6370
|
}
|
|
@@ -6350,7 +6374,6 @@ var isLiteral = /* @__PURE__ */ makeGuard("Literal");
|
|
|
6350
6374
|
var isUniqueSymbol = /* @__PURE__ */ makeGuard("UniqueSymbol");
|
|
6351
6375
|
var isArrays = /* @__PURE__ */ makeGuard("Arrays");
|
|
6352
6376
|
var isObjects = /* @__PURE__ */ makeGuard("Objects");
|
|
6353
|
-
var isUnion = /* @__PURE__ */ makeGuard("Union");
|
|
6354
6377
|
var Link = class {
|
|
6355
6378
|
to;
|
|
6356
6379
|
transformation;
|
|
@@ -6409,17 +6432,17 @@ var Declaration = class _Declaration extends Base2 {
|
|
|
6409
6432
|
return mapEager2(run2(oinput.value, this, options), some2);
|
|
6410
6433
|
};
|
|
6411
6434
|
}
|
|
6412
|
-
|
|
6435
|
+
_rebuild(recur2, checks, encodingChecks) {
|
|
6413
6436
|
const tps = mapOrSame(this.typeParameters, recur2);
|
|
6414
|
-
return tps === this.typeParameters ? this : new _Declaration(tps, this.run, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6437
|
+
return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Declaration(tps, this.run, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6415
6438
|
}
|
|
6416
6439
|
/** @internal */
|
|
6417
6440
|
recur(recur2) {
|
|
6418
|
-
return this.
|
|
6441
|
+
return this._rebuild(recur2, this.checks, this.encodingChecks);
|
|
6419
6442
|
}
|
|
6420
6443
|
/** @internal */
|
|
6421
6444
|
flip(recur2) {
|
|
6422
|
-
return this.
|
|
6445
|
+
return this._rebuild(recur2, this.encodingChecks, this.checks);
|
|
6423
6446
|
}
|
|
6424
6447
|
/** @internal */
|
|
6425
6448
|
getExpected() {
|
|
@@ -6455,6 +6478,10 @@ var Literal = class extends Base2 {
|
|
|
6455
6478
|
return fromConst(this, this.literal);
|
|
6456
6479
|
}
|
|
6457
6480
|
/** @internal */
|
|
6481
|
+
matchPart(s, _options) {
|
|
6482
|
+
return s === globalThis.String(this.literal) ? this.literal : void 0;
|
|
6483
|
+
}
|
|
6484
|
+
/** @internal */
|
|
6458
6485
|
toCodecJson() {
|
|
6459
6486
|
return typeof this.literal === "bigint" ? literalToString(this) : this;
|
|
6460
6487
|
}
|
|
@@ -6478,6 +6505,10 @@ var String3 = class extends Base2 {
|
|
|
6478
6505
|
return fromRefinement(this, isString);
|
|
6479
6506
|
}
|
|
6480
6507
|
/** @internal */
|
|
6508
|
+
matchPart(s, options) {
|
|
6509
|
+
return applyTemplateLiteralPartChecks(this, s, options);
|
|
6510
|
+
}
|
|
6511
|
+
/** @internal */
|
|
6481
6512
|
getExpected() {
|
|
6482
6513
|
return "string";
|
|
6483
6514
|
}
|
|
@@ -6490,6 +6521,17 @@ var Number4 = class extends Base2 {
|
|
|
6490
6521
|
return fromRefinement(this, isNumber);
|
|
6491
6522
|
}
|
|
6492
6523
|
/** @internal */
|
|
6524
|
+
matchKey(s, options) {
|
|
6525
|
+
return this._match(isStringNumberRegExp, s, options);
|
|
6526
|
+
}
|
|
6527
|
+
/** @internal */
|
|
6528
|
+
matchPart(s, options) {
|
|
6529
|
+
return this._match(isStringFiniteRegExp, s, options);
|
|
6530
|
+
}
|
|
6531
|
+
_match(regexp, s, options) {
|
|
6532
|
+
return regexp.test(s) ? applyTemplateLiteralPartChecks(this, globalThis.Number(s), options) : void 0;
|
|
6533
|
+
}
|
|
6534
|
+
/** @internal */
|
|
6493
6535
|
toCodecJson() {
|
|
6494
6536
|
if (this.checks && (hasCheck(this.checks, "isFinite") || hasCheck(this.checks, "isInt"))) {
|
|
6495
6537
|
return this;
|
|
@@ -6603,18 +6645,18 @@ var Arrays = class _Arrays extends Base2 {
|
|
|
6603
6645
|
return some2(state.output);
|
|
6604
6646
|
});
|
|
6605
6647
|
}
|
|
6606
|
-
|
|
6648
|
+
_rebuild(recur2, checks, encodingChecks) {
|
|
6607
6649
|
const elements = mapOrSame(this.elements, recur2);
|
|
6608
6650
|
const rest = mapOrSame(this.rest, recur2);
|
|
6609
|
-
return elements === this.elements && rest === this.rest ? this : new _Arrays(this.isMutable, elements, rest, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6651
|
+
return elements === this.elements && rest === this.rest && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Arrays(this.isMutable, elements, rest, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6610
6652
|
}
|
|
6611
6653
|
/** @internal */
|
|
6612
6654
|
recur(recur2) {
|
|
6613
|
-
return this.
|
|
6655
|
+
return this._rebuild(recur2, this.checks, this.encodingChecks);
|
|
6614
6656
|
}
|
|
6615
6657
|
/** @internal */
|
|
6616
6658
|
flip(recur2) {
|
|
6617
|
-
return this.
|
|
6659
|
+
return this._rebuild(recur2, this.encodingChecks, this.checks);
|
|
6618
6660
|
}
|
|
6619
6661
|
/** @internal */
|
|
6620
6662
|
getExpected() {
|
|
@@ -6654,38 +6696,41 @@ var resolveConcurrency = (value) => {
|
|
|
6654
6696
|
} : void 0;
|
|
6655
6697
|
};
|
|
6656
6698
|
var wrapPropertyKeyIssue = (s, ast, key, exit3) => {
|
|
6657
|
-
|
|
6658
|
-
if (isFailure2(issueResult)) {
|
|
6699
|
+
if (exit3.cause.reasons.length === 0) {
|
|
6659
6700
|
return exit3;
|
|
6660
6701
|
}
|
|
6661
|
-
const issue =
|
|
6702
|
+
const issue = getSchemaIssue(exit3.cause);
|
|
6703
|
+
if (issue === void 0) {
|
|
6704
|
+
return failCause2(map5(exit3.cause, (issue2) => new Composite(ast, s.oinput, [new Pointer([key], issue2)])));
|
|
6705
|
+
}
|
|
6706
|
+
const pointer = new Pointer([key], issue);
|
|
6662
6707
|
if (s.options.errors === "all") {
|
|
6663
|
-
if (s.issues) s.issues.push(
|
|
6664
|
-
else s.issues = [
|
|
6708
|
+
if (s.issues) s.issues.push(pointer);
|
|
6709
|
+
else s.issues = [pointer];
|
|
6665
6710
|
} else {
|
|
6666
|
-
return fail4(new Composite(ast, s.oinput, [
|
|
6711
|
+
return fail4(new Composite(ast, s.oinput, [pointer]));
|
|
6667
6712
|
}
|
|
6668
6713
|
};
|
|
6669
6714
|
var FINITE_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?";
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6715
|
+
function getIndexSignatureKeys(input, parameter, options = defaultParseOptions) {
|
|
6716
|
+
let stringKeys;
|
|
6717
|
+
let symbolKeys;
|
|
6718
|
+
function go(parameter2) {
|
|
6719
|
+
switch (parameter2._tag) {
|
|
6720
|
+
case "String":
|
|
6721
|
+
case "TemplateLiteral":
|
|
6722
|
+
return (stringKeys ??= Object.keys(input)).filter((k) => parameter2.matchPart(k, options) !== void 0);
|
|
6723
|
+
case "Number":
|
|
6724
|
+
return (stringKeys ??= Object.keys(input)).filter((k) => parameter2.matchKey(k, options) !== void 0);
|
|
6725
|
+
case "Symbol":
|
|
6726
|
+
return (symbolKeys ??= Object.getOwnPropertySymbols(input)).filter((k) => parameter2.matchKey(k, options) !== void 0);
|
|
6727
|
+
case "Union":
|
|
6728
|
+
return [...new Set(parameter2.types.flatMap(go))];
|
|
6729
|
+
default:
|
|
6730
|
+
return [];
|
|
6679
6731
|
}
|
|
6680
|
-
case "Symbol":
|
|
6681
|
-
return Object.getOwnPropertySymbols(input);
|
|
6682
|
-
case "Number":
|
|
6683
|
-
return Object.keys(input).filter((k) => isNumberStringRegExp.test(k));
|
|
6684
|
-
case "Union":
|
|
6685
|
-
return [...new Set(encoded.types.flatMap((t) => getIndexSignatureKeys(input, t)))];
|
|
6686
|
-
default:
|
|
6687
|
-
return [];
|
|
6688
6732
|
}
|
|
6733
|
+
return go(parameterFromPropertyKey(toEncoded(parameter)));
|
|
6689
6734
|
}
|
|
6690
6735
|
var PropertySignature = class {
|
|
6691
6736
|
name;
|
|
@@ -6695,11 +6740,30 @@ var PropertySignature = class {
|
|
|
6695
6740
|
this.type = type;
|
|
6696
6741
|
}
|
|
6697
6742
|
};
|
|
6743
|
+
function isIndexSignatureParameterSide(ast) {
|
|
6744
|
+
switch (ast._tag) {
|
|
6745
|
+
case "String":
|
|
6746
|
+
case "Number":
|
|
6747
|
+
case "Symbol":
|
|
6748
|
+
case "TemplateLiteral":
|
|
6749
|
+
return true;
|
|
6750
|
+
case "Union":
|
|
6751
|
+
return ast.types.every(isIndexSignatureParameterSide);
|
|
6752
|
+
default:
|
|
6753
|
+
return false;
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
function isIndexSignatureParameter(ast) {
|
|
6757
|
+
return isIndexSignatureParameterSide(ast) && isIndexSignatureParameterSide(toEncoded(ast));
|
|
6758
|
+
}
|
|
6698
6759
|
var IndexSignature = class {
|
|
6699
6760
|
parameter;
|
|
6700
6761
|
type;
|
|
6701
6762
|
merge;
|
|
6702
6763
|
constructor(parameter, type, merge3) {
|
|
6764
|
+
if (!isIndexSignatureParameter(parameter)) {
|
|
6765
|
+
throw new Error(`Invalid index signature parameter ${parameter._tag}`);
|
|
6766
|
+
}
|
|
6703
6767
|
this.parameter = parameter;
|
|
6704
6768
|
this.type = type;
|
|
6705
6769
|
this.merge = merge3;
|
|
@@ -6745,7 +6809,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
6745
6809
|
}
|
|
6746
6810
|
const parseIndexes = indexCount > 0 ? iterateEager()({
|
|
6747
6811
|
onItem: fnUntracedEager2(function* (s, [key, is2]) {
|
|
6748
|
-
const parserKey = recur2(
|
|
6812
|
+
const parserKey = recur2(parameterFromPropertyKey(is2.parameter));
|
|
6749
6813
|
const effKey = parserKey(some2(key), s.options);
|
|
6750
6814
|
const exitKey = effectIsExit(effKey) ? effKey : yield* exit2(effKey);
|
|
6751
6815
|
if (exitKey._tag === "Failure") {
|
|
@@ -6828,7 +6892,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
6828
6892
|
const keyPairs = empty2();
|
|
6829
6893
|
for (let i = 0; i < indexCount; i++) {
|
|
6830
6894
|
const is2 = ast.indexSignatures[i];
|
|
6831
|
-
const keys2 = getIndexSignatureKeys(input, is2.parameter);
|
|
6895
|
+
const keys2 = getIndexSignatureKeys(input, is2.parameter, options);
|
|
6832
6896
|
for (let j = 0; j < keys2.length; j++) {
|
|
6833
6897
|
const key = keys2[j];
|
|
6834
6898
|
keyPairs.push([key, is2]);
|
|
@@ -6853,26 +6917,26 @@ var Objects = class _Objects extends Base2 {
|
|
|
6853
6917
|
return some2(out);
|
|
6854
6918
|
});
|
|
6855
6919
|
}
|
|
6856
|
-
|
|
6920
|
+
_rebuild(recur2, recurParameter, flipMerge, checks, encodingChecks) {
|
|
6857
6921
|
const props = mapOrSame(this.propertySignatures, (ps) => {
|
|
6858
6922
|
const t = recur2(ps.type);
|
|
6859
6923
|
return t === ps.type ? ps : new PropertySignature(ps.name, t);
|
|
6860
6924
|
});
|
|
6861
6925
|
const indexes = mapOrSame(this.indexSignatures, (is2) => {
|
|
6862
|
-
const p =
|
|
6926
|
+
const p = recurParameter(is2.parameter);
|
|
6863
6927
|
const t = recur2(is2.type);
|
|
6864
6928
|
const merge3 = flipMerge ? is2.merge?.flip() : is2.merge;
|
|
6865
6929
|
return p === is2.parameter && t === is2.type && merge3 === is2.merge ? is2 : new IndexSignature(p, t, merge3);
|
|
6866
6930
|
});
|
|
6867
|
-
return props === this.propertySignatures && indexes === this.indexSignatures ? this : new _Objects(props, indexes, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6931
|
+
return props === this.propertySignatures && indexes === this.indexSignatures && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Objects(props, indexes, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
6868
6932
|
}
|
|
6869
6933
|
/** @internal */
|
|
6870
6934
|
flip(recur2) {
|
|
6871
|
-
return this.
|
|
6935
|
+
return this._rebuild(recur2, recur2, true, this.encodingChecks, this.checks);
|
|
6872
6936
|
}
|
|
6873
6937
|
/** @internal */
|
|
6874
|
-
recur(recur2) {
|
|
6875
|
-
return this.
|
|
6938
|
+
recur(recur2, recurParameter = recur2) {
|
|
6939
|
+
return this._rebuild(recur2, recurParameter, false, this.checks, this.encodingChecks);
|
|
6876
6940
|
}
|
|
6877
6941
|
/** @internal */
|
|
6878
6942
|
getExpected() {
|
|
@@ -6902,6 +6966,11 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
|
6902
6966
|
}
|
|
6903
6967
|
}
|
|
6904
6968
|
});
|
|
6969
|
+
function combineChecks(a, b) {
|
|
6970
|
+
if (!a) return b;
|
|
6971
|
+
if (!b) return a;
|
|
6972
|
+
return [...a, ...b];
|
|
6973
|
+
}
|
|
6905
6974
|
function struct(fields, checks, annotations) {
|
|
6906
6975
|
return new Objects(Reflect.ownKeys(fields).map((key) => {
|
|
6907
6976
|
return new PropertySignature(key, fields[key].ast);
|
|
@@ -7084,17 +7153,25 @@ var Union = class _Union extends Base2 {
|
|
|
7084
7153
|
});
|
|
7085
7154
|
};
|
|
7086
7155
|
}
|
|
7087
|
-
|
|
7156
|
+
_rebuild(recur2, checks, encodingChecks) {
|
|
7088
7157
|
const types = mapOrSame(this.types, recur2);
|
|
7089
|
-
return types === this.types ? this : new _Union(types, this.mode, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
7158
|
+
return types === this.types && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Union(types, this.mode, this.annotations, checks, void 0, this.context, encodingChecks);
|
|
7090
7159
|
}
|
|
7091
7160
|
/** @internal */
|
|
7092
7161
|
recur(recur2) {
|
|
7093
|
-
return this.
|
|
7162
|
+
return this._rebuild(recur2, this.checks, this.encodingChecks);
|
|
7094
7163
|
}
|
|
7095
7164
|
/** @internal */
|
|
7096
7165
|
flip(recur2) {
|
|
7097
|
-
return this.
|
|
7166
|
+
return this._rebuild(recur2, this.encodingChecks, this.checks);
|
|
7167
|
+
}
|
|
7168
|
+
/** @internal */
|
|
7169
|
+
matchPart(s, options) {
|
|
7170
|
+
for (const type of this.types) {
|
|
7171
|
+
const out = type.matchPart(s, options);
|
|
7172
|
+
if (out !== void 0) return out;
|
|
7173
|
+
}
|
|
7174
|
+
return void 0;
|
|
7098
7175
|
}
|
|
7099
7176
|
/** @internal */
|
|
7100
7177
|
getExpected(getExpected2) {
|
|
@@ -7131,12 +7208,12 @@ var parseUnion = /* @__PURE__ */ iterateEager()({
|
|
|
7131
7208
|
},
|
|
7132
7209
|
step(s, candidate, exit3) {
|
|
7133
7210
|
if (exit3._tag === "Failure") {
|
|
7134
|
-
const
|
|
7135
|
-
if (
|
|
7211
|
+
const issue = getSchemaIssue(exit3.cause);
|
|
7212
|
+
if (issue === void 0) {
|
|
7136
7213
|
return exit3;
|
|
7137
7214
|
}
|
|
7138
|
-
if (s.issues) s.issues.push(
|
|
7139
|
-
else s.issues = [
|
|
7215
|
+
if (s.issues) s.issues.push(issue);
|
|
7216
|
+
else s.issues = [issue];
|
|
7140
7217
|
} else {
|
|
7141
7218
|
if (s.out && s.ast.mode === "oneOf") {
|
|
7142
7219
|
s.successes.push(candidate);
|
|
@@ -7158,17 +7235,6 @@ function formatIsMutable(isMutable) {
|
|
|
7158
7235
|
function formatIsOptional(isOptional2) {
|
|
7159
7236
|
return isOptional2 ? "?" : "";
|
|
7160
7237
|
}
|
|
7161
|
-
function getEncodingChecks(ast) {
|
|
7162
|
-
switch (ast._tag) {
|
|
7163
|
-
case "Declaration":
|
|
7164
|
-
case "Arrays":
|
|
7165
|
-
case "Objects":
|
|
7166
|
-
case "Union":
|
|
7167
|
-
return ast.encodingChecks;
|
|
7168
|
-
default:
|
|
7169
|
-
return void 0;
|
|
7170
|
-
}
|
|
7171
|
-
}
|
|
7172
7238
|
var Filter2 = class _Filter extends Class {
|
|
7173
7239
|
_tag = "Filter";
|
|
7174
7240
|
run;
|
|
@@ -7279,7 +7345,7 @@ function replaceChecks(ast, checks) {
|
|
|
7279
7345
|
});
|
|
7280
7346
|
}
|
|
7281
7347
|
function appendChecks(ast, checks) {
|
|
7282
|
-
return replaceChecks(ast, ast.checks
|
|
7348
|
+
return replaceChecks(ast, combineChecks(ast.checks, checks));
|
|
7283
7349
|
}
|
|
7284
7350
|
function updateLastLink(encoding, f) {
|
|
7285
7351
|
const links = encoding;
|
|
@@ -7290,6 +7356,12 @@ function updateLastLink(encoding, f) {
|
|
|
7290
7356
|
}
|
|
7291
7357
|
return encoding;
|
|
7292
7358
|
}
|
|
7359
|
+
function applyToSelfOrLastLinkEncoding(f) {
|
|
7360
|
+
function out(ast) {
|
|
7361
|
+
return ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, out)) : f(ast);
|
|
7362
|
+
}
|
|
7363
|
+
return memoize(out);
|
|
7364
|
+
}
|
|
7293
7365
|
function appendTransformation(from, transformation, to) {
|
|
7294
7366
|
const link2 = new Link(from, transformation);
|
|
7295
7367
|
return replaceEncoding(to, to.encoding ? [...to.encoding, link2] : [link2]);
|
|
@@ -7332,9 +7404,13 @@ var toType = /* @__PURE__ */ memoize((ast) => {
|
|
|
7332
7404
|
}
|
|
7333
7405
|
const out = ast;
|
|
7334
7406
|
const type = out.recur?.(toType) ?? out;
|
|
7335
|
-
|
|
7407
|
+
const encodingChecks = type.encodingChecks;
|
|
7408
|
+
if (encodingChecks) {
|
|
7336
7409
|
return modifyOwnPropertyDescriptors(type, (d) => {
|
|
7337
7410
|
d.encodingChecks.value = void 0;
|
|
7411
|
+
if (type === ast) {
|
|
7412
|
+
d.checks.value = combineChecks(type.checks, encodingChecks);
|
|
7413
|
+
}
|
|
7338
7414
|
});
|
|
7339
7415
|
}
|
|
7340
7416
|
return type;
|
|
@@ -7374,45 +7450,13 @@ function containsUndefined(ast) {
|
|
|
7374
7450
|
return false;
|
|
7375
7451
|
}
|
|
7376
7452
|
}
|
|
7377
|
-
function getTemplateLiteralSource(ast, top) {
|
|
7378
|
-
return ast.encodedParts.map((part) => handleTemplateLiteralASTPartParens(part, getTemplateLiteralASTPartPattern(part), top)).join("");
|
|
7379
|
-
}
|
|
7380
|
-
var getTemplateLiteralRegExp = /* @__PURE__ */ memoize((ast) => {
|
|
7381
|
-
return new globalThis.RegExp(`^${getTemplateLiteralSource(ast, true)}$`);
|
|
7382
|
-
});
|
|
7383
|
-
function getTemplateLiteralASTPartPattern(part) {
|
|
7384
|
-
switch (part._tag) {
|
|
7385
|
-
case "Literal":
|
|
7386
|
-
return escape(globalThis.String(part.literal));
|
|
7387
|
-
case "String":
|
|
7388
|
-
return STRING_PATTERN;
|
|
7389
|
-
case "Number":
|
|
7390
|
-
return FINITE_PATTERN;
|
|
7391
|
-
case "BigInt":
|
|
7392
|
-
return BIGINT_PATTERN;
|
|
7393
|
-
case "TemplateLiteral":
|
|
7394
|
-
return getTemplateLiteralSource(part, false);
|
|
7395
|
-
case "Union":
|
|
7396
|
-
return part.types.map(getTemplateLiteralASTPartPattern).join("|");
|
|
7397
|
-
}
|
|
7398
|
-
}
|
|
7399
|
-
function handleTemplateLiteralASTPartParens(part, s, top) {
|
|
7400
|
-
if (isUnion(part)) {
|
|
7401
|
-
if (!top) {
|
|
7402
|
-
return `(?:${s})`;
|
|
7403
|
-
}
|
|
7404
|
-
} else if (!top) {
|
|
7405
|
-
return s;
|
|
7406
|
-
}
|
|
7407
|
-
return `(${s})`;
|
|
7408
|
-
}
|
|
7409
7453
|
function fromConst(ast, value) {
|
|
7410
|
-
const
|
|
7454
|
+
const succeed6 = succeedSome2(value);
|
|
7411
7455
|
return (oinput) => {
|
|
7412
7456
|
if (oinput._tag === "None") {
|
|
7413
7457
|
return succeedNone2;
|
|
7414
7458
|
}
|
|
7415
|
-
return oinput.value === value ?
|
|
7459
|
+
return oinput.value === value ? succeed6 : fail5(new InvalidType(ast, oinput));
|
|
7416
7460
|
};
|
|
7417
7461
|
}
|
|
7418
7462
|
function fromRefinement(ast, refinement) {
|
|
@@ -7423,24 +7467,24 @@ function fromRefinement(ast, refinement) {
|
|
|
7423
7467
|
return refinement(oinput.value) ? succeed4(oinput) : fail5(new InvalidType(ast, oinput));
|
|
7424
7468
|
};
|
|
7425
7469
|
}
|
|
7426
|
-
function
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
return
|
|
7470
|
+
function applyTemplateLiteralPartChecks(ast, value, options) {
|
|
7471
|
+
if (options?.disableChecks || ast.checks === void 0) return value;
|
|
7472
|
+
const issues = [];
|
|
7473
|
+
collectIssues(ast.checks, value, issues, ast, options);
|
|
7474
|
+
return issues.length === 0 ? value : void 0;
|
|
7431
7475
|
}
|
|
7432
|
-
var
|
|
7476
|
+
var parameterFromPropertyKey = /* @__PURE__ */ applyToSelfOrLastLinkEncoding((ast) => {
|
|
7433
7477
|
switch (ast._tag) {
|
|
7434
7478
|
default:
|
|
7435
7479
|
return ast;
|
|
7436
7480
|
case "Number":
|
|
7437
7481
|
return ast.toCodecStringTree();
|
|
7438
7482
|
case "Union":
|
|
7439
|
-
return ast.recur(
|
|
7483
|
+
return ast.recur(parameterFromPropertyKey);
|
|
7440
7484
|
}
|
|
7441
7485
|
});
|
|
7442
|
-
var STRING_PATTERN = "[\\s\\S]*?";
|
|
7443
7486
|
var isStringFiniteRegExp = /* @__PURE__ */ new globalThis.RegExp(`^${FINITE_PATTERN}$`);
|
|
7487
|
+
var isStringNumberRegExp = /* @__PURE__ */ new globalThis.RegExp(`(?:${FINITE_PATTERN}|Infinity|-Infinity|NaN)`);
|
|
7444
7488
|
function isStringFinite(annotations) {
|
|
7445
7489
|
return isPattern(isStringFiniteRegExp, {
|
|
7446
7490
|
expected: "a string representing a finite number",
|
|
@@ -7477,10 +7521,10 @@ function collectIssues(checks, value, issues, ast, options) {
|
|
|
7477
7521
|
var ClassTypeId = "~effect/Schema/Class";
|
|
7478
7522
|
var STRUCTURAL_ANNOTATION_KEY = "~structural";
|
|
7479
7523
|
|
|
7480
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
7524
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Struct.js
|
|
7481
7525
|
var lambda = (f) => f;
|
|
7482
7526
|
|
|
7483
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
7527
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/SchemaParser.js
|
|
7484
7528
|
var recurDefaults = /* @__PURE__ */ memoize((ast) => {
|
|
7485
7529
|
switch (ast._tag) {
|
|
7486
7530
|
case "Declaration": {
|
|
@@ -7522,15 +7566,25 @@ function makeEffect(schema) {
|
|
|
7522
7566
|
function makeOption(schema) {
|
|
7523
7567
|
const parser = makeEffect(schema);
|
|
7524
7568
|
return (input, options) => {
|
|
7525
|
-
|
|
7569
|
+
const exit3 = runSyncExit2(parser(input, options));
|
|
7570
|
+
if (isSuccess4(exit3)) {
|
|
7571
|
+
return some2(exit3.value);
|
|
7572
|
+
}
|
|
7573
|
+
getSchemaIssueOrThrow(exit3.cause, "Option adapter can only return none for schema issues");
|
|
7574
|
+
return none2();
|
|
7526
7575
|
};
|
|
7527
7576
|
}
|
|
7528
7577
|
function make7(schema) {
|
|
7529
7578
|
const parser = makeEffect(schema);
|
|
7530
7579
|
return (input, options) => {
|
|
7531
|
-
|
|
7580
|
+
const exit3 = runSyncExit2(parser(input, options));
|
|
7581
|
+
if (isSuccess4(exit3)) {
|
|
7582
|
+
return exit3.value;
|
|
7583
|
+
}
|
|
7584
|
+
const issue = getSchemaIssueOrThrow(exit3.cause, "Constructor adapter can only throw schema issues");
|
|
7585
|
+
throw new Error(issue.toString(), {
|
|
7532
7586
|
cause: issue
|
|
7533
|
-
})
|
|
7587
|
+
});
|
|
7534
7588
|
};
|
|
7535
7589
|
}
|
|
7536
7590
|
function decodeUnknownEffect(schema, options) {
|
|
@@ -7550,12 +7604,18 @@ function run(ast) {
|
|
|
7550
7604
|
return succeed4(oa.value);
|
|
7551
7605
|
});
|
|
7552
7606
|
}
|
|
7607
|
+
function mapSchemaIssueEffect(self, f) {
|
|
7608
|
+
return catchCause2(self, (cause) => failCauseSync2(() => map5(cause, f)));
|
|
7609
|
+
}
|
|
7553
7610
|
var recur = /* @__PURE__ */ memoize((ast) => {
|
|
7554
7611
|
let parser;
|
|
7555
|
-
const
|
|
7556
|
-
const
|
|
7557
|
-
const
|
|
7558
|
-
|
|
7612
|
+
const checks = ast.checks;
|
|
7613
|
+
const encoding = ast.encoding;
|
|
7614
|
+
const links = encoding;
|
|
7615
|
+
const len = links?.length ?? 0;
|
|
7616
|
+
const encodingChecks = ast.encodingChecks;
|
|
7617
|
+
const astOptions = (checks ? checks[checks.length - 1].annotations : ast.annotations)?.["parseOptions"];
|
|
7618
|
+
if (!ast.context && !encoding && !checks && !encodingChecks) {
|
|
7559
7619
|
return (ou, options) => {
|
|
7560
7620
|
parser ??= ast.getParser(recur);
|
|
7561
7621
|
if (astOptions) {
|
|
@@ -7568,6 +7628,7 @@ var recur = /* @__PURE__ */ memoize((ast) => {
|
|
|
7568
7628
|
};
|
|
7569
7629
|
}
|
|
7570
7630
|
const isStructural = isArrays(ast) || isObjects(ast) || isDeclaration(ast) && ast.typeParameters.length > 0;
|
|
7631
|
+
const structuralChecks = checks && isStructural ? checks.filter((check) => check.annotations?.[STRUCTURAL_ANNOTATION_KEY]) : void 0;
|
|
7571
7632
|
return (ou, options) => {
|
|
7572
7633
|
if (astOptions) {
|
|
7573
7634
|
options = {
|
|
@@ -7575,11 +7636,8 @@ var recur = /* @__PURE__ */ memoize((ast) => {
|
|
|
7575
7636
|
...astOptions
|
|
7576
7637
|
};
|
|
7577
7638
|
}
|
|
7578
|
-
const encoding = ast.encoding;
|
|
7579
7639
|
let srou;
|
|
7580
|
-
if (
|
|
7581
|
-
const links = encoding;
|
|
7582
|
-
const len = links.length;
|
|
7640
|
+
if (links) {
|
|
7583
7641
|
for (let i = len - 1; i >= 0; i--) {
|
|
7584
7642
|
const link2 = links[i];
|
|
7585
7643
|
const to = link2.to;
|
|
@@ -7592,49 +7650,52 @@ var recur = /* @__PURE__ */ memoize((ast) => {
|
|
|
7592
7650
|
srou = link2.transformation.decode(srou, options);
|
|
7593
7651
|
}
|
|
7594
7652
|
}
|
|
7595
|
-
srou =
|
|
7653
|
+
srou = mapSchemaIssueEffect(srou, (issue) => new Encoding(ast, ou, issue));
|
|
7596
7654
|
}
|
|
7597
7655
|
parser ??= ast.getParser(recur);
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7656
|
+
const parseLocal = (localOu) => {
|
|
7657
|
+
let sroa2 = parser(localOu, options);
|
|
7658
|
+
if (encodingChecks && !options?.disableChecks) {
|
|
7659
|
+
sroa2 = flatMapEager2(sroa2, (oa) => {
|
|
7660
|
+
if (isSome2(localOu) && isSome2(oa)) {
|
|
7661
|
+
const issues = [];
|
|
7662
|
+
collectIssues(encodingChecks, localOu.value, issues, ast, options);
|
|
7663
|
+
if (isArrayNonEmpty2(issues)) {
|
|
7664
|
+
return fail5(new Composite(ast, localOu, issues));
|
|
7665
|
+
}
|
|
7606
7666
|
}
|
|
7607
|
-
|
|
7608
|
-
return succeed4(oa);
|
|
7609
|
-
});
|
|
7610
|
-
}
|
|
7611
|
-
if (ast.checks && !options?.disableChecks) {
|
|
7612
|
-
const checks = ast.checks;
|
|
7613
|
-
if (options?.errors === "all" && isStructural && isSome2(ou)) {
|
|
7614
|
-
sroa = catchEager2(sroa, (issue) => {
|
|
7615
|
-
const issues = [];
|
|
7616
|
-
collectIssues(checks.filter((check) => check.annotations?.[STRUCTURAL_ANNOTATION_KEY]), ou.value, issues, ast, options);
|
|
7617
|
-
const out = isArrayNonEmpty2(issues) ? issue._tag === "Composite" && issue.ast === ast ? new Composite(ast, issue.actual, [...issue.issues, ...issues]) : new Composite(ast, ou, [issue, ...issues]) : issue;
|
|
7618
|
-
return fail5(out);
|
|
7667
|
+
return succeed4(oa);
|
|
7619
7668
|
});
|
|
7620
7669
|
}
|
|
7621
|
-
|
|
7622
|
-
if (isSome2(
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
return
|
|
7628
|
-
}
|
|
7670
|
+
if (checks && !options?.disableChecks) {
|
|
7671
|
+
if (options?.errors === "all" && structuralChecks && structuralChecks.length > 0 && isSome2(localOu)) {
|
|
7672
|
+
sroa2 = mapSchemaIssueEffect(sroa2, (issue) => {
|
|
7673
|
+
const issues = [];
|
|
7674
|
+
collectIssues(structuralChecks, localOu.value, issues, ast, options);
|
|
7675
|
+
const out = isArrayNonEmpty2(issues) ? issue._tag === "Composite" && issue.ast === ast ? new Composite(ast, issue.actual, [...issue.issues, ...issues]) : new Composite(ast, localOu, [issue, ...issues]) : issue;
|
|
7676
|
+
return out;
|
|
7677
|
+
});
|
|
7629
7678
|
}
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7679
|
+
sroa2 = flatMapEager2(sroa2, (oa) => {
|
|
7680
|
+
if (isSome2(oa)) {
|
|
7681
|
+
const value = oa.value;
|
|
7682
|
+
const issues = [];
|
|
7683
|
+
collectIssues(checks, value, issues, ast, options);
|
|
7684
|
+
if (isArrayNonEmpty2(issues)) {
|
|
7685
|
+
return fail5(new Composite(ast, oa, issues));
|
|
7686
|
+
}
|
|
7687
|
+
}
|
|
7688
|
+
return succeed4(oa);
|
|
7689
|
+
});
|
|
7690
|
+
}
|
|
7691
|
+
return sroa2;
|
|
7692
|
+
};
|
|
7693
|
+
const sroa = srou ? flatMapEager2(srou, parseLocal) : parseLocal(ou);
|
|
7633
7694
|
return sroa;
|
|
7634
7695
|
};
|
|
7635
7696
|
});
|
|
7636
7697
|
|
|
7637
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
7698
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/internal/schema/schema.js
|
|
7638
7699
|
var TypeId15 = "~effect/Schema/Schema";
|
|
7639
7700
|
var SchemaProto = {
|
|
7640
7701
|
[TypeId15]: TypeId15,
|
|
@@ -7658,19 +7719,18 @@ function make8(ast, options) {
|
|
|
7658
7719
|
}
|
|
7659
7720
|
self.ast = ast;
|
|
7660
7721
|
self.rebuild = (ast2) => make8(ast2, options);
|
|
7661
|
-
self.makeEffect =
|
|
7722
|
+
self.makeEffect = (input, options2) => mapSchemaIssueEffect2(makeEffect(self)(input, options2));
|
|
7662
7723
|
self.make = make7(self);
|
|
7663
7724
|
self.makeOption = makeOption(self);
|
|
7664
7725
|
return self;
|
|
7665
7726
|
}
|
|
7666
7727
|
var SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
7667
|
-
var SchemaError = class {
|
|
7728
|
+
var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
|
|
7668
7729
|
[SchemaErrorTypeId] = SchemaErrorTypeId;
|
|
7669
|
-
_tag = "SchemaError";
|
|
7670
|
-
name = "SchemaError";
|
|
7671
|
-
issue;
|
|
7672
7730
|
constructor(issue) {
|
|
7673
|
-
|
|
7731
|
+
super({
|
|
7732
|
+
issue
|
|
7733
|
+
});
|
|
7674
7734
|
}
|
|
7675
7735
|
get message() {
|
|
7676
7736
|
return this.issue.toString();
|
|
@@ -7679,8 +7739,14 @@ var SchemaError = class {
|
|
|
7679
7739
|
return `SchemaError(${this.message})`;
|
|
7680
7740
|
}
|
|
7681
7741
|
};
|
|
7742
|
+
function mapSchemaIssueEffect2(self) {
|
|
7743
|
+
return catchCause2(self, (cause) => failCauseSync2(() => map5(cause, (issue) => new SchemaError(issue))));
|
|
7744
|
+
}
|
|
7745
|
+
function mapSchemaErrorEffect(self) {
|
|
7746
|
+
return catchCause2(self, (cause) => failCauseSync2(() => map5(cause, (error) => error.issue)));
|
|
7747
|
+
}
|
|
7682
7748
|
|
|
7683
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
7749
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.88/node_modules/effect/dist/Schema.js
|
|
7684
7750
|
function declareConstructor() {
|
|
7685
7751
|
return (typeParameters, run2, annotations) => {
|
|
7686
7752
|
return make9(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make9(ast))), annotations));
|
|
@@ -7689,16 +7755,43 @@ function declareConstructor() {
|
|
|
7689
7755
|
function declare(is2, annotations) {
|
|
7690
7756
|
return declareConstructor()([], () => (input, ast) => is2(input) ? succeed4(input) : fail5(new InvalidType(ast, some2(input))), annotations);
|
|
7691
7757
|
}
|
|
7758
|
+
function isSchemaError(u) {
|
|
7759
|
+
return hasProperty(u, SchemaErrorTypeId);
|
|
7760
|
+
}
|
|
7692
7761
|
function decodeUnknownEffect2(schema, options) {
|
|
7693
7762
|
const parser = decodeUnknownEffect(schema, options);
|
|
7694
7763
|
return (input, options2) => {
|
|
7695
|
-
return
|
|
7764
|
+
return mapSchemaIssueEffect2(parser(input, options2));
|
|
7696
7765
|
};
|
|
7697
7766
|
}
|
|
7767
|
+
function getSchemaErrorOrThrow(cause, message) {
|
|
7768
|
+
let schemaError;
|
|
7769
|
+
for (const reason of cause.reasons) {
|
|
7770
|
+
if (!isFailReason2(reason) || !isSchemaError(reason.error)) {
|
|
7771
|
+
throw new globalThis.Error(message, {
|
|
7772
|
+
cause
|
|
7773
|
+
});
|
|
7774
|
+
}
|
|
7775
|
+
schemaError ??= reason.error;
|
|
7776
|
+
}
|
|
7777
|
+
if (schemaError === void 0) {
|
|
7778
|
+
throw new globalThis.Error(message, {
|
|
7779
|
+
cause
|
|
7780
|
+
});
|
|
7781
|
+
}
|
|
7782
|
+
return schemaError;
|
|
7783
|
+
}
|
|
7784
|
+
function runSchemaErrorSync(self) {
|
|
7785
|
+
const exit3 = runSyncExit2(self);
|
|
7786
|
+
if (isSuccess4(exit3)) {
|
|
7787
|
+
return exit3.value;
|
|
7788
|
+
}
|
|
7789
|
+
throw getSchemaErrorOrThrow(exit3.cause, "Sync adapter can only throw schema errors");
|
|
7790
|
+
}
|
|
7698
7791
|
function decodeUnknownSync(schema, options) {
|
|
7699
7792
|
const parser = decodeUnknownEffect2(schema, options);
|
|
7700
7793
|
return (input, options2) => {
|
|
7701
|
-
return
|
|
7794
|
+
return runSchemaErrorSync(parser(input, options2));
|
|
7702
7795
|
};
|
|
7703
7796
|
}
|
|
7704
7797
|
var make9 = make8;
|
|
@@ -7764,7 +7857,7 @@ function decodeTo2(to, transformation) {
|
|
|
7764
7857
|
};
|
|
7765
7858
|
}
|
|
7766
7859
|
function withConstructorDefault2(defaultValue) {
|
|
7767
|
-
return (schema) => make9(withConstructorDefault(schema.ast,
|
|
7860
|
+
return (schema) => make9(withConstructorDefault(schema.ast, mapSchemaErrorEffect(defaultValue)), {
|
|
7768
7861
|
schema
|
|
7769
7862
|
});
|
|
7770
7863
|
}
|
|
@@ -7791,7 +7884,7 @@ function isBase64(annotations) {
|
|
|
7791
7884
|
...annotations
|
|
7792
7885
|
});
|
|
7793
7886
|
}
|
|
7794
|
-
var
|
|
7887
|
+
var RegExp2 = /* @__PURE__ */ instanceOf(globalThis.RegExp, {
|
|
7795
7888
|
typeConstructor: {
|
|
7796
7889
|
_tag: "RegExp"
|
|
7797
7890
|
},
|
|
@@ -8004,7 +8097,7 @@ var Uint8Array2 = /* @__PURE__ */ instanceOf(globalThis.Uint8Array, {
|
|
|
8004
8097
|
toArbitrary: () => (fc) => fc.uint8Array()
|
|
8005
8098
|
});
|
|
8006
8099
|
|
|
8007
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.
|
|
8100
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.88/node_modules/effect-oxlint/dist/chunk.js
|
|
8008
8101
|
var __defProp2 = Object.defineProperty;
|
|
8009
8102
|
var __exportAll = (all3, no_symbols) => {
|
|
8010
8103
|
let target = {};
|
|
@@ -8016,7 +8109,7 @@ var __exportAll = (all3, no_symbols) => {
|
|
|
8016
8109
|
return target;
|
|
8017
8110
|
};
|
|
8018
8111
|
|
|
8019
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.
|
|
8112
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.88/node_modules/effect-oxlint/dist/RuleContext.js
|
|
8020
8113
|
var RuleContextBase = Service()("effect-oxlint/RuleContext");
|
|
8021
8114
|
var RuleContext = class extends RuleContextBase {
|
|
8022
8115
|
};
|
|
@@ -8030,14 +8123,14 @@ var fromOxlintContext = (ctx) => RuleContext.of({
|
|
|
8030
8123
|
languageOptions: ctx.languageOptions,
|
|
8031
8124
|
settings: ctx.settings
|
|
8032
8125
|
});
|
|
8033
|
-
service2(RuleContext).pipe(
|
|
8034
|
-
service2(RuleContext).pipe(
|
|
8035
|
-
service2(RuleContext).pipe(
|
|
8036
|
-
service2(RuleContext).pipe(
|
|
8037
|
-
service2(RuleContext).pipe(
|
|
8038
|
-
service2(RuleContext).pipe(
|
|
8126
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.id));
|
|
8127
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.filename));
|
|
8128
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.cwd));
|
|
8129
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.sourceCode));
|
|
8130
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.sourceCode.text));
|
|
8131
|
+
service2(RuleContext).pipe(map6((ctx) => ctx.sourceCode.ast));
|
|
8039
8132
|
|
|
8040
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.
|
|
8133
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-beta.88/node_modules/effect-oxlint/dist/index.js
|
|
8041
8134
|
var isIdentifier$1 = (node) => isObject(node) && "type" in node && node.type === "Identifier" && "name" in node && isString(node.name);
|
|
8042
8135
|
var identifierName = (node) => isIdentifier$1(node) ? some2(node.name) : none2();
|
|
8043
8136
|
var isStaticMember = (node) => !node.computed && node.property.type !== "PrivateIdentifier";
|
|
@@ -8167,7 +8260,7 @@ var merge$1 = (...plugins) => ({
|
|
|
8167
8260
|
var emptyVisitor = {};
|
|
8168
8261
|
var sequenceHandlers = (left, right) => (node) => andThen2(left(node), right(node));
|
|
8169
8262
|
var merge2 = (...visitors) => reduce(visitors, emptyVisitor, (acc, visitor) => union(acc, visitor, (left, right) => sequenceHandlers(left, right)));
|
|
8170
|
-
var filter6 = dual(2, (predicate, visitor) => service2(RuleContext).pipe(
|
|
8263
|
+
var filter6 = dual(2, (predicate, visitor) => service2(RuleContext).pipe(map6((ctx) => predicate(ctx.filename) ? visitor : {})));
|
|
8171
8264
|
var toOxlintVisitor = (effectVisitor, runHandler) => map2(effectVisitor, (handler) => (node) => runHandler(handler(node)));
|
|
8172
8265
|
var Rule_exports = /* @__PURE__ */ __exportAll({
|
|
8173
8266
|
banCallOf: () => banCallOf,
|
|
@@ -8361,6 +8454,8 @@ var isStringLiteral = (node) => typeof node === "object" && node !== null && "ty
|
|
|
8361
8454
|
var isCallExpression = (node) => node.type === "CallExpression";
|
|
8362
8455
|
var isObjectExpression = (node) => typeof node === "object" && node !== null && "type" in node && node.type === "ObjectExpression";
|
|
8363
8456
|
var isVariableDeclarator = (node) => node.type === "VariableDeclarator";
|
|
8457
|
+
var isVariableDeclaration = (node) => typeof node === "object" && node !== null && "type" in node && node.type === "VariableDeclaration";
|
|
8458
|
+
var isProgram = (node) => node.type === "Program";
|
|
8364
8459
|
var isTSAsExpression = (node) => node.type === "TSAsExpression" && "expression" in node && typeof node.expression === "object" && node.expression !== null;
|
|
8365
8460
|
var isMCall = (node) => isIdentifier(node.callee, "m");
|
|
8366
8461
|
var firstStringArgument = (node) => {
|
|
@@ -8408,6 +8503,11 @@ var innerCommandDefineCall = (node) => {
|
|
|
8408
8503
|
if (!isMemberCall(callee, "Command", ["define"])) return void 0;
|
|
8409
8504
|
return callee;
|
|
8410
8505
|
};
|
|
8506
|
+
var isMutableDeclaration = (node) => (node.kind === "let" || node.kind === "var") && node.declare !== true;
|
|
8507
|
+
var topLevelMutableDeclarations = (program) => program.body.flatMap((statement) => {
|
|
8508
|
+
const declaration = statement.type === "ExportNamedDeclaration" ? statement.declaration : statement;
|
|
8509
|
+
return isVariableDeclaration(declaration) && isMutableDeclaration(declaration) ? [declaration] : [];
|
|
8510
|
+
});
|
|
8411
8511
|
var noNoopMessage = Rule_exports.define({
|
|
8412
8512
|
name: "no-noop-message",
|
|
8413
8513
|
meta: Rule_exports.meta({
|
|
@@ -8607,6 +8707,31 @@ var commandBindingMatchesName = Rule_exports.define({
|
|
|
8607
8707
|
};
|
|
8608
8708
|
}
|
|
8609
8709
|
});
|
|
8710
|
+
var noModuleLevelMutableState = Rule_exports.define({
|
|
8711
|
+
name: "no-module-level-mutable-state",
|
|
8712
|
+
meta: Rule_exports.meta({
|
|
8713
|
+
type: "suggestion",
|
|
8714
|
+
description: "Keep state in the Model instead of module-level let/var bindings."
|
|
8715
|
+
}),
|
|
8716
|
+
create: function* () {
|
|
8717
|
+
const ctx = yield* RuleContext;
|
|
8718
|
+
return {
|
|
8719
|
+
Program: (node) => {
|
|
8720
|
+
if (!isProgram(node)) return Effect_exports.void;
|
|
8721
|
+
return Effect_exports.forEach(
|
|
8722
|
+
topLevelMutableDeclarations(node),
|
|
8723
|
+
(declaration) => ctx.report(
|
|
8724
|
+
Diagnostic_exports.make({
|
|
8725
|
+
node: declaration,
|
|
8726
|
+
message: "Module-level let/var holds state outside the Model. Move the data into the Model, or scope a live handle to a lifecycle primitive like Mount or ManagedResource."
|
|
8727
|
+
})
|
|
8728
|
+
),
|
|
8729
|
+
{ discard: true }
|
|
8730
|
+
);
|
|
8731
|
+
}
|
|
8732
|
+
};
|
|
8733
|
+
}
|
|
8734
|
+
});
|
|
8610
8735
|
var index_default = Plugin_exports.define({
|
|
8611
8736
|
name: "foldkit",
|
|
8612
8737
|
rules: {
|
|
@@ -8615,6 +8740,7 @@ var index_default = Plugin_exports.define({
|
|
|
8615
8740
|
"got-submodel-message-name": gotSubmodelMessageName,
|
|
8616
8741
|
"message-binding-matches-tag": messageBindingMatchesTag,
|
|
8617
8742
|
"no-empty-object-tagged-call": noEmptyObjectTaggedCall,
|
|
8743
|
+
"no-module-level-mutable-state": noModuleLevelMutableState,
|
|
8618
8744
|
"no-noop-message": noNoopMessage,
|
|
8619
8745
|
"prefer-callable-message-constructor": preferCallableMessageConstructor
|
|
8620
8746
|
}
|
|
@@ -8626,6 +8752,7 @@ export {
|
|
|
8626
8752
|
gotSubmodelMessageName,
|
|
8627
8753
|
messageBindingMatchesTag,
|
|
8628
8754
|
noEmptyObjectTaggedCall,
|
|
8755
|
+
noModuleLevelMutableState,
|
|
8629
8756
|
noNoopMessage,
|
|
8630
8757
|
preferCallableMessageConstructor
|
|
8631
8758
|
};
|