clanka 0.8.2 → 0.8.4
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/Acp.d.ts.map +1 -1
- package/dist/Acp.js +3 -3
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +6 -5
- package/dist/Acp.test.js.map +1 -1
- package/dist/AgentExecutor.d.ts.map +1 -1
- package/dist/AgentExecutor.js +1 -1
- package/dist/AgentExecutor.js.map +1 -1
- package/dist/AgentExecutor.test.d.ts +2 -0
- package/dist/AgentExecutor.test.d.ts.map +1 -0
- package/dist/AgentExecutor.test.js +87 -0
- package/dist/AgentExecutor.test.js.map +1 -0
- package/dist/bin/{Effect-BCeySOy1.mjs → Effect-BmOuzEIp.mjs} +243 -215
- package/dist/bin/Effect-BmOuzEIp.mjs.map +1 -0
- package/dist/bin/{McpClient-DP4jlaD1.mjs → McpClient-CLpFJSre.mjs} +3 -3
- package/dist/bin/{McpClient-DP4jlaD1.mjs.map → McpClient-CLpFJSre.mjs.map} +1 -1
- package/dist/bin/{OutputFormatter-Ch8yFytV.mjs → OutputFormatter-C_gdNUl1.mjs} +3 -3
- package/dist/bin/{OutputFormatter-Ch8yFytV.mjs.map → OutputFormatter-C_gdNUl1.mjs.map} +1 -1
- package/dist/bin/{Schema-C9JQ5hI0.mjs → Schema-C7W9nQug.mjs} +477 -382
- package/dist/bin/Schema-C7W9nQug.mjs.map +1 -0
- package/dist/bin/{SemanticSearch-BJGnYhFt.mjs → SemanticSearch-cqSnq90g.mjs} +269 -228
- package/dist/bin/SemanticSearch-cqSnq90g.mjs.map +1 -0
- package/dist/bin/{Stream-CgH3SuLu.mjs → Stream-BI6Fx9yq.mjs} +179 -171
- package/dist/bin/Stream-BI6Fx9yq.mjs.map +1 -0
- package/dist/bin/cli.mjs +172 -204
- package/dist/bin/cli.mjs.map +1 -1
- package/package.json +12 -12
- package/src/Acp.test.ts +6 -5
- package/src/Acp.ts +6 -3
- package/src/AgentExecutor.test.ts +133 -0
- package/src/AgentExecutor.ts +1 -2
- package/dist/bin/Effect-BCeySOy1.mjs.map +0 -1
- package/dist/bin/Schema-C9JQ5hI0.mjs.map +0 -1
- package/dist/bin/SemanticSearch-BJGnYhFt.mjs.map +0 -1
- package/dist/bin/Stream-CgH3SuLu.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/effect@
|
|
1
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pipeable.js
|
|
2
2
|
const pipeArguments = (self, args) => {
|
|
3
3
|
switch (args.length) {
|
|
4
4
|
case 0: return self;
|
|
@@ -27,7 +27,7 @@ const Class$2 = function() {
|
|
|
27
27
|
return PipeableBase;
|
|
28
28
|
}();
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region node_modules/.pnpm/effect@
|
|
30
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Function.js
|
|
31
31
|
const dual = function(arity, body) {
|
|
32
32
|
if (typeof arity === "function") return function() {
|
|
33
33
|
return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
|
|
@@ -112,12 +112,12 @@ function memoizeIdempotent(f) {
|
|
|
112
112
|
if (cached !== void 0) return cached;
|
|
113
113
|
const result = f(a);
|
|
114
114
|
cache.set(a, result);
|
|
115
|
-
cache.set(result, result);
|
|
115
|
+
if (result !== a) cache.set(result, result);
|
|
116
116
|
return result;
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
|
-
//#region node_modules/.pnpm/effect@
|
|
120
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/equal.js
|
|
121
121
|
const getAllObjectKeys = (obj) => {
|
|
122
122
|
const keys = new Set(Reflect.ownKeys(obj));
|
|
123
123
|
if (obj.constructor === Object) return keys;
|
|
@@ -135,13 +135,13 @@ const getAllObjectKeys = (obj) => {
|
|
|
135
135
|
const byReferenceInstances = new WeakSet();
|
|
136
136
|
const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
|
|
137
137
|
//#endregion
|
|
138
|
-
//#region node_modules/.pnpm/effect@
|
|
138
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/hash.js
|
|
139
139
|
let backEdges = 0;
|
|
140
140
|
const addBackEdge = () => {
|
|
141
141
|
backEdges++;
|
|
142
142
|
};
|
|
143
143
|
//#endregion
|
|
144
|
-
//#region node_modules/.pnpm/effect@
|
|
144
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Predicate.js
|
|
145
145
|
function isString(input) {
|
|
146
146
|
return typeof input === "string";
|
|
147
147
|
}
|
|
@@ -203,7 +203,7 @@ function isIterable(input) {
|
|
|
203
203
|
}
|
|
204
204
|
const or = dual(2, (self, that) => (a) => self(a) || that(a));
|
|
205
205
|
//#endregion
|
|
206
|
-
//#region node_modules/.pnpm/effect@
|
|
206
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Hash.js
|
|
207
207
|
const symbol$1 = "~effect/Hash";
|
|
208
208
|
const hash = (self) => {
|
|
209
209
|
switch (typeof self) {
|
|
@@ -292,7 +292,7 @@ const randomHashCache = new WeakMap();
|
|
|
292
292
|
const hashCache = new WeakMap();
|
|
293
293
|
const visitedObjects = new WeakSet();
|
|
294
294
|
//#endregion
|
|
295
|
-
//#region node_modules/.pnpm/effect@
|
|
295
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equal.js
|
|
296
296
|
const symbol = "~effect/Equal";
|
|
297
297
|
function equals$1() {
|
|
298
298
|
if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
|
|
@@ -404,7 +404,7 @@ const byReferenceUnsafe = (obj) => {
|
|
|
404
404
|
return obj;
|
|
405
405
|
};
|
|
406
406
|
//#endregion
|
|
407
|
-
//#region node_modules/.pnpm/effect@
|
|
407
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Redactable.js
|
|
408
408
|
const symbolRedactable = Symbol.for("~effect/Redactable");
|
|
409
409
|
const isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
410
410
|
function redact(u) {
|
|
@@ -426,7 +426,7 @@ const emptyContext$1 = {
|
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
428
|
//#endregion
|
|
429
|
-
//#region node_modules/.pnpm/effect@
|
|
429
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Formatter.js
|
|
430
430
|
function format$1(input, options) {
|
|
431
431
|
const space = options?.space ?? 0;
|
|
432
432
|
const ancestors = new WeakSet();
|
|
@@ -532,7 +532,7 @@ function formatJson(input, options) {
|
|
|
532
532
|
}, options?.space) ?? "null";
|
|
533
533
|
}
|
|
534
534
|
//#endregion
|
|
535
|
-
//#region node_modules/.pnpm/effect@
|
|
535
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Inspectable.js
|
|
536
536
|
const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
537
537
|
const toJson = (input) => {
|
|
538
538
|
try {
|
|
@@ -572,7 +572,7 @@ var Class$1 = class {
|
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
574
|
//#endregion
|
|
575
|
-
//#region node_modules/.pnpm/effect@
|
|
575
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
576
576
|
const isStackTraceLimitWritable = () => {
|
|
577
577
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
578
578
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
@@ -584,24 +584,22 @@ const setStackTraceLimit = (value) => {
|
|
|
584
584
|
if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
|
|
585
585
|
};
|
|
586
586
|
//#endregion
|
|
587
|
-
//#region node_modules/.pnpm/effect@
|
|
588
|
-
var SingleShotGen = class
|
|
589
|
-
called = false;
|
|
590
|
-
self;
|
|
587
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Utils.js
|
|
588
|
+
var SingleShotGen = class {
|
|
591
589
|
constructor(self) {
|
|
592
|
-
this.
|
|
590
|
+
this.value = self;
|
|
591
|
+
this.done = false;
|
|
593
592
|
}
|
|
594
593
|
next(a) {
|
|
595
|
-
|
|
596
|
-
value
|
|
597
|
-
|
|
598
|
-
}
|
|
599
|
-
|
|
594
|
+
if (this.done) {
|
|
595
|
+
this.value = a;
|
|
596
|
+
return this;
|
|
597
|
+
}
|
|
598
|
+
this.done = true;
|
|
599
|
+
return {
|
|
600
|
+
value: this.value,
|
|
600
601
|
done: false
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
[Symbol.iterator]() {
|
|
604
|
-
return new SingleShotGen(this.self);
|
|
602
|
+
};
|
|
605
603
|
}
|
|
606
604
|
};
|
|
607
605
|
const pickInternalCall = () => {
|
|
@@ -618,7 +616,7 @@ const pickInternalCall = () => {
|
|
|
618
616
|
};
|
|
619
617
|
const internalCall = pickInternalCall();
|
|
620
618
|
//#endregion
|
|
621
|
-
//#region node_modules/.pnpm/effect@
|
|
619
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/record.js
|
|
622
620
|
function assignProperty(self, key, value) {
|
|
623
621
|
if (key === "__proto__") Object.defineProperty(self, key, {
|
|
624
622
|
value,
|
|
@@ -632,7 +630,7 @@ function assignProperties(self, source) {
|
|
|
632
630
|
for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
|
|
633
631
|
}
|
|
634
632
|
//#endregion
|
|
635
|
-
//#region node_modules/.pnpm/effect@
|
|
633
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/core.js
|
|
636
634
|
const EffectTypeId = `~effect/Effect`;
|
|
637
635
|
const ExitTypeId = `~effect/Exit`;
|
|
638
636
|
const effectVariance = {
|
|
@@ -969,13 +967,13 @@ const done$2 = (value) => {
|
|
|
969
967
|
return exitFail(Done$1(value));
|
|
970
968
|
};
|
|
971
969
|
//#endregion
|
|
972
|
-
//#region node_modules/.pnpm/effect@
|
|
970
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effectable.js
|
|
973
971
|
const Prototype = (options) => makePrimitiveProto({
|
|
974
972
|
op: options.label,
|
|
975
973
|
[evaluate]: options.evaluate
|
|
976
974
|
});
|
|
977
975
|
//#endregion
|
|
978
|
-
//#region node_modules/.pnpm/effect@
|
|
976
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equivalence.js
|
|
979
977
|
const make$5 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
980
978
|
const isStrictEquivalent = (x, y) => x === y;
|
|
981
979
|
const strictEqual = () => isStrictEquivalent;
|
|
@@ -994,7 +992,7 @@ function Array_(item) {
|
|
|
994
992
|
});
|
|
995
993
|
}
|
|
996
994
|
//#endregion
|
|
997
|
-
//#region node_modules/.pnpm/effect@
|
|
995
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/option.js
|
|
998
996
|
const TypeId$7 = "~effect/Option";
|
|
999
997
|
const CommonProto$1 = {
|
|
1000
998
|
[TypeId$7]: { _A: (_) => _ },
|
|
@@ -1056,7 +1054,7 @@ const SomeImpl = function(value) {
|
|
|
1056
1054
|
SomeImpl.prototype = SomeProto;
|
|
1057
1055
|
const some$1 = (value) => new SomeImpl(value);
|
|
1058
1056
|
//#endregion
|
|
1059
|
-
//#region node_modules/.pnpm/effect@
|
|
1057
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/result.js
|
|
1060
1058
|
const TypeId$6 = "~effect/Result";
|
|
1061
1059
|
const CommonProto = {
|
|
1062
1060
|
[TypeId$6]: {
|
|
@@ -1122,7 +1120,7 @@ const SuccessImpl = function(success) {
|
|
|
1122
1120
|
SuccessImpl.prototype = SuccessProto;
|
|
1123
1121
|
const succeed$5 = (success) => new SuccessImpl(success);
|
|
1124
1122
|
//#endregion
|
|
1125
|
-
//#region node_modules/.pnpm/effect@
|
|
1123
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Order.js
|
|
1126
1124
|
function make$4(compare) {
|
|
1127
1125
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
1128
1126
|
}
|
|
@@ -1142,7 +1140,7 @@ const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
|
1142
1140
|
const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
1143
1141
|
const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
|
|
1144
1142
|
//#endregion
|
|
1145
|
-
//#region node_modules/.pnpm/effect@
|
|
1143
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Option.js
|
|
1146
1144
|
const none = () => none$1;
|
|
1147
1145
|
const some = some$1;
|
|
1148
1146
|
const isOption = isOption$1;
|
|
@@ -1194,7 +1192,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
|
|
|
1194
1192
|
const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
|
|
1195
1193
|
const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
|
|
1196
1194
|
//#endregion
|
|
1197
|
-
//#region node_modules/.pnpm/effect@
|
|
1195
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Context.js
|
|
1198
1196
|
const ServiceTypeId = "~effect/Context/Service";
|
|
1199
1197
|
const Service = function() {
|
|
1200
1198
|
function KeyClass() {}
|
|
@@ -1277,7 +1275,7 @@ const lookup = (self, key) => {
|
|
|
1277
1275
|
for (let overlay = impl.overlay; overlay; overlay = overlay.parent) if (overlay.key === key) return overlay.value;
|
|
1278
1276
|
const value = impl.base.get(key);
|
|
1279
1277
|
if (value === void 0 && !impl.base.has(key)) return notFound;
|
|
1280
|
-
if (impl.overlay && ++impl.baseHits >= FlattenAfterBaseHits) {
|
|
1278
|
+
if (impl.overlay && ++impl.baseHits >= impl.base.size && impl.baseHits >= FlattenAfterBaseHits) {
|
|
1281
1279
|
impl.base = flatten$2(impl);
|
|
1282
1280
|
impl.overlay = void 0;
|
|
1283
1281
|
impl.depth = 0;
|
|
@@ -1380,7 +1378,7 @@ const mergeAll$1 = (...ctxs) => {
|
|
|
1380
1378
|
};
|
|
1381
1379
|
const Reference = Service;
|
|
1382
1380
|
//#endregion
|
|
1383
|
-
//#region node_modules/.pnpm/effect@
|
|
1381
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Duration.js
|
|
1384
1382
|
const TypeId$4 = "~effect/Duration";
|
|
1385
1383
|
const bigint0$1 = BigInt(0);
|
|
1386
1384
|
const bigint1 = BigInt(1);
|
|
@@ -1676,10 +1674,10 @@ const format = (self) => {
|
|
|
1676
1674
|
return pieces.join(" ");
|
|
1677
1675
|
};
|
|
1678
1676
|
//#endregion
|
|
1679
|
-
//#region node_modules/.pnpm/effect@
|
|
1677
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/array.js
|
|
1680
1678
|
const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
1681
1679
|
//#endregion
|
|
1682
|
-
//#region node_modules/.pnpm/effect@
|
|
1680
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Result.js
|
|
1683
1681
|
const succeed$4 = succeed$5;
|
|
1684
1682
|
const fail$4 = fail$5;
|
|
1685
1683
|
const failVoid = fail$4(void 0);
|
|
@@ -1707,7 +1705,7 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
|
|
|
1707
1705
|
});
|
|
1708
1706
|
const getOrThrow = getOrThrowWith(identity);
|
|
1709
1707
|
//#endregion
|
|
1710
|
-
//#region node_modules/.pnpm/effect@
|
|
1708
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Iterable.js
|
|
1711
1709
|
const headUnsafe = (self) => {
|
|
1712
1710
|
const result = self[Symbol.iterator]().next();
|
|
1713
1711
|
if (result.done) throw new Error("headUnsafe: empty iterable");
|
|
@@ -1735,7 +1733,7 @@ const constEmptyIterator = { next() {
|
|
|
1735
1733
|
} };
|
|
1736
1734
|
const empty$2 = () => constEmpty;
|
|
1737
1735
|
//#endregion
|
|
1738
|
-
//#region node_modules/.pnpm/effect@
|
|
1736
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Array.js
|
|
1739
1737
|
const Array$1 = globalThis.Array;
|
|
1740
1738
|
const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
|
|
1741
1739
|
const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
|
|
@@ -1804,7 +1802,7 @@ const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullish
|
|
|
1804
1802
|
const makeEquivalence = Array_;
|
|
1805
1803
|
const join = dual(2, (self, sep) => fromIterable(self).join(sep));
|
|
1806
1804
|
//#endregion
|
|
1807
|
-
//#region node_modules/.pnpm/effect@
|
|
1805
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scheduler.js
|
|
1808
1806
|
const Scheduler = Reference("effect/Scheduler", {
|
|
1809
1807
|
fiberCached: true,
|
|
1810
1808
|
defaultValue: () => new MixedScheduler()
|
|
@@ -1908,7 +1906,7 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
|
|
|
1908
1906
|
defaultValue: () => false
|
|
1909
1907
|
});
|
|
1910
1908
|
//#endregion
|
|
1911
|
-
//#region node_modules/.pnpm/effect@
|
|
1909
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/encoding/Hex.js
|
|
1912
1910
|
const random = (length) => {
|
|
1913
1911
|
switch (length) {
|
|
1914
1912
|
case 16: return random16();
|
|
@@ -1939,7 +1937,7 @@ const random32 = () => {
|
|
|
1939
1937
|
return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15], hexCharCodes[c >>> 28], hexCharCodes[c >>> 24 & 15], hexCharCodes[c >>> 20 & 15], hexCharCodes[c >>> 16 & 15], hexCharCodes[c >>> 12 & 15], hexCharCodes[c >>> 8 & 15], hexCharCodes[c >>> 4 & 15], hexCharCodes[c & 15], hexCharCodes[d >>> 28], hexCharCodes[d >>> 24 & 15], hexCharCodes[d >>> 20 & 15], hexCharCodes[d >>> 16 & 15], hexCharCodes[d >>> 12 & 15], hexCharCodes[d >>> 8 & 15], hexCharCodes[d >>> 4 & 15], hexCharCodes[d & 15]);
|
|
1940
1938
|
};
|
|
1941
1939
|
//#endregion
|
|
1942
|
-
//#region node_modules/.pnpm/effect@
|
|
1940
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Tracer.js
|
|
1943
1941
|
const ParentSpanKey = "effect/Tracer/ParentSpan";
|
|
1944
1942
|
var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
|
|
1945
1943
|
const make$1 = (options) => options;
|
|
@@ -1947,10 +1945,6 @@ const DisablePropagation = Reference("effect/Tracer/DisablePropagation", { defau
|
|
|
1947
1945
|
const CurrentTraceLevel = Reference("effect/Tracer/CurrentTraceLevel", { defaultValue: () => "Info" });
|
|
1948
1946
|
const MinimumTraceLevel = Reference("effect/Tracer/MinimumTraceLevel", { defaultValue: () => "All" });
|
|
1949
1947
|
const TracerKey = "effect/Tracer";
|
|
1950
|
-
const Tracer = Reference(TracerKey, {
|
|
1951
|
-
fiberCached: true,
|
|
1952
|
-
defaultValue: () => nativeTracer
|
|
1953
|
-
});
|
|
1954
1948
|
const nativeTracer = make$1({ span: (options) => new NativeSpan(options) });
|
|
1955
1949
|
var NativeSpan = class {
|
|
1956
1950
|
_tag = "Span";
|
|
@@ -2014,10 +2008,10 @@ var NativeSpan = class {
|
|
|
2014
2008
|
}
|
|
2015
2009
|
};
|
|
2016
2010
|
//#endregion
|
|
2017
|
-
//#region node_modules/.pnpm/effect@
|
|
2011
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/metric.js
|
|
2018
2012
|
const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
|
|
2019
2013
|
//#endregion
|
|
2020
|
-
//#region node_modules/.pnpm/effect@
|
|
2014
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/references.js
|
|
2021
2015
|
const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
|
|
2022
2016
|
fiberCached: true,
|
|
2023
2017
|
defaultValue: constUndefined
|
|
@@ -2040,7 +2034,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
|
|
|
2040
2034
|
});
|
|
2041
2035
|
const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
|
|
2042
2036
|
//#endregion
|
|
2043
|
-
//#region node_modules/.pnpm/effect@
|
|
2037
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/tracer.js
|
|
2044
2038
|
const addSpanStackTrace = (options) => {
|
|
2045
2039
|
if (options?.captureStackTrace === false) return options;
|
|
2046
2040
|
else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
|
|
@@ -2072,7 +2066,7 @@ const makeStackCleaner = (line) => (stack) => {
|
|
|
2072
2066
|
};
|
|
2073
2067
|
const spanCleaner = makeStackCleaner(3);
|
|
2074
2068
|
//#endregion
|
|
2075
|
-
//#region node_modules/.pnpm/effect@
|
|
2069
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/effect.js
|
|
2076
2070
|
var Interrupt = class extends ReasonBase {
|
|
2077
2071
|
constructor(fiberId, annotations = constEmptyAnnotations) {
|
|
2078
2072
|
super("Interrupt", annotations, "Interrupted");
|
|
@@ -2158,20 +2152,14 @@ const causeMap = dual(2, (self, f) => {
|
|
|
2158
2152
|
});
|
|
2159
2153
|
return hasFail ? causeFromReasons(failures) : self;
|
|
2160
2154
|
});
|
|
2161
|
-
const causePartition = (self) => {
|
|
2162
|
-
const obj = {
|
|
2163
|
-
Fail: [],
|
|
2164
|
-
Die: [],
|
|
2165
|
-
Interrupt: []
|
|
2166
|
-
};
|
|
2167
|
-
for (let i = 0; i < self.reasons.length; i++) obj[self.reasons[i]._tag].push(self.reasons[i]);
|
|
2168
|
-
return obj;
|
|
2169
|
-
};
|
|
2170
2155
|
const causeSquash = (self) => {
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2156
|
+
let die;
|
|
2157
|
+
for (const reason of self.reasons) {
|
|
2158
|
+
if (reason._tag === "Fail") return reason.error;
|
|
2159
|
+
if (reason._tag === "Die") die ??= reason;
|
|
2160
|
+
}
|
|
2161
|
+
if (die !== void 0) return die.defect;
|
|
2162
|
+
if (self.reasons.length > 0) return new globalThis.Error("All fibers interrupted without error");
|
|
2175
2163
|
return new globalThis.Error("Empty cause");
|
|
2176
2164
|
};
|
|
2177
2165
|
const causePrettyErrors = (self, options) => {
|
|
@@ -2180,23 +2168,26 @@ const causePrettyErrors = (self, options) => {
|
|
|
2180
2168
|
if (self.reasons.length === 0) return errors;
|
|
2181
2169
|
const prevStackLimit = getStackTraceLimit();
|
|
2182
2170
|
if (prevStackLimit !== 0) setStackTraceLimit(1);
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2171
|
+
try {
|
|
2172
|
+
for (const failure of self.reasons) {
|
|
2173
|
+
if (failure._tag === "Interrupt") {
|
|
2174
|
+
interrupts.push(failure);
|
|
2175
|
+
continue;
|
|
2176
|
+
}
|
|
2177
|
+
errors.push(causePrettyError(failure._tag === "Die" ? failure.defect : failure.error, failure.annotations, options));
|
|
2178
|
+
}
|
|
2179
|
+
if (errors.length === 0) {
|
|
2180
|
+
const cause = new Error("The fiber was interrupted by:");
|
|
2181
|
+
cause.name = "InterruptCause";
|
|
2182
|
+
cause.stack = interruptCauseStack(cause, interrupts);
|
|
2183
|
+
const error = new globalThis.Error("All fibers interrupted without error", { cause });
|
|
2184
|
+
error.name = "InterruptError";
|
|
2185
|
+
error.stack = `${error.name}: ${error.message}`;
|
|
2186
|
+
errors.push(causePrettyError(error, interrupts[0].annotations, options));
|
|
2187
2187
|
}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
const cause = new Error("The fiber was interrupted by:");
|
|
2192
|
-
cause.name = "InterruptCause";
|
|
2193
|
-
cause.stack = interruptCauseStack(cause, interrupts);
|
|
2194
|
-
const error = new globalThis.Error("All fibers interrupted without error", { cause });
|
|
2195
|
-
error.name = "InterruptError";
|
|
2196
|
-
error.stack = `${error.name}: ${error.message}`;
|
|
2197
|
-
errors.push(causePrettyError(error, interrupts[0].annotations, options));
|
|
2198
|
-
}
|
|
2199
|
-
if (prevStackLimit !== 0) setStackTraceLimit(prevStackLimit);
|
|
2188
|
+
} finally {
|
|
2189
|
+
if (prevStackLimit !== 0) setStackTraceLimit(prevStackLimit);
|
|
2190
|
+
}
|
|
2200
2191
|
return errors;
|
|
2201
2192
|
};
|
|
2202
2193
|
const causePrettyError = (original, annotations, options) => {
|
|
@@ -2286,7 +2277,6 @@ const fiberIdStore = { id: 0 };
|
|
|
2286
2277
|
const getCurrentFiber = () => globalThis[currentFiberTypeId];
|
|
2287
2278
|
var FiberImpl = class {
|
|
2288
2279
|
constructor(context, interruptible = true) {
|
|
2289
|
-
this[FiberTypeId] = fiberVariance;
|
|
2290
2280
|
this.setContext(context);
|
|
2291
2281
|
this.id = ++fiberIdStore.id;
|
|
2292
2282
|
this.currentOpCount = 0;
|
|
@@ -2302,22 +2292,9 @@ var FiberImpl = class {
|
|
|
2302
2292
|
this._parent = void 0;
|
|
2303
2293
|
this.cache.runtimeMetrics?.recordFiberStart(this.context);
|
|
2304
2294
|
}
|
|
2305
|
-
[FiberTypeId]
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
currentOpCount;
|
|
2309
|
-
_stack;
|
|
2310
|
-
_observers;
|
|
2311
|
-
_exit;
|
|
2312
|
-
_children;
|
|
2313
|
-
_interruptedCause;
|
|
2314
|
-
_yielded;
|
|
2315
|
-
_running;
|
|
2316
|
-
_deferredInterrupt;
|
|
2317
|
-
_parent;
|
|
2318
|
-
context;
|
|
2319
|
-
cache;
|
|
2320
|
-
_dispatcher = void 0;
|
|
2295
|
+
get [FiberTypeId]() {
|
|
2296
|
+
return fiberVariance;
|
|
2297
|
+
}
|
|
2321
2298
|
get currentDispatcher() {
|
|
2322
2299
|
return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
|
|
2323
2300
|
}
|
|
@@ -2331,11 +2308,12 @@ var FiberImpl = class {
|
|
|
2331
2308
|
}
|
|
2332
2309
|
if (this._observers === void 0) this._observers = [cb];
|
|
2333
2310
|
else this._observers.push(cb);
|
|
2334
|
-
return () =>
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2311
|
+
return () => this.removeObserver(cb);
|
|
2312
|
+
}
|
|
2313
|
+
removeObserver(cb) {
|
|
2314
|
+
if (this._exit || this._observers === void 0) return;
|
|
2315
|
+
const index = this._observers.indexOf(cb);
|
|
2316
|
+
if (index >= 0) this._observers.splice(index, 1);
|
|
2339
2317
|
}
|
|
2340
2318
|
interruptUnsafe(fiberId, annotations) {
|
|
2341
2319
|
if (this._exit) return;
|
|
@@ -2440,6 +2418,11 @@ var FiberImpl = class {
|
|
|
2440
2418
|
if (op[symbol]) return op;
|
|
2441
2419
|
}
|
|
2442
2420
|
}
|
|
2421
|
+
succeedWith(value) {
|
|
2422
|
+
if ((++this.currentOpCount & maxInlineSteps - 1) === 0) return exitSucceed(value);
|
|
2423
|
+
const cont = this.getCont(contA);
|
|
2424
|
+
return cont ? cont[contA](value, this) : this.yieldWith(exitSucceed(value));
|
|
2425
|
+
}
|
|
2443
2426
|
yieldWith(value) {
|
|
2444
2427
|
this._yielded = value;
|
|
2445
2428
|
return Yield;
|
|
@@ -2456,7 +2439,7 @@ var FiberImpl = class {
|
|
|
2456
2439
|
if (previous !== void 0 && hasSameCache(previous, context)) return;
|
|
2457
2440
|
const root = context.cacheRoot;
|
|
2458
2441
|
const cache = root._fiberCache ??= makeFiberContextCache(context);
|
|
2459
|
-
if (this.cache
|
|
2442
|
+
if (this.cache?.scheduler !== cache.scheduler) this._dispatcher = void 0;
|
|
2460
2443
|
this.cache = cache;
|
|
2461
2444
|
}
|
|
2462
2445
|
get currentSpanLocal() {
|
|
@@ -2488,6 +2471,7 @@ const deferredInterruptCont = {
|
|
|
2488
2471
|
return failCause$3(fiber._interruptedCause);
|
|
2489
2472
|
}
|
|
2490
2473
|
};
|
|
2474
|
+
const maxInlineSteps = 32;
|
|
2491
2475
|
const fiberMiddleware = { interruptChildren: void 0 };
|
|
2492
2476
|
const fiberStackAnnotations = (fiber) => {
|
|
2493
2477
|
if (!fiber.cache.stackFrame) return void 0;
|
|
@@ -2642,11 +2626,10 @@ const callbackOptions = function() {
|
|
|
2642
2626
|
const Proto = makePrimitiveProto({
|
|
2643
2627
|
op: "Async",
|
|
2644
2628
|
[evaluate](fiber) {
|
|
2645
|
-
const register = internalCall(() => this.register.bind(fiber.cache.scheduler));
|
|
2646
2629
|
let resumed = false;
|
|
2647
2630
|
let yielded = false;
|
|
2648
2631
|
const controller = this.withSignal ? new AbortController() : void 0;
|
|
2649
|
-
const onCancel = register((effect) => {
|
|
2632
|
+
const onCancel = this.register.call(fiber.cache.scheduler, (effect) => {
|
|
2650
2633
|
if (resumed) return;
|
|
2651
2634
|
resumed = true;
|
|
2652
2635
|
if (yielded) fiber.evaluate(effect);
|
|
@@ -2684,7 +2667,7 @@ const asyncFinalizer = makePrimitive({
|
|
|
2684
2667
|
}
|
|
2685
2668
|
},
|
|
2686
2669
|
[contE](cause, _fiber) {
|
|
2687
|
-
return hasInterrupts$1(cause) ? flatMap$2(this[args](), () => failCause$3(cause)) : failCause$3(cause);
|
|
2670
|
+
return hasInterrupts$1(cause) ? flatMap$2(combineFinalizerCause(exitFailCause(cause), this[args]()), () => failCause$3(cause)) : failCause$3(cause);
|
|
2688
2671
|
}
|
|
2689
2672
|
});
|
|
2690
2673
|
const callback$1 = (register) => callbackOptions(register, register.length >= 2);
|
|
@@ -2728,6 +2711,8 @@ const fn$1 = function() {
|
|
|
2728
2711
|
};
|
|
2729
2712
|
const makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
|
|
2730
2713
|
const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
|
|
2714
|
+
const definitionName = `${name} (definition)`;
|
|
2715
|
+
const definitionStack = defError ? fnStackCleaner(() => defError.stack) : constUndefined;
|
|
2731
2716
|
return defineFunctionLength(body.length, function(...args) {
|
|
2732
2717
|
let result = suspend$1(() => {
|
|
2733
2718
|
const iter = body.apply(this, arguments);
|
|
@@ -2746,8 +2731,8 @@ const makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions)
|
|
|
2746
2731
|
name,
|
|
2747
2732
|
stack: callError ? fnStackCleaner(() => callError.stack) : constUndefined,
|
|
2748
2733
|
parent: {
|
|
2749
|
-
name:
|
|
2750
|
-
stack:
|
|
2734
|
+
name: definitionName,
|
|
2735
|
+
stack: definitionStack,
|
|
2751
2736
|
parent: prev
|
|
2752
2737
|
}
|
|
2753
2738
|
}));
|
|
@@ -2832,15 +2817,18 @@ ContImpl.prototype = OnSuccessProto;
|
|
|
2832
2817
|
const returnPayload = function() {
|
|
2833
2818
|
return this.payload;
|
|
2834
2819
|
};
|
|
2820
|
+
const succeedPayload = function(_value, fiber) {
|
|
2821
|
+
return fiber.succeedWith(this.payload);
|
|
2822
|
+
};
|
|
2835
2823
|
const continuationMarksStack = (() => {
|
|
2836
2824
|
const marker = "~effect/Effect/stackProbe";
|
|
2837
2825
|
return { [marker]: function stackProbe() {
|
|
2838
2826
|
return new Error().stack;
|
|
2839
2827
|
} }[marker]()?.includes("[as " + marker + "]") === true;
|
|
2840
2828
|
})();
|
|
2841
|
-
const mapCont = function(value) {
|
|
2829
|
+
const mapCont = function(value, fiber) {
|
|
2842
2830
|
const f = this.payload;
|
|
2843
|
-
return
|
|
2831
|
+
return fiber.succeedWith(continuationMarksStack ? f(value) : internalCall(() => f(value)));
|
|
2844
2832
|
};
|
|
2845
2833
|
const andThenCont = function(value) {
|
|
2846
2834
|
const f = this.payload;
|
|
@@ -2848,41 +2836,40 @@ const andThenCont = function(value) {
|
|
|
2848
2836
|
};
|
|
2849
2837
|
const tapCont = function(value) {
|
|
2850
2838
|
const f = this.payload;
|
|
2851
|
-
return new ContImpl(f(value),
|
|
2839
|
+
return new ContImpl(f(value), succeedPayload, value);
|
|
2852
2840
|
};
|
|
2853
2841
|
const tapEffectCont = function(value) {
|
|
2854
|
-
return new ContImpl(this.payload,
|
|
2842
|
+
return new ContImpl(this.payload, succeedPayload, value);
|
|
2855
2843
|
};
|
|
2856
2844
|
const asSome$1 = (self) => map$2(self, some);
|
|
2857
2845
|
const andThen$1 = dual(2, (self, f) => new ContImpl(self, isEffect$1(f) ? returnPayload : andThenCont, f));
|
|
2858
2846
|
const tap$1 = dual(2, (self, f) => new ContImpl(self, isEffect$1(f) ? tapEffectCont : tapCont, f));
|
|
2859
2847
|
const asVoid$1 = (self) => new ContImpl(self, returnPayload, exitVoid);
|
|
2860
|
-
const raceAllFirst = (all, options) => withFiber$1((parent) =>
|
|
2861
|
-
let done = false;
|
|
2848
|
+
const raceAllFirst = (all, options) => withFiber$1((parent) => {
|
|
2862
2849
|
const fibers = new Set();
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2850
|
+
onExitUnsafe(parent, () => fibers.size === 0 ? void 0 : fiberInterruptAll(fibers));
|
|
2851
|
+
return callback$1((resume) => {
|
|
2852
|
+
let done = false;
|
|
2853
|
+
let i = 0;
|
|
2854
|
+
for (const effect of all) {
|
|
2855
|
+
if (done) break;
|
|
2856
|
+
const index = i++;
|
|
2857
|
+
const fiber = forkUnsafe$1(parent, effect, true, true, false);
|
|
2858
|
+
fibers.add(fiber);
|
|
2859
|
+
fiber.addObserver((exit) => {
|
|
2860
|
+
fibers.delete(fiber);
|
|
2861
|
+
const isWinner = !done;
|
|
2862
|
+
done = true;
|
|
2863
|
+
resume(exit);
|
|
2864
|
+
if (isWinner && options?.onWinner) options.onWinner({
|
|
2865
|
+
fiber,
|
|
2866
|
+
index,
|
|
2867
|
+
parentFiber: parent
|
|
2868
|
+
});
|
|
2881
2869
|
});
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
}));
|
|
2870
|
+
}
|
|
2871
|
+
});
|
|
2872
|
+
});
|
|
2886
2873
|
const raceFirst$1 = dual((args) => isEffect$1(args[1]), (self, that, options) => raceAllFirst([self, that], options));
|
|
2887
2874
|
const flatMap$2 = dual(2, (self, f) => new ContImpl(self, andThenCont, f));
|
|
2888
2875
|
const effectIsExit = (effect) => effect[ExitTypeId] !== void 0;
|
|
@@ -3056,10 +3043,35 @@ const OnSuccessAndFailureImpl = function(self, onSuccess, onFailure) {
|
|
|
3056
3043
|
this[contE] = onFailure;
|
|
3057
3044
|
};
|
|
3058
3045
|
OnSuccessAndFailureImpl.prototype = OnSuccessAndFailureProto;
|
|
3059
|
-
const
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
}
|
|
3046
|
+
const matchSuccess = function(value, fiber) {
|
|
3047
|
+
const handlers = this.payload;
|
|
3048
|
+
return fiber.succeedWith(continuationMarksStack ? handlers.onSuccess(value) : internalCall(() => handlers.onSuccess(value)));
|
|
3049
|
+
};
|
|
3050
|
+
const makeMatch = (op, onFailure) => {
|
|
3051
|
+
const Proto = makePrimitiveProto({
|
|
3052
|
+
op,
|
|
3053
|
+
[evaluate]: evaluateCont,
|
|
3054
|
+
[contA]: matchSuccess,
|
|
3055
|
+
[contE]: onFailure
|
|
3056
|
+
});
|
|
3057
|
+
const MatchImpl = function(self, handlers) {
|
|
3058
|
+
this[args] = self;
|
|
3059
|
+
this.payload = handlers;
|
|
3060
|
+
};
|
|
3061
|
+
MatchImpl.prototype = Proto;
|
|
3062
|
+
return MatchImpl;
|
|
3063
|
+
};
|
|
3064
|
+
const MatchImpl = makeMatch("Match", function(cause, fiber) {
|
|
3065
|
+
const fail = cause.reasons.find(isFailReason$1);
|
|
3066
|
+
if (fail === void 0) return failCause$3(cause);
|
|
3067
|
+
const handlers = this.payload;
|
|
3068
|
+
return fiber.succeedWith(continuationMarksStack ? handlers.onFailure(fail.error) : internalCall(() => handlers.onFailure(fail.error)));
|
|
3069
|
+
});
|
|
3070
|
+
const MatchCauseImpl = makeMatch("MatchCause", function(cause, fiber) {
|
|
3071
|
+
const handlers = this.payload;
|
|
3072
|
+
return fiber.succeedWith(continuationMarksStack ? handlers.onFailure(cause) : internalCall(() => handlers.onFailure(cause)));
|
|
3073
|
+
});
|
|
3074
|
+
const matchCause = dual(2, (self, options) => new MatchCauseImpl(self, options));
|
|
3063
3075
|
const matchEffect$2 = dual(2, (self, options) => matchCauseEffect$1(self, {
|
|
3064
3076
|
onFailure: (cause) => {
|
|
3065
3077
|
const fail = cause.reasons.find(isFailReason$1);
|
|
@@ -3067,13 +3079,7 @@ const matchEffect$2 = dual(2, (self, options) => matchCauseEffect$1(self, {
|
|
|
3067
3079
|
},
|
|
3068
3080
|
onSuccess: options.onSuccess
|
|
3069
3081
|
}));
|
|
3070
|
-
const match$1 = dual(2, (self, options) =>
|
|
3071
|
-
onFailure: (cause) => {
|
|
3072
|
-
const fail = cause.reasons.find(isFailReason$1);
|
|
3073
|
-
return fail ? continuationMarksStack ? succeed$3(options.onFailure(fail.error)) : sync$1(() => options.onFailure(fail.error)) : failCause$3(cause);
|
|
3074
|
-
},
|
|
3075
|
-
onSuccess: (value) => continuationMarksStack ? succeed$3(options.onSuccess(value)) : sync$1(() => options.onSuccess(value))
|
|
3076
|
-
}));
|
|
3082
|
+
const match$1 = dual(2, (self, options) => new MatchImpl(self, options));
|
|
3077
3083
|
const matchEager = dual(2, (self, options) => {
|
|
3078
3084
|
if (effectIsExit(self)) {
|
|
3079
3085
|
if (self._tag === "Success") return exitSucceed(options.onSuccess(self.value));
|
|
@@ -3097,11 +3103,11 @@ const exitPrimitive = makePrimitive({
|
|
|
3097
3103
|
fiber._stack.push(this);
|
|
3098
3104
|
return this[args];
|
|
3099
3105
|
},
|
|
3100
|
-
[contA](value,
|
|
3101
|
-
return
|
|
3106
|
+
[contA](value, fiber, exit) {
|
|
3107
|
+
return fiber.succeedWith(exit ?? exitSucceed(value));
|
|
3102
3108
|
},
|
|
3103
|
-
[contE](cause,
|
|
3104
|
-
return
|
|
3109
|
+
[contE](cause, fiber, exit) {
|
|
3110
|
+
return fiber.succeedWith(exit ?? exitFailCause(cause));
|
|
3105
3111
|
}
|
|
3106
3112
|
});
|
|
3107
3113
|
const delay$1 = dual(2, (self, duration) => andThen$1(sleep$1(duration), self));
|
|
@@ -3118,25 +3124,33 @@ const timeoutOption = dual(2, (self, duration) => raceFirst$1(asSome$1(self), as
|
|
|
3118
3124
|
const ScopeTypeId = "~effect/Scope";
|
|
3119
3125
|
const ScopeCloseableTypeId = "~effect/Scope/Closeable";
|
|
3120
3126
|
const scopeTag = Service("effect/Scope");
|
|
3121
|
-
const scopeClose = (self, exit_) =>
|
|
3127
|
+
const scopeClose = (self, exit_) => withFiber$1((fiber) => {
|
|
3128
|
+
const close = scopeCloseUnsafe(self, exit_);
|
|
3129
|
+
if (close === void 0) return void_$2;
|
|
3130
|
+
fiberEnterUninterruptibleUnsafe(fiber);
|
|
3131
|
+
return close;
|
|
3132
|
+
});
|
|
3122
3133
|
const scopeCloseUnsafe = (self, exit_) => {
|
|
3123
|
-
|
|
3124
|
-
|
|
3134
|
+
const state = self.state;
|
|
3135
|
+
if (state._tag === "Closed") return;
|
|
3136
|
+
self.state = {
|
|
3125
3137
|
_tag: "Closed",
|
|
3126
3138
|
exit: exit_
|
|
3127
3139
|
};
|
|
3128
|
-
if (self.
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
}
|
|
3132
|
-
const state = self.state;
|
|
3133
|
-
self.state = closed;
|
|
3134
|
-
if (state.finalizer !== void 0) return state.finalizer(exit_);
|
|
3140
|
+
if (self.parent !== void 0) scopeRemoveFinalizerUnsafe(self.parent, self);
|
|
3141
|
+
if (state._tag === "Empty") return;
|
|
3142
|
+
if (state.finalizer !== void 0) return runFinalizer(state.finalizer, exit_);
|
|
3135
3143
|
const finalizers = state.finalizers;
|
|
3136
|
-
if (finalizers ===
|
|
3137
|
-
else if (finalizers.size === 1) return finalizers.values().next().value(exit_);
|
|
3144
|
+
if (finalizers.size === 1) return runFinalizer(finalizers.values().next().value, exit_);
|
|
3138
3145
|
return scopeCloseFinalizers(self, finalizers, exit_);
|
|
3139
3146
|
};
|
|
3147
|
+
const runFinalizer = (finalizer, exit_) => {
|
|
3148
|
+
try {
|
|
3149
|
+
return finalizer(exit_);
|
|
3150
|
+
} catch (defect) {
|
|
3151
|
+
return exitDie(defect);
|
|
3152
|
+
}
|
|
3153
|
+
};
|
|
3140
3154
|
const combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause$1(finalizer, (cause) => failCause$3(causeCombine(exit_.cause, cause)));
|
|
3141
3155
|
const scopeCloseFinalizers = fnUntraced$1(function* (self, finalizers, exit_) {
|
|
3142
3156
|
let exits = [];
|
|
@@ -3145,22 +3159,20 @@ const scopeCloseFinalizers = fnUntraced$1(function* (self, finalizers, exit_) {
|
|
|
3145
3159
|
const parent = getCurrentFiber();
|
|
3146
3160
|
for (let i = arr.length - 1; i >= 0; i--) {
|
|
3147
3161
|
const finalizer = arr[i];
|
|
3148
|
-
if (self.strategy === "sequential") exits.push(yield* exit$1(finalizer
|
|
3149
|
-
else fibers.push(forkUnsafe$1(parent, finalizer
|
|
3162
|
+
if (self.strategy === "sequential") exits.push(yield* exit$1(runFinalizer(finalizer, exit_)));
|
|
3163
|
+
else fibers.push(forkUnsafe$1(parent, runFinalizer(finalizer, exit_), true, true, "inherit"));
|
|
3150
3164
|
}
|
|
3151
3165
|
if (fibers.length > 0) exits = yield* fiberAwaitAll(fibers);
|
|
3152
3166
|
return yield* exitAsVoidAll(exits);
|
|
3153
3167
|
});
|
|
3154
3168
|
const scopeForkUnsafe = (scope, finalizerStrategy) => {
|
|
3155
|
-
const
|
|
3169
|
+
const child = makeScope(finalizerStrategy, scope);
|
|
3156
3170
|
if (scope.state._tag === "Closed") {
|
|
3157
|
-
|
|
3158
|
-
return
|
|
3171
|
+
child.state = scope.state;
|
|
3172
|
+
return child;
|
|
3159
3173
|
}
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
scopeAddFinalizerUnsafe(newScope, key, (_) => sync$1(() => scopeRemoveFinalizerUnsafe(scope, key)));
|
|
3163
|
-
return newScope;
|
|
3174
|
+
scopeAddFinalizerUnsafe(scope, child, (exit) => scopeClose(child, exit));
|
|
3175
|
+
return child;
|
|
3164
3176
|
};
|
|
3165
3177
|
const scopeAddFinalizerExit = (scope, finalizer) => {
|
|
3166
3178
|
return suspend$1(() => {
|
|
@@ -3184,26 +3196,24 @@ const scopeAddFinalizerUnsafe = (scope, key, finalizer) => {
|
|
|
3184
3196
|
state.finalizerKey = void 0;
|
|
3185
3197
|
state.finalizer = void 0;
|
|
3186
3198
|
state.finalizers.set(key, finalizer);
|
|
3187
|
-
} else if (state.finalizers === void 0) {
|
|
3188
|
-
state.finalizerKey = key;
|
|
3189
|
-
state.finalizer = finalizer;
|
|
3190
3199
|
} else state.finalizers.set(key, finalizer);
|
|
3191
3200
|
}
|
|
3192
3201
|
};
|
|
3193
3202
|
const scopeRemoveFinalizerUnsafe = (scope, key) => {
|
|
3194
|
-
if (scope.state._tag
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3203
|
+
if (scope.state._tag !== "Open") return;
|
|
3204
|
+
const state = scope.state;
|
|
3205
|
+
if (state.finalizerKey === key) scope.state = constScopeEmpty;
|
|
3206
|
+
else if (state.finalizers !== void 0) {
|
|
3207
|
+
state.finalizers.delete(key);
|
|
3208
|
+
if (state.finalizers.size === 0) scope.state = constScopeEmpty;
|
|
3200
3209
|
}
|
|
3201
3210
|
};
|
|
3202
|
-
const
|
|
3203
|
-
const
|
|
3211
|
+
const scopeMakeUnsafe = (finalizerStrategy) => makeScope(finalizerStrategy, void 0);
|
|
3212
|
+
const makeScope = (finalizerStrategy = "sequential", parent) => ({
|
|
3204
3213
|
[ScopeCloseableTypeId]: ScopeCloseableTypeId,
|
|
3205
3214
|
[ScopeTypeId]: ScopeTypeId,
|
|
3206
3215
|
strategy: finalizerStrategy,
|
|
3216
|
+
parent,
|
|
3207
3217
|
state: constScopeEmpty
|
|
3208
3218
|
});
|
|
3209
3219
|
const constScopeEmpty = { _tag: "Empty" };
|
|
@@ -3241,12 +3251,22 @@ const OnExitImpl = function() {
|
|
|
3241
3251
|
},
|
|
3242
3252
|
[contA](value, _, exit) {
|
|
3243
3253
|
exit ??= exitSucceed(value);
|
|
3244
|
-
|
|
3254
|
+
let eff;
|
|
3255
|
+
try {
|
|
3256
|
+
eff = this.onExit(exit);
|
|
3257
|
+
} catch (defect) {
|
|
3258
|
+
eff = exitDie(defect);
|
|
3259
|
+
}
|
|
3245
3260
|
return eff ? flatMap$2(eff, (_) => exit) : exit;
|
|
3246
3261
|
},
|
|
3247
3262
|
[contE](cause, _, exit) {
|
|
3248
3263
|
exit ??= exitFailCause(cause);
|
|
3249
|
-
|
|
3264
|
+
let eff;
|
|
3265
|
+
try {
|
|
3266
|
+
eff = this.onExit(exit);
|
|
3267
|
+
} catch (defect) {
|
|
3268
|
+
eff = exitDie(defect);
|
|
3269
|
+
}
|
|
3250
3270
|
return eff ? flatMap$2(combineFinalizerCause(exit, eff), (_) => exit) : exit;
|
|
3251
3271
|
}
|
|
3252
3272
|
});
|
|
@@ -3349,6 +3369,12 @@ const setFiberInterruptible = (fiber) => {
|
|
|
3349
3369
|
fiber._stack.push(setInterruptibleFalse);
|
|
3350
3370
|
if (fiber._interruptedCause) return failCause$3(fiber._interruptedCause);
|
|
3351
3371
|
};
|
|
3372
|
+
const fiberEnterUninterruptibleUnsafe = (fiber) => {
|
|
3373
|
+
const impl = fiber;
|
|
3374
|
+
if (!impl.interruptible) return;
|
|
3375
|
+
impl.interruptible = false;
|
|
3376
|
+
impl._stack.push(setInterruptibleTrue);
|
|
3377
|
+
};
|
|
3352
3378
|
const interruptible$1 = (self) => withFiber$1((fiber) => {
|
|
3353
3379
|
if (fiber.interruptible) return self;
|
|
3354
3380
|
return setFiberInterruptible(fiber) ?? self;
|
|
@@ -3421,11 +3447,12 @@ const resolveConcurrency = (concurrency) => concurrency === "unbounded" ? Number
|
|
|
3421
3447
|
const iterateEager = () => (options) => {
|
|
3422
3448
|
const onItem = options.onItem;
|
|
3423
3449
|
const step = options.step;
|
|
3450
|
+
const resumeSequential = (state, items, index, end, effect) => flatMap$2(exit$1(effect), (itemExit) => step(state, items[index], itemExit, index) ?? runSequential(state, items, index + 1, end) ?? void_$2);
|
|
3424
3451
|
const runSequential = (state, items, index = 0, end = items.length) => {
|
|
3425
3452
|
for (; index < end; index++) {
|
|
3426
3453
|
const item = items[index];
|
|
3427
3454
|
const effect = onItem(state, item, index);
|
|
3428
|
-
if (!effectIsExit(effect)) return
|
|
3455
|
+
if (!effectIsExit(effect)) return resumeSequential(state, items, index, end, effect);
|
|
3429
3456
|
const terminal = step(state, item, effect, index);
|
|
3430
3457
|
if (terminal) return terminal._tag === "Failure" ? terminal : void 0;
|
|
3431
3458
|
}
|
|
@@ -3443,15 +3470,13 @@ const iterateConcurrentImpl = (options) => {
|
|
|
3443
3470
|
let parentFiber;
|
|
3444
3471
|
let fibers;
|
|
3445
3472
|
let resume;
|
|
3446
|
-
let interrupted = false;
|
|
3447
3473
|
let terminal;
|
|
3448
3474
|
let effect;
|
|
3449
3475
|
const failDefect = (error) => {
|
|
3450
3476
|
const defect = exitDie(error);
|
|
3451
3477
|
terminal = defect;
|
|
3452
3478
|
done = true;
|
|
3453
|
-
|
|
3454
|
-
return fibers && fibers.size > 0 ? flatMap$2(uninterruptible$1(fiberInterruptAll(Array.from(fibers))), () => defect) : defect;
|
|
3479
|
+
return fibers && fibers.size > 0 ? flatMap$2(uninterruptible$1(fiberInterruptAll(Array.from(fibers))), () => terminal ?? defect) : defect;
|
|
3455
3480
|
};
|
|
3456
3481
|
const go = () => {
|
|
3457
3482
|
let paused = false;
|
|
@@ -3474,9 +3499,8 @@ const iterateConcurrentImpl = (options) => {
|
|
|
3474
3499
|
}
|
|
3475
3500
|
if (result) return cb(result);
|
|
3476
3501
|
return suspend$1(() => {
|
|
3477
|
-
terminal
|
|
3478
|
-
|
|
3479
|
-
return fibers ? fiberInterruptAll(fibers) : void_$2;
|
|
3502
|
+
terminal ??= exitVoid;
|
|
3503
|
+
return flatMap$2(fibers ? fiberInterruptAll(fibers) : void_$2, () => terminal?._tag === "Failure" ? terminal : void_$2);
|
|
3480
3504
|
});
|
|
3481
3505
|
});
|
|
3482
3506
|
else {
|
|
@@ -3493,13 +3517,17 @@ const iterateConcurrentImpl = (options) => {
|
|
|
3493
3517
|
fibers.delete(fiber);
|
|
3494
3518
|
try {
|
|
3495
3519
|
if (terminal) {
|
|
3496
|
-
if (
|
|
3497
|
-
|
|
3498
|
-
|
|
3520
|
+
if (exit._tag === "Failure") {
|
|
3521
|
+
const reasons = exit.cause.reasons.filter((reason) => reason._tag !== "Interrupt");
|
|
3522
|
+
if (reasons.length > 0) {
|
|
3523
|
+
const cause = causeFromReasons(reasons);
|
|
3524
|
+
terminal = exitFailCause(terminal._tag === "Failure" ? causeCombine(terminal.cause, cause) : cause);
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3499
3527
|
} else {
|
|
3500
3528
|
const result = step(state, item, exit, currentIndex);
|
|
3501
3529
|
if (result) {
|
|
3502
|
-
terminal = result
|
|
3530
|
+
terminal = result;
|
|
3503
3531
|
go();
|
|
3504
3532
|
}
|
|
3505
3533
|
}
|
|
@@ -3713,7 +3741,7 @@ const filterDisablePropagation = (span) => {
|
|
|
3713
3741
|
return get(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
|
|
3714
3742
|
};
|
|
3715
3743
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
3716
|
-
const disablePropagation = !fiber.
|
|
3744
|
+
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get(options.annotations, DisablePropagation);
|
|
3717
3745
|
const parent = options?.parent !== void 0 ? some(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
|
|
3718
3746
|
let span;
|
|
3719
3747
|
if (disablePropagation) span = noopSpan({
|
|
@@ -3722,7 +3750,7 @@ const makeSpanUnsafe = (fiber, name, options) => {
|
|
|
3722
3750
|
annotations: add(options?.annotations ?? empty$3(), DisablePropagation, true)
|
|
3723
3751
|
});
|
|
3724
3752
|
else {
|
|
3725
|
-
const tracer = fiber.
|
|
3753
|
+
const tracer = fiber.cache.tracer ?? nativeTracer;
|
|
3726
3754
|
const clock = fiber.getRef(ClockRef);
|
|
3727
3755
|
const timingEnabled = fiber.getRef(TracerTimingEnabled$1);
|
|
3728
3756
|
const annotationsFromEnv = fiber.getRef(TracerSpanAnnotations);
|
|
@@ -4017,7 +4045,7 @@ function interruptChildrenPatch() {
|
|
|
4017
4045
|
}
|
|
4018
4046
|
const undefined_$1 = succeed$3(void 0);
|
|
4019
4047
|
//#endregion
|
|
4020
|
-
//#region node_modules/.pnpm/effect@
|
|
4048
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Exit.js
|
|
4021
4049
|
const isExit = isExit$1;
|
|
4022
4050
|
const succeed$2 = exitSucceed;
|
|
4023
4051
|
const failCause$2 = exitFailCause;
|
|
@@ -4028,7 +4056,7 @@ const void_$1 = exitVoid;
|
|
|
4028
4056
|
const isSuccess = exitIsSuccess;
|
|
4029
4057
|
const isFailure = exitIsFailure;
|
|
4030
4058
|
//#endregion
|
|
4031
|
-
//#region node_modules/.pnpm/effect@
|
|
4059
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Deferred.js
|
|
4032
4060
|
const TypeId$3 = "~effect/Deferred";
|
|
4033
4061
|
const DeferredProto = {
|
|
4034
4062
|
[TypeId$3]: {
|
|
@@ -4074,13 +4102,13 @@ const doneUnsafe = (self, effect) => {
|
|
|
4074
4102
|
};
|
|
4075
4103
|
const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
|
|
4076
4104
|
//#endregion
|
|
4077
|
-
//#region node_modules/.pnpm/effect@
|
|
4105
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/References.js
|
|
4078
4106
|
const CurrentLogAnnotations = CurrentLogAnnotations$1;
|
|
4079
4107
|
const CurrentLogSpans = CurrentLogSpans$1;
|
|
4080
4108
|
const MinimumLogLevel = MinimumLogLevel$1;
|
|
4081
4109
|
const TracerTimingEnabled = TracerTimingEnabled$1;
|
|
4082
4110
|
//#endregion
|
|
4083
|
-
//#region node_modules/.pnpm/effect@
|
|
4111
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scope.js
|
|
4084
4112
|
const Scope = scopeTag;
|
|
4085
4113
|
const make = scopeMake;
|
|
4086
4114
|
const makeUnsafe = scopeMakeUnsafe;
|
|
@@ -4090,7 +4118,7 @@ const addFinalizer$1 = scopeAddFinalizer;
|
|
|
4090
4118
|
const forkUnsafe = scopeForkUnsafe;
|
|
4091
4119
|
const close = scopeClose;
|
|
4092
4120
|
//#endregion
|
|
4093
|
-
//#region node_modules/.pnpm/effect@
|
|
4121
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Layer.js
|
|
4094
4122
|
const TypeId$2 = "~effect/Layer";
|
|
4095
4123
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
4096
4124
|
const makeMemoMapEntry = (memoMap, layer) => {
|
|
@@ -4245,7 +4273,7 @@ const makeUnimplemented = (error) => {
|
|
|
4245
4273
|
const StreamTypeId = "~effect/Stream";
|
|
4246
4274
|
const ChannelTypeId = "~effect/Channel";
|
|
4247
4275
|
//#endregion
|
|
4248
|
-
//#region node_modules/.pnpm/effect@
|
|
4276
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Cause.js
|
|
4249
4277
|
const isCause = isCause$1;
|
|
4250
4278
|
const isReason = isCauseReason;
|
|
4251
4279
|
const isFailReason = isFailReason$1;
|
|
@@ -4274,7 +4302,7 @@ const UnknownError = UnknownError$1;
|
|
|
4274
4302
|
const annotate = causeAnnotate;
|
|
4275
4303
|
var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
|
|
4276
4304
|
//#endregion
|
|
4277
|
-
//#region node_modules/.pnpm/effect@
|
|
4305
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/random.js
|
|
4278
4306
|
const Random = Reference("effect/Random", { defaultValue: () => ({
|
|
4279
4307
|
nextIntUnsafe() {
|
|
4280
4308
|
return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
|
|
@@ -4294,7 +4322,7 @@ const nextBetween = (min, max, draw) => {
|
|
|
4294
4322
|
return view.getFloat64(0);
|
|
4295
4323
|
};
|
|
4296
4324
|
//#endregion
|
|
4297
|
-
//#region node_modules/.pnpm/effect@
|
|
4325
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pull.js
|
|
4298
4326
|
const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
|
|
4299
4327
|
const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
|
|
4300
4328
|
const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
|
|
@@ -4322,7 +4350,7 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
|
|
|
4322
4350
|
}
|
|
4323
4351
|
}));
|
|
4324
4352
|
//#endregion
|
|
4325
|
-
//#region node_modules/.pnpm/effect@
|
|
4353
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Schedule.js
|
|
4326
4354
|
const TypeId$1 = "~effect/Schedule";
|
|
4327
4355
|
const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
|
|
4328
4356
|
const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
|
|
@@ -4446,11 +4474,11 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
|
|
|
4446
4474
|
})));
|
|
4447
4475
|
const forever$1 = spaced(zero);
|
|
4448
4476
|
//#endregion
|
|
4449
|
-
//#region node_modules/.pnpm/effect@
|
|
4477
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/layer.js
|
|
4450
4478
|
const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
|
|
4451
4479
|
const provide$1 = dual((args) => isEffect$1(args[0]), (self, source, options) => isContext(source) ? provideContext$1(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
|
|
4452
4480
|
//#endregion
|
|
4453
|
-
//#region node_modules/.pnpm/effect@
|
|
4481
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/schedule.js
|
|
4454
4482
|
const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
|
|
4455
4483
|
let meta = CurrentMetadata.defaultValue();
|
|
4456
4484
|
return catch_$1(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
|
|
@@ -4492,7 +4520,7 @@ const buildFromOptions = (options) => {
|
|
|
4492
4520
|
return schedule;
|
|
4493
4521
|
};
|
|
4494
4522
|
//#endregion
|
|
4495
|
-
//#region node_modules/.pnpm/effect@
|
|
4523
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Request.js
|
|
4496
4524
|
const TypeId = "~effect/Request";
|
|
4497
4525
|
const requestVariance = byReferenceUnsafe({
|
|
4498
4526
|
_E: (_) => _,
|
|
@@ -4517,7 +4545,7 @@ const TaggedClass = (tag) => {
|
|
|
4517
4545
|
};
|
|
4518
4546
|
const makeEntry = (options) => options;
|
|
4519
4547
|
//#endregion
|
|
4520
|
-
//#region node_modules/.pnpm/effect@
|
|
4548
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/request.js
|
|
4521
4549
|
const request$1 = dual(2, (self, resolver) => {
|
|
4522
4550
|
const withResolver = (resolver) => callback$1((resume) => {
|
|
4523
4551
|
const entry = addEntry(resolver, self, resume, getCurrentFiber());
|
|
@@ -4613,7 +4641,7 @@ function runBatch(batch) {
|
|
|
4613
4641
|
return batch.run;
|
|
4614
4642
|
}
|
|
4615
4643
|
//#endregion
|
|
4616
|
-
//#region node_modules/.pnpm/effect@
|
|
4644
|
+
//#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effect.js
|
|
4617
4645
|
const isEffect = isEffect$1;
|
|
4618
4646
|
const all = all$1;
|
|
4619
4647
|
const forEach = forEach$1;
|
|
@@ -4753,6 +4781,6 @@ const flatMapEager = flatMapEager$1;
|
|
|
4753
4781
|
const catchEager = catchEager$1;
|
|
4754
4782
|
const fnUntracedEager = fnUntracedEager$1;
|
|
4755
4783
|
//#endregion
|
|
4756
|
-
export { isEffect as $,
|
|
4784
|
+
export { isEffect as $, match$5 as $a, fail$4 as $i, buildWithScope as $n, hasProperty as $o, exitInterrupt as $r, uninterruptibleMask as $t, ensuring as A, getOrUndefinedUnsafe as Aa, Array$1 as Ai, StackTrace as An, getStackTraceLimit as Ao, isDone$1 as Ar, pipe as As, result as At, fnUntraced as B, flatten$3 as Ba, isArrayNonEmpty as Bi, hasInterrupts as Bn, formatPropertyKey as Bo, succeed$2 as Br, sleep as Bt, catch_ as C, Reference as Ca, suspend$1 as Ci, isDoneCause as Cn, causeFail as Co, MinimumLogLevel as Cr, constVoid as Cs, promise as Ct, delay as D, get as Da, void_$2 as Di, Done as Dn, withFiber$1 as Do, doneUnsafe as Dr, identity as Ds, raceFirst as Dt, contextWith as E, empty$3 as Ea, updateContext$1 as Ei, nextBetween as En, exitSucceed as Eo, done$1 as Er, flow as Es, provideService as Et, filterOrFail as F, all$2 as Fa, findFirstIndex as Fi, done as Fn, toJson as Fo, failCause$2 as Fr, runSyncExit as Ft, forkIn as G, getOrNull as Ga, makeEquivalence as Gi, isReason as Gn, symbol as Go, andThen$1 as Gr, tap as Gt, forEach as H, fromNullishOr$1 as Ha, isReadonlyArrayNonEmpty as Hi, interruptors as Hn, symbolRedactable as Ho, ClockRef as Hr, succeedNone as Ht, flatMap as I, exists as Ia, findLast as Ii, fail$1 as In, format$1 as Io, interrupt$1 as Ir, scope as It, fromResult as J, isNone as Ja, of as Ji, makeFailReason as Jn, hash as Jo, contextWith$1 as Jr, timeoutOrElse as Jt, forkScoped as K, getOrThrow$1 as Ka, map$3 as Ki, isTimeoutError as Kn, array as Ko, asSome$1 as Kr, tapCause as Kt, flatMapEager as L, filter as La, flatMapNullishOr as Li, filterInterruptors as Ln, formatDate as Lo, isExit as Lr, scoped as Lt, fail as M, make$3 as Ma, appendAll as Mi, UnknownError as Mn, BaseProto as Mo, makeUnsafe$1 as Mr, Prototype$1 as Ms, runFork as Mt, failCause as N, makeUnsafe$2 as Na, empty$1 as Ni, annotate as Nn, Class$1 as No, die$2 as Nr, pipeArguments as Ns, runForkWith as Nt, die as O, getOption as Oa, DisablePropagation as Oi, IllegalArgumentError as On, assignProperties as Oo, interruptWith as Or, memoize as Os, repeat as Ot, failCauseSync as P, merge$1 as Pa, findFirst as Pi, die$1 as Pn, NodeInspectSymbol as Po, fail$2 as Pr, runSync as Pt, interruptible as Q, map$5 as Qa, headUnsafe as Qi, squash as Qn, symbol$1 as Qo, exitHasInterrupts as Qr, uninterruptible as Qt, flatten as R, flatMap$4 as Ra, fromIterable as Ri, findError as Rn, formatJson as Ro, isFailure as Rr, scopedWith as Rt, catchTags as S, zero as Sa, succeedNone$1 as Si, filterDone as Sn, args as So, CurrentLogAnnotations as Sr, constUndefined as Ss, orElseSucceed as St, context as T, add as Ta, uninterruptibleMask$1 as Ti, Random as Tn, exitFailCause as To, _await as Tr, dual as Ts, provideContext as Tt, forever as U, fromUndefinedOr as Ua, join as Ui, isCause as Un, byReferenceUnsafe as Uo, ConsoleRef as Ur, suspend as Ut, fnUntracedEager as V, fromNullOr as Va, isCanonicalArrayIndex as Vi, hasInterruptsOnly as Vn, redact as Vo, void_$1 as Vr, succeed as Vt, forkChild as W, getOrElse$1 as Wa, last as Wi, isFailReason as Wn, equals$1 as Wo, LogToStderr as Wr, sync as Wt, ignore as X, isSome as Xa, sort as Xi, map$1 as Xn, string as Xo, effectIsExit as Xr, try_ as Xt, gen as Y, isOption as Ya, reduce as Yi, makeInterruptReason as Yn, number as Yo, currentTimeMillis as Yr, tryPromise as Yt, interrupt as Z, liftThrowable as Za, empty$2 as Zi, pretty as Zn, structure as Zo, endSpan as Zr, undefined_ as Zt, catchFilter as _, nanos as _a, map$2 as _i, min as _n, Prototype as _o, close as _r, isUndefined as _s, onExit as _t, andThen as a, map$4 as aa, fiberInterruptAllAs as ai, whileLoop as an, BigInt$1 as ao, merge as ar, isNever as as, makeSpanScoped as at, catchReason as b, toMillis as ba, resolveConcurrency as bi, catchDone as bn, PipeInspectableProto as bo, makeUnsafe as br, constFalse as bs, option as bt, as as c, try_$2 as ca, fiberRunIn as ci, withParentSpan as cn, String$1 as co, orDie$1 as cr, isNotUndefined as cs, mapEager as ct, cached as d, infinity as da, getCurrentFiber as di, zipWith as dn, isLessThan as do, succeed$1 as dr, isNumber as ds, match as dt, failVoid as ea, exitVoid as ei, updateContext as en, none as eo, effect as er, isBigInt as es, logDebug as et, cachedWithTTL as f, isDuration as fa, iterateConcurrent as fi, Class as fn, isLessThanOrEqualTo as fo, succeedContext as fr, isObject as fs, matchCauseEager as ft, catchEager as g, minutes as ga, makeSpanUnsafe as gi, jittered as gn, strictEqual as go, addFinalizerExit as gr, isTagged as gs, onError as gt, catchDefect as h, millis as ha, makeLatchUnsafe as hi, isSchedule as hn, make$5 as ho, addFinalizer$1 as hr, isString as hs, never as ht, all as i, isSuccess$1 as ia, fiberInterruptAll as ii, when as in, toArray as io, fresh as ir, isIterable as is, logWarning as it, exit as j, getUnsafe$1 as ja, append as ji, TimeoutError as jn, setStackTraceLimit as jo, isDoneUnsafe as jr, Class$2 as js, retry as jt, effectify as k, getOrUndefined$1 as ka, ParentSpan as ki, NoSuchElementError as kn, assignProperty as ko, into as kr, memoizeIdempotent as ks, request as kt, asSome as l, format as la, flatMap$2 as li, withSpan as ln, isGreaterThan as lo, provide$2 as lr, isNull as ls, mapError as lt, catchCause as m, isZero as ma, makeLatch as mi, exponential as mn, Tuple as mo, Scope as mr, isPropertyKey as ms, matchEffect as mt, acquireUseRelease as n, getOrUndefined as na, fiberAwait as ni, useSpan as nn, orElseSome as no, effectDiscard as nr, isError as ns, logFatal as nt, annotateCurrentSpan as o, match$3 as oa, fiberInterruptAs as oi, withFiber as on, Date$1 as oo, mergeAll as or, isNotNull as os, map as ot, callback as p, isFinite as pa, iterateEager as pi, TaggedClass as pn, make$4 as po, unwrap as pr, isObjectKeyword as ps, matchCauseEffect as pt, fromOption as q, getOrUndefined$2 as qa, match$2 as qi, makeDieReason as qn, combine as qo, callback$1 as qr, timeout as qt, addFinalizer as r, isFailure$1 as ra, fiberInterrupt as ri, void_ as rn, some as ro, empty as rr, isFunction as rs, logInfo as rt, annotateLogs as s, succeed$4 as sa, fiberJoin as si, withLogSpan as sn, Number$1 as so, mock as sr, isNotNullish as ss, mapBothEager as st, acquireRelease as t, getOrThrow as ta, exitZipRight as ti, updateService as tn, orElse as to, effectContext as tr, isBoolean as ts, logError as tt, asVoid as u, fromInputUnsafe as ua, forkUnsafe$1 as ui, yieldNow as un, isGreaterThanOrEqualTo as uo, provideMerge as ur, isNullish as us, mapErrorEager as ut, catchIf as v, negativeInfinity as va, onExit$1 as vi, passthrough as vn, Done$1 as vo, forkUnsafe as vr, isUnknown as vs, onExitPrimitive as vt, clockWith as w, Service as wa, sync$1 as wi, matchEffect$1 as wn, exitFail as wo, TracerTimingEnabled as wr, constant as ws, provide as wt, catchTag as x, toSeconds as xa, succeed$3 as xi, doneExitFromCause as xn, TaggedError as xo, provide$3 as xr, constTrue as xs, orDie as xt, catchNoSuchElement as y, seconds as ya, onExitPrimitive$1 as yi, spaced as yn, Error$1 as yo, make as yr, or as ys, onInterrupt as yt, fn as z, flatMapNullishOr$1 as za, headNonEmpty as zi, fromReasons as zn, formatPath as zo, isSuccess as zr, serviceOption as zt };
|
|
4757
4785
|
|
|
4758
|
-
//# sourceMappingURL=Effect-
|
|
4786
|
+
//# sourceMappingURL=Effect-BmOuzEIp.mjs.map
|