apps 0.0.1-beta.3 → 0.0.1-beta.31
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/README.md +68 -44
- package/framework-reference.json +1 -1
- package/js/{chunk-RN2MXB4R.js → chunk-3FJYVAE4.js} +128 -24
- package/js/chunk-4OKYLVU4.js +118 -0
- package/js/{chunk-LGIYBDWA.js → chunk-5DLG2FVN.js} +65 -1
- package/js/{chunk-PLCMJREA.js → chunk-5JVNM3CQ.js} +60 -20
- package/js/chunk-5XJR4XGW.js +254 -0
- package/js/{chunk-FZJOYIZO.js → chunk-6KG4DZD7.js} +1 -1
- package/js/{chunk-EVJUVWN2.js → chunk-6ZJ2H6P4.js} +2 -2
- package/js/{chunk-NQ3OMCA5.js → chunk-AUFVX4KM.js} +2 -2
- package/js/{chunk-D47C7KG5.js → chunk-AYM2FUI5.js} +2 -2
- package/js/{chunk-5MQZEB6Y.js → chunk-BGALSHLT.js} +37 -12
- package/js/{chunk-QKHR7BMF.js → chunk-CJY5X26R.js} +3 -3
- package/js/{chunk-M6ZRRIBI.js → chunk-DASNNAP4.js} +1 -1
- package/js/{chunk-ZCAMUXSG.js → chunk-ETLILMHY.js} +3 -4
- package/js/{chunk-FW5HBOIK.js → chunk-EXGKN554.js} +2005 -1710
- package/js/{chunk-SATWJKN6.js → chunk-FBBXFFFJ.js} +1 -1
- package/js/{chunk-JN55AYQH.js → chunk-FULRJSWU.js} +61 -32
- package/js/{chunk-HDTGZWP2.js → chunk-GG566OOE.js} +139 -32
- package/js/chunk-GZ4UHXRT.js +92 -0
- package/js/{chunk-YEJOQEII.js → chunk-HW3DPBZR.js} +45 -7
- package/js/{chunk-HDJH3RPR.js → chunk-MFHUR5SB.js} +2 -2
- package/js/{chunk-MYYEW3RA.js → chunk-N72RKJ5E.js} +984 -61
- package/js/{chunk-WFSQXYUT.js → chunk-NPGRURDG.js} +390 -18
- package/js/chunk-OD3KFKZD.js +1617 -0
- package/js/{chunk-FDNTX5QJ.js → chunk-OX233L7N.js} +2 -2
- package/js/{chunk-G7ZIRKMK.js → chunk-QYM4STZW.js} +118 -197
- package/js/chunk-RULZPNGP.js +801 -0
- package/js/{chunk-BMOIAIVR.js → chunk-UMCMZFXW.js} +49 -1
- package/js/{chunk-J7O55ZV7.js → chunk-W7F23NQ2.js} +419 -191
- package/js/chunk-WG5DFZFT.js +42 -0
- package/js/{chunk-T2LAZCAD.js → chunk-ZOY7PDMI.js} +1 -1
- package/js/client.js +120 -84
- package/js/contracts.js +110 -16
- package/js/effect.js +20 -20
- package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
- package/js/graphql.js +58 -54
- package/js/host.js +20 -20
- package/js/index.js +247 -204
- package/js/mcp/effect.js +24 -22
- package/js/mcp/stdio.js +35 -30
- package/js/mcp.js +105 -68
- package/js/openapi.js +4087 -1503
- package/js/react.js +3 -3
- package/js/skills/effect.js +5 -3
- package/js/skills.js +15 -15
- package/js/storage/facet.js +4 -4
- package/js/ui/auth/contracts.js +2 -2
- package/js/ui/auth.js +5 -5
- package/js/ui/contracts.js +5 -4
- package/js/ui/serving.js +8516 -214
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/app-data/src/contracts/database.d.ts +33 -6
- package/types/app-data/src/implementation/schema.d.ts +2 -17
- package/types/apps/src/contracts/api-response-error.d.ts +4 -0
- package/types/apps/src/contracts/app.d.ts +7 -6
- package/types/apps/src/contracts/failure.d.ts +54 -0
- package/types/apps/src/contracts/graphql.d.ts +2 -1
- package/types/apps/src/contracts/host.d.ts +34 -11
- package/types/apps/src/contracts/mcp.d.ts +91 -10
- package/types/apps/src/contracts/network.d.ts +84 -0
- package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
- package/types/apps/src/contracts/openapi.d.ts +45 -9
- package/types/apps/src/contracts/operations.d.ts +5 -6
- package/types/apps/src/contracts/protocol-version.d.ts +2 -2
- package/types/apps/src/contracts/protocols/1.d.ts +251 -69
- package/types/apps/src/contracts/protocols/2.d.ts +710 -0
- package/types/apps/src/contracts/protocols/3.d.ts +716 -0
- package/types/apps/src/contracts/protocols/4.d.ts +1298 -0
- package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
- package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
- package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
- package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
- package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
- package/types/apps/src/contracts/provider-error.d.ts +9 -0
- package/types/apps/src/contracts/provider.d.ts +115 -10
- package/types/apps/src/contracts/router.d.ts +59 -0
- package/types/apps/src/contracts/skills.d.ts +18 -5
- package/types/apps/src/contracts/storage.d.ts +3 -3
- package/types/apps/src/contracts/ui.d.ts +18 -0
- package/types/apps/src/contracts/workflows.d.ts +34 -3
- package/types/apps/src/graphql.d.ts +1 -3
- package/types/apps/src/implementation/account-router.d.ts +12 -0
- package/types/apps/src/implementation/app.d.ts +5 -4
- package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
- package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
- package/types/apps/src/implementation/elicitation.d.ts +9 -9
- package/types/apps/src/implementation/failure-detail.d.ts +46 -0
- package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
- package/types/apps/src/implementation/graphql.d.ts +4 -3
- package/types/apps/src/implementation/input-problems.d.ts +4 -1
- package/types/apps/src/implementation/mcp-call.d.ts +6 -5
- package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
- package/types/apps/src/implementation/mcp-client.d.ts +49 -25
- package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
- package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
- package/types/apps/src/implementation/mcp.d.ts +52 -25
- package/types/apps/src/implementation/network.d.ts +16 -0
- package/types/apps/src/implementation/openapi-compile.d.ts +27 -6
- package/types/apps/src/implementation/openapi-document.d.ts +46 -19
- package/types/apps/src/implementation/openapi-names.d.ts +9 -4
- package/types/apps/src/implementation/openapi-request.d.ts +10 -2
- package/types/apps/src/implementation/openapi-source.d.ts +8 -6
- package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
- package/types/apps/src/implementation/operations.d.ts +36 -3
- package/types/apps/src/implementation/protocol-operations.d.ts +6 -4
- package/types/apps/src/implementation/provider-error.d.ts +28 -1
- package/types/apps/src/implementation/provider.d.ts +19 -5
- package/types/apps/src/implementation/router-catalog.d.ts +224 -0
- package/types/apps/src/implementation/router.d.ts +68 -0
- package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
- package/types/apps/src/implementation/schema.d.ts +80 -1
- package/types/apps/src/implementation/skills.d.ts +2 -2
- package/types/apps/src/implementation/storage.d.ts +5 -3
- package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
- package/types/apps/src/implementation/ui-client.d.ts +2 -2
- package/types/apps/src/implementation/ui-document.d.ts +5 -0
- package/types/apps/src/implementation/ui-errors.d.ts +1 -1
- package/types/apps/src/implementation/ui-serving.d.ts +10 -4
- package/types/apps/src/implementation/ui-watch.d.ts +1 -1
- package/types/apps/src/implementation/upstream-error.d.ts +7 -0
- package/types/apps/src/implementation/webhooks.d.ts +1 -1
- package/types/apps/src/implementation/workflow-context.d.ts +11 -3
- package/types/apps/src/index.d.ts +29 -11
- package/types/apps/src/mcp-stdio.d.ts +2 -5
- package/types/apps/src/mcp.d.ts +25 -5
- package/types/apps/src/openapi.d.ts +6 -6
- package/types/apps/src/skills.d.ts +4 -4
- package/types/telemetry/src/browser-operations.d.ts +5 -2
- package/types/telemetry/src/config.d.ts +2 -2
- package/types/utils/src/api-error.d.ts +48 -0
- package/js/chunk-PYUYJRSK.js +0 -93
- package/js/chunk-SWPD52J7.js +0 -35
- package/js/chunk-W7D7WVSY.js +0 -18
- package/js/chunk-Z5NMEGJN.js +0 -29
- package/js/chunk-ZJWDMTE3.js +0 -63
- package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
- package/types/apps/src/implementation/account-operations.d.ts +0 -151
- package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
|
@@ -2,84 +2,58 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-CZ7CSFO4.js";
|
|
4
4
|
|
|
5
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
6
|
-
var
|
|
7
|
-
__export(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
orElseSome: () => orElseSome,
|
|
56
|
-
partitionMap: () => partitionMap,
|
|
57
|
-
product: () => product,
|
|
58
|
-
productMany: () => productMany,
|
|
59
|
-
reduceCompact: () => reduceCompact,
|
|
60
|
-
some: () => some2,
|
|
61
|
-
tap: () => tap,
|
|
62
|
-
toArray: () => toArray,
|
|
63
|
-
toRefinement: () => toRefinement,
|
|
64
|
-
void: () => void_,
|
|
65
|
-
zipLeft: () => zipLeft,
|
|
66
|
-
zipRight: () => zipRight,
|
|
67
|
-
zipWith: () => zipWith
|
|
5
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Predicate.js
|
|
6
|
+
var Predicate_exports = {};
|
|
7
|
+
__export(Predicate_exports, {
|
|
8
|
+
Struct: () => Struct,
|
|
9
|
+
Tuple: () => Tuple,
|
|
10
|
+
and: () => and,
|
|
11
|
+
compose: () => compose,
|
|
12
|
+
eqv: () => eqv,
|
|
13
|
+
every: () => every,
|
|
14
|
+
hasProperty: () => hasProperty,
|
|
15
|
+
implies: () => implies,
|
|
16
|
+
isBigInt: () => isBigInt,
|
|
17
|
+
isBoolean: () => isBoolean,
|
|
18
|
+
isDate: () => isDate,
|
|
19
|
+
isError: () => isError,
|
|
20
|
+
isFunction: () => isFunction,
|
|
21
|
+
isIterable: () => isIterable,
|
|
22
|
+
isMap: () => isMap,
|
|
23
|
+
isNever: () => isNever,
|
|
24
|
+
isNotNull: () => isNotNull,
|
|
25
|
+
isNotNullish: () => isNotNullish,
|
|
26
|
+
isNotUndefined: () => isNotUndefined,
|
|
27
|
+
isNull: () => isNull,
|
|
28
|
+
isNullish: () => isNullish,
|
|
29
|
+
isNumber: () => isNumber,
|
|
30
|
+
isObject: () => isObject,
|
|
31
|
+
isObjectKeyword: () => isObjectKeyword,
|
|
32
|
+
isObjectOrArray: () => isObjectOrArray,
|
|
33
|
+
isPromise: () => isPromise,
|
|
34
|
+
isPromiseLike: () => isPromiseLike,
|
|
35
|
+
isPropertyKey: () => isPropertyKey,
|
|
36
|
+
isReadonlyObject: () => isReadonlyObject,
|
|
37
|
+
isRegExp: () => isRegExp,
|
|
38
|
+
isSet: () => isSet,
|
|
39
|
+
isString: () => isString,
|
|
40
|
+
isSymbol: () => isSymbol,
|
|
41
|
+
isTagged: () => isTagged,
|
|
42
|
+
isTruthy: () => isTruthy,
|
|
43
|
+
isTupleOf: () => isTupleOf,
|
|
44
|
+
isTupleOfAtLeast: () => isTupleOfAtLeast,
|
|
45
|
+
isUint8Array: () => isUint8Array,
|
|
46
|
+
isUndefined: () => isUndefined,
|
|
47
|
+
isUnknown: () => isUnknown,
|
|
48
|
+
mapInput: () => mapInput,
|
|
49
|
+
nand: () => nand,
|
|
50
|
+
nor: () => nor,
|
|
51
|
+
not: () => not,
|
|
52
|
+
or: () => or,
|
|
53
|
+
some: () => some,
|
|
54
|
+
xor: () => xor
|
|
68
55
|
});
|
|
69
56
|
|
|
70
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Combiner.js
|
|
71
|
-
function make(combine5) {
|
|
72
|
-
return {
|
|
73
|
-
combine: combine5
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function min(order) {
|
|
77
|
-
return make((self, that) => order(self, that) === -1 ? self : that);
|
|
78
|
-
}
|
|
79
|
-
function max(order) {
|
|
80
|
-
return make((self, that) => order(self, that) === 1 ? self : that);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
57
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Pipeable.js
|
|
84
58
|
var pipeArguments = (self, args2) => {
|
|
85
59
|
switch (args2.length) {
|
|
@@ -236,30 +210,19 @@ function memoizeIdempotent(f) {
|
|
|
236
210
|
};
|
|
237
211
|
}
|
|
238
212
|
|
|
239
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/equal.js
|
|
240
|
-
var getAllObjectKeys = (obj) => {
|
|
241
|
-
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
242
|
-
if (obj.constructor === Object) return keys4;
|
|
243
|
-
if (obj instanceof Error) {
|
|
244
|
-
keys4.delete("stack");
|
|
245
|
-
}
|
|
246
|
-
const proto = Object.getPrototypeOf(obj);
|
|
247
|
-
let current = proto;
|
|
248
|
-
while (current !== null && current !== Object.prototype) {
|
|
249
|
-
const ownKeys = Reflect.ownKeys(current);
|
|
250
|
-
for (let i = 0; i < ownKeys.length; i++) {
|
|
251
|
-
keys4.add(ownKeys[i]);
|
|
252
|
-
}
|
|
253
|
-
current = Object.getPrototypeOf(current);
|
|
254
|
-
}
|
|
255
|
-
if (keys4.has("constructor") && typeof obj.constructor === "function" && proto === obj.constructor.prototype) {
|
|
256
|
-
keys4.delete("constructor");
|
|
257
|
-
}
|
|
258
|
-
return keys4;
|
|
259
|
-
};
|
|
260
|
-
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
261
|
-
|
|
262
213
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Predicate.js
|
|
214
|
+
var mapInput = /* @__PURE__ */ dual(2, (self, f) => (b) => self(f(b)));
|
|
215
|
+
var isTupleOf = /* @__PURE__ */ dual(2, (self, n) => self.length === n);
|
|
216
|
+
var isTupleOfAtLeast = /* @__PURE__ */ dual(2, (self, n) => self.length >= n);
|
|
217
|
+
function isTruthy(input) {
|
|
218
|
+
return !!input;
|
|
219
|
+
}
|
|
220
|
+
function isSet(input) {
|
|
221
|
+
return input instanceof Set;
|
|
222
|
+
}
|
|
223
|
+
function isMap(input) {
|
|
224
|
+
return input instanceof Map;
|
|
225
|
+
}
|
|
263
226
|
function isString(input) {
|
|
264
227
|
return typeof input === "string";
|
|
265
228
|
}
|
|
@@ -290,6 +253,12 @@ function isNotUndefined(input) {
|
|
|
290
253
|
function isNull(input) {
|
|
291
254
|
return input === null;
|
|
292
255
|
}
|
|
256
|
+
function isNotNull(input) {
|
|
257
|
+
return input !== null;
|
|
258
|
+
}
|
|
259
|
+
function isNullish(input) {
|
|
260
|
+
return input === null || input === void 0;
|
|
261
|
+
}
|
|
293
262
|
function isNotNullish(input) {
|
|
294
263
|
return input != null;
|
|
295
264
|
}
|
|
@@ -299,9 +268,15 @@ function isNever(_) {
|
|
|
299
268
|
function isUnknown(_) {
|
|
300
269
|
return true;
|
|
301
270
|
}
|
|
271
|
+
function isObjectOrArray(input) {
|
|
272
|
+
return typeof input === "object" && input !== null;
|
|
273
|
+
}
|
|
302
274
|
function isObject(input) {
|
|
303
275
|
return typeof input === "object" && input !== null && !Array.isArray(input);
|
|
304
276
|
}
|
|
277
|
+
function isReadonlyObject(input) {
|
|
278
|
+
return isObject(input);
|
|
279
|
+
}
|
|
305
280
|
function isObjectKeyword(input) {
|
|
306
281
|
return typeof input === "object" && input !== null || isFunction(input);
|
|
307
282
|
}
|
|
@@ -310,13 +285,177 @@ var isTagged = /* @__PURE__ */ dual(2, (self, tag4) => hasProperty(self, "_tag")
|
|
|
310
285
|
function isError(input) {
|
|
311
286
|
return input instanceof Error;
|
|
312
287
|
}
|
|
288
|
+
function isUint8Array(input) {
|
|
289
|
+
return input instanceof Uint8Array;
|
|
290
|
+
}
|
|
313
291
|
function isDate(input) {
|
|
314
292
|
return input instanceof Date;
|
|
315
293
|
}
|
|
316
294
|
function isIterable(input) {
|
|
317
295
|
return hasProperty(input, Symbol.iterator) || isString(input);
|
|
318
296
|
}
|
|
297
|
+
function isPromise(input) {
|
|
298
|
+
return hasProperty(input, "then") && "catch" in input && isFunction(input.then) && isFunction(input.catch);
|
|
299
|
+
}
|
|
300
|
+
function isPromiseLike(input) {
|
|
301
|
+
return hasProperty(input, "then") && isFunction(input.then);
|
|
302
|
+
}
|
|
303
|
+
function isRegExp(input) {
|
|
304
|
+
return input instanceof RegExp;
|
|
305
|
+
}
|
|
306
|
+
var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => ab(a) && bc(a));
|
|
307
|
+
function Tuple(elements) {
|
|
308
|
+
return (as5) => {
|
|
309
|
+
for (let i = 0; i < elements.length; i++) {
|
|
310
|
+
if (elements[i](as5[i]) === false) {
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return true;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function Struct(fields) {
|
|
318
|
+
const keys4 = Object.keys(fields);
|
|
319
|
+
return (a) => {
|
|
320
|
+
for (const key of keys4) {
|
|
321
|
+
if (!fields[key](a[key])) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return true;
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function not(self) {
|
|
329
|
+
return (a) => !self(a);
|
|
330
|
+
}
|
|
319
331
|
var or = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) || that(a));
|
|
332
|
+
var and = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) && that(a));
|
|
333
|
+
var xor = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) !== that(a));
|
|
334
|
+
var eqv = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) === that(a));
|
|
335
|
+
var implies = /* @__PURE__ */ dual(2, (antecedent, consequent) => (a) => antecedent(a) ? consequent(a) : true);
|
|
336
|
+
var nor = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) || that(a)));
|
|
337
|
+
var nand = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) && that(a)));
|
|
338
|
+
function every(collection) {
|
|
339
|
+
return (a) => {
|
|
340
|
+
for (const p of collection) {
|
|
341
|
+
if (!p(a)) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return true;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function some(collection) {
|
|
349
|
+
return (a) => {
|
|
350
|
+
for (const p of collection) {
|
|
351
|
+
if (p(a)) {
|
|
352
|
+
return true;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return false;
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Option.js
|
|
360
|
+
var Option_exports = {};
|
|
361
|
+
__export(Option_exports, {
|
|
362
|
+
Do: () => Do,
|
|
363
|
+
all: () => all,
|
|
364
|
+
andThen: () => andThen,
|
|
365
|
+
as: () => as,
|
|
366
|
+
asVoid: () => asVoid,
|
|
367
|
+
bind: () => bind2,
|
|
368
|
+
bindTo: () => bindTo2,
|
|
369
|
+
composeK: () => composeK,
|
|
370
|
+
contains: () => contains,
|
|
371
|
+
containsWith: () => containsWith,
|
|
372
|
+
exists: () => exists,
|
|
373
|
+
filter: () => filter,
|
|
374
|
+
filterMap: () => filterMap,
|
|
375
|
+
firstSomeOf: () => firstSomeOf,
|
|
376
|
+
flatMap: () => flatMap,
|
|
377
|
+
flatMapNullishOr: () => flatMapNullishOr,
|
|
378
|
+
flatten: () => flatten,
|
|
379
|
+
fromIterable: () => fromIterable,
|
|
380
|
+
fromNullOr: () => fromNullOr,
|
|
381
|
+
fromNullishOr: () => fromNullishOr,
|
|
382
|
+
fromUndefinedOr: () => fromUndefinedOr,
|
|
383
|
+
gen: () => gen,
|
|
384
|
+
getFailure: () => getFailure2,
|
|
385
|
+
getOrElse: () => getOrElse,
|
|
386
|
+
getOrNull: () => getOrNull,
|
|
387
|
+
getOrThrow: () => getOrThrow,
|
|
388
|
+
getOrThrowWith: () => getOrThrowWith,
|
|
389
|
+
getOrUndefined: () => getOrUndefined,
|
|
390
|
+
getSuccess: () => getSuccess2,
|
|
391
|
+
isNone: () => isNone2,
|
|
392
|
+
isOption: () => isOption2,
|
|
393
|
+
isSome: () => isSome2,
|
|
394
|
+
let: () => let_2,
|
|
395
|
+
lift2: () => lift2,
|
|
396
|
+
liftNullishOr: () => liftNullishOr,
|
|
397
|
+
liftPredicate: () => liftPredicate,
|
|
398
|
+
liftThrowable: () => liftThrowable,
|
|
399
|
+
makeCombinerFailFast: () => makeCombinerFailFast,
|
|
400
|
+
makeEquivalence: () => makeEquivalence,
|
|
401
|
+
makeOrder: () => makeOrder,
|
|
402
|
+
makeReducer: () => makeReducer,
|
|
403
|
+
makeReducerFailFast: () => makeReducerFailFast,
|
|
404
|
+
map: () => map,
|
|
405
|
+
match: () => match,
|
|
406
|
+
none: () => none2,
|
|
407
|
+
orElse: () => orElse,
|
|
408
|
+
orElseResult: () => orElseResult,
|
|
409
|
+
orElseSome: () => orElseSome,
|
|
410
|
+
partitionMap: () => partitionMap,
|
|
411
|
+
product: () => product,
|
|
412
|
+
productMany: () => productMany,
|
|
413
|
+
reduceCompact: () => reduceCompact,
|
|
414
|
+
some: () => some3,
|
|
415
|
+
tap: () => tap,
|
|
416
|
+
toArray: () => toArray,
|
|
417
|
+
toRefinement: () => toRefinement,
|
|
418
|
+
void: () => void_,
|
|
419
|
+
zipLeft: () => zipLeft,
|
|
420
|
+
zipRight: () => zipRight,
|
|
421
|
+
zipWith: () => zipWith
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Combiner.js
|
|
425
|
+
function make(combine5) {
|
|
426
|
+
return {
|
|
427
|
+
combine: combine5
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function min(order) {
|
|
431
|
+
return make((self, that) => order(self, that) === -1 ? self : that);
|
|
432
|
+
}
|
|
433
|
+
function max(order) {
|
|
434
|
+
return make((self, that) => order(self, that) === 1 ? self : that);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/equal.js
|
|
438
|
+
var getAllObjectKeys = (obj) => {
|
|
439
|
+
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
440
|
+
if (obj.constructor === Object) return keys4;
|
|
441
|
+
if (obj instanceof Error) {
|
|
442
|
+
keys4.delete("stack");
|
|
443
|
+
}
|
|
444
|
+
const proto = Object.getPrototypeOf(obj);
|
|
445
|
+
let current = proto;
|
|
446
|
+
while (current !== null && current !== Object.prototype) {
|
|
447
|
+
const ownKeys = Reflect.ownKeys(current);
|
|
448
|
+
for (let i = 0; i < ownKeys.length; i++) {
|
|
449
|
+
keys4.add(ownKeys[i]);
|
|
450
|
+
}
|
|
451
|
+
current = Object.getPrototypeOf(current);
|
|
452
|
+
}
|
|
453
|
+
if (keys4.has("constructor") && typeof obj.constructor === "function" && proto === obj.constructor.prototype) {
|
|
454
|
+
keys4.delete("constructor");
|
|
455
|
+
}
|
|
456
|
+
return keys4;
|
|
457
|
+
};
|
|
458
|
+
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
320
459
|
|
|
321
460
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Hash.js
|
|
322
461
|
var symbol = "~effect/Hash";
|
|
@@ -648,7 +787,7 @@ function make2(combine5, initialValue, combineAll) {
|
|
|
648
787
|
var make3 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
649
788
|
var isStrictEquivalent = (x, y) => x === y;
|
|
650
789
|
var strictEqual = () => isStrictEquivalent;
|
|
651
|
-
function
|
|
790
|
+
function Tuple2(elements) {
|
|
652
791
|
return make3((self, that) => {
|
|
653
792
|
if (self.length !== that.length) {
|
|
654
793
|
return false;
|
|
@@ -1421,7 +1560,7 @@ var SomeImpl = function(value6) {
|
|
|
1421
1560
|
this.value = value6;
|
|
1422
1561
|
};
|
|
1423
1562
|
SomeImpl.prototype = SomeProto;
|
|
1424
|
-
var
|
|
1563
|
+
var some2 = (value6) => new SomeImpl(value6);
|
|
1425
1564
|
|
|
1426
1565
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/result.js
|
|
1427
1566
|
var TypeId2 = "~effect/Result";
|
|
@@ -1489,8 +1628,8 @@ var SuccessImpl = function(success) {
|
|
|
1489
1628
|
};
|
|
1490
1629
|
SuccessImpl.prototype = SuccessProto;
|
|
1491
1630
|
var succeed = (success) => new SuccessImpl(success);
|
|
1492
|
-
var getFailure = (self) => isSuccess(self) ? none :
|
|
1493
|
-
var getSuccess = (self) => isFailure(self) ? none :
|
|
1631
|
+
var getFailure = (self) => isSuccess(self) ? none : some2(self.failure);
|
|
1632
|
+
var getSuccess = (self) => isFailure(self) ? none : some2(self.success);
|
|
1494
1633
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone2) => isNone(self) ? fail(onNone2()) : succeed(self.value));
|
|
1495
1634
|
|
|
1496
1635
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Order.js
|
|
@@ -1505,8 +1644,8 @@ var Number2 = /* @__PURE__ */ make4((self, that) => {
|
|
|
1505
1644
|
return self < that ? -1 : 1;
|
|
1506
1645
|
});
|
|
1507
1646
|
var BigInt2 = /* @__PURE__ */ make4((self, that) => self < that ? -1 : 1);
|
|
1508
|
-
var
|
|
1509
|
-
var Date2 = /* @__PURE__ */
|
|
1647
|
+
var mapInput2 = /* @__PURE__ */ dual(2, (self, f) => make4((b1, b2) => self(f(b1), f(b2))));
|
|
1648
|
+
var Date2 = /* @__PURE__ */ mapInput2(Number2, (date2) => date2.getTime());
|
|
1510
1649
|
var isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
|
|
1511
1650
|
var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
1512
1651
|
var isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
@@ -1518,7 +1657,7 @@ var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.m
|
|
|
1518
1657
|
|
|
1519
1658
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Option.js
|
|
1520
1659
|
var none2 = () => none;
|
|
1521
|
-
var
|
|
1660
|
+
var some3 = some2;
|
|
1522
1661
|
var isOption2 = isOption;
|
|
1523
1662
|
var isNone2 = isNone;
|
|
1524
1663
|
var isSome2 = isSome;
|
|
@@ -1529,7 +1668,7 @@ var match = /* @__PURE__ */ dual(2, (self, {
|
|
|
1529
1668
|
var toRefinement = (f) => (a) => isSome2(f(a));
|
|
1530
1669
|
var fromIterable = (collection) => {
|
|
1531
1670
|
for (const a of collection) {
|
|
1532
|
-
return
|
|
1671
|
+
return some3(a);
|
|
1533
1672
|
}
|
|
1534
1673
|
return none2();
|
|
1535
1674
|
};
|
|
@@ -1537,7 +1676,7 @@ var getSuccess2 = getSuccess;
|
|
|
1537
1676
|
var getFailure2 = getFailure;
|
|
1538
1677
|
var getOrElse = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ? onNone2() : self.value);
|
|
1539
1678
|
var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : self);
|
|
1540
|
-
var orElseSome = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ?
|
|
1679
|
+
var orElseSome = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ? some3(onNone2()) : self);
|
|
1541
1680
|
var orElseResult = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? map(that(), succeed) : map(self, fail));
|
|
1542
1681
|
var firstSomeOf = (collection) => {
|
|
1543
1682
|
let out = none2();
|
|
@@ -1548,15 +1687,15 @@ var firstSomeOf = (collection) => {
|
|
|
1548
1687
|
}
|
|
1549
1688
|
return out;
|
|
1550
1689
|
};
|
|
1551
|
-
var fromNullishOr = (a) => a == null ? none2() :
|
|
1552
|
-
var fromUndefinedOr = (a) => a === void 0 ? none2() :
|
|
1553
|
-
var fromNullOr = (a) => a === null ? none2() :
|
|
1690
|
+
var fromNullishOr = (a) => a == null ? none2() : some3(a);
|
|
1691
|
+
var fromUndefinedOr = (a) => a === void 0 ? none2() : some3(a);
|
|
1692
|
+
var fromNullOr = (a) => a === null ? none2() : some3(a);
|
|
1554
1693
|
var liftNullishOr = (f) => (...a) => fromNullishOr(f(...a));
|
|
1555
1694
|
var getOrNull = /* @__PURE__ */ getOrElse(constNull);
|
|
1556
1695
|
var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
|
|
1557
1696
|
var liftThrowable = (f) => (...a) => {
|
|
1558
1697
|
try {
|
|
1559
|
-
return
|
|
1698
|
+
return some3(f(...a));
|
|
1560
1699
|
} catch {
|
|
1561
1700
|
return none2();
|
|
1562
1701
|
}
|
|
@@ -1568,14 +1707,14 @@ var getOrThrowWith = /* @__PURE__ */ dual(2, (self, onNone2) => {
|
|
|
1568
1707
|
throw onNone2();
|
|
1569
1708
|
});
|
|
1570
1709
|
var getOrThrow = /* @__PURE__ */ getOrThrowWith(() => new Error("getOrThrow called on a None"));
|
|
1571
|
-
var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() :
|
|
1710
|
+
var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some3(f(self.value)));
|
|
1572
1711
|
var as = /* @__PURE__ */ dual(2, (self, b) => map(self, () => b));
|
|
1573
1712
|
var asVoid = /* @__PURE__ */ as(void 0);
|
|
1574
|
-
var void_ = /* @__PURE__ */
|
|
1713
|
+
var void_ = /* @__PURE__ */ some3(void 0);
|
|
1575
1714
|
var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
|
|
1576
1715
|
var andThen = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => {
|
|
1577
1716
|
const b = isFunction(f) ? f(a) : f;
|
|
1578
|
-
return isOption2(b) ? b :
|
|
1717
|
+
return isOption2(b) ? b : some3(b);
|
|
1579
1718
|
}));
|
|
1580
1719
|
var flatMapNullishOr = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : fromNullishOr(f(self.value)));
|
|
1581
1720
|
var flatten = /* @__PURE__ */ flatMap(identity);
|
|
@@ -1583,7 +1722,7 @@ var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap(self, () => that)
|
|
|
1583
1722
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => tap(self, () => that));
|
|
1584
1723
|
var composeK = /* @__PURE__ */ dual(2, (afb, bfc) => (a) => flatMap(afb(a), bfc));
|
|
1585
1724
|
var tap = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => map(f(a), () => a)));
|
|
1586
|
-
var product = (self, that) => isSome2(self) && isSome2(that) ?
|
|
1725
|
+
var product = (self, that) => isSome2(self) && isSome2(that) ? some3([self.value, that.value]) : none2();
|
|
1587
1726
|
var productMany = (self, collection) => {
|
|
1588
1727
|
if (isNone2(self)) {
|
|
1589
1728
|
return none2();
|
|
@@ -1595,7 +1734,7 @@ var productMany = (self, collection) => {
|
|
|
1595
1734
|
}
|
|
1596
1735
|
out.push(o.value);
|
|
1597
1736
|
}
|
|
1598
|
-
return
|
|
1737
|
+
return some3(out);
|
|
1599
1738
|
};
|
|
1600
1739
|
var all = (input) => {
|
|
1601
1740
|
if (Symbol.iterator in input) {
|
|
@@ -1606,7 +1745,7 @@ var all = (input) => {
|
|
|
1606
1745
|
}
|
|
1607
1746
|
out2.push(o.value);
|
|
1608
1747
|
}
|
|
1609
|
-
return
|
|
1748
|
+
return some3(out2);
|
|
1610
1749
|
}
|
|
1611
1750
|
const out = {};
|
|
1612
1751
|
for (const key of Object.keys(input)) {
|
|
@@ -1616,7 +1755,7 @@ var all = (input) => {
|
|
|
1616
1755
|
}
|
|
1617
1756
|
assignProperty(out, key, o.value);
|
|
1618
1757
|
}
|
|
1619
|
-
return
|
|
1758
|
+
return some3(out);
|
|
1620
1759
|
};
|
|
1621
1760
|
var zipWith = /* @__PURE__ */ dual(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b)));
|
|
1622
1761
|
var reduceCompact = /* @__PURE__ */ dual(3, (self, b, f) => {
|
|
@@ -1634,27 +1773,27 @@ var partitionMap = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
1634
1773
|
return [none2(), none2()];
|
|
1635
1774
|
}
|
|
1636
1775
|
const e = f(self.value);
|
|
1637
|
-
return isFailure(e) ? [
|
|
1776
|
+
return isFailure(e) ? [some3(e.failure), none2()] : [none2(), some3(e.success)];
|
|
1638
1777
|
});
|
|
1639
1778
|
var filterMap = /* @__PURE__ */ dual(2, (self, f) => {
|
|
1640
1779
|
if (isNone2(self)) {
|
|
1641
1780
|
return none2();
|
|
1642
1781
|
}
|
|
1643
1782
|
const next2 = f(self.value);
|
|
1644
|
-
return isSuccess(next2) ?
|
|
1783
|
+
return isSuccess(next2) ? some3(next2.success) : none2();
|
|
1645
1784
|
});
|
|
1646
|
-
var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ?
|
|
1785
|
+
var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some3(self.value) : none2());
|
|
1647
1786
|
var makeEquivalence = (isEquivalent) => make3((x, y) => isNone2(x) ? isNone2(y) : isNone2(y) ? false : isEquivalent(x.value, y.value));
|
|
1648
1787
|
var makeOrder = (O) => make4((self, that) => isSome2(self) ? isSome2(that) ? O(self.value, that.value) : 1 : -1);
|
|
1649
1788
|
var lift2 = (f) => dual(2, (self, that) => zipWith(self, that, f));
|
|
1650
|
-
var liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ?
|
|
1789
|
+
var liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ? some3(b) : none2());
|
|
1651
1790
|
var containsWith = (isEquivalent) => dual(2, (self, a) => isNone2(self) ? false : isEquivalent(self.value, a));
|
|
1652
1791
|
var contains = /* @__PURE__ */ containsWith(/* @__PURE__ */ asEquivalence());
|
|
1653
1792
|
var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false : refinement(self.value));
|
|
1654
1793
|
var bindTo2 = /* @__PURE__ */ bindTo(map);
|
|
1655
1794
|
var let_2 = /* @__PURE__ */ let_(map);
|
|
1656
1795
|
var bind2 = /* @__PURE__ */ bind(map, flatMap);
|
|
1657
|
-
var Do = /* @__PURE__ */
|
|
1796
|
+
var Do = /* @__PURE__ */ some3({});
|
|
1658
1797
|
var gen = (...args2) => {
|
|
1659
1798
|
const f = args2.length === 1 ? args2[0] : args2[1].bind(args2[0]);
|
|
1660
1799
|
const iterator = f();
|
|
@@ -1666,24 +1805,24 @@ var gen = (...args2) => {
|
|
|
1666
1805
|
}
|
|
1667
1806
|
state = iterator.next(current.value);
|
|
1668
1807
|
}
|
|
1669
|
-
return
|
|
1808
|
+
return some3(state.value);
|
|
1670
1809
|
};
|
|
1671
1810
|
function makeReducer(combiner) {
|
|
1672
1811
|
return make2((self, that) => {
|
|
1673
1812
|
if (isNone2(self)) return that;
|
|
1674
1813
|
if (isNone2(that)) return self;
|
|
1675
|
-
return
|
|
1814
|
+
return some3(combiner.combine(self.value, that.value));
|
|
1676
1815
|
}, none2());
|
|
1677
1816
|
}
|
|
1678
1817
|
function makeCombinerFailFast(combiner) {
|
|
1679
1818
|
return make((self, that) => {
|
|
1680
1819
|
if (isNone2(self) || isNone2(that)) return none2();
|
|
1681
|
-
return
|
|
1820
|
+
return some3(combiner.combine(self.value, that.value));
|
|
1682
1821
|
});
|
|
1683
1822
|
}
|
|
1684
1823
|
function makeReducerFailFast(reducer) {
|
|
1685
1824
|
const combine5 = makeCombinerFailFast(reducer).combine;
|
|
1686
|
-
const initialValue =
|
|
1825
|
+
const initialValue = some3(reducer.initialValue);
|
|
1687
1826
|
return make2(combine5, initialValue, (collection) => {
|
|
1688
1827
|
let out = initialValue;
|
|
1689
1828
|
for (const value6 of collection) {
|
|
@@ -1918,8 +2057,8 @@ var serviceNotFoundError = (service4) => {
|
|
|
1918
2057
|
};
|
|
1919
2058
|
var getOption = /* @__PURE__ */ dual(2, (self, service4) => {
|
|
1920
2059
|
const value6 = lookup(self, service4.key);
|
|
1921
|
-
if (value6 !== notFound) return
|
|
1922
|
-
return isReference(service4) ?
|
|
2060
|
+
if (value6 !== notFound) return some3(value6);
|
|
2061
|
+
return isReference(service4) ? some3(getDefaultValue(service4)) : none2();
|
|
1923
2062
|
});
|
|
1924
2063
|
var merge = /* @__PURE__ */ dual(2, (self, that) => {
|
|
1925
2064
|
if (self.mapUnsafe.size === 0) return that;
|
|
@@ -2276,11 +2415,11 @@ var bind3 = /* @__PURE__ */ bind(map2, flatMap2);
|
|
|
2276
2415
|
var bindTo3 = /* @__PURE__ */ bindTo(map2);
|
|
2277
2416
|
var let_3 = /* @__PURE__ */ let_(map2);
|
|
2278
2417
|
var transposeOption = (self) => {
|
|
2279
|
-
return isNone(self) ? succeedNone : map2(self.value,
|
|
2418
|
+
return isNone(self) ? succeedNone : map2(self.value, some2);
|
|
2280
2419
|
};
|
|
2281
|
-
var transposeMapOption = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? succeedNone : map2(f(self.value),
|
|
2420
|
+
var transposeMapOption = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? succeedNone : map2(f(self.value), some2));
|
|
2282
2421
|
var succeedNone = /* @__PURE__ */ succeed2(none);
|
|
2283
|
-
var succeedSome = (a) => succeed2(
|
|
2422
|
+
var succeedSome = (a) => succeed2(some2(a));
|
|
2284
2423
|
var tap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
2285
2424
|
if (isSuccess2(self)) {
|
|
2286
2425
|
f(self.success);
|
|
@@ -2289,7 +2428,7 @@ var tap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
2289
2428
|
});
|
|
2290
2429
|
|
|
2291
2430
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Tuple.js
|
|
2292
|
-
var makeEquivalence3 =
|
|
2431
|
+
var makeEquivalence3 = Tuple2;
|
|
2293
2432
|
|
|
2294
2433
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Iterable.js
|
|
2295
2434
|
var makeBy = (f, options) => {
|
|
@@ -2330,7 +2469,7 @@ var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
2330
2469
|
const o = f(a, i);
|
|
2331
2470
|
if (isBoolean(o)) {
|
|
2332
2471
|
if (o) {
|
|
2333
|
-
return
|
|
2472
|
+
return some3(a);
|
|
2334
2473
|
}
|
|
2335
2474
|
} else {
|
|
2336
2475
|
if (isSome2(o)) {
|
|
@@ -3003,16 +3142,16 @@ var divide = /* @__PURE__ */ dual(2, (self, by) => {
|
|
|
3003
3142
|
if (!Number.isFinite(by)) return none2();
|
|
3004
3143
|
if (by === 0 || Object.is(by, -0)) return none2();
|
|
3005
3144
|
return match3(self, {
|
|
3006
|
-
onMillis: (millis2) =>
|
|
3145
|
+
onMillis: (millis2) => some3(make6(millis2 / by)),
|
|
3007
3146
|
onNanos: (nanos2) => {
|
|
3008
3147
|
try {
|
|
3009
|
-
return
|
|
3148
|
+
return some3(make6(nanos2 / BigInt(by)));
|
|
3010
3149
|
} catch {
|
|
3011
3150
|
return none2();
|
|
3012
3151
|
}
|
|
3013
3152
|
},
|
|
3014
|
-
onInfinity: () =>
|
|
3015
|
-
onNegativeInfinity: () =>
|
|
3153
|
+
onInfinity: () => some3(by > 0 ? infinity : negativeInfinity),
|
|
3154
|
+
onNegativeInfinity: () => some3(by > 0 ? negativeInfinity : infinity)
|
|
3016
3155
|
});
|
|
3017
3156
|
});
|
|
3018
3157
|
var divideUnsafe = /* @__PURE__ */ dual(2, (self, by) => {
|
|
@@ -3153,7 +3292,7 @@ var CombinerMin = /* @__PURE__ */ min(Order);
|
|
|
3153
3292
|
var fromPredicate = (predicate) => (input) => predicate(input) ? succeed2(input) : fail2(input);
|
|
3154
3293
|
var toPredicate = (self) => (input) => !isFailure2(self(input));
|
|
3155
3294
|
var has2 = (key) => (input) => input.has(key) ? succeed2(input) : fail2(input);
|
|
3156
|
-
var
|
|
3295
|
+
var compose2 = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
3157
3296
|
const leftOut = left(input);
|
|
3158
3297
|
if (isFailure2(leftOut)) return leftOut;
|
|
3159
3298
|
return right(leftOut.success);
|
|
@@ -3167,7 +3306,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
|
3167
3306
|
});
|
|
3168
3307
|
var toOption = (self) => (input) => {
|
|
3169
3308
|
const result6 = self(input);
|
|
3170
|
-
return isFailure2(result6) ? none2() :
|
|
3309
|
+
return isFailure2(result6) ? none2() : some3(result6.success);
|
|
3171
3310
|
};
|
|
3172
3311
|
|
|
3173
3312
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Tracer.js
|
|
@@ -4288,9 +4427,9 @@ var yieldNowWith = /* @__PURE__ */ makePrimitive({
|
|
|
4288
4427
|
}
|
|
4289
4428
|
});
|
|
4290
4429
|
var yieldNow = /* @__PURE__ */ yieldNowWith(0);
|
|
4291
|
-
var succeedSome2 = (a) => succeed3(
|
|
4430
|
+
var succeedSome2 = (a) => succeed3(some3(a));
|
|
4292
4431
|
var succeedNone2 = /* @__PURE__ */ succeed3(/* @__PURE__ */ none2());
|
|
4293
|
-
var transposeOption2 = (self) => isNone2(self) ? succeedNone2 : map5(self.value,
|
|
4432
|
+
var transposeOption2 = (self) => isNone2(self) ? succeedNone2 : map5(self.value, some3);
|
|
4294
4433
|
var failCauseSync = (evaluate2) => suspend(() => failCause(internalCall(evaluate2)));
|
|
4295
4434
|
var die = (defect) => exitDie(defect);
|
|
4296
4435
|
var failSync = (error) => suspend(() => fail3(internalCall(error)));
|
|
@@ -4566,7 +4705,7 @@ var tapCont = function(value6) {
|
|
|
4566
4705
|
var tapEffectCont = function(value6) {
|
|
4567
4706
|
return new ContImpl(this.payload, returnPayload, exitSucceed(value6));
|
|
4568
4707
|
};
|
|
4569
|
-
var asSome = (self) => map5(self,
|
|
4708
|
+
var asSome = (self) => map5(self, some3);
|
|
4570
4709
|
var flip2 = (self) => matchEffect(self, {
|
|
4571
4710
|
onFailure: succeed3,
|
|
4572
4711
|
onSuccess: fail3
|
|
@@ -4710,11 +4849,11 @@ var exitAsVoidAll = (exits) => {
|
|
|
4710
4849
|
}
|
|
4711
4850
|
return failures.length === 0 ? exitVoid : exitFailCause(causeFromReasons(failures));
|
|
4712
4851
|
};
|
|
4713
|
-
var exitGetSuccess = (self) => exitIsSuccess(self) ?
|
|
4714
|
-
var exitGetCause = (self) => exitIsFailure(self) ?
|
|
4852
|
+
var exitGetSuccess = (self) => exitIsSuccess(self) ? some3(self.value) : none2();
|
|
4853
|
+
var exitGetCause = (self) => exitIsFailure(self) ? some3(self.cause) : none2();
|
|
4715
4854
|
var exitFindErrorOption = (self) => {
|
|
4716
4855
|
const error = exitFindError(self);
|
|
4717
|
-
return isFailure2(error) ? none2() :
|
|
4856
|
+
return isFailure2(error) ? none2() : some3(error.success);
|
|
4718
4857
|
};
|
|
4719
4858
|
var service = (service4) => service4;
|
|
4720
4859
|
var serviceOption = (service4) => withFiber((fiber3) => succeed3(getOption(fiber3.context, service4)));
|
|
@@ -4928,7 +5067,7 @@ var ignoreCause = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, opt
|
|
|
4928
5067
|
});
|
|
4929
5068
|
var option = (self) => match4(self, {
|
|
4930
5069
|
onFailure: none2,
|
|
4931
|
-
onSuccess:
|
|
5070
|
+
onSuccess: some3
|
|
4932
5071
|
});
|
|
4933
5072
|
var result = (self) => matchEager(self, {
|
|
4934
5073
|
onFailure: fail2,
|
|
@@ -5347,7 +5486,7 @@ var findFirst3 = /* @__PURE__ */ dual((args2) => isIterable(args2[0]) && !isEffe
|
|
|
5347
5486
|
}));
|
|
5348
5487
|
var findFirstLoop = (iterator, index2, predicate, value6) => flatMap3(predicate(value6, index2), (keep) => {
|
|
5349
5488
|
if (keep) {
|
|
5350
|
-
return succeed3(
|
|
5489
|
+
return succeed3(some3(value6));
|
|
5351
5490
|
}
|
|
5352
5491
|
const next2 = iterator.next();
|
|
5353
5492
|
if (!next2.done) {
|
|
@@ -5365,7 +5504,7 @@ var findFirstFilter = /* @__PURE__ */ dual((args2) => isIterable(args2[0]) && !i
|
|
|
5365
5504
|
}));
|
|
5366
5505
|
var findFirstFilterLoop = (iterator, index2, filter11, value6) => flatMap3(filter11(value6, index2), (result6) => {
|
|
5367
5506
|
if (isSuccess2(result6)) {
|
|
5368
|
-
return succeed3(
|
|
5507
|
+
return succeed3(some3(result6.success));
|
|
5369
5508
|
}
|
|
5370
5509
|
const next2 = iterator.next();
|
|
5371
5510
|
if (!next2.done) {
|
|
@@ -5720,8 +5859,8 @@ var runPromiseExitWith = (context3) => {
|
|
|
5720
5859
|
const runFork3 = runForkWith(context3);
|
|
5721
5860
|
return (effect2, options) => {
|
|
5722
5861
|
const fiber3 = runFork3(effect2, options);
|
|
5723
|
-
return new Promise((
|
|
5724
|
-
fiber3.addObserver((exit3) =>
|
|
5862
|
+
return new Promise((resolve5) => {
|
|
5863
|
+
fiber3.addObserver((exit3) => resolve5(exit3));
|
|
5725
5864
|
});
|
|
5726
5865
|
};
|
|
5727
5866
|
};
|
|
@@ -5871,11 +6010,11 @@ var NoopSpanProto = {
|
|
|
5871
6010
|
var noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
5872
6011
|
var filterDisablePropagation = (span2) => {
|
|
5873
6012
|
if (!span2) return none2();
|
|
5874
|
-
return get(span2.annotations, DisablePropagation) ? span2._tag === "Span" ? filterDisablePropagation(getOrUndefined(span2.parent)) : none2() :
|
|
6013
|
+
return get(span2.annotations, DisablePropagation) ? span2._tag === "Span" ? filterDisablePropagation(getOrUndefined(span2.parent)) : none2() : some3(span2);
|
|
5875
6014
|
};
|
|
5876
6015
|
var makeSpanUnsafe = (fiber3, name, options) => {
|
|
5877
6016
|
const disablePropagation = !fiber3.getRef(TracerEnabled) || options?.annotations && get(options.annotations, DisablePropagation);
|
|
5878
|
-
const parent = options?.parent !== void 0 ?
|
|
6017
|
+
const parent = options?.parent !== void 0 ? some3(options.parent) : options?.root ? none2() : filterDisablePropagation(fiber3.cache.span);
|
|
5879
6018
|
let span2;
|
|
5880
6019
|
if (disablePropagation) {
|
|
5881
6020
|
span2 = noopSpan({
|
|
@@ -6167,7 +6306,7 @@ var logLevelToOrder = (level) => {
|
|
|
6167
6306
|
return Number.MAX_SAFE_INTEGER;
|
|
6168
6307
|
}
|
|
6169
6308
|
};
|
|
6170
|
-
var LogLevelOrder = /* @__PURE__ */
|
|
6309
|
+
var LogLevelOrder = /* @__PURE__ */ mapInput2(Number2, logLevelToOrder);
|
|
6171
6310
|
var isLogLevelGreaterThan = /* @__PURE__ */ isGreaterThan(LogLevelOrder);
|
|
6172
6311
|
var CurrentLoggers = /* @__PURE__ */ Reference("effect/Logger/CurrentLoggers", {
|
|
6173
6312
|
defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger])
|
|
@@ -6564,17 +6703,32 @@ var doneUnsafe = (self, effect2) => {
|
|
|
6564
6703
|
};
|
|
6565
6704
|
var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap3(exit(restore(self)), (exit3) => done2(deferred, exit3))));
|
|
6566
6705
|
|
|
6567
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
6568
|
-
var
|
|
6569
|
-
__export(
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6706
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Clock.js
|
|
6707
|
+
var Clock_exports = {};
|
|
6708
|
+
__export(Clock_exports, {
|
|
6709
|
+
Clock: () => Clock,
|
|
6710
|
+
clockWith: () => clockWith2,
|
|
6711
|
+
currentTimeMillis: () => currentTimeMillis2,
|
|
6712
|
+
currentTimeNanos: () => currentTimeNanos2,
|
|
6713
|
+
monotonicTimeNanos: () => monotonicTimeNanos2
|
|
6714
|
+
});
|
|
6715
|
+
var Clock = ClockRef;
|
|
6716
|
+
var clockWith2 = clockWith;
|
|
6717
|
+
var currentTimeMillis2 = currentTimeMillis;
|
|
6718
|
+
var currentTimeNanos2 = currentTimeNanos;
|
|
6719
|
+
var monotonicTimeNanos2 = monotonicTimeNanos;
|
|
6720
|
+
|
|
6721
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Effect.js
|
|
6722
|
+
var Effect_exports = {};
|
|
6723
|
+
__export(Effect_exports, {
|
|
6724
|
+
Do: () => Do4,
|
|
6725
|
+
Transaction: () => Transaction,
|
|
6726
|
+
TypeId: () => TypeId14,
|
|
6727
|
+
abortSignal: () => abortSignal2,
|
|
6728
|
+
acquireDisposable: () => acquireDisposable2,
|
|
6729
|
+
acquireRelease: () => acquireRelease2,
|
|
6730
|
+
acquireUseRelease: () => acquireUseRelease2,
|
|
6731
|
+
addFinalizer: () => addFinalizer3,
|
|
6578
6732
|
all: () => all4,
|
|
6579
6733
|
andThen: () => andThen4,
|
|
6580
6734
|
annotateCurrentSpan: () => annotateCurrentSpan2,
|
|
@@ -7356,21 +7510,6 @@ __export(Cron_exports, {
|
|
|
7356
7510
|
sequence: () => sequence
|
|
7357
7511
|
});
|
|
7358
7512
|
|
|
7359
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Clock.js
|
|
7360
|
-
var Clock_exports = {};
|
|
7361
|
-
__export(Clock_exports, {
|
|
7362
|
-
Clock: () => Clock,
|
|
7363
|
-
clockWith: () => clockWith2,
|
|
7364
|
-
currentTimeMillis: () => currentTimeMillis2,
|
|
7365
|
-
currentTimeNanos: () => currentTimeNanos2,
|
|
7366
|
-
monotonicTimeNanos: () => monotonicTimeNanos2
|
|
7367
|
-
});
|
|
7368
|
-
var Clock = ClockRef;
|
|
7369
|
-
var clockWith2 = clockWith;
|
|
7370
|
-
var currentTimeMillis2 = currentTimeMillis;
|
|
7371
|
-
var currentTimeNanos2 = currentTimeNanos;
|
|
7372
|
-
var monotonicTimeNanos2 = monotonicTimeNanos;
|
|
7373
|
-
|
|
7374
7513
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/dateTime.js
|
|
7375
7514
|
var TypeId9 = "~effect/DateTime";
|
|
7376
7515
|
var TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
@@ -7619,7 +7758,7 @@ var offsetZoneRegExp = /^(?:GMT|[+-])/;
|
|
|
7619
7758
|
var zoneFromString = (zone) => {
|
|
7620
7759
|
if (offsetZoneRegExp.test(zone)) {
|
|
7621
7760
|
const offset = parseOffset(zone);
|
|
7622
|
-
return offset === null ? none2() :
|
|
7761
|
+
return offset === null ? none2() : some3(zoneMakeOffset(offset));
|
|
7623
7762
|
}
|
|
7624
7763
|
return zoneMakeNamed(zone);
|
|
7625
7764
|
};
|
|
@@ -7843,19 +7982,19 @@ var nextPow2 = (n) => {
|
|
|
7843
7982
|
};
|
|
7844
7983
|
var parse = (s) => {
|
|
7845
7984
|
if (s === "NaN") {
|
|
7846
|
-
return
|
|
7985
|
+
return some3(NaN);
|
|
7847
7986
|
}
|
|
7848
7987
|
if (s === "Infinity") {
|
|
7849
|
-
return
|
|
7988
|
+
return some3(Infinity);
|
|
7850
7989
|
}
|
|
7851
7990
|
if (s === "-Infinity") {
|
|
7852
|
-
return
|
|
7991
|
+
return some3(-Infinity);
|
|
7853
7992
|
}
|
|
7854
7993
|
if (s.trim() === "") {
|
|
7855
7994
|
return none2();
|
|
7856
7995
|
}
|
|
7857
7996
|
const n = Number3(s);
|
|
7858
|
-
return Number3.isNaN(n) ? none2() :
|
|
7997
|
+
return Number3.isNaN(n) ? none2() : some3(n);
|
|
7859
7998
|
};
|
|
7860
7999
|
|
|
7861
8000
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/String.js
|
|
@@ -8818,7 +8957,7 @@ var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule4, orElse6) => flatMap
|
|
|
8818
8957
|
meta = meta_;
|
|
8819
8958
|
})), {
|
|
8820
8959
|
disableYield: true
|
|
8821
|
-
}), (error) => isDone(error) ? succeed3(error.value) : orElse6(error, meta.attempt === 0 ? none2() :
|
|
8960
|
+
}), (error) => isDone(error) ? succeed3(error.value) : orElse6(error, meta.attempt === 0 ? none2() : some3(meta)));
|
|
8822
8961
|
}));
|
|
8823
8962
|
var retryOrElse = /* @__PURE__ */ dual(3, (self, policy, orElse6) => flatMap3(toStepWithMetadata(policy), (step) => {
|
|
8824
8963
|
let meta = CurrentMetadata2.defaultValue();
|
|
@@ -9140,7 +9279,7 @@ __export(Metric_exports, {
|
|
|
9140
9279
|
histogram: () => histogram,
|
|
9141
9280
|
isMetric: () => isMetric,
|
|
9142
9281
|
linearBoundaries: () => linearBoundaries,
|
|
9143
|
-
mapInput: () =>
|
|
9282
|
+
mapInput: () => mapInput3,
|
|
9144
9283
|
modify: () => modify,
|
|
9145
9284
|
snapshot: () => snapshot,
|
|
9146
9285
|
snapshotUnsafe: () => snapshotUnsafe,
|
|
@@ -9453,7 +9592,7 @@ var counter = (name, options) => new CounterMetric(name, options);
|
|
|
9453
9592
|
var gauge = (name, options) => new GaugeMetric(name, options);
|
|
9454
9593
|
var frequency = (name, options) => new FrequencyMetric(name, options);
|
|
9455
9594
|
var histogram = (name, options) => new HistogramMetric(name, options);
|
|
9456
|
-
var summary = (name, options) =>
|
|
9595
|
+
var summary = (name, options) => mapInput3(summaryWithTimestamp(name, options), (input, context3) => [input, get(context3, ClockRef).currentTimeMillisUnsafe()]);
|
|
9457
9596
|
var summaryWithTimestamp = (name, options) => new SummaryMetric(name, options);
|
|
9458
9597
|
var timer = (name, options) => {
|
|
9459
9598
|
const boundaries = isNotUndefined(options?.boundaries) ? options.boundaries : exponentialBoundaries({
|
|
@@ -9469,13 +9608,13 @@ var timer = (name, options) => {
|
|
|
9469
9608
|
boundaries,
|
|
9470
9609
|
attributes
|
|
9471
9610
|
});
|
|
9472
|
-
return
|
|
9611
|
+
return mapInput3(metric, toMillis);
|
|
9473
9612
|
};
|
|
9474
9613
|
var value = (self) => flatMap3(context(), (context3) => sync(() => self.valueUnsafe(context3)));
|
|
9475
9614
|
var modify = /* @__PURE__ */ dual(2, (self, input) => flatMap3(context(), (context3) => sync(() => self.modifyUnsafe(input, context3))));
|
|
9476
9615
|
var update = /* @__PURE__ */ dual(2, (self, input) => contextWith((services) => sync(() => self.updateUnsafe(input, services))));
|
|
9477
|
-
var
|
|
9478
|
-
var withConstantInput = /* @__PURE__ */ dual(2, (self, input) =>
|
|
9616
|
+
var mapInput3 = /* @__PURE__ */ dual(2, (self, f) => new MetricTransform(self, (context3) => self.valueUnsafe(context3), (input, context3) => self.updateUnsafe(f(input, context3), context3), (input, context3) => self.modifyUnsafe(f(input, context3), context3)));
|
|
9617
|
+
var withConstantInput = /* @__PURE__ */ dual(2, (self, input) => mapInput3(self, () => input));
|
|
9479
9618
|
var withAttributes = /* @__PURE__ */ dual(2, (self, attributes) => new MetricTransform(self, (context3) => self.valueUnsafe(addAttributesToContext(context3, attributes)), (input, context3) => self.updateUnsafe(input, addAttributesToContext(context3, attributes)), (input, context3) => self.modifyUnsafe(input, addAttributesToContext(context3, attributes))));
|
|
9480
9619
|
var snapshot = /* @__PURE__ */ map5(/* @__PURE__ */ context(), (context3) => snapshotUnsafe(context3));
|
|
9481
9620
|
var dump = /* @__PURE__ */ flatMap3(/* @__PURE__ */ context(), (context3) => {
|
|
@@ -10306,7 +10445,7 @@ __export(Schema_exports, {
|
|
|
10306
10445
|
StringFromBase64Url: () => StringFromBase64Url,
|
|
10307
10446
|
StringFromHex: () => StringFromHex,
|
|
10308
10447
|
StringFromUriComponent: () => StringFromUriComponent,
|
|
10309
|
-
Struct: () =>
|
|
10448
|
+
Struct: () => Struct2,
|
|
10310
10449
|
StructWithRest: () => StructWithRest,
|
|
10311
10450
|
Symbol: () => Symbol3,
|
|
10312
10451
|
TaggedClass: () => TaggedClass2,
|
|
@@ -10324,7 +10463,7 @@ __export(Schema_exports, {
|
|
|
10324
10463
|
Trim: () => Trim,
|
|
10325
10464
|
Trimmed: () => Trimmed,
|
|
10326
10465
|
TrueLiterals: () => TrueLiterals,
|
|
10327
|
-
Tuple: () =>
|
|
10466
|
+
Tuple: () => Tuple3,
|
|
10328
10467
|
TupleWithRest: () => TupleWithRest,
|
|
10329
10468
|
URL: () => URL2,
|
|
10330
10469
|
URLFromString: () => URLFromString,
|
|
@@ -10620,7 +10759,7 @@ var Equivalence4 = /* @__PURE__ */ make3((self, that) => compare(self, that) ===
|
|
|
10620
10759
|
var equals4 = /* @__PURE__ */ dual(2, (self, that) => Equivalence4(self, that));
|
|
10621
10760
|
var fromString = (s) => {
|
|
10622
10761
|
if (s === "") {
|
|
10623
|
-
return
|
|
10762
|
+
return some3(zero2);
|
|
10624
10763
|
}
|
|
10625
10764
|
let base;
|
|
10626
10765
|
let exp;
|
|
@@ -10655,7 +10794,7 @@ var fromString = (s) => {
|
|
|
10655
10794
|
if (!Number.isSafeInteger(scale)) {
|
|
10656
10795
|
return none2();
|
|
10657
10796
|
}
|
|
10658
|
-
return
|
|
10797
|
+
return some3(make14(BigInt(digits), scale));
|
|
10659
10798
|
};
|
|
10660
10799
|
var format4 = (n) => {
|
|
10661
10800
|
const normalized = normalize2(n);
|
|
@@ -10707,7 +10846,7 @@ var toNumber = (b) => {
|
|
|
10707
10846
|
if (b > BigInt3(Number.MAX_SAFE_INTEGER) || b < BigInt3(Number.MIN_SAFE_INTEGER)) {
|
|
10708
10847
|
return none2();
|
|
10709
10848
|
}
|
|
10710
|
-
return
|
|
10849
|
+
return some3(Number(b));
|
|
10711
10850
|
};
|
|
10712
10851
|
|
|
10713
10852
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ByteSize.js
|
|
@@ -11140,7 +11279,7 @@ var LeafNode = class _LeafNode extends Node {
|
|
|
11140
11279
|
}
|
|
11141
11280
|
get(_shift, hash2, key) {
|
|
11142
11281
|
if (this.hash === hash2 && equals(this.key, key)) {
|
|
11143
|
-
return
|
|
11282
|
+
return some3(this.value);
|
|
11144
11283
|
}
|
|
11145
11284
|
return none2();
|
|
11146
11285
|
}
|
|
@@ -11205,7 +11344,7 @@ var CollisionNode = class _CollisionNode extends Node {
|
|
|
11205
11344
|
}
|
|
11206
11345
|
for (const [k, v] of this.entries) {
|
|
11207
11346
|
if (equals(k, key)) {
|
|
11208
|
-
return
|
|
11347
|
+
return some3(v);
|
|
11209
11348
|
}
|
|
11210
11349
|
}
|
|
11211
11350
|
return none2();
|
|
@@ -11717,7 +11856,7 @@ var HashSetProto = {
|
|
|
11717
11856
|
return hash(HashSetTypeId);
|
|
11718
11857
|
},
|
|
11719
11858
|
[symbol2](that) {
|
|
11720
|
-
return isHashSet(that) && size4(this) === size4(that) &&
|
|
11859
|
+
return isHashSet(that) && size4(this) === size4(that) && every3(this, (value6) => has4(that, value6));
|
|
11721
11860
|
},
|
|
11722
11861
|
[Symbol.iterator]() {
|
|
11723
11862
|
return keys2(keyMap(this));
|
|
@@ -11755,7 +11894,7 @@ var fromIterable6 = (values2) => {
|
|
|
11755
11894
|
};
|
|
11756
11895
|
var has4 = (self, value6) => has3(keyMap(self), value6);
|
|
11757
11896
|
var size4 = (self) => size2(keyMap(self));
|
|
11758
|
-
var
|
|
11897
|
+
var every3 = (self, predicate) => {
|
|
11759
11898
|
for (const value6 of self) {
|
|
11760
11899
|
if (!predicate(value6)) {
|
|
11761
11900
|
return false;
|
|
@@ -11846,7 +11985,7 @@ var make19 = (type3, mutable3) => {
|
|
|
11846
11985
|
graph.reverseAdjacency = /* @__PURE__ */ new Map();
|
|
11847
11986
|
graph.nextNodeIndex = 0;
|
|
11848
11987
|
graph.nextEdgeIndex = 0;
|
|
11849
|
-
graph.acyclic =
|
|
11988
|
+
graph.acyclic = some3(true);
|
|
11850
11989
|
return graph;
|
|
11851
11990
|
};
|
|
11852
11991
|
var snapshot2 = (graph) => {
|
|
@@ -11906,6 +12045,7 @@ var jsonSchemaAnnotationKeys = ["title", "description", "default", "examples", "
|
|
|
11906
12045
|
var resolveIdentifier = /* @__PURE__ */ resolveAt("identifier");
|
|
11907
12046
|
var resolveIdentifierFallback = /* @__PURE__ */ resolveAt(IDENTIFIER_FALLBACK_KEY);
|
|
11908
12047
|
var resolveTitle = /* @__PURE__ */ resolveAt("title");
|
|
12048
|
+
var resolveDescription = /* @__PURE__ */ resolveAt("description");
|
|
11909
12049
|
var resolveBrands = /* @__PURE__ */ resolveAt("brands");
|
|
11910
12050
|
var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
11911
12051
|
const identifier2 = resolve(ast)?.identifier;
|
|
@@ -11914,6 +12054,141 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
11914
12054
|
});
|
|
11915
12055
|
var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitraryConstraint", "brands", "toJsonSchema", "toCode", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso", "toCodecArbitrary"]);
|
|
11916
12056
|
|
|
12057
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/SchemaAST.js
|
|
12058
|
+
var SchemaAST_exports = {};
|
|
12059
|
+
__export(SchemaAST_exports, {
|
|
12060
|
+
Any: () => Any,
|
|
12061
|
+
Arrays: () => Arrays,
|
|
12062
|
+
BigInt: () => BigInt5,
|
|
12063
|
+
Boolean: () => Boolean2,
|
|
12064
|
+
Context: () => Context,
|
|
12065
|
+
Declaration: () => Declaration,
|
|
12066
|
+
Enum: () => Enum,
|
|
12067
|
+
FINITE_PATTERN: () => FINITE_PATTERN,
|
|
12068
|
+
Filter: () => Filter2,
|
|
12069
|
+
FilterGroup: () => FilterGroup,
|
|
12070
|
+
IndexSignature: () => IndexSignature,
|
|
12071
|
+
Json: () => Json,
|
|
12072
|
+
Link: () => Link,
|
|
12073
|
+
Literal: () => Literal,
|
|
12074
|
+
MutableJson: () => MutableJson,
|
|
12075
|
+
Never: () => Never,
|
|
12076
|
+
Null: () => Null,
|
|
12077
|
+
Number: () => Number5,
|
|
12078
|
+
ObjectKeyword: () => ObjectKeyword,
|
|
12079
|
+
Objects: () => Objects,
|
|
12080
|
+
PropertySignature: () => PropertySignature,
|
|
12081
|
+
STRING_PATTERN: () => STRING_PATTERN,
|
|
12082
|
+
String: () => String5,
|
|
12083
|
+
Suspend: () => Suspend,
|
|
12084
|
+
Symbol: () => Symbol2,
|
|
12085
|
+
TemplateLiteral: () => TemplateLiteral,
|
|
12086
|
+
Undefined: () => Undefined,
|
|
12087
|
+
Union: () => Union,
|
|
12088
|
+
UniqueSymbol: () => UniqueSymbol,
|
|
12089
|
+
Unknown: () => Unknown,
|
|
12090
|
+
Void: () => Void,
|
|
12091
|
+
annotate: () => annotate2,
|
|
12092
|
+
annotateKey: () => annotateKey,
|
|
12093
|
+
any: () => any,
|
|
12094
|
+
appendChecks: () => appendChecks,
|
|
12095
|
+
applyToLastLink: () => applyToLastLink,
|
|
12096
|
+
applyToSelfOrLastLinkEncoding: () => applyToSelfOrLastLinkEncoding,
|
|
12097
|
+
applyToSelfOrLastLinkEncodingIdempotent: () => applyToSelfOrLastLinkEncodingIdempotent,
|
|
12098
|
+
bigInt: () => bigInt,
|
|
12099
|
+
bigIntString: () => bigIntString,
|
|
12100
|
+
boolean: () => boolean,
|
|
12101
|
+
brand: () => brand,
|
|
12102
|
+
collectIssues: () => collectIssues,
|
|
12103
|
+
collectSentinels: () => collectSentinels,
|
|
12104
|
+
containsUndefined: () => containsUndefined,
|
|
12105
|
+
decodeTo: () => decodeTo,
|
|
12106
|
+
defaultParseOptions: () => defaultParseOptions,
|
|
12107
|
+
finite: () => finite,
|
|
12108
|
+
flip: () => flip4,
|
|
12109
|
+
getAST: () => getAST,
|
|
12110
|
+
getCandidates: () => getCandidates,
|
|
12111
|
+
getConstructorDescriptor: () => getConstructorDescriptor,
|
|
12112
|
+
getContextOwner: () => getContextOwner,
|
|
12113
|
+
getIndexSignatureKeys: () => getIndexSignatureKeys,
|
|
12114
|
+
getLastEncoding: () => getLastEncoding,
|
|
12115
|
+
isAST: () => isAST,
|
|
12116
|
+
isAny: () => isAny,
|
|
12117
|
+
isArrays: () => isArrays,
|
|
12118
|
+
isBigInt: () => isBigInt2,
|
|
12119
|
+
isBoolean: () => isBoolean2,
|
|
12120
|
+
isDeclaration: () => isDeclaration,
|
|
12121
|
+
isEnum: () => isEnum,
|
|
12122
|
+
isFinite: () => isFinite2,
|
|
12123
|
+
isJson: () => isJson,
|
|
12124
|
+
isLiteral: () => isLiteral,
|
|
12125
|
+
isMutable: () => isMutable,
|
|
12126
|
+
isNever: () => isNever2,
|
|
12127
|
+
isNull: () => isNull2,
|
|
12128
|
+
isNumber: () => isNumber2,
|
|
12129
|
+
isObjectKeyword: () => isObjectKeyword2,
|
|
12130
|
+
isObjects: () => isObjects,
|
|
12131
|
+
isOptional: () => isOptional,
|
|
12132
|
+
isPattern: () => isPattern,
|
|
12133
|
+
isString: () => isString3,
|
|
12134
|
+
isStringBigInt: () => isStringBigInt,
|
|
12135
|
+
isStringFinite: () => isStringFinite,
|
|
12136
|
+
isStringSymbol: () => isStringSymbol,
|
|
12137
|
+
isStringTree: () => isStringTree,
|
|
12138
|
+
isSuspend: () => isSuspend,
|
|
12139
|
+
isSymbol: () => isSymbol2,
|
|
12140
|
+
isTemplateLiteral: () => isTemplateLiteral,
|
|
12141
|
+
isUndefined: () => isUndefined2,
|
|
12142
|
+
isUnion: () => isUnion,
|
|
12143
|
+
isUniqueSymbol: () => isUniqueSymbol,
|
|
12144
|
+
isUnknown: () => isUnknown2,
|
|
12145
|
+
isVoid: () => isVoid,
|
|
12146
|
+
makeFilter: () => makeFilter,
|
|
12147
|
+
makeFilterByGuard: () => makeFilterByGuard,
|
|
12148
|
+
mapLink: () => mapLink,
|
|
12149
|
+
mapOrSame: () => mapOrSame,
|
|
12150
|
+
middlewareDecoding: () => middlewareDecoding,
|
|
12151
|
+
middlewareEncoding: () => middlewareEncoding,
|
|
12152
|
+
mutable: () => mutable,
|
|
12153
|
+
mutableKey: () => mutableKey,
|
|
12154
|
+
never: () => never3,
|
|
12155
|
+
null: () => null_,
|
|
12156
|
+
number: () => number2,
|
|
12157
|
+
objectKeyword: () => objectKeyword,
|
|
12158
|
+
objectKeywordToJson: () => objectKeywordToJson,
|
|
12159
|
+
optional: () => optional,
|
|
12160
|
+
optionalKey: () => optionalKey,
|
|
12161
|
+
parameterFromString: () => parameterFromString,
|
|
12162
|
+
record: () => record,
|
|
12163
|
+
replaceChecks: () => replaceChecks,
|
|
12164
|
+
replaceContext: () => replaceContext,
|
|
12165
|
+
replaceContextLastLink: () => replaceContextLastLink,
|
|
12166
|
+
replaceEncoding: () => replaceEncoding,
|
|
12167
|
+
resolve: () => resolve2,
|
|
12168
|
+
resolveAt: () => resolveAt2,
|
|
12169
|
+
resolveDescription: () => resolveDescription2,
|
|
12170
|
+
resolveIdentifier: () => resolveIdentifier2,
|
|
12171
|
+
resolveTitle: () => resolveTitle2,
|
|
12172
|
+
runChecks: () => runChecks,
|
|
12173
|
+
string: () => string2,
|
|
12174
|
+
struct: () => struct,
|
|
12175
|
+
structWithRest: () => structWithRest,
|
|
12176
|
+
symbol: () => symbol3,
|
|
12177
|
+
symbolString: () => symbolString,
|
|
12178
|
+
templateLiteralParser: () => templateLiteralParser,
|
|
12179
|
+
toEncoded: () => toEncoded,
|
|
12180
|
+
toType: () => toType,
|
|
12181
|
+
tuple: () => tuple,
|
|
12182
|
+
tupleWithRest: () => tupleWithRest,
|
|
12183
|
+
undefined: () => undefined_3,
|
|
12184
|
+
union: () => union4,
|
|
12185
|
+
unknown: () => unknown,
|
|
12186
|
+
unknownToJson: () => unknownToJson,
|
|
12187
|
+
unknownToStringTree: () => unknownToStringTree,
|
|
12188
|
+
void: () => void_6,
|
|
12189
|
+
withConstructorDefault: () => withConstructorDefault
|
|
12190
|
+
});
|
|
12191
|
+
|
|
11917
12192
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/SchemaIssue.js
|
|
11918
12193
|
var SchemaIssue_exports = {};
|
|
11919
12194
|
__export(SchemaIssue_exports, {
|
|
@@ -11945,7 +12220,7 @@ var missing = /* @__PURE__ */ Symbol();
|
|
|
11945
12220
|
var succeed8 = succeed5;
|
|
11946
12221
|
var missingExit = /* @__PURE__ */ succeed8(missing);
|
|
11947
12222
|
var sameExit = /* @__PURE__ */ succeed8(missing);
|
|
11948
|
-
var toOption2 = (value6) => value6 === missing ? none2() :
|
|
12223
|
+
var toOption2 = (value6) => value6 === missing ? none2() : some3(value6);
|
|
11949
12224
|
var fromOptionExit = (option6) => option6._tag === "None" ? missingExit : succeed8(option6.value);
|
|
11950
12225
|
|
|
11951
12226
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/SchemaIssue.js
|
|
@@ -12428,7 +12703,7 @@ function checkEffect(f) {
|
|
|
12428
12703
|
return onSome((t, options) => {
|
|
12429
12704
|
return f(t, options).pipe(flatMapEager2((out) => {
|
|
12430
12705
|
const issue = makeSingle(out, t, options);
|
|
12431
|
-
return issue ? fail7(issue) : succeed7(
|
|
12706
|
+
return issue ? fail7(issue) : succeed7(some3(t));
|
|
12432
12707
|
}));
|
|
12433
12708
|
});
|
|
12434
12709
|
}
|
|
@@ -12436,7 +12711,7 @@ function transform(f) {
|
|
|
12436
12711
|
return transformOptional(map(f));
|
|
12437
12712
|
}
|
|
12438
12713
|
function transformEffect(f) {
|
|
12439
|
-
return onSome((e, options) => f(e, options).pipe(mapEager2(
|
|
12714
|
+
return onSome((e, options) => f(e, options).pipe(mapEager2(some3)));
|
|
12440
12715
|
}
|
|
12441
12716
|
function transformOptional(f) {
|
|
12442
12717
|
return new Getter((oe) => succeed7(f(oe)));
|
|
@@ -12447,7 +12722,7 @@ function omit2() {
|
|
|
12447
12722
|
function withDefault(defaultValue) {
|
|
12448
12723
|
return new Getter((o) => {
|
|
12449
12724
|
const filtered = filter(o, isNotUndefined);
|
|
12450
|
-
return isSome2(filtered) ? succeed7(filtered) : mapEager2(defaultValue,
|
|
12725
|
+
return isSome2(filtered) ? succeed7(filtered) : mapEager2(defaultValue, some3);
|
|
12451
12726
|
});
|
|
12452
12727
|
}
|
|
12453
12728
|
function String4() {
|
|
@@ -12488,7 +12763,7 @@ function toUpperCase2() {
|
|
|
12488
12763
|
}
|
|
12489
12764
|
function parseJson(options) {
|
|
12490
12765
|
return onSome((input, parseOptions) => try_3({
|
|
12491
|
-
try: () =>
|
|
12766
|
+
try: () => some3(JSON.parse(input, options?.reviver)),
|
|
12492
12767
|
catch: () => new InvalidValue({
|
|
12493
12768
|
expected: "a valid JSON string"
|
|
12494
12769
|
}, input, parseOptions)
|
|
@@ -12501,7 +12776,7 @@ function stringifyJson(options) {
|
|
|
12501
12776
|
if (output === void 0) {
|
|
12502
12777
|
throw new TypeError("Value cannot be represented as JSON");
|
|
12503
12778
|
}
|
|
12504
|
-
return
|
|
12779
|
+
return some3(output);
|
|
12505
12780
|
},
|
|
12506
12781
|
catch: () => new InvalidValue({
|
|
12507
12782
|
expected: "a JSON-serializable value"
|
|
@@ -12891,13 +13166,13 @@ function optionFromNullishOr(options) {
|
|
|
12891
13166
|
}
|
|
12892
13167
|
function optionFromOptionalKey() {
|
|
12893
13168
|
return transformOptional2({
|
|
12894
|
-
decode:
|
|
13169
|
+
decode: some3,
|
|
12895
13170
|
encode: flatten
|
|
12896
13171
|
});
|
|
12897
13172
|
}
|
|
12898
13173
|
function optionFromOptional() {
|
|
12899
13174
|
return transformOptional2({
|
|
12900
|
-
decode: (ot) => ot.pipe(filter(isNotUndefined),
|
|
13175
|
+
decode: (ot) => ot.pipe(filter(isNotUndefined), some3),
|
|
12901
13176
|
encode: flatten
|
|
12902
13177
|
});
|
|
12903
13178
|
}
|
|
@@ -12922,12 +13197,26 @@ var fromURLSearchParams = /* @__PURE__ */ new Transformation(/* @__PURE__ */ dec
|
|
|
12922
13197
|
function makeGuard(tag4) {
|
|
12923
13198
|
return (ast) => ast._tag === tag4;
|
|
12924
13199
|
}
|
|
13200
|
+
function isAST(u) {
|
|
13201
|
+
return hasProperty(u, TypeId21) && u[TypeId21] === TypeId21;
|
|
13202
|
+
}
|
|
12925
13203
|
var isDeclaration = /* @__PURE__ */ makeGuard("Declaration");
|
|
12926
13204
|
var isNull2 = /* @__PURE__ */ makeGuard("Null");
|
|
13205
|
+
var isUndefined2 = /* @__PURE__ */ makeGuard("Undefined");
|
|
12927
13206
|
var isVoid = /* @__PURE__ */ makeGuard("Void");
|
|
12928
13207
|
var isNever2 = /* @__PURE__ */ makeGuard("Never");
|
|
13208
|
+
var isUnknown2 = /* @__PURE__ */ makeGuard("Unknown");
|
|
13209
|
+
var isAny = /* @__PURE__ */ makeGuard("Any");
|
|
13210
|
+
var isString3 = /* @__PURE__ */ makeGuard("String");
|
|
13211
|
+
var isNumber2 = /* @__PURE__ */ makeGuard("Number");
|
|
13212
|
+
var isBoolean2 = /* @__PURE__ */ makeGuard("Boolean");
|
|
13213
|
+
var isBigInt2 = /* @__PURE__ */ makeGuard("BigInt");
|
|
13214
|
+
var isSymbol2 = /* @__PURE__ */ makeGuard("Symbol");
|
|
12929
13215
|
var isLiteral = /* @__PURE__ */ makeGuard("Literal");
|
|
12930
13216
|
var isUniqueSymbol = /* @__PURE__ */ makeGuard("UniqueSymbol");
|
|
13217
|
+
var isObjectKeyword2 = /* @__PURE__ */ makeGuard("ObjectKeyword");
|
|
13218
|
+
var isEnum = /* @__PURE__ */ makeGuard("Enum");
|
|
13219
|
+
var isTemplateLiteral = /* @__PURE__ */ makeGuard("TemplateLiteral");
|
|
12931
13220
|
var isArrays = /* @__PURE__ */ makeGuard("Arrays");
|
|
12932
13221
|
var isObjects = /* @__PURE__ */ makeGuard("Objects");
|
|
12933
13222
|
var isUnion = /* @__PURE__ */ makeGuard("Union");
|
|
@@ -14933,7 +15222,11 @@ function getConstructorDescriptor(ast) {
|
|
|
14933
15222
|
const getDescriptor = ast.annotations?.[CONSTRUCTOR_ANNOTATION_KEY];
|
|
14934
15223
|
return isFunction(getDescriptor) ? getDescriptor(ast.typeParameters) : void 0;
|
|
14935
15224
|
}
|
|
15225
|
+
var resolve2 = resolve;
|
|
14936
15226
|
var resolveAt2 = resolveAt;
|
|
15227
|
+
var resolveIdentifier2 = resolveIdentifier;
|
|
15228
|
+
var resolveTitle2 = resolveTitle;
|
|
15229
|
+
var resolveDescription2 = resolveDescription;
|
|
14937
15230
|
function isJsonLeaf(u) {
|
|
14938
15231
|
return u === null || typeof u === "string" || typeof u === "boolean" || typeof u === "number" && globalThis.Number.isFinite(u);
|
|
14939
15232
|
}
|
|
@@ -15071,7 +15364,7 @@ function makeOption(schema2) {
|
|
|
15071
15364
|
return (input, options) => {
|
|
15072
15365
|
const exit3 = runSyncExit2(parser(input, options));
|
|
15073
15366
|
if (isSuccess4(exit3)) {
|
|
15074
|
-
return
|
|
15367
|
+
return some3(exit3.value);
|
|
15075
15368
|
}
|
|
15076
15369
|
getSchemaIssueOrThrow(exit3.cause, "Option adapter can only return none for schema issues");
|
|
15077
15370
|
return none2();
|
|
@@ -15219,7 +15512,7 @@ function asOption(parser) {
|
|
|
15219
15512
|
return (input, options) => {
|
|
15220
15513
|
const exit3 = parserExit(input, options);
|
|
15221
15514
|
if (isSuccess4(exit3)) {
|
|
15222
|
-
return
|
|
15515
|
+
return some3(exit3.value);
|
|
15223
15516
|
}
|
|
15224
15517
|
getSchemaIssueOrThrow(exit3.cause, "Option adapter can only return none for schema issues");
|
|
15225
15518
|
return none2();
|
|
@@ -17436,9 +17729,9 @@ function toStandardSchemaV1(self, options) {
|
|
|
17436
17729
|
if (exit3) {
|
|
17437
17730
|
return makeStandardResult(exit3);
|
|
17438
17731
|
}
|
|
17439
|
-
return new Promise((
|
|
17732
|
+
return new Promise((resolve5) => {
|
|
17440
17733
|
fiber3.addObserver((exit4) => {
|
|
17441
|
-
|
|
17734
|
+
resolve5(makeStandardResult(exit4));
|
|
17442
17735
|
});
|
|
17443
17736
|
});
|
|
17444
17737
|
};
|
|
@@ -18284,7 +18577,7 @@ var CheckNode = class {
|
|
|
18284
18577
|
this.get = (s) => runChecks(checks, s);
|
|
18285
18578
|
}
|
|
18286
18579
|
};
|
|
18287
|
-
function
|
|
18580
|
+
function compose3(a, b) {
|
|
18288
18581
|
if (a.length === 0) return b;
|
|
18289
18582
|
if (b.length === 0) return a;
|
|
18290
18583
|
const nodes = a.slice();
|
|
@@ -18321,13 +18614,13 @@ var OptionalImpl = class {
|
|
|
18321
18614
|
return (s) => getOrElse3(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
|
|
18322
18615
|
}
|
|
18323
18616
|
compose(that) {
|
|
18324
|
-
return make23(
|
|
18617
|
+
return make23(compose3(this.node, that.node));
|
|
18325
18618
|
}
|
|
18326
18619
|
key(key) {
|
|
18327
|
-
return make23(
|
|
18620
|
+
return make23(compose3(this.node, [new PathNode([key])]));
|
|
18328
18621
|
}
|
|
18329
18622
|
optionalKey(key) {
|
|
18330
|
-
return make23(
|
|
18623
|
+
return make23(compose3(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
|
|
18331
18624
|
const copy2 = cloneShallow(s);
|
|
18332
18625
|
if (a === void 0) {
|
|
18333
18626
|
if (Array.isArray(copy2) && (typeof key === "number" || typeof key === "string" && isCanonicalArrayIndex(key))) {
|
|
@@ -18342,20 +18635,20 @@ var OptionalImpl = class {
|
|
|
18342
18635
|
})));
|
|
18343
18636
|
}
|
|
18344
18637
|
check(...checks) {
|
|
18345
|
-
return make23(
|
|
18638
|
+
return make23(compose3(this.node, [new CheckNode(checks)]));
|
|
18346
18639
|
}
|
|
18347
18640
|
refine(refinement, annotations2) {
|
|
18348
|
-
return make23(
|
|
18641
|
+
return make23(compose3(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations2)])]));
|
|
18349
18642
|
}
|
|
18350
18643
|
tag(tag4) {
|
|
18351
18644
|
const err = fail2(new InvalidValue({
|
|
18352
18645
|
expected: `${JSON.stringify(tag4)} tag`
|
|
18353
18646
|
}));
|
|
18354
|
-
return make23(
|
|
18647
|
+
return make23(compose3(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
|
|
18355
18648
|
}
|
|
18356
18649
|
at(key, ..._rest) {
|
|
18357
18650
|
const err = fail2(new Pointer([key], new MissingKey(void 0)));
|
|
18358
|
-
return make23(
|
|
18651
|
+
return make23(compose3(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
|
|
18359
18652
|
if (Object.hasOwn(s, key)) {
|
|
18360
18653
|
const copy2 = cloneShallow(s);
|
|
18361
18654
|
assignProperty(copy2, key, a);
|
|
@@ -19991,7 +20284,7 @@ function makeStruct(ast, fields) {
|
|
|
19991
20284
|
}
|
|
19992
20285
|
});
|
|
19993
20286
|
}
|
|
19994
|
-
function
|
|
20287
|
+
function Struct2(fields) {
|
|
19995
20288
|
return makeStruct(struct(fields, void 0), fields);
|
|
19996
20289
|
}
|
|
19997
20290
|
function fieldsAssign(fields) {
|
|
@@ -20019,7 +20312,7 @@ function encodeKeys(mapping) {
|
|
|
20019
20312
|
reverseMapping[encodedKey] = k;
|
|
20020
20313
|
}
|
|
20021
20314
|
}
|
|
20022
|
-
return
|
|
20315
|
+
return Struct2(fields).pipe(decodeTo2(self, transform2({
|
|
20023
20316
|
decode: renameKeys(reverseMapping),
|
|
20024
20317
|
encode: renameKeys(appliedMapping)
|
|
20025
20318
|
})));
|
|
@@ -20028,7 +20321,7 @@ function encodeKeys(mapping) {
|
|
|
20028
20321
|
function extendTo(fields, derive) {
|
|
20029
20322
|
return (self) => {
|
|
20030
20323
|
const f = map3(self.fields, toType2);
|
|
20031
|
-
const to =
|
|
20324
|
+
const to = Struct2({
|
|
20032
20325
|
...f,
|
|
20033
20326
|
...fields
|
|
20034
20327
|
});
|
|
@@ -20079,7 +20372,7 @@ function makeTuple(ast, elements) {
|
|
|
20079
20372
|
}
|
|
20080
20373
|
});
|
|
20081
20374
|
}
|
|
20082
|
-
function
|
|
20375
|
+
function Tuple3(elements) {
|
|
20083
20376
|
return makeTuple(tuple(elements), elements);
|
|
20084
20377
|
}
|
|
20085
20378
|
function TupleWithRest(schema2, rest) {
|
|
@@ -20105,7 +20398,7 @@ var NonEmptyArray = /* @__PURE__ */ lambda((schema2) => make28(new Arrays(false,
|
|
|
20105
20398
|
function ArrayEnsure(schema2) {
|
|
20106
20399
|
const many = ArraySchema(schema2);
|
|
20107
20400
|
const to = ArraySchema(toType2(schema2));
|
|
20108
|
-
const one = decodeTo2(
|
|
20401
|
+
const one = decodeTo2(Tuple3([Unknown2]), transform2({
|
|
20109
20402
|
decode: (value6) => [value6],
|
|
20110
20403
|
encode: ([value6]) => value6
|
|
20111
20404
|
}))(schema2);
|
|
@@ -20275,7 +20568,7 @@ function tagDefaultOmit(literal) {
|
|
|
20275
20568
|
}));
|
|
20276
20569
|
}
|
|
20277
20570
|
function TaggedStruct(value6, fields) {
|
|
20278
|
-
return
|
|
20571
|
+
return Struct2({
|
|
20279
20572
|
_tag: tag(value6),
|
|
20280
20573
|
...fields
|
|
20281
20574
|
});
|
|
@@ -21554,7 +21847,7 @@ function Defect(options) {
|
|
|
21554
21847
|
}
|
|
21555
21848
|
function ReadonlyMap(key, value6) {
|
|
21556
21849
|
const schema2 = declareConstructor()([key, value6], ([key2, value7]) => {
|
|
21557
|
-
const array2 = ArraySchema(
|
|
21850
|
+
const array2 = ArraySchema(Tuple3([key2, value7]));
|
|
21558
21851
|
return (input, ast, options) => {
|
|
21559
21852
|
if (input instanceof globalThis.Map) {
|
|
21560
21853
|
return mapBothEager2(decodeUnknownEffect(array2)([...input], options), {
|
|
@@ -21576,7 +21869,7 @@ function ReadonlyMap(key, value6) {
|
|
|
21576
21869
|
Type: `globalThis.ReadonlyMap<${typeParameters[0].Type}, ${typeParameters[1].Type}>`
|
|
21577
21870
|
}),
|
|
21578
21871
|
expected: "ReadonlyMap",
|
|
21579
|
-
toCodec: ([key2, value7]) => link()(ArraySchema(
|
|
21872
|
+
toCodec: ([key2, value7]) => link()(ArraySchema(Tuple3([key2, value7])), transform2({
|
|
21580
21873
|
decode: (entries3) => new globalThis.Map(entries3),
|
|
21581
21874
|
encode: (map17) => [...map17.entries()]
|
|
21582
21875
|
}))
|
|
@@ -21629,7 +21922,7 @@ var RegExp3 = /* @__PURE__ */ instanceOf(globalThis.RegExp, {
|
|
|
21629
21922
|
Type: `globalThis.RegExp`
|
|
21630
21923
|
}),
|
|
21631
21924
|
expected: "RegExp",
|
|
21632
|
-
toCodecJson: () => link()(
|
|
21925
|
+
toCodecJson: () => link()(Struct2({
|
|
21633
21926
|
source: String6,
|
|
21634
21927
|
flags: String6
|
|
21635
21928
|
}), transformEffect2({
|
|
@@ -21696,7 +21989,7 @@ var File = /* @__PURE__ */ instanceOf(globalThis.File, {
|
|
|
21696
21989
|
Type: `globalThis.File`
|
|
21697
21990
|
}),
|
|
21698
21991
|
expected: "File",
|
|
21699
|
-
toCodecJson: () => link()(
|
|
21992
|
+
toCodecJson: () => link()(Struct2({
|
|
21700
21993
|
data: String6.check(isBase64()),
|
|
21701
21994
|
type: String6,
|
|
21702
21995
|
name: String6,
|
|
@@ -21740,10 +22033,10 @@ var FormData2 = /* @__PURE__ */ instanceOf(globalThis.FormData, {
|
|
|
21740
22033
|
Type: `globalThis.FormData`
|
|
21741
22034
|
}),
|
|
21742
22035
|
expected: "FormData",
|
|
21743
|
-
toCodecJson: () => link()(ArraySchema(
|
|
22036
|
+
toCodecJson: () => link()(ArraySchema(Tuple3([String6, Union2([Struct2({
|
|
21744
22037
|
_tag: tag("String"),
|
|
21745
22038
|
value: String6
|
|
21746
|
-
}),
|
|
22039
|
+
}), Struct2({
|
|
21747
22040
|
_tag: tag("File"),
|
|
21748
22041
|
value: File
|
|
21749
22042
|
})])])), transformEffect2({
|
|
@@ -21818,10 +22111,10 @@ var StringFromUriComponent = /* @__PURE__ */ String6.annotate({
|
|
|
21818
22111
|
expected: "a URI component encoded string that will be decoded as a UTF-8 string"
|
|
21819
22112
|
}).pipe(/* @__PURE__ */ decodeTo2(String6, stringFromUriComponent));
|
|
21820
22113
|
var PropertyKey = /* @__PURE__ */ Union2([Finite, Symbol3, String6]);
|
|
21821
|
-
var StandardSchemaV1FailureResult = /* @__PURE__ */
|
|
21822
|
-
issues: /* @__PURE__ */ ArraySchema(/* @__PURE__ */
|
|
22114
|
+
var StandardSchemaV1FailureResult = /* @__PURE__ */ Struct2({
|
|
22115
|
+
issues: /* @__PURE__ */ ArraySchema(/* @__PURE__ */ Struct2({
|
|
21823
22116
|
message: String6,
|
|
21824
|
-
path: /* @__PURE__ */ optional2(/* @__PURE__ */ ArraySchema(/* @__PURE__ */ Union2([PropertyKey, /* @__PURE__ */
|
|
22117
|
+
path: /* @__PURE__ */ optional2(/* @__PURE__ */ ArraySchema(/* @__PURE__ */ Union2([PropertyKey, /* @__PURE__ */ Struct2({
|
|
21825
22118
|
key: PropertyKey
|
|
21826
22119
|
})])))
|
|
21827
22120
|
}))
|
|
@@ -21909,7 +22202,7 @@ function bigDecimalValueAtScale(value6, scale) {
|
|
|
21909
22202
|
}
|
|
21910
22203
|
function bigDecimalArbitrarySchema(constraint) {
|
|
21911
22204
|
if (constraint?.minimum === void 0 && constraint?.maximum === void 0) {
|
|
21912
|
-
return
|
|
22205
|
+
return Struct2({
|
|
21913
22206
|
value: BigInt6,
|
|
21914
22207
|
scale: Int.check(isBetween2({
|
|
21915
22208
|
minimum: 0,
|
|
@@ -21921,7 +22214,7 @@ function bigDecimalArbitrarySchema(constraint) {
|
|
|
21921
22214
|
const minimum = constraint.minimum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.minimum, scale) + (constraint.exclusiveMinimum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
|
|
21922
22215
|
const maximum = constraint.maximum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.maximum, scale) - (constraint.exclusiveMaximum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
|
|
21923
22216
|
if (minimum !== void 0 && maximum !== void 0 && minimum > maximum) {
|
|
21924
|
-
return
|
|
22217
|
+
return Struct2({
|
|
21925
22218
|
value: BigInt6,
|
|
21926
22219
|
scale: Int.check(isBetween2({
|
|
21927
22220
|
minimum: 0,
|
|
@@ -21929,7 +22222,7 @@ function bigDecimalArbitrarySchema(constraint) {
|
|
|
21929
22222
|
}))
|
|
21930
22223
|
});
|
|
21931
22224
|
}
|
|
21932
|
-
return
|
|
22225
|
+
return Struct2({
|
|
21933
22226
|
value: bigIntArbitrarySchema(minimum, maximum),
|
|
21934
22227
|
scale: Literal2(scale)
|
|
21935
22228
|
});
|
|
@@ -22010,13 +22303,13 @@ function CauseReason(error, defect) {
|
|
|
22010
22303
|
importDeclarations: [`import * as Cause from "effect/Cause"`]
|
|
22011
22304
|
}),
|
|
22012
22305
|
expected: "Cause.Failure",
|
|
22013
|
-
toCodec: ([error2, defect2]) => link()(Union2([
|
|
22306
|
+
toCodec: ([error2, defect2]) => link()(Union2([Struct2({
|
|
22014
22307
|
_tag: Literal2("Fail"),
|
|
22015
22308
|
error: error2
|
|
22016
|
-
}),
|
|
22309
|
+
}), Struct2({
|
|
22017
22310
|
_tag: Literal2("Die"),
|
|
22018
22311
|
defect: defect2
|
|
22019
|
-
}),
|
|
22312
|
+
}), Struct2({
|
|
22020
22313
|
_tag: Literal2("Interrupt"),
|
|
22021
22314
|
fiberId: UndefinedOr(Finite)
|
|
22022
22315
|
})]), transform2({
|
|
@@ -22314,7 +22607,7 @@ var DateTimeZoned = /* @__PURE__ */ declare((u) => isDateTime2(u) && isZoned2(u)
|
|
|
22314
22607
|
constraint
|
|
22315
22608
|
}) => {
|
|
22316
22609
|
const [minimum, maximum] = dateTimeArbitraryBounds(constraint, arbitraryMinimumZonedDateTimeTimestamp, arbitraryMaximumZonedDateTimeTimestamp);
|
|
22317
|
-
return linkDecoding()(
|
|
22610
|
+
return linkDecoding()(Struct2({
|
|
22318
22611
|
epochMilliseconds: dateTimeArbitraryInteger(minimum, maximum),
|
|
22319
22612
|
timeZone: timeZoneArbitrarySchema()
|
|
22320
22613
|
}), transform(({
|
|
@@ -22435,14 +22728,14 @@ var Duration = /* @__PURE__ */ declare(isDuration, {
|
|
|
22435
22728
|
importDeclarations: [`import * as Duration from "effect/Duration"`]
|
|
22436
22729
|
}),
|
|
22437
22730
|
expected: "Duration",
|
|
22438
|
-
toCodecJson: () => link()(Union2([
|
|
22731
|
+
toCodecJson: () => link()(Union2([Struct2({
|
|
22439
22732
|
_tag: Literal2("Infinity")
|
|
22440
|
-
}),
|
|
22733
|
+
}), Struct2({
|
|
22441
22734
|
_tag: Literal2("NegativeInfinity")
|
|
22442
|
-
}),
|
|
22735
|
+
}), Struct2({
|
|
22443
22736
|
_tag: Literal2("Nanos"),
|
|
22444
22737
|
value: BigInt6
|
|
22445
|
-
}),
|
|
22738
|
+
}), Struct2({
|
|
22446
22739
|
_tag: Literal2("Millis"),
|
|
22447
22740
|
value: Int
|
|
22448
22741
|
})]), transform2({
|
|
@@ -22521,10 +22814,10 @@ function Exit(value6, error, defect) {
|
|
|
22521
22814
|
importDeclarations: [`import * as Exit from "effect/Exit"`]
|
|
22522
22815
|
}),
|
|
22523
22816
|
expected: "Exit",
|
|
22524
|
-
toCodec: ([value7, error2, defect2]) => link()(Union2([
|
|
22817
|
+
toCodec: ([value7, error2, defect2]) => link()(Union2([Struct2({
|
|
22525
22818
|
_tag: Literal2("Success"),
|
|
22526
22819
|
value: value7
|
|
22527
|
-
}),
|
|
22820
|
+
}), Struct2({
|
|
22528
22821
|
_tag: Literal2("Failure"),
|
|
22529
22822
|
cause: Cause(error2, defect2)
|
|
22530
22823
|
})]), transform2({
|
|
@@ -22545,13 +22838,13 @@ function Exit(value6, error, defect) {
|
|
|
22545
22838
|
});
|
|
22546
22839
|
}
|
|
22547
22840
|
function graphEncodedSchema(type3, node, edge) {
|
|
22548
|
-
return
|
|
22841
|
+
return Struct2({
|
|
22549
22842
|
type: Literal2(type3),
|
|
22550
|
-
nodes: ArraySchema(
|
|
22843
|
+
nodes: ArraySchema(Struct2({
|
|
22551
22844
|
index: Natural,
|
|
22552
22845
|
data: node
|
|
22553
22846
|
})),
|
|
22554
|
-
edges: ArraySchema(
|
|
22847
|
+
edges: ArraySchema(Struct2({
|
|
22555
22848
|
index: Natural,
|
|
22556
22849
|
source: Natural,
|
|
22557
22850
|
target: Natural,
|
|
@@ -22620,9 +22913,9 @@ function graphToEquivalence(node, edge) {
|
|
|
22620
22913
|
};
|
|
22621
22914
|
}
|
|
22622
22915
|
function graphToArbitrary(type3, node, edge) {
|
|
22623
|
-
return linkDecoding()(Union2([Null2,
|
|
22916
|
+
return linkDecoding()(Union2([Null2, Struct2({
|
|
22624
22917
|
nodes: NonEmptyArray(node),
|
|
22625
|
-
edges: ArraySchema(
|
|
22918
|
+
edges: ArraySchema(Tuple3([Natural, Natural, edge]))
|
|
22626
22919
|
})]), transform((input) => {
|
|
22627
22920
|
if (input === null) return hydrate({
|
|
22628
22921
|
type: type3,
|
|
@@ -22690,7 +22983,7 @@ function hashMapLink(entries3) {
|
|
|
22690
22983
|
}
|
|
22691
22984
|
function HashMap(key, value6) {
|
|
22692
22985
|
const schema2 = declareConstructor()([key, value6], ([key2, value7]) => {
|
|
22693
|
-
const entries3 = ArraySchema(
|
|
22986
|
+
const entries3 = ArraySchema(Tuple3([key2, value7]));
|
|
22694
22987
|
return (input, ast, options) => {
|
|
22695
22988
|
if (isHashMap2(input)) {
|
|
22696
22989
|
return mapBothEager2(decodeUnknownEffect(entries3)(toEntries(input), options), {
|
|
@@ -22713,11 +23006,11 @@ function HashMap(key, value6) {
|
|
|
22713
23006
|
importDeclarations: [`import * as HashMap from "effect/HashMap"`]
|
|
22714
23007
|
}),
|
|
22715
23008
|
expected: "HashMap",
|
|
22716
|
-
toCodec: ([key2, value7]) => hashMapLink(ArraySchema(
|
|
23009
|
+
toCodec: ([key2, value7]) => hashMapLink(ArraySchema(Tuple3([key2, value7]))),
|
|
22717
23010
|
toCodecArbitrary: ({
|
|
22718
23011
|
constraint,
|
|
22719
23012
|
typeParameters: [key2, value7]
|
|
22720
|
-
}) => hashMapLink(withArrayLengthConstraints(ArraySchema(
|
|
23013
|
+
}) => hashMapLink(withArrayLengthConstraints(ArraySchema(Tuple3([key2, value7])).check(isUniqueKey()), constraint?.minSize, constraint?.maxSize)),
|
|
22721
23014
|
toEquivalence: ([key2, value7]) => makeCompareMap(key2, value7)
|
|
22722
23015
|
});
|
|
22723
23016
|
return make28(schema2.ast, {
|
|
@@ -22773,7 +23066,7 @@ function Option(value6) {
|
|
|
22773
23066
|
return succeedNone3;
|
|
22774
23067
|
}
|
|
22775
23068
|
return mapBothEager2(decodeUnknownEffect(value7)(input.value, options), {
|
|
22776
|
-
onSuccess:
|
|
23069
|
+
onSuccess: some3,
|
|
22777
23070
|
onFailure: (issue) => makeCompositeAtKey(ast, "value", issue, input, options)
|
|
22778
23071
|
});
|
|
22779
23072
|
}
|
|
@@ -22791,13 +23084,13 @@ function Option(value6) {
|
|
|
22791
23084
|
importDeclarations: [`import * as Option from "effect/Option"`]
|
|
22792
23085
|
}),
|
|
22793
23086
|
expected: "Option",
|
|
22794
|
-
toCodec: ([value7]) => link()(Union2([
|
|
23087
|
+
toCodec: ([value7]) => link()(Union2([Struct2({
|
|
22795
23088
|
_tag: Literal2("Some"),
|
|
22796
23089
|
value: value7
|
|
22797
|
-
}),
|
|
23090
|
+
}), Struct2({
|
|
22798
23091
|
_tag: Literal2("None")
|
|
22799
23092
|
})]), transform2({
|
|
22800
|
-
decode: (e) => e._tag === "None" ? none2() :
|
|
23093
|
+
decode: (e) => e._tag === "None" ? none2() : some3(e.value),
|
|
22801
23094
|
encode: (o) => isSome2(o) ? {
|
|
22802
23095
|
_tag: "Some",
|
|
22803
23096
|
value: o.value
|
|
@@ -22886,7 +23179,7 @@ var UrlParams = /* @__PURE__ */ declare(isUrlParams, {
|
|
|
22886
23179
|
}),
|
|
22887
23180
|
expected: "UrlParams",
|
|
22888
23181
|
toEquivalence: () => Equivalence8,
|
|
22889
|
-
toCodec: () => link()(ArraySchema(
|
|
23182
|
+
toCodec: () => link()(ArraySchema(Tuple3([String6, String6])), transform2({
|
|
22890
23183
|
decode: make25,
|
|
22891
23184
|
encode: (self) => self.params
|
|
22892
23185
|
}))
|
|
@@ -22912,8 +23205,8 @@ function OptionFromOptionalNullOr(schema2, options) {
|
|
|
22912
23205
|
const onNoneEncoding = options === void 0 ? "omit" : options.onNoneEncoding;
|
|
22913
23206
|
const noneValue = onNoneEncoding === null ? null : void 0;
|
|
22914
23207
|
return optional2(NullOr(schema2)).pipe(decodeTo2(Option(toType2(schema2)), transformOptional2({
|
|
22915
|
-
decode: (oe) => oe.pipe(filter(isNotNullish),
|
|
22916
|
-
encode: onNoneEncoding === "omit" ? flatten : (ot) =>
|
|
23208
|
+
decode: (oe) => oe.pipe(filter(isNotNullish), some3),
|
|
23209
|
+
encode: onNoneEncoding === "omit" ? flatten : (ot) => some3(getOrElse(flatten(ot), () => noneValue))
|
|
22917
23210
|
})));
|
|
22918
23211
|
}
|
|
22919
23212
|
function Redacted(value6, options) {
|
|
@@ -23005,10 +23298,10 @@ function Result(success, failure) {
|
|
|
23005
23298
|
importDeclarations: [`import * as Result from "effect/Result"`]
|
|
23006
23299
|
}),
|
|
23007
23300
|
expected: "Result",
|
|
23008
|
-
toCodec: ([success2, failure2]) => link()(Union2([
|
|
23301
|
+
toCodec: ([success2, failure2]) => link()(Union2([Struct2({
|
|
23009
23302
|
_tag: Literal2("Success"),
|
|
23010
23303
|
success: success2
|
|
23011
|
-
}),
|
|
23304
|
+
}), Struct2({
|
|
23012
23305
|
_tag: Literal2("Failure"),
|
|
23013
23306
|
failure: failure2
|
|
23014
23307
|
})]), transform2({
|
|
@@ -23082,7 +23375,7 @@ function makeClass(Inherited, identifier2, struct2, annotations2, proto) {
|
|
|
23082
23375
|
}
|
|
23083
23376
|
static extend(identifier3) {
|
|
23084
23377
|
return (schema2, annotations3) => {
|
|
23085
|
-
const extension = isStruct(schema2) ? schema2 :
|
|
23378
|
+
const extension = isStruct(schema2) ? schema2 : Struct2(schema2);
|
|
23086
23379
|
const fields = {
|
|
23087
23380
|
...struct2.fields,
|
|
23088
23381
|
...extension.fields
|
|
@@ -23143,7 +23436,7 @@ function isStruct(schema2) {
|
|
|
23143
23436
|
return isSchema(schema2);
|
|
23144
23437
|
}
|
|
23145
23438
|
var Class4 = (identifier2) => (schema2, annotations2) => {
|
|
23146
|
-
const struct2 = isStruct(schema2) ? schema2 :
|
|
23439
|
+
const struct2 = isStruct(schema2) ? schema2 : Struct2(schema2);
|
|
23147
23440
|
return makeClass(Class3, identifier2, struct2, annotations2, (identifier3) => ({
|
|
23148
23441
|
toString() {
|
|
23149
23442
|
return `${identifier3}(${format({
|
|
@@ -23164,7 +23457,7 @@ var TaggedClass2 = (identifier2) => {
|
|
|
23164
23457
|
};
|
|
23165
23458
|
};
|
|
23166
23459
|
var Error4 = (identifier2) => (schema2, annotations2) => {
|
|
23167
|
-
const struct2 = isStruct(schema2) ? schema2 :
|
|
23460
|
+
const struct2 = isStruct(schema2) ? schema2 : Struct2(schema2);
|
|
23168
23461
|
const self = makeClass(Error2, identifier2, struct2, annotations2, (identifier3) => ({
|
|
23169
23462
|
name: identifier3
|
|
23170
23463
|
}));
|
|
@@ -23244,7 +23537,7 @@ var Json2 = /* @__PURE__ */ make28(/* @__PURE__ */ annotate2(Json, {
|
|
|
23244
23537
|
})
|
|
23245
23538
|
}));
|
|
23246
23539
|
var JsonObject = /* @__PURE__ */ Record(String6, Json2);
|
|
23247
|
-
var JsonError = /* @__PURE__ */
|
|
23540
|
+
var JsonError = /* @__PURE__ */ Struct2({
|
|
23248
23541
|
message: String6,
|
|
23249
23542
|
name: /* @__PURE__ */ optionalKey2(String6),
|
|
23250
23543
|
stack: /* @__PURE__ */ optionalKey2(String6),
|
|
@@ -25070,7 +25363,7 @@ var poll2 = (self) => suspend(() => {
|
|
|
25070
25363
|
return succeed3(none2());
|
|
25071
25364
|
}
|
|
25072
25365
|
if (result6._tag === "Success") {
|
|
25073
|
-
return succeed3(
|
|
25366
|
+
return succeed3(some3(result6.value));
|
|
25074
25367
|
}
|
|
25075
25368
|
return succeed3(none2());
|
|
25076
25369
|
});
|
|
@@ -25328,7 +25621,7 @@ var acquireUseRelease3 = (acquire, use, release3) => fromTransformBracket(fnUntr
|
|
|
25328
25621
|
let option6 = none2();
|
|
25329
25622
|
yield* addFinalizerExit(forkedScope, (exit3) => isSome2(option6) ? release3(option6.value, exit3) : void_5);
|
|
25330
25623
|
const value6 = yield* uninterruptible2(acquire);
|
|
25331
|
-
option6 =
|
|
25624
|
+
option6 = some3(value6);
|
|
25332
25625
|
return yield* toTransform(use(value6))(upstream, scope3);
|
|
25333
25626
|
}));
|
|
25334
25627
|
var fromArray = (array2) => fromPull(sync4(() => {
|
|
@@ -25349,7 +25642,7 @@ var fromIteratorArray = (iterator, chunkSize = DefaultChunkSize) => {
|
|
|
25349
25642
|
if (buffer3.length === 0) {
|
|
25350
25643
|
return done3(state.value);
|
|
25351
25644
|
}
|
|
25352
|
-
done4 =
|
|
25645
|
+
done4 = some3(state.value);
|
|
25353
25646
|
break;
|
|
25354
25647
|
}
|
|
25355
25648
|
buffer3.push(state.value);
|
|
@@ -25911,7 +26204,7 @@ var splitLines = () => fromTransform((upstream, _scope) => sync4(() => {
|
|
|
25911
26204
|
onSuccess: loop,
|
|
25912
26205
|
onFailure: failCause4,
|
|
25913
26206
|
onDone: (leftover) => {
|
|
25914
|
-
done4 =
|
|
26207
|
+
done4 = some3(leftover);
|
|
25915
26208
|
if (stringBuilder.length > 0) {
|
|
25916
26209
|
const last = stringBuilder;
|
|
25917
26210
|
stringBuilder = "";
|
|
@@ -26184,13 +26477,13 @@ var empty13 = () => {
|
|
|
26184
26477
|
};
|
|
26185
26478
|
var get6 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
26186
26479
|
if (self.backing.has(key)) {
|
|
26187
|
-
return
|
|
26480
|
+
return some3(self.backing.get(key));
|
|
26188
26481
|
} else if (isSimpleKey(key)) {
|
|
26189
26482
|
return none2();
|
|
26190
26483
|
}
|
|
26191
26484
|
const refKey = referentialKeysCache.get(self);
|
|
26192
26485
|
if (refKey !== void 0) {
|
|
26193
|
-
return self.backing.has(refKey) ?
|
|
26486
|
+
return self.backing.has(refKey) ? some3(self.backing.get(refKey)) : none2();
|
|
26194
26487
|
}
|
|
26195
26488
|
const hash2 = hash(key);
|
|
26196
26489
|
const bucket = self.buckets.get(hash2);
|
|
@@ -26206,7 +26499,7 @@ var getFromBucket = (self, bucket, key) => {
|
|
|
26206
26499
|
if (equals(key, bucket[i])) {
|
|
26207
26500
|
const refKey = bucket[i];
|
|
26208
26501
|
referentialKeysCache.set(key, refKey);
|
|
26209
|
-
return
|
|
26502
|
+
return some3(self.backing.get(refKey));
|
|
26210
26503
|
}
|
|
26211
26504
|
}
|
|
26212
26505
|
return none2();
|
|
@@ -26882,12 +27175,12 @@ var zipWithNext = (self) => mapAccumArray(self, none2, (acc, arr) => {
|
|
|
26882
27175
|
let i = 0;
|
|
26883
27176
|
if (acc._tag === "None") {
|
|
26884
27177
|
i = 1;
|
|
26885
|
-
acc =
|
|
27178
|
+
acc = some3(arr[0]);
|
|
26886
27179
|
}
|
|
26887
27180
|
const pairs = empty3();
|
|
26888
27181
|
for (; i < arr.length; i++) {
|
|
26889
27182
|
const value6 = acc.value;
|
|
26890
|
-
acc =
|
|
27183
|
+
acc = some3(arr[i]);
|
|
26891
27184
|
pairs.push([value6, acc]);
|
|
26892
27185
|
}
|
|
26893
27186
|
return [acc, pairs];
|
|
@@ -26901,7 +27194,7 @@ var zipWithPrevious = (self) => mapAccumArray(self, none2, (acc, arr) => {
|
|
|
26901
27194
|
for (let i = 0; i < arr.length; i++) {
|
|
26902
27195
|
const value6 = arr[i];
|
|
26903
27196
|
pairs.push([acc, value6]);
|
|
26904
|
-
acc =
|
|
27197
|
+
acc = some3(arr[i]);
|
|
26905
27198
|
}
|
|
26906
27199
|
return [acc, pairs];
|
|
26907
27200
|
});
|
|
@@ -26914,16 +27207,16 @@ var zipWithPreviousAndNext = (self) => mapAccumArray(self, () => ({
|
|
|
26914
27207
|
if (acc.current._tag === "None") {
|
|
26915
27208
|
i = 1;
|
|
26916
27209
|
current = arr[0];
|
|
26917
|
-
acc.current =
|
|
27210
|
+
acc.current = some3(current);
|
|
26918
27211
|
} else {
|
|
26919
27212
|
current = acc.current.value;
|
|
26920
27213
|
}
|
|
26921
27214
|
const pairs = empty3();
|
|
26922
27215
|
for (; i < arr.length; i++) {
|
|
26923
27216
|
const element = arr[i];
|
|
26924
|
-
acc.current =
|
|
27217
|
+
acc.current = some3(element);
|
|
26925
27218
|
pairs.push([acc.prev, current, acc.current]);
|
|
26926
|
-
acc.prev =
|
|
27219
|
+
acc.prev = some3(current);
|
|
26927
27220
|
current = element;
|
|
26928
27221
|
}
|
|
26929
27222
|
return [acc, pairs];
|
|
@@ -27153,7 +27446,7 @@ var withExecutionPlan3 = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (se
|
|
|
27153
27446
|
if (preventFallbackOnPartialStream && receivedElements) {
|
|
27154
27447
|
return fail11(error);
|
|
27155
27448
|
}
|
|
27156
|
-
lastError =
|
|
27449
|
+
lastError = some3(error);
|
|
27157
27450
|
return loop;
|
|
27158
27451
|
});
|
|
27159
27452
|
});
|
|
@@ -27757,7 +28050,7 @@ var aggregateWithin = /* @__PURE__ */ dual(3, (self, sink, schedule4) => fromCha
|
|
|
27757
28050
|
});
|
|
27758
28051
|
const catchSinkHalt = flatMap5(([value6, leftover_]) => {
|
|
27759
28052
|
if (!sinkHasInput && buffer3.state._tag === "Done") return done3();
|
|
27760
|
-
lastOutput =
|
|
28053
|
+
lastOutput = some3(value6);
|
|
27761
28054
|
leftover = leftover_;
|
|
27762
28055
|
return succeed7(of(value6));
|
|
27763
28056
|
});
|
|
@@ -28014,8 +28307,8 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (
|
|
|
28014
28307
|
});
|
|
28015
28308
|
},
|
|
28016
28309
|
pull() {
|
|
28017
|
-
return new Promise((
|
|
28018
|
-
currentResolve =
|
|
28310
|
+
return new Promise((resolve5) => {
|
|
28311
|
+
currentResolve = resolve5;
|
|
28019
28312
|
latch.openUnsafe();
|
|
28020
28313
|
});
|
|
28021
28314
|
},
|
|
@@ -28099,271 +28392,700 @@ var toPubSubTake2 = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake(self
|
|
|
28099
28392
|
var toQueue = /* @__PURE__ */ dual(2, (self, options) => toQueueArray(self.channel, options));
|
|
28100
28393
|
var runIntoQueue = /* @__PURE__ */ dual(2, (self, queue) => runIntoQueueArray(self.channel, queue));
|
|
28101
28394
|
|
|
28102
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
28103
|
-
var
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
|
|
28395
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
|
|
28396
|
+
var Match_exports = {};
|
|
28397
|
+
__export(Match_exports, {
|
|
28398
|
+
any: () => any3,
|
|
28399
|
+
bigint: () => bigint,
|
|
28400
|
+
boolean: () => boolean2,
|
|
28401
|
+
date: () => date,
|
|
28402
|
+
defined: () => defined2,
|
|
28403
|
+
discriminator: () => discriminator2,
|
|
28404
|
+
discriminatorStartsWith: () => discriminatorStartsWith2,
|
|
28405
|
+
discriminators: () => discriminators2,
|
|
28406
|
+
discriminatorsExhaustive: () => discriminatorsExhaustive2,
|
|
28407
|
+
exhaustive: () => exhaustive2,
|
|
28408
|
+
fn: () => fn4,
|
|
28409
|
+
instanceOf: () => instanceOf3,
|
|
28410
|
+
instanceOfUnsafe: () => instanceOfUnsafe,
|
|
28411
|
+
is: () => is4,
|
|
28412
|
+
nonEmptyString: () => nonEmptyString2,
|
|
28413
|
+
not: () => not3,
|
|
28414
|
+
null: () => _null,
|
|
28415
|
+
number: () => number3,
|
|
28416
|
+
option: () => option4,
|
|
28417
|
+
orElse: () => orElse4,
|
|
28418
|
+
orElseAbsurd: () => orElseAbsurd2,
|
|
28419
|
+
record: () => record2,
|
|
28420
|
+
result: () => result5,
|
|
28421
|
+
string: () => string3,
|
|
28422
|
+
symbol: () => symbol4,
|
|
28423
|
+
tag: () => tag3,
|
|
28424
|
+
tagStartsWith: () => tagStartsWith2,
|
|
28425
|
+
tags: () => tags2,
|
|
28426
|
+
tagsExhaustive: () => tagsExhaustive2,
|
|
28427
|
+
type: () => type2,
|
|
28428
|
+
typeTags: () => typeTags2,
|
|
28429
|
+
undefined: () => _undefined,
|
|
28430
|
+
value: () => value5,
|
|
28431
|
+
valueTags: () => valueTags2,
|
|
28432
|
+
when: () => when5,
|
|
28433
|
+
whenAnd: () => whenAnd2,
|
|
28434
|
+
whenOr: () => whenOr2,
|
|
28435
|
+
withReturnType: () => withReturnType2
|
|
28436
|
+
});
|
|
28107
28437
|
|
|
28108
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
28109
|
-
var TypeId40 = "~effect/
|
|
28110
|
-
var
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
|
|
28114
|
-
|
|
28115
|
-
|
|
28116
|
-
|
|
28117
|
-
|
|
28118
|
-
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
return
|
|
28438
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/matcher.js
|
|
28439
|
+
var TypeId40 = "~effect/Match/Matcher";
|
|
28440
|
+
var TypeMatcherProto = {
|
|
28441
|
+
[TypeId40]: {
|
|
28442
|
+
_input: identity,
|
|
28443
|
+
_filters: identity,
|
|
28444
|
+
_remaining: identity,
|
|
28445
|
+
_result: identity,
|
|
28446
|
+
_return: identity,
|
|
28447
|
+
_args: identity
|
|
28448
|
+
},
|
|
28449
|
+
_tag: "TypeMatcher",
|
|
28450
|
+
add(_case) {
|
|
28451
|
+
return makeTypeMatcher(this.select, [...this.cases, _case]);
|
|
28452
|
+
},
|
|
28453
|
+
pipe() {
|
|
28454
|
+
return pipeArguments(this, arguments);
|
|
28122
28455
|
}
|
|
28123
28456
|
};
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28128
|
-
|
|
28129
|
-
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28457
|
+
function makeTypeMatcher(select, cases) {
|
|
28458
|
+
const matcher = Object.create(TypeMatcherProto);
|
|
28459
|
+
matcher.select = select;
|
|
28460
|
+
matcher.cases = cases;
|
|
28461
|
+
return matcher;
|
|
28462
|
+
}
|
|
28463
|
+
var ValueMatcherProto = {
|
|
28464
|
+
[TypeId40]: {
|
|
28465
|
+
_input: identity,
|
|
28466
|
+
_filters: identity,
|
|
28467
|
+
_result: identity,
|
|
28468
|
+
_return: identity,
|
|
28469
|
+
_flavor: identity
|
|
28470
|
+
},
|
|
28471
|
+
_tag: "ValueMatcher",
|
|
28472
|
+
add(_case) {
|
|
28473
|
+
if (isSuccess2(this.value)) {
|
|
28474
|
+
return this;
|
|
28475
|
+
}
|
|
28476
|
+
if (_case._tag === "When" && _case.guard(this.provided) === true) {
|
|
28477
|
+
return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
|
|
28478
|
+
} else if (_case._tag === "Not" && _case.guard(this.provided) === false) {
|
|
28479
|
+
return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
|
|
28135
28480
|
}
|
|
28481
|
+
return this;
|
|
28482
|
+
},
|
|
28483
|
+
pipe() {
|
|
28484
|
+
return pipeArguments(this, arguments);
|
|
28136
28485
|
}
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
|
|
28142
|
-
|
|
28143
|
-
|
|
28144
|
-
|
|
28145
|
-
|
|
28146
|
-
|
|
28147
|
-
|
|
28148
|
-
|
|
28486
|
+
};
|
|
28487
|
+
function makeValueMatcher(provided, value6) {
|
|
28488
|
+
const matcher = Object.create(ValueMatcherProto);
|
|
28489
|
+
matcher.provided = provided;
|
|
28490
|
+
matcher.value = value6;
|
|
28491
|
+
return matcher;
|
|
28492
|
+
}
|
|
28493
|
+
var makeWhen = (guard, evaluate2) => ({
|
|
28494
|
+
_tag: "When",
|
|
28495
|
+
guard,
|
|
28496
|
+
evaluate: evaluate2
|
|
28497
|
+
});
|
|
28498
|
+
var makeNot = (guard, evaluate2) => ({
|
|
28499
|
+
_tag: "Not",
|
|
28500
|
+
guard,
|
|
28501
|
+
evaluate: evaluate2
|
|
28502
|
+
});
|
|
28503
|
+
var makePredicate = (pattern) => {
|
|
28504
|
+
if (typeof pattern === "function") {
|
|
28505
|
+
return pattern;
|
|
28506
|
+
} else if (Array.isArray(pattern)) {
|
|
28507
|
+
const predicates = pattern.map(makePredicate);
|
|
28508
|
+
const len = predicates.length;
|
|
28509
|
+
return (u) => {
|
|
28510
|
+
if (!Array.isArray(u)) {
|
|
28511
|
+
return false;
|
|
28512
|
+
}
|
|
28513
|
+
for (let i = 0; i < len; i++) {
|
|
28514
|
+
if (predicates[i](u[i]) === false) {
|
|
28515
|
+
return false;
|
|
28516
|
+
}
|
|
28517
|
+
}
|
|
28518
|
+
return true;
|
|
28519
|
+
};
|
|
28520
|
+
} else if (pattern !== null && typeof pattern === "object") {
|
|
28521
|
+
const keysAndPredicates = Reflect.ownKeys(pattern).map((key) => [key, makePredicate(pattern[key])]);
|
|
28522
|
+
const len = keysAndPredicates.length;
|
|
28523
|
+
return (u) => {
|
|
28524
|
+
if (typeof u !== "object" || u === null) {
|
|
28525
|
+
return false;
|
|
28526
|
+
}
|
|
28527
|
+
for (let i = 0; i < len; i++) {
|
|
28528
|
+
const [key, predicate] = keysAndPredicates[i];
|
|
28529
|
+
if (!(key in u) || predicate(u[key]) === false) {
|
|
28530
|
+
return false;
|
|
28531
|
+
}
|
|
28532
|
+
}
|
|
28533
|
+
return true;
|
|
28534
|
+
};
|
|
28149
28535
|
}
|
|
28536
|
+
return (u) => u === pattern;
|
|
28150
28537
|
};
|
|
28151
|
-
var
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
function normalizeStringPosix(path, allowAboveRoot) {
|
|
28160
|
-
let res = "";
|
|
28161
|
-
let lastSegmentLength = 0;
|
|
28162
|
-
let lastSlash = -1;
|
|
28163
|
-
let dots = 0;
|
|
28164
|
-
let code;
|
|
28165
|
-
for (let i = 0; i <= path.length; ++i) {
|
|
28166
|
-
if (i < path.length) {
|
|
28167
|
-
code = path.charCodeAt(i);
|
|
28168
|
-
} else if (code === 47) {
|
|
28169
|
-
break;
|
|
28170
|
-
} else {
|
|
28171
|
-
code = 47;
|
|
28538
|
+
var makeOrPredicate = (patterns) => {
|
|
28539
|
+
const predicates = patterns.map(makePredicate);
|
|
28540
|
+
const len = predicates.length;
|
|
28541
|
+
return (u) => {
|
|
28542
|
+
for (let i = 0; i < len; i++) {
|
|
28543
|
+
if (predicates[i](u) === true) {
|
|
28544
|
+
return true;
|
|
28545
|
+
}
|
|
28172
28546
|
}
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
} else {
|
|
28184
|
-
res = res.slice(0, lastSlashIndex);
|
|
28185
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
28186
|
-
}
|
|
28187
|
-
lastSlash = i;
|
|
28188
|
-
dots = 0;
|
|
28189
|
-
continue;
|
|
28190
|
-
}
|
|
28191
|
-
} else if (res.length === 2 || res.length === 1) {
|
|
28192
|
-
res = "";
|
|
28193
|
-
lastSegmentLength = 0;
|
|
28194
|
-
lastSlash = i;
|
|
28195
|
-
dots = 0;
|
|
28196
|
-
continue;
|
|
28197
|
-
}
|
|
28198
|
-
}
|
|
28199
|
-
if (allowAboveRoot) {
|
|
28200
|
-
if (res.length > 0) {
|
|
28201
|
-
res += "/..";
|
|
28202
|
-
} else {
|
|
28203
|
-
res = "..";
|
|
28204
|
-
}
|
|
28205
|
-
lastSegmentLength = 2;
|
|
28206
|
-
}
|
|
28207
|
-
} else {
|
|
28208
|
-
if (res.length > 0) {
|
|
28209
|
-
res += "/" + path.slice(lastSlash + 1, i);
|
|
28210
|
-
} else {
|
|
28211
|
-
res = path.slice(lastSlash + 1, i);
|
|
28212
|
-
}
|
|
28213
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
28547
|
+
return false;
|
|
28548
|
+
};
|
|
28549
|
+
};
|
|
28550
|
+
var makeAndPredicate = (patterns) => {
|
|
28551
|
+
const predicates = patterns.map(makePredicate);
|
|
28552
|
+
const len = predicates.length;
|
|
28553
|
+
return (u) => {
|
|
28554
|
+
for (let i = 0; i < len; i++) {
|
|
28555
|
+
if (predicates[i](u) === false) {
|
|
28556
|
+
return false;
|
|
28214
28557
|
}
|
|
28215
|
-
lastSlash = i;
|
|
28216
|
-
dots = 0;
|
|
28217
|
-
} else if (code === 46 && dots !== -1) {
|
|
28218
|
-
++dots;
|
|
28219
|
-
} else {
|
|
28220
|
-
dots = -1;
|
|
28221
28558
|
}
|
|
28559
|
+
return true;
|
|
28560
|
+
};
|
|
28561
|
+
};
|
|
28562
|
+
var type = () => makeTypeMatcher(identity, []);
|
|
28563
|
+
var fn3 = (select) => makeTypeMatcher(select, []);
|
|
28564
|
+
var value4 = (i) => makeValueMatcher(i, fail2(i));
|
|
28565
|
+
var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
|
|
28566
|
+
const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
28567
|
+
return match10(input);
|
|
28568
|
+
});
|
|
28569
|
+
var typeTags = () => (fields) => {
|
|
28570
|
+
const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
28571
|
+
return (input) => match10(input);
|
|
28572
|
+
};
|
|
28573
|
+
var withReturnType = () => (self) => self;
|
|
28574
|
+
var when4 = (pattern, f) => (self) => self.add(makeWhen(makePredicate(pattern), f));
|
|
28575
|
+
var whenOr = (...args2) => (self) => {
|
|
28576
|
+
const onMatch = args2[args2.length - 1];
|
|
28577
|
+
const patterns = args2.slice(0, -1);
|
|
28578
|
+
return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
|
|
28579
|
+
};
|
|
28580
|
+
var whenAnd = (...args2) => (self) => {
|
|
28581
|
+
const onMatch = args2[args2.length - 1];
|
|
28582
|
+
const patterns = args2.slice(0, -1);
|
|
28583
|
+
return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
|
|
28584
|
+
};
|
|
28585
|
+
var discriminator = (field) => (...pattern) => {
|
|
28586
|
+
const f = pattern[pattern.length - 1];
|
|
28587
|
+
const values2 = pattern.slice(0, -1);
|
|
28588
|
+
const pred = values2.length === 1 ? (_) => _ != null && _[field] === values2[0] : (_) => _ != null && values2.includes(_[field]);
|
|
28589
|
+
return (self) => self.add(makeWhen(pred, f));
|
|
28590
|
+
};
|
|
28591
|
+
var discriminatorStartsWith = (field) => (pattern, f) => {
|
|
28592
|
+
const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
|
|
28593
|
+
return (self) => self.add(makeWhen(pred, f));
|
|
28594
|
+
};
|
|
28595
|
+
var discriminators = (field) => (fields) => {
|
|
28596
|
+
const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
|
|
28597
|
+
return (self) => self.add(predicate);
|
|
28598
|
+
};
|
|
28599
|
+
var discriminatorsExhaustive = (field) => (fields) => {
|
|
28600
|
+
const addCases = discriminators(field)(fields);
|
|
28601
|
+
return (matcher) => exhaustive(addCases(matcher));
|
|
28602
|
+
};
|
|
28603
|
+
var tag2 = /* @__PURE__ */ discriminator("_tag");
|
|
28604
|
+
var tagStartsWith = /* @__PURE__ */ discriminatorStartsWith("_tag");
|
|
28605
|
+
var tags = /* @__PURE__ */ discriminators("_tag");
|
|
28606
|
+
var tagsExhaustive = /* @__PURE__ */ discriminatorsExhaustive("_tag");
|
|
28607
|
+
var not2 = (pattern, f) => (self) => self.add(makeNot(makePredicate(pattern), f));
|
|
28608
|
+
var nonEmptyString = (u) => typeof u === "string" && u.length > 0;
|
|
28609
|
+
var is3 = (...literals) => {
|
|
28610
|
+
const len = literals.length;
|
|
28611
|
+
return (u) => {
|
|
28612
|
+
for (let i = 0; i < len; i++) {
|
|
28613
|
+
if (u === literals[i]) {
|
|
28614
|
+
return true;
|
|
28615
|
+
}
|
|
28616
|
+
}
|
|
28617
|
+
return false;
|
|
28618
|
+
};
|
|
28619
|
+
};
|
|
28620
|
+
var any2 = () => true;
|
|
28621
|
+
var defined = (u) => u !== void 0 && u !== null;
|
|
28622
|
+
var instanceOf2 = (constructor) => (u) => u instanceof constructor;
|
|
28623
|
+
var orElse3 = (f) => (self) => {
|
|
28624
|
+
const toResult = result4(self);
|
|
28625
|
+
if (isResult2(toResult)) {
|
|
28626
|
+
return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
|
|
28222
28627
|
}
|
|
28223
|
-
return
|
|
28224
|
-
|
|
28225
|
-
|
|
28226
|
-
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
return dir + sep + base;
|
|
28235
|
-
}
|
|
28236
|
-
function fromFileUrl(url) {
|
|
28237
|
-
if (url.protocol !== "file:") {
|
|
28238
|
-
return fail7(new BadArgument({
|
|
28239
|
-
module: "Path",
|
|
28240
|
-
method: "fromFileUrl",
|
|
28241
|
-
description: "URL must be of scheme file"
|
|
28242
|
-
}));
|
|
28243
|
-
} else if (url.hostname !== "") {
|
|
28244
|
-
return fail7(new BadArgument({
|
|
28245
|
-
module: "Path",
|
|
28246
|
-
method: "fromFileUrl",
|
|
28247
|
-
description: "Invalid file URL host"
|
|
28248
|
-
}));
|
|
28628
|
+
return (...args2) => {
|
|
28629
|
+
const a = toResult(...args2);
|
|
28630
|
+
return isSuccess2(a) ? a.success : f(a.failure, ...args2);
|
|
28631
|
+
};
|
|
28632
|
+
};
|
|
28633
|
+
var orElseAbsurd = (self) => orElse3(() => {
|
|
28634
|
+
throw new Error("effect/Match/orElseAbsurd: absurd");
|
|
28635
|
+
})(self);
|
|
28636
|
+
var result4 = (self) => {
|
|
28637
|
+
if (self._tag === "ValueMatcher") {
|
|
28638
|
+
return self.value;
|
|
28249
28639
|
}
|
|
28250
|
-
const
|
|
28251
|
-
|
|
28252
|
-
|
|
28253
|
-
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
|
|
28257
|
-
|
|
28258
|
-
|
|
28259
|
-
}));
|
|
28640
|
+
const len = self.cases.length;
|
|
28641
|
+
if (len === 1) {
|
|
28642
|
+
const _case = self.cases[0];
|
|
28643
|
+
return (...args2) => {
|
|
28644
|
+
const input = self.select(...args2);
|
|
28645
|
+
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
28646
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28647
|
+
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
28648
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28260
28649
|
}
|
|
28261
|
-
|
|
28650
|
+
return fail2(input);
|
|
28651
|
+
};
|
|
28262
28652
|
}
|
|
28263
|
-
return
|
|
28264
|
-
|
|
28265
|
-
|
|
28266
|
-
|
|
28267
|
-
|
|
28268
|
-
|
|
28269
|
-
|
|
28270
|
-
|
|
28271
|
-
if (i >= 0) {
|
|
28272
|
-
path = arguments[i];
|
|
28273
|
-
} else {
|
|
28274
|
-
const process = globalThis.process;
|
|
28275
|
-
if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
|
|
28276
|
-
cwd = process.cwd();
|
|
28653
|
+
return (...args2) => {
|
|
28654
|
+
const input = self.select(...args2);
|
|
28655
|
+
for (let i = 0; i < len; i++) {
|
|
28656
|
+
const _case = self.cases[i];
|
|
28657
|
+
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
28658
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28659
|
+
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
28660
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28277
28661
|
}
|
|
28278
|
-
path = cwd;
|
|
28279
28662
|
}
|
|
28280
|
-
|
|
28281
|
-
|
|
28282
|
-
|
|
28283
|
-
|
|
28284
|
-
|
|
28663
|
+
return fail2(input);
|
|
28664
|
+
};
|
|
28665
|
+
};
|
|
28666
|
+
var option3 = (self) => {
|
|
28667
|
+
const toResult = result4(self);
|
|
28668
|
+
if (isResult2(toResult)) {
|
|
28669
|
+
return match2(toResult, {
|
|
28670
|
+
onFailure: () => none2(),
|
|
28671
|
+
onSuccess: some3
|
|
28672
|
+
});
|
|
28285
28673
|
}
|
|
28286
|
-
|
|
28287
|
-
|
|
28288
|
-
|
|
28289
|
-
|
|
28290
|
-
|
|
28291
|
-
|
|
28674
|
+
return (...args2) => match2(toResult(...args2), {
|
|
28675
|
+
onFailure: () => none2(),
|
|
28676
|
+
onSuccess: some3
|
|
28677
|
+
});
|
|
28678
|
+
};
|
|
28679
|
+
var getExhaustiveAbsurdErrorMessage = "effect/match/Match/exhaustive: absurd";
|
|
28680
|
+
var exhaustive = (self) => {
|
|
28681
|
+
const toResult = result4(self);
|
|
28682
|
+
if (isResult2(toResult)) {
|
|
28683
|
+
if (isSuccess2(toResult)) {
|
|
28684
|
+
return toResult.success;
|
|
28292
28685
|
}
|
|
28293
|
-
|
|
28294
|
-
return resolvedPath;
|
|
28295
|
-
} else {
|
|
28296
|
-
return ".";
|
|
28686
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
28297
28687
|
}
|
|
28688
|
+
return (...args2) => {
|
|
28689
|
+
const result6 = toResult(...args2);
|
|
28690
|
+
if (isSuccess2(result6)) {
|
|
28691
|
+
return result6.success;
|
|
28692
|
+
}
|
|
28693
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
28694
|
+
};
|
|
28298
28695
|
};
|
|
28299
|
-
|
|
28300
|
-
|
|
28301
|
-
|
|
28302
|
-
|
|
28303
|
-
|
|
28304
|
-
|
|
28305
|
-
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
var
|
|
28311
|
-
var
|
|
28312
|
-
var
|
|
28313
|
-
var
|
|
28314
|
-
var
|
|
28315
|
-
|
|
28316
|
-
|
|
28317
|
-
|
|
28318
|
-
|
|
28319
|
-
|
|
28320
|
-
|
|
28321
|
-
|
|
28322
|
-
|
|
28323
|
-
|
|
28696
|
+
|
|
28697
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
|
|
28698
|
+
var type2 = type;
|
|
28699
|
+
var fn4 = fn3;
|
|
28700
|
+
var value5 = value4;
|
|
28701
|
+
var valueTags2 = valueTags;
|
|
28702
|
+
var typeTags2 = typeTags;
|
|
28703
|
+
var withReturnType2 = withReturnType;
|
|
28704
|
+
var when5 = when4;
|
|
28705
|
+
var whenOr2 = whenOr;
|
|
28706
|
+
var whenAnd2 = whenAnd;
|
|
28707
|
+
var discriminator2 = discriminator;
|
|
28708
|
+
var discriminatorStartsWith2 = discriminatorStartsWith;
|
|
28709
|
+
var discriminators2 = discriminators;
|
|
28710
|
+
var discriminatorsExhaustive2 = discriminatorsExhaustive;
|
|
28711
|
+
var tag3 = tag2;
|
|
28712
|
+
var tagStartsWith2 = tagStartsWith;
|
|
28713
|
+
var tags2 = tags;
|
|
28714
|
+
var tagsExhaustive2 = tagsExhaustive;
|
|
28715
|
+
var not3 = not2;
|
|
28716
|
+
var nonEmptyString2 = nonEmptyString;
|
|
28717
|
+
var is4 = is3;
|
|
28718
|
+
var string3 = isString;
|
|
28719
|
+
var number3 = isNumber;
|
|
28720
|
+
var any3 = any2;
|
|
28721
|
+
var defined2 = defined;
|
|
28722
|
+
var boolean2 = isBoolean;
|
|
28723
|
+
var _undefined = isUndefined;
|
|
28724
|
+
var _null = isNull;
|
|
28725
|
+
var bigint = isBigInt;
|
|
28726
|
+
var symbol4 = isSymbol;
|
|
28727
|
+
var date = isDate;
|
|
28728
|
+
var record2 = isObject;
|
|
28729
|
+
var instanceOf3 = instanceOf2;
|
|
28730
|
+
var instanceOfUnsafe = instanceOf2;
|
|
28731
|
+
var orElse4 = orElse3;
|
|
28732
|
+
var orElseAbsurd2 = orElseAbsurd;
|
|
28733
|
+
var result5 = result4;
|
|
28734
|
+
var option4 = option3;
|
|
28735
|
+
var exhaustive2 = exhaustive;
|
|
28736
|
+
|
|
28737
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Ref.js
|
|
28738
|
+
var Ref_exports = {};
|
|
28739
|
+
__export(Ref_exports, {
|
|
28740
|
+
get: () => get10,
|
|
28741
|
+
getAndSet: () => getAndSet,
|
|
28742
|
+
getAndUpdate: () => getAndUpdate,
|
|
28743
|
+
getAndUpdateSome: () => getAndUpdateSome,
|
|
28744
|
+
getUnsafe: () => getUnsafe5,
|
|
28745
|
+
make: () => make38,
|
|
28746
|
+
makeUnsafe: () => makeUnsafe10,
|
|
28747
|
+
modify: () => modify4,
|
|
28748
|
+
modifySome: () => modifySome,
|
|
28749
|
+
set: () => set8,
|
|
28750
|
+
setAndGet: () => setAndGet,
|
|
28751
|
+
update: () => update2,
|
|
28752
|
+
updateAndGet: () => updateAndGet,
|
|
28753
|
+
updateSome: () => updateSome,
|
|
28754
|
+
updateSomeAndGet: () => updateSomeAndGet
|
|
28755
|
+
});
|
|
28756
|
+
var TypeId41 = "~effect/Ref";
|
|
28757
|
+
var RefProto = {
|
|
28758
|
+
[TypeId41]: {
|
|
28759
|
+
_A: identity
|
|
28760
|
+
},
|
|
28761
|
+
...PipeInspectableProto,
|
|
28762
|
+
toJSON() {
|
|
28763
|
+
return {
|
|
28764
|
+
_id: "Ref",
|
|
28765
|
+
ref: this.ref
|
|
28766
|
+
};
|
|
28324
28767
|
}
|
|
28325
|
-
|
|
28326
|
-
|
|
28768
|
+
};
|
|
28769
|
+
var makeUnsafe10 = (value6) => {
|
|
28770
|
+
const self = Object.create(RefProto);
|
|
28771
|
+
self.ref = make30(value6);
|
|
28772
|
+
return self;
|
|
28773
|
+
};
|
|
28774
|
+
var make38 = (value6) => sync4(() => makeUnsafe10(value6));
|
|
28775
|
+
var get10 = (self) => sync4(() => self.ref.current);
|
|
28776
|
+
var set8 = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => set6(self.ref, value6)));
|
|
28777
|
+
var getAndSet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => {
|
|
28778
|
+
const current = self.ref.current;
|
|
28779
|
+
self.ref.current = value6;
|
|
28780
|
+
return current;
|
|
28781
|
+
}));
|
|
28782
|
+
var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28783
|
+
const current = self.ref.current;
|
|
28784
|
+
self.ref.current = f(current);
|
|
28785
|
+
return current;
|
|
28786
|
+
}));
|
|
28787
|
+
var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28788
|
+
const current = self.ref.current;
|
|
28789
|
+
const option6 = pf(current);
|
|
28790
|
+
if (option6._tag === "Some") {
|
|
28791
|
+
self.ref.current = option6.value;
|
|
28327
28792
|
}
|
|
28328
|
-
|
|
28329
|
-
|
|
28793
|
+
return current;
|
|
28794
|
+
}));
|
|
28795
|
+
var setAndGet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => self.ref.current = value6));
|
|
28796
|
+
var modify4 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28797
|
+
const [b, a] = f(self.ref.current);
|
|
28798
|
+
self.ref.current = a;
|
|
28799
|
+
return b;
|
|
28800
|
+
}));
|
|
28801
|
+
var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
|
|
28802
|
+
const [b, option6] = pf(value6);
|
|
28803
|
+
return [b, option6._tag === "None" ? value6 : option6.value];
|
|
28804
|
+
}));
|
|
28805
|
+
var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28806
|
+
self.ref.current = f(self.ref.current);
|
|
28807
|
+
}));
|
|
28808
|
+
var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
|
|
28809
|
+
var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28810
|
+
const option6 = f(self.ref.current);
|
|
28811
|
+
if (option6._tag === "Some") {
|
|
28812
|
+
self.ref.current = option6.value;
|
|
28330
28813
|
}
|
|
28331
|
-
|
|
28332
|
-
|
|
28333
|
-
|
|
28334
|
-
|
|
28335
|
-
|
|
28336
|
-
|
|
28337
|
-
|
|
28338
|
-
|
|
28339
|
-
|
|
28340
|
-
|
|
28341
|
-
|
|
28342
|
-
|
|
28343
|
-
|
|
28344
|
-
|
|
28345
|
-
|
|
28346
|
-
|
|
28347
|
-
|
|
28348
|
-
|
|
28349
|
-
|
|
28350
|
-
|
|
28351
|
-
|
|
28814
|
+
}));
|
|
28815
|
+
var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28816
|
+
const option6 = pf(self.ref.current);
|
|
28817
|
+
if (option6._tag === "Some") {
|
|
28818
|
+
self.ref.current = option6.value;
|
|
28819
|
+
}
|
|
28820
|
+
return self.ref.current;
|
|
28821
|
+
}));
|
|
28822
|
+
var getUnsafe5 = (self) => self.ref.current;
|
|
28823
|
+
|
|
28824
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ChannelSchema.js
|
|
28825
|
+
var decode2 = (schema2, options) => () => {
|
|
28826
|
+
const decode3 = decodeEffect2(NonEmptyArray(schema2), options);
|
|
28827
|
+
return fromTransform((upstream, _scope) => succeed7(flatMap5(upstream, (chunk) => decode3(chunk))));
|
|
28828
|
+
};
|
|
28829
|
+
|
|
28830
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PlatformError.js
|
|
28831
|
+
var TypeId42 = "~effect/PlatformError";
|
|
28832
|
+
var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
|
|
28833
|
+
/**
|
|
28834
|
+
* Formats the module, method, and optional description that rejected the argument.
|
|
28835
|
+
*
|
|
28836
|
+
* **When to use**
|
|
28837
|
+
*
|
|
28838
|
+
* Use to read the formatted error message for a rejected platform argument.
|
|
28839
|
+
*
|
|
28840
|
+
* @since 4.0.0
|
|
28841
|
+
*/
|
|
28842
|
+
get message() {
|
|
28843
|
+
return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
|
|
28844
|
+
}
|
|
28845
|
+
};
|
|
28846
|
+
var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")) {
|
|
28847
|
+
constructor(reason) {
|
|
28848
|
+
if ("cause" in reason) {
|
|
28849
|
+
super({
|
|
28850
|
+
reason,
|
|
28851
|
+
cause: reason.cause
|
|
28852
|
+
});
|
|
28853
|
+
} else {
|
|
28854
|
+
super({
|
|
28855
|
+
reason
|
|
28856
|
+
});
|
|
28352
28857
|
}
|
|
28353
|
-
|
|
28354
|
-
|
|
28355
|
-
|
|
28356
|
-
|
|
28357
|
-
|
|
28358
|
-
|
|
28858
|
+
}
|
|
28859
|
+
/**
|
|
28860
|
+
* Marks this value as a platform error wrapper for runtime guards.
|
|
28861
|
+
*
|
|
28862
|
+
* **When to use**
|
|
28863
|
+
*
|
|
28864
|
+
* Use to identify `PlatformError` values through their runtime type marker.
|
|
28865
|
+
*
|
|
28866
|
+
* @since 4.0.0
|
|
28867
|
+
*/
|
|
28868
|
+
[TypeId42] = TypeId42;
|
|
28869
|
+
get message() {
|
|
28870
|
+
return this.reason.message;
|
|
28871
|
+
}
|
|
28872
|
+
};
|
|
28873
|
+
var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
28874
|
+
|
|
28875
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FileSystem.js
|
|
28876
|
+
var FileSystem = /* @__PURE__ */ Service("effect/FileSystem");
|
|
28877
|
+
|
|
28878
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Path.js
|
|
28879
|
+
var TypeId43 = "~effect/Path";
|
|
28880
|
+
var Path = /* @__PURE__ */ Service("effect/Path");
|
|
28881
|
+
function normalizeStringPosix(path, allowAboveRoot) {
|
|
28882
|
+
let res = "";
|
|
28883
|
+
let lastSegmentLength = 0;
|
|
28884
|
+
let lastSlash = -1;
|
|
28885
|
+
let dots = 0;
|
|
28886
|
+
let code;
|
|
28887
|
+
for (let i = 0; i <= path.length; ++i) {
|
|
28888
|
+
if (i < path.length) {
|
|
28889
|
+
code = path.charCodeAt(i);
|
|
28890
|
+
} else if (code === 47) {
|
|
28891
|
+
break;
|
|
28892
|
+
} else {
|
|
28893
|
+
code = 47;
|
|
28894
|
+
}
|
|
28895
|
+
if (code === 47) {
|
|
28896
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
28897
|
+
} else if (lastSlash !== i - 1 && dots === 2) {
|
|
28898
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
|
28899
|
+
if (res.length > 2) {
|
|
28900
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
28901
|
+
if (lastSlashIndex !== res.length - 1) {
|
|
28902
|
+
if (lastSlashIndex === -1) {
|
|
28903
|
+
res = "";
|
|
28904
|
+
lastSegmentLength = 0;
|
|
28905
|
+
} else {
|
|
28906
|
+
res = res.slice(0, lastSlashIndex);
|
|
28907
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
28908
|
+
}
|
|
28909
|
+
lastSlash = i;
|
|
28910
|
+
dots = 0;
|
|
28911
|
+
continue;
|
|
28912
|
+
}
|
|
28913
|
+
} else if (res.length === 2 || res.length === 1) {
|
|
28914
|
+
res = "";
|
|
28915
|
+
lastSegmentLength = 0;
|
|
28916
|
+
lastSlash = i;
|
|
28917
|
+
dots = 0;
|
|
28918
|
+
continue;
|
|
28919
|
+
}
|
|
28920
|
+
}
|
|
28921
|
+
if (allowAboveRoot) {
|
|
28922
|
+
if (res.length > 0) {
|
|
28923
|
+
res += "/..";
|
|
28924
|
+
} else {
|
|
28925
|
+
res = "..";
|
|
28926
|
+
}
|
|
28927
|
+
lastSegmentLength = 2;
|
|
28928
|
+
}
|
|
28929
|
+
} else {
|
|
28930
|
+
if (res.length > 0) {
|
|
28931
|
+
res += "/" + path.slice(lastSlash + 1, i);
|
|
28359
28932
|
} else {
|
|
28360
|
-
|
|
28933
|
+
res = path.slice(lastSlash + 1, i);
|
|
28361
28934
|
}
|
|
28935
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
28362
28936
|
}
|
|
28363
|
-
|
|
28364
|
-
|
|
28365
|
-
|
|
28366
|
-
|
|
28937
|
+
lastSlash = i;
|
|
28938
|
+
dots = 0;
|
|
28939
|
+
} else if (code === 46 && dots !== -1) {
|
|
28940
|
+
++dots;
|
|
28941
|
+
} else {
|
|
28942
|
+
dots = -1;
|
|
28943
|
+
}
|
|
28944
|
+
}
|
|
28945
|
+
return res;
|
|
28946
|
+
}
|
|
28947
|
+
function _format(sep, pathObject) {
|
|
28948
|
+
const dir = pathObject.dir || pathObject.root;
|
|
28949
|
+
const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
|
28950
|
+
if (!dir) {
|
|
28951
|
+
return base;
|
|
28952
|
+
}
|
|
28953
|
+
if (dir === pathObject.root) {
|
|
28954
|
+
return dir + base;
|
|
28955
|
+
}
|
|
28956
|
+
return dir + sep + base;
|
|
28957
|
+
}
|
|
28958
|
+
function fromFileUrl(url) {
|
|
28959
|
+
if (url.protocol !== "file:") {
|
|
28960
|
+
return fail7(new BadArgument({
|
|
28961
|
+
module: "Path",
|
|
28962
|
+
method: "fromFileUrl",
|
|
28963
|
+
description: "URL must be of scheme file"
|
|
28964
|
+
}));
|
|
28965
|
+
} else if (url.hostname !== "") {
|
|
28966
|
+
return fail7(new BadArgument({
|
|
28967
|
+
module: "Path",
|
|
28968
|
+
method: "fromFileUrl",
|
|
28969
|
+
description: "Invalid file URL host"
|
|
28970
|
+
}));
|
|
28971
|
+
}
|
|
28972
|
+
const pathname = url.pathname;
|
|
28973
|
+
for (let n = 0; n < pathname.length; n++) {
|
|
28974
|
+
if (pathname[n] === "%") {
|
|
28975
|
+
const third = pathname.codePointAt(n + 2) | 32;
|
|
28976
|
+
if (pathname[n + 1] === "2" && third === 102) {
|
|
28977
|
+
return fail7(new BadArgument({
|
|
28978
|
+
module: "Path",
|
|
28979
|
+
method: "fromFileUrl",
|
|
28980
|
+
description: "must not include encoded / characters"
|
|
28981
|
+
}));
|
|
28982
|
+
}
|
|
28983
|
+
}
|
|
28984
|
+
}
|
|
28985
|
+
return succeed7(decodeURIComponent(pathname));
|
|
28986
|
+
}
|
|
28987
|
+
var resolve3 = function resolve4() {
|
|
28988
|
+
let resolvedPath = "";
|
|
28989
|
+
let resolvedAbsolute = false;
|
|
28990
|
+
let cwd = void 0;
|
|
28991
|
+
for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
28992
|
+
let path;
|
|
28993
|
+
if (i >= 0) {
|
|
28994
|
+
path = arguments[i];
|
|
28995
|
+
} else {
|
|
28996
|
+
const process = globalThis.process;
|
|
28997
|
+
if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
|
|
28998
|
+
cwd = process.cwd();
|
|
28999
|
+
}
|
|
29000
|
+
path = cwd;
|
|
29001
|
+
}
|
|
29002
|
+
if (path.length === 0) {
|
|
29003
|
+
continue;
|
|
29004
|
+
}
|
|
29005
|
+
resolvedPath = path + "/" + resolvedPath;
|
|
29006
|
+
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
29007
|
+
}
|
|
29008
|
+
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
29009
|
+
if (resolvedAbsolute) {
|
|
29010
|
+
if (resolvedPath.length > 0) {
|
|
29011
|
+
return "/" + resolvedPath;
|
|
29012
|
+
} else {
|
|
29013
|
+
return "/";
|
|
29014
|
+
}
|
|
29015
|
+
} else if (resolvedPath.length > 0) {
|
|
29016
|
+
return resolvedPath;
|
|
29017
|
+
} else {
|
|
29018
|
+
return ".";
|
|
29019
|
+
}
|
|
29020
|
+
};
|
|
29021
|
+
var CHAR_FORWARD_SLASH = 47;
|
|
29022
|
+
function toFileUrl(filepath) {
|
|
29023
|
+
const outURL = new URL("file://");
|
|
29024
|
+
let resolved2 = resolve3(filepath);
|
|
29025
|
+
const filePathLast = filepath.charCodeAt(filepath.length - 1);
|
|
29026
|
+
if (filePathLast === CHAR_FORWARD_SLASH && resolved2[resolved2.length - 1] !== "/") {
|
|
29027
|
+
resolved2 += "/";
|
|
29028
|
+
}
|
|
29029
|
+
outURL.pathname = encodePathChars(resolved2);
|
|
29030
|
+
return succeed7(outURL);
|
|
29031
|
+
}
|
|
29032
|
+
var percentRegExp = /%/g;
|
|
29033
|
+
var backslashRegExp = /\\/g;
|
|
29034
|
+
var newlineRegExp = /\n/g;
|
|
29035
|
+
var carriageReturnRegExp = /\r/g;
|
|
29036
|
+
var tabRegExp = /\t/g;
|
|
29037
|
+
function encodePathChars(filepath) {
|
|
29038
|
+
if (filepath.includes("%")) {
|
|
29039
|
+
filepath = filepath.replace(percentRegExp, "%25");
|
|
29040
|
+
}
|
|
29041
|
+
if (filepath.includes("\\")) {
|
|
29042
|
+
filepath = filepath.replace(backslashRegExp, "%5C");
|
|
29043
|
+
}
|
|
29044
|
+
if (filepath.includes("\n")) {
|
|
29045
|
+
filepath = filepath.replace(newlineRegExp, "%0A");
|
|
29046
|
+
}
|
|
29047
|
+
if (filepath.includes("\r")) {
|
|
29048
|
+
filepath = filepath.replace(carriageReturnRegExp, "%0D");
|
|
29049
|
+
}
|
|
29050
|
+
if (filepath.includes(" ")) {
|
|
29051
|
+
filepath = filepath.replace(tabRegExp, "%09");
|
|
29052
|
+
}
|
|
29053
|
+
return filepath;
|
|
29054
|
+
}
|
|
29055
|
+
var posixImpl = /* @__PURE__ */ Path.of({
|
|
29056
|
+
[TypeId43]: TypeId43,
|
|
29057
|
+
resolve: resolve3,
|
|
29058
|
+
normalize(path) {
|
|
29059
|
+
if (path.length === 0) return ".";
|
|
29060
|
+
const isAbsolute = path.charCodeAt(0) === 47;
|
|
29061
|
+
const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
|
29062
|
+
path = normalizeStringPosix(path, !isAbsolute);
|
|
29063
|
+
if (path.length === 0 && !isAbsolute) path = ".";
|
|
29064
|
+
if (path.length > 0 && trailingSeparator) path += "/";
|
|
29065
|
+
if (isAbsolute) return "/" + path;
|
|
29066
|
+
return path;
|
|
29067
|
+
},
|
|
29068
|
+
isAbsolute(path) {
|
|
29069
|
+
return path.length > 0 && path.charCodeAt(0) === 47;
|
|
29070
|
+
},
|
|
29071
|
+
join() {
|
|
29072
|
+
if (arguments.length === 0) {
|
|
29073
|
+
return ".";
|
|
29074
|
+
}
|
|
29075
|
+
let joined;
|
|
29076
|
+
for (let i = 0; i < arguments.length; ++i) {
|
|
29077
|
+
const arg = arguments[i];
|
|
29078
|
+
if (arg.length > 0) {
|
|
29079
|
+
if (joined === void 0) {
|
|
29080
|
+
joined = arg;
|
|
29081
|
+
} else {
|
|
29082
|
+
joined += "/" + arg;
|
|
29083
|
+
}
|
|
29084
|
+
}
|
|
29085
|
+
}
|
|
29086
|
+
if (joined === void 0) {
|
|
29087
|
+
return ".";
|
|
29088
|
+
}
|
|
28367
29089
|
return posixImpl.normalize(joined);
|
|
28368
29090
|
},
|
|
28369
29091
|
relative(from, to) {
|
|
@@ -28609,1226 +29331,797 @@ var posixImpl = /* @__PURE__ */ Path.of({
|
|
|
28609
29331
|
ret.name = path.slice(startPart, startDot);
|
|
28610
29332
|
ret.base = path.slice(startPart, end3);
|
|
28611
29333
|
}
|
|
28612
|
-
ret.ext = path.slice(startDot, end3);
|
|
28613
|
-
}
|
|
28614
|
-
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
|
|
28615
|
-
else if (isAbsolute) ret.dir = "/";
|
|
28616
|
-
return ret;
|
|
28617
|
-
},
|
|
28618
|
-
sep: "/",
|
|
28619
|
-
fromFileUrl,
|
|
28620
|
-
toFileUrl,
|
|
28621
|
-
toNamespacedPath: identity
|
|
28622
|
-
});
|
|
28623
|
-
|
|
28624
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ConfigProvider.js
|
|
28625
|
-
function makeValue(value6) {
|
|
28626
|
-
return {
|
|
28627
|
-
_tag: "Value",
|
|
28628
|
-
value: value6
|
|
28629
|
-
};
|
|
28630
|
-
}
|
|
28631
|
-
function makeRecord(keys4, value6) {
|
|
28632
|
-
return {
|
|
28633
|
-
_tag: "Record",
|
|
28634
|
-
keys: keys4,
|
|
28635
|
-
value: value6
|
|
28636
|
-
};
|
|
28637
|
-
}
|
|
28638
|
-
function makeArray(length, value6) {
|
|
28639
|
-
return {
|
|
28640
|
-
_tag: "Array",
|
|
28641
|
-
length,
|
|
28642
|
-
value: value6
|
|
28643
|
-
};
|
|
28644
|
-
}
|
|
28645
|
-
var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
|
|
28646
|
-
defaultValue: () => fromEnv()
|
|
28647
|
-
});
|
|
28648
|
-
var Proto8 = {
|
|
28649
|
-
...PipeInspectableProto,
|
|
28650
|
-
toJSON() {
|
|
28651
|
-
return {
|
|
28652
|
-
_id: "ConfigProvider"
|
|
28653
|
-
};
|
|
28654
|
-
}
|
|
28655
|
-
};
|
|
28656
|
-
var identityPath = (path) => path;
|
|
28657
|
-
function makeProvider(load, mapInput3) {
|
|
28658
|
-
const self = Object.create(Proto8);
|
|
28659
|
-
self.load = load;
|
|
28660
|
-
self.mapInput = mapInput3;
|
|
28661
|
-
return self;
|
|
28662
|
-
}
|
|
28663
|
-
function makeSource(get12, transform4) {
|
|
28664
|
-
return makeProvider((path) => get12(transform4(path)), (f) => makeSource(get12, flow(transform4, f)));
|
|
28665
|
-
}
|
|
28666
|
-
function make38(get12) {
|
|
28667
|
-
return makeSource(get12, identityPath);
|
|
28668
|
-
}
|
|
28669
|
-
function emptyStringAsMissing(value6, preserveEmptyStrings) {
|
|
28670
|
-
return value6 === "" && !preserveEmptyStrings ? void 0 : value6;
|
|
28671
|
-
}
|
|
28672
|
-
function fromEnvRecord(env, options) {
|
|
28673
|
-
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
28674
|
-
const trie = buildEnvTrie(env);
|
|
28675
|
-
return make38((path) => succeed7(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
28676
|
-
}
|
|
28677
|
-
function fromEnv(options) {
|
|
28678
|
-
const env = options?.env ?? {
|
|
28679
|
-
...globalThis.process?.env,
|
|
28680
|
-
...import.meta?.env
|
|
28681
|
-
};
|
|
28682
|
-
return fromEnvRecord(env, {
|
|
28683
|
-
preserveEmptyStrings: options?.preserveEmptyStrings
|
|
28684
|
-
});
|
|
28685
|
-
}
|
|
28686
|
-
function buildEnvTrie(env) {
|
|
28687
|
-
const trie = {};
|
|
28688
|
-
for (const [name, value6] of Object.entries(env)) {
|
|
28689
|
-
if (value6 === void 0) continue;
|
|
28690
|
-
const segments = name.split("_");
|
|
28691
|
-
let node = trie;
|
|
28692
|
-
for (const seg of segments) {
|
|
28693
|
-
const children = node.children ??= /* @__PURE__ */ Object.create(null);
|
|
28694
|
-
node = children[seg] ??= {};
|
|
28695
|
-
}
|
|
28696
|
-
}
|
|
28697
|
-
return trie;
|
|
28698
|
-
}
|
|
28699
|
-
function nodeAtEnv(trie, env, path, preserveEmptyStrings) {
|
|
28700
|
-
const key = path.map(String).join("_");
|
|
28701
|
-
const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0, preserveEmptyStrings);
|
|
28702
|
-
const trieNode = trieNodeAt(trie, path);
|
|
28703
|
-
const children = trieNode?.children ? Object.keys(trieNode.children) : [];
|
|
28704
|
-
if (children.length === 0) {
|
|
28705
|
-
return leafValue === void 0 ? void 0 : makeValue(leafValue);
|
|
28706
|
-
}
|
|
28707
|
-
const allNumeric = children.every(isCanonicalArrayIndex);
|
|
28708
|
-
if (allNumeric) {
|
|
28709
|
-
const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
|
|
28710
|
-
return makeArray(length, leafValue);
|
|
28711
|
-
}
|
|
28712
|
-
return makeRecord(new Set(children), leafValue);
|
|
28713
|
-
}
|
|
28714
|
-
function trieNodeAt(root, path) {
|
|
28715
|
-
if (path.length === 0) return root;
|
|
28716
|
-
let node = root;
|
|
28717
|
-
for (const seg of path) {
|
|
28718
|
-
node = node?.children?.[String(seg)];
|
|
28719
|
-
if (!node) return void 0;
|
|
28720
|
-
}
|
|
28721
|
-
return node;
|
|
28722
|
-
}
|
|
28723
|
-
|
|
28724
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Config.js
|
|
28725
|
-
var TypeId42 = "~effect/Config";
|
|
28726
|
-
var ConfigError = class {
|
|
28727
|
-
_tag = "ConfigError";
|
|
28728
|
-
name = "ConfigError";
|
|
28729
|
-
cause;
|
|
28730
|
-
constructor(cause) {
|
|
28731
|
-
this.cause = cause;
|
|
28732
|
-
}
|
|
28733
|
-
get message() {
|
|
28734
|
-
return this.cause.toString();
|
|
28735
|
-
}
|
|
28736
|
-
toString() {
|
|
28737
|
-
return `ConfigError(${this.message})`;
|
|
28738
|
-
}
|
|
28739
|
-
};
|
|
28740
|
-
var Proto9 = {
|
|
28741
|
-
.../* @__PURE__ */ Prototype2({
|
|
28742
|
-
label: "Config",
|
|
28743
|
-
evaluate(fiber3) {
|
|
28744
|
-
return this.parse(fiber3.getRef(ConfigProvider));
|
|
28745
|
-
}
|
|
28746
|
-
}),
|
|
28747
|
-
[TypeId42]: TypeId42,
|
|
28748
|
-
toJSON() {
|
|
28749
|
-
return {
|
|
28750
|
-
_id: "Config"
|
|
28751
|
-
};
|
|
28752
|
-
}
|
|
28753
|
-
};
|
|
28754
|
-
function make39(evaluator) {
|
|
28755
|
-
const self = Object.create(Proto9);
|
|
28756
|
-
self.evaluator = evaluator;
|
|
28757
|
-
self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager2((failure) => failure.error), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolution.value) : fail7(resolution.error)));
|
|
28758
|
-
return self;
|
|
28759
|
-
}
|
|
28760
|
-
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
28761
|
-
var resolved = (value6, hasInput2) => ({
|
|
28762
|
-
_tag: "Resolved",
|
|
28763
|
-
value: value6,
|
|
28764
|
-
hasInput: hasInput2
|
|
28765
|
-
});
|
|
28766
|
-
var absent = (error) => ({
|
|
28767
|
-
_tag: "Absent",
|
|
28768
|
-
error
|
|
28769
|
-
});
|
|
28770
|
-
var evaluationFailure = (error, hasInput2) => ({
|
|
28771
|
-
error,
|
|
28772
|
-
hasInput: hasInput2
|
|
28773
|
-
});
|
|
28774
|
-
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
28775
|
-
var catchSourceError = (self, hasInput2) => self.pipe(catchDefect2((defect) => isSourceError(defect) ? fail7(evaluationFailure(new ConfigError(defect), hasInput2)) : die5(defect)));
|
|
28776
|
-
var preserveInputEvidence = (self, hasInput2) => {
|
|
28777
|
-
if (!hasInput2) return self;
|
|
28778
|
-
return self.pipe(mapErrorEager2((failure) => evaluationFailure(failure.error, true)), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolved(resolution.value, true)) : fail7(evaluationFailure(resolution.error, true))));
|
|
28779
|
-
};
|
|
28780
|
-
var map14 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
28781
|
-
return make39((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
|
|
28782
|
-
});
|
|
28783
|
-
var orElse3 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
28784
|
-
return make39((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
|
|
28785
|
-
onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
|
|
28786
|
-
onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
|
|
28787
|
-
}));
|
|
28788
|
-
});
|
|
28789
|
-
function all5(arg) {
|
|
28790
|
-
const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
28791
|
-
if (globalThis.Array.isArray(configs)) {
|
|
28792
|
-
return make39((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
|
|
28793
|
-
} else {
|
|
28794
|
-
return make39((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
|
|
28795
|
-
}
|
|
28796
|
-
}
|
|
28797
|
-
var resolveArray = (results) => {
|
|
28798
|
-
const values2 = [];
|
|
28799
|
-
let firstFailure;
|
|
28800
|
-
let firstAbsent;
|
|
28801
|
-
let hasInput2 = false;
|
|
28802
|
-
for (const result6 of results) {
|
|
28803
|
-
if (isFailure2(result6)) {
|
|
28804
|
-
firstFailure ??= result6.failure;
|
|
28805
|
-
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
28806
|
-
continue;
|
|
28807
|
-
}
|
|
28808
|
-
const resolution = result6.success;
|
|
28809
|
-
if (resolution._tag === "Absent") {
|
|
28810
|
-
firstAbsent ??= resolution;
|
|
28811
|
-
} else {
|
|
28812
|
-
values2.push(resolution.value);
|
|
28813
|
-
hasInput2 = hasInput2 || resolution.hasInput;
|
|
28814
|
-
}
|
|
28815
|
-
}
|
|
28816
|
-
if (firstFailure !== void 0) {
|
|
28817
|
-
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
28818
|
-
}
|
|
28819
|
-
if (firstAbsent !== void 0) {
|
|
28820
|
-
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
28821
|
-
}
|
|
28822
|
-
return succeed7(resolved(values2, hasInput2));
|
|
28823
|
-
};
|
|
28824
|
-
var resolveRecord = (results) => {
|
|
28825
|
-
const values2 = {};
|
|
28826
|
-
let firstFailure;
|
|
28827
|
-
let firstAbsent;
|
|
28828
|
-
let hasInput2 = false;
|
|
28829
|
-
for (const key in results) {
|
|
28830
|
-
const result6 = results[key];
|
|
28831
|
-
if (isFailure2(result6)) {
|
|
28832
|
-
firstFailure ??= result6.failure;
|
|
28833
|
-
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
28834
|
-
continue;
|
|
28835
|
-
}
|
|
28836
|
-
const resolution = result6.success;
|
|
28837
|
-
if (resolution._tag === "Absent") {
|
|
28838
|
-
firstAbsent ??= resolution;
|
|
28839
|
-
} else {
|
|
28840
|
-
assignProperty(values2, key, resolution.value);
|
|
28841
|
-
hasInput2 = hasInput2 || resolution.hasInput;
|
|
28842
|
-
}
|
|
28843
|
-
}
|
|
28844
|
-
if (firstFailure !== void 0) {
|
|
28845
|
-
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
28846
|
-
}
|
|
28847
|
-
if (firstAbsent !== void 0) {
|
|
28848
|
-
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
28849
|
-
}
|
|
28850
|
-
return succeed7(resolved(values2, hasInput2));
|
|
28851
|
-
};
|
|
28852
|
-
var withDefault2 = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
28853
|
-
return make39((provider, pathPrefix) => mapEager2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
|
|
28854
|
-
});
|
|
28855
|
-
var option3 = (self) => self.pipe(map14(some2), withDefault2(none2()));
|
|
28856
|
-
var cursorToString = () => "<configuration>";
|
|
28857
|
-
var loadCursor = (provider, path) => provider.load(path).pipe(orDie3, mapEager2((node) => ({
|
|
28858
|
-
provider,
|
|
28859
|
-
path,
|
|
28860
|
-
node,
|
|
28861
|
-
toString: cursorToString
|
|
28862
|
-
})));
|
|
28863
|
-
var loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
|
|
28864
|
-
var getScalar = (node) => node?.value;
|
|
28865
|
-
var decodeFromCursor = (ast, decode3) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode3(input)), passthrough2()));
|
|
28866
|
-
var isScalarInput = (ast) => {
|
|
28867
|
-
switch (ast._tag) {
|
|
28868
|
-
case "Union":
|
|
28869
|
-
return ast.types.every(isScalarInput);
|
|
28870
|
-
case "Objects":
|
|
28871
|
-
case "Arrays":
|
|
28872
|
-
case "Suspend":
|
|
28873
|
-
return false;
|
|
28874
|
-
default:
|
|
28875
|
-
return true;
|
|
28876
|
-
}
|
|
28877
|
-
};
|
|
28878
|
-
var hasProviderInput = (ast, node) => {
|
|
28879
|
-
switch (ast._tag) {
|
|
28880
|
-
case "Objects":
|
|
28881
|
-
return node?._tag === "Record";
|
|
28882
|
-
case "Arrays":
|
|
28883
|
-
return node?._tag === "Array";
|
|
28884
|
-
case "Union":
|
|
28885
|
-
return ast.types.some((ast2) => hasProviderInput(ast2, node));
|
|
28886
|
-
case "Suspend":
|
|
28887
|
-
return hasProviderInput(ast.thunk(), node);
|
|
28888
|
-
default:
|
|
28889
|
-
return getScalar(node) !== void 0;
|
|
28890
|
-
}
|
|
28891
|
-
};
|
|
28892
|
-
var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
28893
|
-
const seen = /* @__PURE__ */ new WeakSet();
|
|
28894
|
-
const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
|
|
28895
|
-
seen.add(ast);
|
|
28896
|
-
switch (ast._tag) {
|
|
28897
|
-
case "Objects": {
|
|
28898
|
-
const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
|
|
28899
|
-
const materialize = fnUntraced2(function* (cursor) {
|
|
28900
|
-
if (cursor.node?._tag !== "Record") {
|
|
28901
|
-
return void 0;
|
|
28902
|
-
}
|
|
28903
|
-
const node = cursor.node;
|
|
28904
|
-
const keys4 = /* @__PURE__ */ new Set();
|
|
28905
|
-
for (const property of ast.propertySignatures) {
|
|
28906
|
-
if (typeof property.name === "string") keys4.add(property.name);
|
|
28907
|
-
}
|
|
28908
|
-
if (matchesIndex.length > 0) {
|
|
28909
|
-
for (const key of node.keys) {
|
|
28910
|
-
if (matchesIndex.some((matches) => matches(key))) keys4.add(key);
|
|
28911
|
-
}
|
|
28912
|
-
}
|
|
28913
|
-
const out = {};
|
|
28914
|
-
for (const key of keys4) {
|
|
28915
|
-
const child = yield* loadChildCursor(cursor, key);
|
|
28916
|
-
if (child.node !== void 0) assignProperty(out, key, child);
|
|
28917
|
-
}
|
|
28918
|
-
return out;
|
|
28919
|
-
});
|
|
28920
|
-
return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
|
|
28921
|
-
}
|
|
28922
|
-
case "Arrays": {
|
|
28923
|
-
const materialize = fnUntraced2(function* (cursor) {
|
|
28924
|
-
if (cursor.node?._tag !== "Array") {
|
|
28925
|
-
return void 0;
|
|
28926
|
-
}
|
|
28927
|
-
const out = [];
|
|
28928
|
-
for (let i = 0; i < cursor.node.length; i++) {
|
|
28929
|
-
out.push(yield* loadChildCursor(cursor, i));
|
|
28930
|
-
}
|
|
28931
|
-
return out;
|
|
28932
|
-
});
|
|
28933
|
-
return decodeFromCursor(ast.recur(recur2), materialize);
|
|
28934
|
-
}
|
|
28935
|
-
case "Union":
|
|
28936
|
-
for (const member of ast.types) {
|
|
28937
|
-
recur2(member);
|
|
28938
|
-
}
|
|
28939
|
-
return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node))) : ast.recur(recur2);
|
|
28940
|
-
case "Suspend": {
|
|
28941
|
-
const target = ast.thunk();
|
|
28942
|
-
if (!seen.has(target)) recur2(target);
|
|
28943
|
-
return ast.recur(recur2);
|
|
28944
|
-
}
|
|
28945
|
-
case "Declaration":
|
|
28946
|
-
case "Any":
|
|
28947
|
-
throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
|
|
28948
|
-
cause: ast
|
|
28949
|
-
});
|
|
28950
|
-
default:
|
|
28951
|
-
return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
|
|
28952
|
-
}
|
|
28953
|
-
});
|
|
28954
|
-
return recur2(root);
|
|
28955
|
-
});
|
|
28956
|
-
function schema(codec, path) {
|
|
28957
|
-
const codecStringTree = toCodecStringTree2(codec);
|
|
28958
|
-
const encodedAst = toEncoded(codecStringTree.ast);
|
|
28959
|
-
const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
|
|
28960
|
-
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
28961
|
-
return make39((provider, pathPrefix) => {
|
|
28962
|
-
const fullPath = [...pathPrefix, ...localPath];
|
|
28963
|
-
return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
|
|
28964
|
-
const hasInput2 = hasProviderInput(encodedAst, cursor.node);
|
|
28965
|
-
return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
|
|
28966
|
-
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
28967
|
-
return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
|
|
28968
|
-
})), hasInput2);
|
|
28969
|
-
}));
|
|
28970
|
-
});
|
|
28971
|
-
}
|
|
28972
|
-
var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
|
|
28973
|
-
function String7(name) {
|
|
28974
|
-
return schema(String6, name);
|
|
28975
|
-
}
|
|
28976
|
-
function Int2(name) {
|
|
28977
|
-
return schema(Int, name);
|
|
28978
|
-
}
|
|
28979
|
-
function Literals2(literals, name) {
|
|
28980
|
-
return schema(Literals(literals), name);
|
|
28981
|
-
}
|
|
28982
|
-
function Array3(value6, pathOrOptions, options) {
|
|
28983
|
-
const hasPath = isPath(pathOrOptions);
|
|
28984
|
-
const resolvedOptions = hasPath ? options : pathOrOptions;
|
|
28985
|
-
const array2 = ArraySchema(value6);
|
|
28986
|
-
const separator = resolvedOptions?.separator ?? ",";
|
|
28987
|
-
const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
|
|
28988
|
-
decode: split(resolvedOptions),
|
|
28989
|
-
encode: passthrough2({
|
|
28990
|
-
strict: false
|
|
28991
|
-
}).compose(transform((input) => input.join(separator)))
|
|
28992
|
-
}));
|
|
28993
|
-
return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
|
|
28994
|
-
}
|
|
28995
|
-
function Record2(key, value6, pathOrOptions, options) {
|
|
28996
|
-
const hasPath = isPath(pathOrOptions);
|
|
28997
|
-
const record3 = Record(key, value6);
|
|
28998
|
-
const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
|
|
28999
|
-
const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
|
|
29000
|
-
decode: split3.decode,
|
|
29001
|
-
encode: passthrough2({
|
|
29002
|
-
strict: false
|
|
29003
|
-
}).compose(split3.encode)
|
|
29004
|
-
}));
|
|
29005
|
-
return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
|
|
29006
|
-
}
|
|
29007
|
-
function Boolean4(name) {
|
|
29008
|
-
return schema(BooleanLiterals, name);
|
|
29009
|
-
}
|
|
29010
|
-
function URL3(name) {
|
|
29011
|
-
return schema(URL2, name);
|
|
29012
|
-
}
|
|
29013
|
-
|
|
29014
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
|
|
29015
|
-
var ignore5 = "~effect/ErrorReporter/ignore";
|
|
29016
|
-
|
|
29017
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
|
|
29018
|
-
var FiberSet_exports = {};
|
|
29019
|
-
__export(FiberSet_exports, {
|
|
29020
|
-
add: () => add4,
|
|
29021
|
-
addUnsafe: () => addUnsafe2,
|
|
29022
|
-
awaitEmpty: () => awaitEmpty,
|
|
29023
|
-
clear: () => clear4,
|
|
29024
|
-
isFiberSet: () => isFiberSet,
|
|
29025
|
-
join: () => join3,
|
|
29026
|
-
make: () => make40,
|
|
29027
|
-
makeRuntime: () => makeRuntime,
|
|
29028
|
-
makeRuntimePromise: () => makeRuntimePromise,
|
|
29029
|
-
run: () => run3,
|
|
29030
|
-
runtime: () => runtime,
|
|
29031
|
-
runtimePromise: () => runtimePromise,
|
|
29032
|
-
size: () => size8
|
|
29033
|
-
});
|
|
29034
|
-
var TypeId43 = "~effect/FiberSet";
|
|
29035
|
-
var isFiberSet = (u) => hasProperty(u, TypeId43);
|
|
29036
|
-
var Proto10 = {
|
|
29037
|
-
[TypeId43]: TypeId43,
|
|
29038
|
-
[Symbol.iterator]() {
|
|
29039
|
-
if (this.state._tag === "Closed") {
|
|
29040
|
-
return empty2();
|
|
29041
|
-
}
|
|
29042
|
-
return this.state.backing[Symbol.iterator]();
|
|
29043
|
-
},
|
|
29044
|
-
...PipeInspectableProto,
|
|
29045
|
-
toJSON() {
|
|
29046
|
-
return {
|
|
29047
|
-
_id: "FiberSet",
|
|
29048
|
-
state: this.state
|
|
29049
|
-
};
|
|
29050
|
-
}
|
|
29051
|
-
};
|
|
29052
|
-
var makeUnsafe10 = (backing, deferred) => {
|
|
29053
|
-
const self = Object.create(Proto10);
|
|
29054
|
-
self.state = {
|
|
29055
|
-
_tag: "Open",
|
|
29056
|
-
backing
|
|
29057
|
-
};
|
|
29058
|
-
self.deferred = deferred;
|
|
29059
|
-
return self;
|
|
29060
|
-
};
|
|
29061
|
-
var make40 = () => acquireRelease2(sync4(() => makeUnsafe10(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
|
|
29062
|
-
const state = set10.state;
|
|
29063
|
-
if (state._tag === "Closed") return void_5;
|
|
29064
|
-
set10.state = {
|
|
29065
|
-
_tag: "Closed"
|
|
29066
|
-
};
|
|
29067
|
-
const fibers = state.backing;
|
|
29068
|
-
return interruptAll(fibers).pipe(into(set10.deferred));
|
|
29069
|
-
}));
|
|
29070
|
-
var makeRuntime = () => flatMap5(make40(), (self) => runtime(self)());
|
|
29071
|
-
var makeRuntimePromise = () => flatMap5(make40(), (self) => runtimePromise(self)());
|
|
29072
|
-
var internalFiberId = -1;
|
|
29073
|
-
var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
|
|
29074
|
-
var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
|
|
29075
|
-
if (self.state._tag === "Closed") {
|
|
29076
|
-
fiber3.interruptUnsafe(internalFiberId);
|
|
29077
|
-
return;
|
|
29078
|
-
} else if (self.state.backing.has(fiber3)) {
|
|
29079
|
-
return;
|
|
29080
|
-
}
|
|
29081
|
-
self.state.backing.add(fiber3);
|
|
29082
|
-
fiber3.addObserver((exit3) => {
|
|
29083
|
-
if (self.state._tag === "Closed") {
|
|
29084
|
-
return;
|
|
29085
|
-
}
|
|
29086
|
-
self.state.backing.delete(fiber3);
|
|
29087
|
-
if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
|
|
29088
|
-
doneUnsafe(self.deferred, exit3);
|
|
29089
|
-
}
|
|
29090
|
-
});
|
|
29091
|
-
});
|
|
29092
|
-
var add4 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => sync4(() => addUnsafe2(self, fiber3, options)));
|
|
29093
|
-
var clear4 = (self) => suspend3(() => {
|
|
29094
|
-
if (self.state._tag === "Closed") {
|
|
29095
|
-
return void_5;
|
|
29096
|
-
}
|
|
29097
|
-
return interruptAllAs(self.state.backing, internalFiberId);
|
|
29098
|
-
});
|
|
29099
|
-
var constInterruptedFiber = /* @__PURE__ */ (function() {
|
|
29100
|
-
let fiber3 = void 0;
|
|
29101
|
-
return () => {
|
|
29102
|
-
if (fiber3 === void 0) {
|
|
29103
|
-
fiber3 = runFork2(interrupt5);
|
|
29104
|
-
}
|
|
29105
|
-
return fiber3;
|
|
29106
|
-
};
|
|
29107
|
-
})();
|
|
29108
|
-
var run3 = function() {
|
|
29109
|
-
const self = arguments[0];
|
|
29110
|
-
if (!isEffect2(arguments[1])) {
|
|
29111
|
-
const options = arguments[1];
|
|
29112
|
-
return (effect2) => runImpl(self, effect2, options);
|
|
29113
|
-
}
|
|
29114
|
-
return runImpl(self, arguments[1], arguments[2]);
|
|
29115
|
-
};
|
|
29116
|
-
var runImpl = (self, effect2, options) => withFiber2((parent) => {
|
|
29117
|
-
if (self.state._tag === "Closed") {
|
|
29118
|
-
return sync4(constInterruptedFiber);
|
|
29119
|
-
}
|
|
29120
|
-
const fiber3 = runForkWith2(parent.context)(effect2);
|
|
29121
|
-
addUnsafe2(self, fiber3, options);
|
|
29122
|
-
return succeed7(fiber3);
|
|
29123
|
-
});
|
|
29124
|
-
var runtime = (self) => () => map9(context2(), (services) => {
|
|
29125
|
-
const runFork3 = runForkWith2(services);
|
|
29126
|
-
return (effect2, options) => {
|
|
29127
|
-
if (self.state._tag === "Closed") {
|
|
29128
|
-
return constInterruptedFiber();
|
|
29129
|
-
}
|
|
29130
|
-
const fiber3 = runFork3(effect2, options);
|
|
29131
|
-
addUnsafe2(self, fiber3, options);
|
|
29132
|
-
return fiber3;
|
|
29133
|
-
};
|
|
29134
|
-
});
|
|
29135
|
-
var runtimePromise = (self) => () => map9(runtime(self)(), (runFork3) => (effect2, options) => new Promise((resolve4, reject) => runFork3(effect2, options).addObserver((exit3) => {
|
|
29136
|
-
if (isSuccess4(exit3)) {
|
|
29137
|
-
resolve4(exit3.value);
|
|
29138
|
-
} else {
|
|
29139
|
-
reject(squash(exit3.cause));
|
|
29140
|
-
}
|
|
29141
|
-
})));
|
|
29142
|
-
var size8 = (self) => sync4(() => self.state._tag === "Closed" ? 0 : self.state.backing.size);
|
|
29143
|
-
var join3 = (self) => _await(self.deferred);
|
|
29144
|
-
var awaitEmpty = (self) => whileLoop2({
|
|
29145
|
-
while: () => self.state._tag === "Open" && self.state.backing.size > 0,
|
|
29146
|
-
body: () => await_(headUnsafe(self)),
|
|
29147
|
-
step: constVoid
|
|
29148
|
-
});
|
|
29149
|
-
|
|
29150
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PrimaryKey.js
|
|
29151
|
-
var symbol4 = "~effect/PrimaryKey";
|
|
29152
|
-
|
|
29153
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Logger.js
|
|
29154
|
-
var Logger_exports = {};
|
|
29155
|
-
__export(Logger_exports, {
|
|
29156
|
-
CurrentLoggers: () => CurrentLoggers2,
|
|
29157
|
-
LogToStderr: () => LogToStderr2,
|
|
29158
|
-
batched: () => batched,
|
|
29159
|
-
consoleJson: () => consoleJson,
|
|
29160
|
-
consoleLogFmt: () => consoleLogFmt,
|
|
29161
|
-
consolePretty: () => consolePretty2,
|
|
29162
|
-
consolePrettyBrowser: () => consolePrettyBrowser,
|
|
29163
|
-
consolePrettyTty: () => consolePrettyTty,
|
|
29164
|
-
consoleStructured: () => consoleStructured,
|
|
29165
|
-
defaultLogger: () => defaultLogger2,
|
|
29166
|
-
formatJson: () => formatJson2,
|
|
29167
|
-
formatLogFmt: () => formatLogFmt,
|
|
29168
|
-
formatSimple: () => formatSimple,
|
|
29169
|
-
formatStructured: () => formatStructured,
|
|
29170
|
-
isLogger: () => isLogger,
|
|
29171
|
-
layer: () => layer,
|
|
29172
|
-
make: () => make41,
|
|
29173
|
-
map: () => map15,
|
|
29174
|
-
toFile: () => toFile,
|
|
29175
|
-
tracerLogger: () => tracerLogger2,
|
|
29176
|
-
withConsoleError: () => withConsoleError,
|
|
29177
|
-
withConsoleLog: () => withConsoleLog,
|
|
29178
|
-
withLeveledConsole: () => withLeveledConsole
|
|
29179
|
-
});
|
|
29180
|
-
var TypeId44 = "~effect/Logger";
|
|
29181
|
-
var isLogger = (u) => hasProperty(u, TypeId44);
|
|
29182
|
-
var CurrentLoggers2 = CurrentLoggers;
|
|
29183
|
-
var LogToStderr2 = LogToStderr;
|
|
29184
|
-
var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
|
|
29185
|
-
var withConsoleLog = (self) => loggerMake((options) => {
|
|
29186
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29187
|
-
return console.log(self.log(options));
|
|
29188
|
-
});
|
|
29189
|
-
var withConsoleError = (self) => loggerMake((options) => {
|
|
29190
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29191
|
-
return console.error(self.log(options));
|
|
29192
|
-
});
|
|
29193
|
-
var withLeveledConsole = (self) => loggerMake((options) => {
|
|
29194
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29195
|
-
const output = self.log(options);
|
|
29196
|
-
switch (options.logLevel) {
|
|
29197
|
-
case "Debug":
|
|
29198
|
-
return console.debug(output);
|
|
29199
|
-
case "Info":
|
|
29200
|
-
return console.info(output);
|
|
29201
|
-
case "Trace":
|
|
29202
|
-
return console.trace(output);
|
|
29203
|
-
case "Warn":
|
|
29204
|
-
return console.warn(output);
|
|
29205
|
-
case "Error":
|
|
29206
|
-
case "Fatal":
|
|
29207
|
-
return console.error(output);
|
|
29208
|
-
default:
|
|
29209
|
-
return console.log(output);
|
|
29210
|
-
}
|
|
29211
|
-
});
|
|
29212
|
-
var textOnly = /^[^\s"=]*$/;
|
|
29213
|
-
var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
|
|
29214
|
-
var formatFiberId = (fiberId3) => `#${fiberId3}`;
|
|
29215
|
-
var format9 = (quoteValue, space) => ({
|
|
29216
|
-
cause,
|
|
29217
|
-
date: date2,
|
|
29218
|
-
fiber: fiber3,
|
|
29219
|
-
logLevel,
|
|
29220
|
-
message
|
|
29221
|
-
}) => {
|
|
29222
|
-
const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
|
|
29223
|
-
space
|
|
29224
|
-
});
|
|
29225
|
-
const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
|
|
29226
|
-
const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
|
|
29227
|
-
const append4 = (label, value6) => " " + format10(label, value6);
|
|
29228
|
-
let out = format10("timestamp", date2.toISOString());
|
|
29229
|
-
out += append4("level", logLevel.toUpperCase());
|
|
29230
|
-
out += append4("fiber", formatFiberId(fiber3.id));
|
|
29231
|
-
const messages = ensure(message);
|
|
29232
|
-
for (let i = 0; i < messages.length; i++) {
|
|
29233
|
-
out += append4("message", formatUnknown(messages[i]));
|
|
29234
|
-
}
|
|
29235
|
-
if (cause.reasons.length > 0) {
|
|
29236
|
-
out += append4("cause", causePretty(cause));
|
|
29237
|
-
}
|
|
29238
|
-
const now2 = date2.getTime();
|
|
29239
|
-
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29240
|
-
for (const span2 of spans) {
|
|
29241
|
-
out += " " + formatLogSpan(span2, now2);
|
|
29242
|
-
}
|
|
29243
|
-
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29244
|
-
for (const [label, value6] of Object.entries(annotations2)) {
|
|
29245
|
-
out += append4(label, formatUnknown(value6));
|
|
29246
|
-
}
|
|
29247
|
-
return out;
|
|
29248
|
-
};
|
|
29249
|
-
var make41 = loggerMake;
|
|
29250
|
-
var defaultLogger2 = defaultLogger;
|
|
29251
|
-
var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(escapeDoubleQuotes));
|
|
29252
|
-
var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(JSON.stringify, 0));
|
|
29253
|
-
var formatStructured = /* @__PURE__ */ loggerMake(({
|
|
29254
|
-
cause,
|
|
29255
|
-
date: date2,
|
|
29256
|
-
fiber: fiber3,
|
|
29257
|
-
logLevel,
|
|
29258
|
-
message
|
|
29259
|
-
}) => {
|
|
29260
|
-
const annotationsObj = {};
|
|
29261
|
-
const spansObj = {};
|
|
29262
|
-
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29263
|
-
for (const [key, value6] of Object.entries(annotations2)) {
|
|
29264
|
-
assignProperty(annotationsObj, key, structuredMessage(value6));
|
|
29265
|
-
}
|
|
29266
|
-
const now2 = date2.getTime();
|
|
29267
|
-
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29268
|
-
for (const [label, timestamp] of spans) {
|
|
29269
|
-
assignProperty(spansObj, label, now2 - timestamp);
|
|
29270
|
-
}
|
|
29271
|
-
const messageArr = ensure(message);
|
|
29272
|
-
return {
|
|
29273
|
-
message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
|
|
29274
|
-
level: logLevel.toUpperCase(),
|
|
29275
|
-
timestamp: date2.toISOString(),
|
|
29276
|
-
cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
|
|
29277
|
-
annotations: annotationsObj,
|
|
29278
|
-
spans: spansObj,
|
|
29279
|
-
fiberId: formatFiberId(fiber3.id)
|
|
29280
|
-
};
|
|
29281
|
-
});
|
|
29282
|
-
var formatJson2 = /* @__PURE__ */ map15(formatStructured, formatJson);
|
|
29283
|
-
var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
|
|
29284
|
-
let buffer3 = [];
|
|
29285
|
-
const flush2 = suspend(() => {
|
|
29286
|
-
if (buffer3.length === 0) {
|
|
29287
|
-
return void_3;
|
|
29288
|
-
}
|
|
29289
|
-
const arr = buffer3;
|
|
29290
|
-
buffer3 = [];
|
|
29291
|
-
return options.flush(arr);
|
|
29292
|
-
});
|
|
29293
|
-
return uninterruptibleMask((restore) => restore(sleep(options.window).pipe(andThen3(flush2), forever2)).pipe(forkDetach, flatMap3((fiber3) => scopeAddFinalizerExit(scope3, () => fiberInterrupt(fiber3))), andThen3(addFinalizer(() => flush2)), as2(loggerMake((options2) => {
|
|
29294
|
-
buffer3.push(self.log(options2));
|
|
29295
|
-
}))));
|
|
29296
|
-
}));
|
|
29297
|
-
var consolePretty2 = consolePretty;
|
|
29298
|
-
var consolePrettyBrowser = prettyLoggerBrowser;
|
|
29299
|
-
var consolePrettyTty = prettyLoggerTty;
|
|
29300
|
-
var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
|
|
29301
|
-
var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
|
|
29302
|
-
var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
|
|
29303
|
-
var tracerLogger2 = tracerLogger;
|
|
29304
|
-
var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
|
|
29305
|
-
const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber3.getRef(CurrentLoggers) : []);
|
|
29306
|
-
for (const logger of loggers) {
|
|
29307
|
-
currentLoggers.add(isEffect(logger) ? yield* logger : logger);
|
|
29308
|
-
}
|
|
29309
|
-
return currentLoggers;
|
|
29310
|
-
})));
|
|
29311
|
-
var toFile = /* @__PURE__ */ dual((args2) => isLogger(args2[0]), (self, path, options) => gen3(function* () {
|
|
29312
|
-
const fs = yield* FileSystem;
|
|
29313
|
-
const logFile = yield* fs.open(path, {
|
|
29314
|
-
flag: "a+",
|
|
29315
|
-
...options
|
|
29316
|
-
});
|
|
29317
|
-
const encoder2 = new TextEncoder();
|
|
29318
|
-
return yield* batched(self, {
|
|
29319
|
-
window: options?.batchWindow ?? 1e3,
|
|
29320
|
-
flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
|
|
29321
|
-
});
|
|
29322
|
-
}));
|
|
29323
|
-
|
|
29324
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ManagedRuntime.js
|
|
29325
|
-
var ManagedRuntime_exports = {};
|
|
29326
|
-
__export(ManagedRuntime_exports, {
|
|
29327
|
-
isManagedRuntime: () => isManagedRuntime,
|
|
29328
|
-
make: () => make42
|
|
29329
|
-
});
|
|
29330
|
-
var TypeId45 = "~effect/ManagedRuntime";
|
|
29331
|
-
var isManagedRuntime = (input) => hasProperty(input, TypeId45);
|
|
29332
|
-
var make42 = (layer2, options) => {
|
|
29333
|
-
const memoMap = options?.memoMap ?? makeMemoMapUnsafe();
|
|
29334
|
-
const scope3 = makeUnsafe3("parallel");
|
|
29335
|
-
const layerScope = forkUnsafe2(scope3, "sequential");
|
|
29336
|
-
const defaultRunOptions = {
|
|
29337
|
-
onFiberStart: runIn(scope3)
|
|
29338
|
-
};
|
|
29339
|
-
const mergeRunOptions = (options2) => options2 ? {
|
|
29340
|
-
...options2,
|
|
29341
|
-
onFiberStart: options2.onFiberStart ? (fiber3) => {
|
|
29342
|
-
defaultRunOptions.onFiberStart(fiber3);
|
|
29343
|
-
options2.onFiberStart(fiber3);
|
|
29344
|
-
} : defaultRunOptions.onFiberStart
|
|
29345
|
-
} : defaultRunOptions;
|
|
29346
|
-
let buildFiber;
|
|
29347
|
-
const contextEffect = withFiber2((fiber3) => {
|
|
29348
|
-
if (!buildFiber) {
|
|
29349
|
-
buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
|
|
29350
|
-
self.cachedContext = context3;
|
|
29351
|
-
})), {
|
|
29352
|
-
...defaultRunOptions,
|
|
29353
|
-
scheduler: fiber3.cache.scheduler
|
|
29354
|
-
});
|
|
29355
|
-
}
|
|
29356
|
-
return flatten5(await_(buildFiber));
|
|
29357
|
-
});
|
|
29358
|
-
const self = {
|
|
29359
|
-
[TypeId45]: TypeId45,
|
|
29360
|
-
memoMap,
|
|
29361
|
-
scope: scope3,
|
|
29362
|
-
contextEffect,
|
|
29363
|
-
cachedContext: void 0,
|
|
29364
|
-
context() {
|
|
29365
|
-
return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
|
|
29366
|
-
},
|
|
29367
|
-
dispose() {
|
|
29368
|
-
return runPromise2(self.disposeEffect);
|
|
29369
|
-
},
|
|
29370
|
-
[Symbol.asyncDispose]() {
|
|
29371
|
-
return self.dispose();
|
|
29372
|
-
},
|
|
29373
|
-
disposeEffect: suspend3(() => {
|
|
29374
|
-
;
|
|
29375
|
-
self.contextEffect = die5("ManagedRuntime disposed");
|
|
29376
|
-
self.cachedContext = void 0;
|
|
29377
|
-
return close(self.scope, void_4);
|
|
29378
|
-
}),
|
|
29379
|
-
runFork(effect2, options2) {
|
|
29380
|
-
return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29381
|
-
},
|
|
29382
|
-
runCallback(effect2, options2) {
|
|
29383
|
-
return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29384
|
-
},
|
|
29385
|
-
runSyncExit(effect2) {
|
|
29386
|
-
return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
|
|
29387
|
-
},
|
|
29388
|
-
runSync(effect2) {
|
|
29389
|
-
return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
|
|
29390
|
-
},
|
|
29391
|
-
runPromiseExit(effect2, options2) {
|
|
29392
|
-
return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29393
|
-
},
|
|
29394
|
-
runPromise(effect2, options2) {
|
|
29395
|
-
return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29396
|
-
}
|
|
29397
|
-
};
|
|
29398
|
-
return self;
|
|
29399
|
-
};
|
|
29400
|
-
function provide7(managed, effect2) {
|
|
29401
|
-
return flatMap5(managed.contextEffect, (context3) => provideContext2(effect2, context3));
|
|
29402
|
-
}
|
|
29403
|
-
|
|
29404
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
|
|
29405
|
-
var Match_exports = {};
|
|
29406
|
-
__export(Match_exports, {
|
|
29407
|
-
any: () => any3,
|
|
29408
|
-
bigint: () => bigint,
|
|
29409
|
-
boolean: () => boolean2,
|
|
29410
|
-
date: () => date,
|
|
29411
|
-
defined: () => defined2,
|
|
29412
|
-
discriminator: () => discriminator2,
|
|
29413
|
-
discriminatorStartsWith: () => discriminatorStartsWith2,
|
|
29414
|
-
discriminators: () => discriminators2,
|
|
29415
|
-
discriminatorsExhaustive: () => discriminatorsExhaustive2,
|
|
29416
|
-
exhaustive: () => exhaustive2,
|
|
29417
|
-
fn: () => fn4,
|
|
29418
|
-
instanceOf: () => instanceOf3,
|
|
29419
|
-
instanceOfUnsafe: () => instanceOfUnsafe,
|
|
29420
|
-
is: () => is4,
|
|
29421
|
-
nonEmptyString: () => nonEmptyString2,
|
|
29422
|
-
not: () => not2,
|
|
29423
|
-
null: () => _null,
|
|
29424
|
-
number: () => number3,
|
|
29425
|
-
option: () => option5,
|
|
29426
|
-
orElse: () => orElse5,
|
|
29427
|
-
orElseAbsurd: () => orElseAbsurd2,
|
|
29428
|
-
record: () => record2,
|
|
29429
|
-
result: () => result5,
|
|
29430
|
-
string: () => string3,
|
|
29431
|
-
symbol: () => symbol5,
|
|
29432
|
-
tag: () => tag3,
|
|
29433
|
-
tagStartsWith: () => tagStartsWith2,
|
|
29434
|
-
tags: () => tags2,
|
|
29435
|
-
tagsExhaustive: () => tagsExhaustive2,
|
|
29436
|
-
type: () => type2,
|
|
29437
|
-
typeTags: () => typeTags2,
|
|
29438
|
-
undefined: () => _undefined,
|
|
29439
|
-
value: () => value5,
|
|
29440
|
-
valueTags: () => valueTags2,
|
|
29441
|
-
when: () => when5,
|
|
29442
|
-
whenAnd: () => whenAnd2,
|
|
29443
|
-
whenOr: () => whenOr2,
|
|
29444
|
-
withReturnType: () => withReturnType2
|
|
29445
|
-
});
|
|
29446
|
-
|
|
29447
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/matcher.js
|
|
29448
|
-
var TypeId46 = "~effect/Match/Matcher";
|
|
29449
|
-
var TypeMatcherProto = {
|
|
29450
|
-
[TypeId46]: {
|
|
29451
|
-
_input: identity,
|
|
29452
|
-
_filters: identity,
|
|
29453
|
-
_remaining: identity,
|
|
29454
|
-
_result: identity,
|
|
29455
|
-
_return: identity,
|
|
29456
|
-
_args: identity
|
|
29457
|
-
},
|
|
29458
|
-
_tag: "TypeMatcher",
|
|
29459
|
-
add(_case) {
|
|
29460
|
-
return makeTypeMatcher(this.select, [...this.cases, _case]);
|
|
29334
|
+
ret.ext = path.slice(startDot, end3);
|
|
29335
|
+
}
|
|
29336
|
+
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
|
|
29337
|
+
else if (isAbsolute) ret.dir = "/";
|
|
29338
|
+
return ret;
|
|
29461
29339
|
},
|
|
29462
|
-
|
|
29463
|
-
|
|
29340
|
+
sep: "/",
|
|
29341
|
+
fromFileUrl,
|
|
29342
|
+
toFileUrl,
|
|
29343
|
+
toNamespacedPath: identity
|
|
29344
|
+
});
|
|
29345
|
+
|
|
29346
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ConfigProvider.js
|
|
29347
|
+
function makeValue(value6) {
|
|
29348
|
+
return {
|
|
29349
|
+
_tag: "Value",
|
|
29350
|
+
value: value6
|
|
29351
|
+
};
|
|
29352
|
+
}
|
|
29353
|
+
function makeRecord(keys4, value6) {
|
|
29354
|
+
return {
|
|
29355
|
+
_tag: "Record",
|
|
29356
|
+
keys: keys4,
|
|
29357
|
+
value: value6
|
|
29358
|
+
};
|
|
29359
|
+
}
|
|
29360
|
+
function makeArray(length, value6) {
|
|
29361
|
+
return {
|
|
29362
|
+
_tag: "Array",
|
|
29363
|
+
length,
|
|
29364
|
+
value: value6
|
|
29365
|
+
};
|
|
29366
|
+
}
|
|
29367
|
+
var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
|
|
29368
|
+
defaultValue: () => fromEnv()
|
|
29369
|
+
});
|
|
29370
|
+
var Proto8 = {
|
|
29371
|
+
...PipeInspectableProto,
|
|
29372
|
+
toJSON() {
|
|
29373
|
+
return {
|
|
29374
|
+
_id: "ConfigProvider"
|
|
29375
|
+
};
|
|
29464
29376
|
}
|
|
29465
29377
|
};
|
|
29466
|
-
|
|
29467
|
-
|
|
29468
|
-
|
|
29469
|
-
|
|
29470
|
-
|
|
29378
|
+
var identityPath = (path) => path;
|
|
29379
|
+
function makeProvider(load, mapInput4) {
|
|
29380
|
+
const self = Object.create(Proto8);
|
|
29381
|
+
self.load = load;
|
|
29382
|
+
self.mapInput = mapInput4;
|
|
29383
|
+
return self;
|
|
29471
29384
|
}
|
|
29472
|
-
|
|
29473
|
-
|
|
29474
|
-
|
|
29475
|
-
|
|
29476
|
-
|
|
29477
|
-
|
|
29478
|
-
|
|
29479
|
-
|
|
29480
|
-
|
|
29481
|
-
|
|
29482
|
-
|
|
29483
|
-
|
|
29385
|
+
function makeSource(get12, transform4) {
|
|
29386
|
+
return makeProvider((path) => get12(transform4(path)), (f) => makeSource(get12, flow(transform4, f)));
|
|
29387
|
+
}
|
|
29388
|
+
function make39(get12) {
|
|
29389
|
+
return makeSource(get12, identityPath);
|
|
29390
|
+
}
|
|
29391
|
+
function emptyStringAsMissing(value6, preserveEmptyStrings) {
|
|
29392
|
+
return value6 === "" && !preserveEmptyStrings ? void 0 : value6;
|
|
29393
|
+
}
|
|
29394
|
+
function fromEnvRecord(env, options) {
|
|
29395
|
+
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
29396
|
+
const trie = buildEnvTrie(env);
|
|
29397
|
+
return make39((path) => succeed7(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
29398
|
+
}
|
|
29399
|
+
function fromEnv(options) {
|
|
29400
|
+
const env = options?.env ?? {
|
|
29401
|
+
...globalThis.process?.env,
|
|
29402
|
+
...import.meta?.env
|
|
29403
|
+
};
|
|
29404
|
+
return fromEnvRecord(env, {
|
|
29405
|
+
preserveEmptyStrings: options?.preserveEmptyStrings
|
|
29406
|
+
});
|
|
29407
|
+
}
|
|
29408
|
+
function buildEnvTrie(env) {
|
|
29409
|
+
const trie = {};
|
|
29410
|
+
for (const [name, value6] of Object.entries(env)) {
|
|
29411
|
+
if (value6 === void 0) continue;
|
|
29412
|
+
const segments = name.split("_");
|
|
29413
|
+
let node = trie;
|
|
29414
|
+
for (const seg of segments) {
|
|
29415
|
+
const children = node.children ??= /* @__PURE__ */ Object.create(null);
|
|
29416
|
+
node = children[seg] ??= {};
|
|
29484
29417
|
}
|
|
29485
|
-
|
|
29486
|
-
|
|
29487
|
-
|
|
29488
|
-
|
|
29418
|
+
}
|
|
29419
|
+
return trie;
|
|
29420
|
+
}
|
|
29421
|
+
function nodeAtEnv(trie, env, path, preserveEmptyStrings) {
|
|
29422
|
+
const key = path.map(String).join("_");
|
|
29423
|
+
const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0, preserveEmptyStrings);
|
|
29424
|
+
const trieNode = trieNodeAt(trie, path);
|
|
29425
|
+
const children = trieNode?.children ? Object.keys(trieNode.children) : [];
|
|
29426
|
+
if (children.length === 0) {
|
|
29427
|
+
return leafValue === void 0 ? void 0 : makeValue(leafValue);
|
|
29428
|
+
}
|
|
29429
|
+
const allNumeric = children.every(isCanonicalArrayIndex);
|
|
29430
|
+
if (allNumeric) {
|
|
29431
|
+
const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
|
|
29432
|
+
return makeArray(length, leafValue);
|
|
29433
|
+
}
|
|
29434
|
+
return makeRecord(new Set(children), leafValue);
|
|
29435
|
+
}
|
|
29436
|
+
function trieNodeAt(root, path) {
|
|
29437
|
+
if (path.length === 0) return root;
|
|
29438
|
+
let node = root;
|
|
29439
|
+
for (const seg of path) {
|
|
29440
|
+
node = node?.children?.[String(seg)];
|
|
29441
|
+
if (!node) return void 0;
|
|
29442
|
+
}
|
|
29443
|
+
return node;
|
|
29444
|
+
}
|
|
29445
|
+
|
|
29446
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Config.js
|
|
29447
|
+
var TypeId44 = "~effect/Config";
|
|
29448
|
+
var ConfigError = class {
|
|
29449
|
+
_tag = "ConfigError";
|
|
29450
|
+
name = "ConfigError";
|
|
29451
|
+
cause;
|
|
29452
|
+
constructor(cause) {
|
|
29453
|
+
this.cause = cause;
|
|
29454
|
+
}
|
|
29455
|
+
get message() {
|
|
29456
|
+
return this.cause.toString();
|
|
29457
|
+
}
|
|
29458
|
+
toString() {
|
|
29459
|
+
return `ConfigError(${this.message})`;
|
|
29460
|
+
}
|
|
29461
|
+
};
|
|
29462
|
+
var Proto9 = {
|
|
29463
|
+
.../* @__PURE__ */ Prototype2({
|
|
29464
|
+
label: "Config",
|
|
29465
|
+
evaluate(fiber3) {
|
|
29466
|
+
return this.parse(fiber3.getRef(ConfigProvider));
|
|
29489
29467
|
}
|
|
29490
|
-
|
|
29491
|
-
|
|
29492
|
-
|
|
29493
|
-
return
|
|
29468
|
+
}),
|
|
29469
|
+
[TypeId44]: TypeId44,
|
|
29470
|
+
toJSON() {
|
|
29471
|
+
return {
|
|
29472
|
+
_id: "Config"
|
|
29473
|
+
};
|
|
29494
29474
|
}
|
|
29495
29475
|
};
|
|
29496
|
-
function
|
|
29497
|
-
const
|
|
29498
|
-
|
|
29499
|
-
|
|
29500
|
-
return
|
|
29476
|
+
function make40(evaluator) {
|
|
29477
|
+
const self = Object.create(Proto9);
|
|
29478
|
+
self.evaluator = evaluator;
|
|
29479
|
+
self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager2((failure) => failure.error), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolution.value) : fail7(resolution.error)));
|
|
29480
|
+
return self;
|
|
29501
29481
|
}
|
|
29502
|
-
var
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
|
|
29482
|
+
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
29483
|
+
var resolved = (value6, hasInput2) => ({
|
|
29484
|
+
_tag: "Resolved",
|
|
29485
|
+
value: value6,
|
|
29486
|
+
hasInput: hasInput2
|
|
29506
29487
|
});
|
|
29507
|
-
var
|
|
29508
|
-
_tag: "
|
|
29509
|
-
|
|
29510
|
-
evaluate: evaluate2
|
|
29488
|
+
var absent = (error) => ({
|
|
29489
|
+
_tag: "Absent",
|
|
29490
|
+
error
|
|
29511
29491
|
});
|
|
29512
|
-
var
|
|
29513
|
-
|
|
29514
|
-
|
|
29515
|
-
|
|
29516
|
-
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29527
|
-
|
|
29528
|
-
|
|
29529
|
-
}
|
|
29530
|
-
|
|
29531
|
-
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
|
|
29539
|
-
|
|
29540
|
-
|
|
29541
|
-
|
|
29542
|
-
|
|
29543
|
-
|
|
29492
|
+
var evaluationFailure = (error, hasInput2) => ({
|
|
29493
|
+
error,
|
|
29494
|
+
hasInput: hasInput2
|
|
29495
|
+
});
|
|
29496
|
+
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
29497
|
+
var catchSourceError = (self, hasInput2) => self.pipe(catchDefect2((defect) => isSourceError(defect) ? fail7(evaluationFailure(new ConfigError(defect), hasInput2)) : die5(defect)));
|
|
29498
|
+
var preserveInputEvidence = (self, hasInput2) => {
|
|
29499
|
+
if (!hasInput2) return self;
|
|
29500
|
+
return self.pipe(mapErrorEager2((failure) => evaluationFailure(failure.error, true)), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolved(resolution.value, true)) : fail7(evaluationFailure(resolution.error, true))));
|
|
29501
|
+
};
|
|
29502
|
+
var map14 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
29503
|
+
return make40((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
|
|
29504
|
+
});
|
|
29505
|
+
var orElse5 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
29506
|
+
return make40((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
|
|
29507
|
+
onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
|
|
29508
|
+
onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
|
|
29509
|
+
}));
|
|
29510
|
+
});
|
|
29511
|
+
function all5(arg) {
|
|
29512
|
+
const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
29513
|
+
if (globalThis.Array.isArray(configs)) {
|
|
29514
|
+
return make40((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
|
|
29515
|
+
} else {
|
|
29516
|
+
return make40((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
|
|
29517
|
+
}
|
|
29518
|
+
}
|
|
29519
|
+
var resolveArray = (results) => {
|
|
29520
|
+
const values2 = [];
|
|
29521
|
+
let firstFailure;
|
|
29522
|
+
let firstAbsent;
|
|
29523
|
+
let hasInput2 = false;
|
|
29524
|
+
for (const result6 of results) {
|
|
29525
|
+
if (isFailure2(result6)) {
|
|
29526
|
+
firstFailure ??= result6.failure;
|
|
29527
|
+
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
29528
|
+
continue;
|
|
29529
|
+
}
|
|
29530
|
+
const resolution = result6.success;
|
|
29531
|
+
if (resolution._tag === "Absent") {
|
|
29532
|
+
firstAbsent ??= resolution;
|
|
29533
|
+
} else {
|
|
29534
|
+
values2.push(resolution.value);
|
|
29535
|
+
hasInput2 = hasInput2 || resolution.hasInput;
|
|
29536
|
+
}
|
|
29537
|
+
}
|
|
29538
|
+
if (firstFailure !== void 0) {
|
|
29539
|
+
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
29540
|
+
}
|
|
29541
|
+
if (firstAbsent !== void 0) {
|
|
29542
|
+
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
29544
29543
|
}
|
|
29545
|
-
return (
|
|
29544
|
+
return succeed7(resolved(values2, hasInput2));
|
|
29546
29545
|
};
|
|
29547
|
-
var
|
|
29548
|
-
const
|
|
29549
|
-
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
29554
|
-
|
|
29546
|
+
var resolveRecord = (results) => {
|
|
29547
|
+
const values2 = {};
|
|
29548
|
+
let firstFailure;
|
|
29549
|
+
let firstAbsent;
|
|
29550
|
+
let hasInput2 = false;
|
|
29551
|
+
for (const key in results) {
|
|
29552
|
+
const result6 = results[key];
|
|
29553
|
+
if (isFailure2(result6)) {
|
|
29554
|
+
firstFailure ??= result6.failure;
|
|
29555
|
+
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
29556
|
+
continue;
|
|
29555
29557
|
}
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
|
|
29562
|
-
return (u) => {
|
|
29563
|
-
for (let i = 0; i < len; i++) {
|
|
29564
|
-
if (predicates[i](u) === false) {
|
|
29565
|
-
return false;
|
|
29566
|
-
}
|
|
29558
|
+
const resolution = result6.success;
|
|
29559
|
+
if (resolution._tag === "Absent") {
|
|
29560
|
+
firstAbsent ??= resolution;
|
|
29561
|
+
} else {
|
|
29562
|
+
assignProperty(values2, key, resolution.value);
|
|
29563
|
+
hasInput2 = hasInput2 || resolution.hasInput;
|
|
29567
29564
|
}
|
|
29568
|
-
|
|
29569
|
-
|
|
29565
|
+
}
|
|
29566
|
+
if (firstFailure !== void 0) {
|
|
29567
|
+
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
29568
|
+
}
|
|
29569
|
+
if (firstAbsent !== void 0) {
|
|
29570
|
+
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
29571
|
+
}
|
|
29572
|
+
return succeed7(resolved(values2, hasInput2));
|
|
29570
29573
|
};
|
|
29571
|
-
var
|
|
29572
|
-
|
|
29573
|
-
var value4 = (i) => makeValueMatcher(i, fail2(i));
|
|
29574
|
-
var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
|
|
29575
|
-
const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
29576
|
-
return match10(input);
|
|
29574
|
+
var withDefault2 = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
29575
|
+
return make40((provider, pathPrefix) => mapEager2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
|
|
29577
29576
|
});
|
|
29578
|
-
var
|
|
29579
|
-
|
|
29580
|
-
|
|
29581
|
-
|
|
29582
|
-
|
|
29583
|
-
|
|
29584
|
-
|
|
29585
|
-
|
|
29586
|
-
|
|
29587
|
-
|
|
29588
|
-
|
|
29589
|
-
var
|
|
29590
|
-
|
|
29591
|
-
|
|
29592
|
-
|
|
29593
|
-
|
|
29594
|
-
|
|
29595
|
-
|
|
29596
|
-
|
|
29597
|
-
|
|
29598
|
-
|
|
29599
|
-
}
|
|
29600
|
-
var discriminatorStartsWith = (field) => (pattern, f) => {
|
|
29601
|
-
const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
|
|
29602
|
-
return (self) => self.add(makeWhen(pred, f));
|
|
29603
|
-
};
|
|
29604
|
-
var discriminators = (field) => (fields) => {
|
|
29605
|
-
const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
|
|
29606
|
-
return (self) => self.add(predicate);
|
|
29577
|
+
var option5 = (self) => self.pipe(map14(some3), withDefault2(none2()));
|
|
29578
|
+
var cursorToString = () => "<configuration>";
|
|
29579
|
+
var loadCursor = (provider, path) => provider.load(path).pipe(orDie3, mapEager2((node) => ({
|
|
29580
|
+
provider,
|
|
29581
|
+
path,
|
|
29582
|
+
node,
|
|
29583
|
+
toString: cursorToString
|
|
29584
|
+
})));
|
|
29585
|
+
var loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
|
|
29586
|
+
var getScalar = (node) => node?.value;
|
|
29587
|
+
var decodeFromCursor = (ast, decode3) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode3(input)), passthrough2()));
|
|
29588
|
+
var isScalarInput = (ast) => {
|
|
29589
|
+
switch (ast._tag) {
|
|
29590
|
+
case "Union":
|
|
29591
|
+
return ast.types.every(isScalarInput);
|
|
29592
|
+
case "Objects":
|
|
29593
|
+
case "Arrays":
|
|
29594
|
+
case "Suspend":
|
|
29595
|
+
return false;
|
|
29596
|
+
default:
|
|
29597
|
+
return true;
|
|
29598
|
+
}
|
|
29607
29599
|
};
|
|
29608
|
-
var
|
|
29609
|
-
|
|
29610
|
-
|
|
29600
|
+
var hasProviderInput = (ast, node) => {
|
|
29601
|
+
switch (ast._tag) {
|
|
29602
|
+
case "Objects":
|
|
29603
|
+
return node?._tag === "Record";
|
|
29604
|
+
case "Arrays":
|
|
29605
|
+
return node?._tag === "Array";
|
|
29606
|
+
case "Union":
|
|
29607
|
+
return ast.types.some((ast2) => hasProviderInput(ast2, node));
|
|
29608
|
+
case "Suspend":
|
|
29609
|
+
return hasProviderInput(ast.thunk(), node);
|
|
29610
|
+
default:
|
|
29611
|
+
return getScalar(node) !== void 0;
|
|
29612
|
+
}
|
|
29611
29613
|
};
|
|
29612
|
-
var
|
|
29613
|
-
|
|
29614
|
-
|
|
29615
|
-
|
|
29616
|
-
|
|
29617
|
-
|
|
29618
|
-
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29614
|
+
var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
29615
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
29616
|
+
const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
|
|
29617
|
+
seen.add(ast);
|
|
29618
|
+
switch (ast._tag) {
|
|
29619
|
+
case "Objects": {
|
|
29620
|
+
const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
|
|
29621
|
+
const materialize = fnUntraced2(function* (cursor) {
|
|
29622
|
+
if (cursor.node?._tag !== "Record") {
|
|
29623
|
+
return void 0;
|
|
29624
|
+
}
|
|
29625
|
+
const node = cursor.node;
|
|
29626
|
+
const keys4 = /* @__PURE__ */ new Set();
|
|
29627
|
+
for (const property of ast.propertySignatures) {
|
|
29628
|
+
if (typeof property.name === "string") keys4.add(property.name);
|
|
29629
|
+
}
|
|
29630
|
+
if (matchesIndex.length > 0) {
|
|
29631
|
+
for (const key of node.keys) {
|
|
29632
|
+
if (matchesIndex.some((matches) => matches(key))) keys4.add(key);
|
|
29633
|
+
}
|
|
29634
|
+
}
|
|
29635
|
+
const out = {};
|
|
29636
|
+
for (const key of keys4) {
|
|
29637
|
+
const child = yield* loadChildCursor(cursor, key);
|
|
29638
|
+
if (child.node !== void 0) assignProperty(out, key, child);
|
|
29639
|
+
}
|
|
29640
|
+
return out;
|
|
29641
|
+
});
|
|
29642
|
+
return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
|
|
29643
|
+
}
|
|
29644
|
+
case "Arrays": {
|
|
29645
|
+
const materialize = fnUntraced2(function* (cursor) {
|
|
29646
|
+
if (cursor.node?._tag !== "Array") {
|
|
29647
|
+
return void 0;
|
|
29648
|
+
}
|
|
29649
|
+
const out = [];
|
|
29650
|
+
for (let i = 0; i < cursor.node.length; i++) {
|
|
29651
|
+
out.push(yield* loadChildCursor(cursor, i));
|
|
29652
|
+
}
|
|
29653
|
+
return out;
|
|
29654
|
+
});
|
|
29655
|
+
return decodeFromCursor(ast.recur(recur2), materialize);
|
|
29656
|
+
}
|
|
29657
|
+
case "Union":
|
|
29658
|
+
for (const member of ast.types) {
|
|
29659
|
+
recur2(member);
|
|
29660
|
+
}
|
|
29661
|
+
return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node))) : ast.recur(recur2);
|
|
29662
|
+
case "Suspend": {
|
|
29663
|
+
const target = ast.thunk();
|
|
29664
|
+
if (!seen.has(target)) recur2(target);
|
|
29665
|
+
return ast.recur(recur2);
|
|
29624
29666
|
}
|
|
29667
|
+
case "Declaration":
|
|
29668
|
+
case "Any":
|
|
29669
|
+
throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
|
|
29670
|
+
cause: ast
|
|
29671
|
+
});
|
|
29672
|
+
default:
|
|
29673
|
+
return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
|
|
29674
|
+
}
|
|
29675
|
+
});
|
|
29676
|
+
return recur2(root);
|
|
29677
|
+
});
|
|
29678
|
+
function schema(codec, path) {
|
|
29679
|
+
const codecStringTree = toCodecStringTree2(codec);
|
|
29680
|
+
const encodedAst = toEncoded(codecStringTree.ast);
|
|
29681
|
+
const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
|
|
29682
|
+
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
29683
|
+
return make40((provider, pathPrefix) => {
|
|
29684
|
+
const fullPath = [...pathPrefix, ...localPath];
|
|
29685
|
+
return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
|
|
29686
|
+
const hasInput2 = hasProviderInput(encodedAst, cursor.node);
|
|
29687
|
+
return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
|
|
29688
|
+
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
29689
|
+
return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
|
|
29690
|
+
})), hasInput2);
|
|
29691
|
+
}));
|
|
29692
|
+
});
|
|
29693
|
+
}
|
|
29694
|
+
var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
|
|
29695
|
+
function String7(name) {
|
|
29696
|
+
return schema(String6, name);
|
|
29697
|
+
}
|
|
29698
|
+
function Int2(name) {
|
|
29699
|
+
return schema(Int, name);
|
|
29700
|
+
}
|
|
29701
|
+
function Literals2(literals, name) {
|
|
29702
|
+
return schema(Literals(literals), name);
|
|
29703
|
+
}
|
|
29704
|
+
function Array3(value6, pathOrOptions, options) {
|
|
29705
|
+
const hasPath = isPath(pathOrOptions);
|
|
29706
|
+
const resolvedOptions = hasPath ? options : pathOrOptions;
|
|
29707
|
+
const array2 = ArraySchema(value6);
|
|
29708
|
+
const separator = resolvedOptions?.separator ?? ",";
|
|
29709
|
+
const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
|
|
29710
|
+
decode: split(resolvedOptions),
|
|
29711
|
+
encode: passthrough2({
|
|
29712
|
+
strict: false
|
|
29713
|
+
}).compose(transform((input) => input.join(separator)))
|
|
29714
|
+
}));
|
|
29715
|
+
return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
|
|
29716
|
+
}
|
|
29717
|
+
function Record2(key, value6, pathOrOptions, options) {
|
|
29718
|
+
const hasPath = isPath(pathOrOptions);
|
|
29719
|
+
const record3 = Record(key, value6);
|
|
29720
|
+
const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
|
|
29721
|
+
const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
|
|
29722
|
+
decode: split3.decode,
|
|
29723
|
+
encode: passthrough2({
|
|
29724
|
+
strict: false
|
|
29725
|
+
}).compose(split3.encode)
|
|
29726
|
+
}));
|
|
29727
|
+
return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
|
|
29728
|
+
}
|
|
29729
|
+
function Boolean4(name) {
|
|
29730
|
+
return schema(BooleanLiterals, name);
|
|
29731
|
+
}
|
|
29732
|
+
function URL3(name) {
|
|
29733
|
+
return schema(URL2, name);
|
|
29734
|
+
}
|
|
29735
|
+
|
|
29736
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
|
|
29737
|
+
var ignore5 = "~effect/ErrorReporter/ignore";
|
|
29738
|
+
|
|
29739
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
|
|
29740
|
+
var FiberSet_exports = {};
|
|
29741
|
+
__export(FiberSet_exports, {
|
|
29742
|
+
add: () => add4,
|
|
29743
|
+
addUnsafe: () => addUnsafe2,
|
|
29744
|
+
awaitEmpty: () => awaitEmpty,
|
|
29745
|
+
clear: () => clear4,
|
|
29746
|
+
isFiberSet: () => isFiberSet,
|
|
29747
|
+
join: () => join3,
|
|
29748
|
+
make: () => make41,
|
|
29749
|
+
makeRuntime: () => makeRuntime,
|
|
29750
|
+
makeRuntimePromise: () => makeRuntimePromise,
|
|
29751
|
+
run: () => run3,
|
|
29752
|
+
runtime: () => runtime,
|
|
29753
|
+
runtimePromise: () => runtimePromise,
|
|
29754
|
+
size: () => size8
|
|
29755
|
+
});
|
|
29756
|
+
var TypeId45 = "~effect/FiberSet";
|
|
29757
|
+
var isFiberSet = (u) => hasProperty(u, TypeId45);
|
|
29758
|
+
var Proto10 = {
|
|
29759
|
+
[TypeId45]: TypeId45,
|
|
29760
|
+
[Symbol.iterator]() {
|
|
29761
|
+
if (this.state._tag === "Closed") {
|
|
29762
|
+
return empty2();
|
|
29625
29763
|
}
|
|
29626
|
-
return
|
|
29627
|
-
}
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29632
|
-
|
|
29633
|
-
|
|
29634
|
-
if (isResult2(toResult)) {
|
|
29635
|
-
return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
|
|
29764
|
+
return this.state.backing[Symbol.iterator]();
|
|
29765
|
+
},
|
|
29766
|
+
...PipeInspectableProto,
|
|
29767
|
+
toJSON() {
|
|
29768
|
+
return {
|
|
29769
|
+
_id: "FiberSet",
|
|
29770
|
+
state: this.state
|
|
29771
|
+
};
|
|
29636
29772
|
}
|
|
29637
|
-
|
|
29638
|
-
|
|
29639
|
-
|
|
29773
|
+
};
|
|
29774
|
+
var makeUnsafe11 = (backing, deferred) => {
|
|
29775
|
+
const self = Object.create(Proto10);
|
|
29776
|
+
self.state = {
|
|
29777
|
+
_tag: "Open",
|
|
29778
|
+
backing
|
|
29640
29779
|
};
|
|
29780
|
+
self.deferred = deferred;
|
|
29781
|
+
return self;
|
|
29641
29782
|
};
|
|
29642
|
-
var
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29783
|
+
var make41 = () => acquireRelease2(sync4(() => makeUnsafe11(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
|
|
29784
|
+
const state = set10.state;
|
|
29785
|
+
if (state._tag === "Closed") return void_5;
|
|
29786
|
+
set10.state = {
|
|
29787
|
+
_tag: "Closed"
|
|
29788
|
+
};
|
|
29789
|
+
const fibers = state.backing;
|
|
29790
|
+
return interruptAll(fibers).pipe(into(set10.deferred));
|
|
29791
|
+
}));
|
|
29792
|
+
var makeRuntime = () => flatMap5(make41(), (self) => runtime(self)());
|
|
29793
|
+
var makeRuntimePromise = () => flatMap5(make41(), (self) => runtimePromise(self)());
|
|
29794
|
+
var internalFiberId = -1;
|
|
29795
|
+
var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose2(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
|
|
29796
|
+
var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
|
|
29797
|
+
if (self.state._tag === "Closed") {
|
|
29798
|
+
fiber3.interruptUnsafe(internalFiberId);
|
|
29799
|
+
return;
|
|
29800
|
+
} else if (self.state.backing.has(fiber3)) {
|
|
29801
|
+
return;
|
|
29648
29802
|
}
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
29803
|
+
self.state.backing.add(fiber3);
|
|
29804
|
+
fiber3.addObserver((exit3) => {
|
|
29805
|
+
if (self.state._tag === "Closed") {
|
|
29806
|
+
return;
|
|
29807
|
+
}
|
|
29808
|
+
self.state.backing.delete(fiber3);
|
|
29809
|
+
if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
|
|
29810
|
+
doneUnsafe(self.deferred, exit3);
|
|
29811
|
+
}
|
|
29812
|
+
});
|
|
29813
|
+
});
|
|
29814
|
+
var add4 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => sync4(() => addUnsafe2(self, fiber3, options)));
|
|
29815
|
+
var clear4 = (self) => suspend3(() => {
|
|
29816
|
+
if (self.state._tag === "Closed") {
|
|
29817
|
+
return void_5;
|
|
29661
29818
|
}
|
|
29662
|
-
return (
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
return succeed2(_case.evaluate(input, ...args2));
|
|
29670
|
-
}
|
|
29819
|
+
return interruptAllAs(self.state.backing, internalFiberId);
|
|
29820
|
+
});
|
|
29821
|
+
var constInterruptedFiber = /* @__PURE__ */ (function() {
|
|
29822
|
+
let fiber3 = void 0;
|
|
29823
|
+
return () => {
|
|
29824
|
+
if (fiber3 === void 0) {
|
|
29825
|
+
fiber3 = runFork2(interrupt5);
|
|
29671
29826
|
}
|
|
29672
|
-
return
|
|
29827
|
+
return fiber3;
|
|
29673
29828
|
};
|
|
29674
|
-
};
|
|
29675
|
-
var
|
|
29676
|
-
const
|
|
29677
|
-
if (
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
onSuccess: some2
|
|
29681
|
-
});
|
|
29829
|
+
})();
|
|
29830
|
+
var run3 = function() {
|
|
29831
|
+
const self = arguments[0];
|
|
29832
|
+
if (!isEffect2(arguments[1])) {
|
|
29833
|
+
const options = arguments[1];
|
|
29834
|
+
return (effect2) => runImpl(self, effect2, options);
|
|
29682
29835
|
}
|
|
29683
|
-
return (
|
|
29684
|
-
onFailure: () => none2(),
|
|
29685
|
-
onSuccess: some2
|
|
29686
|
-
});
|
|
29836
|
+
return runImpl(self, arguments[1], arguments[2]);
|
|
29687
29837
|
};
|
|
29688
|
-
var
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
if (isResult2(toResult)) {
|
|
29692
|
-
if (isSuccess2(toResult)) {
|
|
29693
|
-
return toResult.success;
|
|
29694
|
-
}
|
|
29695
|
-
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
29838
|
+
var runImpl = (self, effect2, options) => withFiber2((parent) => {
|
|
29839
|
+
if (self.state._tag === "Closed") {
|
|
29840
|
+
return sync4(constInterruptedFiber);
|
|
29696
29841
|
}
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29842
|
+
const fiber3 = runForkWith2(parent.context)(effect2);
|
|
29843
|
+
addUnsafe2(self, fiber3, options);
|
|
29844
|
+
return succeed7(fiber3);
|
|
29845
|
+
});
|
|
29846
|
+
var runtime = (self) => () => map9(context2(), (services) => {
|
|
29847
|
+
const runFork3 = runForkWith2(services);
|
|
29848
|
+
return (effect2, options) => {
|
|
29849
|
+
if (self.state._tag === "Closed") {
|
|
29850
|
+
return constInterruptedFiber();
|
|
29701
29851
|
}
|
|
29702
|
-
|
|
29852
|
+
const fiber3 = runFork3(effect2, options);
|
|
29853
|
+
addUnsafe2(self, fiber3, options);
|
|
29854
|
+
return fiber3;
|
|
29703
29855
|
};
|
|
29704
|
-
};
|
|
29856
|
+
});
|
|
29857
|
+
var runtimePromise = (self) => () => map9(runtime(self)(), (runFork3) => (effect2, options) => new Promise((resolve5, reject) => runFork3(effect2, options).addObserver((exit3) => {
|
|
29858
|
+
if (isSuccess4(exit3)) {
|
|
29859
|
+
resolve5(exit3.value);
|
|
29860
|
+
} else {
|
|
29861
|
+
reject(squash(exit3.cause));
|
|
29862
|
+
}
|
|
29863
|
+
})));
|
|
29864
|
+
var size8 = (self) => sync4(() => self.state._tag === "Closed" ? 0 : self.state.backing.size);
|
|
29865
|
+
var join3 = (self) => _await(self.deferred);
|
|
29866
|
+
var awaitEmpty = (self) => whileLoop2({
|
|
29867
|
+
while: () => self.state._tag === "Open" && self.state.backing.size > 0,
|
|
29868
|
+
body: () => await_(headUnsafe(self)),
|
|
29869
|
+
step: constVoid
|
|
29870
|
+
});
|
|
29705
29871
|
|
|
29706
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
29707
|
-
var
|
|
29708
|
-
var fn4 = fn3;
|
|
29709
|
-
var value5 = value4;
|
|
29710
|
-
var valueTags2 = valueTags;
|
|
29711
|
-
var typeTags2 = typeTags;
|
|
29712
|
-
var withReturnType2 = withReturnType;
|
|
29713
|
-
var when5 = when4;
|
|
29714
|
-
var whenOr2 = whenOr;
|
|
29715
|
-
var whenAnd2 = whenAnd;
|
|
29716
|
-
var discriminator2 = discriminator;
|
|
29717
|
-
var discriminatorStartsWith2 = discriminatorStartsWith;
|
|
29718
|
-
var discriminators2 = discriminators;
|
|
29719
|
-
var discriminatorsExhaustive2 = discriminatorsExhaustive;
|
|
29720
|
-
var tag3 = tag2;
|
|
29721
|
-
var tagStartsWith2 = tagStartsWith;
|
|
29722
|
-
var tags2 = tags;
|
|
29723
|
-
var tagsExhaustive2 = tagsExhaustive;
|
|
29724
|
-
var not2 = not;
|
|
29725
|
-
var nonEmptyString2 = nonEmptyString;
|
|
29726
|
-
var is4 = is3;
|
|
29727
|
-
var string3 = isString;
|
|
29728
|
-
var number3 = isNumber;
|
|
29729
|
-
var any3 = any2;
|
|
29730
|
-
var defined2 = defined;
|
|
29731
|
-
var boolean2 = isBoolean;
|
|
29732
|
-
var _undefined = isUndefined;
|
|
29733
|
-
var _null = isNull;
|
|
29734
|
-
var bigint = isBigInt;
|
|
29735
|
-
var symbol5 = isSymbol;
|
|
29736
|
-
var date = isDate;
|
|
29737
|
-
var record2 = isObject;
|
|
29738
|
-
var instanceOf3 = instanceOf2;
|
|
29739
|
-
var instanceOfUnsafe = instanceOf2;
|
|
29740
|
-
var orElse5 = orElse4;
|
|
29741
|
-
var orElseAbsurd2 = orElseAbsurd;
|
|
29742
|
-
var result5 = result4;
|
|
29743
|
-
var option5 = option4;
|
|
29744
|
-
var exhaustive2 = exhaustive;
|
|
29872
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PrimaryKey.js
|
|
29873
|
+
var symbol5 = "~effect/PrimaryKey";
|
|
29745
29874
|
|
|
29746
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
29747
|
-
var
|
|
29748
|
-
__export(
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29757
|
-
|
|
29758
|
-
|
|
29759
|
-
|
|
29760
|
-
|
|
29761
|
-
|
|
29762
|
-
|
|
29763
|
-
|
|
29875
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Logger.js
|
|
29876
|
+
var Logger_exports = {};
|
|
29877
|
+
__export(Logger_exports, {
|
|
29878
|
+
CurrentLoggers: () => CurrentLoggers2,
|
|
29879
|
+
LogToStderr: () => LogToStderr2,
|
|
29880
|
+
batched: () => batched,
|
|
29881
|
+
consoleJson: () => consoleJson,
|
|
29882
|
+
consoleLogFmt: () => consoleLogFmt,
|
|
29883
|
+
consolePretty: () => consolePretty2,
|
|
29884
|
+
consolePrettyBrowser: () => consolePrettyBrowser,
|
|
29885
|
+
consolePrettyTty: () => consolePrettyTty,
|
|
29886
|
+
consoleStructured: () => consoleStructured,
|
|
29887
|
+
defaultLogger: () => defaultLogger2,
|
|
29888
|
+
formatJson: () => formatJson2,
|
|
29889
|
+
formatLogFmt: () => formatLogFmt,
|
|
29890
|
+
formatSimple: () => formatSimple,
|
|
29891
|
+
formatStructured: () => formatStructured,
|
|
29892
|
+
isLogger: () => isLogger,
|
|
29893
|
+
layer: () => layer,
|
|
29894
|
+
make: () => make42,
|
|
29895
|
+
map: () => map15,
|
|
29896
|
+
toFile: () => toFile,
|
|
29897
|
+
tracerLogger: () => tracerLogger2,
|
|
29898
|
+
withConsoleError: () => withConsoleError,
|
|
29899
|
+
withConsoleLog: () => withConsoleLog,
|
|
29900
|
+
withLeveledConsole: () => withLeveledConsole
|
|
29901
|
+
});
|
|
29902
|
+
var TypeId46 = "~effect/Logger";
|
|
29903
|
+
var isLogger = (u) => hasProperty(u, TypeId46);
|
|
29904
|
+
var CurrentLoggers2 = CurrentLoggers;
|
|
29905
|
+
var LogToStderr2 = LogToStderr;
|
|
29906
|
+
var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
|
|
29907
|
+
var withConsoleLog = (self) => loggerMake((options) => {
|
|
29908
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29909
|
+
return console.log(self.log(options));
|
|
29910
|
+
});
|
|
29911
|
+
var withConsoleError = (self) => loggerMake((options) => {
|
|
29912
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29913
|
+
return console.error(self.log(options));
|
|
29764
29914
|
});
|
|
29765
|
-
var
|
|
29766
|
-
|
|
29767
|
-
|
|
29768
|
-
|
|
29769
|
-
|
|
29770
|
-
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29915
|
+
var withLeveledConsole = (self) => loggerMake((options) => {
|
|
29916
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29917
|
+
const output = self.log(options);
|
|
29918
|
+
switch (options.logLevel) {
|
|
29919
|
+
case "Debug":
|
|
29920
|
+
return console.debug(output);
|
|
29921
|
+
case "Info":
|
|
29922
|
+
return console.info(output);
|
|
29923
|
+
case "Trace":
|
|
29924
|
+
return console.trace(output);
|
|
29925
|
+
case "Warn":
|
|
29926
|
+
return console.warn(output);
|
|
29927
|
+
case "Error":
|
|
29928
|
+
case "Fatal":
|
|
29929
|
+
return console.error(output);
|
|
29930
|
+
default:
|
|
29931
|
+
return console.log(output);
|
|
29776
29932
|
}
|
|
29933
|
+
});
|
|
29934
|
+
var textOnly = /^[^\s"=]*$/;
|
|
29935
|
+
var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
|
|
29936
|
+
var formatFiberId = (fiberId3) => `#${fiberId3}`;
|
|
29937
|
+
var format9 = (quoteValue, space) => ({
|
|
29938
|
+
cause,
|
|
29939
|
+
date: date2,
|
|
29940
|
+
fiber: fiber3,
|
|
29941
|
+
logLevel,
|
|
29942
|
+
message
|
|
29943
|
+
}) => {
|
|
29944
|
+
const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
|
|
29945
|
+
space
|
|
29946
|
+
});
|
|
29947
|
+
const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
|
|
29948
|
+
const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
|
|
29949
|
+
const append4 = (label, value6) => " " + format10(label, value6);
|
|
29950
|
+
let out = format10("timestamp", date2.toISOString());
|
|
29951
|
+
out += append4("level", logLevel.toUpperCase());
|
|
29952
|
+
out += append4("fiber", formatFiberId(fiber3.id));
|
|
29953
|
+
const messages = ensure(message);
|
|
29954
|
+
for (let i = 0; i < messages.length; i++) {
|
|
29955
|
+
out += append4("message", formatUnknown(messages[i]));
|
|
29956
|
+
}
|
|
29957
|
+
if (cause.reasons.length > 0) {
|
|
29958
|
+
out += append4("cause", causePretty(cause));
|
|
29959
|
+
}
|
|
29960
|
+
const now2 = date2.getTime();
|
|
29961
|
+
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29962
|
+
for (const span2 of spans) {
|
|
29963
|
+
out += " " + formatLogSpan(span2, now2);
|
|
29964
|
+
}
|
|
29965
|
+
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29966
|
+
for (const [label, value6] of Object.entries(annotations2)) {
|
|
29967
|
+
out += append4(label, formatUnknown(value6));
|
|
29968
|
+
}
|
|
29969
|
+
return out;
|
|
29777
29970
|
};
|
|
29778
|
-
var
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
}
|
|
29791
|
-
|
|
29792
|
-
const
|
|
29793
|
-
|
|
29794
|
-
return current;
|
|
29795
|
-
}));
|
|
29796
|
-
var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
29797
|
-
const current = self.ref.current;
|
|
29798
|
-
const option6 = pf(current);
|
|
29799
|
-
if (option6._tag === "Some") {
|
|
29800
|
-
self.ref.current = option6.value;
|
|
29971
|
+
var make42 = loggerMake;
|
|
29972
|
+
var defaultLogger2 = defaultLogger;
|
|
29973
|
+
var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(escapeDoubleQuotes));
|
|
29974
|
+
var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(JSON.stringify, 0));
|
|
29975
|
+
var formatStructured = /* @__PURE__ */ loggerMake(({
|
|
29976
|
+
cause,
|
|
29977
|
+
date: date2,
|
|
29978
|
+
fiber: fiber3,
|
|
29979
|
+
logLevel,
|
|
29980
|
+
message
|
|
29981
|
+
}) => {
|
|
29982
|
+
const annotationsObj = {};
|
|
29983
|
+
const spansObj = {};
|
|
29984
|
+
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29985
|
+
for (const [key, value6] of Object.entries(annotations2)) {
|
|
29986
|
+
assignProperty(annotationsObj, key, structuredMessage(value6));
|
|
29801
29987
|
}
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
const [b, a] = f(self.ref.current);
|
|
29807
|
-
self.ref.current = a;
|
|
29808
|
-
return b;
|
|
29809
|
-
}));
|
|
29810
|
-
var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
|
|
29811
|
-
const [b, option6] = pf(value6);
|
|
29812
|
-
return [b, option6._tag === "None" ? value6 : option6.value];
|
|
29813
|
-
}));
|
|
29814
|
-
var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
29815
|
-
self.ref.current = f(self.ref.current);
|
|
29816
|
-
}));
|
|
29817
|
-
var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
|
|
29818
|
-
var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
29819
|
-
const option6 = f(self.ref.current);
|
|
29820
|
-
if (option6._tag === "Some") {
|
|
29821
|
-
self.ref.current = option6.value;
|
|
29988
|
+
const now2 = date2.getTime();
|
|
29989
|
+
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29990
|
+
for (const [label, timestamp] of spans) {
|
|
29991
|
+
assignProperty(spansObj, label, now2 - timestamp);
|
|
29822
29992
|
}
|
|
29993
|
+
const messageArr = ensure(message);
|
|
29994
|
+
return {
|
|
29995
|
+
message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
|
|
29996
|
+
level: logLevel.toUpperCase(),
|
|
29997
|
+
timestamp: date2.toISOString(),
|
|
29998
|
+
cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
|
|
29999
|
+
annotations: annotationsObj,
|
|
30000
|
+
spans: spansObj,
|
|
30001
|
+
fiberId: formatFiberId(fiber3.id)
|
|
30002
|
+
};
|
|
30003
|
+
});
|
|
30004
|
+
var formatJson2 = /* @__PURE__ */ map15(formatStructured, formatJson);
|
|
30005
|
+
var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
|
|
30006
|
+
let buffer3 = [];
|
|
30007
|
+
const flush2 = suspend(() => {
|
|
30008
|
+
if (buffer3.length === 0) {
|
|
30009
|
+
return void_3;
|
|
30010
|
+
}
|
|
30011
|
+
const arr = buffer3;
|
|
30012
|
+
buffer3 = [];
|
|
30013
|
+
return options.flush(arr);
|
|
30014
|
+
});
|
|
30015
|
+
return uninterruptibleMask((restore) => restore(sleep(options.window).pipe(andThen3(flush2), forever2)).pipe(forkDetach, flatMap3((fiber3) => scopeAddFinalizerExit(scope3, () => fiberInterrupt(fiber3))), andThen3(addFinalizer(() => flush2)), as2(loggerMake((options2) => {
|
|
30016
|
+
buffer3.push(self.log(options2));
|
|
30017
|
+
}))));
|
|
29823
30018
|
}));
|
|
29824
|
-
var
|
|
29825
|
-
|
|
29826
|
-
|
|
29827
|
-
|
|
30019
|
+
var consolePretty2 = consolePretty;
|
|
30020
|
+
var consolePrettyBrowser = prettyLoggerBrowser;
|
|
30021
|
+
var consolePrettyTty = prettyLoggerTty;
|
|
30022
|
+
var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
|
|
30023
|
+
var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
|
|
30024
|
+
var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
|
|
30025
|
+
var tracerLogger2 = tracerLogger;
|
|
30026
|
+
var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
|
|
30027
|
+
const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber3.getRef(CurrentLoggers) : []);
|
|
30028
|
+
for (const logger of loggers) {
|
|
30029
|
+
currentLoggers.add(isEffect(logger) ? yield* logger : logger);
|
|
29828
30030
|
}
|
|
29829
|
-
return
|
|
30031
|
+
return currentLoggers;
|
|
30032
|
+
})));
|
|
30033
|
+
var toFile = /* @__PURE__ */ dual((args2) => isLogger(args2[0]), (self, path, options) => gen3(function* () {
|
|
30034
|
+
const fs = yield* FileSystem;
|
|
30035
|
+
const logFile = yield* fs.open(path, {
|
|
30036
|
+
flag: "a+",
|
|
30037
|
+
...options
|
|
30038
|
+
});
|
|
30039
|
+
const encoder2 = new TextEncoder();
|
|
30040
|
+
return yield* batched(self, {
|
|
30041
|
+
window: options?.batchWindow ?? 1e3,
|
|
30042
|
+
flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
|
|
30043
|
+
});
|
|
29830
30044
|
}));
|
|
29831
|
-
|
|
30045
|
+
|
|
30046
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ManagedRuntime.js
|
|
30047
|
+
var ManagedRuntime_exports = {};
|
|
30048
|
+
__export(ManagedRuntime_exports, {
|
|
30049
|
+
isManagedRuntime: () => isManagedRuntime,
|
|
30050
|
+
make: () => make43
|
|
30051
|
+
});
|
|
30052
|
+
var TypeId47 = "~effect/ManagedRuntime";
|
|
30053
|
+
var isManagedRuntime = (input) => hasProperty(input, TypeId47);
|
|
30054
|
+
var make43 = (layer2, options) => {
|
|
30055
|
+
const memoMap = options?.memoMap ?? makeMemoMapUnsafe();
|
|
30056
|
+
const scope3 = makeUnsafe3("parallel");
|
|
30057
|
+
const layerScope = forkUnsafe2(scope3, "sequential");
|
|
30058
|
+
const defaultRunOptions = {
|
|
30059
|
+
onFiberStart: runIn(scope3)
|
|
30060
|
+
};
|
|
30061
|
+
const mergeRunOptions = (options2) => options2 ? {
|
|
30062
|
+
...options2,
|
|
30063
|
+
onFiberStart: options2.onFiberStart ? (fiber3) => {
|
|
30064
|
+
defaultRunOptions.onFiberStart(fiber3);
|
|
30065
|
+
options2.onFiberStart(fiber3);
|
|
30066
|
+
} : defaultRunOptions.onFiberStart
|
|
30067
|
+
} : defaultRunOptions;
|
|
30068
|
+
let buildFiber;
|
|
30069
|
+
const contextEffect = withFiber2((fiber3) => {
|
|
30070
|
+
if (!buildFiber) {
|
|
30071
|
+
buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
|
|
30072
|
+
self.cachedContext = context3;
|
|
30073
|
+
})), {
|
|
30074
|
+
...defaultRunOptions,
|
|
30075
|
+
scheduler: fiber3.cache.scheduler
|
|
30076
|
+
});
|
|
30077
|
+
}
|
|
30078
|
+
return flatten5(await_(buildFiber));
|
|
30079
|
+
});
|
|
30080
|
+
const self = {
|
|
30081
|
+
[TypeId47]: TypeId47,
|
|
30082
|
+
memoMap,
|
|
30083
|
+
scope: scope3,
|
|
30084
|
+
contextEffect,
|
|
30085
|
+
cachedContext: void 0,
|
|
30086
|
+
context() {
|
|
30087
|
+
return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
|
|
30088
|
+
},
|
|
30089
|
+
dispose() {
|
|
30090
|
+
return runPromise2(self.disposeEffect);
|
|
30091
|
+
},
|
|
30092
|
+
[Symbol.asyncDispose]() {
|
|
30093
|
+
return self.dispose();
|
|
30094
|
+
},
|
|
30095
|
+
disposeEffect: suspend3(() => {
|
|
30096
|
+
;
|
|
30097
|
+
self.contextEffect = die5("ManagedRuntime disposed");
|
|
30098
|
+
self.cachedContext = void 0;
|
|
30099
|
+
return close(self.scope, void_4);
|
|
30100
|
+
}),
|
|
30101
|
+
runFork(effect2, options2) {
|
|
30102
|
+
return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
30103
|
+
},
|
|
30104
|
+
runCallback(effect2, options2) {
|
|
30105
|
+
return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
30106
|
+
},
|
|
30107
|
+
runSyncExit(effect2) {
|
|
30108
|
+
return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
|
|
30109
|
+
},
|
|
30110
|
+
runSync(effect2) {
|
|
30111
|
+
return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
|
|
30112
|
+
},
|
|
30113
|
+
runPromiseExit(effect2, options2) {
|
|
30114
|
+
return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
30115
|
+
},
|
|
30116
|
+
runPromise(effect2, options2) {
|
|
30117
|
+
return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
30118
|
+
}
|
|
30119
|
+
};
|
|
30120
|
+
return self;
|
|
30121
|
+
};
|
|
30122
|
+
function provide7(managed, effect2) {
|
|
30123
|
+
return flatMap5(managed.contextEffect, (context3) => provideContext2(effect2, context3));
|
|
30124
|
+
}
|
|
29832
30125
|
|
|
29833
30126
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/UndefinedOr.js
|
|
29834
30127
|
var map16 = /* @__PURE__ */ dual(2, (self, f) => self === void 0 ? void 0 : f(self));
|
|
@@ -29876,6 +30169,7 @@ export {
|
|
|
29876
30169
|
hasProperty,
|
|
29877
30170
|
isIterable,
|
|
29878
30171
|
or,
|
|
30172
|
+
Predicate_exports,
|
|
29879
30173
|
symbol,
|
|
29880
30174
|
hash,
|
|
29881
30175
|
combine,
|
|
@@ -29892,7 +30186,7 @@ export {
|
|
|
29892
30186
|
getStackTraceLimit,
|
|
29893
30187
|
PipeInspectableProto,
|
|
29894
30188
|
none2 as none,
|
|
29895
|
-
|
|
30189
|
+
some3 as some,
|
|
29896
30190
|
isOption2 as isOption,
|
|
29897
30191
|
isNone2 as isNone,
|
|
29898
30192
|
isSome2 as isSome,
|
|
@@ -30139,6 +30433,7 @@ export {
|
|
|
30139
30433
|
getLastEncoding,
|
|
30140
30434
|
toEncoded,
|
|
30141
30435
|
resolveAt2 as resolveAt,
|
|
30436
|
+
SchemaAST_exports,
|
|
30142
30437
|
empty13 as empty3,
|
|
30143
30438
|
get6 as get2,
|
|
30144
30439
|
set7 as set,
|
|
@@ -30225,7 +30520,7 @@ export {
|
|
|
30225
30520
|
String6 as String,
|
|
30226
30521
|
Boolean3 as Boolean,
|
|
30227
30522
|
Void2 as Void,
|
|
30228
|
-
Struct,
|
|
30523
|
+
Struct2 as Struct,
|
|
30229
30524
|
Record,
|
|
30230
30525
|
StructWithRest,
|
|
30231
30526
|
ArraySchema,
|
|
@@ -30303,10 +30598,10 @@ export {
|
|
|
30303
30598
|
FileSystem,
|
|
30304
30599
|
Path,
|
|
30305
30600
|
map14 as map5,
|
|
30306
|
-
|
|
30601
|
+
orElse5 as orElse,
|
|
30307
30602
|
all5 as all,
|
|
30308
30603
|
withDefault2,
|
|
30309
|
-
|
|
30604
|
+
option5 as option,
|
|
30310
30605
|
schema,
|
|
30311
30606
|
String7 as String2,
|
|
30312
30607
|
Int2,
|
|
@@ -30316,13 +30611,13 @@ export {
|
|
|
30316
30611
|
Boolean4 as Boolean2,
|
|
30317
30612
|
URL3 as URL,
|
|
30318
30613
|
ignore5 as ignore2,
|
|
30319
|
-
|
|
30614
|
+
make41 as make7,
|
|
30320
30615
|
run3 as run2,
|
|
30321
30616
|
runtime,
|
|
30322
30617
|
awaitEmpty,
|
|
30323
30618
|
FiberSet_exports,
|
|
30324
|
-
|
|
30325
|
-
|
|
30619
|
+
symbol5 as symbol3,
|
|
30620
|
+
make42 as make8,
|
|
30326
30621
|
layer,
|
|
30327
30622
|
Logger_exports,
|
|
30328
30623
|
ManagedRuntime_exports,
|