apps 0.0.1-beta.26 → 0.0.1-beta.27
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 +6 -6
- package/framework-reference.json +1 -1
- package/js/{chunk-BTRBOOTD.js → chunk-3TEX4ZND.js} +23 -17
- package/js/{chunk-OI7OI2U3.js → chunk-4OD7PHQL.js} +2 -2
- package/js/{chunk-AAAMPT6F.js → chunk-65SZ23BK.js} +2 -2
- package/js/{chunk-XBG3M64K.js → chunk-6JBTHTI5.js} +1 -1
- package/js/{chunk-EXDR4HVM.js → chunk-7AZNPMQH.js} +53 -11
- package/js/{chunk-VGEPL4BV.js → chunk-7R5JY5H7.js} +19 -5
- package/js/{chunk-4CMJD7AB.js → chunk-AHI26TO6.js} +24 -8
- package/js/{chunk-OBXHLFGQ.js → chunk-B5YJQU45.js} +1 -1
- package/js/{chunk-T7WRQJUF.js → chunk-BRGF7VFN.js} +2 -2
- package/js/{chunk-HQKIPKM5.js → chunk-BTJMXW4I.js} +1 -1
- package/js/{chunk-HIYRKEWP.js → chunk-HIJW4LWC.js} +64 -21
- package/js/{chunk-DAIW2WM3.js → chunk-KQCMHI3K.js} +3 -3
- package/js/{chunk-GH6PY5BQ.js → chunk-M2KEEOIQ.js} +1 -1
- package/js/{chunk-TACLXEAE.js → chunk-NSBRV4FJ.js} +1 -1
- package/js/{chunk-DM5U7G7V.js → chunk-NXTXZ635.js} +1842 -1840
- package/js/{chunk-3YN4UDPB.js → chunk-PTUZSCEV.js} +2 -2
- package/js/{chunk-KKGRSXUK.js → chunk-PWF2DRJ3.js} +1 -1
- package/js/{chunk-2TP7C25K.js → chunk-SDLIDQXG.js} +3 -3
- package/js/{chunk-NXO2GN2T.js → chunk-T2UFJKZR.js} +8 -8
- package/js/{chunk-PC5RHPUP.js → chunk-TSLG2WPA.js} +2 -2
- package/js/{chunk-WPKXOTKM.js → chunk-TX2XCAL6.js} +3 -3
- package/js/{chunk-KNJAOYV4.js → chunk-V2I3MMPM.js} +2 -2
- package/js/{chunk-ZVMZWXVF.js → chunk-VUVBMNKC.js} +2 -2
- package/js/{chunk-SUY33XAY.js → chunk-WQ5MVBTP.js} +1 -1
- package/js/{chunk-LPN4ONWW.js → chunk-XBQTJP76.js} +2 -2
- package/js/{chunk-IE6W5RNN.js → chunk-YML53Z7H.js} +2 -2
- package/js/{chunk-DUEZ2XCO.js → chunk-YXKXKGN6.js} +3 -3
- package/js/{chunk-XIRAIB3P.js → chunk-ZZOCEUTB.js} +4 -4
- package/js/client.js +10 -10
- package/js/contracts.js +7 -7
- package/js/effect.js +19 -19
- package/js/graphql.js +21 -21
- package/js/host.js +19 -19
- package/js/index.js +12 -12
- package/js/mcp/effect.js +23 -21
- package/js/mcp/stdio.js +21 -21
- package/js/mcp.js +29 -24
- package/js/openapi.js +15 -15
- package/js/react.js +3 -3
- package/js/skills/effect.js +3 -3
- package/js/skills.js +11 -11
- 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 +4 -4
- package/js/ui/serving.js +8 -8
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/contracts/mcp.d.ts +49 -3
- package/types/apps/src/contracts/provider.d.ts +6 -0
- package/types/apps/src/implementation/failure-detail.d.ts +3 -2
- package/types/apps/src/implementation/mcp-client.d.ts +1 -0
- package/types/apps/src/implementation/mcp.d.ts +11 -1
- package/types/apps/src/mcp.d.ts +20 -1
|
@@ -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: () => some3,
|
|
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,80 +210,7 @@ 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
|
|
263
|
-
var Predicate_exports = {};
|
|
264
|
-
__export(Predicate_exports, {
|
|
265
|
-
Struct: () => Struct,
|
|
266
|
-
Tuple: () => Tuple,
|
|
267
|
-
and: () => and,
|
|
268
|
-
compose: () => compose,
|
|
269
|
-
eqv: () => eqv,
|
|
270
|
-
every: () => every,
|
|
271
|
-
hasProperty: () => hasProperty,
|
|
272
|
-
implies: () => implies,
|
|
273
|
-
isBigInt: () => isBigInt,
|
|
274
|
-
isBoolean: () => isBoolean,
|
|
275
|
-
isDate: () => isDate,
|
|
276
|
-
isError: () => isError,
|
|
277
|
-
isFunction: () => isFunction,
|
|
278
|
-
isIterable: () => isIterable,
|
|
279
|
-
isMap: () => isMap,
|
|
280
|
-
isNever: () => isNever,
|
|
281
|
-
isNotNull: () => isNotNull,
|
|
282
|
-
isNotNullish: () => isNotNullish,
|
|
283
|
-
isNotUndefined: () => isNotUndefined,
|
|
284
|
-
isNull: () => isNull,
|
|
285
|
-
isNullish: () => isNullish,
|
|
286
|
-
isNumber: () => isNumber,
|
|
287
|
-
isObject: () => isObject,
|
|
288
|
-
isObjectKeyword: () => isObjectKeyword,
|
|
289
|
-
isObjectOrArray: () => isObjectOrArray,
|
|
290
|
-
isPromise: () => isPromise,
|
|
291
|
-
isPromiseLike: () => isPromiseLike,
|
|
292
|
-
isPropertyKey: () => isPropertyKey,
|
|
293
|
-
isReadonlyObject: () => isReadonlyObject,
|
|
294
|
-
isRegExp: () => isRegExp,
|
|
295
|
-
isSet: () => isSet,
|
|
296
|
-
isString: () => isString,
|
|
297
|
-
isSymbol: () => isSymbol,
|
|
298
|
-
isTagged: () => isTagged,
|
|
299
|
-
isTruthy: () => isTruthy,
|
|
300
|
-
isTupleOf: () => isTupleOf,
|
|
301
|
-
isTupleOfAtLeast: () => isTupleOfAtLeast,
|
|
302
|
-
isUint8Array: () => isUint8Array,
|
|
303
|
-
isUndefined: () => isUndefined,
|
|
304
|
-
isUnknown: () => isUnknown,
|
|
305
|
-
mapInput: () => mapInput,
|
|
306
|
-
nand: () => nand,
|
|
307
|
-
nor: () => nor,
|
|
308
|
-
not: () => not,
|
|
309
|
-
or: () => or,
|
|
310
|
-
some: () => some,
|
|
311
|
-
xor: () => xor
|
|
312
|
-
});
|
|
313
214
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => (b) => self(f(b)));
|
|
314
215
|
var isTupleOf = /* @__PURE__ */ dual(2, (self, n) => self.length === n);
|
|
315
216
|
var isTupleOfAtLeast = /* @__PURE__ */ dual(2, (self, n) => self.length >= n);
|
|
@@ -455,63 +356,164 @@ function some(collection) {
|
|
|
455
356
|
};
|
|
456
357
|
}
|
|
457
358
|
|
|
458
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
459
|
-
var
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
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();
|
|
459
|
+
|
|
460
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Hash.js
|
|
461
|
+
var symbol = "~effect/Hash";
|
|
462
|
+
var hash = (self) => {
|
|
463
|
+
switch (typeof self) {
|
|
464
|
+
case "number":
|
|
465
|
+
return number(self);
|
|
466
|
+
case "bigint":
|
|
467
|
+
return string(self.toString(10));
|
|
468
|
+
case "string":
|
|
469
|
+
return string(self);
|
|
470
|
+
case "undefined":
|
|
471
|
+
return string("undefined");
|
|
472
|
+
case "function":
|
|
473
|
+
case "object": {
|
|
474
|
+
if (self === null) {
|
|
475
|
+
return string("null");
|
|
476
|
+
} else if (self instanceof Date) {
|
|
477
|
+
if (Number.isNaN(self.getTime())) {
|
|
478
|
+
return string("Invalid Date");
|
|
479
|
+
}
|
|
480
|
+
return string(self.toISOString());
|
|
481
|
+
} else if (self instanceof RegExp) {
|
|
482
|
+
return string(self.toString());
|
|
483
|
+
} else {
|
|
484
|
+
if (byReferenceInstances.has(self)) {
|
|
485
|
+
return random(self);
|
|
486
|
+
}
|
|
487
|
+
if (hashCache.has(self)) {
|
|
488
|
+
return hashCache.get(self);
|
|
489
|
+
}
|
|
490
|
+
const h = withVisitedTracking(self, () => {
|
|
491
|
+
if (isHash(self)) {
|
|
492
|
+
return self[symbol]();
|
|
493
|
+
} else if (typeof self === "function") {
|
|
494
|
+
return random(self);
|
|
495
|
+
} else if (self instanceof DataView) {
|
|
496
|
+
return array(new Uint8Array(self.buffer, self.byteOffset, self.byteLength));
|
|
497
|
+
} else if (Array.isArray(self) || ArrayBuffer.isView(self)) {
|
|
498
|
+
return array(self);
|
|
499
|
+
} else if (self instanceof Map) {
|
|
500
|
+
return hashMap(self);
|
|
501
|
+
} else if (self instanceof Set) {
|
|
502
|
+
return hashSet(self);
|
|
503
|
+
}
|
|
504
|
+
return structure(self);
|
|
505
|
+
});
|
|
506
|
+
hashCache.set(self, h);
|
|
507
|
+
return h;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
default:
|
|
511
|
+
return string(String(self));
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
var random = (self) => {
|
|
515
|
+
if (!randomHashCache.has(self)) {
|
|
516
|
+
randomHashCache.set(self, number(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)));
|
|
515
517
|
}
|
|
516
518
|
return randomHashCache.get(self);
|
|
517
519
|
};
|
|
@@ -6701,6 +6703,21 @@ var doneUnsafe = (self, effect2) => {
|
|
|
6701
6703
|
};
|
|
6702
6704
|
var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap3(exit(restore(self)), (exit3) => done2(deferred, exit3))));
|
|
6703
6705
|
|
|
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
|
+
|
|
6704
6721
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Effect.js
|
|
6705
6722
|
var Effect_exports = {};
|
|
6706
6723
|
__export(Effect_exports, {
|
|
@@ -7493,21 +7510,6 @@ __export(Cron_exports, {
|
|
|
7493
7510
|
sequence: () => sequence
|
|
7494
7511
|
});
|
|
7495
7512
|
|
|
7496
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Clock.js
|
|
7497
|
-
var Clock_exports = {};
|
|
7498
|
-
__export(Clock_exports, {
|
|
7499
|
-
Clock: () => Clock,
|
|
7500
|
-
clockWith: () => clockWith2,
|
|
7501
|
-
currentTimeMillis: () => currentTimeMillis2,
|
|
7502
|
-
currentTimeNanos: () => currentTimeNanos2,
|
|
7503
|
-
monotonicTimeNanos: () => monotonicTimeNanos2
|
|
7504
|
-
});
|
|
7505
|
-
var Clock = ClockRef;
|
|
7506
|
-
var clockWith2 = clockWith;
|
|
7507
|
-
var currentTimeMillis2 = currentTimeMillis;
|
|
7508
|
-
var currentTimeNanos2 = currentTimeNanos;
|
|
7509
|
-
var monotonicTimeNanos2 = monotonicTimeNanos;
|
|
7510
|
-
|
|
7511
7513
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/dateTime.js
|
|
7512
7514
|
var TypeId9 = "~effect/DateTime";
|
|
7513
7515
|
var TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
@@ -28236,1736 +28238,1736 @@ var toPubSubTake2 = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake(self
|
|
|
28236
28238
|
var toQueue = /* @__PURE__ */ dual(2, (self, options) => toQueueArray(self.channel, options));
|
|
28237
28239
|
var runIntoQueue = /* @__PURE__ */ dual(2, (self, queue) => runIntoQueueArray(self.channel, queue));
|
|
28238
28240
|
|
|
28239
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
28240
|
-
var
|
|
28241
|
-
__export(
|
|
28242
|
-
|
|
28243
|
-
|
|
28244
|
-
|
|
28245
|
-
|
|
28246
|
-
|
|
28247
|
-
|
|
28248
|
-
|
|
28249
|
-
|
|
28250
|
-
|
|
28251
|
-
|
|
28252
|
-
|
|
28253
|
-
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
|
|
28241
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
|
|
28242
|
+
var Match_exports = {};
|
|
28243
|
+
__export(Match_exports, {
|
|
28244
|
+
any: () => any3,
|
|
28245
|
+
bigint: () => bigint,
|
|
28246
|
+
boolean: () => boolean2,
|
|
28247
|
+
date: () => date,
|
|
28248
|
+
defined: () => defined2,
|
|
28249
|
+
discriminator: () => discriminator2,
|
|
28250
|
+
discriminatorStartsWith: () => discriminatorStartsWith2,
|
|
28251
|
+
discriminators: () => discriminators2,
|
|
28252
|
+
discriminatorsExhaustive: () => discriminatorsExhaustive2,
|
|
28253
|
+
exhaustive: () => exhaustive2,
|
|
28254
|
+
fn: () => fn4,
|
|
28255
|
+
instanceOf: () => instanceOf3,
|
|
28256
|
+
instanceOfUnsafe: () => instanceOfUnsafe,
|
|
28257
|
+
is: () => is4,
|
|
28258
|
+
nonEmptyString: () => nonEmptyString2,
|
|
28259
|
+
not: () => not3,
|
|
28260
|
+
null: () => _null,
|
|
28261
|
+
number: () => number3,
|
|
28262
|
+
option: () => option4,
|
|
28263
|
+
orElse: () => orElse4,
|
|
28264
|
+
orElseAbsurd: () => orElseAbsurd2,
|
|
28265
|
+
record: () => record2,
|
|
28266
|
+
result: () => result5,
|
|
28267
|
+
string: () => string3,
|
|
28268
|
+
symbol: () => symbol4,
|
|
28269
|
+
tag: () => tag3,
|
|
28270
|
+
tagStartsWith: () => tagStartsWith2,
|
|
28271
|
+
tags: () => tags2,
|
|
28272
|
+
tagsExhaustive: () => tagsExhaustive2,
|
|
28273
|
+
type: () => type2,
|
|
28274
|
+
typeTags: () => typeTags2,
|
|
28275
|
+
undefined: () => _undefined,
|
|
28276
|
+
value: () => value5,
|
|
28277
|
+
valueTags: () => valueTags2,
|
|
28278
|
+
when: () => when5,
|
|
28279
|
+
whenAnd: () => whenAnd2,
|
|
28280
|
+
whenOr: () => whenOr2,
|
|
28281
|
+
withReturnType: () => withReturnType2
|
|
28257
28282
|
});
|
|
28258
|
-
|
|
28259
|
-
|
|
28283
|
+
|
|
28284
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/matcher.js
|
|
28285
|
+
var TypeId40 = "~effect/Match/Matcher";
|
|
28286
|
+
var TypeMatcherProto = {
|
|
28260
28287
|
[TypeId40]: {
|
|
28261
|
-
|
|
28288
|
+
_input: identity,
|
|
28289
|
+
_filters: identity,
|
|
28290
|
+
_remaining: identity,
|
|
28291
|
+
_result: identity,
|
|
28292
|
+
_return: identity,
|
|
28293
|
+
_args: identity
|
|
28262
28294
|
},
|
|
28263
|
-
|
|
28264
|
-
|
|
28265
|
-
return
|
|
28266
|
-
|
|
28267
|
-
|
|
28268
|
-
|
|
28269
|
-
}
|
|
28270
|
-
};
|
|
28271
|
-
var makeUnsafe10 = (value6) => {
|
|
28272
|
-
const self = Object.create(RefProto);
|
|
28273
|
-
self.ref = make30(value6);
|
|
28274
|
-
return self;
|
|
28275
|
-
};
|
|
28276
|
-
var make38 = (value6) => sync4(() => makeUnsafe10(value6));
|
|
28277
|
-
var get10 = (self) => sync4(() => self.ref.current);
|
|
28278
|
-
var set8 = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => set6(self.ref, value6)));
|
|
28279
|
-
var getAndSet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => {
|
|
28280
|
-
const current = self.ref.current;
|
|
28281
|
-
self.ref.current = value6;
|
|
28282
|
-
return current;
|
|
28283
|
-
}));
|
|
28284
|
-
var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28285
|
-
const current = self.ref.current;
|
|
28286
|
-
self.ref.current = f(current);
|
|
28287
|
-
return current;
|
|
28288
|
-
}));
|
|
28289
|
-
var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28290
|
-
const current = self.ref.current;
|
|
28291
|
-
const option6 = pf(current);
|
|
28292
|
-
if (option6._tag === "Some") {
|
|
28293
|
-
self.ref.current = option6.value;
|
|
28294
|
-
}
|
|
28295
|
-
return current;
|
|
28296
|
-
}));
|
|
28297
|
-
var setAndGet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => self.ref.current = value6));
|
|
28298
|
-
var modify4 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28299
|
-
const [b, a] = f(self.ref.current);
|
|
28300
|
-
self.ref.current = a;
|
|
28301
|
-
return b;
|
|
28302
|
-
}));
|
|
28303
|
-
var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
|
|
28304
|
-
const [b, option6] = pf(value6);
|
|
28305
|
-
return [b, option6._tag === "None" ? value6 : option6.value];
|
|
28306
|
-
}));
|
|
28307
|
-
var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28308
|
-
self.ref.current = f(self.ref.current);
|
|
28309
|
-
}));
|
|
28310
|
-
var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
|
|
28311
|
-
var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28312
|
-
const option6 = f(self.ref.current);
|
|
28313
|
-
if (option6._tag === "Some") {
|
|
28314
|
-
self.ref.current = option6.value;
|
|
28315
|
-
}
|
|
28316
|
-
}));
|
|
28317
|
-
var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28318
|
-
const option6 = pf(self.ref.current);
|
|
28319
|
-
if (option6._tag === "Some") {
|
|
28320
|
-
self.ref.current = option6.value;
|
|
28321
|
-
}
|
|
28322
|
-
return self.ref.current;
|
|
28323
|
-
}));
|
|
28324
|
-
var getUnsafe5 = (self) => self.ref.current;
|
|
28325
|
-
|
|
28326
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ChannelSchema.js
|
|
28327
|
-
var decode2 = (schema2, options) => () => {
|
|
28328
|
-
const decode3 = decodeEffect2(NonEmptyArray(schema2), options);
|
|
28329
|
-
return fromTransform((upstream, _scope) => succeed7(flatMap5(upstream, (chunk) => decode3(chunk))));
|
|
28330
|
-
};
|
|
28331
|
-
|
|
28332
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PlatformError.js
|
|
28333
|
-
var TypeId41 = "~effect/PlatformError";
|
|
28334
|
-
var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
|
|
28335
|
-
/**
|
|
28336
|
-
* Formats the module, method, and optional description that rejected the argument.
|
|
28337
|
-
*
|
|
28338
|
-
* **When to use**
|
|
28339
|
-
*
|
|
28340
|
-
* Use to read the formatted error message for a rejected platform argument.
|
|
28341
|
-
*
|
|
28342
|
-
* @since 4.0.0
|
|
28343
|
-
*/
|
|
28344
|
-
get message() {
|
|
28345
|
-
return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
|
|
28295
|
+
_tag: "TypeMatcher",
|
|
28296
|
+
add(_case) {
|
|
28297
|
+
return makeTypeMatcher(this.select, [...this.cases, _case]);
|
|
28298
|
+
},
|
|
28299
|
+
pipe() {
|
|
28300
|
+
return pipeArguments(this, arguments);
|
|
28346
28301
|
}
|
|
28347
28302
|
};
|
|
28348
|
-
|
|
28349
|
-
|
|
28350
|
-
|
|
28351
|
-
|
|
28352
|
-
|
|
28353
|
-
|
|
28354
|
-
|
|
28355
|
-
|
|
28356
|
-
|
|
28357
|
-
|
|
28358
|
-
|
|
28303
|
+
function makeTypeMatcher(select, cases) {
|
|
28304
|
+
const matcher = Object.create(TypeMatcherProto);
|
|
28305
|
+
matcher.select = select;
|
|
28306
|
+
matcher.cases = cases;
|
|
28307
|
+
return matcher;
|
|
28308
|
+
}
|
|
28309
|
+
var ValueMatcherProto = {
|
|
28310
|
+
[TypeId40]: {
|
|
28311
|
+
_input: identity,
|
|
28312
|
+
_filters: identity,
|
|
28313
|
+
_result: identity,
|
|
28314
|
+
_return: identity,
|
|
28315
|
+
_flavor: identity
|
|
28316
|
+
},
|
|
28317
|
+
_tag: "ValueMatcher",
|
|
28318
|
+
add(_case) {
|
|
28319
|
+
if (isSuccess2(this.value)) {
|
|
28320
|
+
return this;
|
|
28359
28321
|
}
|
|
28360
|
-
|
|
28361
|
-
|
|
28362
|
-
|
|
28363
|
-
|
|
28364
|
-
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28368
|
-
|
|
28369
|
-
*/
|
|
28370
|
-
[TypeId41] = TypeId41;
|
|
28371
|
-
get message() {
|
|
28372
|
-
return this.reason.message;
|
|
28322
|
+
if (_case._tag === "When" && _case.guard(this.provided) === true) {
|
|
28323
|
+
return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
|
|
28324
|
+
} else if (_case._tag === "Not" && _case.guard(this.provided) === false) {
|
|
28325
|
+
return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
|
|
28326
|
+
}
|
|
28327
|
+
return this;
|
|
28328
|
+
},
|
|
28329
|
+
pipe() {
|
|
28330
|
+
return pipeArguments(this, arguments);
|
|
28373
28331
|
}
|
|
28374
28332
|
};
|
|
28375
|
-
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
var
|
|
28382
|
-
|
|
28383
|
-
|
|
28384
|
-
|
|
28385
|
-
|
|
28386
|
-
|
|
28387
|
-
|
|
28388
|
-
|
|
28389
|
-
|
|
28390
|
-
|
|
28391
|
-
|
|
28392
|
-
|
|
28393
|
-
|
|
28394
|
-
|
|
28395
|
-
|
|
28396
|
-
|
|
28397
|
-
|
|
28398
|
-
if (
|
|
28399
|
-
|
|
28400
|
-
|
|
28401
|
-
|
|
28402
|
-
|
|
28403
|
-
|
|
28404
|
-
if (lastSlashIndex === -1) {
|
|
28405
|
-
res = "";
|
|
28406
|
-
lastSegmentLength = 0;
|
|
28407
|
-
} else {
|
|
28408
|
-
res = res.slice(0, lastSlashIndex);
|
|
28409
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
28410
|
-
}
|
|
28411
|
-
lastSlash = i;
|
|
28412
|
-
dots = 0;
|
|
28413
|
-
continue;
|
|
28414
|
-
}
|
|
28415
|
-
} else if (res.length === 2 || res.length === 1) {
|
|
28416
|
-
res = "";
|
|
28417
|
-
lastSegmentLength = 0;
|
|
28418
|
-
lastSlash = i;
|
|
28419
|
-
dots = 0;
|
|
28420
|
-
continue;
|
|
28421
|
-
}
|
|
28422
|
-
}
|
|
28423
|
-
if (allowAboveRoot) {
|
|
28424
|
-
if (res.length > 0) {
|
|
28425
|
-
res += "/..";
|
|
28426
|
-
} else {
|
|
28427
|
-
res = "..";
|
|
28428
|
-
}
|
|
28429
|
-
lastSegmentLength = 2;
|
|
28333
|
+
function makeValueMatcher(provided, value6) {
|
|
28334
|
+
const matcher = Object.create(ValueMatcherProto);
|
|
28335
|
+
matcher.provided = provided;
|
|
28336
|
+
matcher.value = value6;
|
|
28337
|
+
return matcher;
|
|
28338
|
+
}
|
|
28339
|
+
var makeWhen = (guard, evaluate2) => ({
|
|
28340
|
+
_tag: "When",
|
|
28341
|
+
guard,
|
|
28342
|
+
evaluate: evaluate2
|
|
28343
|
+
});
|
|
28344
|
+
var makeNot = (guard, evaluate2) => ({
|
|
28345
|
+
_tag: "Not",
|
|
28346
|
+
guard,
|
|
28347
|
+
evaluate: evaluate2
|
|
28348
|
+
});
|
|
28349
|
+
var makePredicate = (pattern) => {
|
|
28350
|
+
if (typeof pattern === "function") {
|
|
28351
|
+
return pattern;
|
|
28352
|
+
} else if (Array.isArray(pattern)) {
|
|
28353
|
+
const predicates = pattern.map(makePredicate);
|
|
28354
|
+
const len = predicates.length;
|
|
28355
|
+
return (u) => {
|
|
28356
|
+
if (!Array.isArray(u)) {
|
|
28357
|
+
return false;
|
|
28358
|
+
}
|
|
28359
|
+
for (let i = 0; i < len; i++) {
|
|
28360
|
+
if (predicates[i](u[i]) === false) {
|
|
28361
|
+
return false;
|
|
28430
28362
|
}
|
|
28431
|
-
}
|
|
28432
|
-
|
|
28433
|
-
|
|
28434
|
-
|
|
28435
|
-
|
|
28363
|
+
}
|
|
28364
|
+
return true;
|
|
28365
|
+
};
|
|
28366
|
+
} else if (pattern !== null && typeof pattern === "object") {
|
|
28367
|
+
const keysAndPredicates = Reflect.ownKeys(pattern).map((key) => [key, makePredicate(pattern[key])]);
|
|
28368
|
+
const len = keysAndPredicates.length;
|
|
28369
|
+
return (u) => {
|
|
28370
|
+
if (typeof u !== "object" || u === null) {
|
|
28371
|
+
return false;
|
|
28372
|
+
}
|
|
28373
|
+
for (let i = 0; i < len; i++) {
|
|
28374
|
+
const [key, predicate] = keysAndPredicates[i];
|
|
28375
|
+
if (!(key in u) || predicate(u[key]) === false) {
|
|
28376
|
+
return false;
|
|
28436
28377
|
}
|
|
28437
|
-
lastSegmentLength = i - lastSlash - 1;
|
|
28438
28378
|
}
|
|
28439
|
-
|
|
28440
|
-
|
|
28441
|
-
} else if (code === 46 && dots !== -1) {
|
|
28442
|
-
++dots;
|
|
28443
|
-
} else {
|
|
28444
|
-
dots = -1;
|
|
28445
|
-
}
|
|
28379
|
+
return true;
|
|
28380
|
+
};
|
|
28446
28381
|
}
|
|
28447
|
-
return
|
|
28448
|
-
}
|
|
28449
|
-
|
|
28450
|
-
const
|
|
28451
|
-
const
|
|
28452
|
-
|
|
28453
|
-
|
|
28454
|
-
|
|
28455
|
-
|
|
28456
|
-
return dir + base;
|
|
28457
|
-
}
|
|
28458
|
-
return dir + sep + base;
|
|
28459
|
-
}
|
|
28460
|
-
function fromFileUrl(url) {
|
|
28461
|
-
if (url.protocol !== "file:") {
|
|
28462
|
-
return fail7(new BadArgument({
|
|
28463
|
-
module: "Path",
|
|
28464
|
-
method: "fromFileUrl",
|
|
28465
|
-
description: "URL must be of scheme file"
|
|
28466
|
-
}));
|
|
28467
|
-
} else if (url.hostname !== "") {
|
|
28468
|
-
return fail7(new BadArgument({
|
|
28469
|
-
module: "Path",
|
|
28470
|
-
method: "fromFileUrl",
|
|
28471
|
-
description: "Invalid file URL host"
|
|
28472
|
-
}));
|
|
28473
|
-
}
|
|
28474
|
-
const pathname = url.pathname;
|
|
28475
|
-
for (let n = 0; n < pathname.length; n++) {
|
|
28476
|
-
if (pathname[n] === "%") {
|
|
28477
|
-
const third = pathname.codePointAt(n + 2) | 32;
|
|
28478
|
-
if (pathname[n + 1] === "2" && third === 102) {
|
|
28479
|
-
return fail7(new BadArgument({
|
|
28480
|
-
module: "Path",
|
|
28481
|
-
method: "fromFileUrl",
|
|
28482
|
-
description: "must not include encoded / characters"
|
|
28483
|
-
}));
|
|
28382
|
+
return (u) => u === pattern;
|
|
28383
|
+
};
|
|
28384
|
+
var makeOrPredicate = (patterns) => {
|
|
28385
|
+
const predicates = patterns.map(makePredicate);
|
|
28386
|
+
const len = predicates.length;
|
|
28387
|
+
return (u) => {
|
|
28388
|
+
for (let i = 0; i < len; i++) {
|
|
28389
|
+
if (predicates[i](u) === true) {
|
|
28390
|
+
return true;
|
|
28484
28391
|
}
|
|
28485
28392
|
}
|
|
28486
|
-
|
|
28487
|
-
|
|
28488
|
-
}
|
|
28489
|
-
var
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
|
|
28495
|
-
|
|
28496
|
-
path = arguments[i];
|
|
28497
|
-
} else {
|
|
28498
|
-
const process = globalThis.process;
|
|
28499
|
-
if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
|
|
28500
|
-
cwd = process.cwd();
|
|
28393
|
+
return false;
|
|
28394
|
+
};
|
|
28395
|
+
};
|
|
28396
|
+
var makeAndPredicate = (patterns) => {
|
|
28397
|
+
const predicates = patterns.map(makePredicate);
|
|
28398
|
+
const len = predicates.length;
|
|
28399
|
+
return (u) => {
|
|
28400
|
+
for (let i = 0; i < len; i++) {
|
|
28401
|
+
if (predicates[i](u) === false) {
|
|
28402
|
+
return false;
|
|
28501
28403
|
}
|
|
28502
|
-
path = cwd;
|
|
28503
|
-
}
|
|
28504
|
-
if (path.length === 0) {
|
|
28505
|
-
continue;
|
|
28506
28404
|
}
|
|
28507
|
-
|
|
28508
|
-
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
28512
|
-
|
|
28513
|
-
|
|
28514
|
-
|
|
28515
|
-
|
|
28405
|
+
return true;
|
|
28406
|
+
};
|
|
28407
|
+
};
|
|
28408
|
+
var type = () => makeTypeMatcher(identity, []);
|
|
28409
|
+
var fn3 = (select) => makeTypeMatcher(select, []);
|
|
28410
|
+
var value4 = (i) => makeValueMatcher(i, fail2(i));
|
|
28411
|
+
var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
|
|
28412
|
+
const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
28413
|
+
return match10(input);
|
|
28414
|
+
});
|
|
28415
|
+
var typeTags = () => (fields) => {
|
|
28416
|
+
const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
|
|
28417
|
+
return (input) => match10(input);
|
|
28418
|
+
};
|
|
28419
|
+
var withReturnType = () => (self) => self;
|
|
28420
|
+
var when4 = (pattern, f) => (self) => self.add(makeWhen(makePredicate(pattern), f));
|
|
28421
|
+
var whenOr = (...args2) => (self) => {
|
|
28422
|
+
const onMatch = args2[args2.length - 1];
|
|
28423
|
+
const patterns = args2.slice(0, -1);
|
|
28424
|
+
return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
|
|
28425
|
+
};
|
|
28426
|
+
var whenAnd = (...args2) => (self) => {
|
|
28427
|
+
const onMatch = args2[args2.length - 1];
|
|
28428
|
+
const patterns = args2.slice(0, -1);
|
|
28429
|
+
return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
|
|
28430
|
+
};
|
|
28431
|
+
var discriminator = (field) => (...pattern) => {
|
|
28432
|
+
const f = pattern[pattern.length - 1];
|
|
28433
|
+
const values2 = pattern.slice(0, -1);
|
|
28434
|
+
const pred = values2.length === 1 ? (_) => _ != null && _[field] === values2[0] : (_) => _ != null && values2.includes(_[field]);
|
|
28435
|
+
return (self) => self.add(makeWhen(pred, f));
|
|
28436
|
+
};
|
|
28437
|
+
var discriminatorStartsWith = (field) => (pattern, f) => {
|
|
28438
|
+
const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
|
|
28439
|
+
return (self) => self.add(makeWhen(pred, f));
|
|
28440
|
+
};
|
|
28441
|
+
var discriminators = (field) => (fields) => {
|
|
28442
|
+
const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
|
|
28443
|
+
return (self) => self.add(predicate);
|
|
28444
|
+
};
|
|
28445
|
+
var discriminatorsExhaustive = (field) => (fields) => {
|
|
28446
|
+
const addCases = discriminators(field)(fields);
|
|
28447
|
+
return (matcher) => exhaustive(addCases(matcher));
|
|
28448
|
+
};
|
|
28449
|
+
var tag2 = /* @__PURE__ */ discriminator("_tag");
|
|
28450
|
+
var tagStartsWith = /* @__PURE__ */ discriminatorStartsWith("_tag");
|
|
28451
|
+
var tags = /* @__PURE__ */ discriminators("_tag");
|
|
28452
|
+
var tagsExhaustive = /* @__PURE__ */ discriminatorsExhaustive("_tag");
|
|
28453
|
+
var not2 = (pattern, f) => (self) => self.add(makeNot(makePredicate(pattern), f));
|
|
28454
|
+
var nonEmptyString = (u) => typeof u === "string" && u.length > 0;
|
|
28455
|
+
var is3 = (...literals) => {
|
|
28456
|
+
const len = literals.length;
|
|
28457
|
+
return (u) => {
|
|
28458
|
+
for (let i = 0; i < len; i++) {
|
|
28459
|
+
if (u === literals[i]) {
|
|
28460
|
+
return true;
|
|
28461
|
+
}
|
|
28516
28462
|
}
|
|
28517
|
-
|
|
28518
|
-
|
|
28519
|
-
} else {
|
|
28520
|
-
return ".";
|
|
28521
|
-
}
|
|
28463
|
+
return false;
|
|
28464
|
+
};
|
|
28522
28465
|
};
|
|
28523
|
-
var
|
|
28524
|
-
|
|
28525
|
-
|
|
28526
|
-
|
|
28527
|
-
const
|
|
28528
|
-
if (
|
|
28529
|
-
|
|
28530
|
-
}
|
|
28531
|
-
outURL.pathname = encodePathChars(resolved2);
|
|
28532
|
-
return succeed7(outURL);
|
|
28533
|
-
}
|
|
28534
|
-
var percentRegExp = /%/g;
|
|
28535
|
-
var backslashRegExp = /\\/g;
|
|
28536
|
-
var newlineRegExp = /\n/g;
|
|
28537
|
-
var carriageReturnRegExp = /\r/g;
|
|
28538
|
-
var tabRegExp = /\t/g;
|
|
28539
|
-
function encodePathChars(filepath) {
|
|
28540
|
-
if (filepath.includes("%")) {
|
|
28541
|
-
filepath = filepath.replace(percentRegExp, "%25");
|
|
28466
|
+
var any2 = () => true;
|
|
28467
|
+
var defined = (u) => u !== void 0 && u !== null;
|
|
28468
|
+
var instanceOf2 = (constructor) => (u) => u instanceof constructor;
|
|
28469
|
+
var orElse3 = (f) => (self) => {
|
|
28470
|
+
const toResult = result4(self);
|
|
28471
|
+
if (isResult2(toResult)) {
|
|
28472
|
+
return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
|
|
28542
28473
|
}
|
|
28543
|
-
|
|
28544
|
-
|
|
28474
|
+
return (...args2) => {
|
|
28475
|
+
const a = toResult(...args2);
|
|
28476
|
+
return isSuccess2(a) ? a.success : f(a.failure, ...args2);
|
|
28477
|
+
};
|
|
28478
|
+
};
|
|
28479
|
+
var orElseAbsurd = (self) => orElse3(() => {
|
|
28480
|
+
throw new Error("effect/Match/orElseAbsurd: absurd");
|
|
28481
|
+
})(self);
|
|
28482
|
+
var result4 = (self) => {
|
|
28483
|
+
if (self._tag === "ValueMatcher") {
|
|
28484
|
+
return self.value;
|
|
28545
28485
|
}
|
|
28546
|
-
|
|
28547
|
-
|
|
28486
|
+
const len = self.cases.length;
|
|
28487
|
+
if (len === 1) {
|
|
28488
|
+
const _case = self.cases[0];
|
|
28489
|
+
return (...args2) => {
|
|
28490
|
+
const input = self.select(...args2);
|
|
28491
|
+
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
28492
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28493
|
+
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
28494
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28495
|
+
}
|
|
28496
|
+
return fail2(input);
|
|
28497
|
+
};
|
|
28548
28498
|
}
|
|
28549
|
-
|
|
28550
|
-
|
|
28499
|
+
return (...args2) => {
|
|
28500
|
+
const input = self.select(...args2);
|
|
28501
|
+
for (let i = 0; i < len; i++) {
|
|
28502
|
+
const _case = self.cases[i];
|
|
28503
|
+
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
28504
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28505
|
+
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
28506
|
+
return succeed2(_case.evaluate(input, ...args2));
|
|
28507
|
+
}
|
|
28508
|
+
}
|
|
28509
|
+
return fail2(input);
|
|
28510
|
+
};
|
|
28511
|
+
};
|
|
28512
|
+
var option3 = (self) => {
|
|
28513
|
+
const toResult = result4(self);
|
|
28514
|
+
if (isResult2(toResult)) {
|
|
28515
|
+
return match2(toResult, {
|
|
28516
|
+
onFailure: () => none2(),
|
|
28517
|
+
onSuccess: some3
|
|
28518
|
+
});
|
|
28551
28519
|
}
|
|
28552
|
-
|
|
28553
|
-
|
|
28520
|
+
return (...args2) => match2(toResult(...args2), {
|
|
28521
|
+
onFailure: () => none2(),
|
|
28522
|
+
onSuccess: some3
|
|
28523
|
+
});
|
|
28524
|
+
};
|
|
28525
|
+
var getExhaustiveAbsurdErrorMessage = "effect/match/Match/exhaustive: absurd";
|
|
28526
|
+
var exhaustive = (self) => {
|
|
28527
|
+
const toResult = result4(self);
|
|
28528
|
+
if (isResult2(toResult)) {
|
|
28529
|
+
if (isSuccess2(toResult)) {
|
|
28530
|
+
return toResult.success;
|
|
28531
|
+
}
|
|
28532
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
28554
28533
|
}
|
|
28555
|
-
return
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
resolve: resolve2,
|
|
28560
|
-
normalize(path) {
|
|
28561
|
-
if (path.length === 0) return ".";
|
|
28562
|
-
const isAbsolute = path.charCodeAt(0) === 47;
|
|
28563
|
-
const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
|
28564
|
-
path = normalizeStringPosix(path, !isAbsolute);
|
|
28565
|
-
if (path.length === 0 && !isAbsolute) path = ".";
|
|
28566
|
-
if (path.length > 0 && trailingSeparator) path += "/";
|
|
28567
|
-
if (isAbsolute) return "/" + path;
|
|
28568
|
-
return path;
|
|
28569
|
-
},
|
|
28570
|
-
isAbsolute(path) {
|
|
28571
|
-
return path.length > 0 && path.charCodeAt(0) === 47;
|
|
28572
|
-
},
|
|
28573
|
-
join() {
|
|
28574
|
-
if (arguments.length === 0) {
|
|
28575
|
-
return ".";
|
|
28534
|
+
return (...args2) => {
|
|
28535
|
+
const result6 = toResult(...args2);
|
|
28536
|
+
if (isSuccess2(result6)) {
|
|
28537
|
+
return result6.success;
|
|
28576
28538
|
}
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
28593
|
-
|
|
28594
|
-
|
|
28595
|
-
|
|
28596
|
-
|
|
28597
|
-
|
|
28598
|
-
|
|
28599
|
-
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
|
|
28616
|
-
|
|
28617
|
-
|
|
28618
|
-
|
|
28619
|
-
|
|
28620
|
-
if (to.charCodeAt(toStart + i) === 47) {
|
|
28621
|
-
return to.slice(toStart + i + 1);
|
|
28622
|
-
} else if (i === 0) {
|
|
28623
|
-
return to.slice(toStart + i);
|
|
28624
|
-
}
|
|
28625
|
-
} else if (fromLen > length) {
|
|
28626
|
-
if (from.charCodeAt(fromStart + i) === 47) {
|
|
28627
|
-
lastCommonSep = i;
|
|
28628
|
-
} else if (i === 0) {
|
|
28629
|
-
lastCommonSep = 0;
|
|
28630
|
-
}
|
|
28631
|
-
}
|
|
28632
|
-
break;
|
|
28633
|
-
}
|
|
28634
|
-
const fromCode = from.charCodeAt(fromStart + i);
|
|
28635
|
-
const toCode = to.charCodeAt(toStart + i);
|
|
28636
|
-
if (fromCode !== toCode) {
|
|
28637
|
-
break;
|
|
28638
|
-
} else if (fromCode === 47) {
|
|
28639
|
-
lastCommonSep = i;
|
|
28640
|
-
}
|
|
28641
|
-
}
|
|
28642
|
-
let out = "";
|
|
28643
|
-
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
28644
|
-
if (i === fromEnd || from.charCodeAt(i) === 47) {
|
|
28645
|
-
if (out.length === 0) {
|
|
28646
|
-
out += "..";
|
|
28647
|
-
} else {
|
|
28648
|
-
out += "/..";
|
|
28649
|
-
}
|
|
28650
|
-
}
|
|
28651
|
-
}
|
|
28652
|
-
if (out.length > 0) {
|
|
28653
|
-
return out + to.slice(toStart + lastCommonSep);
|
|
28654
|
-
} else {
|
|
28655
|
-
toStart += lastCommonSep;
|
|
28656
|
-
if (to.charCodeAt(toStart) === 47) {
|
|
28657
|
-
++toStart;
|
|
28658
|
-
}
|
|
28659
|
-
return to.slice(toStart);
|
|
28660
|
-
}
|
|
28661
|
-
},
|
|
28662
|
-
dirname(path) {
|
|
28663
|
-
if (path.length === 0) return ".";
|
|
28664
|
-
let code = path.charCodeAt(0);
|
|
28665
|
-
const hasRoot = code === 47;
|
|
28666
|
-
let end3 = -1;
|
|
28667
|
-
let matchedSlash = true;
|
|
28668
|
-
for (let i = path.length - 1; i >= 1; --i) {
|
|
28669
|
-
code = path.charCodeAt(i);
|
|
28670
|
-
if (code === 47) {
|
|
28671
|
-
if (!matchedSlash) {
|
|
28672
|
-
end3 = i;
|
|
28673
|
-
break;
|
|
28674
|
-
}
|
|
28675
|
-
} else {
|
|
28676
|
-
matchedSlash = false;
|
|
28677
|
-
}
|
|
28678
|
-
}
|
|
28679
|
-
if (end3 === -1) return hasRoot ? "/" : ".";
|
|
28680
|
-
if (hasRoot && end3 === 1) return "//";
|
|
28681
|
-
return path.slice(0, end3);
|
|
28682
|
-
},
|
|
28683
|
-
basename(path, ext) {
|
|
28684
|
-
let start = 0;
|
|
28685
|
-
let end3 = -1;
|
|
28686
|
-
let matchedSlash = true;
|
|
28687
|
-
let i;
|
|
28688
|
-
if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
|
|
28689
|
-
if (ext.length === path.length && ext === path) return "";
|
|
28690
|
-
let extIdx = ext.length - 1;
|
|
28691
|
-
let firstNonSlashEnd = -1;
|
|
28692
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
28693
|
-
const code = path.charCodeAt(i);
|
|
28694
|
-
if (code === 47) {
|
|
28695
|
-
if (!matchedSlash) {
|
|
28696
|
-
start = i + 1;
|
|
28697
|
-
break;
|
|
28698
|
-
}
|
|
28699
|
-
} else {
|
|
28700
|
-
if (firstNonSlashEnd === -1) {
|
|
28701
|
-
matchedSlash = false;
|
|
28702
|
-
firstNonSlashEnd = i + 1;
|
|
28703
|
-
}
|
|
28704
|
-
if (extIdx >= 0) {
|
|
28705
|
-
if (code === ext.charCodeAt(extIdx)) {
|
|
28706
|
-
if (--extIdx === -1) {
|
|
28707
|
-
end3 = i;
|
|
28708
|
-
}
|
|
28709
|
-
} else {
|
|
28710
|
-
extIdx = -1;
|
|
28711
|
-
end3 = firstNonSlashEnd;
|
|
28712
|
-
}
|
|
28713
|
-
}
|
|
28714
|
-
}
|
|
28715
|
-
}
|
|
28716
|
-
if (start === end3) end3 = firstNonSlashEnd;
|
|
28717
|
-
else if (end3 === -1) end3 = path.length;
|
|
28718
|
-
return path.slice(start, end3);
|
|
28719
|
-
} else {
|
|
28720
|
-
for (i = path.length - 1; i >= 0; --i) {
|
|
28721
|
-
if (path.charCodeAt(i) === 47) {
|
|
28722
|
-
if (!matchedSlash) {
|
|
28723
|
-
start = i + 1;
|
|
28724
|
-
break;
|
|
28725
|
-
}
|
|
28726
|
-
} else if (end3 === -1) {
|
|
28727
|
-
matchedSlash = false;
|
|
28728
|
-
end3 = i + 1;
|
|
28729
|
-
}
|
|
28730
|
-
}
|
|
28731
|
-
if (end3 === -1) return "";
|
|
28732
|
-
return path.slice(start, end3);
|
|
28733
|
-
}
|
|
28734
|
-
},
|
|
28735
|
-
extname(path) {
|
|
28736
|
-
let startDot = -1;
|
|
28737
|
-
let startPart = 0;
|
|
28738
|
-
let end3 = -1;
|
|
28739
|
-
let matchedSlash = true;
|
|
28740
|
-
let preDotState = 0;
|
|
28741
|
-
for (let i = path.length - 1; i >= 0; --i) {
|
|
28742
|
-
const code = path.charCodeAt(i);
|
|
28743
|
-
if (code === 47) {
|
|
28744
|
-
if (!matchedSlash) {
|
|
28745
|
-
startPart = i + 1;
|
|
28746
|
-
break;
|
|
28747
|
-
}
|
|
28748
|
-
continue;
|
|
28749
|
-
}
|
|
28750
|
-
if (end3 === -1) {
|
|
28751
|
-
matchedSlash = false;
|
|
28752
|
-
end3 = i + 1;
|
|
28753
|
-
}
|
|
28754
|
-
if (code === 46) {
|
|
28755
|
-
if (startDot === -1) {
|
|
28756
|
-
startDot = i;
|
|
28757
|
-
} else if (preDotState !== 1) {
|
|
28758
|
-
preDotState = 1;
|
|
28759
|
-
}
|
|
28760
|
-
} else if (startDot !== -1) {
|
|
28761
|
-
preDotState = -1;
|
|
28762
|
-
}
|
|
28763
|
-
}
|
|
28764
|
-
if (startDot === -1 || end3 === -1 || // We saw a non-dot character immediately before the dot
|
|
28765
|
-
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
28766
|
-
preDotState === 1 && startDot === end3 - 1 && startDot === startPart + 1) {
|
|
28767
|
-
return "";
|
|
28768
|
-
}
|
|
28769
|
-
return path.slice(startDot, end3);
|
|
28770
|
-
},
|
|
28771
|
-
format: function format8(pathObject) {
|
|
28772
|
-
if (pathObject === null || typeof pathObject !== "object") {
|
|
28773
|
-
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
|
28774
|
-
}
|
|
28775
|
-
return _format("/", pathObject);
|
|
28776
|
-
},
|
|
28777
|
-
parse(path) {
|
|
28778
|
-
const ret = {
|
|
28779
|
-
root: "",
|
|
28780
|
-
dir: "",
|
|
28781
|
-
base: "",
|
|
28782
|
-
ext: "",
|
|
28783
|
-
name: ""
|
|
28784
|
-
};
|
|
28785
|
-
if (path.length === 0) return ret;
|
|
28786
|
-
let code = path.charCodeAt(0);
|
|
28787
|
-
const isAbsolute = code === 47;
|
|
28788
|
-
let start;
|
|
28789
|
-
if (isAbsolute) {
|
|
28790
|
-
ret.root = "/";
|
|
28791
|
-
start = 1;
|
|
28792
|
-
} else {
|
|
28793
|
-
start = 0;
|
|
28794
|
-
}
|
|
28795
|
-
let startDot = -1;
|
|
28796
|
-
let startPart = 0;
|
|
28797
|
-
let end3 = -1;
|
|
28798
|
-
let matchedSlash = true;
|
|
28799
|
-
let i = path.length - 1;
|
|
28800
|
-
let preDotState = 0;
|
|
28801
|
-
for (; i >= start; --i) {
|
|
28802
|
-
code = path.charCodeAt(i);
|
|
28803
|
-
if (code === 47) {
|
|
28804
|
-
if (!matchedSlash) {
|
|
28805
|
-
startPart = i + 1;
|
|
28806
|
-
break;
|
|
28807
|
-
}
|
|
28808
|
-
continue;
|
|
28809
|
-
}
|
|
28810
|
-
if (end3 === -1) {
|
|
28811
|
-
matchedSlash = false;
|
|
28812
|
-
end3 = i + 1;
|
|
28813
|
-
}
|
|
28814
|
-
if (code === 46) {
|
|
28815
|
-
if (startDot === -1) startDot = i;
|
|
28816
|
-
else if (preDotState !== 1) preDotState = 1;
|
|
28817
|
-
} else if (startDot !== -1) {
|
|
28818
|
-
preDotState = -1;
|
|
28819
|
-
}
|
|
28820
|
-
}
|
|
28821
|
-
if (startDot === -1 || end3 === -1 || // We saw a non-dot character immediately before the dot
|
|
28822
|
-
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
28823
|
-
preDotState === 1 && startDot === end3 - 1 && startDot === startPart + 1) {
|
|
28824
|
-
if (end3 !== -1) {
|
|
28825
|
-
if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end3);
|
|
28826
|
-
else ret.base = ret.name = path.slice(startPart, end3);
|
|
28827
|
-
}
|
|
28828
|
-
} else {
|
|
28829
|
-
if (startPart === 0 && isAbsolute) {
|
|
28830
|
-
ret.name = path.slice(1, startDot);
|
|
28831
|
-
ret.base = path.slice(1, end3);
|
|
28832
|
-
} else {
|
|
28833
|
-
ret.name = path.slice(startPart, startDot);
|
|
28834
|
-
ret.base = path.slice(startPart, end3);
|
|
28835
|
-
}
|
|
28836
|
-
ret.ext = path.slice(startDot, end3);
|
|
28837
|
-
}
|
|
28838
|
-
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
|
|
28839
|
-
else if (isAbsolute) ret.dir = "/";
|
|
28840
|
-
return ret;
|
|
28841
|
-
},
|
|
28842
|
-
sep: "/",
|
|
28843
|
-
fromFileUrl,
|
|
28844
|
-
toFileUrl,
|
|
28845
|
-
toNamespacedPath: identity
|
|
28846
|
-
});
|
|
28539
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
28540
|
+
};
|
|
28541
|
+
};
|
|
28542
|
+
|
|
28543
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
|
|
28544
|
+
var type2 = type;
|
|
28545
|
+
var fn4 = fn3;
|
|
28546
|
+
var value5 = value4;
|
|
28547
|
+
var valueTags2 = valueTags;
|
|
28548
|
+
var typeTags2 = typeTags;
|
|
28549
|
+
var withReturnType2 = withReturnType;
|
|
28550
|
+
var when5 = when4;
|
|
28551
|
+
var whenOr2 = whenOr;
|
|
28552
|
+
var whenAnd2 = whenAnd;
|
|
28553
|
+
var discriminator2 = discriminator;
|
|
28554
|
+
var discriminatorStartsWith2 = discriminatorStartsWith;
|
|
28555
|
+
var discriminators2 = discriminators;
|
|
28556
|
+
var discriminatorsExhaustive2 = discriminatorsExhaustive;
|
|
28557
|
+
var tag3 = tag2;
|
|
28558
|
+
var tagStartsWith2 = tagStartsWith;
|
|
28559
|
+
var tags2 = tags;
|
|
28560
|
+
var tagsExhaustive2 = tagsExhaustive;
|
|
28561
|
+
var not3 = not2;
|
|
28562
|
+
var nonEmptyString2 = nonEmptyString;
|
|
28563
|
+
var is4 = is3;
|
|
28564
|
+
var string3 = isString;
|
|
28565
|
+
var number3 = isNumber;
|
|
28566
|
+
var any3 = any2;
|
|
28567
|
+
var defined2 = defined;
|
|
28568
|
+
var boolean2 = isBoolean;
|
|
28569
|
+
var _undefined = isUndefined;
|
|
28570
|
+
var _null = isNull;
|
|
28571
|
+
var bigint = isBigInt;
|
|
28572
|
+
var symbol4 = isSymbol;
|
|
28573
|
+
var date = isDate;
|
|
28574
|
+
var record2 = isObject;
|
|
28575
|
+
var instanceOf3 = instanceOf2;
|
|
28576
|
+
var instanceOfUnsafe = instanceOf2;
|
|
28577
|
+
var orElse4 = orElse3;
|
|
28578
|
+
var orElseAbsurd2 = orElseAbsurd;
|
|
28579
|
+
var result5 = result4;
|
|
28580
|
+
var option4 = option3;
|
|
28581
|
+
var exhaustive2 = exhaustive;
|
|
28847
28582
|
|
|
28848
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
28849
|
-
|
|
28850
|
-
|
|
28851
|
-
|
|
28852
|
-
|
|
28853
|
-
|
|
28854
|
-
|
|
28855
|
-
|
|
28856
|
-
|
|
28857
|
-
|
|
28858
|
-
|
|
28859
|
-
|
|
28860
|
-
|
|
28861
|
-
|
|
28862
|
-
|
|
28863
|
-
|
|
28864
|
-
|
|
28865
|
-
|
|
28866
|
-
value: value6
|
|
28867
|
-
};
|
|
28868
|
-
}
|
|
28869
|
-
var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
|
|
28870
|
-
defaultValue: () => fromEnv()
|
|
28583
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Ref.js
|
|
28584
|
+
var Ref_exports = {};
|
|
28585
|
+
__export(Ref_exports, {
|
|
28586
|
+
get: () => get10,
|
|
28587
|
+
getAndSet: () => getAndSet,
|
|
28588
|
+
getAndUpdate: () => getAndUpdate,
|
|
28589
|
+
getAndUpdateSome: () => getAndUpdateSome,
|
|
28590
|
+
getUnsafe: () => getUnsafe5,
|
|
28591
|
+
make: () => make38,
|
|
28592
|
+
makeUnsafe: () => makeUnsafe10,
|
|
28593
|
+
modify: () => modify4,
|
|
28594
|
+
modifySome: () => modifySome,
|
|
28595
|
+
set: () => set8,
|
|
28596
|
+
setAndGet: () => setAndGet,
|
|
28597
|
+
update: () => update2,
|
|
28598
|
+
updateAndGet: () => updateAndGet,
|
|
28599
|
+
updateSome: () => updateSome,
|
|
28600
|
+
updateSomeAndGet: () => updateSomeAndGet
|
|
28871
28601
|
});
|
|
28872
|
-
var
|
|
28602
|
+
var TypeId41 = "~effect/Ref";
|
|
28603
|
+
var RefProto = {
|
|
28604
|
+
[TypeId41]: {
|
|
28605
|
+
_A: identity
|
|
28606
|
+
},
|
|
28873
28607
|
...PipeInspectableProto,
|
|
28874
28608
|
toJSON() {
|
|
28875
28609
|
return {
|
|
28876
|
-
_id: "
|
|
28610
|
+
_id: "Ref",
|
|
28611
|
+
ref: this.ref
|
|
28877
28612
|
};
|
|
28878
28613
|
}
|
|
28879
28614
|
};
|
|
28880
|
-
var
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
self.load = load;
|
|
28884
|
-
self.mapInput = mapInput4;
|
|
28615
|
+
var makeUnsafe10 = (value6) => {
|
|
28616
|
+
const self = Object.create(RefProto);
|
|
28617
|
+
self.ref = make30(value6);
|
|
28885
28618
|
return self;
|
|
28886
|
-
}
|
|
28887
|
-
|
|
28888
|
-
|
|
28889
|
-
|
|
28890
|
-
|
|
28891
|
-
|
|
28892
|
-
|
|
28893
|
-
|
|
28894
|
-
|
|
28895
|
-
|
|
28896
|
-
|
|
28897
|
-
|
|
28898
|
-
|
|
28899
|
-
|
|
28900
|
-
|
|
28901
|
-
|
|
28902
|
-
const
|
|
28903
|
-
|
|
28904
|
-
|
|
28905
|
-
}
|
|
28906
|
-
return
|
|
28907
|
-
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
-
|
|
28911
|
-
|
|
28912
|
-
|
|
28913
|
-
|
|
28914
|
-
|
|
28915
|
-
|
|
28916
|
-
|
|
28917
|
-
|
|
28918
|
-
|
|
28619
|
+
};
|
|
28620
|
+
var make38 = (value6) => sync4(() => makeUnsafe10(value6));
|
|
28621
|
+
var get10 = (self) => sync4(() => self.ref.current);
|
|
28622
|
+
var set8 = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => set6(self.ref, value6)));
|
|
28623
|
+
var getAndSet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => {
|
|
28624
|
+
const current = self.ref.current;
|
|
28625
|
+
self.ref.current = value6;
|
|
28626
|
+
return current;
|
|
28627
|
+
}));
|
|
28628
|
+
var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28629
|
+
const current = self.ref.current;
|
|
28630
|
+
self.ref.current = f(current);
|
|
28631
|
+
return current;
|
|
28632
|
+
}));
|
|
28633
|
+
var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28634
|
+
const current = self.ref.current;
|
|
28635
|
+
const option6 = pf(current);
|
|
28636
|
+
if (option6._tag === "Some") {
|
|
28637
|
+
self.ref.current = option6.value;
|
|
28638
|
+
}
|
|
28639
|
+
return current;
|
|
28640
|
+
}));
|
|
28641
|
+
var setAndGet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => self.ref.current = value6));
|
|
28642
|
+
var modify4 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28643
|
+
const [b, a] = f(self.ref.current);
|
|
28644
|
+
self.ref.current = a;
|
|
28645
|
+
return b;
|
|
28646
|
+
}));
|
|
28647
|
+
var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
|
|
28648
|
+
const [b, option6] = pf(value6);
|
|
28649
|
+
return [b, option6._tag === "None" ? value6 : option6.value];
|
|
28650
|
+
}));
|
|
28651
|
+
var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28652
|
+
self.ref.current = f(self.ref.current);
|
|
28653
|
+
}));
|
|
28654
|
+
var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
|
|
28655
|
+
var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
|
|
28656
|
+
const option6 = f(self.ref.current);
|
|
28657
|
+
if (option6._tag === "Some") {
|
|
28658
|
+
self.ref.current = option6.value;
|
|
28659
|
+
}
|
|
28660
|
+
}));
|
|
28661
|
+
var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
|
|
28662
|
+
const option6 = pf(self.ref.current);
|
|
28663
|
+
if (option6._tag === "Some") {
|
|
28664
|
+
self.ref.current = option6.value;
|
|
28665
|
+
}
|
|
28666
|
+
return self.ref.current;
|
|
28667
|
+
}));
|
|
28668
|
+
var getUnsafe5 = (self) => self.ref.current;
|
|
28669
|
+
|
|
28670
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ChannelSchema.js
|
|
28671
|
+
var decode2 = (schema2, options) => () => {
|
|
28672
|
+
const decode3 = decodeEffect2(NonEmptyArray(schema2), options);
|
|
28673
|
+
return fromTransform((upstream, _scope) => succeed7(flatMap5(upstream, (chunk) => decode3(chunk))));
|
|
28674
|
+
};
|
|
28675
|
+
|
|
28676
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PlatformError.js
|
|
28677
|
+
var TypeId42 = "~effect/PlatformError";
|
|
28678
|
+
var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
|
|
28679
|
+
/**
|
|
28680
|
+
* Formats the module, method, and optional description that rejected the argument.
|
|
28681
|
+
*
|
|
28682
|
+
* **When to use**
|
|
28683
|
+
*
|
|
28684
|
+
* Use to read the formatted error message for a rejected platform argument.
|
|
28685
|
+
*
|
|
28686
|
+
* @since 4.0.0
|
|
28687
|
+
*/
|
|
28688
|
+
get message() {
|
|
28689
|
+
return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
|
|
28690
|
+
}
|
|
28691
|
+
};
|
|
28692
|
+
var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")) {
|
|
28693
|
+
constructor(reason) {
|
|
28694
|
+
if ("cause" in reason) {
|
|
28695
|
+
super({
|
|
28696
|
+
reason,
|
|
28697
|
+
cause: reason.cause
|
|
28698
|
+
});
|
|
28699
|
+
} else {
|
|
28700
|
+
super({
|
|
28701
|
+
reason
|
|
28702
|
+
});
|
|
28703
|
+
}
|
|
28704
|
+
}
|
|
28705
|
+
/**
|
|
28706
|
+
* Marks this value as a platform error wrapper for runtime guards.
|
|
28707
|
+
*
|
|
28708
|
+
* **When to use**
|
|
28709
|
+
*
|
|
28710
|
+
* Use to identify `PlatformError` values through their runtime type marker.
|
|
28711
|
+
*
|
|
28712
|
+
* @since 4.0.0
|
|
28713
|
+
*/
|
|
28714
|
+
[TypeId42] = TypeId42;
|
|
28715
|
+
get message() {
|
|
28716
|
+
return this.reason.message;
|
|
28717
|
+
}
|
|
28718
|
+
};
|
|
28719
|
+
var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
28720
|
+
|
|
28721
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FileSystem.js
|
|
28722
|
+
var FileSystem = /* @__PURE__ */ Service("effect/FileSystem");
|
|
28723
|
+
|
|
28724
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Path.js
|
|
28725
|
+
var TypeId43 = "~effect/Path";
|
|
28726
|
+
var Path = /* @__PURE__ */ Service("effect/Path");
|
|
28727
|
+
function normalizeStringPosix(path, allowAboveRoot) {
|
|
28728
|
+
let res = "";
|
|
28729
|
+
let lastSegmentLength = 0;
|
|
28730
|
+
let lastSlash = -1;
|
|
28731
|
+
let dots = 0;
|
|
28732
|
+
let code;
|
|
28733
|
+
for (let i = 0; i <= path.length; ++i) {
|
|
28734
|
+
if (i < path.length) {
|
|
28735
|
+
code = path.charCodeAt(i);
|
|
28736
|
+
} else if (code === 47) {
|
|
28737
|
+
break;
|
|
28738
|
+
} else {
|
|
28739
|
+
code = 47;
|
|
28740
|
+
}
|
|
28741
|
+
if (code === 47) {
|
|
28742
|
+
if (lastSlash === i - 1 || dots === 1) {
|
|
28743
|
+
} else if (lastSlash !== i - 1 && dots === 2) {
|
|
28744
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
|
|
28745
|
+
if (res.length > 2) {
|
|
28746
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
28747
|
+
if (lastSlashIndex !== res.length - 1) {
|
|
28748
|
+
if (lastSlashIndex === -1) {
|
|
28749
|
+
res = "";
|
|
28750
|
+
lastSegmentLength = 0;
|
|
28751
|
+
} else {
|
|
28752
|
+
res = res.slice(0, lastSlashIndex);
|
|
28753
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
28754
|
+
}
|
|
28755
|
+
lastSlash = i;
|
|
28756
|
+
dots = 0;
|
|
28757
|
+
continue;
|
|
28758
|
+
}
|
|
28759
|
+
} else if (res.length === 2 || res.length === 1) {
|
|
28760
|
+
res = "";
|
|
28761
|
+
lastSegmentLength = 0;
|
|
28762
|
+
lastSlash = i;
|
|
28763
|
+
dots = 0;
|
|
28764
|
+
continue;
|
|
28765
|
+
}
|
|
28766
|
+
}
|
|
28767
|
+
if (allowAboveRoot) {
|
|
28768
|
+
if (res.length > 0) {
|
|
28769
|
+
res += "/..";
|
|
28770
|
+
} else {
|
|
28771
|
+
res = "..";
|
|
28772
|
+
}
|
|
28773
|
+
lastSegmentLength = 2;
|
|
28774
|
+
}
|
|
28775
|
+
} else {
|
|
28776
|
+
if (res.length > 0) {
|
|
28777
|
+
res += "/" + path.slice(lastSlash + 1, i);
|
|
28778
|
+
} else {
|
|
28779
|
+
res = path.slice(lastSlash + 1, i);
|
|
28780
|
+
}
|
|
28781
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
28782
|
+
}
|
|
28783
|
+
lastSlash = i;
|
|
28784
|
+
dots = 0;
|
|
28785
|
+
} else if (code === 46 && dots !== -1) {
|
|
28786
|
+
++dots;
|
|
28787
|
+
} else {
|
|
28788
|
+
dots = -1;
|
|
28919
28789
|
}
|
|
28920
28790
|
}
|
|
28921
|
-
return
|
|
28791
|
+
return res;
|
|
28922
28792
|
}
|
|
28923
|
-
function
|
|
28924
|
-
const
|
|
28925
|
-
const
|
|
28926
|
-
|
|
28927
|
-
|
|
28928
|
-
if (children.length === 0) {
|
|
28929
|
-
return leafValue === void 0 ? void 0 : makeValue(leafValue);
|
|
28930
|
-
}
|
|
28931
|
-
const allNumeric = children.every(isCanonicalArrayIndex);
|
|
28932
|
-
if (allNumeric) {
|
|
28933
|
-
const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
|
|
28934
|
-
return makeArray(length, leafValue);
|
|
28793
|
+
function _format(sep, pathObject) {
|
|
28794
|
+
const dir = pathObject.dir || pathObject.root;
|
|
28795
|
+
const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
|
28796
|
+
if (!dir) {
|
|
28797
|
+
return base;
|
|
28935
28798
|
}
|
|
28936
|
-
|
|
28937
|
-
|
|
28938
|
-
function trieNodeAt(root, path) {
|
|
28939
|
-
if (path.length === 0) return root;
|
|
28940
|
-
let node = root;
|
|
28941
|
-
for (const seg of path) {
|
|
28942
|
-
node = node?.children?.[String(seg)];
|
|
28943
|
-
if (!node) return void 0;
|
|
28799
|
+
if (dir === pathObject.root) {
|
|
28800
|
+
return dir + base;
|
|
28944
28801
|
}
|
|
28945
|
-
return
|
|
28802
|
+
return dir + sep + base;
|
|
28946
28803
|
}
|
|
28947
|
-
|
|
28948
|
-
|
|
28949
|
-
|
|
28950
|
-
|
|
28951
|
-
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28804
|
+
function fromFileUrl(url) {
|
|
28805
|
+
if (url.protocol !== "file:") {
|
|
28806
|
+
return fail7(new BadArgument({
|
|
28807
|
+
module: "Path",
|
|
28808
|
+
method: "fromFileUrl",
|
|
28809
|
+
description: "URL must be of scheme file"
|
|
28810
|
+
}));
|
|
28811
|
+
} else if (url.hostname !== "") {
|
|
28812
|
+
return fail7(new BadArgument({
|
|
28813
|
+
module: "Path",
|
|
28814
|
+
method: "fromFileUrl",
|
|
28815
|
+
description: "Invalid file URL host"
|
|
28816
|
+
}));
|
|
28956
28817
|
}
|
|
28957
|
-
|
|
28958
|
-
|
|
28818
|
+
const pathname = url.pathname;
|
|
28819
|
+
for (let n = 0; n < pathname.length; n++) {
|
|
28820
|
+
if (pathname[n] === "%") {
|
|
28821
|
+
const third = pathname.codePointAt(n + 2) | 32;
|
|
28822
|
+
if (pathname[n + 1] === "2" && third === 102) {
|
|
28823
|
+
return fail7(new BadArgument({
|
|
28824
|
+
module: "Path",
|
|
28825
|
+
method: "fromFileUrl",
|
|
28826
|
+
description: "must not include encoded / characters"
|
|
28827
|
+
}));
|
|
28828
|
+
}
|
|
28829
|
+
}
|
|
28959
28830
|
}
|
|
28960
|
-
|
|
28961
|
-
|
|
28831
|
+
return succeed7(decodeURIComponent(pathname));
|
|
28832
|
+
}
|
|
28833
|
+
var resolve2 = function resolve3() {
|
|
28834
|
+
let resolvedPath = "";
|
|
28835
|
+
let resolvedAbsolute = false;
|
|
28836
|
+
let cwd = void 0;
|
|
28837
|
+
for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
28838
|
+
let path;
|
|
28839
|
+
if (i >= 0) {
|
|
28840
|
+
path = arguments[i];
|
|
28841
|
+
} else {
|
|
28842
|
+
const process = globalThis.process;
|
|
28843
|
+
if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
|
|
28844
|
+
cwd = process.cwd();
|
|
28845
|
+
}
|
|
28846
|
+
path = cwd;
|
|
28847
|
+
}
|
|
28848
|
+
if (path.length === 0) {
|
|
28849
|
+
continue;
|
|
28850
|
+
}
|
|
28851
|
+
resolvedPath = path + "/" + resolvedPath;
|
|
28852
|
+
resolvedAbsolute = path.charCodeAt(0) === 47;
|
|
28962
28853
|
}
|
|
28963
|
-
|
|
28964
|
-
|
|
28965
|
-
|
|
28966
|
-
|
|
28967
|
-
|
|
28968
|
-
return
|
|
28854
|
+
resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
|
|
28855
|
+
if (resolvedAbsolute) {
|
|
28856
|
+
if (resolvedPath.length > 0) {
|
|
28857
|
+
return "/" + resolvedPath;
|
|
28858
|
+
} else {
|
|
28859
|
+
return "/";
|
|
28969
28860
|
}
|
|
28970
|
-
})
|
|
28971
|
-
|
|
28972
|
-
|
|
28973
|
-
return
|
|
28974
|
-
_id: "Config"
|
|
28975
|
-
};
|
|
28861
|
+
} else if (resolvedPath.length > 0) {
|
|
28862
|
+
return resolvedPath;
|
|
28863
|
+
} else {
|
|
28864
|
+
return ".";
|
|
28976
28865
|
}
|
|
28977
28866
|
};
|
|
28978
|
-
|
|
28979
|
-
|
|
28980
|
-
|
|
28981
|
-
|
|
28982
|
-
|
|
28867
|
+
var CHAR_FORWARD_SLASH = 47;
|
|
28868
|
+
function toFileUrl(filepath) {
|
|
28869
|
+
const outURL = new URL("file://");
|
|
28870
|
+
let resolved2 = resolve2(filepath);
|
|
28871
|
+
const filePathLast = filepath.charCodeAt(filepath.length - 1);
|
|
28872
|
+
if (filePathLast === CHAR_FORWARD_SLASH && resolved2[resolved2.length - 1] !== "/") {
|
|
28873
|
+
resolved2 += "/";
|
|
28874
|
+
}
|
|
28875
|
+
outURL.pathname = encodePathChars(resolved2);
|
|
28876
|
+
return succeed7(outURL);
|
|
28983
28877
|
}
|
|
28984
|
-
var
|
|
28985
|
-
var
|
|
28986
|
-
|
|
28987
|
-
|
|
28988
|
-
|
|
28989
|
-
|
|
28990
|
-
|
|
28991
|
-
|
|
28992
|
-
|
|
28993
|
-
|
|
28994
|
-
|
|
28995
|
-
|
|
28996
|
-
|
|
28997
|
-
|
|
28998
|
-
|
|
28999
|
-
|
|
29000
|
-
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
|
|
29004
|
-
var map14 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
29005
|
-
return make40((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
|
|
29006
|
-
});
|
|
29007
|
-
var orElse3 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
29008
|
-
return make40((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
|
|
29009
|
-
onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
|
|
29010
|
-
onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
|
|
29011
|
-
}));
|
|
29012
|
-
});
|
|
29013
|
-
function all5(arg) {
|
|
29014
|
-
const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
29015
|
-
if (globalThis.Array.isArray(configs)) {
|
|
29016
|
-
return make40((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
|
|
29017
|
-
} else {
|
|
29018
|
-
return make40((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
|
|
28878
|
+
var percentRegExp = /%/g;
|
|
28879
|
+
var backslashRegExp = /\\/g;
|
|
28880
|
+
var newlineRegExp = /\n/g;
|
|
28881
|
+
var carriageReturnRegExp = /\r/g;
|
|
28882
|
+
var tabRegExp = /\t/g;
|
|
28883
|
+
function encodePathChars(filepath) {
|
|
28884
|
+
if (filepath.includes("%")) {
|
|
28885
|
+
filepath = filepath.replace(percentRegExp, "%25");
|
|
28886
|
+
}
|
|
28887
|
+
if (filepath.includes("\\")) {
|
|
28888
|
+
filepath = filepath.replace(backslashRegExp, "%5C");
|
|
28889
|
+
}
|
|
28890
|
+
if (filepath.includes("\n")) {
|
|
28891
|
+
filepath = filepath.replace(newlineRegExp, "%0A");
|
|
28892
|
+
}
|
|
28893
|
+
if (filepath.includes("\r")) {
|
|
28894
|
+
filepath = filepath.replace(carriageReturnRegExp, "%0D");
|
|
28895
|
+
}
|
|
28896
|
+
if (filepath.includes(" ")) {
|
|
28897
|
+
filepath = filepath.replace(tabRegExp, "%09");
|
|
29019
28898
|
}
|
|
28899
|
+
return filepath;
|
|
29020
28900
|
}
|
|
29021
|
-
var
|
|
29022
|
-
|
|
29023
|
-
|
|
29024
|
-
|
|
29025
|
-
|
|
29026
|
-
|
|
29027
|
-
|
|
29028
|
-
|
|
29029
|
-
|
|
29030
|
-
|
|
28901
|
+
var posixImpl = /* @__PURE__ */ Path.of({
|
|
28902
|
+
[TypeId43]: TypeId43,
|
|
28903
|
+
resolve: resolve2,
|
|
28904
|
+
normalize(path) {
|
|
28905
|
+
if (path.length === 0) return ".";
|
|
28906
|
+
const isAbsolute = path.charCodeAt(0) === 47;
|
|
28907
|
+
const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
|
|
28908
|
+
path = normalizeStringPosix(path, !isAbsolute);
|
|
28909
|
+
if (path.length === 0 && !isAbsolute) path = ".";
|
|
28910
|
+
if (path.length > 0 && trailingSeparator) path += "/";
|
|
28911
|
+
if (isAbsolute) return "/" + path;
|
|
28912
|
+
return path;
|
|
28913
|
+
},
|
|
28914
|
+
isAbsolute(path) {
|
|
28915
|
+
return path.length > 0 && path.charCodeAt(0) === 47;
|
|
28916
|
+
},
|
|
28917
|
+
join() {
|
|
28918
|
+
if (arguments.length === 0) {
|
|
28919
|
+
return ".";
|
|
28920
|
+
}
|
|
28921
|
+
let joined;
|
|
28922
|
+
for (let i = 0; i < arguments.length; ++i) {
|
|
28923
|
+
const arg = arguments[i];
|
|
28924
|
+
if (arg.length > 0) {
|
|
28925
|
+
if (joined === void 0) {
|
|
28926
|
+
joined = arg;
|
|
28927
|
+
} else {
|
|
28928
|
+
joined += "/" + arg;
|
|
28929
|
+
}
|
|
28930
|
+
}
|
|
28931
|
+
}
|
|
28932
|
+
if (joined === void 0) {
|
|
28933
|
+
return ".";
|
|
28934
|
+
}
|
|
28935
|
+
return posixImpl.normalize(joined);
|
|
28936
|
+
},
|
|
28937
|
+
relative(from, to) {
|
|
28938
|
+
if (from === to) return "";
|
|
28939
|
+
from = posixImpl.resolve(from);
|
|
28940
|
+
to = posixImpl.resolve(to);
|
|
28941
|
+
if (from === to) return "";
|
|
28942
|
+
let fromStart = 1;
|
|
28943
|
+
for (; fromStart < from.length; ++fromStart) {
|
|
28944
|
+
if (from.charCodeAt(fromStart) !== 47) {
|
|
28945
|
+
break;
|
|
28946
|
+
}
|
|
28947
|
+
}
|
|
28948
|
+
const fromEnd = from.length;
|
|
28949
|
+
const fromLen = fromEnd - fromStart;
|
|
28950
|
+
let toStart = 1;
|
|
28951
|
+
for (; toStart < to.length; ++toStart) {
|
|
28952
|
+
if (to.charCodeAt(toStart) !== 47) {
|
|
28953
|
+
break;
|
|
28954
|
+
}
|
|
29031
28955
|
}
|
|
29032
|
-
const
|
|
29033
|
-
|
|
29034
|
-
|
|
29035
|
-
|
|
29036
|
-
|
|
29037
|
-
|
|
28956
|
+
const toEnd = to.length;
|
|
28957
|
+
const toLen = toEnd - toStart;
|
|
28958
|
+
const length = fromLen < toLen ? fromLen : toLen;
|
|
28959
|
+
let lastCommonSep = -1;
|
|
28960
|
+
let i = 0;
|
|
28961
|
+
for (; i <= length; ++i) {
|
|
28962
|
+
if (i === length) {
|
|
28963
|
+
if (toLen > length) {
|
|
28964
|
+
if (to.charCodeAt(toStart + i) === 47) {
|
|
28965
|
+
return to.slice(toStart + i + 1);
|
|
28966
|
+
} else if (i === 0) {
|
|
28967
|
+
return to.slice(toStart + i);
|
|
28968
|
+
}
|
|
28969
|
+
} else if (fromLen > length) {
|
|
28970
|
+
if (from.charCodeAt(fromStart + i) === 47) {
|
|
28971
|
+
lastCommonSep = i;
|
|
28972
|
+
} else if (i === 0) {
|
|
28973
|
+
lastCommonSep = 0;
|
|
28974
|
+
}
|
|
28975
|
+
}
|
|
28976
|
+
break;
|
|
28977
|
+
}
|
|
28978
|
+
const fromCode = from.charCodeAt(fromStart + i);
|
|
28979
|
+
const toCode = to.charCodeAt(toStart + i);
|
|
28980
|
+
if (fromCode !== toCode) {
|
|
28981
|
+
break;
|
|
28982
|
+
} else if (fromCode === 47) {
|
|
28983
|
+
lastCommonSep = i;
|
|
28984
|
+
}
|
|
29038
28985
|
}
|
|
29039
|
-
|
|
29040
|
-
|
|
29041
|
-
|
|
29042
|
-
|
|
29043
|
-
|
|
29044
|
-
|
|
29045
|
-
|
|
29046
|
-
|
|
29047
|
-
}
|
|
29048
|
-
var resolveRecord = (results) => {
|
|
29049
|
-
const values2 = {};
|
|
29050
|
-
let firstFailure;
|
|
29051
|
-
let firstAbsent;
|
|
29052
|
-
let hasInput2 = false;
|
|
29053
|
-
for (const key in results) {
|
|
29054
|
-
const result6 = results[key];
|
|
29055
|
-
if (isFailure2(result6)) {
|
|
29056
|
-
firstFailure ??= result6.failure;
|
|
29057
|
-
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
29058
|
-
continue;
|
|
28986
|
+
let out = "";
|
|
28987
|
+
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
|
|
28988
|
+
if (i === fromEnd || from.charCodeAt(i) === 47) {
|
|
28989
|
+
if (out.length === 0) {
|
|
28990
|
+
out += "..";
|
|
28991
|
+
} else {
|
|
28992
|
+
out += "/..";
|
|
28993
|
+
}
|
|
28994
|
+
}
|
|
29059
28995
|
}
|
|
29060
|
-
|
|
29061
|
-
|
|
29062
|
-
firstAbsent ??= resolution;
|
|
28996
|
+
if (out.length > 0) {
|
|
28997
|
+
return out + to.slice(toStart + lastCommonSep);
|
|
29063
28998
|
} else {
|
|
29064
|
-
|
|
29065
|
-
|
|
28999
|
+
toStart += lastCommonSep;
|
|
29000
|
+
if (to.charCodeAt(toStart) === 47) {
|
|
29001
|
+
++toStart;
|
|
29002
|
+
}
|
|
29003
|
+
return to.slice(toStart);
|
|
29066
29004
|
}
|
|
29067
|
-
}
|
|
29068
|
-
|
|
29069
|
-
|
|
29070
|
-
|
|
29071
|
-
|
|
29072
|
-
|
|
29073
|
-
|
|
29074
|
-
|
|
29075
|
-
|
|
29076
|
-
|
|
29077
|
-
|
|
29078
|
-
|
|
29079
|
-
|
|
29080
|
-
|
|
29081
|
-
|
|
29082
|
-
|
|
29083
|
-
|
|
29084
|
-
|
|
29085
|
-
|
|
29086
|
-
|
|
29087
|
-
|
|
29088
|
-
|
|
29089
|
-
|
|
29090
|
-
|
|
29091
|
-
|
|
29092
|
-
|
|
29093
|
-
|
|
29094
|
-
|
|
29095
|
-
|
|
29096
|
-
|
|
29097
|
-
|
|
29098
|
-
|
|
29099
|
-
|
|
29100
|
-
|
|
29101
|
-
|
|
29102
|
-
|
|
29103
|
-
|
|
29104
|
-
case "Objects":
|
|
29105
|
-
return node?._tag === "Record";
|
|
29106
|
-
case "Arrays":
|
|
29107
|
-
return node?._tag === "Array";
|
|
29108
|
-
case "Union":
|
|
29109
|
-
return ast.types.some((ast2) => hasProviderInput(ast2, node));
|
|
29110
|
-
case "Suspend":
|
|
29111
|
-
return hasProviderInput(ast.thunk(), node);
|
|
29112
|
-
default:
|
|
29113
|
-
return getScalar(node) !== void 0;
|
|
29114
|
-
}
|
|
29115
|
-
};
|
|
29116
|
-
var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
29117
|
-
const seen = /* @__PURE__ */ new WeakSet();
|
|
29118
|
-
const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
|
|
29119
|
-
seen.add(ast);
|
|
29120
|
-
switch (ast._tag) {
|
|
29121
|
-
case "Objects": {
|
|
29122
|
-
const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
|
|
29123
|
-
const materialize = fnUntraced2(function* (cursor) {
|
|
29124
|
-
if (cursor.node?._tag !== "Record") {
|
|
29125
|
-
return void 0;
|
|
29005
|
+
},
|
|
29006
|
+
dirname(path) {
|
|
29007
|
+
if (path.length === 0) return ".";
|
|
29008
|
+
let code = path.charCodeAt(0);
|
|
29009
|
+
const hasRoot = code === 47;
|
|
29010
|
+
let end3 = -1;
|
|
29011
|
+
let matchedSlash = true;
|
|
29012
|
+
for (let i = path.length - 1; i >= 1; --i) {
|
|
29013
|
+
code = path.charCodeAt(i);
|
|
29014
|
+
if (code === 47) {
|
|
29015
|
+
if (!matchedSlash) {
|
|
29016
|
+
end3 = i;
|
|
29017
|
+
break;
|
|
29018
|
+
}
|
|
29019
|
+
} else {
|
|
29020
|
+
matchedSlash = false;
|
|
29021
|
+
}
|
|
29022
|
+
}
|
|
29023
|
+
if (end3 === -1) return hasRoot ? "/" : ".";
|
|
29024
|
+
if (hasRoot && end3 === 1) return "//";
|
|
29025
|
+
return path.slice(0, end3);
|
|
29026
|
+
},
|
|
29027
|
+
basename(path, ext) {
|
|
29028
|
+
let start = 0;
|
|
29029
|
+
let end3 = -1;
|
|
29030
|
+
let matchedSlash = true;
|
|
29031
|
+
let i;
|
|
29032
|
+
if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
|
|
29033
|
+
if (ext.length === path.length && ext === path) return "";
|
|
29034
|
+
let extIdx = ext.length - 1;
|
|
29035
|
+
let firstNonSlashEnd = -1;
|
|
29036
|
+
for (i = path.length - 1; i >= 0; --i) {
|
|
29037
|
+
const code = path.charCodeAt(i);
|
|
29038
|
+
if (code === 47) {
|
|
29039
|
+
if (!matchedSlash) {
|
|
29040
|
+
start = i + 1;
|
|
29041
|
+
break;
|
|
29126
29042
|
}
|
|
29127
|
-
|
|
29128
|
-
|
|
29129
|
-
|
|
29130
|
-
|
|
29043
|
+
} else {
|
|
29044
|
+
if (firstNonSlashEnd === -1) {
|
|
29045
|
+
matchedSlash = false;
|
|
29046
|
+
firstNonSlashEnd = i + 1;
|
|
29131
29047
|
}
|
|
29132
|
-
if (
|
|
29133
|
-
|
|
29134
|
-
if (
|
|
29048
|
+
if (extIdx >= 0) {
|
|
29049
|
+
if (code === ext.charCodeAt(extIdx)) {
|
|
29050
|
+
if (--extIdx === -1) {
|
|
29051
|
+
end3 = i;
|
|
29052
|
+
}
|
|
29053
|
+
} else {
|
|
29054
|
+
extIdx = -1;
|
|
29055
|
+
end3 = firstNonSlashEnd;
|
|
29135
29056
|
}
|
|
29136
29057
|
}
|
|
29137
|
-
|
|
29138
|
-
for (const key of keys4) {
|
|
29139
|
-
const child = yield* loadChildCursor(cursor, key);
|
|
29140
|
-
if (child.node !== void 0) assignProperty(out, key, child);
|
|
29141
|
-
}
|
|
29142
|
-
return out;
|
|
29143
|
-
});
|
|
29144
|
-
return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
|
|
29058
|
+
}
|
|
29145
29059
|
}
|
|
29146
|
-
|
|
29147
|
-
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29060
|
+
if (start === end3) end3 = firstNonSlashEnd;
|
|
29061
|
+
else if (end3 === -1) end3 = path.length;
|
|
29062
|
+
return path.slice(start, end3);
|
|
29063
|
+
} else {
|
|
29064
|
+
for (i = path.length - 1; i >= 0; --i) {
|
|
29065
|
+
if (path.charCodeAt(i) === 47) {
|
|
29066
|
+
if (!matchedSlash) {
|
|
29067
|
+
start = i + 1;
|
|
29068
|
+
break;
|
|
29154
29069
|
}
|
|
29155
|
-
|
|
29156
|
-
|
|
29157
|
-
|
|
29070
|
+
} else if (end3 === -1) {
|
|
29071
|
+
matchedSlash = false;
|
|
29072
|
+
end3 = i + 1;
|
|
29073
|
+
}
|
|
29158
29074
|
}
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29075
|
+
if (end3 === -1) return "";
|
|
29076
|
+
return path.slice(start, end3);
|
|
29077
|
+
}
|
|
29078
|
+
},
|
|
29079
|
+
extname(path) {
|
|
29080
|
+
let startDot = -1;
|
|
29081
|
+
let startPart = 0;
|
|
29082
|
+
let end3 = -1;
|
|
29083
|
+
let matchedSlash = true;
|
|
29084
|
+
let preDotState = 0;
|
|
29085
|
+
for (let i = path.length - 1; i >= 0; --i) {
|
|
29086
|
+
const code = path.charCodeAt(i);
|
|
29087
|
+
if (code === 47) {
|
|
29088
|
+
if (!matchedSlash) {
|
|
29089
|
+
startPart = i + 1;
|
|
29090
|
+
break;
|
|
29091
|
+
}
|
|
29092
|
+
continue;
|
|
29093
|
+
}
|
|
29094
|
+
if (end3 === -1) {
|
|
29095
|
+
matchedSlash = false;
|
|
29096
|
+
end3 = i + 1;
|
|
29097
|
+
}
|
|
29098
|
+
if (code === 46) {
|
|
29099
|
+
if (startDot === -1) {
|
|
29100
|
+
startDot = i;
|
|
29101
|
+
} else if (preDotState !== 1) {
|
|
29102
|
+
preDotState = 1;
|
|
29162
29103
|
}
|
|
29163
|
-
|
|
29164
|
-
|
|
29165
|
-
const target = ast.thunk();
|
|
29166
|
-
if (!seen.has(target)) recur2(target);
|
|
29167
|
-
return ast.recur(recur2);
|
|
29104
|
+
} else if (startDot !== -1) {
|
|
29105
|
+
preDotState = -1;
|
|
29168
29106
|
}
|
|
29169
|
-
case "Declaration":
|
|
29170
|
-
case "Any":
|
|
29171
|
-
throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
|
|
29172
|
-
cause: ast
|
|
29173
|
-
});
|
|
29174
|
-
default:
|
|
29175
|
-
return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
|
|
29176
29107
|
}
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
const codecStringTree = toCodecStringTree2(codec);
|
|
29182
|
-
const encodedAst = toEncoded(codecStringTree.ast);
|
|
29183
|
-
const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
|
|
29184
|
-
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
29185
|
-
return make40((provider, pathPrefix) => {
|
|
29186
|
-
const fullPath = [...pathPrefix, ...localPath];
|
|
29187
|
-
return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
|
|
29188
|
-
const hasInput2 = hasProviderInput(encodedAst, cursor.node);
|
|
29189
|
-
return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
|
|
29190
|
-
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
29191
|
-
return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
|
|
29192
|
-
})), hasInput2);
|
|
29193
|
-
}));
|
|
29194
|
-
});
|
|
29195
|
-
}
|
|
29196
|
-
var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
|
|
29197
|
-
function String7(name) {
|
|
29198
|
-
return schema(String6, name);
|
|
29199
|
-
}
|
|
29200
|
-
function Int2(name) {
|
|
29201
|
-
return schema(Int, name);
|
|
29202
|
-
}
|
|
29203
|
-
function Literals2(literals, name) {
|
|
29204
|
-
return schema(Literals(literals), name);
|
|
29205
|
-
}
|
|
29206
|
-
function Array3(value6, pathOrOptions, options) {
|
|
29207
|
-
const hasPath = isPath(pathOrOptions);
|
|
29208
|
-
const resolvedOptions = hasPath ? options : pathOrOptions;
|
|
29209
|
-
const array2 = ArraySchema(value6);
|
|
29210
|
-
const separator = resolvedOptions?.separator ?? ",";
|
|
29211
|
-
const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
|
|
29212
|
-
decode: split(resolvedOptions),
|
|
29213
|
-
encode: passthrough2({
|
|
29214
|
-
strict: false
|
|
29215
|
-
}).compose(transform((input) => input.join(separator)))
|
|
29216
|
-
}));
|
|
29217
|
-
return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
|
|
29218
|
-
}
|
|
29219
|
-
function Record2(key, value6, pathOrOptions, options) {
|
|
29220
|
-
const hasPath = isPath(pathOrOptions);
|
|
29221
|
-
const record3 = Record(key, value6);
|
|
29222
|
-
const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
|
|
29223
|
-
const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
|
|
29224
|
-
decode: split3.decode,
|
|
29225
|
-
encode: passthrough2({
|
|
29226
|
-
strict: false
|
|
29227
|
-
}).compose(split3.encode)
|
|
29228
|
-
}));
|
|
29229
|
-
return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
|
|
29230
|
-
}
|
|
29231
|
-
function Boolean4(name) {
|
|
29232
|
-
return schema(BooleanLiterals, name);
|
|
29233
|
-
}
|
|
29234
|
-
function URL3(name) {
|
|
29235
|
-
return schema(URL2, name);
|
|
29236
|
-
}
|
|
29237
|
-
|
|
29238
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
|
|
29239
|
-
var ignore5 = "~effect/ErrorReporter/ignore";
|
|
29240
|
-
|
|
29241
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
|
|
29242
|
-
var FiberSet_exports = {};
|
|
29243
|
-
__export(FiberSet_exports, {
|
|
29244
|
-
add: () => add4,
|
|
29245
|
-
addUnsafe: () => addUnsafe2,
|
|
29246
|
-
awaitEmpty: () => awaitEmpty,
|
|
29247
|
-
clear: () => clear4,
|
|
29248
|
-
isFiberSet: () => isFiberSet,
|
|
29249
|
-
join: () => join3,
|
|
29250
|
-
make: () => make41,
|
|
29251
|
-
makeRuntime: () => makeRuntime,
|
|
29252
|
-
makeRuntimePromise: () => makeRuntimePromise,
|
|
29253
|
-
run: () => run3,
|
|
29254
|
-
runtime: () => runtime,
|
|
29255
|
-
runtimePromise: () => runtimePromise,
|
|
29256
|
-
size: () => size8
|
|
29257
|
-
});
|
|
29258
|
-
var TypeId44 = "~effect/FiberSet";
|
|
29259
|
-
var isFiberSet = (u) => hasProperty(u, TypeId44);
|
|
29260
|
-
var Proto10 = {
|
|
29261
|
-
[TypeId44]: TypeId44,
|
|
29262
|
-
[Symbol.iterator]() {
|
|
29263
|
-
if (this.state._tag === "Closed") {
|
|
29264
|
-
return empty2();
|
|
29108
|
+
if (startDot === -1 || end3 === -1 || // We saw a non-dot character immediately before the dot
|
|
29109
|
+
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
29110
|
+
preDotState === 1 && startDot === end3 - 1 && startDot === startPart + 1) {
|
|
29111
|
+
return "";
|
|
29265
29112
|
}
|
|
29266
|
-
return
|
|
29113
|
+
return path.slice(startDot, end3);
|
|
29267
29114
|
},
|
|
29268
|
-
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
_id: "FiberSet",
|
|
29272
|
-
state: this.state
|
|
29273
|
-
};
|
|
29274
|
-
}
|
|
29275
|
-
};
|
|
29276
|
-
var makeUnsafe11 = (backing, deferred) => {
|
|
29277
|
-
const self = Object.create(Proto10);
|
|
29278
|
-
self.state = {
|
|
29279
|
-
_tag: "Open",
|
|
29280
|
-
backing
|
|
29281
|
-
};
|
|
29282
|
-
self.deferred = deferred;
|
|
29283
|
-
return self;
|
|
29284
|
-
};
|
|
29285
|
-
var make41 = () => acquireRelease2(sync4(() => makeUnsafe11(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
|
|
29286
|
-
const state = set10.state;
|
|
29287
|
-
if (state._tag === "Closed") return void_5;
|
|
29288
|
-
set10.state = {
|
|
29289
|
-
_tag: "Closed"
|
|
29290
|
-
};
|
|
29291
|
-
const fibers = state.backing;
|
|
29292
|
-
return interruptAll(fibers).pipe(into(set10.deferred));
|
|
29293
|
-
}));
|
|
29294
|
-
var makeRuntime = () => flatMap5(make41(), (self) => runtime(self)());
|
|
29295
|
-
var makeRuntimePromise = () => flatMap5(make41(), (self) => runtimePromise(self)());
|
|
29296
|
-
var internalFiberId = -1;
|
|
29297
|
-
var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose2(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
|
|
29298
|
-
var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
|
|
29299
|
-
if (self.state._tag === "Closed") {
|
|
29300
|
-
fiber3.interruptUnsafe(internalFiberId);
|
|
29301
|
-
return;
|
|
29302
|
-
} else if (self.state.backing.has(fiber3)) {
|
|
29303
|
-
return;
|
|
29304
|
-
}
|
|
29305
|
-
self.state.backing.add(fiber3);
|
|
29306
|
-
fiber3.addObserver((exit3) => {
|
|
29307
|
-
if (self.state._tag === "Closed") {
|
|
29308
|
-
return;
|
|
29309
|
-
}
|
|
29310
|
-
self.state.backing.delete(fiber3);
|
|
29311
|
-
if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
|
|
29312
|
-
doneUnsafe(self.deferred, exit3);
|
|
29115
|
+
format: function format8(pathObject) {
|
|
29116
|
+
if (pathObject === null || typeof pathObject !== "object") {
|
|
29117
|
+
throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
|
|
29313
29118
|
}
|
|
29314
|
-
|
|
29315
|
-
}
|
|
29316
|
-
|
|
29317
|
-
|
|
29318
|
-
|
|
29319
|
-
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
|
|
29326
|
-
|
|
29327
|
-
|
|
29119
|
+
return _format("/", pathObject);
|
|
29120
|
+
},
|
|
29121
|
+
parse(path) {
|
|
29122
|
+
const ret = {
|
|
29123
|
+
root: "",
|
|
29124
|
+
dir: "",
|
|
29125
|
+
base: "",
|
|
29126
|
+
ext: "",
|
|
29127
|
+
name: ""
|
|
29128
|
+
};
|
|
29129
|
+
if (path.length === 0) return ret;
|
|
29130
|
+
let code = path.charCodeAt(0);
|
|
29131
|
+
const isAbsolute = code === 47;
|
|
29132
|
+
let start;
|
|
29133
|
+
if (isAbsolute) {
|
|
29134
|
+
ret.root = "/";
|
|
29135
|
+
start = 1;
|
|
29136
|
+
} else {
|
|
29137
|
+
start = 0;
|
|
29328
29138
|
}
|
|
29329
|
-
|
|
29330
|
-
|
|
29331
|
-
|
|
29332
|
-
|
|
29333
|
-
|
|
29334
|
-
|
|
29335
|
-
|
|
29336
|
-
|
|
29337
|
-
|
|
29338
|
-
|
|
29339
|
-
|
|
29340
|
-
|
|
29341
|
-
|
|
29342
|
-
|
|
29343
|
-
|
|
29344
|
-
|
|
29345
|
-
|
|
29346
|
-
|
|
29347
|
-
}
|
|
29348
|
-
|
|
29349
|
-
|
|
29350
|
-
|
|
29351
|
-
|
|
29352
|
-
|
|
29139
|
+
let startDot = -1;
|
|
29140
|
+
let startPart = 0;
|
|
29141
|
+
let end3 = -1;
|
|
29142
|
+
let matchedSlash = true;
|
|
29143
|
+
let i = path.length - 1;
|
|
29144
|
+
let preDotState = 0;
|
|
29145
|
+
for (; i >= start; --i) {
|
|
29146
|
+
code = path.charCodeAt(i);
|
|
29147
|
+
if (code === 47) {
|
|
29148
|
+
if (!matchedSlash) {
|
|
29149
|
+
startPart = i + 1;
|
|
29150
|
+
break;
|
|
29151
|
+
}
|
|
29152
|
+
continue;
|
|
29153
|
+
}
|
|
29154
|
+
if (end3 === -1) {
|
|
29155
|
+
matchedSlash = false;
|
|
29156
|
+
end3 = i + 1;
|
|
29157
|
+
}
|
|
29158
|
+
if (code === 46) {
|
|
29159
|
+
if (startDot === -1) startDot = i;
|
|
29160
|
+
else if (preDotState !== 1) preDotState = 1;
|
|
29161
|
+
} else if (startDot !== -1) {
|
|
29162
|
+
preDotState = -1;
|
|
29163
|
+
}
|
|
29353
29164
|
}
|
|
29354
|
-
|
|
29355
|
-
|
|
29356
|
-
|
|
29357
|
-
|
|
29358
|
-
|
|
29359
|
-
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
|
-
|
|
29363
|
-
|
|
29364
|
-
|
|
29365
|
-
}
|
|
29366
|
-
|
|
29367
|
-
|
|
29368
|
-
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29165
|
+
if (startDot === -1 || end3 === -1 || // We saw a non-dot character immediately before the dot
|
|
29166
|
+
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
29167
|
+
preDotState === 1 && startDot === end3 - 1 && startDot === startPart + 1) {
|
|
29168
|
+
if (end3 !== -1) {
|
|
29169
|
+
if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end3);
|
|
29170
|
+
else ret.base = ret.name = path.slice(startPart, end3);
|
|
29171
|
+
}
|
|
29172
|
+
} else {
|
|
29173
|
+
if (startPart === 0 && isAbsolute) {
|
|
29174
|
+
ret.name = path.slice(1, startDot);
|
|
29175
|
+
ret.base = path.slice(1, end3);
|
|
29176
|
+
} else {
|
|
29177
|
+
ret.name = path.slice(startPart, startDot);
|
|
29178
|
+
ret.base = path.slice(startPart, end3);
|
|
29179
|
+
}
|
|
29180
|
+
ret.ext = path.slice(startDot, end3);
|
|
29181
|
+
}
|
|
29182
|
+
if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
|
|
29183
|
+
else if (isAbsolute) ret.dir = "/";
|
|
29184
|
+
return ret;
|
|
29185
|
+
},
|
|
29186
|
+
sep: "/",
|
|
29187
|
+
fromFileUrl,
|
|
29188
|
+
toFileUrl,
|
|
29189
|
+
toNamespacedPath: identity
|
|
29372
29190
|
});
|
|
29373
29191
|
|
|
29374
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
29375
|
-
|
|
29376
|
-
|
|
29377
|
-
|
|
29378
|
-
|
|
29379
|
-
|
|
29380
|
-
|
|
29381
|
-
|
|
29382
|
-
|
|
29383
|
-
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29389
|
-
|
|
29390
|
-
|
|
29391
|
-
|
|
29392
|
-
|
|
29393
|
-
|
|
29394
|
-
|
|
29395
|
-
|
|
29396
|
-
|
|
29397
|
-
map: () => map15,
|
|
29398
|
-
toFile: () => toFile,
|
|
29399
|
-
tracerLogger: () => tracerLogger2,
|
|
29400
|
-
withConsoleError: () => withConsoleError,
|
|
29401
|
-
withConsoleLog: () => withConsoleLog,
|
|
29402
|
-
withLeveledConsole: () => withLeveledConsole
|
|
29403
|
-
});
|
|
29404
|
-
var TypeId45 = "~effect/Logger";
|
|
29405
|
-
var isLogger = (u) => hasProperty(u, TypeId45);
|
|
29406
|
-
var CurrentLoggers2 = CurrentLoggers;
|
|
29407
|
-
var LogToStderr2 = LogToStderr;
|
|
29408
|
-
var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
|
|
29409
|
-
var withConsoleLog = (self) => loggerMake((options) => {
|
|
29410
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29411
|
-
return console.log(self.log(options));
|
|
29412
|
-
});
|
|
29413
|
-
var withConsoleError = (self) => loggerMake((options) => {
|
|
29414
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29415
|
-
return console.error(self.log(options));
|
|
29416
|
-
});
|
|
29417
|
-
var withLeveledConsole = (self) => loggerMake((options) => {
|
|
29418
|
-
const console = options.fiber.getRef(ConsoleRef);
|
|
29419
|
-
const output = self.log(options);
|
|
29420
|
-
switch (options.logLevel) {
|
|
29421
|
-
case "Debug":
|
|
29422
|
-
return console.debug(output);
|
|
29423
|
-
case "Info":
|
|
29424
|
-
return console.info(output);
|
|
29425
|
-
case "Trace":
|
|
29426
|
-
return console.trace(output);
|
|
29427
|
-
case "Warn":
|
|
29428
|
-
return console.warn(output);
|
|
29429
|
-
case "Error":
|
|
29430
|
-
case "Fatal":
|
|
29431
|
-
return console.error(output);
|
|
29432
|
-
default:
|
|
29433
|
-
return console.log(output);
|
|
29434
|
-
}
|
|
29192
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ConfigProvider.js
|
|
29193
|
+
function makeValue(value6) {
|
|
29194
|
+
return {
|
|
29195
|
+
_tag: "Value",
|
|
29196
|
+
value: value6
|
|
29197
|
+
};
|
|
29198
|
+
}
|
|
29199
|
+
function makeRecord(keys4, value6) {
|
|
29200
|
+
return {
|
|
29201
|
+
_tag: "Record",
|
|
29202
|
+
keys: keys4,
|
|
29203
|
+
value: value6
|
|
29204
|
+
};
|
|
29205
|
+
}
|
|
29206
|
+
function makeArray(length, value6) {
|
|
29207
|
+
return {
|
|
29208
|
+
_tag: "Array",
|
|
29209
|
+
length,
|
|
29210
|
+
value: value6
|
|
29211
|
+
};
|
|
29212
|
+
}
|
|
29213
|
+
var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
|
|
29214
|
+
defaultValue: () => fromEnv()
|
|
29435
29215
|
});
|
|
29436
|
-
var
|
|
29437
|
-
|
|
29438
|
-
|
|
29439
|
-
|
|
29440
|
-
|
|
29441
|
-
|
|
29442
|
-
fiber: fiber3,
|
|
29443
|
-
logLevel,
|
|
29444
|
-
message
|
|
29445
|
-
}) => {
|
|
29446
|
-
const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
|
|
29447
|
-
space
|
|
29448
|
-
});
|
|
29449
|
-
const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
|
|
29450
|
-
const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
|
|
29451
|
-
const append4 = (label, value6) => " " + format10(label, value6);
|
|
29452
|
-
let out = format10("timestamp", date2.toISOString());
|
|
29453
|
-
out += append4("level", logLevel.toUpperCase());
|
|
29454
|
-
out += append4("fiber", formatFiberId(fiber3.id));
|
|
29455
|
-
const messages = ensure(message);
|
|
29456
|
-
for (let i = 0; i < messages.length; i++) {
|
|
29457
|
-
out += append4("message", formatUnknown(messages[i]));
|
|
29458
|
-
}
|
|
29459
|
-
if (cause.reasons.length > 0) {
|
|
29460
|
-
out += append4("cause", causePretty(cause));
|
|
29461
|
-
}
|
|
29462
|
-
const now2 = date2.getTime();
|
|
29463
|
-
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29464
|
-
for (const span2 of spans) {
|
|
29465
|
-
out += " " + formatLogSpan(span2, now2);
|
|
29466
|
-
}
|
|
29467
|
-
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29468
|
-
for (const [label, value6] of Object.entries(annotations2)) {
|
|
29469
|
-
out += append4(label, formatUnknown(value6));
|
|
29216
|
+
var Proto8 = {
|
|
29217
|
+
...PipeInspectableProto,
|
|
29218
|
+
toJSON() {
|
|
29219
|
+
return {
|
|
29220
|
+
_id: "ConfigProvider"
|
|
29221
|
+
};
|
|
29470
29222
|
}
|
|
29471
|
-
return out;
|
|
29472
29223
|
};
|
|
29473
|
-
var
|
|
29474
|
-
|
|
29475
|
-
|
|
29476
|
-
|
|
29477
|
-
|
|
29478
|
-
|
|
29479
|
-
|
|
29480
|
-
|
|
29481
|
-
|
|
29482
|
-
|
|
29483
|
-
|
|
29484
|
-
|
|
29485
|
-
|
|
29486
|
-
|
|
29487
|
-
|
|
29488
|
-
|
|
29489
|
-
|
|
29490
|
-
const
|
|
29491
|
-
const
|
|
29492
|
-
|
|
29493
|
-
|
|
29494
|
-
|
|
29495
|
-
const
|
|
29496
|
-
|
|
29497
|
-
|
|
29498
|
-
level: logLevel.toUpperCase(),
|
|
29499
|
-
timestamp: date2.toISOString(),
|
|
29500
|
-
cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
|
|
29501
|
-
annotations: annotationsObj,
|
|
29502
|
-
spans: spansObj,
|
|
29503
|
-
fiberId: formatFiberId(fiber3.id)
|
|
29224
|
+
var identityPath = (path) => path;
|
|
29225
|
+
function makeProvider(load, mapInput4) {
|
|
29226
|
+
const self = Object.create(Proto8);
|
|
29227
|
+
self.load = load;
|
|
29228
|
+
self.mapInput = mapInput4;
|
|
29229
|
+
return self;
|
|
29230
|
+
}
|
|
29231
|
+
function makeSource(get12, transform4) {
|
|
29232
|
+
return makeProvider((path) => get12(transform4(path)), (f) => makeSource(get12, flow(transform4, f)));
|
|
29233
|
+
}
|
|
29234
|
+
function make39(get12) {
|
|
29235
|
+
return makeSource(get12, identityPath);
|
|
29236
|
+
}
|
|
29237
|
+
function emptyStringAsMissing(value6, preserveEmptyStrings) {
|
|
29238
|
+
return value6 === "" && !preserveEmptyStrings ? void 0 : value6;
|
|
29239
|
+
}
|
|
29240
|
+
function fromEnvRecord(env, options) {
|
|
29241
|
+
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
29242
|
+
const trie = buildEnvTrie(env);
|
|
29243
|
+
return make39((path) => succeed7(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
29244
|
+
}
|
|
29245
|
+
function fromEnv(options) {
|
|
29246
|
+
const env = options?.env ?? {
|
|
29247
|
+
...globalThis.process?.env,
|
|
29248
|
+
...import.meta?.env
|
|
29504
29249
|
};
|
|
29505
|
-
|
|
29506
|
-
|
|
29507
|
-
var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
|
|
29508
|
-
let buffer3 = [];
|
|
29509
|
-
const flush2 = suspend(() => {
|
|
29510
|
-
if (buffer3.length === 0) {
|
|
29511
|
-
return void_3;
|
|
29512
|
-
}
|
|
29513
|
-
const arr = buffer3;
|
|
29514
|
-
buffer3 = [];
|
|
29515
|
-
return options.flush(arr);
|
|
29250
|
+
return fromEnvRecord(env, {
|
|
29251
|
+
preserveEmptyStrings: options?.preserveEmptyStrings
|
|
29516
29252
|
});
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
}
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29527
|
-
|
|
29528
|
-
|
|
29529
|
-
|
|
29530
|
-
|
|
29531
|
-
|
|
29253
|
+
}
|
|
29254
|
+
function buildEnvTrie(env) {
|
|
29255
|
+
const trie = {};
|
|
29256
|
+
for (const [name, value6] of Object.entries(env)) {
|
|
29257
|
+
if (value6 === void 0) continue;
|
|
29258
|
+
const segments = name.split("_");
|
|
29259
|
+
let node = trie;
|
|
29260
|
+
for (const seg of segments) {
|
|
29261
|
+
const children = node.children ??= /* @__PURE__ */ Object.create(null);
|
|
29262
|
+
node = children[seg] ??= {};
|
|
29263
|
+
}
|
|
29264
|
+
}
|
|
29265
|
+
return trie;
|
|
29266
|
+
}
|
|
29267
|
+
function nodeAtEnv(trie, env, path, preserveEmptyStrings) {
|
|
29268
|
+
const key = path.map(String).join("_");
|
|
29269
|
+
const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0, preserveEmptyStrings);
|
|
29270
|
+
const trieNode = trieNodeAt(trie, path);
|
|
29271
|
+
const children = trieNode?.children ? Object.keys(trieNode.children) : [];
|
|
29272
|
+
if (children.length === 0) {
|
|
29273
|
+
return leafValue === void 0 ? void 0 : makeValue(leafValue);
|
|
29274
|
+
}
|
|
29275
|
+
const allNumeric = children.every(isCanonicalArrayIndex);
|
|
29276
|
+
if (allNumeric) {
|
|
29277
|
+
const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
|
|
29278
|
+
return makeArray(length, leafValue);
|
|
29532
29279
|
}
|
|
29533
|
-
return
|
|
29534
|
-
}
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
|
|
29539
|
-
|
|
29540
|
-
|
|
29541
|
-
|
|
29542
|
-
return
|
|
29543
|
-
|
|
29544
|
-
flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
|
|
29545
|
-
});
|
|
29546
|
-
}));
|
|
29280
|
+
return makeRecord(new Set(children), leafValue);
|
|
29281
|
+
}
|
|
29282
|
+
function trieNodeAt(root, path) {
|
|
29283
|
+
if (path.length === 0) return root;
|
|
29284
|
+
let node = root;
|
|
29285
|
+
for (const seg of path) {
|
|
29286
|
+
node = node?.children?.[String(seg)];
|
|
29287
|
+
if (!node) return void 0;
|
|
29288
|
+
}
|
|
29289
|
+
return node;
|
|
29290
|
+
}
|
|
29547
29291
|
|
|
29548
|
-
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/
|
|
29549
|
-
var
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29553
|
-
|
|
29554
|
-
|
|
29555
|
-
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
|
|
29562
|
-
}
|
|
29563
|
-
|
|
29564
|
-
|
|
29565
|
-
|
|
29566
|
-
|
|
29567
|
-
|
|
29568
|
-
|
|
29569
|
-
} : defaultRunOptions;
|
|
29570
|
-
let buildFiber;
|
|
29571
|
-
const contextEffect = withFiber2((fiber3) => {
|
|
29572
|
-
if (!buildFiber) {
|
|
29573
|
-
buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
|
|
29574
|
-
self.cachedContext = context3;
|
|
29575
|
-
})), {
|
|
29576
|
-
...defaultRunOptions,
|
|
29577
|
-
scheduler: fiber3.cache.scheduler
|
|
29578
|
-
});
|
|
29579
|
-
}
|
|
29580
|
-
return flatten5(await_(buildFiber));
|
|
29581
|
-
});
|
|
29582
|
-
const self = {
|
|
29583
|
-
[TypeId46]: TypeId46,
|
|
29584
|
-
memoMap,
|
|
29585
|
-
scope: scope3,
|
|
29586
|
-
contextEffect,
|
|
29587
|
-
cachedContext: void 0,
|
|
29588
|
-
context() {
|
|
29589
|
-
return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
|
|
29590
|
-
},
|
|
29591
|
-
dispose() {
|
|
29592
|
-
return runPromise2(self.disposeEffect);
|
|
29593
|
-
},
|
|
29594
|
-
[Symbol.asyncDispose]() {
|
|
29595
|
-
return self.dispose();
|
|
29596
|
-
},
|
|
29597
|
-
disposeEffect: suspend3(() => {
|
|
29598
|
-
;
|
|
29599
|
-
self.contextEffect = die5("ManagedRuntime disposed");
|
|
29600
|
-
self.cachedContext = void 0;
|
|
29601
|
-
return close(self.scope, void_4);
|
|
29602
|
-
}),
|
|
29603
|
-
runFork(effect2, options2) {
|
|
29604
|
-
return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29605
|
-
},
|
|
29606
|
-
runCallback(effect2, options2) {
|
|
29607
|
-
return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29608
|
-
},
|
|
29609
|
-
runSyncExit(effect2) {
|
|
29610
|
-
return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
|
|
29611
|
-
},
|
|
29612
|
-
runSync(effect2) {
|
|
29613
|
-
return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
|
|
29614
|
-
},
|
|
29615
|
-
runPromiseExit(effect2, options2) {
|
|
29616
|
-
return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29617
|
-
},
|
|
29618
|
-
runPromise(effect2, options2) {
|
|
29619
|
-
return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29292
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Config.js
|
|
29293
|
+
var TypeId44 = "~effect/Config";
|
|
29294
|
+
var ConfigError = class {
|
|
29295
|
+
_tag = "ConfigError";
|
|
29296
|
+
name = "ConfigError";
|
|
29297
|
+
cause;
|
|
29298
|
+
constructor(cause) {
|
|
29299
|
+
this.cause = cause;
|
|
29300
|
+
}
|
|
29301
|
+
get message() {
|
|
29302
|
+
return this.cause.toString();
|
|
29303
|
+
}
|
|
29304
|
+
toString() {
|
|
29305
|
+
return `ConfigError(${this.message})`;
|
|
29306
|
+
}
|
|
29307
|
+
};
|
|
29308
|
+
var Proto9 = {
|
|
29309
|
+
.../* @__PURE__ */ Prototype2({
|
|
29310
|
+
label: "Config",
|
|
29311
|
+
evaluate(fiber3) {
|
|
29312
|
+
return this.parse(fiber3.getRef(ConfigProvider));
|
|
29620
29313
|
}
|
|
29621
|
-
}
|
|
29622
|
-
|
|
29314
|
+
}),
|
|
29315
|
+
[TypeId44]: TypeId44,
|
|
29316
|
+
toJSON() {
|
|
29317
|
+
return {
|
|
29318
|
+
_id: "Config"
|
|
29319
|
+
};
|
|
29320
|
+
}
|
|
29623
29321
|
};
|
|
29624
|
-
function
|
|
29625
|
-
|
|
29322
|
+
function make40(evaluator) {
|
|
29323
|
+
const self = Object.create(Proto9);
|
|
29324
|
+
self.evaluator = evaluator;
|
|
29325
|
+
self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager2((failure) => failure.error), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolution.value) : fail7(resolution.error)));
|
|
29326
|
+
return self;
|
|
29626
29327
|
}
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29632
|
-
bigint: () => bigint,
|
|
29633
|
-
boolean: () => boolean2,
|
|
29634
|
-
date: () => date,
|
|
29635
|
-
defined: () => defined2,
|
|
29636
|
-
discriminator: () => discriminator2,
|
|
29637
|
-
discriminatorStartsWith: () => discriminatorStartsWith2,
|
|
29638
|
-
discriminators: () => discriminators2,
|
|
29639
|
-
discriminatorsExhaustive: () => discriminatorsExhaustive2,
|
|
29640
|
-
exhaustive: () => exhaustive2,
|
|
29641
|
-
fn: () => fn4,
|
|
29642
|
-
instanceOf: () => instanceOf3,
|
|
29643
|
-
instanceOfUnsafe: () => instanceOfUnsafe,
|
|
29644
|
-
is: () => is4,
|
|
29645
|
-
nonEmptyString: () => nonEmptyString2,
|
|
29646
|
-
not: () => not3,
|
|
29647
|
-
null: () => _null,
|
|
29648
|
-
number: () => number3,
|
|
29649
|
-
option: () => option5,
|
|
29650
|
-
orElse: () => orElse5,
|
|
29651
|
-
orElseAbsurd: () => orElseAbsurd2,
|
|
29652
|
-
record: () => record2,
|
|
29653
|
-
result: () => result5,
|
|
29654
|
-
string: () => string3,
|
|
29655
|
-
symbol: () => symbol5,
|
|
29656
|
-
tag: () => tag3,
|
|
29657
|
-
tagStartsWith: () => tagStartsWith2,
|
|
29658
|
-
tags: () => tags2,
|
|
29659
|
-
tagsExhaustive: () => tagsExhaustive2,
|
|
29660
|
-
type: () => type2,
|
|
29661
|
-
typeTags: () => typeTags2,
|
|
29662
|
-
undefined: () => _undefined,
|
|
29663
|
-
value: () => value5,
|
|
29664
|
-
valueTags: () => valueTags2,
|
|
29665
|
-
when: () => when5,
|
|
29666
|
-
whenAnd: () => whenAnd2,
|
|
29667
|
-
whenOr: () => whenOr2,
|
|
29668
|
-
withReturnType: () => withReturnType2
|
|
29328
|
+
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
29329
|
+
var resolved = (value6, hasInput2) => ({
|
|
29330
|
+
_tag: "Resolved",
|
|
29331
|
+
value: value6,
|
|
29332
|
+
hasInput: hasInput2
|
|
29669
29333
|
});
|
|
29670
|
-
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29677
|
-
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
|
|
29682
|
-
_tag
|
|
29683
|
-
add(_case) {
|
|
29684
|
-
return makeTypeMatcher(this.select, [...this.cases, _case]);
|
|
29685
|
-
},
|
|
29686
|
-
pipe() {
|
|
29687
|
-
return pipeArguments(this, arguments);
|
|
29688
|
-
}
|
|
29334
|
+
var absent = (error) => ({
|
|
29335
|
+
_tag: "Absent",
|
|
29336
|
+
error
|
|
29337
|
+
});
|
|
29338
|
+
var evaluationFailure = (error, hasInput2) => ({
|
|
29339
|
+
error,
|
|
29340
|
+
hasInput: hasInput2
|
|
29341
|
+
});
|
|
29342
|
+
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
29343
|
+
var catchSourceError = (self, hasInput2) => self.pipe(catchDefect2((defect) => isSourceError(defect) ? fail7(evaluationFailure(new ConfigError(defect), hasInput2)) : die5(defect)));
|
|
29344
|
+
var preserveInputEvidence = (self, hasInput2) => {
|
|
29345
|
+
if (!hasInput2) return self;
|
|
29346
|
+
return self.pipe(mapErrorEager2((failure) => evaluationFailure(failure.error, true)), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolved(resolution.value, true)) : fail7(evaluationFailure(resolution.error, true))));
|
|
29689
29347
|
};
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
return
|
|
29348
|
+
var map14 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
29349
|
+
return make40((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
|
|
29350
|
+
});
|
|
29351
|
+
var orElse5 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
29352
|
+
return make40((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
|
|
29353
|
+
onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
|
|
29354
|
+
onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
|
|
29355
|
+
}));
|
|
29356
|
+
});
|
|
29357
|
+
function all5(arg) {
|
|
29358
|
+
const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
29359
|
+
if (globalThis.Array.isArray(configs)) {
|
|
29360
|
+
return make40((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
|
|
29361
|
+
} else {
|
|
29362
|
+
return make40((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
|
|
29363
|
+
}
|
|
29695
29364
|
}
|
|
29696
|
-
var
|
|
29697
|
-
[
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29365
|
+
var resolveArray = (results) => {
|
|
29366
|
+
const values2 = [];
|
|
29367
|
+
let firstFailure;
|
|
29368
|
+
let firstAbsent;
|
|
29369
|
+
let hasInput2 = false;
|
|
29370
|
+
for (const result6 of results) {
|
|
29371
|
+
if (isFailure2(result6)) {
|
|
29372
|
+
firstFailure ??= result6.failure;
|
|
29373
|
+
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
29374
|
+
continue;
|
|
29375
|
+
}
|
|
29376
|
+
const resolution = result6.success;
|
|
29377
|
+
if (resolution._tag === "Absent") {
|
|
29378
|
+
firstAbsent ??= resolution;
|
|
29379
|
+
} else {
|
|
29380
|
+
values2.push(resolution.value);
|
|
29381
|
+
hasInput2 = hasInput2 || resolution.hasInput;
|
|
29382
|
+
}
|
|
29383
|
+
}
|
|
29384
|
+
if (firstFailure !== void 0) {
|
|
29385
|
+
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
29386
|
+
}
|
|
29387
|
+
if (firstAbsent !== void 0) {
|
|
29388
|
+
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
29389
|
+
}
|
|
29390
|
+
return succeed7(resolved(values2, hasInput2));
|
|
29391
|
+
};
|
|
29392
|
+
var resolveRecord = (results) => {
|
|
29393
|
+
const values2 = {};
|
|
29394
|
+
let firstFailure;
|
|
29395
|
+
let firstAbsent;
|
|
29396
|
+
let hasInput2 = false;
|
|
29397
|
+
for (const key in results) {
|
|
29398
|
+
const result6 = results[key];
|
|
29399
|
+
if (isFailure2(result6)) {
|
|
29400
|
+
firstFailure ??= result6.failure;
|
|
29401
|
+
hasInput2 = hasInput2 || result6.failure.hasInput;
|
|
29402
|
+
continue;
|
|
29708
29403
|
}
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29404
|
+
const resolution = result6.success;
|
|
29405
|
+
if (resolution._tag === "Absent") {
|
|
29406
|
+
firstAbsent ??= resolution;
|
|
29407
|
+
} else {
|
|
29408
|
+
assignProperty(values2, key, resolution.value);
|
|
29409
|
+
hasInput2 = hasInput2 || resolution.hasInput;
|
|
29713
29410
|
}
|
|
29714
|
-
return this;
|
|
29715
|
-
},
|
|
29716
|
-
pipe() {
|
|
29717
|
-
return pipeArguments(this, arguments);
|
|
29718
29411
|
}
|
|
29412
|
+
if (firstFailure !== void 0) {
|
|
29413
|
+
return fail7(evaluationFailure(firstFailure.error, hasInput2));
|
|
29414
|
+
}
|
|
29415
|
+
if (firstAbsent !== void 0) {
|
|
29416
|
+
return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
|
|
29417
|
+
}
|
|
29418
|
+
return succeed7(resolved(values2, hasInput2));
|
|
29719
29419
|
};
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
matcher.provided = provided;
|
|
29723
|
-
matcher.value = value6;
|
|
29724
|
-
return matcher;
|
|
29725
|
-
}
|
|
29726
|
-
var makeWhen = (guard, evaluate2) => ({
|
|
29727
|
-
_tag: "When",
|
|
29728
|
-
guard,
|
|
29729
|
-
evaluate: evaluate2
|
|
29730
|
-
});
|
|
29731
|
-
var makeNot = (guard, evaluate2) => ({
|
|
29732
|
-
_tag: "Not",
|
|
29733
|
-
guard,
|
|
29734
|
-
evaluate: evaluate2
|
|
29420
|
+
var withDefault2 = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
29421
|
+
return make40((provider, pathPrefix) => mapEager2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
|
|
29735
29422
|
});
|
|
29736
|
-
var
|
|
29737
|
-
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29423
|
+
var option5 = (self) => self.pipe(map14(some3), withDefault2(none2()));
|
|
29424
|
+
var cursorToString = () => "<configuration>";
|
|
29425
|
+
var loadCursor = (provider, path) => provider.load(path).pipe(orDie3, mapEager2((node) => ({
|
|
29426
|
+
provider,
|
|
29427
|
+
path,
|
|
29428
|
+
node,
|
|
29429
|
+
toString: cursorToString
|
|
29430
|
+
})));
|
|
29431
|
+
var loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
|
|
29432
|
+
var getScalar = (node) => node?.value;
|
|
29433
|
+
var decodeFromCursor = (ast, decode3) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode3(input)), passthrough2()));
|
|
29434
|
+
var isScalarInput = (ast) => {
|
|
29435
|
+
switch (ast._tag) {
|
|
29436
|
+
case "Union":
|
|
29437
|
+
return ast.types.every(isScalarInput);
|
|
29438
|
+
case "Objects":
|
|
29439
|
+
case "Arrays":
|
|
29440
|
+
case "Suspend":
|
|
29441
|
+
return false;
|
|
29442
|
+
default:
|
|
29751
29443
|
return true;
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29757
|
-
|
|
29758
|
-
|
|
29444
|
+
}
|
|
29445
|
+
};
|
|
29446
|
+
var hasProviderInput = (ast, node) => {
|
|
29447
|
+
switch (ast._tag) {
|
|
29448
|
+
case "Objects":
|
|
29449
|
+
return node?._tag === "Record";
|
|
29450
|
+
case "Arrays":
|
|
29451
|
+
return node?._tag === "Array";
|
|
29452
|
+
case "Union":
|
|
29453
|
+
return ast.types.some((ast2) => hasProviderInput(ast2, node));
|
|
29454
|
+
case "Suspend":
|
|
29455
|
+
return hasProviderInput(ast.thunk(), node);
|
|
29456
|
+
default:
|
|
29457
|
+
return getScalar(node) !== void 0;
|
|
29458
|
+
}
|
|
29459
|
+
};
|
|
29460
|
+
var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
29461
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
29462
|
+
const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
|
|
29463
|
+
seen.add(ast);
|
|
29464
|
+
switch (ast._tag) {
|
|
29465
|
+
case "Objects": {
|
|
29466
|
+
const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
|
|
29467
|
+
const materialize = fnUntraced2(function* (cursor) {
|
|
29468
|
+
if (cursor.node?._tag !== "Record") {
|
|
29469
|
+
return void 0;
|
|
29470
|
+
}
|
|
29471
|
+
const node = cursor.node;
|
|
29472
|
+
const keys4 = /* @__PURE__ */ new Set();
|
|
29473
|
+
for (const property of ast.propertySignatures) {
|
|
29474
|
+
if (typeof property.name === "string") keys4.add(property.name);
|
|
29475
|
+
}
|
|
29476
|
+
if (matchesIndex.length > 0) {
|
|
29477
|
+
for (const key of node.keys) {
|
|
29478
|
+
if (matchesIndex.some((matches) => matches(key))) keys4.add(key);
|
|
29479
|
+
}
|
|
29480
|
+
}
|
|
29481
|
+
const out = {};
|
|
29482
|
+
for (const key of keys4) {
|
|
29483
|
+
const child = yield* loadChildCursor(cursor, key);
|
|
29484
|
+
if (child.node !== void 0) assignProperty(out, key, child);
|
|
29485
|
+
}
|
|
29486
|
+
return out;
|
|
29487
|
+
});
|
|
29488
|
+
return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
|
|
29759
29489
|
}
|
|
29760
|
-
|
|
29761
|
-
const
|
|
29762
|
-
|
|
29763
|
-
|
|
29490
|
+
case "Arrays": {
|
|
29491
|
+
const materialize = fnUntraced2(function* (cursor) {
|
|
29492
|
+
if (cursor.node?._tag !== "Array") {
|
|
29493
|
+
return void 0;
|
|
29494
|
+
}
|
|
29495
|
+
const out = [];
|
|
29496
|
+
for (let i = 0; i < cursor.node.length; i++) {
|
|
29497
|
+
out.push(yield* loadChildCursor(cursor, i));
|
|
29498
|
+
}
|
|
29499
|
+
return out;
|
|
29500
|
+
});
|
|
29501
|
+
return decodeFromCursor(ast.recur(recur2), materialize);
|
|
29502
|
+
}
|
|
29503
|
+
case "Union":
|
|
29504
|
+
for (const member of ast.types) {
|
|
29505
|
+
recur2(member);
|
|
29764
29506
|
}
|
|
29507
|
+
return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node))) : ast.recur(recur2);
|
|
29508
|
+
case "Suspend": {
|
|
29509
|
+
const target = ast.thunk();
|
|
29510
|
+
if (!seen.has(target)) recur2(target);
|
|
29511
|
+
return ast.recur(recur2);
|
|
29765
29512
|
}
|
|
29766
|
-
|
|
29513
|
+
case "Declaration":
|
|
29514
|
+
case "Any":
|
|
29515
|
+
throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
|
|
29516
|
+
cause: ast
|
|
29517
|
+
});
|
|
29518
|
+
default:
|
|
29519
|
+
return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
|
|
29520
|
+
}
|
|
29521
|
+
});
|
|
29522
|
+
return recur2(root);
|
|
29523
|
+
});
|
|
29524
|
+
function schema(codec, path) {
|
|
29525
|
+
const codecStringTree = toCodecStringTree2(codec);
|
|
29526
|
+
const encodedAst = toEncoded(codecStringTree.ast);
|
|
29527
|
+
const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
|
|
29528
|
+
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
29529
|
+
return make40((provider, pathPrefix) => {
|
|
29530
|
+
const fullPath = [...pathPrefix, ...localPath];
|
|
29531
|
+
return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
|
|
29532
|
+
const hasInput2 = hasProviderInput(encodedAst, cursor.node);
|
|
29533
|
+
return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
|
|
29534
|
+
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
29535
|
+
return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
|
|
29536
|
+
})), hasInput2);
|
|
29537
|
+
}));
|
|
29538
|
+
});
|
|
29539
|
+
}
|
|
29540
|
+
var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
|
|
29541
|
+
function String7(name) {
|
|
29542
|
+
return schema(String6, name);
|
|
29543
|
+
}
|
|
29544
|
+
function Int2(name) {
|
|
29545
|
+
return schema(Int, name);
|
|
29546
|
+
}
|
|
29547
|
+
function Literals2(literals, name) {
|
|
29548
|
+
return schema(Literals(literals), name);
|
|
29549
|
+
}
|
|
29550
|
+
function Array3(value6, pathOrOptions, options) {
|
|
29551
|
+
const hasPath = isPath(pathOrOptions);
|
|
29552
|
+
const resolvedOptions = hasPath ? options : pathOrOptions;
|
|
29553
|
+
const array2 = ArraySchema(value6);
|
|
29554
|
+
const separator = resolvedOptions?.separator ?? ",";
|
|
29555
|
+
const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
|
|
29556
|
+
decode: split(resolvedOptions),
|
|
29557
|
+
encode: passthrough2({
|
|
29558
|
+
strict: false
|
|
29559
|
+
}).compose(transform((input) => input.join(separator)))
|
|
29560
|
+
}));
|
|
29561
|
+
return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
|
|
29562
|
+
}
|
|
29563
|
+
function Record2(key, value6, pathOrOptions, options) {
|
|
29564
|
+
const hasPath = isPath(pathOrOptions);
|
|
29565
|
+
const record3 = Record(key, value6);
|
|
29566
|
+
const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
|
|
29567
|
+
const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
|
|
29568
|
+
decode: split3.decode,
|
|
29569
|
+
encode: passthrough2({
|
|
29570
|
+
strict: false
|
|
29571
|
+
}).compose(split3.encode)
|
|
29572
|
+
}));
|
|
29573
|
+
return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
|
|
29574
|
+
}
|
|
29575
|
+
function Boolean4(name) {
|
|
29576
|
+
return schema(BooleanLiterals, name);
|
|
29577
|
+
}
|
|
29578
|
+
function URL3(name) {
|
|
29579
|
+
return schema(URL2, name);
|
|
29580
|
+
}
|
|
29581
|
+
|
|
29582
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
|
|
29583
|
+
var ignore5 = "~effect/ErrorReporter/ignore";
|
|
29584
|
+
|
|
29585
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
|
|
29586
|
+
var FiberSet_exports = {};
|
|
29587
|
+
__export(FiberSet_exports, {
|
|
29588
|
+
add: () => add4,
|
|
29589
|
+
addUnsafe: () => addUnsafe2,
|
|
29590
|
+
awaitEmpty: () => awaitEmpty,
|
|
29591
|
+
clear: () => clear4,
|
|
29592
|
+
isFiberSet: () => isFiberSet,
|
|
29593
|
+
join: () => join3,
|
|
29594
|
+
make: () => make41,
|
|
29595
|
+
makeRuntime: () => makeRuntime,
|
|
29596
|
+
makeRuntimePromise: () => makeRuntimePromise,
|
|
29597
|
+
run: () => run3,
|
|
29598
|
+
runtime: () => runtime,
|
|
29599
|
+
runtimePromise: () => runtimePromise,
|
|
29600
|
+
size: () => size8
|
|
29601
|
+
});
|
|
29602
|
+
var TypeId45 = "~effect/FiberSet";
|
|
29603
|
+
var isFiberSet = (u) => hasProperty(u, TypeId45);
|
|
29604
|
+
var Proto10 = {
|
|
29605
|
+
[TypeId45]: TypeId45,
|
|
29606
|
+
[Symbol.iterator]() {
|
|
29607
|
+
if (this.state._tag === "Closed") {
|
|
29608
|
+
return empty2();
|
|
29609
|
+
}
|
|
29610
|
+
return this.state.backing[Symbol.iterator]();
|
|
29611
|
+
},
|
|
29612
|
+
...PipeInspectableProto,
|
|
29613
|
+
toJSON() {
|
|
29614
|
+
return {
|
|
29615
|
+
_id: "FiberSet",
|
|
29616
|
+
state: this.state
|
|
29767
29617
|
};
|
|
29768
29618
|
}
|
|
29769
|
-
return (u) => u === pattern;
|
|
29770
29619
|
};
|
|
29771
|
-
var
|
|
29772
|
-
const
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
if (predicates[i](u) === true) {
|
|
29777
|
-
return true;
|
|
29778
|
-
}
|
|
29779
|
-
}
|
|
29780
|
-
return false;
|
|
29620
|
+
var makeUnsafe11 = (backing, deferred) => {
|
|
29621
|
+
const self = Object.create(Proto10);
|
|
29622
|
+
self.state = {
|
|
29623
|
+
_tag: "Open",
|
|
29624
|
+
backing
|
|
29781
29625
|
};
|
|
29626
|
+
self.deferred = deferred;
|
|
29627
|
+
return self;
|
|
29782
29628
|
};
|
|
29783
|
-
var
|
|
29784
|
-
const
|
|
29785
|
-
|
|
29786
|
-
|
|
29787
|
-
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
|
|
29629
|
+
var make41 = () => acquireRelease2(sync4(() => makeUnsafe11(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
|
|
29630
|
+
const state = set10.state;
|
|
29631
|
+
if (state._tag === "Closed") return void_5;
|
|
29632
|
+
set10.state = {
|
|
29633
|
+
_tag: "Closed"
|
|
29634
|
+
};
|
|
29635
|
+
const fibers = state.backing;
|
|
29636
|
+
return interruptAll(fibers).pipe(into(set10.deferred));
|
|
29637
|
+
}));
|
|
29638
|
+
var makeRuntime = () => flatMap5(make41(), (self) => runtime(self)());
|
|
29639
|
+
var makeRuntimePromise = () => flatMap5(make41(), (self) => runtimePromise(self)());
|
|
29640
|
+
var internalFiberId = -1;
|
|
29641
|
+
var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose2(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
|
|
29642
|
+
var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
|
|
29643
|
+
if (self.state._tag === "Closed") {
|
|
29644
|
+
fiber3.interruptUnsafe(internalFiberId);
|
|
29645
|
+
return;
|
|
29646
|
+
} else if (self.state.backing.has(fiber3)) {
|
|
29647
|
+
return;
|
|
29648
|
+
}
|
|
29649
|
+
self.state.backing.add(fiber3);
|
|
29650
|
+
fiber3.addObserver((exit3) => {
|
|
29651
|
+
if (self.state._tag === "Closed") {
|
|
29652
|
+
return;
|
|
29791
29653
|
}
|
|
29792
|
-
|
|
29654
|
+
self.state.backing.delete(fiber3);
|
|
29655
|
+
if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
|
|
29656
|
+
doneUnsafe(self.deferred, exit3);
|
|
29657
|
+
}
|
|
29658
|
+
});
|
|
29659
|
+
});
|
|
29660
|
+
var add4 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => sync4(() => addUnsafe2(self, fiber3, options)));
|
|
29661
|
+
var clear4 = (self) => suspend3(() => {
|
|
29662
|
+
if (self.state._tag === "Closed") {
|
|
29663
|
+
return void_5;
|
|
29664
|
+
}
|
|
29665
|
+
return interruptAllAs(self.state.backing, internalFiberId);
|
|
29666
|
+
});
|
|
29667
|
+
var constInterruptedFiber = /* @__PURE__ */ (function() {
|
|
29668
|
+
let fiber3 = void 0;
|
|
29669
|
+
return () => {
|
|
29670
|
+
if (fiber3 === void 0) {
|
|
29671
|
+
fiber3 = runFork2(interrupt5);
|
|
29672
|
+
}
|
|
29673
|
+
return fiber3;
|
|
29793
29674
|
};
|
|
29675
|
+
})();
|
|
29676
|
+
var run3 = function() {
|
|
29677
|
+
const self = arguments[0];
|
|
29678
|
+
if (!isEffect2(arguments[1])) {
|
|
29679
|
+
const options = arguments[1];
|
|
29680
|
+
return (effect2) => runImpl(self, effect2, options);
|
|
29681
|
+
}
|
|
29682
|
+
return runImpl(self, arguments[1], arguments[2]);
|
|
29794
29683
|
};
|
|
29795
|
-
var
|
|
29796
|
-
|
|
29797
|
-
|
|
29798
|
-
|
|
29799
|
-
const
|
|
29800
|
-
|
|
29684
|
+
var runImpl = (self, effect2, options) => withFiber2((parent) => {
|
|
29685
|
+
if (self.state._tag === "Closed") {
|
|
29686
|
+
return sync4(constInterruptedFiber);
|
|
29687
|
+
}
|
|
29688
|
+
const fiber3 = runForkWith2(parent.context)(effect2);
|
|
29689
|
+
addUnsafe2(self, fiber3, options);
|
|
29690
|
+
return succeed7(fiber3);
|
|
29801
29691
|
});
|
|
29802
|
-
var
|
|
29803
|
-
const
|
|
29804
|
-
return (
|
|
29805
|
-
|
|
29806
|
-
|
|
29807
|
-
var when4 = (pattern, f) => (self) => self.add(makeWhen(makePredicate(pattern), f));
|
|
29808
|
-
var whenOr = (...args2) => (self) => {
|
|
29809
|
-
const onMatch = args2[args2.length - 1];
|
|
29810
|
-
const patterns = args2.slice(0, -1);
|
|
29811
|
-
return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
|
|
29812
|
-
};
|
|
29813
|
-
var whenAnd = (...args2) => (self) => {
|
|
29814
|
-
const onMatch = args2[args2.length - 1];
|
|
29815
|
-
const patterns = args2.slice(0, -1);
|
|
29816
|
-
return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
|
|
29817
|
-
};
|
|
29818
|
-
var discriminator = (field) => (...pattern) => {
|
|
29819
|
-
const f = pattern[pattern.length - 1];
|
|
29820
|
-
const values2 = pattern.slice(0, -1);
|
|
29821
|
-
const pred = values2.length === 1 ? (_) => _ != null && _[field] === values2[0] : (_) => _ != null && values2.includes(_[field]);
|
|
29822
|
-
return (self) => self.add(makeWhen(pred, f));
|
|
29823
|
-
};
|
|
29824
|
-
var discriminatorStartsWith = (field) => (pattern, f) => {
|
|
29825
|
-
const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
|
|
29826
|
-
return (self) => self.add(makeWhen(pred, f));
|
|
29827
|
-
};
|
|
29828
|
-
var discriminators = (field) => (fields) => {
|
|
29829
|
-
const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
|
|
29830
|
-
return (self) => self.add(predicate);
|
|
29831
|
-
};
|
|
29832
|
-
var discriminatorsExhaustive = (field) => (fields) => {
|
|
29833
|
-
const addCases = discriminators(field)(fields);
|
|
29834
|
-
return (matcher) => exhaustive(addCases(matcher));
|
|
29835
|
-
};
|
|
29836
|
-
var tag2 = /* @__PURE__ */ discriminator("_tag");
|
|
29837
|
-
var tagStartsWith = /* @__PURE__ */ discriminatorStartsWith("_tag");
|
|
29838
|
-
var tags = /* @__PURE__ */ discriminators("_tag");
|
|
29839
|
-
var tagsExhaustive = /* @__PURE__ */ discriminatorsExhaustive("_tag");
|
|
29840
|
-
var not2 = (pattern, f) => (self) => self.add(makeNot(makePredicate(pattern), f));
|
|
29841
|
-
var nonEmptyString = (u) => typeof u === "string" && u.length > 0;
|
|
29842
|
-
var is3 = (...literals) => {
|
|
29843
|
-
const len = literals.length;
|
|
29844
|
-
return (u) => {
|
|
29845
|
-
for (let i = 0; i < len; i++) {
|
|
29846
|
-
if (u === literals[i]) {
|
|
29847
|
-
return true;
|
|
29848
|
-
}
|
|
29692
|
+
var runtime = (self) => () => map9(context2(), (services) => {
|
|
29693
|
+
const runFork3 = runForkWith2(services);
|
|
29694
|
+
return (effect2, options) => {
|
|
29695
|
+
if (self.state._tag === "Closed") {
|
|
29696
|
+
return constInterruptedFiber();
|
|
29849
29697
|
}
|
|
29850
|
-
|
|
29698
|
+
const fiber3 = runFork3(effect2, options);
|
|
29699
|
+
addUnsafe2(self, fiber3, options);
|
|
29700
|
+
return fiber3;
|
|
29851
29701
|
};
|
|
29852
|
-
};
|
|
29853
|
-
var
|
|
29854
|
-
|
|
29855
|
-
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29702
|
+
});
|
|
29703
|
+
var runtimePromise = (self) => () => map9(runtime(self)(), (runFork3) => (effect2, options) => new Promise((resolve4, reject) => runFork3(effect2, options).addObserver((exit3) => {
|
|
29704
|
+
if (isSuccess4(exit3)) {
|
|
29705
|
+
resolve4(exit3.value);
|
|
29706
|
+
} else {
|
|
29707
|
+
reject(squash(exit3.cause));
|
|
29708
|
+
}
|
|
29709
|
+
})));
|
|
29710
|
+
var size8 = (self) => sync4(() => self.state._tag === "Closed" ? 0 : self.state.backing.size);
|
|
29711
|
+
var join3 = (self) => _await(self.deferred);
|
|
29712
|
+
var awaitEmpty = (self) => whileLoop2({
|
|
29713
|
+
while: () => self.state._tag === "Open" && self.state.backing.size > 0,
|
|
29714
|
+
body: () => await_(headUnsafe(self)),
|
|
29715
|
+
step: constVoid
|
|
29716
|
+
});
|
|
29717
|
+
|
|
29718
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PrimaryKey.js
|
|
29719
|
+
var symbol5 = "~effect/PrimaryKey";
|
|
29720
|
+
|
|
29721
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Logger.js
|
|
29722
|
+
var Logger_exports = {};
|
|
29723
|
+
__export(Logger_exports, {
|
|
29724
|
+
CurrentLoggers: () => CurrentLoggers2,
|
|
29725
|
+
LogToStderr: () => LogToStderr2,
|
|
29726
|
+
batched: () => batched,
|
|
29727
|
+
consoleJson: () => consoleJson,
|
|
29728
|
+
consoleLogFmt: () => consoleLogFmt,
|
|
29729
|
+
consolePretty: () => consolePretty2,
|
|
29730
|
+
consolePrettyBrowser: () => consolePrettyBrowser,
|
|
29731
|
+
consolePrettyTty: () => consolePrettyTty,
|
|
29732
|
+
consoleStructured: () => consoleStructured,
|
|
29733
|
+
defaultLogger: () => defaultLogger2,
|
|
29734
|
+
formatJson: () => formatJson2,
|
|
29735
|
+
formatLogFmt: () => formatLogFmt,
|
|
29736
|
+
formatSimple: () => formatSimple,
|
|
29737
|
+
formatStructured: () => formatStructured,
|
|
29738
|
+
isLogger: () => isLogger,
|
|
29739
|
+
layer: () => layer,
|
|
29740
|
+
make: () => make42,
|
|
29741
|
+
map: () => map15,
|
|
29742
|
+
toFile: () => toFile,
|
|
29743
|
+
tracerLogger: () => tracerLogger2,
|
|
29744
|
+
withConsoleError: () => withConsoleError,
|
|
29745
|
+
withConsoleLog: () => withConsoleLog,
|
|
29746
|
+
withLeveledConsole: () => withLeveledConsole
|
|
29747
|
+
});
|
|
29748
|
+
var TypeId46 = "~effect/Logger";
|
|
29749
|
+
var isLogger = (u) => hasProperty(u, TypeId46);
|
|
29750
|
+
var CurrentLoggers2 = CurrentLoggers;
|
|
29751
|
+
var LogToStderr2 = LogToStderr;
|
|
29752
|
+
var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
|
|
29753
|
+
var withConsoleLog = (self) => loggerMake((options) => {
|
|
29754
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29755
|
+
return console.log(self.log(options));
|
|
29756
|
+
});
|
|
29757
|
+
var withConsoleError = (self) => loggerMake((options) => {
|
|
29758
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29759
|
+
return console.error(self.log(options));
|
|
29760
|
+
});
|
|
29761
|
+
var withLeveledConsole = (self) => loggerMake((options) => {
|
|
29762
|
+
const console = options.fiber.getRef(ConsoleRef);
|
|
29763
|
+
const output = self.log(options);
|
|
29764
|
+
switch (options.logLevel) {
|
|
29765
|
+
case "Debug":
|
|
29766
|
+
return console.debug(output);
|
|
29767
|
+
case "Info":
|
|
29768
|
+
return console.info(output);
|
|
29769
|
+
case "Trace":
|
|
29770
|
+
return console.trace(output);
|
|
29771
|
+
case "Warn":
|
|
29772
|
+
return console.warn(output);
|
|
29773
|
+
case "Error":
|
|
29774
|
+
case "Fatal":
|
|
29775
|
+
return console.error(output);
|
|
29776
|
+
default:
|
|
29777
|
+
return console.log(output);
|
|
29778
|
+
}
|
|
29779
|
+
});
|
|
29780
|
+
var textOnly = /^[^\s"=]*$/;
|
|
29781
|
+
var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
|
|
29782
|
+
var formatFiberId = (fiberId3) => `#${fiberId3}`;
|
|
29783
|
+
var format9 = (quoteValue, space) => ({
|
|
29784
|
+
cause,
|
|
29785
|
+
date: date2,
|
|
29786
|
+
fiber: fiber3,
|
|
29787
|
+
logLevel,
|
|
29788
|
+
message
|
|
29789
|
+
}) => {
|
|
29790
|
+
const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
|
|
29791
|
+
space
|
|
29792
|
+
});
|
|
29793
|
+
const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
|
|
29794
|
+
const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
|
|
29795
|
+
const append4 = (label, value6) => " " + format10(label, value6);
|
|
29796
|
+
let out = format10("timestamp", date2.toISOString());
|
|
29797
|
+
out += append4("level", logLevel.toUpperCase());
|
|
29798
|
+
out += append4("fiber", formatFiberId(fiber3.id));
|
|
29799
|
+
const messages = ensure(message);
|
|
29800
|
+
for (let i = 0; i < messages.length; i++) {
|
|
29801
|
+
out += append4("message", formatUnknown(messages[i]));
|
|
29860
29802
|
}
|
|
29861
|
-
|
|
29862
|
-
|
|
29863
|
-
|
|
29864
|
-
|
|
29803
|
+
if (cause.reasons.length > 0) {
|
|
29804
|
+
out += append4("cause", causePretty(cause));
|
|
29805
|
+
}
|
|
29806
|
+
const now2 = date2.getTime();
|
|
29807
|
+
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29808
|
+
for (const span2 of spans) {
|
|
29809
|
+
out += " " + formatLogSpan(span2, now2);
|
|
29810
|
+
}
|
|
29811
|
+
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29812
|
+
for (const [label, value6] of Object.entries(annotations2)) {
|
|
29813
|
+
out += append4(label, formatUnknown(value6));
|
|
29814
|
+
}
|
|
29815
|
+
return out;
|
|
29865
29816
|
};
|
|
29866
|
-
var
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
var
|
|
29870
|
-
|
|
29871
|
-
|
|
29817
|
+
var make42 = loggerMake;
|
|
29818
|
+
var defaultLogger2 = defaultLogger;
|
|
29819
|
+
var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(escapeDoubleQuotes));
|
|
29820
|
+
var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(JSON.stringify, 0));
|
|
29821
|
+
var formatStructured = /* @__PURE__ */ loggerMake(({
|
|
29822
|
+
cause,
|
|
29823
|
+
date: date2,
|
|
29824
|
+
fiber: fiber3,
|
|
29825
|
+
logLevel,
|
|
29826
|
+
message
|
|
29827
|
+
}) => {
|
|
29828
|
+
const annotationsObj = {};
|
|
29829
|
+
const spansObj = {};
|
|
29830
|
+
const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
|
|
29831
|
+
for (const [key, value6] of Object.entries(annotations2)) {
|
|
29832
|
+
assignProperty(annotationsObj, key, structuredMessage(value6));
|
|
29872
29833
|
}
|
|
29873
|
-
const
|
|
29874
|
-
|
|
29875
|
-
|
|
29876
|
-
|
|
29877
|
-
const input = self.select(...args2);
|
|
29878
|
-
if (_case._tag === "When" && _case.guard(input) === true) {
|
|
29879
|
-
return succeed2(_case.evaluate(input, ...args2));
|
|
29880
|
-
} else if (_case._tag === "Not" && _case.guard(input) === false) {
|
|
29881
|
-
return succeed2(_case.evaluate(input, ...args2));
|
|
29882
|
-
}
|
|
29883
|
-
return fail2(input);
|
|
29884
|
-
};
|
|
29834
|
+
const now2 = date2.getTime();
|
|
29835
|
+
const spans = fiber3.getRef(CurrentLogSpans2);
|
|
29836
|
+
for (const [label, timestamp] of spans) {
|
|
29837
|
+
assignProperty(spansObj, label, now2 - timestamp);
|
|
29885
29838
|
}
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
}
|
|
29896
|
-
return fail2(input);
|
|
29839
|
+
const messageArr = ensure(message);
|
|
29840
|
+
return {
|
|
29841
|
+
message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
|
|
29842
|
+
level: logLevel.toUpperCase(),
|
|
29843
|
+
timestamp: date2.toISOString(),
|
|
29844
|
+
cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
|
|
29845
|
+
annotations: annotationsObj,
|
|
29846
|
+
spans: spansObj,
|
|
29847
|
+
fiberId: formatFiberId(fiber3.id)
|
|
29897
29848
|
};
|
|
29898
|
-
};
|
|
29899
|
-
var
|
|
29900
|
-
|
|
29901
|
-
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
}
|
|
29849
|
+
});
|
|
29850
|
+
var formatJson2 = /* @__PURE__ */ map15(formatStructured, formatJson);
|
|
29851
|
+
var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
|
|
29852
|
+
let buffer3 = [];
|
|
29853
|
+
const flush2 = suspend(() => {
|
|
29854
|
+
if (buffer3.length === 0) {
|
|
29855
|
+
return void_3;
|
|
29856
|
+
}
|
|
29857
|
+
const arr = buffer3;
|
|
29858
|
+
buffer3 = [];
|
|
29859
|
+
return options.flush(arr);
|
|
29860
|
+
});
|
|
29861
|
+
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) => {
|
|
29862
|
+
buffer3.push(self.log(options2));
|
|
29863
|
+
}))));
|
|
29864
|
+
}));
|
|
29865
|
+
var consolePretty2 = consolePretty;
|
|
29866
|
+
var consolePrettyBrowser = prettyLoggerBrowser;
|
|
29867
|
+
var consolePrettyTty = prettyLoggerTty;
|
|
29868
|
+
var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
|
|
29869
|
+
var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
|
|
29870
|
+
var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
|
|
29871
|
+
var tracerLogger2 = tracerLogger;
|
|
29872
|
+
var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
|
|
29873
|
+
const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber3.getRef(CurrentLoggers) : []);
|
|
29874
|
+
for (const logger of loggers) {
|
|
29875
|
+
currentLoggers.add(isEffect(logger) ? yield* logger : logger);
|
|
29906
29876
|
}
|
|
29907
|
-
return
|
|
29908
|
-
|
|
29909
|
-
|
|
29877
|
+
return currentLoggers;
|
|
29878
|
+
})));
|
|
29879
|
+
var toFile = /* @__PURE__ */ dual((args2) => isLogger(args2[0]), (self, path, options) => gen3(function* () {
|
|
29880
|
+
const fs = yield* FileSystem;
|
|
29881
|
+
const logFile = yield* fs.open(path, {
|
|
29882
|
+
flag: "a+",
|
|
29883
|
+
...options
|
|
29910
29884
|
});
|
|
29911
|
-
|
|
29912
|
-
|
|
29913
|
-
|
|
29914
|
-
|
|
29915
|
-
|
|
29916
|
-
|
|
29917
|
-
|
|
29885
|
+
const encoder2 = new TextEncoder();
|
|
29886
|
+
return yield* batched(self, {
|
|
29887
|
+
window: options?.batchWindow ?? 1e3,
|
|
29888
|
+
flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
|
|
29889
|
+
});
|
|
29890
|
+
}));
|
|
29891
|
+
|
|
29892
|
+
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ManagedRuntime.js
|
|
29893
|
+
var ManagedRuntime_exports = {};
|
|
29894
|
+
__export(ManagedRuntime_exports, {
|
|
29895
|
+
isManagedRuntime: () => isManagedRuntime,
|
|
29896
|
+
make: () => make43
|
|
29897
|
+
});
|
|
29898
|
+
var TypeId47 = "~effect/ManagedRuntime";
|
|
29899
|
+
var isManagedRuntime = (input) => hasProperty(input, TypeId47);
|
|
29900
|
+
var make43 = (layer2, options) => {
|
|
29901
|
+
const memoMap = options?.memoMap ?? makeMemoMapUnsafe();
|
|
29902
|
+
const scope3 = makeUnsafe3("parallel");
|
|
29903
|
+
const layerScope = forkUnsafe2(scope3, "sequential");
|
|
29904
|
+
const defaultRunOptions = {
|
|
29905
|
+
onFiberStart: runIn(scope3)
|
|
29906
|
+
};
|
|
29907
|
+
const mergeRunOptions = (options2) => options2 ? {
|
|
29908
|
+
...options2,
|
|
29909
|
+
onFiberStart: options2.onFiberStart ? (fiber3) => {
|
|
29910
|
+
defaultRunOptions.onFiberStart(fiber3);
|
|
29911
|
+
options2.onFiberStart(fiber3);
|
|
29912
|
+
} : defaultRunOptions.onFiberStart
|
|
29913
|
+
} : defaultRunOptions;
|
|
29914
|
+
let buildFiber;
|
|
29915
|
+
const contextEffect = withFiber2((fiber3) => {
|
|
29916
|
+
if (!buildFiber) {
|
|
29917
|
+
buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
|
|
29918
|
+
self.cachedContext = context3;
|
|
29919
|
+
})), {
|
|
29920
|
+
...defaultRunOptions,
|
|
29921
|
+
scheduler: fiber3.cache.scheduler
|
|
29922
|
+
});
|
|
29918
29923
|
}
|
|
29919
|
-
|
|
29920
|
-
}
|
|
29921
|
-
|
|
29922
|
-
|
|
29923
|
-
|
|
29924
|
-
|
|
29924
|
+
return flatten5(await_(buildFiber));
|
|
29925
|
+
});
|
|
29926
|
+
const self = {
|
|
29927
|
+
[TypeId47]: TypeId47,
|
|
29928
|
+
memoMap,
|
|
29929
|
+
scope: scope3,
|
|
29930
|
+
contextEffect,
|
|
29931
|
+
cachedContext: void 0,
|
|
29932
|
+
context() {
|
|
29933
|
+
return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
|
|
29934
|
+
},
|
|
29935
|
+
dispose() {
|
|
29936
|
+
return runPromise2(self.disposeEffect);
|
|
29937
|
+
},
|
|
29938
|
+
[Symbol.asyncDispose]() {
|
|
29939
|
+
return self.dispose();
|
|
29940
|
+
},
|
|
29941
|
+
disposeEffect: suspend3(() => {
|
|
29942
|
+
;
|
|
29943
|
+
self.contextEffect = die5("ManagedRuntime disposed");
|
|
29944
|
+
self.cachedContext = void 0;
|
|
29945
|
+
return close(self.scope, void_4);
|
|
29946
|
+
}),
|
|
29947
|
+
runFork(effect2, options2) {
|
|
29948
|
+
return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29949
|
+
},
|
|
29950
|
+
runCallback(effect2, options2) {
|
|
29951
|
+
return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29952
|
+
},
|
|
29953
|
+
runSyncExit(effect2) {
|
|
29954
|
+
return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
|
|
29955
|
+
},
|
|
29956
|
+
runSync(effect2) {
|
|
29957
|
+
return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
|
|
29958
|
+
},
|
|
29959
|
+
runPromiseExit(effect2, options2) {
|
|
29960
|
+
return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29961
|
+
},
|
|
29962
|
+
runPromise(effect2, options2) {
|
|
29963
|
+
return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
|
|
29925
29964
|
}
|
|
29926
|
-
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
29927
29965
|
};
|
|
29966
|
+
return self;
|
|
29928
29967
|
};
|
|
29929
|
-
|
|
29930
|
-
|
|
29931
|
-
|
|
29932
|
-
var fn4 = fn3;
|
|
29933
|
-
var value5 = value4;
|
|
29934
|
-
var valueTags2 = valueTags;
|
|
29935
|
-
var typeTags2 = typeTags;
|
|
29936
|
-
var withReturnType2 = withReturnType;
|
|
29937
|
-
var when5 = when4;
|
|
29938
|
-
var whenOr2 = whenOr;
|
|
29939
|
-
var whenAnd2 = whenAnd;
|
|
29940
|
-
var discriminator2 = discriminator;
|
|
29941
|
-
var discriminatorStartsWith2 = discriminatorStartsWith;
|
|
29942
|
-
var discriminators2 = discriminators;
|
|
29943
|
-
var discriminatorsExhaustive2 = discriminatorsExhaustive;
|
|
29944
|
-
var tag3 = tag2;
|
|
29945
|
-
var tagStartsWith2 = tagStartsWith;
|
|
29946
|
-
var tags2 = tags;
|
|
29947
|
-
var tagsExhaustive2 = tagsExhaustive;
|
|
29948
|
-
var not3 = not2;
|
|
29949
|
-
var nonEmptyString2 = nonEmptyString;
|
|
29950
|
-
var is4 = is3;
|
|
29951
|
-
var string3 = isString;
|
|
29952
|
-
var number3 = isNumber;
|
|
29953
|
-
var any3 = any2;
|
|
29954
|
-
var defined2 = defined;
|
|
29955
|
-
var boolean2 = isBoolean;
|
|
29956
|
-
var _undefined = isUndefined;
|
|
29957
|
-
var _null = isNull;
|
|
29958
|
-
var bigint = isBigInt;
|
|
29959
|
-
var symbol5 = isSymbol;
|
|
29960
|
-
var date = isDate;
|
|
29961
|
-
var record2 = isObject;
|
|
29962
|
-
var instanceOf3 = instanceOf2;
|
|
29963
|
-
var instanceOfUnsafe = instanceOf2;
|
|
29964
|
-
var orElse5 = orElse4;
|
|
29965
|
-
var orElseAbsurd2 = orElseAbsurd;
|
|
29966
|
-
var result5 = result4;
|
|
29967
|
-
var option5 = option4;
|
|
29968
|
-
var exhaustive2 = exhaustive;
|
|
29968
|
+
function provide7(managed, effect2) {
|
|
29969
|
+
return flatMap5(managed.contextEffect, (context3) => provideContext2(effect2, context3));
|
|
29970
|
+
}
|
|
29969
29971
|
|
|
29970
29972
|
// ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/UndefinedOr.js
|
|
29971
29973
|
var map16 = /* @__PURE__ */ dual(2, (self, f) => self === void 0 ? void 0 : f(self));
|
|
@@ -30441,10 +30443,10 @@ export {
|
|
|
30441
30443
|
FileSystem,
|
|
30442
30444
|
Path,
|
|
30443
30445
|
map14 as map5,
|
|
30444
|
-
|
|
30446
|
+
orElse5 as orElse,
|
|
30445
30447
|
all5 as all,
|
|
30446
30448
|
withDefault2,
|
|
30447
|
-
|
|
30449
|
+
option5 as option,
|
|
30448
30450
|
schema,
|
|
30449
30451
|
String7 as String2,
|
|
30450
30452
|
Int2,
|
|
@@ -30459,7 +30461,7 @@ export {
|
|
|
30459
30461
|
runtime,
|
|
30460
30462
|
awaitEmpty,
|
|
30461
30463
|
FiberSet_exports,
|
|
30462
|
-
|
|
30464
|
+
symbol5 as symbol3,
|
|
30463
30465
|
make42 as make8,
|
|
30464
30466
|
layer,
|
|
30465
30467
|
Logger_exports,
|