lalph 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +699 -334
- package/package.json +1 -1
- package/src/{IssueSources.ts → CurrentIssueSource.ts} +76 -6
- package/src/IssueSource.ts +3 -1
- package/src/Linear/LinearError.ts +6 -0
- package/src/Prd.ts +1 -1
- package/src/Projects.ts +1 -1
- package/src/PromptGen.ts +1 -1
- package/src/commands/issue.ts +1 -1
- package/src/commands/plan.ts +1 -1
- package/src/commands/projects/add.ts +1 -1
- package/src/commands/projects/edit.ts +1 -1
- package/src/commands/projects/ls.ts +1 -1
- package/src/commands/projects/rm.ts +1 -1
- package/src/commands/root.ts +6 -13
- package/src/commands/source.ts +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3276,7 +3276,7 @@ const isGreaterThanOrEqualTo$3 = (O) => dual(2, (self, that) => O(self, that) !=
|
|
|
3276
3276
|
* @category comparisons
|
|
3277
3277
|
* @since 2.0.0
|
|
3278
3278
|
*/
|
|
3279
|
-
const min$
|
|
3279
|
+
const min$3 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
|
|
3280
3280
|
/**
|
|
3281
3281
|
* Returns the maximum of two values according to the given order. If they are equal, returns the first argument.
|
|
3282
3282
|
*
|
|
@@ -3347,7 +3347,7 @@ const max$2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1
|
|
|
3347
3347
|
* @category comparisons
|
|
3348
3348
|
* @since 2.0.0
|
|
3349
3349
|
*/
|
|
3350
|
-
const clamp$2 = (O) => dual(2, (self, options) => min$
|
|
3350
|
+
const clamp$2 = (O) => dual(2, (self, options) => min$3(O)(options.maximum, max$2(O)(options.minimum, self)));
|
|
3351
3351
|
/**
|
|
3352
3352
|
* Tests whether a value is between a minimum and a maximum (inclusive) according to the given order.
|
|
3353
3353
|
*
|
|
@@ -3410,7 +3410,7 @@ const liftThrowable = (f) => (...a) => {
|
|
|
3410
3410
|
|
|
3411
3411
|
//#endregion
|
|
3412
3412
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Duration.js
|
|
3413
|
-
const TypeId$
|
|
3413
|
+
const TypeId$66 = "~effect/time/Duration";
|
|
3414
3414
|
const bigint0$1 = /* @__PURE__ */ BigInt(0);
|
|
3415
3415
|
const bigint24 = /* @__PURE__ */ BigInt(24);
|
|
3416
3416
|
const bigint60 = /* @__PURE__ */ BigInt(60);
|
|
@@ -3494,7 +3494,7 @@ const zeroDurationValue = {
|
|
|
3494
3494
|
};
|
|
3495
3495
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
3496
3496
|
const DurationProto = {
|
|
3497
|
-
[TypeId$
|
|
3497
|
+
[TypeId$66]: TypeId$66,
|
|
3498
3498
|
[symbol$3]() {
|
|
3499
3499
|
return structure(this.value);
|
|
3500
3500
|
},
|
|
@@ -3566,7 +3566,7 @@ const make$59 = (input) => {
|
|
|
3566
3566
|
* @since 2.0.0
|
|
3567
3567
|
* @category guards
|
|
3568
3568
|
*/
|
|
3569
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
3569
|
+
const isDuration = (u) => hasProperty(u, TypeId$66);
|
|
3570
3570
|
/**
|
|
3571
3571
|
* Checks if a Duration is finite (not infinite).
|
|
3572
3572
|
*
|
|
@@ -3888,6 +3888,38 @@ const matchPair = /* @__PURE__ */ dual(3, (self, that, options) => {
|
|
|
3888
3888
|
else return options.onNanos(self.value.nanos, toNanosUnsafe(that));
|
|
3889
3889
|
});
|
|
3890
3890
|
/**
|
|
3891
|
+
* Order instance for `Duration`, allowing comparison operations.
|
|
3892
|
+
*
|
|
3893
|
+
* Two infinite durations are considered equivalent (`0`).
|
|
3894
|
+
*
|
|
3895
|
+
* @example
|
|
3896
|
+
* ```ts
|
|
3897
|
+
* import { Duration } from "effect"
|
|
3898
|
+
*
|
|
3899
|
+
* const durations = [
|
|
3900
|
+
* Duration.seconds(3),
|
|
3901
|
+
* Duration.seconds(1),
|
|
3902
|
+
* Duration.seconds(2)
|
|
3903
|
+
* ]
|
|
3904
|
+
* const sorted = durations.sort((a, b) => Duration.Order(a, b))
|
|
3905
|
+
* console.log(sorted.map(Duration.toSeconds)) // [1, 2, 3]
|
|
3906
|
+
* ```
|
|
3907
|
+
*
|
|
3908
|
+
* @category instances
|
|
3909
|
+
* @since 2.0.0
|
|
3910
|
+
*/
|
|
3911
|
+
const Order$5 = /* @__PURE__ */ make$60((self, that) => matchPair(self, that, {
|
|
3912
|
+
onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
|
|
3913
|
+
onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0,
|
|
3914
|
+
onInfinity: (self, that) => {
|
|
3915
|
+
switch (self.value._tag) {
|
|
3916
|
+
case "Infinity": return that.value._tag === "Infinity" ? 0 : 1;
|
|
3917
|
+
case "Millis":
|
|
3918
|
+
case "Nanos": return -1;
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
}));
|
|
3922
|
+
/**
|
|
3891
3923
|
* Equivalence instance for `Duration`, allowing equality comparisons.
|
|
3892
3924
|
*
|
|
3893
3925
|
* Two infinite durations are considered equivalent.
|
|
@@ -3909,6 +3941,21 @@ const Equivalence$4 = (self, that) => matchPair(self, that, {
|
|
|
3909
3941
|
onInfinity: (self, that) => self.value._tag === that.value._tag
|
|
3910
3942
|
});
|
|
3911
3943
|
/**
|
|
3944
|
+
* Returns the smaller of two Durations.
|
|
3945
|
+
*
|
|
3946
|
+
* @example
|
|
3947
|
+
* ```ts
|
|
3948
|
+
* import { Duration } from "effect"
|
|
3949
|
+
*
|
|
3950
|
+
* const shorter = Duration.min(Duration.seconds(5), Duration.seconds(3))
|
|
3951
|
+
* console.log(Duration.toSeconds(shorter)) // 3
|
|
3952
|
+
* ```
|
|
3953
|
+
*
|
|
3954
|
+
* @since 2.0.0
|
|
3955
|
+
* @category order
|
|
3956
|
+
*/
|
|
3957
|
+
const min$2 = /* @__PURE__ */ min$3(Order$5);
|
|
3958
|
+
/**
|
|
3912
3959
|
* Checks if two Durations are equal.
|
|
3913
3960
|
*
|
|
3914
3961
|
* @example
|
|
@@ -4319,9 +4366,9 @@ function Struct$1(fields) {
|
|
|
4319
4366
|
/**
|
|
4320
4367
|
* @since 2.0.0
|
|
4321
4368
|
*/
|
|
4322
|
-
const TypeId$
|
|
4369
|
+
const TypeId$65 = "~effect/data/Option";
|
|
4323
4370
|
const CommonProto$1 = {
|
|
4324
|
-
[TypeId$
|
|
4371
|
+
[TypeId$65]: { _A: (_) => _ },
|
|
4325
4372
|
...PipeInspectableProto,
|
|
4326
4373
|
...YieldableProto
|
|
4327
4374
|
};
|
|
@@ -4372,7 +4419,7 @@ const NoneProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Co
|
|
|
4372
4419
|
}
|
|
4373
4420
|
});
|
|
4374
4421
|
/** @internal */
|
|
4375
|
-
const isOption$1 = (input) => hasProperty(input, TypeId$
|
|
4422
|
+
const isOption$1 = (input) => hasProperty(input, TypeId$65);
|
|
4376
4423
|
/** @internal */
|
|
4377
4424
|
const isNone$1 = (fa) => fa._tag === "None";
|
|
4378
4425
|
/** @internal */
|
|
@@ -4388,9 +4435,9 @@ const some$3 = (value) => {
|
|
|
4388
4435
|
|
|
4389
4436
|
//#endregion
|
|
4390
4437
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/internal/result.js
|
|
4391
|
-
const TypeId$
|
|
4438
|
+
const TypeId$64 = "~effect/data/Result";
|
|
4392
4439
|
const CommonProto = {
|
|
4393
|
-
[TypeId$
|
|
4440
|
+
[TypeId$64]: {
|
|
4394
4441
|
_A: (_) => _,
|
|
4395
4442
|
_E: (_) => _
|
|
4396
4443
|
},
|
|
@@ -4444,7 +4491,7 @@ const FailureProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create
|
|
|
4444
4491
|
}
|
|
4445
4492
|
});
|
|
4446
4493
|
/** @internal */
|
|
4447
|
-
const isResult$1 = (input) => hasProperty(input, TypeId$
|
|
4494
|
+
const isResult$1 = (input) => hasProperty(input, TypeId$64);
|
|
4448
4495
|
/** @internal */
|
|
4449
4496
|
const isFailure$6 = (result) => result._tag === "Failure";
|
|
4450
4497
|
/** @internal */
|
|
@@ -6324,7 +6371,7 @@ function isOutOfBounds(i, as) {
|
|
|
6324
6371
|
* @since 2.0.0
|
|
6325
6372
|
* @category unsafe
|
|
6326
6373
|
*/
|
|
6327
|
-
const getUnsafe$
|
|
6374
|
+
const getUnsafe$6 = /* @__PURE__ */ dual(2, (self, index) => {
|
|
6328
6375
|
const i = Math.floor(index);
|
|
6329
6376
|
if (isOutOfBounds(i, self)) throw new Error(`Index out of bounds: ${i}`);
|
|
6330
6377
|
return self[i];
|
|
@@ -6344,7 +6391,7 @@ const getUnsafe$5 = /* @__PURE__ */ dual(2, (self, index) => {
|
|
|
6344
6391
|
* @category getters
|
|
6345
6392
|
* @since 2.0.0
|
|
6346
6393
|
*/
|
|
6347
|
-
const headNonEmpty = /* @__PURE__ */ getUnsafe$
|
|
6394
|
+
const headNonEmpty = /* @__PURE__ */ getUnsafe$6(0);
|
|
6348
6395
|
/**
|
|
6349
6396
|
* Get the last element in a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty.
|
|
6350
6397
|
*
|
|
@@ -6820,7 +6867,7 @@ const ServiceProto = {
|
|
|
6820
6867
|
};
|
|
6821
6868
|
},
|
|
6822
6869
|
asEffect() {
|
|
6823
|
-
return (this.asEffect = constant(withFiber$1((fiber) => exitSucceed(get$
|
|
6870
|
+
return (this.asEffect = constant(withFiber$1((fiber) => exitSucceed(get$12(fiber.services, this)))))();
|
|
6824
6871
|
},
|
|
6825
6872
|
of(self) {
|
|
6826
6873
|
return self;
|
|
@@ -6829,14 +6876,14 @@ const ServiceProto = {
|
|
|
6829
6876
|
return make$57(this, self);
|
|
6830
6877
|
},
|
|
6831
6878
|
use(f) {
|
|
6832
|
-
return withFiber$1((fiber) => f(get$
|
|
6879
|
+
return withFiber$1((fiber) => f(get$12(fiber.services, this)));
|
|
6833
6880
|
},
|
|
6834
6881
|
useSync(f) {
|
|
6835
|
-
return withFiber$1((fiber) => exitSucceed(f(get$
|
|
6882
|
+
return withFiber$1((fiber) => exitSucceed(f(get$12(fiber.services, this))));
|
|
6836
6883
|
}
|
|
6837
6884
|
};
|
|
6838
6885
|
const ReferenceTypeId = "~effect/ServiceMap/Reference";
|
|
6839
|
-
const TypeId$
|
|
6886
|
+
const TypeId$63 = "~effect/ServiceMap";
|
|
6840
6887
|
/**
|
|
6841
6888
|
* @example
|
|
6842
6889
|
* ```ts
|
|
@@ -6853,14 +6900,14 @@ const TypeId$61 = "~effect/ServiceMap";
|
|
|
6853
6900
|
* @since 4.0.0
|
|
6854
6901
|
* @category Constructors
|
|
6855
6902
|
*/
|
|
6856
|
-
const makeUnsafe$
|
|
6857
|
-
const self = Object.create(Proto$
|
|
6903
|
+
const makeUnsafe$12 = (mapUnsafe) => {
|
|
6904
|
+
const self = Object.create(Proto$23);
|
|
6858
6905
|
self.mapUnsafe = mapUnsafe;
|
|
6859
6906
|
return self;
|
|
6860
6907
|
};
|
|
6861
|
-
const Proto$
|
|
6908
|
+
const Proto$23 = {
|
|
6862
6909
|
...PipeInspectableProto,
|
|
6863
|
-
[TypeId$
|
|
6910
|
+
[TypeId$63]: { _Services: (_) => _ },
|
|
6864
6911
|
toJSON() {
|
|
6865
6912
|
return {
|
|
6866
6913
|
_id: "ServiceMap",
|
|
@@ -6893,7 +6940,7 @@ const Proto$21 = {
|
|
|
6893
6940
|
* @since 4.0.0
|
|
6894
6941
|
* @category Guards
|
|
6895
6942
|
*/
|
|
6896
|
-
const isServiceMap = (u) => hasProperty(u, TypeId$
|
|
6943
|
+
const isServiceMap = (u) => hasProperty(u, TypeId$63);
|
|
6897
6944
|
/**
|
|
6898
6945
|
* Checks if the provided argument is a `Reference`.
|
|
6899
6946
|
*
|
|
@@ -6929,7 +6976,7 @@ const isReference = (u) => hasProperty(u, ReferenceTypeId);
|
|
|
6929
6976
|
* @category Constructors
|
|
6930
6977
|
*/
|
|
6931
6978
|
const empty$14 = () => emptyServiceMap;
|
|
6932
|
-
const emptyServiceMap = /* @__PURE__ */ makeUnsafe$
|
|
6979
|
+
const emptyServiceMap = /* @__PURE__ */ makeUnsafe$12(/* @__PURE__ */ new Map());
|
|
6933
6980
|
/**
|
|
6934
6981
|
* Creates a new `ServiceMap` with a single service associated to the key.
|
|
6935
6982
|
*
|
|
@@ -6948,7 +6995,7 @@ const emptyServiceMap = /* @__PURE__ */ makeUnsafe$9(/* @__PURE__ */ new Map());
|
|
|
6948
6995
|
* @since 4.0.0
|
|
6949
6996
|
* @category Constructors
|
|
6950
6997
|
*/
|
|
6951
|
-
const make$57 = (key, service) => makeUnsafe$
|
|
6998
|
+
const make$57 = (key, service) => makeUnsafe$12(new Map([[key.key, service]]));
|
|
6952
6999
|
/**
|
|
6953
7000
|
* Adds a service to a given `ServiceMap`.
|
|
6954
7001
|
*
|
|
@@ -6977,7 +7024,7 @@ const make$57 = (key, service) => makeUnsafe$9(new Map([[key.key, service]]));
|
|
|
6977
7024
|
const add$3 = /* @__PURE__ */ dual(3, (self, key, service) => {
|
|
6978
7025
|
const map = new Map(self.mapUnsafe);
|
|
6979
7026
|
map.set(key.key, service);
|
|
6980
|
-
return makeUnsafe$
|
|
7027
|
+
return makeUnsafe$12(map);
|
|
6981
7028
|
});
|
|
6982
7029
|
/**
|
|
6983
7030
|
* @since 4.0.0
|
|
@@ -6987,7 +7034,7 @@ const addOrOmit = /* @__PURE__ */ dual(3, (self, key, service) => {
|
|
|
6987
7034
|
const map = new Map(self.mapUnsafe);
|
|
6988
7035
|
if (service._tag === "None") map.delete(key.key);
|
|
6989
7036
|
else map.set(key.key, service.value);
|
|
6990
|
-
return makeUnsafe$
|
|
7037
|
+
return makeUnsafe$12(map);
|
|
6991
7038
|
});
|
|
6992
7039
|
/**
|
|
6993
7040
|
* Get a service from the context that corresponds to the given key, or
|
|
@@ -7053,7 +7100,7 @@ const getOrElse = /* @__PURE__ */ dual(3, (self, key, orElse) => {
|
|
|
7053
7100
|
* @since 4.0.0
|
|
7054
7101
|
* @category unsafe
|
|
7055
7102
|
*/
|
|
7056
|
-
const getUnsafe$
|
|
7103
|
+
const getUnsafe$5 = /* @__PURE__ */ dual(2, (self, service) => {
|
|
7057
7104
|
if (!self.mapUnsafe.has(service.key)) {
|
|
7058
7105
|
if (ReferenceTypeId in service) return getDefaultValue(service);
|
|
7059
7106
|
throw serviceNotFoundError(service);
|
|
@@ -7085,7 +7132,7 @@ const getUnsafe$4 = /* @__PURE__ */ dual(2, (self, service) => {
|
|
|
7085
7132
|
* @since 4.0.0
|
|
7086
7133
|
* @category Getters
|
|
7087
7134
|
*/
|
|
7088
|
-
const get$
|
|
7135
|
+
const get$12 = getUnsafe$5;
|
|
7089
7136
|
/**
|
|
7090
7137
|
* @example
|
|
7091
7138
|
* ```ts
|
|
@@ -7193,7 +7240,7 @@ const merge$6 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
7193
7240
|
if (that.mapUnsafe.size === 0) return self;
|
|
7194
7241
|
const map = new Map(self.mapUnsafe);
|
|
7195
7242
|
that.mapUnsafe.forEach((value, key) => map.set(key, value));
|
|
7196
|
-
return makeUnsafe$
|
|
7243
|
+
return makeUnsafe$12(map);
|
|
7197
7244
|
});
|
|
7198
7245
|
/**
|
|
7199
7246
|
* Merges any number of `ServiceMap`s, returning a new `ServiceMap` containing the services of all.
|
|
@@ -7229,7 +7276,7 @@ const mergeAll$1 = (...ctxs) => {
|
|
|
7229
7276
|
for (let i = 0; i < ctxs.length; i++) ctxs[i].mapUnsafe.forEach((value, key) => {
|
|
7230
7277
|
map.set(key, value);
|
|
7231
7278
|
});
|
|
7232
|
-
return makeUnsafe$
|
|
7279
|
+
return makeUnsafe$12(map);
|
|
7233
7280
|
};
|
|
7234
7281
|
/**
|
|
7235
7282
|
* Creates a service map key with a default value.
|
|
@@ -8271,12 +8318,12 @@ const causeIsInterruptedOnly = (self) => self.failures.every(failureIsInterrupt$
|
|
|
8271
8318
|
/** @internal */
|
|
8272
8319
|
const failureIsInterrupt$1 = (self) => isTagged(self, "Interrupt");
|
|
8273
8320
|
/** @internal */
|
|
8274
|
-
const failureAnnotations$1 = (self) => makeUnsafe$
|
|
8321
|
+
const failureAnnotations$1 = (self) => makeUnsafe$12(self.annotations);
|
|
8275
8322
|
/** @internal */
|
|
8276
8323
|
const causeAnnotations = (self) => {
|
|
8277
8324
|
const map = /* @__PURE__ */ new Map();
|
|
8278
8325
|
for (const f of self.failures) if (f.annotations.size > 0) for (const [key, value] of f.annotations) map.set(key, value);
|
|
8279
|
-
return makeUnsafe$
|
|
8326
|
+
return makeUnsafe$12(map);
|
|
8280
8327
|
};
|
|
8281
8328
|
/** @internal */
|
|
8282
8329
|
const causeMerge = /* @__PURE__ */ dual(2, (self, that) => {
|
|
@@ -8593,7 +8640,7 @@ const fiberStackAnnotations = (fiber) => {
|
|
|
8593
8640
|
if (!fiber.currentStackFrame) return void 0;
|
|
8594
8641
|
const annotations = /* @__PURE__ */ new Map();
|
|
8595
8642
|
annotations.set(StackTraceKey.key, fiber.currentStackFrame);
|
|
8596
|
-
return makeUnsafe$
|
|
8643
|
+
return makeUnsafe$12(annotations);
|
|
8597
8644
|
};
|
|
8598
8645
|
const fiberInterruptChildren = (fiber) => {
|
|
8599
8646
|
if (fiber._children === void 0 || fiber._children.size === 0) return;
|
|
@@ -9128,7 +9175,7 @@ const service$1 = fromYieldable$1;
|
|
|
9128
9175
|
/** @internal */
|
|
9129
9176
|
const serviceOption$1 = (service) => withFiber$1((fiber) => succeed$5(getOption(fiber.services, service)));
|
|
9130
9177
|
/** @internal */
|
|
9131
|
-
const serviceOptional = (service) => withFiber$1((fiber) => fiber.services.mapUnsafe.has(service.key) ? succeed$5(getUnsafe$
|
|
9178
|
+
const serviceOptional = (service) => withFiber$1((fiber) => fiber.services.mapUnsafe.has(service.key) ? succeed$5(getUnsafe$5(fiber.services, service)) : fail$7(new NoSuchElementError$1()));
|
|
9132
9179
|
/** @internal */
|
|
9133
9180
|
const updateServices$1 = /* @__PURE__ */ dual(2, (self, f) => withFiber$1((fiber) => {
|
|
9134
9181
|
const prev = fiber.services;
|
|
@@ -9142,12 +9189,12 @@ const updateServices$1 = /* @__PURE__ */ dual(2, (self, f) => withFiber$1((fiber
|
|
|
9142
9189
|
if (prev.mapUnsafe.has(key)) map.set(key, prev.mapUnsafe.get(key));
|
|
9143
9190
|
else map.delete(key);
|
|
9144
9191
|
}
|
|
9145
|
-
fiber.setServices(makeUnsafe$
|
|
9192
|
+
fiber.setServices(makeUnsafe$12(map));
|
|
9146
9193
|
});
|
|
9147
9194
|
}));
|
|
9148
9195
|
/** @internal */
|
|
9149
9196
|
const updateService$1 = /* @__PURE__ */ dual(3, (self, service, f) => withFiber$1((fiber) => {
|
|
9150
|
-
const prev = getUnsafe$
|
|
9197
|
+
const prev = getUnsafe$5(fiber.services, service);
|
|
9151
9198
|
fiber.setServices(add$3(fiber.services, service, f(prev)));
|
|
9152
9199
|
return onExit$3(self, () => fiber.setServices(add$3(fiber.services, service, prev)));
|
|
9153
9200
|
}));
|
|
@@ -10030,11 +10077,11 @@ const NoopSpanProto = {
|
|
|
10030
10077
|
/** @internal */
|
|
10031
10078
|
const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
10032
10079
|
const filterDisablePropagation = (span) => {
|
|
10033
|
-
if (span) return get$
|
|
10080
|
+
if (span) return get$12(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(span.parent) : void 0 : span;
|
|
10034
10081
|
};
|
|
10035
10082
|
/** @internal */
|
|
10036
10083
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
10037
|
-
const disablePropagation = !fiber.getRef(TracerEnabled) || options?.annotations && get$
|
|
10084
|
+
const disablePropagation = !fiber.getRef(TracerEnabled) || options?.annotations && get$12(options.annotations, DisablePropagation);
|
|
10038
10085
|
const parent = options?.parent ?? (options?.root ? void 0 : filterDisablePropagation(fiber.currentSpan));
|
|
10039
10086
|
let span;
|
|
10040
10087
|
if (disablePropagation) span = noopSpan({
|
|
@@ -10059,7 +10106,7 @@ const makeSpanUnsafe = (fiber, name, options) => {
|
|
|
10059
10106
|
const makeSpan$1 = (name, options) => withFiber$1((fiber) => succeed$5(makeSpanUnsafe(fiber, name, options)));
|
|
10060
10107
|
/** @internal */
|
|
10061
10108
|
const makeSpanScoped$1 = (name, options) => uninterruptible$1(withFiber$1((fiber) => {
|
|
10062
|
-
const scope = getUnsafe$
|
|
10109
|
+
const scope = getUnsafe$5(fiber.services, scopeTag);
|
|
10063
10110
|
const span = makeSpanUnsafe(fiber, name, options ?? {});
|
|
10064
10111
|
const clock = fiber.getRef(ClockRef);
|
|
10065
10112
|
const timingEnabled = fiber.getRef(TracerTimingEnabled);
|
|
@@ -10899,7 +10946,7 @@ const DeferredProto = {
|
|
|
10899
10946
|
* @since 2.0.0
|
|
10900
10947
|
* @category unsafe
|
|
10901
10948
|
*/
|
|
10902
|
-
const makeUnsafe$
|
|
10949
|
+
const makeUnsafe$11 = () => {
|
|
10903
10950
|
const self = Object.create(DeferredProto);
|
|
10904
10951
|
self.resumes = void 0;
|
|
10905
10952
|
self.effect = void 0;
|
|
@@ -10923,7 +10970,7 @@ const makeUnsafe$8 = () => {
|
|
|
10923
10970
|
* @since 2.0.0
|
|
10924
10971
|
* @category constructors
|
|
10925
10972
|
*/
|
|
10926
|
-
const make$55 = () => sync$1(() => makeUnsafe$
|
|
10973
|
+
const make$55 = () => sync$1(() => makeUnsafe$11());
|
|
10927
10974
|
const _await = (self) => callback$2((resume) => {
|
|
10928
10975
|
if (self.effect) return resume(self.effect);
|
|
10929
10976
|
self.resumes ??= [];
|
|
@@ -11224,7 +11271,7 @@ const make$54 = scopeMake;
|
|
|
11224
11271
|
* @since 4.0.0
|
|
11225
11272
|
* @category constructors
|
|
11226
11273
|
*/
|
|
11227
|
-
const makeUnsafe$
|
|
11274
|
+
const makeUnsafe$10 = scopeMakeUnsafe;
|
|
11228
11275
|
/**
|
|
11229
11276
|
* Provides a `Scope` to an `Effect`, removing the `Scope` requirement from its context.
|
|
11230
11277
|
* This allows you to run effects that require a scope by explicitly providing one.
|
|
@@ -11411,7 +11458,7 @@ const use$1 = scopeUse;
|
|
|
11411
11458
|
|
|
11412
11459
|
//#endregion
|
|
11413
11460
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Layer.js
|
|
11414
|
-
const TypeId$
|
|
11461
|
+
const TypeId$62 = "~effect/Layer";
|
|
11415
11462
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
11416
11463
|
/**
|
|
11417
11464
|
* Returns `true` if the specified value is a `Layer`, `false` otherwise.
|
|
@@ -11436,9 +11483,9 @@ const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
|
11436
11483
|
* @since 2.0.0
|
|
11437
11484
|
* @category getters
|
|
11438
11485
|
*/
|
|
11439
|
-
const isLayer = (u) => hasProperty(u, TypeId$
|
|
11486
|
+
const isLayer = (u) => hasProperty(u, TypeId$62);
|
|
11440
11487
|
const LayerProto = {
|
|
11441
|
-
[TypeId$
|
|
11488
|
+
[TypeId$62]: {
|
|
11442
11489
|
_ROut: identity,
|
|
11443
11490
|
_E: identity,
|
|
11444
11491
|
_RIn: identity
|
|
@@ -11524,8 +11571,8 @@ var MemoMapImpl = class {
|
|
|
11524
11571
|
entry.observers++;
|
|
11525
11572
|
return andThen$1(scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)), entry.effect);
|
|
11526
11573
|
}
|
|
11527
|
-
const layerScope = makeUnsafe$
|
|
11528
|
-
const deferred = makeUnsafe$
|
|
11574
|
+
const layerScope = makeUnsafe$10();
|
|
11575
|
+
const deferred = makeUnsafe$11();
|
|
11529
11576
|
const entry = {
|
|
11530
11577
|
observers: 1,
|
|
11531
11578
|
effect: _await(deferred),
|
|
@@ -11664,7 +11711,7 @@ const buildWithMemoMap = /* @__PURE__ */ dual(3, (self, memoMap, scope) => provi
|
|
|
11664
11711
|
* @since 2.0.0
|
|
11665
11712
|
* @category destructors
|
|
11666
11713
|
*/
|
|
11667
|
-
const build = (self) => withFiber$1((fiber) => buildWithMemoMap(self, CurrentMemoMap.getOrCreate(fiber.services), getUnsafe$
|
|
11714
|
+
const build = (self) => withFiber$1((fiber) => buildWithMemoMap(self, CurrentMemoMap.getOrCreate(fiber.services), getUnsafe$5(fiber.services, Scope)));
|
|
11668
11715
|
/**
|
|
11669
11716
|
* Builds a layer into an `Effect` value. Any resources associated with this
|
|
11670
11717
|
* layer will be released when the specified scope is closed unless their scope
|
|
@@ -11922,7 +11969,7 @@ const effectDiscard = (effect) => effectServices(as$1(effect, empty$14()));
|
|
|
11922
11969
|
*/
|
|
11923
11970
|
const unwrap$3 = (self) => {
|
|
11924
11971
|
const service = Service$1("effect/Layer/unwrap");
|
|
11925
|
-
return flatMap$3(effect$1(service)(self), get$
|
|
11972
|
+
return flatMap$3(effect$1(service)(self), get$12(service));
|
|
11926
11973
|
};
|
|
11927
11974
|
const mergeAllEffect = (layers, memoMap, scope) => {
|
|
11928
11975
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
@@ -12309,9 +12356,9 @@ const fresh = (self) => fromBuildUnsafe((_, scope) => self.build(makeMemoMapUnsa
|
|
|
12309
12356
|
* @since 3.16.0
|
|
12310
12357
|
* @category Type IDs
|
|
12311
12358
|
*/
|
|
12312
|
-
const TypeId$
|
|
12313
|
-
const Proto$
|
|
12314
|
-
[TypeId$
|
|
12359
|
+
const TypeId$61 = "~effect/ExecutionPlan";
|
|
12360
|
+
const Proto$22 = {
|
|
12361
|
+
[TypeId$61]: TypeId$61,
|
|
12315
12362
|
get withRequirements() {
|
|
12316
12363
|
const self = this;
|
|
12317
12364
|
return servicesWith$1((services) => succeed$5(makeProto$1(self.steps.map((step) => ({
|
|
@@ -12324,7 +12371,7 @@ const Proto$20 = {
|
|
|
12324
12371
|
}
|
|
12325
12372
|
};
|
|
12326
12373
|
const makeProto$1 = (steps) => {
|
|
12327
|
-
const self = Object.create(Proto$
|
|
12374
|
+
const self = Object.create(Proto$22);
|
|
12328
12375
|
self.steps = steps;
|
|
12329
12376
|
return self;
|
|
12330
12377
|
};
|
|
@@ -12342,7 +12389,7 @@ const CurrentMetadata$1 = /* @__PURE__ */ Reference("effect/ExecutionPlan/Curren
|
|
|
12342
12389
|
/**
|
|
12343
12390
|
* @since 2.0.0
|
|
12344
12391
|
*/
|
|
12345
|
-
const TypeId$
|
|
12392
|
+
const TypeId$60 = CauseTypeId;
|
|
12346
12393
|
/**
|
|
12347
12394
|
* @since 2.0.0
|
|
12348
12395
|
*/
|
|
@@ -12983,11 +13030,11 @@ const currentTimeNanos = currentTimeNanos$1;
|
|
|
12983
13030
|
//#endregion
|
|
12984
13031
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/internal/dateTime.js
|
|
12985
13032
|
/** @internal */
|
|
12986
|
-
const TypeId$
|
|
13033
|
+
const TypeId$59 = "~effect/time/DateTime";
|
|
12987
13034
|
/** @internal */
|
|
12988
13035
|
const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
12989
|
-
const Proto$
|
|
12990
|
-
[TypeId$
|
|
13036
|
+
const Proto$21 = {
|
|
13037
|
+
[TypeId$59]: TypeId$59,
|
|
12991
13038
|
pipe() {
|
|
12992
13039
|
return pipeArguments(this, arguments);
|
|
12993
13040
|
},
|
|
@@ -12999,7 +13046,7 @@ const Proto$19 = {
|
|
|
12999
13046
|
}
|
|
13000
13047
|
};
|
|
13001
13048
|
const ProtoUtc = {
|
|
13002
|
-
...Proto$
|
|
13049
|
+
...Proto$21,
|
|
13003
13050
|
_tag: "Utc",
|
|
13004
13051
|
[symbol$3]() {
|
|
13005
13052
|
return number$2(this.epochMillis);
|
|
@@ -13012,7 +13059,7 @@ const ProtoUtc = {
|
|
|
13012
13059
|
}
|
|
13013
13060
|
};
|
|
13014
13061
|
const ProtoZoned = {
|
|
13015
|
-
...Proto$
|
|
13062
|
+
...Proto$21,
|
|
13016
13063
|
_tag: "Zoned",
|
|
13017
13064
|
[symbol$3]() {
|
|
13018
13065
|
return combine$1(number$2(this.epochMillis))(hash(this.zone));
|
|
@@ -13093,7 +13140,7 @@ const makeZonedProto = (epochMillis, zone, partsUtc) => {
|
|
|
13093
13140
|
return self;
|
|
13094
13141
|
};
|
|
13095
13142
|
/** @internal */
|
|
13096
|
-
const isDateTime$1 = (u) => hasProperty(u, TypeId$
|
|
13143
|
+
const isDateTime$1 = (u) => hasProperty(u, TypeId$59);
|
|
13097
13144
|
const isDateTimeArgs = (args) => isDateTime$1(args[0]);
|
|
13098
13145
|
/** @internal */
|
|
13099
13146
|
const isTimeZone$1 = (u) => hasProperty(u, TimeZoneTypeId);
|
|
@@ -13128,7 +13175,7 @@ const fromDateUnsafe$1 = (date) => {
|
|
|
13128
13175
|
return makeUtc(epochMillis);
|
|
13129
13176
|
};
|
|
13130
13177
|
/** @internal */
|
|
13131
|
-
const makeUnsafe$
|
|
13178
|
+
const makeUnsafe$9 = (input) => {
|
|
13132
13179
|
if (isDateTime$1(input)) return input;
|
|
13133
13180
|
else if (input instanceof Date) return fromDateUnsafe$1(input);
|
|
13134
13181
|
else if (typeof input === "object") {
|
|
@@ -13144,7 +13191,7 @@ const maxEpochMillis = 864e13 - 840 * 60 * 1e3;
|
|
|
13144
13191
|
/** @internal */
|
|
13145
13192
|
const makeZonedUnsafe$1 = (input, options) => {
|
|
13146
13193
|
if (options?.timeZone === void 0 && isDateTime$1(input) && isZoned$1(input)) return input;
|
|
13147
|
-
const self = makeUnsafe$
|
|
13194
|
+
const self = makeUnsafe$9(input);
|
|
13148
13195
|
if (self.epochMillis < minEpochMillis || self.epochMillis > maxEpochMillis) throw new RangeError(`Epoch millis out of range: ${self.epochMillis}`);
|
|
13149
13196
|
let zone;
|
|
13150
13197
|
if (options?.timeZone === void 0) zone = zoneMakeOffset$1(new Date(self.epochMillis).getTimezoneOffset() * -60 * 1e3);
|
|
@@ -13161,7 +13208,7 @@ const makeZonedUnsafe$1 = (input, options) => {
|
|
|
13161
13208
|
/** @internal */
|
|
13162
13209
|
const makeZoned$1 = /* @__PURE__ */ liftThrowable(makeZonedUnsafe$1);
|
|
13163
13210
|
/** @internal */
|
|
13164
|
-
const make$53 = /* @__PURE__ */ liftThrowable(makeUnsafe$
|
|
13211
|
+
const make$53 = /* @__PURE__ */ liftThrowable(makeUnsafe$9);
|
|
13165
13212
|
const zonedStringRegExp = /^(.{17,35})\[(.+)\]$/;
|
|
13166
13213
|
/** @internal */
|
|
13167
13214
|
const makeZonedFromString$1 = (input) => {
|
|
@@ -13261,7 +13308,7 @@ const distanceDurationResult$1 = /* @__PURE__ */ dual(2, (self, other) => {
|
|
|
13261
13308
|
/** @internal */
|
|
13262
13309
|
const distanceDuration$1 = /* @__PURE__ */ dual(2, (self, other) => millis(Math.abs(distance$1(self, other))));
|
|
13263
13310
|
/** @internal */
|
|
13264
|
-
const min$1 = /* @__PURE__ */ min$
|
|
13311
|
+
const min$1 = /* @__PURE__ */ min$3(Order$4);
|
|
13265
13312
|
/** @internal */
|
|
13266
13313
|
const max$1 = /* @__PURE__ */ max$2(Order$4);
|
|
13267
13314
|
/** @internal */
|
|
@@ -13833,7 +13880,7 @@ const matchEffect$1 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffec
|
|
|
13833
13880
|
*
|
|
13834
13881
|
* @since 2.0.0
|
|
13835
13882
|
*/
|
|
13836
|
-
const TypeId$
|
|
13883
|
+
const TypeId$58 = "~effect/Schedule";
|
|
13837
13884
|
/**
|
|
13838
13885
|
* @since 4.0.0
|
|
13839
13886
|
* @category Metadata
|
|
@@ -13849,7 +13896,7 @@ const CurrentMetadata = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetada
|
|
|
13849
13896
|
elapsedSincePrevious: 0
|
|
13850
13897
|
}) });
|
|
13851
13898
|
const ScheduleProto = {
|
|
13852
|
-
[TypeId$
|
|
13899
|
+
[TypeId$58]: {
|
|
13853
13900
|
_Out: identity,
|
|
13854
13901
|
_In: identity,
|
|
13855
13902
|
_Env: identity
|
|
@@ -13877,7 +13924,7 @@ const ScheduleProto = {
|
|
|
13877
13924
|
* @since 2.0.0
|
|
13878
13925
|
* @category guards
|
|
13879
13926
|
*/
|
|
13880
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
13927
|
+
const isSchedule = (u) => hasProperty(u, TypeId$58);
|
|
13881
13928
|
/**
|
|
13882
13929
|
* Creates a Schedule from a step function that returns a Pull.
|
|
13883
13930
|
*
|
|
@@ -13999,6 +14046,173 @@ const toStepWithMetadata = (schedule) => clockWith$2((clock) => map$11(toStep(sc
|
|
|
13999
14046
|
});
|
|
14000
14047
|
}));
|
|
14001
14048
|
/**
|
|
14049
|
+
* Combines two `Schedule`s by recurring if either of the two schedules wants
|
|
14050
|
+
* to recur, using the minimum of the two durations between recurrences and
|
|
14051
|
+
* outputting a tuple of the outputs of both schedules.
|
|
14052
|
+
*
|
|
14053
|
+
* @example
|
|
14054
|
+
* ```ts
|
|
14055
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
14056
|
+
*
|
|
14057
|
+
* // Either continues as long as at least one schedule wants to continue
|
|
14058
|
+
* const timeBasedSchedule = Schedule.spaced("2 seconds").pipe(Schedule.take(3))
|
|
14059
|
+
* const countBasedSchedule = Schedule.recurs(5)
|
|
14060
|
+
*
|
|
14061
|
+
* // Continues until both schedules are exhausted (either still wants to recur)
|
|
14062
|
+
* const eitherSchedule = Schedule.either(timeBasedSchedule, countBasedSchedule)
|
|
14063
|
+
* // Outputs: [time_result, count_result] tuple
|
|
14064
|
+
*
|
|
14065
|
+
* const program = Effect.gen(function*() {
|
|
14066
|
+
* const results = yield* Effect.repeat(
|
|
14067
|
+
* Effect.gen(function*() {
|
|
14068
|
+
* yield* Console.log(`Task executed at ${new Date().toISOString()}`)
|
|
14069
|
+
* return "task completed"
|
|
14070
|
+
* }),
|
|
14071
|
+
* eitherSchedule.pipe(
|
|
14072
|
+
* Schedule.tapOutput(([timeResult, countResult]) =>
|
|
14073
|
+
* Console.log(`Time: ${timeResult}, Count: ${countResult}`)
|
|
14074
|
+
* )
|
|
14075
|
+
* )
|
|
14076
|
+
* )
|
|
14077
|
+
*
|
|
14078
|
+
* yield* Console.log(`Total executions: ${results.length}`)
|
|
14079
|
+
* })
|
|
14080
|
+
*
|
|
14081
|
+
* // Either with different delay strategies
|
|
14082
|
+
* const aggressiveRetry = Schedule.exponential("100 millis").pipe(
|
|
14083
|
+
* Schedule.take(3)
|
|
14084
|
+
* )
|
|
14085
|
+
* const fallbackRetry = Schedule.fixed("5 seconds").pipe(Schedule.take(2))
|
|
14086
|
+
*
|
|
14087
|
+
* // Will use the more aggressive retry until it's exhausted, then fallback
|
|
14088
|
+
* const combinedRetry = Schedule.either(aggressiveRetry, fallbackRetry)
|
|
14089
|
+
*
|
|
14090
|
+
* const retryProgram = Effect.gen(function*() {
|
|
14091
|
+
* let attempt = 0
|
|
14092
|
+
*
|
|
14093
|
+
* const result = yield* Effect.retry(
|
|
14094
|
+
* Effect.gen(function*() {
|
|
14095
|
+
* attempt++
|
|
14096
|
+
* yield* Console.log(`Retry attempt ${attempt}`)
|
|
14097
|
+
*
|
|
14098
|
+
* if (attempt < 6) {
|
|
14099
|
+
* yield* Effect.fail(new Error(`Attempt ${attempt} failed`))
|
|
14100
|
+
* }
|
|
14101
|
+
*
|
|
14102
|
+
* return `Success on attempt ${attempt}`
|
|
14103
|
+
* }),
|
|
14104
|
+
* combinedRetry
|
|
14105
|
+
* )
|
|
14106
|
+
*
|
|
14107
|
+
* yield* Console.log(`Final result: ${result}`)
|
|
14108
|
+
* })
|
|
14109
|
+
*
|
|
14110
|
+
* // Either provides union semantics (OR logic)
|
|
14111
|
+
* // Compare with intersect which provides intersection semantics (AND logic)
|
|
14112
|
+
* ```
|
|
14113
|
+
*
|
|
14114
|
+
* @since 2.0.0
|
|
14115
|
+
* @category utilities
|
|
14116
|
+
*/
|
|
14117
|
+
const either = /* @__PURE__ */ dual(2, (self, other) => eitherWith(self, other, (left, right) => [left, right]));
|
|
14118
|
+
/**
|
|
14119
|
+
* Combines two `Schedule`s by recurring if either of the two schedules wants
|
|
14120
|
+
* to recur, using the minimum of the two durations between recurrences and
|
|
14121
|
+
* outputting the result of the combination of both schedule outputs using the
|
|
14122
|
+
* specified `combine` function.
|
|
14123
|
+
*
|
|
14124
|
+
* @example
|
|
14125
|
+
* ```ts
|
|
14126
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
14127
|
+
*
|
|
14128
|
+
* // Combine schedules with either semantics and custom combination
|
|
14129
|
+
* const primarySchedule = Schedule.exponential("100 millis").pipe(
|
|
14130
|
+
* Schedule.map(() => "primary"),
|
|
14131
|
+
* Schedule.take(2)
|
|
14132
|
+
* )
|
|
14133
|
+
* const fallbackSchedule = Schedule.spaced("500 millis").pipe(
|
|
14134
|
+
* Schedule.map(() => "fallback")
|
|
14135
|
+
* )
|
|
14136
|
+
*
|
|
14137
|
+
* const combined = Schedule.eitherWith(
|
|
14138
|
+
* primarySchedule,
|
|
14139
|
+
* fallbackSchedule,
|
|
14140
|
+
* (primary, fallback) => `${primary}+${fallback}`
|
|
14141
|
+
* )
|
|
14142
|
+
*
|
|
14143
|
+
* const program = Effect.gen(function*() {
|
|
14144
|
+
* yield* Effect.repeat(
|
|
14145
|
+
* Effect.gen(function*() {
|
|
14146
|
+
* yield* Console.log("Task executed")
|
|
14147
|
+
* return "task-result"
|
|
14148
|
+
* }),
|
|
14149
|
+
* combined.pipe(Schedule.take(5))
|
|
14150
|
+
* )
|
|
14151
|
+
* })
|
|
14152
|
+
* ```
|
|
14153
|
+
*
|
|
14154
|
+
* @since 2.0.0
|
|
14155
|
+
* @category utilities
|
|
14156
|
+
*/
|
|
14157
|
+
const eitherWith = /* @__PURE__ */ dual(3, (self, other, combine) => fromStep(map$11(zip$1(toStep(self), toStep(other)), ([stepLeft, stepRight]) => (now, input) => matchEffect$1(stepLeft(now, input), {
|
|
14158
|
+
onSuccess: (leftResult) => stepRight(now, input).pipe(map$11((rightResult) => [combine(leftResult[0], rightResult[0]), min$2(leftResult[1], rightResult[1])]), catchDone((rightDone) => succeed$5([combine(leftResult[0], rightDone), leftResult[1]]))),
|
|
14159
|
+
onFailure: failCause$5,
|
|
14160
|
+
onDone: (leftDone) => stepRight(now, input).pipe(map$11((rightResult) => [combine(leftDone, rightResult[0]), rightResult[1]]), catchDone((rightDone) => done(combine(leftDone, rightDone))))
|
|
14161
|
+
}))));
|
|
14162
|
+
/**
|
|
14163
|
+
* A schedule that always recurs, but will wait a certain amount between
|
|
14164
|
+
* repetitions, given by `base * factor.pow(n)`, where `n` is the number of
|
|
14165
|
+
* repetitions so far. Returns the current duration between recurrences.
|
|
14166
|
+
*
|
|
14167
|
+
* @example
|
|
14168
|
+
* ```ts
|
|
14169
|
+
* import { Console, Effect, Schedule } from "effect"
|
|
14170
|
+
*
|
|
14171
|
+
* // Basic exponential backoff with default factor of 2
|
|
14172
|
+
* const basicExponential = Schedule.exponential("100 millis")
|
|
14173
|
+
* // Delays: 100ms, 200ms, 400ms, 800ms, 1600ms, ...
|
|
14174
|
+
*
|
|
14175
|
+
* // Custom exponential backoff with factor 1.5
|
|
14176
|
+
* const gentleExponential = Schedule.exponential("200 millis", 1.5)
|
|
14177
|
+
* // Delays: 200ms, 300ms, 450ms, 675ms, 1012ms, ...
|
|
14178
|
+
*
|
|
14179
|
+
* // Retry with exponential backoff (limited to 5 attempts)
|
|
14180
|
+
* const retryPolicy = Schedule.exponential("50 millis").pipe(
|
|
14181
|
+
* Schedule.compose(Schedule.recurs(5))
|
|
14182
|
+
* )
|
|
14183
|
+
*
|
|
14184
|
+
* const program = Effect.gen(function*() {
|
|
14185
|
+
* let attempt = 0
|
|
14186
|
+
*
|
|
14187
|
+
* const result = yield* Effect.retry(
|
|
14188
|
+
* Effect.gen(function*() {
|
|
14189
|
+
* attempt++
|
|
14190
|
+
* if (attempt < 4) {
|
|
14191
|
+
* yield* Console.log(`Attempt ${attempt} failed, retrying...`)
|
|
14192
|
+
* yield* Effect.fail(new Error(`Failure ${attempt}`))
|
|
14193
|
+
* }
|
|
14194
|
+
* return `Success on attempt ${attempt}`
|
|
14195
|
+
* }),
|
|
14196
|
+
* retryPolicy
|
|
14197
|
+
* )
|
|
14198
|
+
*
|
|
14199
|
+
* yield* Console.log(`Final result: ${result}`)
|
|
14200
|
+
* })
|
|
14201
|
+
*
|
|
14202
|
+
* // Will retry with delays: 50ms, 100ms, 200ms before success
|
|
14203
|
+
* ```
|
|
14204
|
+
*
|
|
14205
|
+
* @since 2.0.0
|
|
14206
|
+
* @category constructors
|
|
14207
|
+
*/
|
|
14208
|
+
const exponential = (base, factor = 2) => {
|
|
14209
|
+
const baseMillis = toMillis(fromDurationInputUnsafe(base));
|
|
14210
|
+
return fromStepWithMetadata(succeed$5((meta) => {
|
|
14211
|
+
const duration = millis(baseMillis * Math.pow(factor, meta.attempt - 1));
|
|
14212
|
+
return succeed$5([duration, duration]);
|
|
14213
|
+
}));
|
|
14214
|
+
};
|
|
14215
|
+
/**
|
|
14002
14216
|
* Returns a new `Schedule` that outputs the inputs of the specified schedule.
|
|
14003
14217
|
*
|
|
14004
14218
|
* @example
|
|
@@ -14306,7 +14520,7 @@ const scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
|
14306
14520
|
|
|
14307
14521
|
//#endregion
|
|
14308
14522
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Request.js
|
|
14309
|
-
const TypeId$
|
|
14523
|
+
const TypeId$57 = "~effect/Request";
|
|
14310
14524
|
const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
14311
14525
|
_E: (_) => _,
|
|
14312
14526
|
_A: (_) => _,
|
|
@@ -14317,7 +14531,7 @@ const requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
|
14317
14531
|
*/
|
|
14318
14532
|
const RequestPrototype = {
|
|
14319
14533
|
...StructuralProto,
|
|
14320
|
-
[TypeId$
|
|
14534
|
+
[TypeId$57]: requestVariance
|
|
14321
14535
|
};
|
|
14322
14536
|
/**
|
|
14323
14537
|
* @since 2.0.0
|
|
@@ -14338,7 +14552,7 @@ const request$2 = /* @__PURE__ */ dual(2, (self, resolver) => {
|
|
|
14338
14552
|
const requestUnsafe$1 = (self, options) => {
|
|
14339
14553
|
const entry = addEntry(options.resolver, self, options.onExit, {
|
|
14340
14554
|
services: options.services,
|
|
14341
|
-
currentScheduler: get$
|
|
14555
|
+
currentScheduler: get$12(options.services, Scheduler)
|
|
14342
14556
|
});
|
|
14343
14557
|
return () => removeEntryUnsafe(options.resolver, entry);
|
|
14344
14558
|
};
|
|
@@ -14427,7 +14641,7 @@ function runBatch(batch) {
|
|
|
14427
14641
|
|
|
14428
14642
|
//#endregion
|
|
14429
14643
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Effect.js
|
|
14430
|
-
const TypeId$
|
|
14644
|
+
const TypeId$56 = EffectTypeId$1;
|
|
14431
14645
|
/**
|
|
14432
14646
|
* Tests if a value is an `Effect`.
|
|
14433
14647
|
*
|
|
@@ -14442,7 +14656,7 @@ const TypeId$54 = EffectTypeId$1;
|
|
|
14442
14656
|
* @since 2.0.0
|
|
14443
14657
|
* @category Guards
|
|
14444
14658
|
*/
|
|
14445
|
-
const isEffect = (u) => typeof u === "object" && u !== null && TypeId$
|
|
14659
|
+
const isEffect = (u) => typeof u === "object" && u !== null && TypeId$56 in u;
|
|
14446
14660
|
/**
|
|
14447
14661
|
* Combines multiple effects into one, returning results based on the input
|
|
14448
14662
|
* structure.
|
|
@@ -20926,7 +21140,7 @@ const fnUntracedEager = fnUntracedEager$1;
|
|
|
20926
21140
|
* @since 4.0.0
|
|
20927
21141
|
*/
|
|
20928
21142
|
/** @internal */
|
|
20929
|
-
function set$
|
|
21143
|
+
function set$10(self, key, value) {
|
|
20930
21144
|
if (key === "__proto__") Object.defineProperty(self, key, {
|
|
20931
21145
|
value,
|
|
20932
21146
|
writable: true,
|
|
@@ -21017,7 +21231,7 @@ const escape = (string) => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
|
21017
21231
|
|
|
21018
21232
|
//#endregion
|
|
21019
21233
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/DateTime.js
|
|
21020
|
-
TypeId$
|
|
21234
|
+
TypeId$59;
|
|
21021
21235
|
TimeZoneTypeId;
|
|
21022
21236
|
/**
|
|
21023
21237
|
* @since 3.6.0
|
|
@@ -21172,7 +21386,7 @@ const fromDateUnsafe = fromDateUnsafe$1;
|
|
|
21172
21386
|
* DateTime.makeUnsafe("2024-01-01")
|
|
21173
21387
|
* ```
|
|
21174
21388
|
*/
|
|
21175
|
-
const makeUnsafe$
|
|
21389
|
+
const makeUnsafe$8 = makeUnsafe$9;
|
|
21176
21390
|
/**
|
|
21177
21391
|
* Create a `DateTime.Zoned` using `DateTime.makeUnsafe` and a time zone.
|
|
21178
21392
|
*
|
|
@@ -22994,7 +23208,7 @@ const value$2 = (self) => {
|
|
|
22994
23208
|
*
|
|
22995
23209
|
* @since 3.3.0
|
|
22996
23210
|
*/
|
|
22997
|
-
const TypeId$
|
|
23211
|
+
const TypeId$55 = "~effect/data/Redacted";
|
|
22998
23212
|
/**
|
|
22999
23213
|
* @example
|
|
23000
23214
|
* ```ts
|
|
@@ -23010,7 +23224,7 @@ const TypeId$53 = "~effect/data/Redacted";
|
|
|
23010
23224
|
* @since 3.3.0
|
|
23011
23225
|
* @category refinements
|
|
23012
23226
|
*/
|
|
23013
|
-
const isRedacted = (u) => hasProperty(u, TypeId$
|
|
23227
|
+
const isRedacted = (u) => hasProperty(u, TypeId$55);
|
|
23014
23228
|
/**
|
|
23015
23229
|
* This function creates a `Redacted<A>` instance from a given value `A`,
|
|
23016
23230
|
* securely hiding its content.
|
|
@@ -23026,13 +23240,13 @@ const isRedacted = (u) => hasProperty(u, TypeId$53);
|
|
|
23026
23240
|
* @category constructors
|
|
23027
23241
|
*/
|
|
23028
23242
|
const make$51 = (value, options) => {
|
|
23029
|
-
const self = Object.create(Proto$
|
|
23243
|
+
const self = Object.create(Proto$20);
|
|
23030
23244
|
if (options?.label) self.label = options.label;
|
|
23031
23245
|
redactedRegistry.set(self, value);
|
|
23032
23246
|
return self;
|
|
23033
23247
|
};
|
|
23034
|
-
const Proto$
|
|
23035
|
-
[TypeId$
|
|
23248
|
+
const Proto$20 = {
|
|
23249
|
+
[TypeId$55]: { _A: (_) => _ },
|
|
23036
23250
|
label: void 0,
|
|
23037
23251
|
...PipeInspectableProto,
|
|
23038
23252
|
toJSON() {
|
|
@@ -23069,15 +23283,15 @@ const value$1 = value$2;
|
|
|
23069
23283
|
|
|
23070
23284
|
//#endregion
|
|
23071
23285
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/SchemaIssue.js
|
|
23072
|
-
const TypeId$
|
|
23286
|
+
const TypeId$54 = "~effect/SchemaIssue/Issue";
|
|
23073
23287
|
/**
|
|
23074
23288
|
* @since 4.0.0
|
|
23075
23289
|
*/
|
|
23076
23290
|
function isIssue(u) {
|
|
23077
|
-
return hasProperty(u, TypeId$
|
|
23291
|
+
return hasProperty(u, TypeId$54);
|
|
23078
23292
|
}
|
|
23079
23293
|
var Base$1 = class {
|
|
23080
|
-
[TypeId$
|
|
23294
|
+
[TypeId$54] = TypeId$54;
|
|
23081
23295
|
toString() {
|
|
23082
23296
|
return defaultFormatter$1(this);
|
|
23083
23297
|
}
|
|
@@ -23654,13 +23868,13 @@ function collectBracketPathEntries(isLeaf) {
|
|
|
23654
23868
|
/**
|
|
23655
23869
|
* @since 4.0.0
|
|
23656
23870
|
*/
|
|
23657
|
-
const TypeId$
|
|
23871
|
+
const TypeId$53 = "~effect/SchemaTransformation/Transformation";
|
|
23658
23872
|
/**
|
|
23659
23873
|
* @category model
|
|
23660
23874
|
* @since 4.0.0
|
|
23661
23875
|
*/
|
|
23662
23876
|
var Transformation = class Transformation {
|
|
23663
|
-
[TypeId$
|
|
23877
|
+
[TypeId$53] = TypeId$53;
|
|
23664
23878
|
_tag = "Transformation";
|
|
23665
23879
|
decode;
|
|
23666
23880
|
encode;
|
|
@@ -23679,7 +23893,7 @@ var Transformation = class Transformation {
|
|
|
23679
23893
|
* @since 4.0.0
|
|
23680
23894
|
*/
|
|
23681
23895
|
function isTransformation(u) {
|
|
23682
|
-
return hasProperty(u, TypeId$
|
|
23896
|
+
return hasProperty(u, TypeId$53);
|
|
23683
23897
|
}
|
|
23684
23898
|
/**
|
|
23685
23899
|
* @since 4.0.0
|
|
@@ -23774,7 +23988,7 @@ function makeGuard(tag) {
|
|
|
23774
23988
|
* @since 4.0.0
|
|
23775
23989
|
*/
|
|
23776
23990
|
function isAST(u) {
|
|
23777
|
-
return hasProperty(u, TypeId$
|
|
23991
|
+
return hasProperty(u, TypeId$52) && u[TypeId$52] === TypeId$52;
|
|
23778
23992
|
}
|
|
23779
23993
|
/**
|
|
23780
23994
|
* @category Guard
|
|
@@ -23837,13 +24051,13 @@ var Context = class {
|
|
|
23837
24051
|
this.annotations = annotations;
|
|
23838
24052
|
}
|
|
23839
24053
|
};
|
|
23840
|
-
const TypeId$
|
|
24054
|
+
const TypeId$52 = "~effect/Schema";
|
|
23841
24055
|
/**
|
|
23842
24056
|
* @category model
|
|
23843
24057
|
* @since 4.0.0
|
|
23844
24058
|
*/
|
|
23845
24059
|
var Base = class {
|
|
23846
|
-
[TypeId$
|
|
24060
|
+
[TypeId$52] = TypeId$52;
|
|
23847
24061
|
annotations;
|
|
23848
24062
|
checks;
|
|
23849
24063
|
encoding;
|
|
@@ -24431,7 +24645,7 @@ var Objects = class Objects extends Base {
|
|
|
24431
24645
|
else issues = [issue];
|
|
24432
24646
|
continue;
|
|
24433
24647
|
} else return yield* fail$4(new Composite(ast, oinput, [issue]));
|
|
24434
|
-
} else set$
|
|
24648
|
+
} else set$10(out, key, input[key]);
|
|
24435
24649
|
}
|
|
24436
24650
|
}
|
|
24437
24651
|
for (let i = 0; i < propertyCount; i++) {
|
|
@@ -24448,7 +24662,7 @@ var Objects = class Objects extends Base {
|
|
|
24448
24662
|
else issues = [issue];
|
|
24449
24663
|
continue;
|
|
24450
24664
|
} else return yield* fail$4(new Composite(ast, oinput, [issue]));
|
|
24451
|
-
} else if (exit$6.value._tag === "Some") set$
|
|
24665
|
+
} else if (exit$6.value._tag === "Some") set$10(out, p.name, exit$6.value.value);
|
|
24452
24666
|
else if (!isOptional(p.type)) {
|
|
24453
24667
|
const issue = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
|
|
24454
24668
|
if (errorsAllOption) {
|
|
@@ -24493,8 +24707,8 @@ var Objects = class Objects extends Base {
|
|
|
24493
24707
|
const v2 = exitValue.value.value;
|
|
24494
24708
|
if (is.merge && is.merge.decode && Object.hasOwn(out, k2)) {
|
|
24495
24709
|
const [k, v] = is.merge.decode.combine([k2, out[k2]], [k2, v2]);
|
|
24496
|
-
set$
|
|
24497
|
-
} else set$
|
|
24710
|
+
set$10(out, k, v);
|
|
24711
|
+
} else set$10(out, k2, v2);
|
|
24498
24712
|
}
|
|
24499
24713
|
}
|
|
24500
24714
|
}
|
|
@@ -24502,7 +24716,7 @@ var Objects = class Objects extends Base {
|
|
|
24502
24716
|
if (options.propertyOrder === "original") {
|
|
24503
24717
|
const keys = (inputKeys ?? Reflect.ownKeys(input)).concat(expectedKeys);
|
|
24504
24718
|
const preserved = {};
|
|
24505
|
-
for (const key of keys) if (Object.hasOwn(out, key)) set$
|
|
24719
|
+
for (const key of keys) if (Object.hasOwn(out, key)) set$10(preserved, key, out[key]);
|
|
24506
24720
|
return some$2(preserved);
|
|
24507
24721
|
}
|
|
24508
24722
|
return some$2(out);
|
|
@@ -25239,7 +25453,7 @@ function nominal() {
|
|
|
25239
25453
|
/**
|
|
25240
25454
|
* @since 4.0.0
|
|
25241
25455
|
*/
|
|
25242
|
-
const TypeId$
|
|
25456
|
+
const TypeId$51 = "~effect/platform/PlatformError";
|
|
25243
25457
|
/**
|
|
25244
25458
|
* @since 4.0.0
|
|
25245
25459
|
* @category Models
|
|
@@ -25279,7 +25493,7 @@ var PlatformError = class extends TaggedError("PlatformError") {
|
|
|
25279
25493
|
/**
|
|
25280
25494
|
* @since 4.0.0
|
|
25281
25495
|
*/
|
|
25282
|
-
[TypeId$
|
|
25496
|
+
[TypeId$51] = TypeId$51;
|
|
25283
25497
|
get message() {
|
|
25284
25498
|
return this.reason.message;
|
|
25285
25499
|
}
|
|
@@ -25367,7 +25581,7 @@ const badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
|
25367
25581
|
*
|
|
25368
25582
|
* @since 2.0.0
|
|
25369
25583
|
*/
|
|
25370
|
-
const TypeId$
|
|
25584
|
+
const TypeId$50 = "~effect/collections/Chunk";
|
|
25371
25585
|
function copy$1(src, srcPos, dest, destPos, len) {
|
|
25372
25586
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) dest[destPos + i - srcPos] = src[i];
|
|
25373
25587
|
return dest;
|
|
@@ -25393,10 +25607,10 @@ const emptyArray = [];
|
|
|
25393
25607
|
* @category equivalence
|
|
25394
25608
|
* @since 2.0.0
|
|
25395
25609
|
*/
|
|
25396
|
-
const makeEquivalence$1 = (isEquivalent) => make$58((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe$
|
|
25610
|
+
const makeEquivalence$1 = (isEquivalent) => make$58((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe$4(that, i))));
|
|
25397
25611
|
const _equivalence = /* @__PURE__ */ makeEquivalence$1(equals$1);
|
|
25398
25612
|
const ChunkProto = {
|
|
25399
|
-
[TypeId$
|
|
25613
|
+
[TypeId$50]: { _A: (_) => _ },
|
|
25400
25614
|
toString() {
|
|
25401
25615
|
return `Chunk(${format$3(toReadonlyArray(this))})`;
|
|
25402
25616
|
},
|
|
@@ -25481,7 +25695,7 @@ const makeChunk = (backing) => {
|
|
|
25481
25695
|
* @category constructors
|
|
25482
25696
|
* @since 2.0.0
|
|
25483
25697
|
*/
|
|
25484
|
-
const isChunk = (u) => hasProperty(u, TypeId$
|
|
25698
|
+
const isChunk = (u) => hasProperty(u, TypeId$50);
|
|
25485
25699
|
const _empty = /* @__PURE__ */ makeChunk({ _tag: "IEmpty" });
|
|
25486
25700
|
/**
|
|
25487
25701
|
* Creates an empty `Chunk`.
|
|
@@ -25533,7 +25747,7 @@ const copyToArray = (self, array, initial) => {
|
|
|
25533
25747
|
let i = 0;
|
|
25534
25748
|
let j = initial;
|
|
25535
25749
|
while (i < self.length) {
|
|
25536
|
-
array[j] = getUnsafe$
|
|
25750
|
+
array[j] = getUnsafe$4(self, i);
|
|
25537
25751
|
i += 1;
|
|
25538
25752
|
j += 1;
|
|
25539
25753
|
}
|
|
@@ -25630,7 +25844,7 @@ const fromArrayUnsafe = (self) => self.length === 0 ? empty$11() : self.length =
|
|
|
25630
25844
|
* @since 2.0.0
|
|
25631
25845
|
* @category unsafe
|
|
25632
25846
|
*/
|
|
25633
|
-
const getUnsafe$
|
|
25847
|
+
const getUnsafe$4 = /* @__PURE__ */ dual(2, (self, index) => {
|
|
25634
25848
|
const i = Math.floor(index);
|
|
25635
25849
|
switch (self.backing._tag) {
|
|
25636
25850
|
case "IEmpty": throw new Error(`Index out of bounds: ${i}`);
|
|
@@ -25640,8 +25854,8 @@ const getUnsafe$3 = /* @__PURE__ */ dual(2, (self, index) => {
|
|
|
25640
25854
|
case "IArray":
|
|
25641
25855
|
if (i >= self.length || i < 0) throw new Error(`Index out of bounds: ${i}`);
|
|
25642
25856
|
return self.backing.array[i];
|
|
25643
|
-
case "IConcat": return i < self.left.length ? getUnsafe$
|
|
25644
|
-
case "ISlice": return getUnsafe$
|
|
25857
|
+
case "IConcat": return i < self.left.length ? getUnsafe$4(self.left, i) : getUnsafe$4(self.right, i - self.left.length);
|
|
25858
|
+
case "ISlice": return getUnsafe$4(self.backing.chunk, i + self.backing.offset);
|
|
25645
25859
|
}
|
|
25646
25860
|
});
|
|
25647
25861
|
/**
|
|
@@ -26790,9 +27004,9 @@ const remove$6 = (self, value) => filter$3(self, (v) => v !== value);
|
|
|
26790
27004
|
|
|
26791
27005
|
//#endregion
|
|
26792
27006
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/MutableRef.js
|
|
26793
|
-
const TypeId$
|
|
27007
|
+
const TypeId$49 = "~effect/MutableRef";
|
|
26794
27008
|
const MutableRefProto = {
|
|
26795
|
-
[TypeId$
|
|
27009
|
+
[TypeId$49]: TypeId$49,
|
|
26796
27010
|
...PipeInspectableProto,
|
|
26797
27011
|
toJSON() {
|
|
26798
27012
|
return {
|
|
@@ -26868,7 +27082,7 @@ const make$47 = (value) => {
|
|
|
26868
27082
|
* @since 2.0.0
|
|
26869
27083
|
* @category general
|
|
26870
27084
|
*/
|
|
26871
|
-
const set$
|
|
27085
|
+
const set$9 = /* @__PURE__ */ dual(2, (self, value) => {
|
|
26872
27086
|
self.current = value;
|
|
26873
27087
|
return self;
|
|
26874
27088
|
});
|
|
@@ -26905,7 +27119,7 @@ const set$8 = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
26905
27119
|
*
|
|
26906
27120
|
* @since 2.0.0
|
|
26907
27121
|
*/
|
|
26908
|
-
const TypeId$
|
|
27122
|
+
const TypeId$48 = "~effect/PubSub";
|
|
26909
27123
|
const SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
26910
27124
|
/**
|
|
26911
27125
|
* Publishes a message to the `PubSub`, returning whether the message was published
|
|
@@ -27000,7 +27214,7 @@ const publish = /* @__PURE__ */ dual(2, (self, value) => suspend$3(() => {
|
|
|
27000
27214
|
*/
|
|
27001
27215
|
const subscribe = (self) => acquireRelease(sync(() => makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy)), unsubscribe);
|
|
27002
27216
|
const unsubscribe = (self) => uninterruptible(withFiber((state) => {
|
|
27003
|
-
set$
|
|
27217
|
+
set$9(self.shutdownFlag, true);
|
|
27004
27218
|
return forEach$3(takeAll$2(self.pollers), (d) => interruptWith(d, state.id), {
|
|
27005
27219
|
discard: true,
|
|
27006
27220
|
concurrency: "unbounded"
|
|
@@ -27047,7 +27261,7 @@ const takeAll$1 = (self) => suspend$3(function loop(value) {
|
|
|
27047
27261
|
return succeed$1(as);
|
|
27048
27262
|
});
|
|
27049
27263
|
const pollForItem = (self) => {
|
|
27050
|
-
const deferred = makeUnsafe$
|
|
27264
|
+
const deferred = makeUnsafe$11();
|
|
27051
27265
|
let set = self.subscribers.get(self.subscription);
|
|
27052
27266
|
if (!set) {
|
|
27053
27267
|
set = /* @__PURE__ */ new Set();
|
|
@@ -27087,7 +27301,7 @@ var SubscriptionImpl = class {
|
|
|
27087
27301
|
}
|
|
27088
27302
|
};
|
|
27089
27303
|
var PubSubImpl = class {
|
|
27090
|
-
[TypeId$
|
|
27304
|
+
[TypeId$48] = { _A: identity };
|
|
27091
27305
|
pubsub;
|
|
27092
27306
|
subscribers;
|
|
27093
27307
|
scope;
|
|
@@ -27112,7 +27326,7 @@ var PubSubImpl = class {
|
|
|
27112
27326
|
/**
|
|
27113
27327
|
* @since 3.8.0
|
|
27114
27328
|
*/
|
|
27115
|
-
const TypeId$
|
|
27329
|
+
const TypeId$47 = "~effect/Queue";
|
|
27116
27330
|
const EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
27117
27331
|
const DequeueTypeId = "~effect/Queue/Dequeue";
|
|
27118
27332
|
const variance$1 = {
|
|
@@ -27120,7 +27334,7 @@ const variance$1 = {
|
|
|
27120
27334
|
_E: identity
|
|
27121
27335
|
};
|
|
27122
27336
|
const QueueProto = {
|
|
27123
|
-
[TypeId$
|
|
27337
|
+
[TypeId$47]: variance$1,
|
|
27124
27338
|
[EnqueueTypeId]: variance$1,
|
|
27125
27339
|
[DequeueTypeId]: variance$1,
|
|
27126
27340
|
...PipeInspectableProto,
|
|
@@ -27894,7 +28108,7 @@ const finalize = (self, exit) => {
|
|
|
27894
28108
|
*
|
|
27895
28109
|
* @since 2.0.0
|
|
27896
28110
|
*/
|
|
27897
|
-
const TypeId$
|
|
28111
|
+
const TypeId$46 = "~effect/Channel";
|
|
27898
28112
|
/**
|
|
27899
28113
|
* Tests if a value is a `Channel`.
|
|
27900
28114
|
*
|
|
@@ -27910,9 +28124,9 @@ const TypeId$44 = "~effect/Channel";
|
|
|
27910
28124
|
* @category guards
|
|
27911
28125
|
* @since 3.5.4
|
|
27912
28126
|
*/
|
|
27913
|
-
const isChannel = (u) => hasProperty(u, TypeId$
|
|
28127
|
+
const isChannel = (u) => hasProperty(u, TypeId$46);
|
|
27914
28128
|
const ChannelProto = {
|
|
27915
|
-
[TypeId$
|
|
28129
|
+
[TypeId$46]: {
|
|
27916
28130
|
_Env: identity,
|
|
27917
28131
|
_InErr: identity,
|
|
27918
28132
|
_InElem: identity,
|
|
@@ -29054,7 +29268,7 @@ const onExit$1 = /* @__PURE__ */ dual(2, (self, finalizer) => fromTransformBrack
|
|
|
29054
29268
|
*/
|
|
29055
29269
|
const ensuring$1 = /* @__PURE__ */ dual(2, (self, finalizer) => onExit$1(self, (_) => finalizer));
|
|
29056
29270
|
const runWith$1 = (self, f, onHalt) => suspend$3(() => {
|
|
29057
|
-
const scope = makeUnsafe$
|
|
29271
|
+
const scope = makeUnsafe$10();
|
|
29058
29272
|
const makePull = toTransform(self)(done(), scope);
|
|
29059
29273
|
return catchDone(flatMap$2(makePull, f), onHalt ? onHalt : succeed$1).pipe(onExit$2((exit) => close(scope, exit)));
|
|
29060
29274
|
});
|
|
@@ -29157,7 +29371,7 @@ const runFold = /* @__PURE__ */ dual(3, (self, initial, f) => suspend$3(() => {
|
|
|
29157
29371
|
const toPull$1 = /* @__PURE__ */ fnUntraced(function* (self) {
|
|
29158
29372
|
const semaphore = makeSemaphoreUnsafe(1);
|
|
29159
29373
|
const context = yield* services();
|
|
29160
|
-
const scope = get$
|
|
29374
|
+
const scope = get$12(context, Scope);
|
|
29161
29375
|
return (yield* toTransform(self)(done(), scope)).pipe(provideServices(context), semaphore.withPermits(1));
|
|
29162
29376
|
}, /* @__PURE__ */ catchCause$1((cause) => succeed$1(failCause$2(cause))));
|
|
29163
29377
|
/**
|
|
@@ -29189,14 +29403,14 @@ const toPullScoped = (self, scope) => toTransform(self)(done(), scope);
|
|
|
29189
29403
|
|
|
29190
29404
|
//#endregion
|
|
29191
29405
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/internal/stream.js
|
|
29192
|
-
const TypeId$
|
|
29406
|
+
const TypeId$45 = "~effect/Stream";
|
|
29193
29407
|
const streamVariance = {
|
|
29194
29408
|
_R: identity,
|
|
29195
29409
|
_E: identity,
|
|
29196
29410
|
_A: identity
|
|
29197
29411
|
};
|
|
29198
29412
|
const StreamProto = {
|
|
29199
|
-
[TypeId$
|
|
29413
|
+
[TypeId$45]: streamVariance,
|
|
29200
29414
|
pipe() {
|
|
29201
29415
|
return pipeArguments(this, arguments);
|
|
29202
29416
|
}
|
|
@@ -29210,7 +29424,7 @@ const fromChannel$2 = (channel) => {
|
|
|
29210
29424
|
|
|
29211
29425
|
//#endregion
|
|
29212
29426
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Sink.js
|
|
29213
|
-
const TypeId$
|
|
29427
|
+
const TypeId$44 = "~effect/Sink";
|
|
29214
29428
|
const endVoid = /* @__PURE__ */ succeed$1([void 0]);
|
|
29215
29429
|
const sinkVariance = {
|
|
29216
29430
|
_A: identity,
|
|
@@ -29220,7 +29434,7 @@ const sinkVariance = {
|
|
|
29220
29434
|
_R: identity
|
|
29221
29435
|
};
|
|
29222
29436
|
const SinkProto = {
|
|
29223
|
-
[TypeId$
|
|
29437
|
+
[TypeId$44]: sinkVariance,
|
|
29224
29438
|
pipe() {
|
|
29225
29439
|
return pipeArguments(this, arguments);
|
|
29226
29440
|
}
|
|
@@ -29242,7 +29456,7 @@ const SinkProto = {
|
|
|
29242
29456
|
* @since 2.0.0
|
|
29243
29457
|
* @category guards
|
|
29244
29458
|
*/
|
|
29245
|
-
const isSink = (u) => hasProperty(u, TypeId$
|
|
29459
|
+
const isSink = (u) => hasProperty(u, TypeId$44);
|
|
29246
29460
|
/**
|
|
29247
29461
|
* Creates a sink from a `Channel`.
|
|
29248
29462
|
*
|
|
@@ -29416,9 +29630,9 @@ const unwrap$1 = (effect) => fromChannel$1(unwrap$2(map$8(effect, toChannel$1)))
|
|
|
29416
29630
|
|
|
29417
29631
|
//#endregion
|
|
29418
29632
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/MutableHashMap.js
|
|
29419
|
-
const TypeId$
|
|
29633
|
+
const TypeId$43 = "~effect/collections/MutableHashMap";
|
|
29420
29634
|
const MutableHashMapProto = {
|
|
29421
|
-
[TypeId$
|
|
29635
|
+
[TypeId$43]: TypeId$43,
|
|
29422
29636
|
[Symbol.iterator]() {
|
|
29423
29637
|
return this.backing[Symbol.iterator]();
|
|
29424
29638
|
},
|
|
@@ -29512,7 +29726,7 @@ const make$45 = (...entries) => fromIterable$3(entries);
|
|
|
29512
29726
|
*/
|
|
29513
29727
|
const fromIterable$3 = (entries) => {
|
|
29514
29728
|
const self = empty$9();
|
|
29515
|
-
for (const [key, value] of entries) set$
|
|
29729
|
+
for (const [key, value] of entries) set$8(self, key, value);
|
|
29516
29730
|
return self;
|
|
29517
29731
|
};
|
|
29518
29732
|
/**
|
|
@@ -29535,7 +29749,7 @@ const fromIterable$3 = (entries) => {
|
|
|
29535
29749
|
* @since 2.0.0
|
|
29536
29750
|
* @category elements
|
|
29537
29751
|
*/
|
|
29538
|
-
const get$
|
|
29752
|
+
const get$11 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
29539
29753
|
if (self.backing.has(key)) return some$2(self.backing.get(key));
|
|
29540
29754
|
else if (isSimpleKey(key)) return none$3();
|
|
29541
29755
|
const refKey = referentialKeysCache.get(self);
|
|
@@ -29604,7 +29818,7 @@ const getFromBucket = (self, bucket, key) => {
|
|
|
29604
29818
|
* @since 2.0.0
|
|
29605
29819
|
* @category elements
|
|
29606
29820
|
*/
|
|
29607
|
-
const has$2 = /* @__PURE__ */ dual(2, (self, key) => isSome(get$
|
|
29821
|
+
const has$2 = /* @__PURE__ */ dual(2, (self, key) => isSome(get$11(self, key)));
|
|
29608
29822
|
/**
|
|
29609
29823
|
* Sets a key-value pair in the MutableHashMap, mutating the map in place.
|
|
29610
29824
|
* If the key already exists, its value is updated.
|
|
@@ -29635,7 +29849,7 @@ const has$2 = /* @__PURE__ */ dual(2, (self, key) => isSome(get$10(self, key)));
|
|
|
29635
29849
|
* @since 2.0.0
|
|
29636
29850
|
* @category mutations
|
|
29637
29851
|
*/
|
|
29638
|
-
const set$
|
|
29852
|
+
const set$8 = /* @__PURE__ */ dual(3, (self, key, value) => {
|
|
29639
29853
|
if (self.backing.has(key) || isSimpleKey(key)) {
|
|
29640
29854
|
self.backing.set(key, value);
|
|
29641
29855
|
return self;
|
|
@@ -29786,9 +30000,9 @@ const size$2 = (self) => self.backing.size;
|
|
|
29786
30000
|
/**
|
|
29787
30001
|
* @since 3.5.0
|
|
29788
30002
|
*/
|
|
29789
|
-
const TypeId$
|
|
29790
|
-
const makeUnsafe$
|
|
29791
|
-
[TypeId$
|
|
30003
|
+
const TypeId$42 = "~effect/RcMap";
|
|
30004
|
+
const makeUnsafe$7 = (options) => ({
|
|
30005
|
+
[TypeId$42]: TypeId$42,
|
|
29792
30006
|
lookup: options.lookup,
|
|
29793
30007
|
services: options.services,
|
|
29794
30008
|
scope: options.scope,
|
|
@@ -29840,8 +30054,8 @@ const makeUnsafe$4 = (options) => ({
|
|
|
29840
30054
|
*/
|
|
29841
30055
|
const make$44 = (options) => withFiber((fiber) => {
|
|
29842
30056
|
const services = fiber.services;
|
|
29843
|
-
const scope = get$
|
|
29844
|
-
const self = makeUnsafe$
|
|
30057
|
+
const scope = get$12(services, Scope);
|
|
30058
|
+
const self = makeUnsafe$7({
|
|
29845
30059
|
lookup: options.lookup,
|
|
29846
30060
|
services,
|
|
29847
30061
|
scope,
|
|
@@ -29883,11 +30097,11 @@ const make$44 = (options) => withFiber((fiber) => {
|
|
|
29883
30097
|
* }).pipe(Effect.scoped)
|
|
29884
30098
|
* ```
|
|
29885
30099
|
*/
|
|
29886
|
-
const get$
|
|
30100
|
+
const get$10 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask((restore) => {
|
|
29887
30101
|
if (self.state._tag === "Closed") return interrupt$1;
|
|
29888
30102
|
const state = self.state;
|
|
29889
30103
|
const parent = getCurrent();
|
|
29890
|
-
const o = get$
|
|
30104
|
+
const o = get$11(state.map, key);
|
|
29891
30105
|
let entry;
|
|
29892
30106
|
if (o._tag === "Some") {
|
|
29893
30107
|
entry = o.value;
|
|
@@ -29895,8 +30109,8 @@ const get$9 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask((restor
|
|
|
29895
30109
|
} else if (Number.isFinite(self.capacity) && size$2(self.state.map) >= self.capacity) return fail$4(new ExceededCapacityError(`RcMap attempted to exceed capacity of ${self.capacity}`));
|
|
29896
30110
|
else {
|
|
29897
30111
|
entry = {
|
|
29898
|
-
deferred: makeUnsafe$
|
|
29899
|
-
scope: makeUnsafe$
|
|
30112
|
+
deferred: makeUnsafe$11(),
|
|
30113
|
+
scope: makeUnsafe$10(),
|
|
29900
30114
|
idleTimeToLive: self.idleTimeToLive(key),
|
|
29901
30115
|
finalizer: void 0,
|
|
29902
30116
|
fiber: void 0,
|
|
@@ -29904,15 +30118,15 @@ const get$9 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask((restor
|
|
|
29904
30118
|
refCount: 1
|
|
29905
30119
|
};
|
|
29906
30120
|
entry.finalizer = release(self, key, entry);
|
|
29907
|
-
set$
|
|
30121
|
+
set$8(state.map, key, entry);
|
|
29908
30122
|
const services = new Map(self.services.mapUnsafe);
|
|
29909
30123
|
parent.services.mapUnsafe.forEach((value, key) => {
|
|
29910
30124
|
services.set(key, value);
|
|
29911
30125
|
});
|
|
29912
30126
|
services.set(Scope.key, entry.scope);
|
|
29913
|
-
self.lookup(key).pipe(runForkWith(makeUnsafe$
|
|
30127
|
+
self.lookup(key).pipe(runForkWith(makeUnsafe$12(services)), runIn(entry.scope)).addObserver((exit) => doneUnsafe(entry.deferred, exit));
|
|
29914
30128
|
}
|
|
29915
|
-
const scope = getUnsafe$
|
|
30129
|
+
const scope = getUnsafe$5(parent.services, Scope);
|
|
29916
30130
|
return addFinalizer$1(scope, entry.finalizer).pipe(andThen(restore(_await(entry.deferred))));
|
|
29917
30131
|
}));
|
|
29918
30132
|
const release = (self, key, entry) => withFiber((fiber) => {
|
|
@@ -29972,7 +30186,7 @@ const release = (self, key, entry) => withFiber((fiber) => {
|
|
|
29972
30186
|
*/
|
|
29973
30187
|
const invalidate$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self, key) {
|
|
29974
30188
|
if (self.state._tag === "Closed") return;
|
|
29975
|
-
const o = get$
|
|
30189
|
+
const o = get$11(self.state.map, key);
|
|
29976
30190
|
if (o._tag === "None") return;
|
|
29977
30191
|
const entry = o.value;
|
|
29978
30192
|
remove$5(self.state.map, key);
|
|
@@ -29983,7 +30197,7 @@ const invalidate$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function
|
|
|
29983
30197
|
|
|
29984
30198
|
//#endregion
|
|
29985
30199
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/internal/rcRef.js
|
|
29986
|
-
const TypeId$
|
|
30200
|
+
const TypeId$41 = "~effect/RcRef";
|
|
29987
30201
|
const stateEmpty = { _tag: "Empty" };
|
|
29988
30202
|
const stateClosed = { _tag: "Closed" };
|
|
29989
30203
|
const variance = {
|
|
@@ -29991,7 +30205,7 @@ const variance = {
|
|
|
29991
30205
|
_E: identity
|
|
29992
30206
|
};
|
|
29993
30207
|
var RcRefImpl = class {
|
|
29994
|
-
[TypeId$
|
|
30208
|
+
[TypeId$41] = variance;
|
|
29995
30209
|
state = stateEmpty;
|
|
29996
30210
|
semaphore = /* @__PURE__ */ makeSemaphoreUnsafe(1);
|
|
29997
30211
|
acquire;
|
|
@@ -30008,7 +30222,7 @@ var RcRefImpl = class {
|
|
|
30008
30222
|
/** @internal */
|
|
30009
30223
|
const make$43 = (options) => withFiber((fiber) => {
|
|
30010
30224
|
const services = fiber.services;
|
|
30011
|
-
const scope = get$
|
|
30225
|
+
const scope = get$12(services, Scope);
|
|
30012
30226
|
const ref = new RcRefImpl(options.acquire, services, scope, options.idleTimeToLive ? fromDurationInputUnsafe(options.idleTimeToLive) : void 0);
|
|
30013
30227
|
return as(addFinalizerExit(scope, () => {
|
|
30014
30228
|
const close$1 = ref.state._tag === "Acquired" ? close(ref.state.scope, void_$2) : void_$1;
|
|
@@ -30023,7 +30237,7 @@ const getState = (self) => uninterruptibleMask((restore) => {
|
|
|
30023
30237
|
self.state.refCount++;
|
|
30024
30238
|
return self.state.fiber ? as(interrupt(self.state.fiber), self.state) : succeed$1(self.state);
|
|
30025
30239
|
case "Empty": {
|
|
30026
|
-
const scope = makeUnsafe$
|
|
30240
|
+
const scope = makeUnsafe$10();
|
|
30027
30241
|
return self.semaphore.withPermits(1)(restore(provideServices(self.acquire, add$3(self.services, Scope, scope))).pipe(map$8((value) => {
|
|
30028
30242
|
const state = {
|
|
30029
30243
|
_tag: "Acquired",
|
|
@@ -30040,7 +30254,7 @@ const getState = (self) => uninterruptibleMask((restore) => {
|
|
|
30040
30254
|
}
|
|
30041
30255
|
});
|
|
30042
30256
|
/** @internal */
|
|
30043
|
-
const get$
|
|
30257
|
+
const get$9 = /* @__PURE__ */ fnUntraced(function* (self_) {
|
|
30044
30258
|
const self = self_;
|
|
30045
30259
|
const state = yield* getState(self);
|
|
30046
30260
|
const scope$6 = yield* scope;
|
|
@@ -30148,7 +30362,7 @@ const make$42 = make$43;
|
|
|
30148
30362
|
* })
|
|
30149
30363
|
* ```
|
|
30150
30364
|
*/
|
|
30151
|
-
const get$
|
|
30365
|
+
const get$8 = get$9;
|
|
30152
30366
|
/**
|
|
30153
30367
|
* @since 3.19.6
|
|
30154
30368
|
* @category combinators
|
|
@@ -30160,7 +30374,7 @@ const invalidate$2 = invalidate$3;
|
|
|
30160
30374
|
/**
|
|
30161
30375
|
* @since 2.0.0
|
|
30162
30376
|
*/
|
|
30163
|
-
const TypeId$
|
|
30377
|
+
const TypeId$40 = "~effect/Stream";
|
|
30164
30378
|
/**
|
|
30165
30379
|
* Checks whether a value is a Stream.
|
|
30166
30380
|
*
|
|
@@ -30184,7 +30398,7 @@ const TypeId$38 = "~effect/Stream";
|
|
|
30184
30398
|
* @since 2.0.0
|
|
30185
30399
|
* @category Guards
|
|
30186
30400
|
*/
|
|
30187
|
-
const isStream = (u) => hasProperty(u, TypeId$
|
|
30401
|
+
const isStream = (u) => hasProperty(u, TypeId$40);
|
|
30188
30402
|
/**
|
|
30189
30403
|
* The default chunk size used by Stream constructors and combinators.
|
|
30190
30404
|
*
|
|
@@ -31180,7 +31394,7 @@ const runCollect = (self) => runFold(self.channel, () => [], (acc, chunk) => {
|
|
|
31180
31394
|
* @since 2.0.0
|
|
31181
31395
|
* @category Destructors
|
|
31182
31396
|
*/
|
|
31183
|
-
const runHead = (self) => map$8(runHead$1(self.channel), map$14(getUnsafe$
|
|
31397
|
+
const runHead = (self) => map$8(runHead$1(self.channel), map$14(getUnsafe$6(0)));
|
|
31184
31398
|
/**
|
|
31185
31399
|
* Runs the provided effectful callback for each element of the stream.
|
|
31186
31400
|
*
|
|
@@ -31391,7 +31605,7 @@ const toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]),
|
|
|
31391
31605
|
*
|
|
31392
31606
|
* @since 4.0.0
|
|
31393
31607
|
*/
|
|
31394
|
-
const TypeId$
|
|
31608
|
+
const TypeId$39 = "~effect/platform/FileSystem";
|
|
31395
31609
|
/**
|
|
31396
31610
|
* Creates a `Size` from various numeric input types.
|
|
31397
31611
|
*
|
|
@@ -31480,7 +31694,7 @@ const FileSystem = /* @__PURE__ */ Service$1("effect/platform/FileSystem");
|
|
|
31480
31694
|
*/
|
|
31481
31695
|
const make$41 = (impl) => FileSystem.of({
|
|
31482
31696
|
...impl,
|
|
31483
|
-
[TypeId$
|
|
31697
|
+
[TypeId$39]: TypeId$39,
|
|
31484
31698
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "SystemError" && e.reason.kind === "NotFound" ? succeed$1(false) : fail$4(e))),
|
|
31485
31699
|
readFileString: (path, encoding) => flatMap$2(impl.readFile(path), (_) => try_({
|
|
31486
31700
|
try: () => new TextDecoder(encoding).decode(_),
|
|
@@ -31583,7 +31797,7 @@ var WatchBackend = class extends Service$1()("effect/platform/FileSystem/WatchBa
|
|
|
31583
31797
|
/**
|
|
31584
31798
|
* @since 4.0.0
|
|
31585
31799
|
*/
|
|
31586
|
-
const TypeId$
|
|
31800
|
+
const TypeId$38 = "~effect/platform/Path";
|
|
31587
31801
|
/**
|
|
31588
31802
|
* @since 4.0.0
|
|
31589
31803
|
* @category tag
|
|
@@ -31775,7 +31989,7 @@ function encodePathChars(filepath) {
|
|
|
31775
31989
|
return filepath;
|
|
31776
31990
|
}
|
|
31777
31991
|
const posixImpl = /* @__PURE__ */ Path$1.of({
|
|
31778
|
-
[TypeId$
|
|
31992
|
+
[TypeId$38]: TypeId$38,
|
|
31779
31993
|
resolve,
|
|
31780
31994
|
normalize(path) {
|
|
31781
31995
|
if (path.length === 0) return ".";
|
|
@@ -32039,7 +32253,7 @@ function makeArray(length, value) {
|
|
|
32039
32253
|
* @since 4.0.0
|
|
32040
32254
|
*/
|
|
32041
32255
|
const ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", { defaultValue: () => fromEnv() });
|
|
32042
|
-
const Proto$
|
|
32256
|
+
const Proto$19 = {
|
|
32043
32257
|
...PipeInspectableProto,
|
|
32044
32258
|
toJSON() {
|
|
32045
32259
|
return { _id: "ConfigProvider" };
|
|
@@ -32050,7 +32264,7 @@ const Proto$17 = {
|
|
|
32050
32264
|
* @since 4.0.0
|
|
32051
32265
|
*/
|
|
32052
32266
|
function make$40(get, mapInput, prefix) {
|
|
32053
|
-
const self = Object.create(Proto$
|
|
32267
|
+
const self = Object.create(Proto$19);
|
|
32054
32268
|
self.get = get;
|
|
32055
32269
|
self.mapInput = mapInput;
|
|
32056
32270
|
self.prefix = prefix;
|
|
@@ -32427,7 +32641,7 @@ function makeEffect$1(schema) {
|
|
|
32427
32641
|
* @category Constructing
|
|
32428
32642
|
* @since 4.0.0
|
|
32429
32643
|
*/
|
|
32430
|
-
function makeUnsafe$
|
|
32644
|
+
function makeUnsafe$6(schema) {
|
|
32431
32645
|
const parser = makeEffect$1(schema);
|
|
32432
32646
|
return (input, options) => {
|
|
32433
32647
|
return runSync(mapErrorEager(parser(input, options), (issue) => new Error(issue.toString(), { cause: issue })));
|
|
@@ -32722,9 +32936,9 @@ function escapeToken(token) {
|
|
|
32722
32936
|
//#endregion
|
|
32723
32937
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/internal/schema/schema.js
|
|
32724
32938
|
/** @internal */
|
|
32725
|
-
const TypeId$
|
|
32939
|
+
const TypeId$37 = "~effect/Schema/Schema";
|
|
32726
32940
|
const SchemaProto = {
|
|
32727
|
-
[TypeId$
|
|
32941
|
+
[TypeId$37]: TypeId$37,
|
|
32728
32942
|
pipe() {
|
|
32729
32943
|
return pipeArguments(this, arguments);
|
|
32730
32944
|
},
|
|
@@ -32744,7 +32958,7 @@ function make$39(ast, options) {
|
|
|
32744
32958
|
if (options) Object.assign(self, options);
|
|
32745
32959
|
self.ast = ast;
|
|
32746
32960
|
self.rebuild = (ast) => make$39(ast, options);
|
|
32747
|
-
self.makeUnsafe = makeUnsafe$
|
|
32961
|
+
self.makeUnsafe = makeUnsafe$6(self);
|
|
32748
32962
|
return self;
|
|
32749
32963
|
}
|
|
32750
32964
|
|
|
@@ -33432,7 +33646,7 @@ function getPartPattern(part) {
|
|
|
33432
33646
|
|
|
33433
33647
|
//#endregion
|
|
33434
33648
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Schema.js
|
|
33435
|
-
const TypeId$
|
|
33649
|
+
const TypeId$36 = TypeId$37;
|
|
33436
33650
|
/**
|
|
33437
33651
|
* An API for creating schemas for parametric types.
|
|
33438
33652
|
*
|
|
@@ -33681,7 +33895,7 @@ const make$38 = make$39;
|
|
|
33681
33895
|
* @since 4.0.0
|
|
33682
33896
|
*/
|
|
33683
33897
|
function isSchema(u) {
|
|
33684
|
-
return hasProperty(u, TypeId$
|
|
33898
|
+
return hasProperty(u, TypeId$36) && u[TypeId$36] === TypeId$36;
|
|
33685
33899
|
}
|
|
33686
33900
|
/**
|
|
33687
33901
|
* Creates an exact optional key schema for struct fields. Unlike `optional`,
|
|
@@ -35212,7 +35426,7 @@ const DateTimeUtcFromDate = /* @__PURE__ */ DateValid.pipe(/* @__PURE__ */ decod
|
|
|
35212
35426
|
* @since 4.0.0
|
|
35213
35427
|
*/
|
|
35214
35428
|
const DateTimeUtcFromString = /* @__PURE__ */ String$1.annotate({ expected: "a string that will be decoded as a DateTime.Utc" }).pipe(/* @__PURE__ */ decodeTo(DateTimeUtc, /* @__PURE__ */ transform$2({
|
|
35215
|
-
decode: makeUnsafe$
|
|
35429
|
+
decode: makeUnsafe$8,
|
|
35216
35430
|
encode: formatIso
|
|
35217
35431
|
})));
|
|
35218
35432
|
/**
|
|
@@ -35252,7 +35466,7 @@ function makeClass(Inherited, identifier, struct$1, annotations) {
|
|
|
35252
35466
|
toString() {
|
|
35253
35467
|
return `${identifier}(${format$3({ ...this })})`;
|
|
35254
35468
|
}
|
|
35255
|
-
static [TypeId$
|
|
35469
|
+
static [TypeId$36] = TypeId$36;
|
|
35256
35470
|
get [ClassTypeId]() {
|
|
35257
35471
|
return ClassTypeId;
|
|
35258
35472
|
}
|
|
@@ -35456,7 +35670,7 @@ function onSerializerEnsureArray(ast) {
|
|
|
35456
35670
|
|
|
35457
35671
|
//#endregion
|
|
35458
35672
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Config.js
|
|
35459
|
-
const TypeId$
|
|
35673
|
+
const TypeId$35 = "~effect/Config";
|
|
35460
35674
|
/**
|
|
35461
35675
|
* @since 4.0.0
|
|
35462
35676
|
* @category Models
|
|
@@ -35475,10 +35689,10 @@ var ConfigError = class {
|
|
|
35475
35689
|
return `ConfigError(${this.message})`;
|
|
35476
35690
|
}
|
|
35477
35691
|
};
|
|
35478
|
-
const Proto$
|
|
35692
|
+
const Proto$18 = {
|
|
35479
35693
|
...PipeInspectableProto,
|
|
35480
35694
|
...YieldableProto,
|
|
35481
|
-
[TypeId$
|
|
35695
|
+
[TypeId$35]: TypeId$35,
|
|
35482
35696
|
asEffect() {
|
|
35483
35697
|
return flatMap$2(ConfigProvider.asEffect(), (provider) => this.parse(provider));
|
|
35484
35698
|
},
|
|
@@ -35497,7 +35711,7 @@ const Proto$16 = {
|
|
|
35497
35711
|
* @since 4.0.0
|
|
35498
35712
|
*/
|
|
35499
35713
|
function make$37(parse) {
|
|
35500
|
-
const self = Object.create(Proto$
|
|
35714
|
+
const self = Object.create(Proto$18);
|
|
35501
35715
|
self.parse = parse;
|
|
35502
35716
|
return self;
|
|
35503
35717
|
}
|
|
@@ -35753,7 +35967,7 @@ function int(name) {
|
|
|
35753
35967
|
* @since 4.0.0
|
|
35754
35968
|
* @category type id
|
|
35755
35969
|
*/
|
|
35756
|
-
const TypeId$
|
|
35970
|
+
const TypeId$34 = "~effect/cli/CliError";
|
|
35757
35971
|
/**
|
|
35758
35972
|
* Type guard to check if a value is a CLI error.
|
|
35759
35973
|
*
|
|
@@ -35783,7 +35997,7 @@ const TypeId$32 = "~effect/cli/CliError";
|
|
|
35783
35997
|
* @since 4.0.0
|
|
35784
35998
|
* @category guards
|
|
35785
35999
|
*/
|
|
35786
|
-
const isCliError = (u) => hasProperty(u, TypeId$
|
|
36000
|
+
const isCliError = (u) => hasProperty(u, TypeId$34);
|
|
35787
36001
|
/**
|
|
35788
36002
|
* Error thrown when an unrecognized option is encountered.
|
|
35789
36003
|
*
|
|
@@ -35816,7 +36030,7 @@ const isCliError = (u) => hasProperty(u, TypeId$32);
|
|
|
35816
36030
|
* @since 4.0.0
|
|
35817
36031
|
* @category models
|
|
35818
36032
|
*/
|
|
35819
|
-
var UnrecognizedOption = class extends ErrorClass(`${TypeId$
|
|
36033
|
+
var UnrecognizedOption = class extends ErrorClass(`${TypeId$34}/UnrecognizedOption`)({
|
|
35820
36034
|
_tag: /* @__PURE__ */ tag("UnrecognizedOption"),
|
|
35821
36035
|
option: String$1,
|
|
35822
36036
|
command: /* @__PURE__ */ optional$2(/* @__PURE__ */ Array$1(String$1)),
|
|
@@ -35825,7 +36039,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$32}/UnrecognizedOpti
|
|
|
35825
36039
|
/**
|
|
35826
36040
|
* @since 4.0.0
|
|
35827
36041
|
*/
|
|
35828
|
-
[TypeId$
|
|
36042
|
+
[TypeId$34] = TypeId$34;
|
|
35829
36043
|
/**
|
|
35830
36044
|
* @since 4.0.0
|
|
35831
36045
|
*/
|
|
@@ -35855,7 +36069,7 @@ var UnrecognizedOption = class extends ErrorClass(`${TypeId$32}/UnrecognizedOpti
|
|
|
35855
36069
|
* @since 4.0.0
|
|
35856
36070
|
* @category models
|
|
35857
36071
|
*/
|
|
35858
|
-
var DuplicateOption = class extends ErrorClass(`${TypeId$
|
|
36072
|
+
var DuplicateOption = class extends ErrorClass(`${TypeId$34}/DuplicateOption`)({
|
|
35859
36073
|
_tag: /* @__PURE__ */ tag("DuplicateOption"),
|
|
35860
36074
|
option: String$1,
|
|
35861
36075
|
parentCommand: String$1,
|
|
@@ -35864,7 +36078,7 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$32}/DuplicateOption`)({
|
|
|
35864
36078
|
/**
|
|
35865
36079
|
* @since 4.0.0
|
|
35866
36080
|
*/
|
|
35867
|
-
[TypeId$
|
|
36081
|
+
[TypeId$34] = TypeId$34;
|
|
35868
36082
|
/**
|
|
35869
36083
|
* @since 4.0.0
|
|
35870
36084
|
*/
|
|
@@ -35901,14 +36115,14 @@ var DuplicateOption = class extends ErrorClass(`${TypeId$32}/DuplicateOption`)({
|
|
|
35901
36115
|
* @since 4.0.0
|
|
35902
36116
|
* @category models
|
|
35903
36117
|
*/
|
|
35904
|
-
var MissingOption = class extends ErrorClass(`${TypeId$
|
|
36118
|
+
var MissingOption = class extends ErrorClass(`${TypeId$34}/MissingOption`)({
|
|
35905
36119
|
_tag: /* @__PURE__ */ tag("MissingOption"),
|
|
35906
36120
|
option: String$1
|
|
35907
36121
|
}) {
|
|
35908
36122
|
/**
|
|
35909
36123
|
* @since 4.0.0
|
|
35910
36124
|
*/
|
|
35911
|
-
[TypeId$
|
|
36125
|
+
[TypeId$34] = TypeId$34;
|
|
35912
36126
|
/**
|
|
35913
36127
|
* @since 4.0.0
|
|
35914
36128
|
*/
|
|
@@ -35944,14 +36158,14 @@ var MissingOption = class extends ErrorClass(`${TypeId$32}/MissingOption`)({
|
|
|
35944
36158
|
* @since 4.0.0
|
|
35945
36159
|
* @category models
|
|
35946
36160
|
*/
|
|
35947
|
-
var MissingArgument = class extends ErrorClass(`${TypeId$
|
|
36161
|
+
var MissingArgument = class extends ErrorClass(`${TypeId$34}/MissingArgument`)({
|
|
35948
36162
|
_tag: /* @__PURE__ */ tag("MissingArgument"),
|
|
35949
36163
|
argument: String$1
|
|
35950
36164
|
}) {
|
|
35951
36165
|
/**
|
|
35952
36166
|
* @since 4.0.0
|
|
35953
36167
|
*/
|
|
35954
|
-
[TypeId$
|
|
36168
|
+
[TypeId$34] = TypeId$34;
|
|
35955
36169
|
/**
|
|
35956
36170
|
* @since 4.0.0
|
|
35957
36171
|
*/
|
|
@@ -35992,7 +36206,7 @@ var MissingArgument = class extends ErrorClass(`${TypeId$32}/MissingArgument`)({
|
|
|
35992
36206
|
* @since 4.0.0
|
|
35993
36207
|
* @category models
|
|
35994
36208
|
*/
|
|
35995
|
-
var InvalidValue = class extends ErrorClass(`${TypeId$
|
|
36209
|
+
var InvalidValue = class extends ErrorClass(`${TypeId$34}/InvalidValue`)({
|
|
35996
36210
|
_tag: /* @__PURE__ */ tag("InvalidValue"),
|
|
35997
36211
|
option: String$1,
|
|
35998
36212
|
value: String$1,
|
|
@@ -36002,7 +36216,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$32}/InvalidValue`)({
|
|
|
36002
36216
|
/**
|
|
36003
36217
|
* @since 4.0.0
|
|
36004
36218
|
*/
|
|
36005
|
-
[TypeId$
|
|
36219
|
+
[TypeId$34] = TypeId$34;
|
|
36006
36220
|
/**
|
|
36007
36221
|
* @since 4.0.0
|
|
36008
36222
|
*/
|
|
@@ -36046,7 +36260,7 @@ var InvalidValue = class extends ErrorClass(`${TypeId$32}/InvalidValue`)({
|
|
|
36046
36260
|
* @since 4.0.0
|
|
36047
36261
|
* @category models
|
|
36048
36262
|
*/
|
|
36049
|
-
var UnknownSubcommand = class extends ErrorClass(`${TypeId$
|
|
36263
|
+
var UnknownSubcommand = class extends ErrorClass(`${TypeId$34}/UnknownSubcommand`)({
|
|
36050
36264
|
_tag: /* @__PURE__ */ tag("UnknownSubcommand"),
|
|
36051
36265
|
subcommand: String$1,
|
|
36052
36266
|
parent: /* @__PURE__ */ optional$2(/* @__PURE__ */ Array$1(String$1)),
|
|
@@ -36055,7 +36269,7 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$32}/UnknownSubcommand
|
|
|
36055
36269
|
/**
|
|
36056
36270
|
* @since 4.0.0
|
|
36057
36271
|
*/
|
|
36058
|
-
[TypeId$
|
|
36272
|
+
[TypeId$34] = TypeId$34;
|
|
36059
36273
|
/**
|
|
36060
36274
|
* @since 4.0.0
|
|
36061
36275
|
*/
|
|
@@ -36102,14 +36316,14 @@ var UnknownSubcommand = class extends ErrorClass(`${TypeId$32}/UnknownSubcommand
|
|
|
36102
36316
|
* @since 4.0.0
|
|
36103
36317
|
* @category models
|
|
36104
36318
|
*/
|
|
36105
|
-
var ShowHelp = class extends ErrorClass(`${TypeId$
|
|
36319
|
+
var ShowHelp = class extends ErrorClass(`${TypeId$34}/ShowHelp`)({
|
|
36106
36320
|
_tag: /* @__PURE__ */ tag("ShowHelp"),
|
|
36107
36321
|
commandPath: /* @__PURE__ */ Array$1(String$1)
|
|
36108
36322
|
}) {
|
|
36109
36323
|
/**
|
|
36110
36324
|
* @since 4.0.0
|
|
36111
36325
|
*/
|
|
36112
|
-
[TypeId$
|
|
36326
|
+
[TypeId$34] = TypeId$34;
|
|
36113
36327
|
/**
|
|
36114
36328
|
* @since 4.0.0
|
|
36115
36329
|
*/
|
|
@@ -36152,14 +36366,14 @@ var ShowHelp = class extends ErrorClass(`${TypeId$32}/ShowHelp`)({
|
|
|
36152
36366
|
* @since 4.0.0
|
|
36153
36367
|
* @category models
|
|
36154
36368
|
*/
|
|
36155
|
-
var UserError = class extends ErrorClass(`${TypeId$
|
|
36369
|
+
var UserError = class extends ErrorClass(`${TypeId$34}/UserError`)({
|
|
36156
36370
|
_tag: /* @__PURE__ */ tag("UserError"),
|
|
36157
36371
|
cause: Defect
|
|
36158
36372
|
}) {
|
|
36159
36373
|
/**
|
|
36160
36374
|
* @since 4.0.0
|
|
36161
36375
|
*/
|
|
36162
|
-
[TypeId$
|
|
36376
|
+
[TypeId$34] = TypeId$34;
|
|
36163
36377
|
};
|
|
36164
36378
|
|
|
36165
36379
|
//#endregion
|
|
@@ -46753,14 +46967,14 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
46753
46967
|
var import_ini = /* @__PURE__ */ __toESM(require_ini(), 1);
|
|
46754
46968
|
var import_toml = /* @__PURE__ */ __toESM(require_toml(), 1);
|
|
46755
46969
|
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
|
|
46756
|
-
const Proto$
|
|
46970
|
+
const Proto$17 = { ["~effect/cli/Primitive"]: { _A: identity } };
|
|
46757
46971
|
/** @internal */
|
|
46758
46972
|
const isTrueValue = /* @__PURE__ */ is(TrueValues);
|
|
46759
46973
|
/** @internal */
|
|
46760
46974
|
const isFalseValue = /* @__PURE__ */ is(FalseValues);
|
|
46761
46975
|
/** @internal */
|
|
46762
46976
|
const isBoolean = (p) => p._tag === "Boolean";
|
|
46763
|
-
const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$
|
|
46977
|
+
const makePrimitive = (tag, parse) => Object.assign(Object.create(Proto$17), {
|
|
46764
46978
|
_tag: tag,
|
|
46765
46979
|
parse
|
|
46766
46980
|
});
|
|
@@ -47019,7 +47233,7 @@ const getTypeName = (primitive) => {
|
|
|
47019
47233
|
|
|
47020
47234
|
//#endregion
|
|
47021
47235
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Terminal.js
|
|
47022
|
-
const TypeId$
|
|
47236
|
+
const TypeId$33 = "~effect/platform/Terminal";
|
|
47023
47237
|
const QuitErrorTypeId = "effect/platform/Terminal/QuitError";
|
|
47024
47238
|
/**
|
|
47025
47239
|
* A `QuitError` represents an error that occurs when a user attempts to
|
|
@@ -47047,7 +47261,7 @@ const Terminal = /* @__PURE__ */ Service$1("effect/platform/Terminal");
|
|
|
47047
47261
|
*/
|
|
47048
47262
|
const make$36 = (impl) => Terminal.of({
|
|
47049
47263
|
...impl,
|
|
47050
|
-
[TypeId$
|
|
47264
|
+
[TypeId$33]: TypeId$33
|
|
47051
47265
|
});
|
|
47052
47266
|
|
|
47053
47267
|
//#endregion
|
|
@@ -47146,7 +47360,7 @@ const eraseLines = (rows) => {
|
|
|
47146
47360
|
/**
|
|
47147
47361
|
* @since 4.0.0
|
|
47148
47362
|
*/
|
|
47149
|
-
const TypeId$
|
|
47363
|
+
const TypeId$32 = "~effect/cli/Prompt";
|
|
47150
47364
|
const defaultFigures = {
|
|
47151
47365
|
arrowUp: "↑",
|
|
47152
47366
|
arrowDown: "↓",
|
|
@@ -47367,7 +47581,7 @@ const toggle = (options) => {
|
|
|
47367
47581
|
};
|
|
47368
47582
|
const proto = {
|
|
47369
47583
|
...YieldableProto,
|
|
47370
|
-
[TypeId$
|
|
47584
|
+
[TypeId$32]: { _Output: (_) => _ },
|
|
47371
47585
|
asEffect() {
|
|
47372
47586
|
return run$5(this);
|
|
47373
47587
|
},
|
|
@@ -48138,7 +48352,7 @@ const entriesToDisplay = (cursor, total, maxVisible) => {
|
|
|
48138
48352
|
*
|
|
48139
48353
|
* @since 4.0.0
|
|
48140
48354
|
*/
|
|
48141
|
-
const TypeId$
|
|
48355
|
+
const TypeId$31 = "~effect/cli/Param";
|
|
48142
48356
|
/**
|
|
48143
48357
|
* Kind discriminator for positional argument parameters.
|
|
48144
48358
|
*
|
|
@@ -48153,8 +48367,8 @@ const argumentKind = "argument";
|
|
|
48153
48367
|
* @category constants
|
|
48154
48368
|
*/
|
|
48155
48369
|
const flagKind = "flag";
|
|
48156
|
-
const Proto$
|
|
48157
|
-
[TypeId$
|
|
48370
|
+
const Proto$16 = {
|
|
48371
|
+
[TypeId$31]: { _A: identity },
|
|
48158
48372
|
pipe() {
|
|
48159
48373
|
return pipeArguments(this, arguments);
|
|
48160
48374
|
}
|
|
@@ -48178,7 +48392,7 @@ const Proto$14 = {
|
|
|
48178
48392
|
* @since 4.0.0
|
|
48179
48393
|
* @category refinements
|
|
48180
48394
|
*/
|
|
48181
|
-
const isParam = (u) => hasProperty(u, TypeId$
|
|
48395
|
+
const isParam = (u) => hasProperty(u, TypeId$31);
|
|
48182
48396
|
/**
|
|
48183
48397
|
* Type guard to check if a Single param is a flag (not an argument).
|
|
48184
48398
|
*
|
|
@@ -48191,7 +48405,7 @@ const isFlagParam = (single) => single.kind === "flag";
|
|
|
48191
48405
|
*/
|
|
48192
48406
|
const makeSingle = (params) => {
|
|
48193
48407
|
const parse = (args) => params.kind === argumentKind ? parsePositional(params.name, params.primitiveType, args) : parseFlag(params.name, params.primitiveType, args);
|
|
48194
|
-
return Object.assign(Object.create(Proto$
|
|
48408
|
+
return Object.assign(Object.create(Proto$16), {
|
|
48195
48409
|
_tag: "Single",
|
|
48196
48410
|
...params,
|
|
48197
48411
|
description: params.description,
|
|
@@ -48482,7 +48696,7 @@ const withDescription$2 = /* @__PURE__ */ dual(2, (self, description) => {
|
|
|
48482
48696
|
*/
|
|
48483
48697
|
const map$4 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
48484
48698
|
const parse = (args) => map$8(self.parse(args), ([operands, value]) => [operands, f(value)]);
|
|
48485
|
-
return Object.assign(Object.create(Proto$
|
|
48699
|
+
return Object.assign(Object.create(Proto$16), {
|
|
48486
48700
|
_tag: "Map",
|
|
48487
48701
|
kind: self.kind,
|
|
48488
48702
|
param: self,
|
|
@@ -48490,7 +48704,7 @@ const map$4 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
48490
48704
|
parse
|
|
48491
48705
|
});
|
|
48492
48706
|
});
|
|
48493
|
-
const transform$1 = (self, f) => Object.assign(Object.create(Proto$
|
|
48707
|
+
const transform$1 = (self, f) => Object.assign(Object.create(Proto$16), {
|
|
48494
48708
|
_tag: "Transform",
|
|
48495
48709
|
kind: self.kind,
|
|
48496
48710
|
param: self,
|
|
@@ -48551,7 +48765,7 @@ const mapEffect = /* @__PURE__ */ dual(2, (self, f) => transform$1(self, (parse)
|
|
|
48551
48765
|
*/
|
|
48552
48766
|
const optional$1 = (param) => {
|
|
48553
48767
|
const parse = (args) => param.parse(args).pipe(map$8(([leftover, value]) => [leftover, some$2(value)]), catchTag("MissingOption", () => succeed$1([args.arguments, none$3()])), catchTag("MissingArgument", () => succeed$1([args.arguments, none$3()])));
|
|
48554
|
-
return Object.assign(Object.create(Proto$
|
|
48768
|
+
return Object.assign(Object.create(Proto$16), {
|
|
48555
48769
|
_tag: "Optional",
|
|
48556
48770
|
kind: param.kind,
|
|
48557
48771
|
param,
|
|
@@ -48651,7 +48865,7 @@ const variadic = (self, options) => {
|
|
|
48651
48865
|
if (single.kind === "argument") return parsePositionalVariadic(self, single, args, options);
|
|
48652
48866
|
else return parseOptionVariadic(self, single, args, options);
|
|
48653
48867
|
};
|
|
48654
|
-
return Object.assign(Object.create(Proto$
|
|
48868
|
+
return Object.assign(Object.create(Proto$16), {
|
|
48655
48869
|
_tag: "Variadic",
|
|
48656
48870
|
kind: self.kind,
|
|
48657
48871
|
param: self,
|
|
@@ -49188,13 +49402,13 @@ const reconstructTree = (tree, results) => {
|
|
|
49188
49402
|
* Internal implementation details for CLI commands.
|
|
49189
49403
|
* Public API is in ../Command.ts
|
|
49190
49404
|
*/
|
|
49191
|
-
const TypeId$
|
|
49405
|
+
const TypeId$30 = "~effect/cli/Command";
|
|
49192
49406
|
/**
|
|
49193
49407
|
* Casts a Command to its internal implementation.
|
|
49194
49408
|
* For use by internal modules that need access to config, parse, handle, etc.
|
|
49195
49409
|
*/
|
|
49196
49410
|
const toImpl = (self) => self;
|
|
49197
|
-
const Proto$
|
|
49411
|
+
const Proto$15 = {
|
|
49198
49412
|
...YieldableProto,
|
|
49199
49413
|
pipe() {
|
|
49200
49414
|
return pipeArguments(this, arguments);
|
|
@@ -49207,7 +49421,7 @@ const Proto$13 = {
|
|
|
49207
49421
|
* Internal command constructor. Only accepts already-parsed ConfigInternal.
|
|
49208
49422
|
*/
|
|
49209
49423
|
const makeCommand = (options) => {
|
|
49210
|
-
const service = options.service ?? Service$1(`${TypeId$
|
|
49424
|
+
const service = options.service ?? Service$1(`${TypeId$30}/${options.name}`);
|
|
49211
49425
|
const config = options.config;
|
|
49212
49426
|
const handle = (input, commandPath) => isNotUndefined(options.handle) ? options.handle(input, commandPath) : fail$4(new ShowHelp({ commandPath }));
|
|
49213
49427
|
const parse = options.parse ?? fnUntraced(function* (input) {
|
|
@@ -49264,8 +49478,8 @@ const makeCommand = (options) => {
|
|
|
49264
49478
|
...subcommandDocs.length > 0 && { subcommands: subcommandDocs }
|
|
49265
49479
|
};
|
|
49266
49480
|
};
|
|
49267
|
-
return Object.assign(Object.create(Proto$
|
|
49268
|
-
[TypeId$
|
|
49481
|
+
return Object.assign(Object.create(Proto$15), {
|
|
49482
|
+
[TypeId$30]: TypeId$30,
|
|
49269
49483
|
name: options.name,
|
|
49270
49484
|
subcommands: options.subcommands ?? [],
|
|
49271
49485
|
config,
|
|
@@ -50480,7 +50694,7 @@ const scanCommandLevel = (tokens, context) => {
|
|
|
50480
50694
|
* @since 4.0.0
|
|
50481
50695
|
* @category Guards
|
|
50482
50696
|
*/
|
|
50483
|
-
const isCommand$1 = (u) => hasProperty(u, TypeId$
|
|
50697
|
+
const isCommand$1 = (u) => hasProperty(u, TypeId$30);
|
|
50484
50698
|
/**
|
|
50485
50699
|
* Creates a Command from a name, optional config, optional handler function, and optional description.
|
|
50486
50700
|
*
|
|
@@ -50825,7 +51039,7 @@ const runWith = (command, config) => {
|
|
|
50825
51039
|
/**
|
|
50826
51040
|
* @since 4.0.0
|
|
50827
51041
|
*/
|
|
50828
|
-
const TypeId$
|
|
51042
|
+
const TypeId$29 = "~effect/Cache";
|
|
50829
51043
|
/**
|
|
50830
51044
|
* Creates a cache with dynamic time-to-live based on the result and key.
|
|
50831
51045
|
*
|
|
@@ -50887,7 +51101,7 @@ const TypeId$27 = "~effect/Cache";
|
|
|
50887
51101
|
* @category Constructors
|
|
50888
51102
|
*/
|
|
50889
51103
|
const makeWith$1 = (options) => servicesWith$1((services) => {
|
|
50890
|
-
const self = Object.create(Proto$
|
|
51104
|
+
const self = Object.create(Proto$14);
|
|
50891
51105
|
self.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$6(services, input));
|
|
50892
51106
|
self.map = make$45();
|
|
50893
51107
|
self.capacity = options.capacity;
|
|
@@ -50951,9 +51165,9 @@ const make$34 = (options) => makeWith$1({
|
|
|
50951
51165
|
...options,
|
|
50952
51166
|
timeToLive: options.timeToLive ? () => options.timeToLive : defaultTimeToLive
|
|
50953
51167
|
});
|
|
50954
|
-
const Proto$
|
|
51168
|
+
const Proto$14 = {
|
|
50955
51169
|
...PipeInspectableProto,
|
|
50956
|
-
[TypeId$
|
|
51170
|
+
[TypeId$29]: TypeId$29,
|
|
50957
51171
|
toJSON() {
|
|
50958
51172
|
return {
|
|
50959
51173
|
_id: "Cache",
|
|
@@ -51046,19 +51260,19 @@ const defaultTimeToLive = (_, _key) => infinity;
|
|
|
51046
51260
|
* @since 4.0.0
|
|
51047
51261
|
* @category Combinators
|
|
51048
51262
|
*/
|
|
51049
|
-
const get$
|
|
51050
|
-
const oentry = get$
|
|
51263
|
+
const get$7 = /* @__PURE__ */ dual(2, (self, key) => withFiber$1((fiber) => {
|
|
51264
|
+
const oentry = get$11(self.map, key);
|
|
51051
51265
|
if (isSome(oentry) && !hasExpired(oentry.value, fiber)) {
|
|
51052
51266
|
remove$5(self.map, key);
|
|
51053
|
-
set$
|
|
51267
|
+
set$8(self.map, key, oentry.value);
|
|
51054
51268
|
return _await(oentry.value.deferred);
|
|
51055
51269
|
}
|
|
51056
|
-
const deferred = makeUnsafe$
|
|
51270
|
+
const deferred = makeUnsafe$11();
|
|
51057
51271
|
const entry = {
|
|
51058
51272
|
expiresAt: void 0,
|
|
51059
51273
|
deferred
|
|
51060
51274
|
};
|
|
51061
|
-
set$
|
|
51275
|
+
set$8(self.map, key, entry);
|
|
51062
51276
|
if (Number.isFinite(self.capacity)) checkCapacity(self);
|
|
51063
51277
|
return onExit$3(self.lookup(key), (exit) => {
|
|
51064
51278
|
doneUnsafe(deferred, exit);
|
|
@@ -51174,16 +51388,16 @@ const checkCapacity = (self) => {
|
|
|
51174
51388
|
* @since 4.0.0
|
|
51175
51389
|
* @category Combinators
|
|
51176
51390
|
*/
|
|
51177
|
-
const set$
|
|
51391
|
+
const set$7 = /* @__PURE__ */ dual(3, (self, key, value) => withFiber$1((fiber) => {
|
|
51178
51392
|
const exit = exitSucceed(value);
|
|
51179
|
-
const deferred = makeUnsafe$
|
|
51393
|
+
const deferred = makeUnsafe$11();
|
|
51180
51394
|
doneUnsafe(deferred, exit);
|
|
51181
51395
|
const ttl = self.timeToLive(exit, key);
|
|
51182
51396
|
if (isZero(ttl)) {
|
|
51183
51397
|
remove$5(self.map, key);
|
|
51184
51398
|
return void_$3;
|
|
51185
51399
|
}
|
|
51186
|
-
set$
|
|
51400
|
+
set$8(self.map, key, {
|
|
51187
51401
|
deferred,
|
|
51188
51402
|
expiresAt: isFinite$2(ttl) ? fiber.getRef(ClockRef).currentTimeMillisUnsafe() + toMillis(ttl) : void 0
|
|
51189
51403
|
});
|
|
@@ -51243,7 +51457,7 @@ const invalidate$1 = /* @__PURE__ */ dual(2, (self, key) => sync$1(() => {
|
|
|
51243
51457
|
/**
|
|
51244
51458
|
* @since 2.0.0
|
|
51245
51459
|
*/
|
|
51246
|
-
const TypeId$
|
|
51460
|
+
const TypeId$28 = "~effect/FiberHandle";
|
|
51247
51461
|
/**
|
|
51248
51462
|
* @example
|
|
51249
51463
|
* ```ts
|
|
@@ -51260,9 +51474,9 @@ const TypeId$26 = "~effect/FiberHandle";
|
|
|
51260
51474
|
* @since 2.0.0
|
|
51261
51475
|
* @category refinements
|
|
51262
51476
|
*/
|
|
51263
|
-
const isFiberHandle = (u) => hasProperty(u, TypeId$
|
|
51264
|
-
const Proto$
|
|
51265
|
-
[TypeId$
|
|
51477
|
+
const isFiberHandle = (u) => hasProperty(u, TypeId$28);
|
|
51478
|
+
const Proto$13 = {
|
|
51479
|
+
[TypeId$28]: TypeId$28,
|
|
51266
51480
|
...PipeInspectableProto,
|
|
51267
51481
|
toJSON() {
|
|
51268
51482
|
return {
|
|
@@ -51271,13 +51485,13 @@ const Proto$11 = {
|
|
|
51271
51485
|
};
|
|
51272
51486
|
}
|
|
51273
51487
|
};
|
|
51274
|
-
const makeUnsafe$
|
|
51275
|
-
const self = Object.create(Proto$
|
|
51488
|
+
const makeUnsafe$5 = () => {
|
|
51489
|
+
const self = Object.create(Proto$13);
|
|
51276
51490
|
self.state = {
|
|
51277
51491
|
_tag: "Open",
|
|
51278
51492
|
fiber: void 0
|
|
51279
51493
|
};
|
|
51280
|
-
self.deferred = makeUnsafe$
|
|
51494
|
+
self.deferred = makeUnsafe$11();
|
|
51281
51495
|
return self;
|
|
51282
51496
|
};
|
|
51283
51497
|
/**
|
|
@@ -51308,7 +51522,7 @@ const makeUnsafe$2 = () => {
|
|
|
51308
51522
|
* @since 2.0.0
|
|
51309
51523
|
* @category constructors
|
|
51310
51524
|
*/
|
|
51311
|
-
const make$33 = () => acquireRelease(sync(() => makeUnsafe$
|
|
51525
|
+
const make$33 = () => acquireRelease(sync(() => makeUnsafe$5()), (handle) => {
|
|
51312
51526
|
const state = handle.state;
|
|
51313
51527
|
if (state._tag === "Closed") return void_$1;
|
|
51314
51528
|
handle.state = { _tag: "Closed" };
|
|
@@ -51439,7 +51653,7 @@ const runImpl$2 = (self, effect, options) => withFiber((parent) => {
|
|
|
51439
51653
|
/**
|
|
51440
51654
|
* @since 2.0.0
|
|
51441
51655
|
*/
|
|
51442
|
-
const TypeId$
|
|
51656
|
+
const TypeId$27 = "~effect/FiberMap";
|
|
51443
51657
|
/**
|
|
51444
51658
|
* @example
|
|
51445
51659
|
* ```ts
|
|
@@ -51457,9 +51671,9 @@ const TypeId$25 = "~effect/FiberMap";
|
|
|
51457
51671
|
* @since 2.0.0
|
|
51458
51672
|
* @category refinements
|
|
51459
51673
|
*/
|
|
51460
|
-
const isFiberMap = (u) => hasProperty(u, TypeId$
|
|
51461
|
-
const Proto$
|
|
51462
|
-
[TypeId$
|
|
51674
|
+
const isFiberMap = (u) => hasProperty(u, TypeId$27);
|
|
51675
|
+
const Proto$12 = {
|
|
51676
|
+
[TypeId$27]: TypeId$27,
|
|
51463
51677
|
[Symbol.iterator]() {
|
|
51464
51678
|
if (this.state._tag === "Closed") return empty$17();
|
|
51465
51679
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -51472,8 +51686,8 @@ const Proto$10 = {
|
|
|
51472
51686
|
};
|
|
51473
51687
|
}
|
|
51474
51688
|
};
|
|
51475
|
-
const makeUnsafe$
|
|
51476
|
-
const self = Object.create(Proto$
|
|
51689
|
+
const makeUnsafe$4 = (backing, deferred) => {
|
|
51690
|
+
const self = Object.create(Proto$12);
|
|
51477
51691
|
self.state = {
|
|
51478
51692
|
_tag: "Open",
|
|
51479
51693
|
backing
|
|
@@ -51508,7 +51722,7 @@ const makeUnsafe$1 = (backing, deferred) => {
|
|
|
51508
51722
|
* @since 2.0.0
|
|
51509
51723
|
* @category constructors
|
|
51510
51724
|
*/
|
|
51511
|
-
const make$32 = () => acquireRelease(sync(() => makeUnsafe$
|
|
51725
|
+
const make$32 = () => acquireRelease(sync(() => makeUnsafe$4(empty$9(), makeUnsafe$11())), (map) => suspend$3(() => {
|
|
51512
51726
|
const state = map.state;
|
|
51513
51727
|
if (state._tag === "Closed") return void_$1;
|
|
51514
51728
|
map.state = { _tag: "Closed" };
|
|
@@ -51545,7 +51759,7 @@ const setUnsafe = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, key
|
|
|
51545
51759
|
fiber.interruptUnsafe(internalFiberId$1);
|
|
51546
51760
|
return;
|
|
51547
51761
|
}
|
|
51548
|
-
const previous = get$
|
|
51762
|
+
const previous = get$11(self.state.backing, key);
|
|
51549
51763
|
if (previous._tag === "Some") {
|
|
51550
51764
|
if (options?.onlyIfMissing === true) {
|
|
51551
51765
|
fiber.interruptUnsafe(internalFiberId$1);
|
|
@@ -51553,10 +51767,10 @@ const setUnsafe = /* @__PURE__ */ dual((args) => isFiberMap(args[0]), (self, key
|
|
|
51553
51767
|
} else if (previous.value === fiber) return;
|
|
51554
51768
|
previous.value.interruptUnsafe(internalFiberId$1);
|
|
51555
51769
|
}
|
|
51556
|
-
set$
|
|
51770
|
+
set$8(self.state.backing, key, fiber);
|
|
51557
51771
|
fiber.addObserver((exit) => {
|
|
51558
51772
|
if (self.state._tag === "Closed") return;
|
|
51559
|
-
const current = get$
|
|
51773
|
+
const current = get$11(self.state.backing, key);
|
|
51560
51774
|
if (isSome(current) && fiber === current.value) remove$5(self.state.backing, key);
|
|
51561
51775
|
if (isFailure$3(exit) && (options?.propagateInterruption === true ? !isInternalInterruption$1(exit.cause) : !isInterruptedOnly(exit.cause))) doneUnsafe(self.deferred, exit);
|
|
51562
51776
|
});
|
|
@@ -51612,7 +51826,7 @@ const hasUnsafe = /* @__PURE__ */ dual(2, (self, key) => self.state._tag === "Cl
|
|
|
51612
51826
|
*/
|
|
51613
51827
|
const remove$4 = /* @__PURE__ */ dual(2, (self, key) => suspend$3(() => {
|
|
51614
51828
|
if (self.state._tag === "Closed") return void_$1;
|
|
51615
|
-
const fiber = get$
|
|
51829
|
+
const fiber = get$11(self.state.backing, key);
|
|
51616
51830
|
if (fiber._tag === "None") return void_$1;
|
|
51617
51831
|
return interruptAs(fiber.value, internalFiberId$1);
|
|
51618
51832
|
}));
|
|
@@ -51670,7 +51884,7 @@ const runImpl$1 = (self, key, effect, options) => withFiber((parent) => {
|
|
|
51670
51884
|
/**
|
|
51671
51885
|
* @since 2.0.0
|
|
51672
51886
|
*/
|
|
51673
|
-
const TypeId$
|
|
51887
|
+
const TypeId$26 = "~effect/FiberSet";
|
|
51674
51888
|
/**
|
|
51675
51889
|
* Checks if a value is a FiberSet.
|
|
51676
51890
|
*
|
|
@@ -51688,9 +51902,9 @@ const TypeId$24 = "~effect/FiberSet";
|
|
|
51688
51902
|
* })
|
|
51689
51903
|
* ```
|
|
51690
51904
|
*/
|
|
51691
|
-
const isFiberSet = (u) => hasProperty(u, TypeId$
|
|
51692
|
-
const Proto$
|
|
51693
|
-
[TypeId$
|
|
51905
|
+
const isFiberSet = (u) => hasProperty(u, TypeId$26);
|
|
51906
|
+
const Proto$11 = {
|
|
51907
|
+
[TypeId$26]: TypeId$26,
|
|
51694
51908
|
[Symbol.iterator]() {
|
|
51695
51909
|
if (this.state._tag === "Closed") return empty$17();
|
|
51696
51910
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -51703,8 +51917,8 @@ const Proto$9 = {
|
|
|
51703
51917
|
};
|
|
51704
51918
|
}
|
|
51705
51919
|
};
|
|
51706
|
-
const makeUnsafe = (backing, deferred) => {
|
|
51707
|
-
const self = Object.create(Proto$
|
|
51920
|
+
const makeUnsafe$3 = (backing, deferred) => {
|
|
51921
|
+
const self = Object.create(Proto$11);
|
|
51708
51922
|
self.state = {
|
|
51709
51923
|
_tag: "Open",
|
|
51710
51924
|
backing
|
|
@@ -51739,7 +51953,7 @@ const makeUnsafe = (backing, deferred) => {
|
|
|
51739
51953
|
* @since 2.0.0
|
|
51740
51954
|
* @category constructors
|
|
51741
51955
|
*/
|
|
51742
|
-
const make$31 = () => acquireRelease(sync(() => makeUnsafe(/* @__PURE__ */ new Set(), makeUnsafe$
|
|
51956
|
+
const make$31 = () => acquireRelease(sync(() => makeUnsafe$3(/* @__PURE__ */ new Set(), makeUnsafe$11())), (set) => suspend$3(() => {
|
|
51743
51957
|
const state = set.state;
|
|
51744
51958
|
if (state._tag === "Closed") return void_$1;
|
|
51745
51959
|
set.state = { _tag: "Closed" };
|
|
@@ -52375,7 +52589,7 @@ var HashMapImpl = class {
|
|
|
52375
52589
|
const thatImpl = that;
|
|
52376
52590
|
if (this.size !== thatImpl.size) return false;
|
|
52377
52591
|
for (const [key, value] of this) {
|
|
52378
|
-
const otherValue = pipe(that, get$
|
|
52592
|
+
const otherValue = pipe(that, get$6(key));
|
|
52379
52593
|
if (isNone(otherValue) || !equals$1(value, otherValue.value)) return false;
|
|
52380
52594
|
}
|
|
52381
52595
|
return true;
|
|
@@ -52427,7 +52641,7 @@ const fromIterable$2 = (entries) => {
|
|
|
52427
52641
|
/** @internal */
|
|
52428
52642
|
const isEmpty$2 = (self) => self.size === 0;
|
|
52429
52643
|
/** @internal */
|
|
52430
|
-
const get$
|
|
52644
|
+
const get$6 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
52431
52645
|
return self._root.get(0, hash(key), key);
|
|
52432
52646
|
});
|
|
52433
52647
|
/** @internal */
|
|
@@ -52435,8 +52649,8 @@ const getHash$1 = /* @__PURE__ */ dual(3, (self, key, hash) => {
|
|
|
52435
52649
|
return self._root.get(0, hash, key);
|
|
52436
52650
|
});
|
|
52437
52651
|
/** @internal */
|
|
52438
|
-
const getUnsafe$
|
|
52439
|
-
const result = get$
|
|
52652
|
+
const getUnsafe$3 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
52653
|
+
const result = get$6(self, key);
|
|
52440
52654
|
if (isSome(result)) return result.value;
|
|
52441
52655
|
throw new Error(`HashMap.getUnsafe: key not found: ${key}`);
|
|
52442
52656
|
});
|
|
@@ -52454,7 +52668,7 @@ const hasBy$1 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
52454
52668
|
return false;
|
|
52455
52669
|
});
|
|
52456
52670
|
/** @internal */
|
|
52457
|
-
const set$
|
|
52671
|
+
const set$6 = /* @__PURE__ */ dual(3, (self, key, value) => {
|
|
52458
52672
|
const impl = self;
|
|
52459
52673
|
const hash$2 = hash(key);
|
|
52460
52674
|
const added = { value: false };
|
|
@@ -52541,15 +52755,15 @@ const mutate$1 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
52541
52755
|
});
|
|
52542
52756
|
/** @internal */
|
|
52543
52757
|
const modifyAt$1 = /* @__PURE__ */ dual(3, (self, key, f) => {
|
|
52544
|
-
const updated = f(get$
|
|
52758
|
+
const updated = f(get$6(self, key));
|
|
52545
52759
|
if (isNone(updated)) return has$1(self, key) ? remove$3(self, key) : self;
|
|
52546
|
-
return set$
|
|
52760
|
+
return set$6(self, key, updated.value);
|
|
52547
52761
|
});
|
|
52548
52762
|
/** @internal */
|
|
52549
52763
|
const modifyHash$1 = /* @__PURE__ */ dual(4, (self, key, hash, f) => {
|
|
52550
52764
|
const updated = f(getHash$1(self, key, hash));
|
|
52551
52765
|
if (isNone(updated)) return hasHash$1(self, key, hash) ? remove$3(self, key) : self;
|
|
52552
|
-
return set$
|
|
52766
|
+
return set$6(self, key, updated.value);
|
|
52553
52767
|
});
|
|
52554
52768
|
/** @internal */
|
|
52555
52769
|
const modify$2 = /* @__PURE__ */ dual(3, (self, key, f) => {
|
|
@@ -52558,7 +52772,7 @@ const modify$2 = /* @__PURE__ */ dual(3, (self, key, f) => {
|
|
|
52558
52772
|
/** @internal */
|
|
52559
52773
|
const union$1 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
52560
52774
|
let result = self;
|
|
52561
|
-
for (const [key, value] of that) result = set$
|
|
52775
|
+
for (const [key, value] of that) result = set$6(result, key, value);
|
|
52562
52776
|
return result;
|
|
52563
52777
|
});
|
|
52564
52778
|
/** @internal */
|
|
@@ -52586,13 +52800,13 @@ const removeMany$1 = /* @__PURE__ */ dual(2, (self, keys) => {
|
|
|
52586
52800
|
/** @internal */
|
|
52587
52801
|
const setMany$1 = /* @__PURE__ */ dual(2, (self, entries) => {
|
|
52588
52802
|
let result = self;
|
|
52589
|
-
for (const [key, value] of entries) result = set$
|
|
52803
|
+
for (const [key, value] of entries) result = set$6(result, key, value);
|
|
52590
52804
|
return result;
|
|
52591
52805
|
});
|
|
52592
52806
|
/** @internal */
|
|
52593
52807
|
const map$2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
52594
52808
|
let result = empty$7();
|
|
52595
|
-
for (const [key, value] of self) result = set$
|
|
52809
|
+
for (const [key, value] of self) result = set$6(result, key, f(value, key));
|
|
52596
52810
|
return result;
|
|
52597
52811
|
});
|
|
52598
52812
|
/** @internal */
|
|
@@ -52614,13 +52828,13 @@ const reduce$1 = /* @__PURE__ */ dual(3, (self, zero, f) => {
|
|
|
52614
52828
|
/** @internal */
|
|
52615
52829
|
const filter$1 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
52616
52830
|
let result = empty$7();
|
|
52617
|
-
for (const [key, value] of self) if (f(value, key)) result = set$
|
|
52831
|
+
for (const [key, value] of self) if (f(value, key)) result = set$6(result, key, value);
|
|
52618
52832
|
return result;
|
|
52619
52833
|
});
|
|
52620
52834
|
/** @internal */
|
|
52621
52835
|
const compact$1 = (self) => {
|
|
52622
52836
|
let result = empty$7();
|
|
52623
|
-
for (const [key, value] of self) if (isSome(value)) result = set$
|
|
52837
|
+
for (const [key, value] of self) if (isSome(value)) result = set$6(result, key, value.value);
|
|
52624
52838
|
return result;
|
|
52625
52839
|
};
|
|
52626
52840
|
/** @internal */
|
|
@@ -52628,7 +52842,7 @@ const filterMap$1 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
52628
52842
|
let result = empty$7();
|
|
52629
52843
|
for (const [key, value] of self) {
|
|
52630
52844
|
const mapped = f(value, key);
|
|
52631
|
-
if (isSome(mapped)) result = set$
|
|
52845
|
+
if (isSome(mapped)) result = set$6(result, key, mapped.value);
|
|
52632
52846
|
}
|
|
52633
52847
|
return result;
|
|
52634
52848
|
});
|
|
@@ -52760,7 +52974,7 @@ const isEmpty$1 = isEmpty$2;
|
|
|
52760
52974
|
* @since 2.0.0
|
|
52761
52975
|
* @category elements
|
|
52762
52976
|
*/
|
|
52763
|
-
const get$
|
|
52977
|
+
const get$5 = get$6;
|
|
52764
52978
|
/**
|
|
52765
52979
|
* Lookup the value for the specified key in the `HashMap` using a custom hash.
|
|
52766
52980
|
*
|
|
@@ -52827,7 +53041,7 @@ const getHash = getHash$1;
|
|
|
52827
53041
|
* @since 2.0.0
|
|
52828
53042
|
* @category unsafe
|
|
52829
53043
|
*/
|
|
52830
|
-
const getUnsafe$
|
|
53044
|
+
const getUnsafe$2 = getUnsafe$3;
|
|
52831
53045
|
/**
|
|
52832
53046
|
* Checks if the specified key has an entry in the `HashMap`.
|
|
52833
53047
|
*
|
|
@@ -52914,7 +53128,7 @@ const hasBy = hasBy$1;
|
|
|
52914
53128
|
* @since 2.0.0
|
|
52915
53129
|
* @category transformations
|
|
52916
53130
|
*/
|
|
52917
|
-
const set$
|
|
53131
|
+
const set$5 = set$6;
|
|
52918
53132
|
/**
|
|
52919
53133
|
* Returns an `IterableIterator` of the keys within the `HashMap`.
|
|
52920
53134
|
*
|
|
@@ -53454,7 +53668,7 @@ const every = every$1;
|
|
|
53454
53668
|
|
|
53455
53669
|
//#endregion
|
|
53456
53670
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/LayerMap.js
|
|
53457
|
-
const TypeId$
|
|
53671
|
+
const TypeId$25 = "~effect/LayerMap";
|
|
53458
53672
|
/**
|
|
53459
53673
|
* @since 3.14.0
|
|
53460
53674
|
* @category Constructors
|
|
@@ -53498,17 +53712,17 @@ const TypeId$23 = "~effect/LayerMap";
|
|
|
53498
53712
|
* ```
|
|
53499
53713
|
*/
|
|
53500
53714
|
const make$28 = /* @__PURE__ */ fnUntraced(function* (lookup, options) {
|
|
53501
|
-
const services$
|
|
53502
|
-
const memoMap = CurrentMemoMap.getOrCreate(services$
|
|
53715
|
+
const services$4 = yield* services();
|
|
53716
|
+
const memoMap = CurrentMemoMap.getOrCreate(services$4);
|
|
53503
53717
|
const rcMap = yield* make$44({
|
|
53504
|
-
lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$
|
|
53718
|
+
lookup: (key) => servicesWith((_) => buildWithMemoMap(lookup(key), memoMap, get$12(_, Scope))),
|
|
53505
53719
|
idleTimeToLive: options?.idleTimeToLive
|
|
53506
53720
|
});
|
|
53507
53721
|
return identity({
|
|
53508
|
-
[TypeId$
|
|
53722
|
+
[TypeId$25]: TypeId$25,
|
|
53509
53723
|
rcMap,
|
|
53510
|
-
get: (key) => effectServices(get$
|
|
53511
|
-
services: (key) => get$
|
|
53724
|
+
get: (key) => effectServices(get$10(rcMap, key)),
|
|
53725
|
+
services: (key) => get$10(rcMap, key),
|
|
53512
53726
|
invalidate: (key) => invalidate$4(rcMap, key)
|
|
53513
53727
|
});
|
|
53514
53728
|
});
|
|
@@ -54067,6 +54281,48 @@ const consolePretty = consolePretty$1;
|
|
|
54067
54281
|
*/
|
|
54068
54282
|
const tracerLogger = tracerLogger$1;
|
|
54069
54283
|
|
|
54284
|
+
//#endregion
|
|
54285
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Ref.js
|
|
54286
|
+
const RefProto = {
|
|
54287
|
+
["~effect/Ref"]: { _A: identity },
|
|
54288
|
+
...PipeInspectableProto,
|
|
54289
|
+
toJSON() {
|
|
54290
|
+
return {
|
|
54291
|
+
_id: "Ref",
|
|
54292
|
+
ref: this.ref
|
|
54293
|
+
};
|
|
54294
|
+
}
|
|
54295
|
+
};
|
|
54296
|
+
/**
|
|
54297
|
+
* Creates a new Ref with the specified initial value (unsafe version).
|
|
54298
|
+
*
|
|
54299
|
+
* This function creates a Ref synchronously without wrapping in Effect.
|
|
54300
|
+
* Use this only when you're sure about the safety of immediate creation.
|
|
54301
|
+
*
|
|
54302
|
+
* @example
|
|
54303
|
+
* ```ts
|
|
54304
|
+
* import { Ref } from "effect"
|
|
54305
|
+
*
|
|
54306
|
+
* // Create a ref directly without Effect
|
|
54307
|
+
* const counter = Ref.makeUnsafe(0)
|
|
54308
|
+
*
|
|
54309
|
+
* // Get the current value
|
|
54310
|
+
* const value = Ref.getUnsafe(counter)
|
|
54311
|
+
* console.log(value) // 0
|
|
54312
|
+
*
|
|
54313
|
+
* // Note: This is unsafe and should be used carefully
|
|
54314
|
+
* // Prefer Ref.make for Effect-wrapped creation
|
|
54315
|
+
* ```
|
|
54316
|
+
*
|
|
54317
|
+
* @since 4.0.0
|
|
54318
|
+
* @category constructors
|
|
54319
|
+
*/
|
|
54320
|
+
const makeUnsafe$2 = (value) => {
|
|
54321
|
+
const self = Object.create(RefProto);
|
|
54322
|
+
self.ref = make$47(value);
|
|
54323
|
+
return self;
|
|
54324
|
+
};
|
|
54325
|
+
|
|
54070
54326
|
//#endregion
|
|
54071
54327
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/unstable/reactivity/Reactivity.js
|
|
54072
54328
|
/**
|
|
@@ -54119,10 +54375,10 @@ const make$26 = /* @__PURE__ */ sync(() => {
|
|
|
54119
54375
|
};
|
|
54120
54376
|
};
|
|
54121
54377
|
const query = (keys, effect) => gen(function* () {
|
|
54122
|
-
const services$
|
|
54123
|
-
const scope = get$
|
|
54378
|
+
const services$3 = yield* services();
|
|
54379
|
+
const scope = get$12(services$3, Scope);
|
|
54124
54380
|
const results = yield* make$46();
|
|
54125
|
-
const runFork = flow(runForkWith(services$
|
|
54381
|
+
const runFork = flow(runForkWith(services$3), runIn(scope));
|
|
54126
54382
|
let running = false;
|
|
54127
54383
|
let pending = false;
|
|
54128
54384
|
const handleExit = (exit) => {
|
|
@@ -54203,7 +54459,7 @@ const keysToHashes = (keys, f) => {
|
|
|
54203
54459
|
/**
|
|
54204
54460
|
* @since 4.0.0
|
|
54205
54461
|
*/
|
|
54206
|
-
const TypeId$
|
|
54462
|
+
const TypeId$24 = "~effect/persistence/KeyValueStore";
|
|
54207
54463
|
const ErrorTypeId = "~effect/persistence/KeyValueStore/KeyValueStoreError";
|
|
54208
54464
|
/**
|
|
54209
54465
|
* @since 4.0.0
|
|
@@ -54225,7 +54481,7 @@ const KeyValueStore = /* @__PURE__ */ Service$1("effect/persistence/KeyValueStor
|
|
|
54225
54481
|
* @category constructors
|
|
54226
54482
|
*/
|
|
54227
54483
|
const make$25 = (options) => KeyValueStore.of({
|
|
54228
|
-
[TypeId$
|
|
54484
|
+
[TypeId$24]: TypeId$24,
|
|
54229
54485
|
has: (key) => map$8(options.get(key), isNotUndefined),
|
|
54230
54486
|
isEmpty: map$8(options.size, (size) => size === 0),
|
|
54231
54487
|
modify: (key, f) => flatMap$2(options.get(key), (o) => {
|
|
@@ -54478,6 +54734,99 @@ const makeRunMain = (f) => dual((args) => isEffect(args[0]), (effect, options) =
|
|
|
54478
54734
|
});
|
|
54479
54735
|
});
|
|
54480
54736
|
|
|
54737
|
+
//#endregion
|
|
54738
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/SynchronizedRef.js
|
|
54739
|
+
/**
|
|
54740
|
+
* @since 2.0.0
|
|
54741
|
+
*/
|
|
54742
|
+
const TypeId$23 = "~effect/SynchronizedRef";
|
|
54743
|
+
const Proto$10 = {
|
|
54744
|
+
...PipeInspectableProto,
|
|
54745
|
+
[TypeId$23]: TypeId$23,
|
|
54746
|
+
toJSON() {
|
|
54747
|
+
return {
|
|
54748
|
+
_id: "SynchronizedRef",
|
|
54749
|
+
value: this.backing.ref.current
|
|
54750
|
+
};
|
|
54751
|
+
}
|
|
54752
|
+
};
|
|
54753
|
+
/**
|
|
54754
|
+
* @since 4.0.0
|
|
54755
|
+
* @category constructors
|
|
54756
|
+
*/
|
|
54757
|
+
const makeUnsafe$1 = (value) => {
|
|
54758
|
+
const self = Object.create(Proto$10);
|
|
54759
|
+
self.semaphore = makeSemaphoreUnsafe(1);
|
|
54760
|
+
self.backing = makeUnsafe$2(value);
|
|
54761
|
+
return self;
|
|
54762
|
+
};
|
|
54763
|
+
|
|
54764
|
+
//#endregion
|
|
54765
|
+
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/ScopedRef.js
|
|
54766
|
+
/**
|
|
54767
|
+
* @since 2.0.0
|
|
54768
|
+
*/
|
|
54769
|
+
const TypeId$22 = "~effect/ScopedRef";
|
|
54770
|
+
const Proto$9 = {
|
|
54771
|
+
...PipeInspectableProto,
|
|
54772
|
+
[TypeId$22]: TypeId$22,
|
|
54773
|
+
toJSON() {
|
|
54774
|
+
return {
|
|
54775
|
+
_id: "ScopedRef",
|
|
54776
|
+
value: this.backing.backing.ref.current[1]
|
|
54777
|
+
};
|
|
54778
|
+
}
|
|
54779
|
+
};
|
|
54780
|
+
const makeUnsafe = (scope, value) => {
|
|
54781
|
+
const self = Object.create(Proto$9);
|
|
54782
|
+
self.backing = makeUnsafe$1([scope, value]);
|
|
54783
|
+
return self;
|
|
54784
|
+
};
|
|
54785
|
+
/**
|
|
54786
|
+
* Creates a new `ScopedRef` from an effect that resourcefully produces a
|
|
54787
|
+
* value.
|
|
54788
|
+
*
|
|
54789
|
+
* @since 2.0.0
|
|
54790
|
+
* @category constructors
|
|
54791
|
+
*/
|
|
54792
|
+
const fromAcquire = /* @__PURE__ */ fnUntraced(function* (acquire) {
|
|
54793
|
+
const scope = makeUnsafe$10();
|
|
54794
|
+
const self = makeUnsafe(scope, yield* acquire.pipe(provide$4(scope), tapCause((cause) => close(scope, failCause$4(cause)))));
|
|
54795
|
+
yield* addFinalizer((exit) => close(self.backing.backing.ref.current[0], exit));
|
|
54796
|
+
return self;
|
|
54797
|
+
}, uninterruptible);
|
|
54798
|
+
/**
|
|
54799
|
+
* Retrieves the current value of the scoped reference.
|
|
54800
|
+
*
|
|
54801
|
+
* @since 4.0.0
|
|
54802
|
+
* @category getters
|
|
54803
|
+
*/
|
|
54804
|
+
const getUnsafe$1 = (self) => self.backing.backing.ref.current[1];
|
|
54805
|
+
/**
|
|
54806
|
+
* Retrieves the current value of the scoped reference.
|
|
54807
|
+
*
|
|
54808
|
+
* @since 2.0.0
|
|
54809
|
+
* @category getters
|
|
54810
|
+
*/
|
|
54811
|
+
const get$4 = (self) => sync(() => getUnsafe$1(self));
|
|
54812
|
+
/**
|
|
54813
|
+
* Sets the value of this reference to the specified resourcefully-created
|
|
54814
|
+
* value. Any resources associated with the old value will be released.
|
|
54815
|
+
*
|
|
54816
|
+
* This method will not return until either the reference is successfully
|
|
54817
|
+
* changed to the new value, with old resources released, or until the attempt
|
|
54818
|
+
* to acquire a new value fails.
|
|
54819
|
+
*
|
|
54820
|
+
* @since 2.0.0
|
|
54821
|
+
* @category getters
|
|
54822
|
+
*/
|
|
54823
|
+
const set$4 = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced(function* (self, acquire) {
|
|
54824
|
+
yield* close(self.backing.backing.ref.current[0], void_$2);
|
|
54825
|
+
const scope = makeUnsafe$10();
|
|
54826
|
+
const value = yield* acquire.pipe(provide$4(scope), tapCause((cause) => close(scope, failCause$4(cause))));
|
|
54827
|
+
self.backing.backing.ref.current = [scope, value];
|
|
54828
|
+
}, uninterruptible, (effect, self) => self.backing.semaphore.withPermit(effect)));
|
|
54829
|
+
|
|
54481
54830
|
//#endregion
|
|
54482
54831
|
//#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@e559abd_988f9a6806dc7ec0481ca359e33f6f4a/node_modules/effect/dist/Stdio.js
|
|
54483
54832
|
/**
|
|
@@ -56816,7 +57165,7 @@ const make$22 = /* @__PURE__ */ gen(function* () {
|
|
|
56816
57165
|
};
|
|
56817
57166
|
};
|
|
56818
57167
|
const spawn = (command, spawnOptions) => callback$1((resume) => {
|
|
56819
|
-
const deferred = makeUnsafe$
|
|
57168
|
+
const deferred = makeUnsafe$11();
|
|
56820
57169
|
const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);
|
|
56821
57170
|
handle.on("error", (error) => {
|
|
56822
57171
|
resume(fail$4(toPlatformError("spawn", error, command)));
|
|
@@ -57418,7 +57767,7 @@ const TypeId$17 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
|
57418
57767
|
const Proto$5 = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), BaseProto, {
|
|
57419
57768
|
[TypeId$17]: TypeId$17,
|
|
57420
57769
|
[symbolRedactable](context) {
|
|
57421
|
-
return redact(this, get$
|
|
57770
|
+
return redact(this, get$12(context, CurrentRedactedNames));
|
|
57422
57771
|
},
|
|
57423
57772
|
toJSON() {
|
|
57424
57773
|
return redact$1(this);
|
|
@@ -59863,7 +60212,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
|
|
|
59863
60212
|
ws.addEventListener("error", onError, { once: true });
|
|
59864
60213
|
ws.addEventListener("message", onMessage);
|
|
59865
60214
|
if (ws.readyState !== 1) {
|
|
59866
|
-
const openDeferred = makeUnsafe$
|
|
60215
|
+
const openDeferred = makeUnsafe$11();
|
|
59867
60216
|
ws.addEventListener("open", () => {
|
|
59868
60217
|
open = true;
|
|
59869
60218
|
doneUnsafe(openDeferred, void_$1);
|
|
@@ -60842,7 +61191,7 @@ var MultipartError = class MultipartError extends TaggedError("MultipartError")
|
|
|
60842
61191
|
* @category Config
|
|
60843
61192
|
*/
|
|
60844
61193
|
const makeConfig = (headers) => withFiber((fiber) => {
|
|
60845
|
-
const mimeTypes = get$
|
|
61194
|
+
const mimeTypes = get$12(fiber.services, FieldMimeTypes);
|
|
60846
61195
|
return succeed$1({
|
|
60847
61196
|
headers,
|
|
60848
61197
|
maxParts: fiber.getRef(MaxParts),
|
|
@@ -61246,7 +61595,7 @@ const SpanNameGenerator = /* @__PURE__ */ Reference("@effect/platform/HttpMiddle
|
|
|
61246
61595
|
const logger = /* @__PURE__ */ make$10((httpApp) => {
|
|
61247
61596
|
let counter = 0;
|
|
61248
61597
|
return withFiber((fiber) => {
|
|
61249
|
-
const request = getUnsafe$
|
|
61598
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61250
61599
|
return withLogSpan(flatMap$2(exit(httpApp), (exit) => {
|
|
61251
61600
|
if (fiber.getRef(LoggerDisabled)) return exit;
|
|
61252
61601
|
else if (exit._tag === "Failure") {
|
|
@@ -61270,7 +61619,7 @@ const logger = /* @__PURE__ */ make$10((httpApp) => {
|
|
|
61270
61619
|
* @category Tracer
|
|
61271
61620
|
*/
|
|
61272
61621
|
const tracer = /* @__PURE__ */ make$10((httpApp) => withFiber((fiber) => {
|
|
61273
|
-
const request = getUnsafe$
|
|
61622
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61274
61623
|
if (!fiber.getRef(TracerEnabled) || fiber.getRef(TracerDisabledWhen)(request)) return httpApp;
|
|
61275
61624
|
const nameGenerator = fiber.getRef(SpanNameGenerator);
|
|
61276
61625
|
const span = makeSpanUnsafe(fiber, nameGenerator(request), {
|
|
@@ -61318,7 +61667,7 @@ const tracer = /* @__PURE__ */ make$10((httpApp) => withFiber((fiber) => {
|
|
|
61318
61667
|
const toHandled = (self, handleResponse, middleware) => {
|
|
61319
61668
|
const responded = flatMap$2(self, (response) => {
|
|
61320
61669
|
const fiber = getCurrent();
|
|
61321
|
-
const request = getUnsafe$
|
|
61670
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61322
61671
|
const handler = fiber.getRef(PreResponseHandlers);
|
|
61323
61672
|
if (handler === void 0) {
|
|
61324
61673
|
request[handledSymbol] = true;
|
|
@@ -61339,7 +61688,7 @@ const toHandled = (self, handleResponse, middleware) => {
|
|
|
61339
61688
|
});
|
|
61340
61689
|
const handleCause = (cause) => flatMapEager(causeResponse(cause), ([response, cause]) => {
|
|
61341
61690
|
const fiber = getCurrent();
|
|
61342
|
-
const request = getUnsafe$
|
|
61691
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61343
61692
|
const handler = fiber.getRef(PreResponseHandlers);
|
|
61344
61693
|
const cont = cause.failures.length === 0 ? succeed$1(response) : failCause$2(cause);
|
|
61345
61694
|
if (handler === void 0) {
|
|
@@ -61354,7 +61703,7 @@ const toHandled = (self, handleResponse, middleware) => {
|
|
|
61354
61703
|
const withMiddleware = middleware === void 0 ? tracer(responded) : matchCauseEffect(tracer(middleware(responded)), {
|
|
61355
61704
|
onFailure(cause) {
|
|
61356
61705
|
const fiber = getCurrent();
|
|
61357
|
-
const request = getUnsafe$
|
|
61706
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61358
61707
|
if (handledSymbol in request) return void_$1;
|
|
61359
61708
|
return matchCauseEffectEager(causeResponse(cause), {
|
|
61360
61709
|
onFailure: (_cause) => handleResponse(request, empty({ status: 500 })),
|
|
@@ -61363,7 +61712,7 @@ const toHandled = (self, handleResponse, middleware) => {
|
|
|
61363
61712
|
},
|
|
61364
61713
|
onSuccess(response) {
|
|
61365
61714
|
const fiber = getCurrent();
|
|
61366
|
-
const request = getUnsafe$
|
|
61715
|
+
const request = getUnsafe$5(fiber.services, HttpServerRequest);
|
|
61367
61716
|
return handledSymbol in request ? void_$1 : handleResponse(request, response);
|
|
61368
61717
|
}
|
|
61369
61718
|
});
|
|
@@ -61372,7 +61721,7 @@ const toHandled = (self, handleResponse, middleware) => {
|
|
|
61372
61721
|
const handledSymbol = /* @__PURE__ */ Symbol.for("effect/http/HttpEffect/handled");
|
|
61373
61722
|
const scopeEjected = /* @__PURE__ */ Symbol.for("effect/http/HttpEffect/scopeEjected");
|
|
61374
61723
|
const scoped = (effect) => withFiber((fiber) => {
|
|
61375
|
-
const scope = makeUnsafe$
|
|
61724
|
+
const scope = makeUnsafe$10();
|
|
61376
61725
|
const prev = getOption(fiber.services, Scope);
|
|
61377
61726
|
fiber.setServices(add$3(fiber.services, Scope, scope));
|
|
61378
61727
|
return onExitInterruptible(effect, (exit) => {
|
|
@@ -61658,7 +62007,7 @@ const make$7 = /* @__PURE__ */ gen(function* () {
|
|
|
61658
62007
|
});
|
|
61659
62008
|
const span = contextMap.get(ParentSpan.key);
|
|
61660
62009
|
if (span && span._tag === "Span") span.attribute("http.route", route.path);
|
|
61661
|
-
return provideServices(route.uninterruptible ? route.handler : interruptible(route.handler), makeUnsafe$
|
|
62010
|
+
return provideServices(route.uninterruptible ? route.handler : interruptible(route.handler), makeUnsafe$12(contextMap));
|
|
61662
62011
|
});
|
|
61663
62012
|
if (middleware.size === 0) return handler;
|
|
61664
62013
|
for (const fn of reverse(middleware)) handler = fn(handler);
|
|
@@ -61834,7 +62183,7 @@ const makeMiddleware = (middleware, options) => options?.global ? effectDiscard(
|
|
|
61834
62183
|
const router = yield* HttpRouter;
|
|
61835
62184
|
const fn = isEffect(middleware) ? yield* middleware : middleware;
|
|
61836
62185
|
yield* router.addGlobalMiddleware(fn);
|
|
61837
|
-
})) : new MiddlewareImpl(isEffect(middleware) ? effectServices(map$8(middleware, (fn) => makeUnsafe$
|
|
62186
|
+
})) : new MiddlewareImpl(isEffect(middleware) ? effectServices(map$8(middleware, (fn) => makeUnsafe$12(new Map([[fnContextKey, fn]])))) : succeedServices(makeUnsafe$12(new Map([[fnContextKey, middleware]]))));
|
|
61838
62187
|
let middlewareId = 0;
|
|
61839
62188
|
const fnContextKey = "effect/http/HttpRouter/MiddlewareFn";
|
|
61840
62189
|
var MiddlewareImpl = class MiddlewareImpl {
|
|
@@ -61850,11 +62199,11 @@ var MiddlewareImpl = class MiddlewareImpl {
|
|
|
61850
62199
|
const stack = [context.mapUnsafe.get(fnContextKey)];
|
|
61851
62200
|
if (this.dependencies) {
|
|
61852
62201
|
const memoMap = yield* CurrentMemoMap;
|
|
61853
|
-
const scope = get$
|
|
62202
|
+
const scope = get$12(context, Scope);
|
|
61854
62203
|
const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
|
|
61855
62204
|
stack.push(...getMiddleware(depsContext));
|
|
61856
62205
|
}
|
|
61857
|
-
return makeUnsafe$
|
|
62206
|
+
return makeUnsafe$12(new Map([[contextKey, stack]]));
|
|
61858
62207
|
})).pipe(provide$3(this.layerFn));
|
|
61859
62208
|
}
|
|
61860
62209
|
layer;
|
|
@@ -66173,7 +66522,7 @@ const toFileUrl = (path) => try_({
|
|
|
66173
66522
|
* @category Layers
|
|
66174
66523
|
*/
|
|
66175
66524
|
const layerPosix$1 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
66176
|
-
[TypeId$
|
|
66525
|
+
[TypeId$38]: TypeId$38,
|
|
66177
66526
|
...Path.posix,
|
|
66178
66527
|
fromFileUrl,
|
|
66179
66528
|
toFileUrl
|
|
@@ -66183,7 +66532,7 @@ const layerPosix$1 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
|
66183
66532
|
* @category Layers
|
|
66184
66533
|
*/
|
|
66185
66534
|
const layerWin32$1 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
66186
|
-
[TypeId$
|
|
66535
|
+
[TypeId$38]: TypeId$38,
|
|
66187
66536
|
...Path.win32,
|
|
66188
66537
|
fromFileUrl,
|
|
66189
66538
|
toFileUrl
|
|
@@ -66193,7 +66542,7 @@ const layerWin32$1 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
|
66193
66542
|
* @category Layers
|
|
66194
66543
|
*/
|
|
66195
66544
|
const layer$8 = /* @__PURE__ */ succeed$2(Path$1)({
|
|
66196
|
-
[TypeId$
|
|
66545
|
+
[TypeId$38]: TypeId$38,
|
|
66197
66546
|
...Path,
|
|
66198
66547
|
fromFileUrl,
|
|
66199
66548
|
toFileUrl
|
|
@@ -66294,7 +66643,7 @@ const make$4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQ
|
|
|
66294
66643
|
})) });
|
|
66295
66644
|
const columns = sync(() => stdout.columns ?? 0);
|
|
66296
66645
|
const readInput = gen(function* () {
|
|
66297
|
-
yield* get$
|
|
66646
|
+
yield* get$8(rlRef);
|
|
66298
66647
|
const queue = yield* make$46();
|
|
66299
66648
|
const handleKeypress = (s, k) => {
|
|
66300
66649
|
const userInput = {
|
|
@@ -66313,7 +66662,7 @@ const make$4 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQ
|
|
|
66313
66662
|
stdin.on("keypress", handleKeypress);
|
|
66314
66663
|
return queue;
|
|
66315
66664
|
});
|
|
66316
|
-
const readLine = scoped$1(flatMap$2(get$
|
|
66665
|
+
const readLine = scoped$1(flatMap$2(get$8(rlRef), (readlineInterface) => callback$1((resume) => {
|
|
66317
66666
|
const onLine = (line) => resume(succeed$1(line));
|
|
66318
66667
|
readlineInterface.once("line", onLine);
|
|
66319
66668
|
return sync(() => readlineInterface.off("line", onLine));
|
|
@@ -66437,7 +66786,7 @@ const makeHandler = (httpEffect, options) => {
|
|
|
66437
66786
|
return function handler(nodeRequest, nodeResponse) {
|
|
66438
66787
|
const map = new Map(services.mapUnsafe);
|
|
66439
66788
|
map.set(HttpServerRequest.key, new ServerRequestImpl(nodeRequest, nodeResponse));
|
|
66440
|
-
const fiber = runIn(runForkWith(makeUnsafe$
|
|
66789
|
+
const fiber = runIn(runForkWith(makeUnsafe$12(map))(handled), options.scope);
|
|
66441
66790
|
nodeResponse.on("close", () => {
|
|
66442
66791
|
if (!nodeResponse.writableEnded) fiber.interruptUnsafe(clientAbortFiberId);
|
|
66443
66792
|
});
|
|
@@ -66467,7 +66816,7 @@ const makeUpgradeHandler = (lazyWss, httpEffect, options) => {
|
|
|
66467
66816
|
})), (ws) => sync(() => ws.close()))));
|
|
66468
66817
|
const map = new Map(services.mapUnsafe);
|
|
66469
66818
|
map.set(HttpServerRequest.key, new ServerRequestImpl(nodeRequest, nodeResponse, upgradeEffect));
|
|
66470
|
-
const fiber = runIn(runForkWith(makeUnsafe$
|
|
66819
|
+
const fiber = runIn(runForkWith(makeUnsafe$12(map))(handledApp), options.scope);
|
|
66471
66820
|
socket.on("close", () => {
|
|
66472
66821
|
if (!socket.writableEnded) fiber.interruptUnsafe(clientAbortFiberId);
|
|
66473
66822
|
});
|
|
@@ -67188,7 +67537,7 @@ const layer = /* @__PURE__ */ layerOptions();
|
|
|
67188
67537
|
*/
|
|
67189
67538
|
const toStream = /* @__PURE__ */ dual(2, (self, atom) => callback((queue) => suspend$3(() => {
|
|
67190
67539
|
const fiber = getCurrent();
|
|
67191
|
-
const scope = getUnsafe$
|
|
67540
|
+
const scope = getUnsafe$5(fiber.services, Scope);
|
|
67192
67541
|
const cancel = self.subscribe(atom, (value) => offerUnsafe(queue, value), { immediate: true });
|
|
67193
67542
|
return addFinalizer$1(scope, sync(cancel));
|
|
67194
67543
|
})));
|
|
@@ -67905,7 +68254,7 @@ const effect = (get, effect, options, services) => {
|
|
|
67905
68254
|
};
|
|
67906
68255
|
function makeEffect(ctx, effect, initialValue, services = empty$14(), uninterruptible = false) {
|
|
67907
68256
|
const previous = ctx.self();
|
|
67908
|
-
const scope = makeUnsafe$
|
|
68257
|
+
const scope = makeUnsafe$10();
|
|
67909
68258
|
ctx.addFinalizer(() => {
|
|
67910
68259
|
runForkWith(services)(close(scope, void_$2));
|
|
67911
68260
|
});
|
|
@@ -67915,7 +68264,7 @@ function makeEffect(ctx, effect, initialValue, services = empty$14(), uninterrup
|
|
|
67915
68264
|
servicesMap.set(Scheduler.key, ctx.registry.scheduler);
|
|
67916
68265
|
let syncResult;
|
|
67917
68266
|
let isAsync = false;
|
|
67918
|
-
const cancel = runCallbackSync(makeUnsafe$
|
|
68267
|
+
const cancel = runCallbackSync(makeUnsafe$12(servicesMap), effect, function(exit) {
|
|
67919
68268
|
syncResult = fromExitWithPrevious(exit, previous);
|
|
67920
68269
|
if (isAsync) ctx.setSelf(syncResult);
|
|
67921
68270
|
}, uninterruptible);
|
|
@@ -67931,7 +68280,7 @@ function runCallbackSync(services, effect, onExit, uninterruptible = false) {
|
|
|
67931
68280
|
return;
|
|
67932
68281
|
}
|
|
67933
68282
|
const runFork = runForkWith(services);
|
|
67934
|
-
const scheduler = get$
|
|
68283
|
+
const scheduler = get$12(services, Scheduler);
|
|
67935
68284
|
const fiber = runFork(effect);
|
|
67936
68285
|
if ("flush" in scheduler) scheduler.flush();
|
|
67937
68286
|
const result = fiber.pollUnsafe();
|
|
@@ -67970,7 +68319,7 @@ const context = (options) => {
|
|
|
67970
68319
|
factory.addGlobalLayer = (layer) => {
|
|
67971
68320
|
globalLayer = provideMerge(globalLayer, provide$3(layer, layer$17));
|
|
67972
68321
|
};
|
|
67973
|
-
const reactivityAtom = removeTtl(make(servicesWith((services) => buildWithMemoMap(layer$17, options.memoMap, get$
|
|
68322
|
+
const reactivityAtom = removeTtl(make(servicesWith((services) => buildWithMemoMap(layer$17, options.memoMap, get$12(services, Scope))).pipe(map$8(get$12(Reactivity)))));
|
|
67974
68323
|
factory.withReactivity = (keys) => (atom) => transform(atom, (get) => {
|
|
67975
68324
|
const reactivity = getOrThrow(get(reactivityAtom));
|
|
67976
68325
|
get.addFinalizer(reactivity.registerUnsafe(keys, () => {
|
|
@@ -68022,7 +68371,7 @@ function makeStream(ctx, stream, initialValue, services = empty$14()) {
|
|
|
68022
68371
|
const servicesMap = new Map(services.mapUnsafe);
|
|
68023
68372
|
servicesMap.set(AtomRegistry.key, ctx.registry);
|
|
68024
68373
|
servicesMap.set(Scheduler.key, ctx.registry.scheduler);
|
|
68025
|
-
const cancel = runCallbackSync(makeUnsafe$
|
|
68374
|
+
const cancel = runCallbackSync(makeUnsafe$12(servicesMap), run, constVoid, false);
|
|
68026
68375
|
if (cancel !== void 0) ctx.addFinalizer(cancel);
|
|
68027
68376
|
if (previous._tag === "Some") return waitingFrom(previous);
|
|
68028
68377
|
return waiting(initialValue);
|
|
@@ -68157,10 +68506,10 @@ const makeStreamPull = (pullSignal, pullAtom) => writable(pullAtom.read, functio
|
|
|
68157
68506
|
const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry === "undefined" ? (f) => {
|
|
68158
68507
|
const atoms = empty$9();
|
|
68159
68508
|
return function(arg) {
|
|
68160
|
-
const atomEntry = get$
|
|
68509
|
+
const atomEntry = get$11(atoms, arg);
|
|
68161
68510
|
if (atomEntry._tag === "Some") return atomEntry.value;
|
|
68162
68511
|
const newAtom = f(arg);
|
|
68163
|
-
set$
|
|
68512
|
+
set$8(atoms, arg, newAtom);
|
|
68164
68513
|
return newAtom;
|
|
68165
68514
|
};
|
|
68166
68515
|
} : (f) => {
|
|
@@ -68169,10 +68518,10 @@ const family = typeof WeakRef === "undefined" || typeof FinalizationRegistry ===
|
|
|
68169
68518
|
remove$5(atoms, arg);
|
|
68170
68519
|
});
|
|
68171
68520
|
return function(arg) {
|
|
68172
|
-
const atomEntry = get$
|
|
68521
|
+
const atomEntry = get$11(atoms, arg).pipe(flatMapNullishOr((ref) => ref.deref()));
|
|
68173
68522
|
if (atomEntry._tag === "Some") return atomEntry.value;
|
|
68174
68523
|
const newAtom = f(arg);
|
|
68175
|
-
set$
|
|
68524
|
+
set$8(atoms, arg, new WeakRef(newAtom));
|
|
68176
68525
|
registry.register(newAtom, arg);
|
|
68177
68526
|
return newAtom;
|
|
68178
68527
|
};
|
|
@@ -68276,23 +68625,23 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
|
|
|
68276
68625
|
const projectCache = yield* make$34({
|
|
68277
68626
|
lookup: fnUntraced(function* (options) {
|
|
68278
68627
|
const services = yield* projectKvs.services(options.projectId);
|
|
68279
|
-
const store = toSchemaStore(get$
|
|
68628
|
+
const store = toSchemaStore(get$12(services, KeyValueStore), options.setting.schema);
|
|
68280
68629
|
return yield* orDie$2(store.get(options.setting.name));
|
|
68281
68630
|
}, scoped$1),
|
|
68282
68631
|
capacity: Number.MAX_SAFE_INTEGER,
|
|
68283
68632
|
requireServicesAt: "lookup"
|
|
68284
68633
|
});
|
|
68285
|
-
const get = (setting) => get$
|
|
68634
|
+
const get = (setting) => get$7(cache, setting);
|
|
68286
68635
|
const set = (setting, value) => {
|
|
68287
68636
|
const s = toSchemaStore(store, setting.schema);
|
|
68288
|
-
const setCache = set$
|
|
68637
|
+
const setCache = set$7(cache, setting, value);
|
|
68289
68638
|
const update = match$7(value, {
|
|
68290
68639
|
onNone: () => ignore(s.remove(setting.name)),
|
|
68291
68640
|
onSome: (v) => orDie$2(s.set(setting.name, v))
|
|
68292
68641
|
});
|
|
68293
68642
|
return reactivity.mutation([`settings.${setting.name}`], andThen(update, setCache));
|
|
68294
68643
|
};
|
|
68295
|
-
const getProject = (setting) => CurrentProjectId.use((projectId) => get$
|
|
68644
|
+
const getProject = (setting) => CurrentProjectId.use((projectId) => get$7(projectCache, {
|
|
68296
68645
|
projectId,
|
|
68297
68646
|
setting
|
|
68298
68647
|
}));
|
|
@@ -68303,8 +68652,8 @@ var Settings = class Settings extends Service$1()("lalph/Settings", { make: gen(
|
|
|
68303
68652
|
setProject: fnUntraced(function* (setting, value) {
|
|
68304
68653
|
const projectId = yield* CurrentProjectId;
|
|
68305
68654
|
const services = yield* projectKvs.services(projectId);
|
|
68306
|
-
const s = toSchemaStore(get$
|
|
68307
|
-
const setCache = set$
|
|
68655
|
+
const s = toSchemaStore(get$12(services, KeyValueStore), setting.schema);
|
|
68656
|
+
const setCache = set$7(projectCache, {
|
|
68308
68657
|
projectId,
|
|
68309
68658
|
setting
|
|
68310
68659
|
}, value);
|
|
@@ -143429,7 +143778,9 @@ var IssueSource = class IssueSource extends Service$1()("lalph/IssueSource") {
|
|
|
143429
143778
|
var IssueSourceError = class extends ErrorClass("lalph/IssueSourceError")({
|
|
143430
143779
|
_tag: tag("IssueSourceError"),
|
|
143431
143780
|
cause: Defect
|
|
143432
|
-
}) {
|
|
143781
|
+
}) {
|
|
143782
|
+
message = "An error occurred in the IssueSource";
|
|
143783
|
+
};
|
|
143433
143784
|
|
|
143434
143785
|
//#endregion
|
|
143435
143786
|
//#region src/domain/LinearIssues.ts
|
|
@@ -143484,7 +143835,7 @@ var Linear = class extends Service$1()("lalph/Linear", { make: gen(function* ()
|
|
|
143484
143835
|
lookup: (token) => succeed$1(new LinearClient({ accessToken: token })),
|
|
143485
143836
|
idleTimeToLive: "1 minute"
|
|
143486
143837
|
});
|
|
143487
|
-
const getClient = tokens.get.pipe(flatMap$2(({ token }) => get$
|
|
143838
|
+
const getClient = tokens.get.pipe(flatMap$2(({ token }) => get$10(clients, token)), mapError$2((cause) => new LinearError({ cause })));
|
|
143488
143839
|
const use = (f) => getClient.pipe(flatMap$2((client) => tryPromise({
|
|
143489
143840
|
try: () => f(client),
|
|
143490
143841
|
catch: (cause) => new LinearError({ cause })
|
|
@@ -143605,10 +143956,10 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
143605
143956
|
}));
|
|
143606
143957
|
return yield* IssueSource.make({
|
|
143607
143958
|
issues: fnUntraced(function* (projectId) {
|
|
143608
|
-
return yield* issues(yield* get$
|
|
143959
|
+
return yield* issues(yield* get$7(projectSettings, projectId));
|
|
143609
143960
|
}),
|
|
143610
143961
|
createIssue: fnUntraced(function* (projectId, issue) {
|
|
143611
|
-
const { teamId, labelId, autoMergeLabelId } = yield* get$
|
|
143962
|
+
const { teamId, labelId, autoMergeLabelId } = yield* get$7(projectSettings, projectId);
|
|
143612
143963
|
const created = yield* linear.use((c) => c.createIssue({
|
|
143613
143964
|
teamId,
|
|
143614
143965
|
projectId,
|
|
@@ -143641,7 +143992,7 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
143641
143992
|
};
|
|
143642
143993
|
}, mapError$2((cause) => new IssueSourceError({ cause }))),
|
|
143643
143994
|
updateIssue: fnUntraced(function* (options) {
|
|
143644
|
-
const { autoMergeLabelId } = yield* get$
|
|
143995
|
+
const { autoMergeLabelId } = yield* get$7(projectSettings, options.projectId);
|
|
143645
143996
|
const issueId = identifierMap.get(options.issueId);
|
|
143646
143997
|
const linearIssue = yield* linear.issueById(issueId);
|
|
143647
143998
|
const update = { labelIds: linearIssue.labelIds.slice() };
|
|
@@ -143682,9 +144033,9 @@ const LinearIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
143682
144033
|
yield* Settings.setProject(selectedAutoMergeLabelId, none$3());
|
|
143683
144034
|
yield* invalidate$1(projectSettings, projectId);
|
|
143684
144035
|
}),
|
|
143685
|
-
settings: (projectId) => asVoid(get$
|
|
144036
|
+
settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
|
|
143686
144037
|
info: fnUntraced(function* (lalphProjectId) {
|
|
143687
|
-
const { teamId, labelId, autoMergeLabelId, project } = yield* get$
|
|
144038
|
+
const { teamId, labelId, autoMergeLabelId, project } = yield* get$7(projectSettings, lalphProjectId);
|
|
143688
144039
|
const label = labelId;
|
|
143689
144040
|
const autoMergeLabel = autoMergeLabelId;
|
|
143690
144041
|
const teams = yield* runCollect(linear.stream(() => project.teams()));
|
|
@@ -150072,7 +150423,7 @@ var Github = class extends Service$1()("lalph/Github", { make: gen(function* ()
|
|
|
150072
150423
|
lookup: (token) => succeed$1(new Octokit({ auth: token }).rest),
|
|
150073
150424
|
idleTimeToLive: "1 minute"
|
|
150074
150425
|
});
|
|
150075
|
-
const getClient = tokens.get.pipe(flatMap$2(({ token }) => get$
|
|
150426
|
+
const getClient = tokens.get.pipe(flatMap$2(({ token }) => get$10(clients, token)), mapError$2((cause) => new GithubError({ cause })));
|
|
150076
150427
|
const request = (f) => getClient.pipe(flatMap$2((rest) => tryPromise({
|
|
150077
150428
|
try: () => f(rest),
|
|
150078
150429
|
catch: (cause) => new GithubError({ cause })
|
|
@@ -150172,10 +150523,10 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
150172
150523
|
});
|
|
150173
150524
|
return yield* IssueSource.make({
|
|
150174
150525
|
issues: fnUntraced(function* (projectId) {
|
|
150175
|
-
return yield* issues(yield* get$
|
|
150526
|
+
return yield* issues(yield* get$7(projectSettings, projectId));
|
|
150176
150527
|
}),
|
|
150177
150528
|
createIssue: fnUntraced(function* (projectId, issue) {
|
|
150178
|
-
const { labelFilter, autoMergeLabelName } = yield* get$
|
|
150529
|
+
const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
|
|
150179
150530
|
const created = yield* createIssue({
|
|
150180
150531
|
owner: cli.owner,
|
|
150181
150532
|
repo: cli.repo,
|
|
@@ -150198,7 +150549,7 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
150198
150549
|
};
|
|
150199
150550
|
}, mapError$2((cause) => new IssueSourceError({ cause }))),
|
|
150200
150551
|
updateIssue: fnUntraced(function* (options) {
|
|
150201
|
-
const { labelFilter, autoMergeLabelName } = yield* get$
|
|
150552
|
+
const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, options.projectId);
|
|
150202
150553
|
const issueNumber = Number(options.issueId.slice(1));
|
|
150203
150554
|
const update = {
|
|
150204
150555
|
owner: cli.owner,
|
|
@@ -150258,9 +150609,9 @@ const GithubIssueSource = effect$1(IssueSource, gen(function* () {
|
|
|
150258
150609
|
yield* Settings.setProject(autoMergeLabel, none$3());
|
|
150259
150610
|
yield* invalidate$1(projectSettings, projectId);
|
|
150260
150611
|
}),
|
|
150261
|
-
settings: (projectId) => asVoid(get$
|
|
150612
|
+
settings: (projectId) => asVoid(get$7(projectSettings, projectId)),
|
|
150262
150613
|
info: fnUntraced(function* (projectId) {
|
|
150263
|
-
const { labelFilter, autoMergeLabelName } = yield* get$
|
|
150614
|
+
const { labelFilter, autoMergeLabelName } = yield* get$7(projectSettings, projectId);
|
|
150264
150615
|
console.log(` Label filter: ${match$7(labelFilter, {
|
|
150265
150616
|
onNone: () => "None",
|
|
150266
150617
|
onSome: (value) => value
|
|
@@ -150315,7 +150666,7 @@ const getOrSelectAutoMergeLabel = gen(function* () {
|
|
|
150315
150666
|
const maybeNextPage = (page, linkHeader) => pipe(fromNullishOr$2(linkHeader), filter$8((_) => _.includes(`rel="next"`)), as$2(page + 1));
|
|
150316
150667
|
|
|
150317
150668
|
//#endregion
|
|
150318
|
-
//#region src/
|
|
150669
|
+
//#region src/CurrentIssueSource.ts
|
|
150319
150670
|
const issueSources = [{
|
|
150320
150671
|
id: "linear",
|
|
150321
150672
|
name: "Linear",
|
|
@@ -150347,13 +150698,27 @@ const getOrSelectIssueSource = gen(function* () {
|
|
|
150347
150698
|
var CurrentIssueSource = class CurrentIssueSource extends Service$1()("lalph/CurrentIssueSource") {
|
|
150348
150699
|
static layer = effectServices(gen(function* () {
|
|
150349
150700
|
const source = yield* getOrSelectIssueSource;
|
|
150350
|
-
const
|
|
150351
|
-
|
|
150701
|
+
const build$1 = build(source.layer).pipe(map$8(get$12(IssueSource)), withSpan("CurrentIssueSource.build"));
|
|
150702
|
+
const ref = yield* fromAcquire(build$1);
|
|
150703
|
+
const services$2 = yield* services();
|
|
150704
|
+
const refresh = set$4(ref, build$1).pipe(provideServices(services$2));
|
|
150705
|
+
const proxy = IssueSource.of({
|
|
150706
|
+
issues: (projectId) => get$4(ref).pipe(flatMap$2((source) => source.issues(projectId)), tapErrorTag("IssueSourceError", (e) => logWarning("Rebuilding issue source due to error", fail$5(e)).pipe(andThen(ignore(refresh)))), retry$1(refreshSchedule)),
|
|
150707
|
+
createIssue: (projectId, options) => get$4(ref).pipe(flatMap$2((source) => source.createIssue(projectId, options))),
|
|
150708
|
+
updateIssue: (options) => get$4(ref).pipe(flatMap$2((source) => source.updateIssue(options))),
|
|
150709
|
+
cancelIssue: (projectId, issueId) => get$4(ref).pipe(flatMap$2((source) => source.cancelIssue(projectId, issueId))),
|
|
150710
|
+
reset: get$4(ref).pipe(flatMap$2((source) => source.reset)),
|
|
150711
|
+
settings: (projectId) => get$4(ref).pipe(flatMap$2((source) => source.settings(projectId))),
|
|
150712
|
+
info: (projectId) => get$4(ref).pipe(flatMap$2((source) => source.info(projectId))),
|
|
150713
|
+
ensureInProgress: (projectId, issueId) => get$4(ref).pipe(flatMap$2((source) => source.ensureInProgress(projectId, issueId)))
|
|
150714
|
+
});
|
|
150715
|
+
return IssueSource.serviceMap(proxy).pipe(add$3(CurrentIssueSource, source));
|
|
150352
150716
|
})).pipe(provide$3([Settings.layer, PlatformServices]));
|
|
150353
150717
|
};
|
|
150718
|
+
const refreshSchedule = exponential(100, 1.5).pipe(either(spaced("30 seconds")));
|
|
150354
150719
|
const issueSourceRuntime = atomRuntime(CurrentIssueSource.layer.pipe(orDie$3));
|
|
150355
150720
|
const currentIssuesAtom = family((projectId) => pipe(issueSourceRuntime.atom(fnUntraced(function* (get) {
|
|
150356
|
-
const issues = yield* (yield* IssueSource).issues(projectId)
|
|
150721
|
+
const issues = yield* pipe((yield* IssueSource).issues(projectId), withSpan("currentIssuesAtom.refresh"));
|
|
150357
150722
|
const handle = setTimeout(() => {
|
|
150358
150723
|
get.refreshSelf();
|
|
150359
150724
|
}, 3e4);
|
|
@@ -150657,7 +151022,7 @@ const withWorkerState = (projectId) => (effect) => AtomRegistry.use((registry) =
|
|
|
150657
151022
|
const output = workerOutputAtom(workerId);
|
|
150658
151023
|
const unmountState = registry.mount(state);
|
|
150659
151024
|
const unmountOutput = registry.mount(output);
|
|
150660
|
-
registry.update(activeWorkersAtom, set$
|
|
151025
|
+
registry.update(activeWorkersAtom, set$5(workerId, state));
|
|
150661
151026
|
return effect.pipe(onExit$2((exit) => {
|
|
150662
151027
|
registry.update(state, (state) => state.transitionTo(WorkerStatus.Exited({
|
|
150663
151028
|
issueId: "issueId" in state.status ? state.status.issueId : void 0,
|
|
@@ -151450,7 +151815,7 @@ const runProject = fnUntraced(function* (options) {
|
|
|
151450
151815
|
runTimeout: options.runTimeout,
|
|
151451
151816
|
commandPrefix: options.commandPrefix,
|
|
151452
151817
|
review: options.project.reviewAgent
|
|
151453
|
-
}).pipe(provide$1(options.project.gitFlow === "commit" ? GitFlowCommit : GitFlowPR, { local: true }), withWorkerState(options.project.id))),
|
|
151818
|
+
}).pipe(provide$1(options.project.gitFlow === "commit" ? GitFlowCommit : GitFlowPR, { local: true }), withWorkerState(options.project.id))), catchTags({
|
|
151454
151819
|
NoMoreWork(_) {
|
|
151455
151820
|
if (isFinite) {
|
|
151456
151821
|
iterations = currentIteration;
|
|
@@ -151463,7 +151828,7 @@ const runProject = fnUntraced(function* (options) {
|
|
|
151463
151828
|
quit = true;
|
|
151464
151829
|
return void_$1;
|
|
151465
151830
|
}
|
|
151466
|
-
}), ensuring$2(semaphore.release(1)), ensuring$2(completeWith(startedDeferred, void_$1)), run$1(fibers));
|
|
151831
|
+
}), catchCause$1((cause) => logWarning(cause).pipe(andThen(sleep(seconds(10))))), ensuring$2(semaphore.release(1)), ensuring$2(completeWith(startedDeferred, void_$1)), run$1(fibers));
|
|
151467
151832
|
yield* _await(startedDeferred);
|
|
151468
151833
|
iteration++;
|
|
151469
151834
|
}
|
|
@@ -151638,7 +152003,7 @@ const commandSource = make$35("source").pipe(withDescription("Select the issue s
|
|
|
151638
152003
|
|
|
151639
152004
|
//#endregion
|
|
151640
152005
|
//#region package.json
|
|
151641
|
-
var version = "0.2.
|
|
152006
|
+
var version = "0.2.5";
|
|
151642
152007
|
|
|
151643
152008
|
//#endregion
|
|
151644
152009
|
//#region src/commands/projects/ls.ts
|