@foldkit/oxlint-plugin 0.7.0 → 0.8.0-canary.18121cd75a3b
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/all.json +2 -0
- package/dist/index.js +442 -258
- package/package.json +2 -2
- package/recommended.json +2 -0
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __export = (target, all5) => {
|
|
|
4
4
|
__defProp(target, name, { get: all5[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.
|
|
7
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.112/node_modules/effect-oxlint/dist/chunk.js
|
|
8
8
|
var __defProp2 = Object.defineProperty;
|
|
9
9
|
var __exportAll = (all5, no_symbols) => {
|
|
10
10
|
let target = {};
|
|
@@ -16,7 +16,7 @@ var __exportAll = (all5, no_symbols) => {
|
|
|
16
16
|
return target;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
19
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
20
20
|
var Effect_exports = {};
|
|
21
21
|
__export(Effect_exports, {
|
|
22
22
|
Do: () => Do5,
|
|
@@ -100,6 +100,7 @@ __export(Effect_exports, {
|
|
|
100
100
|
fromOption: () => fromOption5,
|
|
101
101
|
fromResult: () => fromResult2,
|
|
102
102
|
gen: () => gen4,
|
|
103
|
+
head: () => head3,
|
|
103
104
|
ignore: () => ignore2,
|
|
104
105
|
ignoreCause: () => ignoreCause2,
|
|
105
106
|
interrupt: () => interrupt2,
|
|
@@ -248,7 +249,7 @@ __export(Effect_exports, {
|
|
|
248
249
|
zipWith: () => zipWith4
|
|
249
250
|
});
|
|
250
251
|
|
|
251
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
252
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Pipeable.js
|
|
252
253
|
var pipeArguments = (self, args2) => {
|
|
253
254
|
switch (args2.length) {
|
|
254
255
|
case 0:
|
|
@@ -292,7 +293,7 @@ var Class = /* @__PURE__ */ (function() {
|
|
|
292
293
|
return PipeableBase;
|
|
293
294
|
})();
|
|
294
295
|
|
|
295
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
296
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Function.js
|
|
296
297
|
var dual = function(arity, body) {
|
|
297
298
|
if (typeof arity === "function") {
|
|
298
299
|
return function() {
|
|
@@ -365,7 +366,7 @@ function memoizeIdempotent(f) {
|
|
|
365
366
|
};
|
|
366
367
|
}
|
|
367
368
|
|
|
368
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
369
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/equal.js
|
|
369
370
|
var getAllObjectKeys = (obj) => {
|
|
370
371
|
const keys2 = new Set(Reflect.ownKeys(obj));
|
|
371
372
|
if (obj.constructor === Object) return keys2;
|
|
@@ -388,7 +389,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
388
389
|
};
|
|
389
390
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
390
391
|
|
|
391
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
392
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Predicate.js
|
|
392
393
|
function isString(input) {
|
|
393
394
|
return typeof input === "string";
|
|
394
395
|
}
|
|
@@ -422,7 +423,7 @@ function isIterable(input) {
|
|
|
422
423
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
423
424
|
}
|
|
424
425
|
|
|
425
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
426
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Hash.js
|
|
426
427
|
var symbol = "~effect/interfaces/Hash";
|
|
427
428
|
var hash = (self) => {
|
|
428
429
|
switch (typeof self) {
|
|
@@ -546,7 +547,7 @@ function withVisitedTracking(obj, fn3) {
|
|
|
546
547
|
return result3;
|
|
547
548
|
}
|
|
548
549
|
|
|
549
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
550
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equal.js
|
|
550
551
|
var symbol2 = "~effect/interfaces/Equal";
|
|
551
552
|
function equals() {
|
|
552
553
|
if (arguments.length === 1) {
|
|
@@ -743,7 +744,7 @@ var byReferenceUnsafe = (obj) => {
|
|
|
743
744
|
return obj;
|
|
744
745
|
};
|
|
745
746
|
|
|
746
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
747
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Redactable.js
|
|
747
748
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
748
749
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
749
750
|
function redact(u) {
|
|
@@ -765,7 +766,7 @@ var emptyContext = {
|
|
|
765
766
|
}
|
|
766
767
|
};
|
|
767
768
|
|
|
768
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
769
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Formatter.js
|
|
769
770
|
function format(input, options) {
|
|
770
771
|
const space = options?.space ?? 0;
|
|
771
772
|
const ancestors = /* @__PURE__ */ new WeakSet();
|
|
@@ -866,7 +867,7 @@ function formatJson(input, options) {
|
|
|
866
867
|
}, options?.space) ?? "null";
|
|
867
868
|
}
|
|
868
869
|
|
|
869
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
870
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Inspectable.js
|
|
870
871
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
871
872
|
var toJson = (input) => {
|
|
872
873
|
try {
|
|
@@ -933,7 +934,7 @@ var Class2 = class {
|
|
|
933
934
|
}
|
|
934
935
|
};
|
|
935
936
|
|
|
936
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
937
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Utils.js
|
|
937
938
|
var SingleShotGen = class _SingleShotGen {
|
|
938
939
|
called = false;
|
|
939
940
|
self;
|
|
@@ -993,7 +994,7 @@ var pickInternalCall = () => {
|
|
|
993
994
|
};
|
|
994
995
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
995
996
|
|
|
996
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
997
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/record.js
|
|
997
998
|
function assignProperty(self, key, value) {
|
|
998
999
|
if (key === "__proto__") {
|
|
999
1000
|
Object.defineProperty(self, key, {
|
|
@@ -1015,7 +1016,7 @@ function assignProperties(self, source) {
|
|
|
1015
1016
|
}
|
|
1016
1017
|
}
|
|
1017
1018
|
|
|
1018
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1019
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/core.js
|
|
1019
1020
|
var EffectTypeId = `~effect/Effect`;
|
|
1020
1021
|
var ExitTypeId = `~effect/Exit`;
|
|
1021
1022
|
var effectVariance = {
|
|
@@ -1375,13 +1376,13 @@ var done = (value) => {
|
|
|
1375
1376
|
return exitFail(Done(value));
|
|
1376
1377
|
};
|
|
1377
1378
|
|
|
1378
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1379
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effectable.js
|
|
1379
1380
|
var Prototype2 = (options) => makePrimitiveProto({
|
|
1380
1381
|
op: options.label,
|
|
1381
1382
|
[evaluate]: options.evaluate
|
|
1382
1383
|
});
|
|
1383
1384
|
|
|
1384
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1385
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
|
|
1385
1386
|
var Option_exports = {};
|
|
1386
1387
|
__export(Option_exports, {
|
|
1387
1388
|
Do: () => Do,
|
|
@@ -1446,14 +1447,14 @@ __export(Option_exports, {
|
|
|
1446
1447
|
zipWith: () => zipWith
|
|
1447
1448
|
});
|
|
1448
1449
|
|
|
1449
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1450
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Combiner.js
|
|
1450
1451
|
function make(combine2) {
|
|
1451
1452
|
return {
|
|
1452
1453
|
combine: combine2
|
|
1453
1454
|
};
|
|
1454
1455
|
}
|
|
1455
1456
|
|
|
1456
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1457
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Reducer.js
|
|
1457
1458
|
function make2(combine2, initialValue, combineAll2) {
|
|
1458
1459
|
return {
|
|
1459
1460
|
combine: combine2,
|
|
@@ -1468,7 +1469,7 @@ function make2(combine2, initialValue, combineAll2) {
|
|
|
1468
1469
|
};
|
|
1469
1470
|
}
|
|
1470
1471
|
|
|
1471
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1472
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Equivalence.js
|
|
1472
1473
|
var make3 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
1473
1474
|
function Array_(item) {
|
|
1474
1475
|
return make3((self, that) => {
|
|
@@ -1480,7 +1481,7 @@ function Array_(item) {
|
|
|
1480
1481
|
});
|
|
1481
1482
|
}
|
|
1482
1483
|
|
|
1483
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1484
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/doNotation.js
|
|
1484
1485
|
var let_ = (map8) => dual(3, (self, name, f) => map8(self, (a) => ({
|
|
1485
1486
|
...a,
|
|
1486
1487
|
[name]: f(a)
|
|
@@ -1493,7 +1494,7 @@ var bind = (map8, flatMap6) => dual(3, (self, name, f) => flatMap6(self, (a) =>
|
|
|
1493
1494
|
[name]: b
|
|
1494
1495
|
}))));
|
|
1495
1496
|
|
|
1496
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1497
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/option.js
|
|
1497
1498
|
var TypeId = "~effect/data/Option";
|
|
1498
1499
|
var CommonProto = {
|
|
1499
1500
|
[TypeId]: {
|
|
@@ -1559,7 +1560,7 @@ var some = (value) => {
|
|
|
1559
1560
|
return a;
|
|
1560
1561
|
};
|
|
1561
1562
|
|
|
1562
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1563
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/result.js
|
|
1563
1564
|
var TypeId2 = "~effect/data/Result";
|
|
1564
1565
|
var CommonProto2 = {
|
|
1565
1566
|
[TypeId2]: {
|
|
@@ -1629,7 +1630,7 @@ var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
|
|
|
1629
1630
|
var getSuccess = (self) => isFailure(self) ? none : some(self.success);
|
|
1630
1631
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
|
|
1631
1632
|
|
|
1632
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1633
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Order.js
|
|
1633
1634
|
function make4(compare) {
|
|
1634
1635
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
1635
1636
|
}
|
|
@@ -1670,7 +1671,7 @@ var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
|
1670
1671
|
var min = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
|
|
1671
1672
|
var max = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
|
|
1672
1673
|
|
|
1673
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1674
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Option.js
|
|
1674
1675
|
var none2 = () => none;
|
|
1675
1676
|
var some2 = some;
|
|
1676
1677
|
var isOption2 = isOption;
|
|
@@ -1848,7 +1849,7 @@ function makeReducerFailFast(reducer2) {
|
|
|
1848
1849
|
});
|
|
1849
1850
|
}
|
|
1850
1851
|
|
|
1851
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
1852
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Context.js
|
|
1852
1853
|
var ServiceTypeId = "~effect/Context/Service";
|
|
1853
1854
|
var Service = function() {
|
|
1854
1855
|
function KeyClass() {
|
|
@@ -1948,13 +1949,13 @@ var lookup = (self, key) => {
|
|
|
1948
1949
|
};
|
|
1949
1950
|
var makeUnsafe = (mapUnsafe) => makeImpl(void 0, mapUnsafe, void 0, 0);
|
|
1950
1951
|
var Proto = {
|
|
1952
|
+
get mapUnsafe() {
|
|
1953
|
+
return flatten2(this);
|
|
1954
|
+
},
|
|
1951
1955
|
...PipeInspectableProto,
|
|
1952
1956
|
[TypeId3]: {
|
|
1953
1957
|
_Services: (_) => _
|
|
1954
1958
|
},
|
|
1955
|
-
get mapUnsafe() {
|
|
1956
|
-
return flatten2(this);
|
|
1957
|
-
},
|
|
1958
1959
|
toJSON() {
|
|
1959
1960
|
return {
|
|
1960
1961
|
_id: "Context",
|
|
@@ -2050,7 +2051,7 @@ var mergeAll = (...ctxs) => {
|
|
|
2050
2051
|
};
|
|
2051
2052
|
var Reference = Service;
|
|
2052
2053
|
|
|
2053
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2054
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Duration.js
|
|
2054
2055
|
var TypeId4 = "~effect/time/Duration";
|
|
2055
2056
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
2056
2057
|
var bigint1 = /* @__PURE__ */ BigInt(1);
|
|
@@ -2317,7 +2318,7 @@ var subtract = /* @__PURE__ */ dual(2, (self, that) => matchPair(self, that, {
|
|
|
2317
2318
|
}));
|
|
2318
2319
|
var equals2 = /* @__PURE__ */ dual(2, (self, that) => Equivalence(self, that));
|
|
2319
2320
|
|
|
2320
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2321
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
|
|
2321
2322
|
var Array_exports = {};
|
|
2322
2323
|
__export(Array_exports, {
|
|
2323
2324
|
Array: () => Array2,
|
|
@@ -2455,10 +2456,10 @@ __export(Array_exports, {
|
|
|
2455
2456
|
zipWith: () => zipWith2
|
|
2456
2457
|
});
|
|
2457
2458
|
|
|
2458
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2459
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/array.js
|
|
2459
2460
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
2460
2461
|
|
|
2461
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2462
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Result.js
|
|
2462
2463
|
var Result_exports = {};
|
|
2463
2464
|
__export(Result_exports, {
|
|
2464
2465
|
Do: () => Do2,
|
|
@@ -2613,10 +2614,10 @@ var tap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
2613
2614
|
return self;
|
|
2614
2615
|
});
|
|
2615
2616
|
|
|
2616
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2617
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tuple.js
|
|
2617
2618
|
var make7 = (...elements) => elements;
|
|
2618
2619
|
|
|
2619
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2620
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Iterable.js
|
|
2620
2621
|
var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
2621
2622
|
let i = 0;
|
|
2622
2623
|
for (const a of self) {
|
|
@@ -2659,7 +2660,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
|
|
|
2659
2660
|
}
|
|
2660
2661
|
}));
|
|
2661
2662
|
|
|
2662
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2663
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Record.js
|
|
2663
2664
|
var empty2 = () => ({});
|
|
2664
2665
|
var isEmptyRecord = (self) => Object.keys(self).length === 0;
|
|
2665
2666
|
var fromEntries = Object.fromEntries;
|
|
@@ -2709,7 +2710,7 @@ var union = /* @__PURE__ */ dual(3, (self, that, combine2) => {
|
|
|
2709
2710
|
return out;
|
|
2710
2711
|
});
|
|
2711
2712
|
|
|
2712
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
2713
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Array.js
|
|
2713
2714
|
var Array2 = globalThis.Array;
|
|
2714
2715
|
var make8 = (...elements) => elements;
|
|
2715
2716
|
var allocate = (n) => new Array2(n);
|
|
@@ -2739,7 +2740,7 @@ var matchRight = /* @__PURE__ */ dual(2, (self, {
|
|
|
2739
2740
|
onEmpty,
|
|
2740
2741
|
onNonEmpty
|
|
2741
2742
|
}) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
|
|
2742
|
-
var prepend = /* @__PURE__ */ dual(2, (self,
|
|
2743
|
+
var prepend = /* @__PURE__ */ dual(2, (self, head4) => [head4, ...self]);
|
|
2743
2744
|
var prependAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(that).concat(fromIterable2(self)));
|
|
2744
2745
|
var append = /* @__PURE__ */ dual(2, (self, last2) => [...self, last2]);
|
|
2745
2746
|
var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(self).concat(fromIterable2(that)));
|
|
@@ -3414,16 +3415,7 @@ var countBy = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
3414
3415
|
return count;
|
|
3415
3416
|
});
|
|
3416
3417
|
|
|
3417
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3418
|
-
var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
3419
|
-
const leftOut = left(input);
|
|
3420
|
-
if (isFailure2(leftOut)) return fail2(input);
|
|
3421
|
-
const rightOut = right(leftOut.success);
|
|
3422
|
-
if (isFailure2(rightOut)) return fail2(input);
|
|
3423
|
-
return rightOut;
|
|
3424
|
-
});
|
|
3425
|
-
|
|
3426
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Scheduler.js
|
|
3418
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scheduler.js
|
|
3427
3419
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
3428
3420
|
fiberCached: true,
|
|
3429
3421
|
defaultValue: () => new MixedScheduler()
|
|
@@ -3560,7 +3552,114 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
3560
3552
|
defaultValue: () => false
|
|
3561
3553
|
});
|
|
3562
3554
|
|
|
3563
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3555
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Data.js
|
|
3556
|
+
var TaggedError2 = TaggedError;
|
|
3557
|
+
|
|
3558
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Encoding.js
|
|
3559
|
+
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
3560
|
+
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
3561
|
+
/**
|
|
3562
|
+
* Marks this value as an encoding or decoding error for runtime guards.
|
|
3563
|
+
*
|
|
3564
|
+
* **When to use**
|
|
3565
|
+
*
|
|
3566
|
+
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
3567
|
+
*
|
|
3568
|
+
* @since 4.0.0
|
|
3569
|
+
*/
|
|
3570
|
+
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
3571
|
+
};
|
|
3572
|
+
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
3573
|
+
var decodeBase64 = (str) => {
|
|
3574
|
+
const stripped = stripCrlf(str);
|
|
3575
|
+
const length2 = stripped.length;
|
|
3576
|
+
if (length2 % 4 !== 0) {
|
|
3577
|
+
return fail2(new EncodingError({
|
|
3578
|
+
kind: "Decode",
|
|
3579
|
+
module: "Base64",
|
|
3580
|
+
input: stripped,
|
|
3581
|
+
message: `Length must be a multiple of 4, but is ${length2}`
|
|
3582
|
+
}));
|
|
3583
|
+
}
|
|
3584
|
+
const index = stripped.indexOf("=");
|
|
3585
|
+
if (index !== -1 && (index < length2 - 2 || index === length2 - 2 && stripped[length2 - 1] !== "=")) {
|
|
3586
|
+
return fail2(new EncodingError({
|
|
3587
|
+
kind: "Decode",
|
|
3588
|
+
module: "Base64",
|
|
3589
|
+
input: stripped,
|
|
3590
|
+
message: `Found a '=' character, but it is not at the end`
|
|
3591
|
+
}));
|
|
3592
|
+
}
|
|
3593
|
+
try {
|
|
3594
|
+
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
3595
|
+
const result3 = new Uint8Array(3 * (length2 / 4) - missingOctets);
|
|
3596
|
+
for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
|
|
3597
|
+
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
3598
|
+
result3[j] = buffer >> 16;
|
|
3599
|
+
result3[j + 1] = buffer >> 8 & 255;
|
|
3600
|
+
result3[j + 2] = buffer & 255;
|
|
3601
|
+
}
|
|
3602
|
+
return succeed2(result3);
|
|
3603
|
+
} catch (e) {
|
|
3604
|
+
return fail2(new EncodingError({
|
|
3605
|
+
kind: "Decode",
|
|
3606
|
+
module: "Base64",
|
|
3607
|
+
input: stripped,
|
|
3608
|
+
message: e instanceof Error ? e.message : "Invalid input"
|
|
3609
|
+
}));
|
|
3610
|
+
}
|
|
3611
|
+
};
|
|
3612
|
+
var randomHex = (length2) => {
|
|
3613
|
+
let result3 = "";
|
|
3614
|
+
for (let i = length2 >>> 3; i > 0; i--) {
|
|
3615
|
+
const word = Math.random() * 4294967296 >>> 0;
|
|
3616
|
+
result3 += byteToHex[word >>> 24] + byteToHex[word >>> 16 & 255] + byteToHex[word >>> 8 & 255] + byteToHex[word & 255];
|
|
3617
|
+
}
|
|
3618
|
+
return result3;
|
|
3619
|
+
};
|
|
3620
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
3621
|
+
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
3622
|
+
var base64EncodeUint8Array = (bytes) => {
|
|
3623
|
+
const length2 = bytes.length;
|
|
3624
|
+
let result3 = "";
|
|
3625
|
+
let i;
|
|
3626
|
+
for (i = 2; i < length2; i += 3) {
|
|
3627
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
3628
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
3629
|
+
result3 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
3630
|
+
result3 += base64abc[bytes[i] & 63];
|
|
3631
|
+
}
|
|
3632
|
+
if (i === length2 + 1) {
|
|
3633
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
3634
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
3635
|
+
result3 += "==";
|
|
3636
|
+
}
|
|
3637
|
+
if (i === length2) {
|
|
3638
|
+
result3 += base64abc[bytes[i - 2] >> 2];
|
|
3639
|
+
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
3640
|
+
result3 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
3641
|
+
result3 += "=";
|
|
3642
|
+
}
|
|
3643
|
+
return result3;
|
|
3644
|
+
};
|
|
3645
|
+
function getBase64Code(charCode) {
|
|
3646
|
+
if (charCode >= base64codes.length) {
|
|
3647
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
3648
|
+
}
|
|
3649
|
+
const code = base64codes[charCode];
|
|
3650
|
+
if (code === 255) {
|
|
3651
|
+
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
3652
|
+
}
|
|
3653
|
+
return code;
|
|
3654
|
+
}
|
|
3655
|
+
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", "+", "/"];
|
|
3656
|
+
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];
|
|
3657
|
+
var byteToHex = [];
|
|
3658
|
+
for (let i = 0; i < 256; i++) {
|
|
3659
|
+
byteToHex.push(i.toString(16).padStart(2, "0"));
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Tracer.js
|
|
3564
3663
|
var ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
3565
3664
|
var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
|
|
3566
3665
|
fiberCached: true
|
|
@@ -3610,8 +3709,8 @@ var NativeSpan = class {
|
|
|
3610
3709
|
startTime: options.startTime
|
|
3611
3710
|
};
|
|
3612
3711
|
this.attributes = /* @__PURE__ */ new Map();
|
|
3613
|
-
this.traceId = getOrUndefined(options.parent)?.traceId ??
|
|
3614
|
-
this.spanId =
|
|
3712
|
+
this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHex(32);
|
|
3713
|
+
this.spanId = randomHex(16);
|
|
3615
3714
|
}
|
|
3616
3715
|
end(endTime, exit3) {
|
|
3617
3716
|
this.status = {
|
|
@@ -3631,22 +3730,11 @@ var NativeSpan = class {
|
|
|
3631
3730
|
this.links.push(...links);
|
|
3632
3731
|
}
|
|
3633
3732
|
};
|
|
3634
|
-
var randomHexString = /* @__PURE__ */ (function() {
|
|
3635
|
-
const characters = "abcdef0123456789";
|
|
3636
|
-
const charactersLength = characters.length;
|
|
3637
|
-
return function(length2) {
|
|
3638
|
-
let result3 = "";
|
|
3639
|
-
for (let i = 0; i < length2; i++) {
|
|
3640
|
-
result3 += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
3641
|
-
}
|
|
3642
|
-
return result3;
|
|
3643
|
-
};
|
|
3644
|
-
})();
|
|
3645
3733
|
|
|
3646
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3734
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/metric.js
|
|
3647
3735
|
var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
|
|
3648
3736
|
|
|
3649
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3737
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/references.js
|
|
3650
3738
|
var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
|
|
3651
3739
|
defaultValue: () => /* @__PURE__ */ new Set()
|
|
3652
3740
|
});
|
|
@@ -3681,7 +3769,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
3681
3769
|
defaultValue: () => []
|
|
3682
3770
|
});
|
|
3683
3771
|
|
|
3684
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3772
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
3685
3773
|
var isStackTraceLimitWritable = () => {
|
|
3686
3774
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
3687
3775
|
if (desc === void 0) {
|
|
@@ -3698,7 +3786,7 @@ var setStackTraceLimit = (value) => {
|
|
|
3698
3786
|
}
|
|
3699
3787
|
};
|
|
3700
3788
|
|
|
3701
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3789
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/tracer.js
|
|
3702
3790
|
var addSpanStackTrace = (options) => {
|
|
3703
3791
|
if (options?.captureStackTrace === false) {
|
|
3704
3792
|
return options;
|
|
@@ -3729,7 +3817,7 @@ var makeStackCleaner = (line) => (stack) => {
|
|
|
3729
3817
|
};
|
|
3730
3818
|
var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
|
|
3731
3819
|
|
|
3732
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
3820
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/effect.js
|
|
3733
3821
|
var Interrupt = class extends ReasonBase {
|
|
3734
3822
|
fiberId;
|
|
3735
3823
|
constructor(fiberId3, annotations = constEmptyAnnotations) {
|
|
@@ -4030,6 +4118,7 @@ var FiberImpl = class {
|
|
|
4030
4118
|
}
|
|
4031
4119
|
this._observers.push(cb);
|
|
4032
4120
|
return () => {
|
|
4121
|
+
if (this._exit) return;
|
|
4033
4122
|
const index = this._observers.indexOf(cb);
|
|
4034
4123
|
if (index >= 0) {
|
|
4035
4124
|
this._observers.splice(index, 1);
|
|
@@ -4408,7 +4497,7 @@ var fn = function() {
|
|
|
4408
4497
|
return makeFn(name, arguments[0], defError, Array.prototype.slice.call(arguments, 1), nameFirst, spanOptions);
|
|
4409
4498
|
};
|
|
4410
4499
|
var makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
|
|
4411
|
-
const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.
|
|
4500
|
+
const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
|
|
4412
4501
|
return defineFunctionLength(body.length, function(...args2) {
|
|
4413
4502
|
let result3 = suspend(() => {
|
|
4414
4503
|
const iter = body.apply(this, arguments);
|
|
@@ -4953,17 +5042,20 @@ var scopeCloseUnsafe = (self, exit_) => {
|
|
|
4953
5042
|
self.state = closed;
|
|
4954
5043
|
return;
|
|
4955
5044
|
}
|
|
4956
|
-
const
|
|
4957
|
-
finalizers
|
|
4958
|
-
} = self.state;
|
|
5045
|
+
const state = self.state;
|
|
4959
5046
|
self.state = closed;
|
|
4960
|
-
if (
|
|
5047
|
+
if (state.finalizer !== void 0) {
|
|
5048
|
+
return state.finalizer(exit_);
|
|
5049
|
+
}
|
|
5050
|
+
const finalizers = state.finalizers;
|
|
5051
|
+
if (finalizers === void 0 || finalizers.size === 0) {
|
|
4961
5052
|
return;
|
|
4962
5053
|
} else if (finalizers.size === 1) {
|
|
4963
5054
|
return finalizers.values().next().value(exit_);
|
|
4964
5055
|
}
|
|
4965
5056
|
return scopeCloseFinalizers(self, finalizers, exit_);
|
|
4966
5057
|
};
|
|
5058
|
+
var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause(causeCombine(exit_.cause, cause)));
|
|
4967
5059
|
var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced(function* (self, finalizers, exit_) {
|
|
4968
5060
|
let exits = [];
|
|
4969
5061
|
const fibers = [];
|
|
@@ -5006,15 +5098,34 @@ var scopeAddFinalizerUnsafe = (scope3, key, finalizer) => {
|
|
|
5006
5098
|
if (scope3.state._tag === "Empty") {
|
|
5007
5099
|
scope3.state = {
|
|
5008
5100
|
_tag: "Open",
|
|
5009
|
-
|
|
5101
|
+
finalizerKey: key,
|
|
5102
|
+
finalizer,
|
|
5103
|
+
finalizers: void 0
|
|
5010
5104
|
};
|
|
5011
5105
|
} else if (scope3.state._tag === "Open") {
|
|
5012
|
-
scope3.state
|
|
5106
|
+
const state = scope3.state;
|
|
5107
|
+
if (state.finalizer !== void 0) {
|
|
5108
|
+
state.finalizers = /* @__PURE__ */ new Map([[state.finalizerKey, state.finalizer]]);
|
|
5109
|
+
state.finalizerKey = void 0;
|
|
5110
|
+
state.finalizer = void 0;
|
|
5111
|
+
state.finalizers.set(key, finalizer);
|
|
5112
|
+
} else if (state.finalizers === void 0) {
|
|
5113
|
+
state.finalizerKey = key;
|
|
5114
|
+
state.finalizer = finalizer;
|
|
5115
|
+
} else {
|
|
5116
|
+
state.finalizers.set(key, finalizer);
|
|
5117
|
+
}
|
|
5013
5118
|
}
|
|
5014
5119
|
};
|
|
5015
5120
|
var scopeRemoveFinalizerUnsafe = (scope3, key) => {
|
|
5016
5121
|
if (scope3.state._tag === "Open") {
|
|
5017
|
-
scope3.state
|
|
5122
|
+
const state = scope3.state;
|
|
5123
|
+
if (state.finalizerKey === key) {
|
|
5124
|
+
state.finalizerKey = void 0;
|
|
5125
|
+
state.finalizer = void 0;
|
|
5126
|
+
} else if (state.finalizers !== void 0) {
|
|
5127
|
+
state.finalizers.delete(key);
|
|
5128
|
+
}
|
|
5018
5129
|
}
|
|
5019
5130
|
};
|
|
5020
5131
|
var scopeMakeUnsafe = (finalizerStrategy = "sequential") => ({
|
|
@@ -5063,7 +5174,7 @@ var onExitPrimitive = /* @__PURE__ */ makePrimitive({
|
|
|
5063
5174
|
[contE](cause, _, exit3) {
|
|
5064
5175
|
exit3 ??= exitFailCause(cause);
|
|
5065
5176
|
const eff = this[args][1](exit3);
|
|
5066
|
-
return eff ? flatMap4(eff, (_2) => exit3) : exit3;
|
|
5177
|
+
return eff ? flatMap4(combineFinalizerCause(exit3, eff), (_2) => exit3) : exit3;
|
|
5067
5178
|
}
|
|
5068
5179
|
});
|
|
5069
5180
|
var onExit = /* @__PURE__ */ dual(2, onExitPrimitive);
|
|
@@ -5279,6 +5390,10 @@ var forEach2 = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (
|
|
|
5279
5390
|
});
|
|
5280
5391
|
return eff ? as2(eff, out) : succeed3(out);
|
|
5281
5392
|
}));
|
|
5393
|
+
var head2 = (self) => flatMap4(self, (elements) => {
|
|
5394
|
+
const result3 = elements[Symbol.iterator]().next();
|
|
5395
|
+
return result3.done ? fail3(new NoSuchElementError()) : succeed3(result3.value);
|
|
5396
|
+
});
|
|
5282
5397
|
var forEachSequential = (iterable, f, options) => suspend(() => {
|
|
5283
5398
|
const out = options?.discard ? void 0 : [];
|
|
5284
5399
|
const iterator = iterable[Symbol.iterator]();
|
|
@@ -5314,7 +5429,7 @@ var iterateEagerImpl = (options) => {
|
|
|
5314
5429
|
if (concurrency === 1) {
|
|
5315
5430
|
return runSequential(state, items, 0, end);
|
|
5316
5431
|
}
|
|
5317
|
-
const orderedStep = opts?.orderedStep === true
|
|
5432
|
+
const orderedStep = opts?.orderedStep === true;
|
|
5318
5433
|
let done4 = false;
|
|
5319
5434
|
let parentFiber;
|
|
5320
5435
|
let fibers;
|
|
@@ -5755,7 +5870,7 @@ var makeSpanUnsafe = (fiber3, name, options) => {
|
|
|
5755
5870
|
const annotationsFromEnv = fiber3.getRef(TracerSpanAnnotations);
|
|
5756
5871
|
const linksFromEnv = fiber3.getRef(TracerSpanLinks);
|
|
5757
5872
|
const level = options?.level ?? fiber3.getRef(CurrentTraceLevel);
|
|
5758
|
-
const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.slice();
|
|
5873
|
+
const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.length === 0 ? [] : linksFromEnv.slice();
|
|
5759
5874
|
span2 = tracer3.span({
|
|
5760
5875
|
name,
|
|
5761
5876
|
parent,
|
|
@@ -5766,12 +5881,12 @@ var makeSpanUnsafe = (fiber3, name, options) => {
|
|
|
5766
5881
|
root: options?.root ?? isNone2(parent),
|
|
5767
5882
|
sampled: options?.sampled ?? (isSome2(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber3.getRef(MinimumTraceLevel), level))
|
|
5768
5883
|
});
|
|
5769
|
-
for (const
|
|
5770
|
-
span2.attribute(key,
|
|
5884
|
+
for (const key in annotationsFromEnv) {
|
|
5885
|
+
span2.attribute(key, annotationsFromEnv[key]);
|
|
5771
5886
|
}
|
|
5772
5887
|
if (options?.attributes !== void 0) {
|
|
5773
|
-
for (const
|
|
5774
|
-
span2.attribute(key,
|
|
5888
|
+
for (const key in options.attributes) {
|
|
5889
|
+
span2.attribute(key, options.attributes[key]);
|
|
5775
5890
|
}
|
|
5776
5891
|
}
|
|
5777
5892
|
}
|
|
@@ -6213,14 +6328,14 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
|
|
|
6213
6328
|
reporters.forEach((reporter) => reporter.report(opts));
|
|
6214
6329
|
};
|
|
6215
6330
|
|
|
6216
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6331
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Exit.js
|
|
6217
6332
|
var succeed4 = exitSucceed;
|
|
6218
6333
|
var failCause2 = exitFailCause;
|
|
6219
6334
|
var fail4 = exitFail;
|
|
6220
6335
|
var void_4 = exitVoid;
|
|
6221
6336
|
var isSuccess4 = exitIsSuccess;
|
|
6222
6337
|
|
|
6223
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6338
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Deferred.js
|
|
6224
6339
|
var TypeId5 = "~effect/Deferred";
|
|
6225
6340
|
var DeferredProto = {
|
|
6226
6341
|
[TypeId5]: {
|
|
@@ -6254,24 +6369,25 @@ var doneUnsafe = (self, effect) => {
|
|
|
6254
6369
|
if (self.effect) return false;
|
|
6255
6370
|
self.effect = effect;
|
|
6256
6371
|
if (self.resumes) {
|
|
6257
|
-
|
|
6258
|
-
self.resumes[i](effect);
|
|
6259
|
-
}
|
|
6372
|
+
const resumes = self.resumes;
|
|
6260
6373
|
self.resumes = void 0;
|
|
6374
|
+
for (let i = 0; i < resumes.length; i++) {
|
|
6375
|
+
resumes[i](effect);
|
|
6376
|
+
}
|
|
6261
6377
|
}
|
|
6262
6378
|
return true;
|
|
6263
6379
|
};
|
|
6264
6380
|
|
|
6265
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6381
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/References.js
|
|
6266
6382
|
var CurrentLogAnnotations2 = CurrentLogAnnotations;
|
|
6267
6383
|
var CurrentLogSpans2 = CurrentLogSpans;
|
|
6268
6384
|
|
|
6269
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6385
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Scope.js
|
|
6270
6386
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
6271
6387
|
var forkUnsafe2 = scopeForkUnsafe;
|
|
6272
6388
|
var close = scopeClose;
|
|
6273
6389
|
|
|
6274
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6390
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Layer.js
|
|
6275
6391
|
var TypeId6 = "~effect/Layer";
|
|
6276
6392
|
var MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
6277
6393
|
var memoMapReuse = (entry, scope3) => {
|
|
@@ -6366,7 +6482,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
|
|
|
6366
6482
|
var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap4(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context3) => self.build(memoMap, scope3).pipe(provideContext(context3), map5((merged) => f(merged, context3)))));
|
|
6367
6483
|
var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
|
|
6368
6484
|
|
|
6369
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6485
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/ExecutionPlan.js
|
|
6370
6486
|
var TypeId7 = "~effect/ExecutionPlan";
|
|
6371
6487
|
var Proto2 = {
|
|
6372
6488
|
[TypeId7]: TypeId7,
|
|
@@ -6393,20 +6509,33 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
|
|
|
6393
6509
|
})
|
|
6394
6510
|
});
|
|
6395
6511
|
|
|
6396
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6512
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Cause.js
|
|
6397
6513
|
var isFailReason2 = isFailReason;
|
|
6514
|
+
var fromReasons = causeFromReasons;
|
|
6398
6515
|
var map6 = causeMap;
|
|
6399
|
-
var findError2 = findError;
|
|
6400
6516
|
var isDone2 = isDone;
|
|
6401
6517
|
var done3 = done;
|
|
6402
6518
|
|
|
6403
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6404
|
-
var TaggedError2 = TaggedError;
|
|
6405
|
-
|
|
6406
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Pull.js
|
|
6519
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Pull.js
|
|
6407
6520
|
var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
6408
|
-
var
|
|
6409
|
-
var
|
|
6521
|
+
var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
|
|
6522
|
+
var filterDone = (cause) => {
|
|
6523
|
+
let done4;
|
|
6524
|
+
let hasFailure = false;
|
|
6525
|
+
for (const reason of cause.reasons) {
|
|
6526
|
+
if (isDoneFailure(reason)) {
|
|
6527
|
+
done4 ??= reason.error;
|
|
6528
|
+
} else if (reason._tag !== "Interrupt") {
|
|
6529
|
+
hasFailure = true;
|
|
6530
|
+
}
|
|
6531
|
+
}
|
|
6532
|
+
if (done4 === void 0) return fail2(cause);
|
|
6533
|
+
return hasFailure ? fail2(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed2(done4);
|
|
6534
|
+
};
|
|
6535
|
+
var filterDoneLeftover = (cause) => {
|
|
6536
|
+
const done4 = filterDone(cause);
|
|
6537
|
+
return isFailure2(done4) ? done4 : succeed2(done4.success.value);
|
|
6538
|
+
};
|
|
6410
6539
|
var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
|
|
6411
6540
|
onSuccess: options.onSuccess,
|
|
6412
6541
|
onFailure: (cause) => {
|
|
@@ -6415,7 +6544,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
|
|
|
6415
6544
|
}
|
|
6416
6545
|
}));
|
|
6417
6546
|
|
|
6418
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6547
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schedule.js
|
|
6419
6548
|
var TypeId8 = "~effect/Schedule";
|
|
6420
6549
|
var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
|
|
6421
6550
|
defaultValue: /* @__PURE__ */ constant({
|
|
@@ -6507,11 +6636,11 @@ var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map5(toStep(s
|
|
|
6507
6636
|
})));
|
|
6508
6637
|
var forever2 = /* @__PURE__ */ spaced(zero);
|
|
6509
6638
|
|
|
6510
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6639
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/layer.js
|
|
6511
6640
|
var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
|
|
6512
6641
|
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));
|
|
6513
6642
|
|
|
6514
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6643
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schedule.js
|
|
6515
6644
|
var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse3) => flatMap4(toStepWithMetadata(schedule2), (step) => {
|
|
6516
6645
|
let meta2 = CurrentMetadata2.defaultValue();
|
|
6517
6646
|
return catch_(forever(tap3(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta2)), step), (meta_) => sync(() => {
|
|
@@ -6582,7 +6711,7 @@ var buildFromOptions = (options) => {
|
|
|
6582
6711
|
return schedule2;
|
|
6583
6712
|
};
|
|
6584
6713
|
|
|
6585
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6714
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/executionPlan.js
|
|
6586
6715
|
var makeEventEmitter = (onEvent, currentMetadata) => {
|
|
6587
6716
|
let lastStepIndex = -1;
|
|
6588
6717
|
let stepAttempt = 0;
|
|
@@ -6687,7 +6816,7 @@ var scheduleFromStep = (step, first) => {
|
|
|
6687
6816
|
};
|
|
6688
6817
|
var scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
6689
6818
|
|
|
6690
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6819
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Request.js
|
|
6691
6820
|
var TypeId9 = "~effect/Request";
|
|
6692
6821
|
var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
6693
6822
|
/* c8 ignore next */
|
|
@@ -6703,7 +6832,7 @@ var RequestPrototype = {
|
|
|
6703
6832
|
};
|
|
6704
6833
|
var makeEntry = (options) => options;
|
|
6705
6834
|
|
|
6706
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6835
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/request.js
|
|
6707
6836
|
var request = /* @__PURE__ */ dual(2, (self, resolver) => {
|
|
6708
6837
|
const withResolver = (resolver2) => callback((resume) => {
|
|
6709
6838
|
const entry = addEntry(resolver2, self, resume, getCurrentFiber());
|
|
@@ -6813,7 +6942,7 @@ function runBatch(batch) {
|
|
|
6813
6942
|
return batch.run;
|
|
6814
6943
|
}
|
|
6815
6944
|
|
|
6816
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
6945
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Metric.js
|
|
6817
6946
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
6818
6947
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
6819
6948
|
defaultValue: () => ({})
|
|
@@ -6913,7 +7042,7 @@ function attributesToRecord(attributes) {
|
|
|
6913
7042
|
return attributes;
|
|
6914
7043
|
}
|
|
6915
7044
|
|
|
6916
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7045
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Effect.js
|
|
6917
7046
|
var TypeId11 = EffectTypeId;
|
|
6918
7047
|
var isEffect2 = isEffect;
|
|
6919
7048
|
var all4 = all3;
|
|
@@ -6923,6 +7052,7 @@ var validate2 = validate;
|
|
|
6923
7052
|
var findFirst4 = findFirst3;
|
|
6924
7053
|
var findFirstFilter2 = findFirstFilter;
|
|
6925
7054
|
var forEach3 = forEach2;
|
|
7055
|
+
var head3 = head2;
|
|
6926
7056
|
var whileLoop2 = whileLoop;
|
|
6927
7057
|
var promise2 = promise;
|
|
6928
7058
|
var tryPromise2 = tryPromise;
|
|
@@ -7269,7 +7399,7 @@ var flatMapEager2 = flatMapEager;
|
|
|
7269
7399
|
var catchEager2 = catchEager;
|
|
7270
7400
|
var fnUntracedEager2 = fnUntracedEager;
|
|
7271
7401
|
|
|
7272
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.
|
|
7402
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.112/node_modules/effect-oxlint/dist/RuleContext.js
|
|
7273
7403
|
var RuleContextBase = Service()("effect-oxlint/RuleContext");
|
|
7274
7404
|
var RuleContext = class extends RuleContextBase {
|
|
7275
7405
|
};
|
|
@@ -7290,99 +7420,7 @@ service2(RuleContext).pipe(map7((ctx) => ctx.sourceCode));
|
|
|
7290
7420
|
service2(RuleContext).pipe(map7((ctx) => ctx.sourceCode.text));
|
|
7291
7421
|
service2(RuleContext).pipe(map7((ctx) => ctx.sourceCode.ast));
|
|
7292
7422
|
|
|
7293
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7294
|
-
var EncodingErrorTypeId = "~effect/encoding/EncodingError";
|
|
7295
|
-
var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
|
|
7296
|
-
/**
|
|
7297
|
-
* Marks this value as an encoding or decoding error for runtime guards.
|
|
7298
|
-
*
|
|
7299
|
-
* **When to use**
|
|
7300
|
-
*
|
|
7301
|
-
* Use to identify `EncodingError` instances through `isEncodingError`.
|
|
7302
|
-
*
|
|
7303
|
-
* @since 4.0.0
|
|
7304
|
-
*/
|
|
7305
|
-
[EncodingErrorTypeId] = EncodingErrorTypeId;
|
|
7306
|
-
};
|
|
7307
|
-
var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
|
|
7308
|
-
var decodeBase64 = (str) => {
|
|
7309
|
-
const stripped = stripCrlf(str);
|
|
7310
|
-
const length2 = stripped.length;
|
|
7311
|
-
if (length2 % 4 !== 0) {
|
|
7312
|
-
return fail2(new EncodingError({
|
|
7313
|
-
kind: "Decode",
|
|
7314
|
-
module: "Base64",
|
|
7315
|
-
input: stripped,
|
|
7316
|
-
message: `Length must be a multiple of 4, but is ${length2}`
|
|
7317
|
-
}));
|
|
7318
|
-
}
|
|
7319
|
-
const index = stripped.indexOf("=");
|
|
7320
|
-
if (index !== -1 && (index < length2 - 2 || index === length2 - 2 && stripped[length2 - 1] !== "=")) {
|
|
7321
|
-
return fail2(new EncodingError({
|
|
7322
|
-
kind: "Decode",
|
|
7323
|
-
module: "Base64",
|
|
7324
|
-
input: stripped,
|
|
7325
|
-
message: `Found a '=' character, but it is not at the end`
|
|
7326
|
-
}));
|
|
7327
|
-
}
|
|
7328
|
-
try {
|
|
7329
|
-
const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
|
|
7330
|
-
const result3 = new Uint8Array(3 * (length2 / 4) - missingOctets);
|
|
7331
|
-
for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
|
|
7332
|
-
const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
|
|
7333
|
-
result3[j] = buffer >> 16;
|
|
7334
|
-
result3[j + 1] = buffer >> 8 & 255;
|
|
7335
|
-
result3[j + 2] = buffer & 255;
|
|
7336
|
-
}
|
|
7337
|
-
return succeed2(result3);
|
|
7338
|
-
} catch (e) {
|
|
7339
|
-
return fail2(new EncodingError({
|
|
7340
|
-
kind: "Decode",
|
|
7341
|
-
module: "Base64",
|
|
7342
|
-
input: stripped,
|
|
7343
|
-
message: e instanceof Error ? e.message : "Invalid input"
|
|
7344
|
-
}));
|
|
7345
|
-
}
|
|
7346
|
-
};
|
|
7347
|
-
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
7348
|
-
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
7349
|
-
var base64EncodeUint8Array = (bytes) => {
|
|
7350
|
-
const length2 = bytes.length;
|
|
7351
|
-
let result3 = "";
|
|
7352
|
-
let i;
|
|
7353
|
-
for (i = 2; i < length2; i += 3) {
|
|
7354
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
7355
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
7356
|
-
result3 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
7357
|
-
result3 += base64abc[bytes[i] & 63];
|
|
7358
|
-
}
|
|
7359
|
-
if (i === length2 + 1) {
|
|
7360
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
7361
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4];
|
|
7362
|
-
result3 += "==";
|
|
7363
|
-
}
|
|
7364
|
-
if (i === length2) {
|
|
7365
|
-
result3 += base64abc[bytes[i - 2] >> 2];
|
|
7366
|
-
result3 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
7367
|
-
result3 += base64abc[(bytes[i - 1] & 15) << 2];
|
|
7368
|
-
result3 += "=";
|
|
7369
|
-
}
|
|
7370
|
-
return result3;
|
|
7371
|
-
};
|
|
7372
|
-
function getBase64Code(charCode) {
|
|
7373
|
-
if (charCode >= base64codes.length) {
|
|
7374
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
7375
|
-
}
|
|
7376
|
-
const code = base64codes[charCode];
|
|
7377
|
-
if (code === 255) {
|
|
7378
|
-
throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
|
|
7379
|
-
}
|
|
7380
|
-
return code;
|
|
7381
|
-
}
|
|
7382
|
-
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", "+", "/"];
|
|
7383
|
-
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];
|
|
7384
|
-
|
|
7385
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/annotations.js
|
|
7423
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/annotations.js
|
|
7386
7424
|
function resolve(ast) {
|
|
7387
7425
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
7388
7426
|
}
|
|
@@ -7395,7 +7433,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
7395
7433
|
return ast.getExpected(getExpected);
|
|
7396
7434
|
});
|
|
7397
7435
|
|
|
7398
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7436
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/parser.js
|
|
7399
7437
|
var missing = /* @__PURE__ */ Symbol();
|
|
7400
7438
|
var succeed6 = succeed4;
|
|
7401
7439
|
var missingExit = /* @__PURE__ */ succeed6(missing);
|
|
@@ -7403,7 +7441,7 @@ var sameExit = /* @__PURE__ */ succeed6(missing);
|
|
|
7403
7441
|
var toOption = (value) => value === missing ? none2() : some2(value);
|
|
7404
7442
|
var fromOptionExit = (option3) => option3._tag === "None" ? missingExit : succeed6(option3.value);
|
|
7405
7443
|
|
|
7406
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7444
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaIssue.js
|
|
7407
7445
|
var TypeId12 = "~effect/SchemaIssue/Issue";
|
|
7408
7446
|
function isIssue(u) {
|
|
7409
7447
|
return hasProperty(u, TypeId12) && u[TypeId12] === TypeId12;
|
|
@@ -7686,7 +7724,7 @@ function findMessage(issue) {
|
|
|
7686
7724
|
if (typeof message === "string") return message;
|
|
7687
7725
|
}
|
|
7688
7726
|
|
|
7689
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7727
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/cause.js
|
|
7690
7728
|
function getSchemaIssue(cause) {
|
|
7691
7729
|
let issue;
|
|
7692
7730
|
for (const reason of cause.reasons) {
|
|
@@ -7707,7 +7745,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
7707
7745
|
return issue;
|
|
7708
7746
|
}
|
|
7709
7747
|
|
|
7710
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7748
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaGetter.js
|
|
7711
7749
|
var Getter = class _Getter extends Class {
|
|
7712
7750
|
run;
|
|
7713
7751
|
constructor(run2) {
|
|
@@ -7767,7 +7805,7 @@ function decodeBase642() {
|
|
|
7767
7805
|
}, input, options)));
|
|
7768
7806
|
}
|
|
7769
7807
|
|
|
7770
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7808
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaTransformation.js
|
|
7771
7809
|
var TypeId13 = "~effect/SchemaTransformation/Transformation";
|
|
7772
7810
|
var Transformation = class _Transformation {
|
|
7773
7811
|
[TypeId13] = TypeId13;
|
|
@@ -7813,7 +7851,7 @@ var urlFromString = /* @__PURE__ */ transformOrFail2({
|
|
|
7813
7851
|
});
|
|
7814
7852
|
var uint8ArrayFromBase64String = /* @__PURE__ */ new Transformation(/* @__PURE__ */ decodeBase642(), /* @__PURE__ */ encodeBase642());
|
|
7815
7853
|
|
|
7816
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
7854
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaAST.js
|
|
7817
7855
|
function makeGuard(tag2) {
|
|
7818
7856
|
return (ast) => ast._tag === tag2;
|
|
7819
7857
|
}
|
|
@@ -7868,11 +7906,17 @@ var Declaration = class _Declaration extends Base2 {
|
|
|
7868
7906
|
typeParameters;
|
|
7869
7907
|
run;
|
|
7870
7908
|
encodingChecks;
|
|
7871
|
-
|
|
7909
|
+
/**
|
|
7910
|
+
* Parser factory {@link flip} swaps in, so a declaration can behave
|
|
7911
|
+
* differently when encoding. `undefined` reuses {@link run}.
|
|
7912
|
+
*/
|
|
7913
|
+
encodingRun;
|
|
7914
|
+
constructor(typeParameters, run2, annotations, checks, encoding, context3, encodingChecks, encodingRun) {
|
|
7872
7915
|
super(annotations, checks, encoding, context3);
|
|
7873
7916
|
this.typeParameters = typeParameters;
|
|
7874
7917
|
this.run = run2;
|
|
7875
7918
|
this.encodingChecks = encodingChecks;
|
|
7919
|
+
this.encodingRun = encodingRun;
|
|
7876
7920
|
}
|
|
7877
7921
|
/** @internal */
|
|
7878
7922
|
getParser() {
|
|
@@ -7882,17 +7926,17 @@ var Declaration = class _Declaration extends Base2 {
|
|
|
7882
7926
|
return (run2 ??= this.run(this.typeParameters))(input, this, options);
|
|
7883
7927
|
};
|
|
7884
7928
|
}
|
|
7885
|
-
_rebuild(recur, checks, encodingChecks) {
|
|
7929
|
+
_rebuild(recur, checks, encodingChecks, run2, encodingRun) {
|
|
7886
7930
|
const tps = mapOrSame(this.typeParameters, recur);
|
|
7887
|
-
return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks ? this : new _Declaration(tps,
|
|
7931
|
+
return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks && run2 === this.run && encodingRun === this.encodingRun ? this : new _Declaration(tps, run2, this.annotations, checks, void 0, this.context, encodingChecks, encodingRun);
|
|
7888
7932
|
}
|
|
7889
7933
|
/** @internal */
|
|
7890
7934
|
recur(recur) {
|
|
7891
|
-
return this._rebuild(recur, this.checks, this.encodingChecks);
|
|
7935
|
+
return this._rebuild(recur, this.checks, this.encodingChecks, this.run, this.encodingRun);
|
|
7892
7936
|
}
|
|
7893
7937
|
/** @internal */
|
|
7894
7938
|
flip(recur) {
|
|
7895
|
-
return this._rebuild(recur, this.encodingChecks, this.checks);
|
|
7939
|
+
return this._rebuild(recur, this.encodingChecks, this.checks, this.encodingRun ?? this.run, this.run);
|
|
7896
7940
|
}
|
|
7897
7941
|
/** @internal */
|
|
7898
7942
|
getExpected() {
|
|
@@ -7990,7 +8034,7 @@ var Number4 = class extends Base2 {
|
|
|
7990
8034
|
if (this.checks && (hasCheck(this.checks, "effect/schema/isFinite") || hasCheck(this.checks, "effect/schema/isInt"))) {
|
|
7991
8035
|
return this;
|
|
7992
8036
|
}
|
|
7993
|
-
return replaceEncoding(this, [numberToJson
|
|
8037
|
+
return replaceEncoding(this, [numberToJson]);
|
|
7994
8038
|
}
|
|
7995
8039
|
/** @internal */
|
|
7996
8040
|
toCodecStringTree() {
|
|
@@ -8007,10 +8051,6 @@ var Number4 = class extends Base2 {
|
|
|
8007
8051
|
function hasCheck(checks, id) {
|
|
8008
8052
|
return checks.some((check) => check.annotations?.representation?.id === id || check._tag === "FilterGroup" && hasCheck(check.checks, id));
|
|
8009
8053
|
}
|
|
8010
|
-
function numberToJson(checks) {
|
|
8011
|
-
const encodedFinite = !checks ? finite : appendChecks(finite, checks);
|
|
8012
|
-
return new Link(new Union([encodedFinite, nonFiniteLiterals], "anyOf"), new Transformation(Number3(), transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
|
|
8013
|
-
}
|
|
8014
8054
|
var number2 = /* @__PURE__ */ new Number4();
|
|
8015
8055
|
var Arrays = class _Arrays extends Base2 {
|
|
8016
8056
|
_tag = "Arrays";
|
|
@@ -8298,13 +8338,7 @@ var Objects = class _Objects extends Base2 {
|
|
|
8298
8338
|
onItem: (s, [key, index]) => parseIndex(s, key, index),
|
|
8299
8339
|
step: (_s, _, exit3) => exit3._tag === "Failure" ? exit3 : void 0
|
|
8300
8340
|
}) : void 0;
|
|
8301
|
-
|
|
8302
|
-
if (input === missing) {
|
|
8303
|
-
return missing;
|
|
8304
|
-
}
|
|
8305
|
-
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
8306
|
-
return yield* fail5(new InvalidType(ast, input, options));
|
|
8307
|
-
}
|
|
8341
|
+
const compileMembers = () => {
|
|
8308
8342
|
if (!properties) {
|
|
8309
8343
|
properties = ast.propertySignatures.map((ps) => ({
|
|
8310
8344
|
parser: compileConstructorDefault2(ps.type),
|
|
@@ -8317,6 +8351,16 @@ var Objects = class _Objects extends Base2 {
|
|
|
8317
8351
|
parserValue: compileConstructorDefault2(is2.type)
|
|
8318
8352
|
})) : void 0;
|
|
8319
8353
|
}
|
|
8354
|
+
return properties;
|
|
8355
|
+
};
|
|
8356
|
+
const fallback = fnUntracedEager2(function* (input, options) {
|
|
8357
|
+
if (input === missing) {
|
|
8358
|
+
return missing;
|
|
8359
|
+
}
|
|
8360
|
+
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
8361
|
+
return yield* fail5(new InvalidType(ast, input, options));
|
|
8362
|
+
}
|
|
8363
|
+
compileMembers();
|
|
8320
8364
|
const record2 = input;
|
|
8321
8365
|
const out = {};
|
|
8322
8366
|
const state = {
|
|
@@ -8398,6 +8442,57 @@ var Objects = class _Objects extends Base2 {
|
|
|
8398
8442
|
}
|
|
8399
8443
|
return out;
|
|
8400
8444
|
});
|
|
8445
|
+
if (indexCount) return fallback;
|
|
8446
|
+
const resume = (state, index, pending) => {
|
|
8447
|
+
const property = properties[index];
|
|
8448
|
+
return flatMap5(exit2(pending), (exit3) => {
|
|
8449
|
+
const terminal = stepProperty(state, property, exit3);
|
|
8450
|
+
if (terminal) return terminal;
|
|
8451
|
+
const done4 = () => succeed6(state.out);
|
|
8452
|
+
const eff = parseProperties(state, properties.slice(index + 1));
|
|
8453
|
+
return eff ? flatMapEager2(eff, done4) : done4();
|
|
8454
|
+
});
|
|
8455
|
+
};
|
|
8456
|
+
return (input, options) => {
|
|
8457
|
+
if (input === missing) return missingExit;
|
|
8458
|
+
if (options.errors === "all" || options.onExcessProperty !== void 0 || options.propertyOrder === "original" || options.concurrency !== void 0) {
|
|
8459
|
+
return fallback(input, options);
|
|
8460
|
+
}
|
|
8461
|
+
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
8462
|
+
return fail5(new InvalidType(ast, input, options));
|
|
8463
|
+
}
|
|
8464
|
+
const props = compileMembers();
|
|
8465
|
+
const record2 = input;
|
|
8466
|
+
const out = {};
|
|
8467
|
+
const state = {
|
|
8468
|
+
ast,
|
|
8469
|
+
input: record2,
|
|
8470
|
+
out,
|
|
8471
|
+
issues: void 0,
|
|
8472
|
+
options
|
|
8473
|
+
};
|
|
8474
|
+
try {
|
|
8475
|
+
for (let index = 0; index < props.length; index++) {
|
|
8476
|
+
const property = props[index];
|
|
8477
|
+
const name = property.name;
|
|
8478
|
+
const hasKey = Object.hasOwn(record2, name);
|
|
8479
|
+
const value = hasKey ? record2[name] : missing;
|
|
8480
|
+
const exit3 = property.parser(value, options);
|
|
8481
|
+
if (!effectIsExit(exit3)) {
|
|
8482
|
+
return resume(state, index, exit3);
|
|
8483
|
+
}
|
|
8484
|
+
if (exit3 === sameExit) {
|
|
8485
|
+
if (hasKey) assignProperty(out, name, value);
|
|
8486
|
+
continue;
|
|
8487
|
+
}
|
|
8488
|
+
const terminal = stepProperty(state, property, exit3);
|
|
8489
|
+
if (terminal) return terminal;
|
|
8490
|
+
}
|
|
8491
|
+
} catch (error) {
|
|
8492
|
+
return die2(error);
|
|
8493
|
+
}
|
|
8494
|
+
return succeed6(out);
|
|
8495
|
+
};
|
|
8401
8496
|
}
|
|
8402
8497
|
_rebuild(recur, recurParameter, checks, encodingChecks) {
|
|
8403
8498
|
const props = mapOrSame(this.propertySignatures, (ps) => {
|
|
@@ -8425,6 +8520,28 @@ var Objects = class _Objects extends Base2 {
|
|
|
8425
8520
|
return "object";
|
|
8426
8521
|
}
|
|
8427
8522
|
};
|
|
8523
|
+
function stepProperty(s, p, exit3) {
|
|
8524
|
+
if (exit3._tag === "Failure") {
|
|
8525
|
+
return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
|
|
8526
|
+
}
|
|
8527
|
+
if (exit3 === sameExit) return;
|
|
8528
|
+
const value = exit3[args];
|
|
8529
|
+
if (value !== missing) {
|
|
8530
|
+
assignProperty(s.out, p.name, value);
|
|
8531
|
+
return;
|
|
8532
|
+
}
|
|
8533
|
+
delete s.out[p.name];
|
|
8534
|
+
if (!isOptional(p.type)) {
|
|
8535
|
+
const issue = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
|
|
8536
|
+
if (s.options.errors === "all") {
|
|
8537
|
+
if (s.issues) s.issues.push(issue);
|
|
8538
|
+
else s.issues = [issue];
|
|
8539
|
+
return;
|
|
8540
|
+
} else {
|
|
8541
|
+
return fail4(new Composite(s.ast, [issue], s.input, s.options));
|
|
8542
|
+
}
|
|
8543
|
+
}
|
|
8544
|
+
}
|
|
8428
8545
|
var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
8429
8546
|
onItem(s, p) {
|
|
8430
8547
|
if (!Object.hasOwn(s.input, p.name)) {
|
|
@@ -8434,28 +8551,7 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
|
|
|
8434
8551
|
assignProperty(s.out, p.name, value);
|
|
8435
8552
|
return p.parser(value, s.options);
|
|
8436
8553
|
},
|
|
8437
|
-
step
|
|
8438
|
-
if (exit3._tag === "Failure") {
|
|
8439
|
-
return wrapPropertyKeyIssue(s, s.ast, p.name, exit3);
|
|
8440
|
-
}
|
|
8441
|
-
if (exit3 === sameExit) return;
|
|
8442
|
-
const value = exit3[args];
|
|
8443
|
-
if (value !== missing) {
|
|
8444
|
-
assignProperty(s.out, p.name, value);
|
|
8445
|
-
return;
|
|
8446
|
-
}
|
|
8447
|
-
delete s.out[p.name];
|
|
8448
|
-
if (!isOptional(p.type)) {
|
|
8449
|
-
const issue = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
|
|
8450
|
-
if (s.options.errors === "all") {
|
|
8451
|
-
if (s.issues) s.issues.push(issue);
|
|
8452
|
-
else s.issues = [issue];
|
|
8453
|
-
return;
|
|
8454
|
-
} else {
|
|
8455
|
-
return fail4(new Composite(s.ast, [issue], s.input, s.options));
|
|
8456
|
-
}
|
|
8457
|
-
}
|
|
8458
|
-
}
|
|
8554
|
+
step: stepProperty
|
|
8459
8555
|
});
|
|
8460
8556
|
function combineChecks(a, b) {
|
|
8461
8557
|
if (!a) return b;
|
|
@@ -8915,6 +9011,7 @@ function isFinite(annotations) {
|
|
|
8915
9011
|
});
|
|
8916
9012
|
}
|
|
8917
9013
|
var finite = /* @__PURE__ */ appendChecks(number2, [/* @__PURE__ */ isFinite()]);
|
|
9014
|
+
var numberToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([finite, nonFiniteLiterals], "anyOf"), /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number3(), /* @__PURE__ */ transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
|
|
8918
9015
|
function isPattern(regExp, annotations) {
|
|
8919
9016
|
const source = regExp.source;
|
|
8920
9017
|
const pattern = new globalThis.RegExp(source, regExp.flags);
|
|
@@ -9191,7 +9288,7 @@ function getConstructorDescriptor(ast) {
|
|
|
9191
9288
|
return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
|
|
9192
9289
|
}
|
|
9193
9290
|
|
|
9194
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9291
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/SchemaParser.js
|
|
9195
9292
|
function makeEffect(schema) {
|
|
9196
9293
|
const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
|
|
9197
9294
|
return (input, options) => {
|
|
@@ -9385,7 +9482,7 @@ function makeParser(ast, compile, compileConstructorDefault2, constructorDefault
|
|
|
9385
9482
|
};
|
|
9386
9483
|
}
|
|
9387
9484
|
|
|
9388
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9485
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/internal/schema/schema.js
|
|
9389
9486
|
var TypeId15 = "~effect/Schema/Schema";
|
|
9390
9487
|
var SchemaProto = {
|
|
9391
9488
|
[TypeId15]: TypeId15,
|
|
@@ -9416,10 +9513,10 @@ function make12(ast, options) {
|
|
|
9416
9513
|
return self;
|
|
9417
9514
|
}
|
|
9418
9515
|
|
|
9419
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9516
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Struct.js
|
|
9420
9517
|
var lambda = (f) => f;
|
|
9421
9518
|
|
|
9422
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9519
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Schema.js
|
|
9423
9520
|
function declareConstructor() {
|
|
9424
9521
|
return (typeParameters, run2, annotations) => {
|
|
9425
9522
|
return make13(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make13(ast))), annotations));
|
|
@@ -9432,9 +9529,15 @@ var SchemaErrorTypeId = "~effect/SchemaError/SchemaError";
|
|
|
9432
9529
|
var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
|
|
9433
9530
|
[SchemaErrorTypeId] = SchemaErrorTypeId;
|
|
9434
9531
|
constructor(issue) {
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9532
|
+
const stackTraceLimit = getStackTraceLimit();
|
|
9533
|
+
setStackTraceLimit(0);
|
|
9534
|
+
try {
|
|
9535
|
+
super({
|
|
9536
|
+
issue
|
|
9537
|
+
});
|
|
9538
|
+
} finally {
|
|
9539
|
+
setStackTraceLimit(stackTraceLimit);
|
|
9540
|
+
}
|
|
9438
9541
|
}
|
|
9439
9542
|
get message() {
|
|
9440
9543
|
return defaultFormatter(this.issue);
|
|
@@ -9453,6 +9556,9 @@ function decodeUnknownEffect2(schema, options) {
|
|
|
9453
9556
|
};
|
|
9454
9557
|
}
|
|
9455
9558
|
function fromIssueEffect(self) {
|
|
9559
|
+
if (effectIsExit(self)) {
|
|
9560
|
+
return fromIssueExit(self);
|
|
9561
|
+
}
|
|
9456
9562
|
return catchCause2(self, (cause) => failCauseSync2(() => map6(cause, (issue) => new SchemaError(issue))));
|
|
9457
9563
|
}
|
|
9458
9564
|
function getSchemaErrorOrThrow(cause, message) {
|
|
@@ -9479,6 +9585,9 @@ function runSchemaErrorSync(self) {
|
|
|
9479
9585
|
}
|
|
9480
9586
|
throw getSchemaErrorOrThrow(exit3.cause, "Sync adapter can only throw schema errors");
|
|
9481
9587
|
}
|
|
9588
|
+
function fromIssueExit(exit3) {
|
|
9589
|
+
return isSuccess4(exit3) ? exit3 : failCause2(map6(exit3.cause, (issue) => new SchemaError(issue)));
|
|
9590
|
+
}
|
|
9482
9591
|
function decodeUnknownSync(schema, options) {
|
|
9483
9592
|
const parser = decodeUnknownEffect2(schema, options);
|
|
9484
9593
|
return (input, options2) => {
|
|
@@ -9794,7 +9903,7 @@ var Uint8Array2 = /* @__PURE__ */ instanceOf(globalThis.Uint8Array, {
|
|
|
9794
9903
|
toArbitrary: () => (fc) => fc.uint8Array()
|
|
9795
9904
|
});
|
|
9796
9905
|
|
|
9797
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9906
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Ref.js
|
|
9798
9907
|
var Ref_exports = {};
|
|
9799
9908
|
__export(Ref_exports, {
|
|
9800
9909
|
get: () => get3,
|
|
@@ -9814,7 +9923,7 @@ __export(Ref_exports, {
|
|
|
9814
9923
|
updateSomeAndGet: () => updateSomeAndGet
|
|
9815
9924
|
});
|
|
9816
9925
|
|
|
9817
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9926
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/MutableRef.js
|
|
9818
9927
|
var TypeId16 = "~effect/MutableRef";
|
|
9819
9928
|
var MutableRefProto = {
|
|
9820
9929
|
[TypeId16]: TypeId16,
|
|
@@ -9836,7 +9945,7 @@ var set = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
9836
9945
|
return self;
|
|
9837
9946
|
});
|
|
9838
9947
|
|
|
9839
|
-
// ../../node_modules/.pnpm/effect@4.0.0-rc.
|
|
9948
|
+
// ../../node_modules/.pnpm/effect@4.0.0-rc.112/node_modules/effect/dist/Ref.js
|
|
9840
9949
|
var TypeId17 = "~effect/Ref";
|
|
9841
9950
|
var RefProto = {
|
|
9842
9951
|
[TypeId17]: {
|
|
@@ -9905,7 +10014,7 @@ var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync2(() => {
|
|
|
9905
10014
|
}));
|
|
9906
10015
|
var getUnsafe3 = (self) => self.ref.current;
|
|
9907
10016
|
|
|
9908
|
-
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.
|
|
10017
|
+
// ../../node_modules/.pnpm/effect-oxlint@0.3.2_effect@4.0.0-rc.112/node_modules/effect-oxlint/dist/index.js
|
|
9909
10018
|
var AST_exports = /* @__PURE__ */ __exportAll({
|
|
9910
10019
|
calleeIdentifier: () => calleeIdentifier,
|
|
9911
10020
|
calleeName: () => calleeName,
|
|
@@ -11673,6 +11782,80 @@ var noEmptyChildrenArray = Rule_exports.define({
|
|
|
11673
11782
|
}
|
|
11674
11783
|
});
|
|
11675
11784
|
|
|
11785
|
+
// src/rules/no-empty-commands-array.ts
|
|
11786
|
+
var COMMANDS_PROPERTY = "commands";
|
|
11787
|
+
var isObjectProperty = (node) => typeof node === "object" && node !== null && "type" in node && node.type === "Property";
|
|
11788
|
+
var staticPropertyName2 = (property) => {
|
|
11789
|
+
if (!property.computed && isIdentifier(property.key)) {
|
|
11790
|
+
return Option_exports.some(property.key.name);
|
|
11791
|
+
}
|
|
11792
|
+
return staticStringValue(property.key);
|
|
11793
|
+
};
|
|
11794
|
+
var isEmptyCommandsProperty = (property) => Option_exports.contains(staticPropertyName2(property), COMMANDS_PROPERTY) && isArrayExpression(property.value) && Array_exports.isReadonlyArrayEmpty(property.value.elements);
|
|
11795
|
+
var removalRange = (object, property, index) => {
|
|
11796
|
+
const maybePrevious = Array_exports.get(object.properties, index - 1);
|
|
11797
|
+
if (Option_exports.isSome(maybePrevious)) {
|
|
11798
|
+
return [maybePrevious.value.end, property.end];
|
|
11799
|
+
}
|
|
11800
|
+
const maybeNext = Array_exports.get(object.properties, index + 1);
|
|
11801
|
+
if (Option_exports.isSome(maybeNext)) {
|
|
11802
|
+
return [property.start, maybeNext.value.start];
|
|
11803
|
+
}
|
|
11804
|
+
return property.range;
|
|
11805
|
+
};
|
|
11806
|
+
var emptyCommandsMessage = "Return { model } instead of the literal { model, commands: [] }. Return a computed Commands collection directly, even when it may be empty.";
|
|
11807
|
+
var noEmptyCommandsArray = Rule_exports.define({
|
|
11808
|
+
name: "no-empty-commands-array",
|
|
11809
|
+
meta: Rule_exports.meta({
|
|
11810
|
+
type: "suggestion",
|
|
11811
|
+
description: "Omit a literal empty commands property from an update result.",
|
|
11812
|
+
fixable: "code"
|
|
11813
|
+
}),
|
|
11814
|
+
create: function* () {
|
|
11815
|
+
const ctx = yield* RuleContext;
|
|
11816
|
+
return {
|
|
11817
|
+
ObjectExpression: (node) => {
|
|
11818
|
+
if (!isObjectExpression(node)) {
|
|
11819
|
+
return Effect_exports.void;
|
|
11820
|
+
}
|
|
11821
|
+
const hasSpread = Array_exports.some(
|
|
11822
|
+
node.properties,
|
|
11823
|
+
(property) => property.type === "SpreadElement"
|
|
11824
|
+
);
|
|
11825
|
+
const commandProperties = Array_exports.filter(
|
|
11826
|
+
node.properties,
|
|
11827
|
+
(property) => isObjectProperty(property) && Option_exports.contains(staticPropertyName2(property), COMMANDS_PROPERTY)
|
|
11828
|
+
);
|
|
11829
|
+
const hasComments = Array_exports.isReadonlyArrayNonEmpty(
|
|
11830
|
+
ctx.sourceCode.getCommentsInside(node)
|
|
11831
|
+
);
|
|
11832
|
+
return Effect_exports.forEach(
|
|
11833
|
+
node.properties.entries(),
|
|
11834
|
+
([index, property]) => {
|
|
11835
|
+
if (!isObjectProperty(property) || !isEmptyCommandsProperty(property)) {
|
|
11836
|
+
return Effect_exports.void;
|
|
11837
|
+
}
|
|
11838
|
+
const diagnostic = Diagnostic_exports.make({
|
|
11839
|
+
node: property,
|
|
11840
|
+
message: emptyCommandsMessage
|
|
11841
|
+
});
|
|
11842
|
+
if (hasSpread || hasComments || Array_exports.isReadonlyArrayNonEmpty(Array_exports.drop(commandProperties, 1))) {
|
|
11843
|
+
return ctx.report(diagnostic);
|
|
11844
|
+
}
|
|
11845
|
+
return ctx.report(
|
|
11846
|
+
Diagnostic_exports.withFix(
|
|
11847
|
+
diagnostic,
|
|
11848
|
+
(fixer) => fixer.removeRange(removalRange(node, property, index))
|
|
11849
|
+
)
|
|
11850
|
+
);
|
|
11851
|
+
},
|
|
11852
|
+
{ discard: true }
|
|
11853
|
+
);
|
|
11854
|
+
}
|
|
11855
|
+
};
|
|
11856
|
+
}
|
|
11857
|
+
});
|
|
11858
|
+
|
|
11676
11859
|
// src/rules/no-empty-object-tagged-call.ts
|
|
11677
11860
|
var constructorName = (callee) => {
|
|
11678
11861
|
if (isIdentifier(callee) && /^[A-Z][A-Za-z0-9]*$/.test(callee.name)) {
|
|
@@ -11930,7 +12113,7 @@ var staticMemberName = (node) => {
|
|
|
11930
12113
|
}
|
|
11931
12114
|
return void 0;
|
|
11932
12115
|
};
|
|
11933
|
-
var
|
|
12116
|
+
var staticPropertyName3 = (property) => {
|
|
11934
12117
|
if (property.key.type === "Identifier") {
|
|
11935
12118
|
return property.key.name;
|
|
11936
12119
|
}
|
|
@@ -12008,7 +12191,7 @@ var noNonportableServerGlobals = Rule_exports.define({
|
|
|
12008
12191
|
if (property.type !== "Property") {
|
|
12009
12192
|
return [];
|
|
12010
12193
|
}
|
|
12011
|
-
const name =
|
|
12194
|
+
const name = staticPropertyName3(property);
|
|
12012
12195
|
return name !== void 0 && restrictedGlobalNames.has(name) ? [{ name, property }] : [];
|
|
12013
12196
|
});
|
|
12014
12197
|
return isUnshadowedGlobalReference(references, source) ? Effect_exports.forEach(
|
|
@@ -12748,6 +12931,7 @@ var basePlugin = Plugin_exports.define({
|
|
|
12748
12931
|
"no-disabling-dev-guardrails": noDisablingDevGuardrails,
|
|
12749
12932
|
"no-duplicate-onmount-per-element": noDuplicateOnmountPerElement,
|
|
12750
12933
|
"no-empty-children-array": noEmptyChildrenArray,
|
|
12934
|
+
"no-empty-commands-array": noEmptyCommandsArray,
|
|
12751
12935
|
"no-empty-object-tagged-call": noEmptyObjectTaggedCall,
|
|
12752
12936
|
"no-hand-rolled-command-struct": noHandRolledCommandStruct,
|
|
12753
12937
|
"no-hardcoded-route-strings": noHardcodedRouteStrings,
|