@deslop/stash 0.1.1083 → 0.1.1088
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -81
- package/dist/cli.js +97 -40
- package/dist/{contracts-Cc_B2S3-.mjs → contracts-CdQiWFv_.mjs} +744 -211
- package/dist/server.js +1945 -19720
- package/package.json +2 -20
- package/dist/execAsync-BuWzI3oS.mjs +0 -11
- package/dist/getMachineId-bsd-BpFhA9PK.mjs +0 -27
- package/dist/getMachineId-darwin-R5WFW9-e.mjs +0 -24
- package/dist/getMachineId-linux-OOR5wRZh.mjs +0 -20
- package/dist/getMachineId-unsupported-CGXxqFxB.mjs +0 -15
- package/dist/getMachineId-win-RTYbWBWk.mjs +0 -26
|
@@ -377,7 +377,7 @@ const constVoid = constUndefined;
|
|
|
377
377
|
* @category combinators
|
|
378
378
|
* @since 2.0.0
|
|
379
379
|
*/
|
|
380
|
-
const compose = /*#__PURE__*/ dual(2, (ab, bc) => (a) => bc(ab(a)));
|
|
380
|
+
const compose$1 = /*#__PURE__*/ dual(2, (ab, bc) => (a) => bc(ab(a)));
|
|
381
381
|
function pipe(a, ...args) {
|
|
382
382
|
return pipeArguments(a, args);
|
|
383
383
|
}
|
|
@@ -1200,6 +1200,36 @@ function isError(input) {
|
|
|
1200
1200
|
function isIterable(input) {
|
|
1201
1201
|
return hasProperty(input, Symbol.iterator) || isString$2(input);
|
|
1202
1202
|
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Creates a predicate that returns `true` if either predicate is `true`.
|
|
1205
|
+
*
|
|
1206
|
+
* **When to use**
|
|
1207
|
+
*
|
|
1208
|
+
* Use when you want to combine `Predicate`s with OR, accepting values that
|
|
1209
|
+
* satisfy at least one condition, including refinements that narrow to a union.
|
|
1210
|
+
*
|
|
1211
|
+
* **Details**
|
|
1212
|
+
*
|
|
1213
|
+
* Evaluation short-circuits on the first `true`. For refinements, the output
|
|
1214
|
+
* type is a union.
|
|
1215
|
+
*
|
|
1216
|
+
* **Example** (Checking either condition)
|
|
1217
|
+
*
|
|
1218
|
+
* ```ts import.meta.vitest
|
|
1219
|
+
* import { Predicate } from "effect"
|
|
1220
|
+
*
|
|
1221
|
+
* const isStringOrNumber = Predicate.or(Predicate.isString, Predicate.isNumber)
|
|
1222
|
+
*
|
|
1223
|
+
* isStringOrNumber("a") // => true
|
|
1224
|
+
* ```
|
|
1225
|
+
*
|
|
1226
|
+
* @see {@link and}
|
|
1227
|
+
* @see {@link xor}
|
|
1228
|
+
* @stability stable
|
|
1229
|
+
* @category combinators
|
|
1230
|
+
* @since 2.0.0
|
|
1231
|
+
*/
|
|
1232
|
+
const or = /*#__PURE__*/ dual(2, (self, that) => (a) => self(a) || that(a));
|
|
1203
1233
|
//#endregion
|
|
1204
1234
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Hash.js
|
|
1205
1235
|
/**
|
|
@@ -2558,7 +2588,7 @@ const internalCall = /*#__PURE__*/ pickInternalCall();
|
|
|
2558
2588
|
//#endregion
|
|
2559
2589
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/record.js
|
|
2560
2590
|
/** @internal */
|
|
2561
|
-
function assignProperty
|
|
2591
|
+
function assignProperty(self, key, value) {
|
|
2562
2592
|
if (key === "__proto__") Object.defineProperty(self, key, {
|
|
2563
2593
|
value,
|
|
2564
2594
|
writable: true,
|
|
@@ -2569,7 +2599,7 @@ function assignProperty$1(self, key, value) {
|
|
|
2569
2599
|
}
|
|
2570
2600
|
/** @internal */
|
|
2571
2601
|
function assignProperties(self, source) {
|
|
2572
|
-
for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty
|
|
2602
|
+
for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
|
|
2573
2603
|
}
|
|
2574
2604
|
//#endregion
|
|
2575
2605
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/core.js
|
|
@@ -2625,7 +2655,7 @@ const EffectProto = {
|
|
|
2625
2655
|
return {
|
|
2626
2656
|
_id: "Effect",
|
|
2627
2657
|
op: this[identifier],
|
|
2628
|
-
...args in this ? { args: this[args] } : void 0
|
|
2658
|
+
..."~effect/Effect/args" in this ? { args: this[args] } : void 0
|
|
2629
2659
|
};
|
|
2630
2660
|
}
|
|
2631
2661
|
};
|
|
@@ -2810,7 +2840,7 @@ function defaultEvaluate(_fiber) {
|
|
|
2810
2840
|
const makePrimitiveProto = (options) => ({
|
|
2811
2841
|
...EffectProto,
|
|
2812
2842
|
[identifier]: options.op,
|
|
2813
|
-
[evaluate]: options[evaluate] ?? defaultEvaluate,
|
|
2843
|
+
[evaluate]: options["~effect/Effect/evaluate"] ?? defaultEvaluate,
|
|
2814
2844
|
[contA]: options[contA],
|
|
2815
2845
|
[contE]: options[contE],
|
|
2816
2846
|
[contAll]: options[contAll]
|
|
@@ -2846,7 +2876,7 @@ const makeExit = (options) => {
|
|
|
2846
2876
|
};
|
|
2847
2877
|
},
|
|
2848
2878
|
[symbol$1](that) {
|
|
2849
|
-
return isExit$1(that) && that._tag === this._tag && equals$1(this[args], that[args]);
|
|
2879
|
+
return isExit$1(that) && that._tag === this._tag && equals$1(this["~effect/Effect/args"], that["~effect/Effect/args"]);
|
|
2850
2880
|
},
|
|
2851
2881
|
[symbol$2]() {
|
|
2852
2882
|
return combine$2(string$1(options.op), hash(this[args]));
|
|
@@ -3776,7 +3806,7 @@ const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1
|
|
|
3776
3806
|
* @category comparisons
|
|
3777
3807
|
* @since 2.0.0
|
|
3778
3808
|
*/
|
|
3779
|
-
const max$
|
|
3809
|
+
const max$2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
|
|
3780
3810
|
//#endregion
|
|
3781
3811
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Option.js
|
|
3782
3812
|
/**
|
|
@@ -4436,7 +4466,7 @@ const all$4 = (input) => {
|
|
|
4436
4466
|
for (const key of Object.keys(input)) {
|
|
4437
4467
|
const o = input[key];
|
|
4438
4468
|
if (isNone(o)) return none();
|
|
4439
|
-
assignProperty
|
|
4469
|
+
assignProperty(out, key, o.value);
|
|
4440
4470
|
}
|
|
4441
4471
|
return some$1(out);
|
|
4442
4472
|
};
|
|
@@ -4722,7 +4752,7 @@ const ServiceProto = {
|
|
|
4722
4752
|
.../*#__PURE__*/ Prototype({
|
|
4723
4753
|
label: "Service",
|
|
4724
4754
|
evaluate(fiber) {
|
|
4725
|
-
return exitSucceed(get$
|
|
4755
|
+
return exitSucceed(get$5(fiber.context, this));
|
|
4726
4756
|
}
|
|
4727
4757
|
}),
|
|
4728
4758
|
toJSON() {
|
|
@@ -4738,10 +4768,10 @@ const ServiceProto = {
|
|
|
4738
4768
|
return make$39(this, self);
|
|
4739
4769
|
},
|
|
4740
4770
|
use(f) {
|
|
4741
|
-
return withFiber$1((fiber) => f(get$
|
|
4771
|
+
return withFiber$1((fiber) => f(get$5(fiber.context, this)));
|
|
4742
4772
|
},
|
|
4743
4773
|
useSync(f) {
|
|
4744
|
-
return withFiber$1((fiber) => exitSucceed(f(get$
|
|
4774
|
+
return withFiber$1((fiber) => exitSucceed(f(get$5(fiber.context, this))));
|
|
4745
4775
|
}
|
|
4746
4776
|
};
|
|
4747
4777
|
const cacheKeys = /*#__PURE__*/ new Set();
|
|
@@ -4919,7 +4949,7 @@ const isReference = (u) => !!u[ReferenceTypeId];
|
|
|
4919
4949
|
* @category constructors
|
|
4920
4950
|
* @since 2.0.0
|
|
4921
4951
|
*/
|
|
4922
|
-
const empty$
|
|
4952
|
+
const empty$8 = () => emptyContext;
|
|
4923
4953
|
const emptyContext = /*#__PURE__*/ makeUnsafe$6(/*#__PURE__*/ new Map());
|
|
4924
4954
|
/**
|
|
4925
4955
|
* Creates a new `Context` with a single service associated to the key.
|
|
@@ -5102,7 +5132,7 @@ const getUnsafe$1 = /*#__PURE__*/ dual(2, (self, service) => {
|
|
|
5102
5132
|
* @category getters
|
|
5103
5133
|
* @since 2.0.0
|
|
5104
5134
|
*/
|
|
5105
|
-
const get$
|
|
5135
|
+
const get$5 = getUnsafe$1;
|
|
5106
5136
|
const defaultValueCacheKey = "~effect/Context/defaultValue";
|
|
5107
5137
|
const getDefaultValue = (ref) => {
|
|
5108
5138
|
if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
|
|
@@ -5959,6 +5989,60 @@ const Equivalence$2 = (self, that) => matchPair(self, that, {
|
|
|
5959
5989
|
*/
|
|
5960
5990
|
const min$1 = /*#__PURE__*/ min$2(Order$2);
|
|
5961
5991
|
/**
|
|
5992
|
+
* Returns the larger of two Durations.
|
|
5993
|
+
*
|
|
5994
|
+
* **Example** (Selecting the longer duration)
|
|
5995
|
+
*
|
|
5996
|
+
* ```ts import.meta.vitest
|
|
5997
|
+
* import { Duration } from "effect"
|
|
5998
|
+
*
|
|
5999
|
+
* Duration.max(Duration.seconds(5), Duration.seconds(3)) // => Duration.seconds(5)
|
|
6000
|
+
* ```
|
|
6001
|
+
*
|
|
6002
|
+
* @stability stable
|
|
6003
|
+
* @category ordering
|
|
6004
|
+
* @since 2.0.0
|
|
6005
|
+
*/
|
|
6006
|
+
const max$1 = /*#__PURE__*/ max$2(Order$2);
|
|
6007
|
+
/**
|
|
6008
|
+
* Adds two Durations together.
|
|
6009
|
+
*
|
|
6010
|
+
* **Details**
|
|
6011
|
+
*
|
|
6012
|
+
* Infinity addition follows these rules:
|
|
6013
|
+
*
|
|
6014
|
+
* - infinity + infinity = infinity
|
|
6015
|
+
* - infinity + negativeInfinity = zero
|
|
6016
|
+
* - infinity + finite = infinity
|
|
6017
|
+
* - negativeInfinity + negativeInfinity = negativeInfinity
|
|
6018
|
+
* - negativeInfinity + finite = negativeInfinity
|
|
6019
|
+
*
|
|
6020
|
+
* **Example** (Adding durations)
|
|
6021
|
+
*
|
|
6022
|
+
* ```ts import.meta.vitest
|
|
6023
|
+
* import { Duration } from "effect"
|
|
6024
|
+
*
|
|
6025
|
+
* Duration.sum(Duration.seconds(5), Duration.seconds(3)) // => Duration.seconds(8)
|
|
6026
|
+
* ```
|
|
6027
|
+
*
|
|
6028
|
+
* @stability stable
|
|
6029
|
+
* @category math
|
|
6030
|
+
* @since 2.0.0
|
|
6031
|
+
*/
|
|
6032
|
+
const sum = /*#__PURE__*/ dual(2, (self, that) => matchPair(self, that, {
|
|
6033
|
+
onMillis: (self, that) => make$38(self + that),
|
|
6034
|
+
onNanos: (self, that) => make$38(self + that),
|
|
6035
|
+
onInfinity: (self, that) => {
|
|
6036
|
+
const s = self.value._tag;
|
|
6037
|
+
const t = that.value._tag;
|
|
6038
|
+
if (s === "Infinity" && t === "NegativeInfinity") return zero$2;
|
|
6039
|
+
if (s === "NegativeInfinity" && t === "Infinity") return zero$2;
|
|
6040
|
+
if (s === "Infinity" || t === "Infinity") return infinity;
|
|
6041
|
+
if (s === "NegativeInfinity" || t === "NegativeInfinity") return negativeInfinity;
|
|
6042
|
+
return zero$2;
|
|
6043
|
+
}
|
|
6044
|
+
}));
|
|
6045
|
+
/**
|
|
5962
6046
|
* Checks whether two Durations are equal.
|
|
5963
6047
|
*
|
|
5964
6048
|
* **Example** (Checking duration equality)
|
|
@@ -6505,7 +6589,7 @@ const all$3 = (input) => {
|
|
|
6505
6589
|
for (const key of Object.keys(input)) {
|
|
6506
6590
|
const e = input[key];
|
|
6507
6591
|
if (isFailure$1(e)) return e;
|
|
6508
|
-
assignProperty
|
|
6592
|
+
assignProperty(out, key, e.success);
|
|
6509
6593
|
}
|
|
6510
6594
|
return succeed$8(out);
|
|
6511
6595
|
};
|
|
@@ -6695,7 +6779,7 @@ const constEmptyIterator = { next() {
|
|
|
6695
6779
|
* @category constructors
|
|
6696
6780
|
* @since 2.0.0
|
|
6697
6781
|
*/
|
|
6698
|
-
const empty$
|
|
6782
|
+
const empty$7 = () => constEmpty;
|
|
6699
6783
|
//#endregion
|
|
6700
6784
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Record.js
|
|
6701
6785
|
/**
|
|
@@ -6754,25 +6838,6 @@ const toEntries = /*#__PURE__*/ (/* @__PURE__ */ dual(2, (self, f) => {
|
|
|
6754
6838
|
*/
|
|
6755
6839
|
const has$3 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
6756
6840
|
/**
|
|
6757
|
-
* Retrieves a value at a particular key from a record safely, returning it wrapped in an `Option`.
|
|
6758
|
-
*
|
|
6759
|
-
* **Example** (Getting a value as an Option)
|
|
6760
|
-
*
|
|
6761
|
-
* ```ts import.meta.vitest
|
|
6762
|
-
* import { Option, Record as R } from "effect"
|
|
6763
|
-
*
|
|
6764
|
-
* const person: Record<string, unknown> = { name: "John Doe", age: 35 }
|
|
6765
|
-
*
|
|
6766
|
-
* R.get(person, "name") // => Option.some("John Doe")
|
|
6767
|
-
* R.get(person, "email") // => Option.none()
|
|
6768
|
-
* ```
|
|
6769
|
-
*
|
|
6770
|
-
* @stability stable
|
|
6771
|
-
* @category getters
|
|
6772
|
-
* @since 2.0.0
|
|
6773
|
-
*/
|
|
6774
|
-
const get$5 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some$1(self[key]) : none());
|
|
6775
|
-
/**
|
|
6776
6841
|
* Maps a record into another record by applying a transformation function to each of its values.
|
|
6777
6842
|
*
|
|
6778
6843
|
* **Example** (Mapping record values)
|
|
@@ -6795,7 +6860,7 @@ const get$5 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? so
|
|
|
6795
6860
|
*/
|
|
6796
6861
|
const map$7 = /*#__PURE__*/ dual(2, (self, f) => {
|
|
6797
6862
|
const out = { ...self };
|
|
6798
|
-
for (const key of keys$1(self)) assignProperty
|
|
6863
|
+
for (const key of keys$1(self)) assignProperty(out, key, f(self[key], key));
|
|
6799
6864
|
return out;
|
|
6800
6865
|
});
|
|
6801
6866
|
/**
|
|
@@ -6815,43 +6880,6 @@ const map$7 = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
6815
6880
|
*/
|
|
6816
6881
|
const keys$1 = (self) => Object.keys(self);
|
|
6817
6882
|
/**
|
|
6818
|
-
* Mutates a record by assigning a value to a property.
|
|
6819
|
-
*
|
|
6820
|
-
* **When to use**
|
|
6821
|
-
*
|
|
6822
|
-
* Use when incrementally constructing a new record and copying it for every
|
|
6823
|
-
* property would be unnecessary.
|
|
6824
|
-
*
|
|
6825
|
-
* **Gotchas**
|
|
6826
|
-
*
|
|
6827
|
-
* This function mutates `self`. When `key` is `"__proto__"`, it creates an
|
|
6828
|
-
* own data property instead of changing the object's prototype.
|
|
6829
|
-
*
|
|
6830
|
-
* **Example** (Assigning an external key safely)
|
|
6831
|
-
*
|
|
6832
|
-
* ```ts import.meta.vitest
|
|
6833
|
-
* import { Record } from "effect"
|
|
6834
|
-
*
|
|
6835
|
-
* const key: string = "__proto__" // Assume this comes from external input
|
|
6836
|
-
* const value = { polluted: true }
|
|
6837
|
-
*
|
|
6838
|
-
* const unsafe: Record<string, unknown> = {}
|
|
6839
|
-
* unsafe[key] = value
|
|
6840
|
-
* Object.getPrototypeOf(unsafe) === value // => true
|
|
6841
|
-
*
|
|
6842
|
-
* const safe: Record<string, unknown> = {}
|
|
6843
|
-
* Record.assignProperty(safe, key, value)
|
|
6844
|
-
* Object.getPrototypeOf(safe) === Object.prototype // => true
|
|
6845
|
-
* safe[key] === value // => true
|
|
6846
|
-
* ```
|
|
6847
|
-
*
|
|
6848
|
-
* @see {@link set} for an immutable update
|
|
6849
|
-
* @stability stable
|
|
6850
|
-
* @category mutations
|
|
6851
|
-
* @since 4.0.0
|
|
6852
|
-
*/
|
|
6853
|
-
const assignProperty = assignProperty$1;
|
|
6854
|
-
/**
|
|
6855
6883
|
* Checks whether all the keys and values in one record are also found in another record.
|
|
6856
6884
|
* Uses the provided equivalence function to compare values.
|
|
6857
6885
|
*
|
|
@@ -7770,7 +7798,7 @@ const groupBy = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
7770
7798
|
for (const a of self) {
|
|
7771
7799
|
const k = f(a);
|
|
7772
7800
|
if (Object.hasOwn(out, k)) out[k].push(a);
|
|
7773
|
-
else assignProperty
|
|
7801
|
+
else assignProperty(out, k, [a]);
|
|
7774
7802
|
}
|
|
7775
7803
|
return out;
|
|
7776
7804
|
});
|
|
@@ -7807,7 +7835,7 @@ const hashBucketsAdd = (buckets, value) => {
|
|
|
7807
7835
|
* @category constructors
|
|
7808
7836
|
* @since 2.0.0
|
|
7809
7837
|
*/
|
|
7810
|
-
const empty$
|
|
7838
|
+
const empty$6 = () => [];
|
|
7811
7839
|
/**
|
|
7812
7840
|
* Wraps a single value in a `NonEmptyArray`.
|
|
7813
7841
|
*
|
|
@@ -8927,7 +8955,7 @@ const externalSpan = (options) => ({
|
|
|
8927
8955
|
spanId: options.spanId,
|
|
8928
8956
|
traceId: options.traceId,
|
|
8929
8957
|
sampled: options.sampled ?? true,
|
|
8930
|
-
annotations: options.annotations ?? empty$
|
|
8958
|
+
annotations: options.annotations ?? empty$8()
|
|
8931
8959
|
});
|
|
8932
8960
|
/**
|
|
8933
8961
|
* Context reference for disabling trace propagation.
|
|
@@ -9464,7 +9492,7 @@ var FiberImpl = class {
|
|
|
9464
9492
|
return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
|
|
9465
9493
|
}
|
|
9466
9494
|
getRef(ref) {
|
|
9467
|
-
return get$
|
|
9495
|
+
return get$5(this.context, ref);
|
|
9468
9496
|
}
|
|
9469
9497
|
addObserver(cb) {
|
|
9470
9498
|
if (this._exit) {
|
|
@@ -9525,7 +9553,7 @@ var FiberImpl = class {
|
|
|
9525
9553
|
}
|
|
9526
9554
|
this._stack.length = 0;
|
|
9527
9555
|
this._children = void 0;
|
|
9528
|
-
this.context = empty$
|
|
9556
|
+
this.context = empty$8();
|
|
9529
9557
|
}
|
|
9530
9558
|
runLoop(effect) {
|
|
9531
9559
|
const prevFiber = globalThis[currentFiberTypeId];
|
|
@@ -9551,7 +9579,7 @@ var FiberImpl = class {
|
|
|
9551
9579
|
current = cache.tracerContext ? cache.tracerContext(current, this) : current[evaluate](this);
|
|
9552
9580
|
if (current === Yield) {
|
|
9553
9581
|
const yielded = this._yielded;
|
|
9554
|
-
if (
|
|
9582
|
+
if ("~effect/Exit" in yielded) {
|
|
9555
9583
|
this._deferredInterrupt = false;
|
|
9556
9584
|
this._yielded = void 0;
|
|
9557
9585
|
return yielded;
|
|
@@ -9563,7 +9591,7 @@ var FiberImpl = class {
|
|
|
9563
9591
|
return Yield;
|
|
9564
9592
|
}
|
|
9565
9593
|
} catch (error) {
|
|
9566
|
-
if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
|
|
9594
|
+
if (!hasProperty(current, "~effect/Effect/evaluate")) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
|
|
9567
9595
|
current = exitDie(error);
|
|
9568
9596
|
}
|
|
9569
9597
|
} finally {
|
|
@@ -9622,17 +9650,17 @@ var FiberImpl = class {
|
|
|
9622
9650
|
const makeFiberContextCache = (context) => {
|
|
9623
9651
|
const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
|
|
9624
9652
|
return {
|
|
9625
|
-
scheduler: get$
|
|
9653
|
+
scheduler: get$5(context, Scheduler),
|
|
9626
9654
|
tracer: currentTracer,
|
|
9627
9655
|
tracerContext: currentTracer ? currentTracer["context"] : void 0,
|
|
9628
|
-
tracerEnabled: get$
|
|
9656
|
+
tracerEnabled: get$5(context, TracerEnabled),
|
|
9629
9657
|
span: getOrUndefinedUnsafe(context, ParentSpanKey),
|
|
9630
|
-
logLevel: get$
|
|
9631
|
-
minimumLogLevel: get$
|
|
9632
|
-
stackFrame: get$
|
|
9658
|
+
logLevel: get$5(context, CurrentLogLevel),
|
|
9659
|
+
minimumLogLevel: get$5(context, MinimumLogLevel$1),
|
|
9660
|
+
stackFrame: get$5(context, CurrentStackFrame),
|
|
9633
9661
|
runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
|
|
9634
|
-
maxOpsBeforeYield: get$
|
|
9635
|
-
preventYield: get$
|
|
9662
|
+
maxOpsBeforeYield: get$5(context, MaxOpsBeforeYield),
|
|
9663
|
+
preventYield: get$5(context, PreventSchedulerYield)
|
|
9636
9664
|
};
|
|
9637
9665
|
};
|
|
9638
9666
|
const deferredInterruptCont = {
|
|
@@ -9709,7 +9737,7 @@ const fiberInterruptAs = /*#__PURE__*/ dual((args) => hasProperty(args[0], Fiber
|
|
|
9709
9737
|
/** @internal */
|
|
9710
9738
|
const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
|
|
9711
9739
|
const annotations = fiberStackAnnotations(parent);
|
|
9712
|
-
let fiberArr = empty$
|
|
9740
|
+
let fiberArr = empty$6();
|
|
9713
9741
|
for (const fiber of fibers) {
|
|
9714
9742
|
fiber.interruptUnsafe(parent.id, annotations);
|
|
9715
9743
|
fiberArr.push(fiber);
|
|
@@ -9719,7 +9747,7 @@ const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
|
|
|
9719
9747
|
/** @internal */
|
|
9720
9748
|
const fiberInterruptAllAs = /*#__PURE__*/ dual(2, (fibers, fiberId) => withFiber$1((parent) => {
|
|
9721
9749
|
const annotations = fiberStackAnnotations(parent);
|
|
9722
|
-
const fiberArr = empty$
|
|
9750
|
+
const fiberArr = empty$6();
|
|
9723
9751
|
for (const fiber of fibers) {
|
|
9724
9752
|
fiber.interruptUnsafe(fiberId, annotations);
|
|
9725
9753
|
fiberArr.push(fiber);
|
|
@@ -9763,7 +9791,7 @@ const yieldNow$1 = /*#__PURE__*/ (/* @__PURE__ */ makePrimitive({
|
|
|
9763
9791
|
fiber.currentDispatcher.scheduleTask(() => {
|
|
9764
9792
|
if (resumed) return;
|
|
9765
9793
|
fiber.evaluate(exitVoid);
|
|
9766
|
-
}, this[args] ?? 0);
|
|
9794
|
+
}, this["~effect/Effect/args"] ?? 0);
|
|
9767
9795
|
return fiber.yieldWith(() => {
|
|
9768
9796
|
resumed = true;
|
|
9769
9797
|
});
|
|
@@ -10159,8 +10187,6 @@ const exitAsVoidAll = (exits) => {
|
|
|
10159
10187
|
return failures.length === 0 ? exitVoid : exitFailCause(causeFromReasons(failures));
|
|
10160
10188
|
};
|
|
10161
10189
|
/** @internal */
|
|
10162
|
-
const service$1 = (service) => service;
|
|
10163
|
-
/** @internal */
|
|
10164
10190
|
const serviceOption$1 = (service) => withFiber$1((fiber) => succeed$7(getOption(fiber.context, service)));
|
|
10165
10191
|
/** @internal */
|
|
10166
10192
|
const updateContext$1 = /*#__PURE__*/ dual(2, (self, f) => withFiber$1((fiber) => {
|
|
@@ -10721,7 +10747,7 @@ const all$2 = (arg, options) => {
|
|
|
10721
10747
|
return suspend$3(() => {
|
|
10722
10748
|
const out = {};
|
|
10723
10749
|
return as$1(forEach$2(Object.entries(arg), ([key, effect]) => map$5(options?.mode === "result" ? result$1(effect) : effect, (value) => {
|
|
10724
|
-
assignProperty
|
|
10750
|
+
assignProperty(out, key, value);
|
|
10725
10751
|
}), {
|
|
10726
10752
|
discard: true,
|
|
10727
10753
|
concurrency: options?.concurrency
|
|
@@ -10733,14 +10759,14 @@ const whileLoop$1 = /*#__PURE__*/ makePrimitive({
|
|
|
10733
10759
|
op: "While",
|
|
10734
10760
|
[contA](value, fiber) {
|
|
10735
10761
|
this[args].step(value);
|
|
10736
|
-
if (this[args].while()) {
|
|
10762
|
+
if (this["~effect/Effect/args"].while()) {
|
|
10737
10763
|
fiber._stack.push(this);
|
|
10738
10764
|
return this[args].body();
|
|
10739
10765
|
}
|
|
10740
10766
|
return exitVoid;
|
|
10741
10767
|
},
|
|
10742
10768
|
[evaluate](fiber) {
|
|
10743
|
-
if (this[args].while()) {
|
|
10769
|
+
if (this["~effect/Effect/args"].while()) {
|
|
10744
10770
|
fiber._stack.push(this);
|
|
10745
10771
|
return this[args].body();
|
|
10746
10772
|
}
|
|
@@ -10973,7 +10999,7 @@ const fiberRunIn = /*#__PURE__*/ dual(2, (self, scope) => {
|
|
|
10973
10999
|
return self;
|
|
10974
11000
|
});
|
|
10975
11001
|
/** @internal */
|
|
10976
|
-
const runFork$1 = /*#__PURE__*/ runForkWith$1(/*#__PURE__*/ empty$
|
|
11002
|
+
const runFork$1 = /*#__PURE__*/ runForkWith$1(/*#__PURE__*/ empty$8());
|
|
10977
11003
|
/** @internal */
|
|
10978
11004
|
const runPromiseExitWith = (context) => {
|
|
10979
11005
|
const runFork = runForkWith$1(context);
|
|
@@ -10993,7 +11019,7 @@ const runPromiseWith = (context) => {
|
|
|
10993
11019
|
});
|
|
10994
11020
|
};
|
|
10995
11021
|
/** @internal */
|
|
10996
|
-
const runPromise$1 = /*#__PURE__*/ runPromiseWith(/*#__PURE__*/ empty$
|
|
11022
|
+
const runPromise$1 = /*#__PURE__*/ runPromiseWith(/*#__PURE__*/ empty$8());
|
|
10997
11023
|
/** @internal */
|
|
10998
11024
|
const runSyncExitWith = (context) => {
|
|
10999
11025
|
const runFork = runForkWith$1(context);
|
|
@@ -11006,7 +11032,7 @@ const runSyncExitWith = (context) => {
|
|
|
11006
11032
|
};
|
|
11007
11033
|
};
|
|
11008
11034
|
/** @internal */
|
|
11009
|
-
const runSyncExit$1 = /*#__PURE__*/ runSyncExitWith(/*#__PURE__*/ empty$
|
|
11035
|
+
const runSyncExit$1 = /*#__PURE__*/ runSyncExitWith(/*#__PURE__*/ empty$8());
|
|
11010
11036
|
/** @internal */
|
|
11011
11037
|
const runSyncWith = (context) => {
|
|
11012
11038
|
const runSyncExit = runSyncExitWith(context);
|
|
@@ -11017,7 +11043,7 @@ const runSyncWith = (context) => {
|
|
|
11017
11043
|
};
|
|
11018
11044
|
};
|
|
11019
11045
|
/** @internal */
|
|
11020
|
-
const runSync$2 = /*#__PURE__*/ runSyncWith(/*#__PURE__*/ empty$
|
|
11046
|
+
const runSync$2 = /*#__PURE__*/ runSyncWith(/*#__PURE__*/ empty$8());
|
|
11021
11047
|
const succeedTrue = /*#__PURE__*/ succeed$7(true);
|
|
11022
11048
|
const succeedFalse = /*#__PURE__*/ succeed$7(false);
|
|
11023
11049
|
var Latch = class {
|
|
@@ -11087,6 +11113,8 @@ var Latch = class {
|
|
|
11087
11113
|
const makeLatchUnsafe = (open) => new Latch(open ?? false);
|
|
11088
11114
|
/** @internal */
|
|
11089
11115
|
const makeLatch = (open) => sync$2(() => makeLatchUnsafe(open));
|
|
11116
|
+
/** @internal */
|
|
11117
|
+
const withTracerEnabled$1 = /*#__PURE__*/ provideService$3(TracerEnabled);
|
|
11090
11118
|
const bigint0$2 = /*#__PURE__*/ BigInt(0);
|
|
11091
11119
|
const NoopSpanProto = {
|
|
11092
11120
|
_tag: "Span",
|
|
@@ -11111,17 +11139,17 @@ const NoopSpanProto = {
|
|
|
11111
11139
|
const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
11112
11140
|
const filterDisablePropagation = (span) => {
|
|
11113
11141
|
if (!span) return none();
|
|
11114
|
-
return get$
|
|
11142
|
+
return get$5(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some$1(span);
|
|
11115
11143
|
};
|
|
11116
11144
|
/** @internal */
|
|
11117
11145
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
11118
|
-
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$
|
|
11146
|
+
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$5(options.annotations, DisablePropagation);
|
|
11119
11147
|
const parent = options?.parent !== void 0 ? some$1(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
|
|
11120
11148
|
let span;
|
|
11121
11149
|
if (disablePropagation) span = noopSpan({
|
|
11122
11150
|
name,
|
|
11123
11151
|
parent,
|
|
11124
|
-
annotations: add(options?.annotations ?? empty$
|
|
11152
|
+
annotations: add(options?.annotations ?? empty$8(), DisablePropagation, true)
|
|
11125
11153
|
});
|
|
11126
11154
|
else {
|
|
11127
11155
|
const tracer = fiber.cache.tracer ?? nativeTracer;
|
|
@@ -11134,7 +11162,7 @@ const makeSpanUnsafe = (fiber, name, options) => {
|
|
|
11134
11162
|
span = tracer.span({
|
|
11135
11163
|
name,
|
|
11136
11164
|
parent,
|
|
11137
|
-
annotations: options?.annotations ?? empty$
|
|
11165
|
+
annotations: options?.annotations ?? empty$8(),
|
|
11138
11166
|
links,
|
|
11139
11167
|
startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$2,
|
|
11140
11168
|
kind: options?.kind ?? "internal",
|
|
@@ -11279,6 +11307,8 @@ const currentTimeMillis$1 = /*#__PURE__*/ clockWith$1((clock) => clock.currentTi
|
|
|
11279
11307
|
/** @internal */
|
|
11280
11308
|
const TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
|
|
11281
11309
|
/** @internal */
|
|
11310
|
+
const isTimeoutError$1 = (u) => hasProperty(u, TimeoutErrorTypeId);
|
|
11311
|
+
/** @internal */
|
|
11282
11312
|
var TimeoutError = class extends (/*#__PURE__*/ TaggedError$2("TimeoutError")) {
|
|
11283
11313
|
[TimeoutErrorTypeId] = TimeoutErrorTypeId;
|
|
11284
11314
|
constructor(message) {
|
|
@@ -11434,7 +11464,7 @@ const tracerLogger = /*#__PURE__*/ loggerMake(({ cause, fiber, logLevel, message
|
|
|
11434
11464
|
const span = fiber.cache.span;
|
|
11435
11465
|
if (span === void 0 || span._tag === "ExternalSpan") return;
|
|
11436
11466
|
const attributes = {};
|
|
11437
|
-
for (const [key, value] of Object.entries(annotations)) assignProperty
|
|
11467
|
+
for (const [key, value] of Object.entries(annotations)) assignProperty(attributes, key, value);
|
|
11438
11468
|
attributes["effect.fiberId"] = fiber.id;
|
|
11439
11469
|
attributes["effect.logLevel"] = logLevel.toUpperCase();
|
|
11440
11470
|
if (cause.reasons.length > 0) attributes["effect.cause"] = causePretty(cause);
|
|
@@ -12983,31 +13013,6 @@ const succeed$5 = function() {
|
|
|
12983
13013
|
*/
|
|
12984
13014
|
const succeedContext = (context) => fromBuildUnsafe(constant(succeed$7(context)));
|
|
12985
13015
|
/**
|
|
12986
|
-
* An empty layer that provides no services, cannot fail, has no requirements,
|
|
12987
|
-
* and performs no construction or finalization work.
|
|
12988
|
-
*
|
|
12989
|
-
* **When to use**
|
|
12990
|
-
*
|
|
12991
|
-
* Use as the no-op branch when conditionally composing layers.
|
|
12992
|
-
*
|
|
12993
|
-
* **Example** (Disabling optional lifecycle work)
|
|
12994
|
-
*
|
|
12995
|
-
* ```ts import.meta.vitest
|
|
12996
|
-
* import { Context, Effect, Layer, Option } from "effect"
|
|
12997
|
-
*
|
|
12998
|
-
* const Service = Context.Service<string>("Service")
|
|
12999
|
-
* const context = Effect.runSync(Effect.scoped(Layer.build(Layer.empty)))
|
|
13000
|
-
* Context.getOption(context, Service) // => Option.none()
|
|
13001
|
-
* ```
|
|
13002
|
-
*
|
|
13003
|
-
* @see {@link effectDiscard} for running an effect while providing no services
|
|
13004
|
-
*
|
|
13005
|
-
* @stability stable
|
|
13006
|
-
* @category constructors
|
|
13007
|
-
* @since 2.0.0
|
|
13008
|
-
*/
|
|
13009
|
-
const empty$7 = /*#__PURE__*/ succeedContext(/*#__PURE__*/ empty$10());
|
|
13010
|
-
/**
|
|
13011
13016
|
* Constructs a layer lazily that provides a single service.
|
|
13012
13017
|
*
|
|
13013
13018
|
* **When to use**
|
|
@@ -13199,7 +13204,7 @@ const effectContext = (effect) => fromBuildMemo((_, scope) => provide$3(effect,
|
|
|
13199
13204
|
* @category constructors
|
|
13200
13205
|
* @since 2.0.0
|
|
13201
13206
|
*/
|
|
13202
|
-
const effectDiscard = (effect) => effectContext(as$1(effect, empty$
|
|
13207
|
+
const effectDiscard = (effect) => effectContext(as$1(effect, empty$8()));
|
|
13203
13208
|
const unwrapKey = /*#__PURE__*/ Service("effect/Layer/unwrap");
|
|
13204
13209
|
/**
|
|
13205
13210
|
* Unwraps a `Layer` from an `Effect`, flattening the nested structure.
|
|
@@ -13236,7 +13241,7 @@ const unwrapKey = /*#__PURE__*/ Service("effect/Layer/unwrap");
|
|
|
13236
13241
|
* @category converting
|
|
13237
13242
|
* @since 4.0.0
|
|
13238
13243
|
*/
|
|
13239
|
-
const unwrap$5 = (self) => flatMap$3(effect(unwrapKey)(self), get$
|
|
13244
|
+
const unwrap$5 = (self) => flatMap$3(effect(unwrapKey)(self), get$5(unwrapKey));
|
|
13240
13245
|
const mergeAllEffect = (layers, memoMap, scope) => {
|
|
13241
13246
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
13242
13247
|
return forEach$2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$5((context) => mergeAll$3(...context)));
|
|
@@ -14274,6 +14279,23 @@ const Done = Done$1;
|
|
|
14274
14279
|
*/
|
|
14275
14280
|
const done = done$2;
|
|
14276
14281
|
/**
|
|
14282
|
+
* Checks whether an arbitrary value is a `TimeoutError`.
|
|
14283
|
+
*
|
|
14284
|
+
* **Example** (Checking the runtime type)
|
|
14285
|
+
*
|
|
14286
|
+
* ```ts import.meta.vitest
|
|
14287
|
+
* import { Cause } from "effect"
|
|
14288
|
+
*
|
|
14289
|
+
* Cause.isTimeoutError(new Cause.TimeoutError()) // => true
|
|
14290
|
+
* Cause.isTimeoutError("nope") // => false
|
|
14291
|
+
* ```
|
|
14292
|
+
*
|
|
14293
|
+
* @stability stable
|
|
14294
|
+
* @category guards
|
|
14295
|
+
* @since 4.0.0
|
|
14296
|
+
*/
|
|
14297
|
+
const isTimeoutError = isTimeoutError$1;
|
|
14298
|
+
/**
|
|
14277
14299
|
* Constructs an `IllegalArgumentError` with an optional message.
|
|
14278
14300
|
*
|
|
14279
14301
|
* **Example** (Creating an IllegalArgumentError)
|
|
@@ -14865,7 +14887,7 @@ const Number$4 = globalThis.Number;
|
|
|
14865
14887
|
* @category math
|
|
14866
14888
|
* @since 2.0.0
|
|
14867
14889
|
*/
|
|
14868
|
-
const max = /*#__PURE__*/ max$
|
|
14890
|
+
const max = /*#__PURE__*/ max$2(Number$5);
|
|
14869
14891
|
/**
|
|
14870
14892
|
* Parses a `number` from a `string` safely using the `Number()` function.
|
|
14871
14893
|
* The following special string values are supported: "NaN", "Infinity", "-Infinity".
|
|
@@ -15664,6 +15686,32 @@ const toStepWithMetadata = (schedule) => clockWith$1((clock) => map$5(toStep(sch
|
|
|
15664
15686
|
});
|
|
15665
15687
|
}));
|
|
15666
15688
|
/**
|
|
15689
|
+
* Returns a new `Schedule` that adds the delay computed by the specified
|
|
15690
|
+
* effectful function to the next recurrence of the schedule.
|
|
15691
|
+
*
|
|
15692
|
+
* **Example** (Adding extra delay to a schedule)
|
|
15693
|
+
*
|
|
15694
|
+
* ```ts import.meta.vitest
|
|
15695
|
+
* import { Duration, Effect, Schedule } from "effect"
|
|
15696
|
+
*
|
|
15697
|
+
* const schedule = Schedule.recurs(1).pipe(
|
|
15698
|
+
* Schedule.addDelay(() => Effect.succeed("25 millis"))
|
|
15699
|
+
* )
|
|
15700
|
+
* const program = Effect.gen(function*() {
|
|
15701
|
+
* const step = yield* Schedule.toStep(schedule)
|
|
15702
|
+
* const [, delay] = yield* step(0, undefined)
|
|
15703
|
+
* return delay
|
|
15704
|
+
* })
|
|
15705
|
+
*
|
|
15706
|
+
* await Effect.runPromise(program) // => Duration.millis(25)
|
|
15707
|
+
* ```
|
|
15708
|
+
*
|
|
15709
|
+
* @stability stable
|
|
15710
|
+
* @category delays & timeouts
|
|
15711
|
+
* @since 2.0.0
|
|
15712
|
+
*/
|
|
15713
|
+
const addDelay = /*#__PURE__*/ dual(2, (self, f) => modifyDelay(self, (metadata) => map$5(f(metadata), (d) => sum(fromInputUnsafe$1(d), metadata.duration))));
|
|
15714
|
+
/**
|
|
15667
15715
|
* Combines schedules by recurring while at least one schedule wants to recur,
|
|
15668
15716
|
* using the minimum delay between recurrences and outputting that minimum delay.
|
|
15669
15717
|
*
|
|
@@ -15732,6 +15780,39 @@ const exponential = (base, factor = 2) => {
|
|
|
15732
15780
|
}));
|
|
15733
15781
|
};
|
|
15734
15782
|
/**
|
|
15783
|
+
* Returns a new `Schedule` that modifies the delay of the next recurrence
|
|
15784
|
+
* of the schedule using the specified effectful function.
|
|
15785
|
+
*
|
|
15786
|
+
* **Example** (Modifying delays from schedule metadata)
|
|
15787
|
+
*
|
|
15788
|
+
* ```ts import.meta.vitest
|
|
15789
|
+
* import { Duration, Effect, Schedule } from "effect"
|
|
15790
|
+
*
|
|
15791
|
+
* const schedule = Schedule.spaced("10 millis").pipe(
|
|
15792
|
+
* Schedule.modifyDelay(({ duration }) => Effect.succeed(Duration.times(duration, 2)))
|
|
15793
|
+
* )
|
|
15794
|
+
* const program = Effect.gen(function*() {
|
|
15795
|
+
* const step = yield* Schedule.toStep(schedule)
|
|
15796
|
+
* const [, delay] = yield* step(0, undefined)
|
|
15797
|
+
* return delay
|
|
15798
|
+
* })
|
|
15799
|
+
*
|
|
15800
|
+
* await Effect.runPromise(program) // => Duration.millis(20)
|
|
15801
|
+
* ```
|
|
15802
|
+
*
|
|
15803
|
+
* @stability stable
|
|
15804
|
+
* @category delays & timeouts
|
|
15805
|
+
* @since 2.0.0
|
|
15806
|
+
*/
|
|
15807
|
+
const modifyDelay = /*#__PURE__*/ dual(2, (self, f) => fromStep(map$5(toStep(self), (step) => {
|
|
15808
|
+
const meta = metadataFn();
|
|
15809
|
+
return (now, input) => flatMap$4(step(now, input), ([output, duration]) => map$5(f({
|
|
15810
|
+
...meta(now, input),
|
|
15811
|
+
output,
|
|
15812
|
+
duration
|
|
15813
|
+
}), (replacement) => [output, fromInputUnsafe$1(replacement)]));
|
|
15814
|
+
})));
|
|
15815
|
+
/**
|
|
15735
15816
|
* Returns a new `Schedule` that outputs the inputs of the specified schedule.
|
|
15736
15817
|
*
|
|
15737
15818
|
* **Example** (Passing inputs through as outputs)
|
|
@@ -18720,36 +18801,6 @@ const provide = provide$1;
|
|
|
18720
18801
|
*/
|
|
18721
18802
|
const provideContext$2 = provideContext$3;
|
|
18722
18803
|
/**
|
|
18723
|
-
* Accesses a service from the context.
|
|
18724
|
-
*
|
|
18725
|
-
* **Example** (Accessing a required service)
|
|
18726
|
-
*
|
|
18727
|
-
* ```ts import.meta.vitest
|
|
18728
|
-
* import { Context, Effect } from "effect"
|
|
18729
|
-
*
|
|
18730
|
-
* interface Database {
|
|
18731
|
-
* readonly query: (sql: string) => Effect.Effect<string>
|
|
18732
|
-
* }
|
|
18733
|
-
*
|
|
18734
|
-
* const Database = Context.Service<Database>("Database")
|
|
18735
|
-
*
|
|
18736
|
-
* const program = Effect.gen(function*() {
|
|
18737
|
-
* const db = yield* Effect.service(Database)
|
|
18738
|
-
* return yield* db.query("SELECT * FROM users")
|
|
18739
|
-
* })
|
|
18740
|
-
*
|
|
18741
|
-
* const runnable = Effect.provideService(program, Database, {
|
|
18742
|
-
* query: (sql) => Effect.succeed(`Result for: ${sql}`)
|
|
18743
|
-
* })
|
|
18744
|
-
* Effect.runSync(runnable) // => "Result for: SELECT * FROM users"
|
|
18745
|
-
* ```
|
|
18746
|
-
*
|
|
18747
|
-
* @stability stable
|
|
18748
|
-
* @category accessors
|
|
18749
|
-
* @since 4.0.0
|
|
18750
|
-
*/
|
|
18751
|
-
const service = service$1;
|
|
18752
|
-
/**
|
|
18753
18804
|
* Optionally accesses a service from the environment.
|
|
18754
18805
|
*
|
|
18755
18806
|
* **When to use**
|
|
@@ -19615,6 +19666,32 @@ const forever = forever$2;
|
|
|
19615
19666
|
*/
|
|
19616
19667
|
const repeat = repeat$1;
|
|
19617
19668
|
/**
|
|
19669
|
+
* Enables or disables tracing for spans created by the given effect.
|
|
19670
|
+
*
|
|
19671
|
+
* **Details**
|
|
19672
|
+
*
|
|
19673
|
+
* When `enabled` is `false`, spans created inside the effect are not registered
|
|
19674
|
+
* with the current tracer and do not propagate as normal trace parents.
|
|
19675
|
+
*
|
|
19676
|
+
* **Example** (Enabling or disabling tracing)
|
|
19677
|
+
*
|
|
19678
|
+
* ```ts import.meta.vitest
|
|
19679
|
+
* import { Effect } from "effect"
|
|
19680
|
+
*
|
|
19681
|
+
* const program = Effect.succeed(42).pipe(
|
|
19682
|
+
* Effect.withSpan("my-span"),
|
|
19683
|
+
* // the span will not be registered with the tracer
|
|
19684
|
+
* Effect.withTracerEnabled(false)
|
|
19685
|
+
* )
|
|
19686
|
+
* Effect.runSync(program) // => 42
|
|
19687
|
+
* ```
|
|
19688
|
+
*
|
|
19689
|
+
* @stability stable
|
|
19690
|
+
* @category tracing
|
|
19691
|
+
* @since 2.0.0
|
|
19692
|
+
*/
|
|
19693
|
+
const withTracerEnabled = withTracerEnabled$1;
|
|
19694
|
+
/**
|
|
19618
19695
|
* Adds an annotation to the current span if available.
|
|
19619
19696
|
*
|
|
19620
19697
|
* **Example** (Annotating the current span)
|
|
@@ -20497,7 +20574,7 @@ const annotateLogs = /*#__PURE__*/ dual((args) => isEffect(args[0]), (effect, ..
|
|
|
20497
20574
|
...args[0]
|
|
20498
20575
|
} : { ...annotations };
|
|
20499
20576
|
if (args.length === 1) return newAnnotations;
|
|
20500
|
-
else assignProperty
|
|
20577
|
+
else assignProperty(newAnnotations, args[0], args[1]);
|
|
20501
20578
|
return newAnnotations;
|
|
20502
20579
|
}));
|
|
20503
20580
|
/**
|
|
@@ -23960,7 +24037,7 @@ const publishUnsafe = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
23960
24037
|
* @since 2.0.0
|
|
23961
24038
|
*/
|
|
23962
24039
|
const subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
23963
|
-
const localScope = get$
|
|
24040
|
+
const localScope = get$5(services, Scope);
|
|
23964
24041
|
const scope = forkUnsafe(self.scope);
|
|
23965
24042
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
23966
24043
|
return addFinalizer$1(scope, unsubscribe(subscription)).pipe(andThen(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -25060,7 +25137,7 @@ const takeAll = (self) => takeBetween(self, 1, Number.POSITIVE_INFINITY);
|
|
|
25060
25137
|
* @since 4.0.0
|
|
25061
25138
|
*/
|
|
25062
25139
|
const collect = (self) => suspend$3(() => {
|
|
25063
|
-
const out = empty$
|
|
25140
|
+
const out = empty$6();
|
|
25064
25141
|
return as$1(catchDone(whileLoop$1({
|
|
25065
25142
|
while: constTrue,
|
|
25066
25143
|
body: constant(takeAll(self)),
|
|
@@ -27896,7 +27973,7 @@ var RcRefImpl = class {
|
|
|
27896
27973
|
/** @internal */
|
|
27897
27974
|
const make$25 = (options) => withFiber((fiber) => {
|
|
27898
27975
|
const context = fiber.context;
|
|
27899
|
-
const scope = get$
|
|
27976
|
+
const scope = get$5(context, Scope);
|
|
27900
27977
|
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
|
|
27901
27978
|
return as(addFinalizerExit(scope, () => {
|
|
27902
27979
|
const state = ref.state;
|
|
@@ -29244,7 +29321,7 @@ const takeWhile = /*#__PURE__*/ dual(2, (self, predicate) => transformPull(self,
|
|
|
29244
29321
|
* @since 2.0.0
|
|
29245
29322
|
*/
|
|
29246
29323
|
const mapAccum = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, initial, f, options) => fromChannel(mapAccum$1(self.channel, initial, (state, arr) => {
|
|
29247
|
-
const acc = empty$
|
|
29324
|
+
const acc = empty$6();
|
|
29248
29325
|
for (let index = 0; index < arr.length; index++) {
|
|
29249
29326
|
const [newState, values] = f(state, arr[index]);
|
|
29250
29327
|
state = newState;
|
|
@@ -29255,7 +29332,7 @@ const mapAccum = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, initial,
|
|
|
29255
29332
|
const arr = options.onHalt(state);
|
|
29256
29333
|
return isReadonlyArrayNonEmpty(arr) ? of(arr) : emptyArr;
|
|
29257
29334
|
} } : void 0)));
|
|
29258
|
-
const emptyArr = /*#__PURE__*/ empty$
|
|
29335
|
+
const emptyArr = /*#__PURE__*/ empty$6();
|
|
29259
29336
|
/**
|
|
29260
29337
|
* Accumulates state across the stream, emitting the initial state and each updated state.
|
|
29261
29338
|
*
|
|
@@ -29282,7 +29359,7 @@ const emptyArr = /*#__PURE__*/ empty$8();
|
|
|
29282
29359
|
const scan = /*#__PURE__*/ dual(3, (self, initial, f) => suspend(() => {
|
|
29283
29360
|
const seed = initial();
|
|
29284
29361
|
return concat(succeed$2(seed), fromChannel(mapAccum$1(self.channel, () => seed, (state, arr) => {
|
|
29285
|
-
const states = empty$
|
|
29362
|
+
const states = empty$6();
|
|
29286
29363
|
for (let index = 0; index < arr.length; index++) {
|
|
29287
29364
|
state = f(state, arr[index]);
|
|
29288
29365
|
states.push(state);
|
|
@@ -29969,6 +30046,28 @@ const toReadableStreamWith = /*#__PURE__*/ dual((args) => isStream(args[0]), (se
|
|
|
29969
30046
|
}, options?.strategy);
|
|
29970
30047
|
});
|
|
29971
30048
|
/**
|
|
30049
|
+
* Converts a stream to a `ReadableStream`.
|
|
30050
|
+
*
|
|
30051
|
+
* **Details**
|
|
30052
|
+
*
|
|
30053
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream.
|
|
30054
|
+
*
|
|
30055
|
+
* **Example** (Converting a stream to a ReadableStream)
|
|
30056
|
+
*
|
|
30057
|
+
* ```ts import.meta.vitest
|
|
30058
|
+
* import { Stream } from "effect"
|
|
30059
|
+
*
|
|
30060
|
+
* const readableStream = Stream.toReadableStream(Stream.make(1, 2, 3))
|
|
30061
|
+
* const values = await globalThis.Array.fromAsync(readableStream)
|
|
30062
|
+
* values // => [ 1, 2, 3 ]
|
|
30063
|
+
* ```
|
|
30064
|
+
*
|
|
30065
|
+
* @stability stable
|
|
30066
|
+
* @category destructors
|
|
30067
|
+
* @since 2.0.0
|
|
30068
|
+
*/
|
|
30069
|
+
const toReadableStream = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) => toReadableStreamWith(self, empty$8(), options));
|
|
30070
|
+
/**
|
|
29972
30071
|
* Creates an Effect that builds a ReadableStream from the stream.
|
|
29973
30072
|
*
|
|
29974
30073
|
* **When to use**
|
|
@@ -31298,7 +31397,73 @@ const getCode = (charCode) => {
|
|
|
31298
31397
|
};
|
|
31299
31398
|
//#endregion
|
|
31300
31399
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaGetter.js
|
|
31400
|
+
const runGetter = (self, input, options) => {
|
|
31401
|
+
switch (self._tag) {
|
|
31402
|
+
case "Passthrough": return succeed$4(input);
|
|
31403
|
+
case "Transform": return succeed$4(map$9(input, self.transform));
|
|
31404
|
+
case "TransformOptional": return succeed$4(self.transform(input));
|
|
31405
|
+
case "TransformEffect": return isNone(input) ? succeedNone : mapEager(self.transform(input.value, options), some$1);
|
|
31406
|
+
case "TransformOptionalEffect": return self.transform(input, options);
|
|
31407
|
+
}
|
|
31408
|
+
};
|
|
31301
31409
|
const makeGetter = (fields) => Object.assign(Object.create(Prototype$1), fields);
|
|
31410
|
+
const composeOptionalEffect = (first, second) => transformOptionalEffect((input, options) => flatMapEager(runGetter(first, input, options), (output) => runGetter(second, output, options)));
|
|
31411
|
+
/**
|
|
31412
|
+
* Composes two getters by passing the output of the first to the second.
|
|
31413
|
+
*
|
|
31414
|
+
* **When to use**
|
|
31415
|
+
*
|
|
31416
|
+
* Use when a schema conversion requires multiple transformation steps.
|
|
31417
|
+
*
|
|
31418
|
+
* **Details**
|
|
31419
|
+
*
|
|
31420
|
+
* Composition forwards `Option.none()` to getters that handle optional values
|
|
31421
|
+
* and skips getters that operate only on present values. Composing with
|
|
31422
|
+
* {@link passthrough} returns the other getter unchanged. The function supports
|
|
31423
|
+
* both `compose(first, second)` and `first.pipe(compose(second))`.
|
|
31424
|
+
*
|
|
31425
|
+
* **Example** (Parsing and normalizing a number)
|
|
31426
|
+
*
|
|
31427
|
+
* ```ts import.meta.vitest
|
|
31428
|
+
* import { Effect, Option, SchemaGetter } from "effect"
|
|
31429
|
+
*
|
|
31430
|
+
* const getter = SchemaGetter.compose(
|
|
31431
|
+
* SchemaGetter.transform<number, string>(Number),
|
|
31432
|
+
* SchemaGetter.transform((n) => Math.max(0, n))
|
|
31433
|
+
* )
|
|
31434
|
+
*
|
|
31435
|
+
* Effect.runSync(SchemaGetter.run(getter, Option.some("-1"), {})) // => Option.some(0)
|
|
31436
|
+
* ```
|
|
31437
|
+
*
|
|
31438
|
+
* @stability stable
|
|
31439
|
+
* @category combining
|
|
31440
|
+
* @since 4.0.0
|
|
31441
|
+
*/
|
|
31442
|
+
const compose = /*#__PURE__*/ dual(2, (self, other) => {
|
|
31443
|
+
if (self._tag === "Passthrough") return other;
|
|
31444
|
+
if (other._tag === "Passthrough") return self;
|
|
31445
|
+
switch (self._tag) {
|
|
31446
|
+
case "Transform": switch (other._tag) {
|
|
31447
|
+
case "Transform": return transform$1((input) => other.transform(self.transform(input)));
|
|
31448
|
+
case "TransformOptional": return transformOptional$1((input) => other.transform(map$9(input, self.transform)));
|
|
31449
|
+
case "TransformEffect": return transformEffect$1((input, options) => other.transform(self.transform(input), options));
|
|
31450
|
+
case "TransformOptionalEffect": return composeOptionalEffect(self, other);
|
|
31451
|
+
}
|
|
31452
|
+
case "TransformOptional": switch (other._tag) {
|
|
31453
|
+
case "Transform": return transformOptional$1((input) => map$9(self.transform(input), other.transform));
|
|
31454
|
+
case "TransformOptional": return transformOptional$1((input) => other.transform(self.transform(input)));
|
|
31455
|
+
case "TransformEffect":
|
|
31456
|
+
case "TransformOptionalEffect": return composeOptionalEffect(self, other);
|
|
31457
|
+
}
|
|
31458
|
+
case "TransformEffect": switch (other._tag) {
|
|
31459
|
+
case "Transform": return transformEffect$1((input, options) => mapEager(self.transform(input, options), other.transform));
|
|
31460
|
+
case "TransformOptional":
|
|
31461
|
+
case "TransformOptionalEffect": return composeOptionalEffect(self, other);
|
|
31462
|
+
case "TransformEffect": return transformEffect$1((input, options) => flatMapEager(self.transform(input, options), (output) => other.transform(output, options)));
|
|
31463
|
+
}
|
|
31464
|
+
case "TransformOptionalEffect": return composeOptionalEffect(self, other);
|
|
31465
|
+
}
|
|
31466
|
+
});
|
|
31302
31467
|
/**
|
|
31303
31468
|
* Creates a getter that always fails with the given issue.
|
|
31304
31469
|
*
|
|
@@ -31755,6 +31920,90 @@ function stringifyJson(options) {
|
|
|
31755
31920
|
}));
|
|
31756
31921
|
}
|
|
31757
31922
|
/**
|
|
31923
|
+
* Parses a string into a record of key-value pairs.
|
|
31924
|
+
*
|
|
31925
|
+
* **When to use**
|
|
31926
|
+
*
|
|
31927
|
+
* Use when you need a schema getter to parse a present encoded string that
|
|
31928
|
+
* contains delimited key-value pairs (e.g. `"a=1,b=2"`).
|
|
31929
|
+
*
|
|
31930
|
+
* **Details**
|
|
31931
|
+
*
|
|
31932
|
+
* The getter is pure and never fails. It splits the string by `separator`
|
|
31933
|
+
* (default `,`) and then each pair at the first `keyValueSeparator` (default `=`),
|
|
31934
|
+
* preserving the rest of the value. An empty `keyValueSeparator` uses the first
|
|
31935
|
+
* two characters as the key and value. Pairs missing a key or value are skipped.
|
|
31936
|
+
*
|
|
31937
|
+
* **Example** (Parsing a key-value string)
|
|
31938
|
+
*
|
|
31939
|
+
* ```ts import.meta.vitest
|
|
31940
|
+
* import { Effect, Option, SchemaGetter } from "effect"
|
|
31941
|
+
*
|
|
31942
|
+
* const parse = SchemaGetter.splitKeyValue<string>()
|
|
31943
|
+
* const result = Effect.runSync(SchemaGetter.run(parse, Option.some("a=1,b=2"), {}))
|
|
31944
|
+
* result // => Option.some({ a: "1", b: "2" })
|
|
31945
|
+
* ```
|
|
31946
|
+
*
|
|
31947
|
+
* @see {@link joinKeyValue} for the inverse operation
|
|
31948
|
+
* @see {@link split} to split into an array of strings
|
|
31949
|
+
*
|
|
31950
|
+
* @stability stable
|
|
31951
|
+
* @category splitting
|
|
31952
|
+
* @since 4.0.0
|
|
31953
|
+
*/
|
|
31954
|
+
function splitKeyValue$1(options) {
|
|
31955
|
+
const separator = options?.separator ?? ",";
|
|
31956
|
+
const keyValueSeparator = options?.keyValueSeparator ?? "=";
|
|
31957
|
+
return transform$1((input) => input.split(separator).reduce((acc, pair) => {
|
|
31958
|
+
if (keyValueSeparator === "") {
|
|
31959
|
+
const [key, value] = pair.split("");
|
|
31960
|
+
if (key && value) assignProperty(acc, key, value);
|
|
31961
|
+
return acc;
|
|
31962
|
+
}
|
|
31963
|
+
const index = pair.indexOf(keyValueSeparator);
|
|
31964
|
+
if (index <= 0) return acc;
|
|
31965
|
+
const key = pair.slice(0, index);
|
|
31966
|
+
const value = pair.slice(index + keyValueSeparator.length);
|
|
31967
|
+
if (value) assignProperty(acc, key, value);
|
|
31968
|
+
return acc;
|
|
31969
|
+
}, {}));
|
|
31970
|
+
}
|
|
31971
|
+
/**
|
|
31972
|
+
* Joins a record of key-value pairs into a delimited string.
|
|
31973
|
+
*
|
|
31974
|
+
* **When to use**
|
|
31975
|
+
*
|
|
31976
|
+
* Use when you need a schema getter to serialize a present decoded record as a
|
|
31977
|
+
* delimited key-value string.
|
|
31978
|
+
*
|
|
31979
|
+
* **Details**
|
|
31980
|
+
*
|
|
31981
|
+
* The getter is pure and never fails. It joins entries with `separator`
|
|
31982
|
+
* (default `,`) and joins each key and value with `keyValueSeparator` (default
|
|
31983
|
+
* `=`).
|
|
31984
|
+
*
|
|
31985
|
+
* **Example** (Joining key-value records)
|
|
31986
|
+
*
|
|
31987
|
+
* ```ts import.meta.vitest
|
|
31988
|
+
* import { Effect, Option, SchemaGetter } from "effect"
|
|
31989
|
+
*
|
|
31990
|
+
* const join = SchemaGetter.joinKeyValue()
|
|
31991
|
+
* const result = Effect.runSync(SchemaGetter.run(join, Option.some({ a: "1", b: "2" }), {}))
|
|
31992
|
+
* result // => Option.some("a=1,b=2")
|
|
31993
|
+
* ```
|
|
31994
|
+
*
|
|
31995
|
+
* @see {@link splitKeyValue} for the inverse operation
|
|
31996
|
+
*
|
|
31997
|
+
* @stability stable
|
|
31998
|
+
* @category combining
|
|
31999
|
+
* @since 4.0.0
|
|
32000
|
+
*/
|
|
32001
|
+
function joinKeyValue(options) {
|
|
32002
|
+
const separator = options?.separator ?? ",";
|
|
32003
|
+
const keyValueSeparator = options?.keyValueSeparator ?? "=";
|
|
32004
|
+
return transform$1((input) => Object.entries(input).map(([key, value]) => `${key}${keyValueSeparator}${value}`).join(separator));
|
|
32005
|
+
}
|
|
32006
|
+
/**
|
|
31758
32007
|
* Encodes a `Uint8Array` or string to a Base64 string.
|
|
31759
32008
|
*
|
|
31760
32009
|
* **Details**
|
|
@@ -31809,6 +32058,66 @@ function encodeBase64() {
|
|
|
31809
32058
|
function decodeBase64() {
|
|
31810
32059
|
return transformEffect$1((input, options) => mapErrorEager(fromResult(decode(input)), () => new InvalidValue({ expected: "a valid Base64 string" }, input, options)));
|
|
31811
32060
|
}
|
|
32061
|
+
/**
|
|
32062
|
+
* Encodes a present string using `encodeURIComponent`.
|
|
32063
|
+
*
|
|
32064
|
+
* **Details**
|
|
32065
|
+
*
|
|
32066
|
+
* - Skips `None` inputs.
|
|
32067
|
+
* - May throw a `URIError` for malformed surrogate pairs; this exception is not
|
|
32068
|
+
* converted into an `Issue`.
|
|
32069
|
+
*
|
|
32070
|
+
* **Example** (Encoding a URI component)
|
|
32071
|
+
*
|
|
32072
|
+
* ```ts import.meta.vitest
|
|
32073
|
+
* import { Effect, Option, SchemaGetter } from "effect"
|
|
32074
|
+
*
|
|
32075
|
+
* const encode = SchemaGetter.encodeUriComponent<string>()
|
|
32076
|
+
* const result = Effect.runSync(SchemaGetter.run(encode, Option.some("hello world"), {}))
|
|
32077
|
+
* result // => Option.some("hello%20world")
|
|
32078
|
+
* ```
|
|
32079
|
+
*
|
|
32080
|
+
* @see {@link decodeUriComponent} for the inverse operation
|
|
32081
|
+
*
|
|
32082
|
+
* @stability stable
|
|
32083
|
+
* @category encoding
|
|
32084
|
+
* @since 4.0.0
|
|
32085
|
+
*/
|
|
32086
|
+
function encodeUriComponent() {
|
|
32087
|
+
return transform$1(encodeURIComponent);
|
|
32088
|
+
}
|
|
32089
|
+
/**
|
|
32090
|
+
* Decodes a URI component encoded string using `decodeURIComponent`.
|
|
32091
|
+
*
|
|
32092
|
+
* **Details**
|
|
32093
|
+
*
|
|
32094
|
+
* - Fails with `SchemaIssue.InvalidValue` if the input contains malformed percent-encoding sequences.
|
|
32095
|
+
*
|
|
32096
|
+
* **Example** (Decoding a URI component)
|
|
32097
|
+
*
|
|
32098
|
+
* ```ts import.meta.vitest
|
|
32099
|
+
* import { Effect, Option, SchemaGetter } from "effect"
|
|
32100
|
+
*
|
|
32101
|
+
* const decode = SchemaGetter.decodeUriComponent<string>()
|
|
32102
|
+
* const result = await Effect.runPromise(SchemaGetter.run(decode, Option.some("hello%20world"), {}))
|
|
32103
|
+
* result // => Option.some("hello world")
|
|
32104
|
+
* ```
|
|
32105
|
+
*
|
|
32106
|
+
* @see {@link encodeUriComponent} for the inverse operation
|
|
32107
|
+
*
|
|
32108
|
+
* @stability stable
|
|
32109
|
+
* @category decoding
|
|
32110
|
+
* @since 4.0.0
|
|
32111
|
+
*/
|
|
32112
|
+
function decodeUriComponent() {
|
|
32113
|
+
return transformEffect$1((input, options) => {
|
|
32114
|
+
try {
|
|
32115
|
+
return succeed$4(globalThis.decodeURIComponent(input));
|
|
32116
|
+
} catch {
|
|
32117
|
+
return fail$3(new InvalidValue({ expected: "a valid URI component" }, input, options));
|
|
32118
|
+
}
|
|
32119
|
+
});
|
|
32120
|
+
}
|
|
31812
32121
|
//#endregion
|
|
31813
32122
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/BigDecimal.js
|
|
31814
32123
|
/**
|
|
@@ -32345,6 +32654,46 @@ function transform(options) {
|
|
|
32345
32654
|
function transformOptional(options) {
|
|
32346
32655
|
return new Transformation(transformOptional$1(options.decode), transformOptional$1(options.encode));
|
|
32347
32656
|
}
|
|
32657
|
+
/**
|
|
32658
|
+
* Transforms a string into a record of key-value pairs and
|
|
32659
|
+
* encodes a record of key-value pairs into a string.
|
|
32660
|
+
*
|
|
32661
|
+
* **When to use**
|
|
32662
|
+
*
|
|
32663
|
+
* Use when you need a schema transformation to parse query-string-like or
|
|
32664
|
+
* config-file-like strings into records.
|
|
32665
|
+
*
|
|
32666
|
+
* **Details**
|
|
32667
|
+
*
|
|
32668
|
+
* Decoding splits the string by `separator` (default `","`) into pairs, then
|
|
32669
|
+
* splits each pair by `keyValueSeparator` (default `"="`). Encoding joins the
|
|
32670
|
+
* record back into a string using the same separators. The transformation is
|
|
32671
|
+
* round-trippable when keys and values do not contain the separators.
|
|
32672
|
+
*
|
|
32673
|
+
* **Example** (Parsing key-value pairs)
|
|
32674
|
+
*
|
|
32675
|
+
* ```ts import.meta.vitest
|
|
32676
|
+
* import { Schema, SchemaTransformation } from "effect"
|
|
32677
|
+
*
|
|
32678
|
+
* const Config = Schema.String.pipe(
|
|
32679
|
+
* Schema.decodeTo(
|
|
32680
|
+
* Schema.Record(Schema.String, Schema.String),
|
|
32681
|
+
* SchemaTransformation.splitKeyValue({ separator: ";", keyValueSeparator: ":" })
|
|
32682
|
+
* )
|
|
32683
|
+
* )
|
|
32684
|
+
* Schema.decodeSync(Config)("host:localhost;port:3000") // => { host: "localhost", port: "3000" }
|
|
32685
|
+
* ```
|
|
32686
|
+
*
|
|
32687
|
+
* @see {@link trim}
|
|
32688
|
+
* @see {@link snakeToCamel}
|
|
32689
|
+
*
|
|
32690
|
+
* @stability stable
|
|
32691
|
+
* @category transforming
|
|
32692
|
+
* @since 4.0.0
|
|
32693
|
+
*/
|
|
32694
|
+
function splitKeyValue(options) {
|
|
32695
|
+
return new Transformation(splitKeyValue$1(options), joinKeyValue(options));
|
|
32696
|
+
}
|
|
32348
32697
|
const passthrough_ = /*#__PURE__*/ new Transformation(/*#__PURE__*/ passthrough$1(), /*#__PURE__*/ passthrough$1());
|
|
32349
32698
|
function passthrough() {
|
|
32350
32699
|
return passthrough_;
|
|
@@ -32532,6 +32881,40 @@ const urlFromString = /*#__PURE__*/ transformEffect({
|
|
|
32532
32881
|
*/
|
|
32533
32882
|
const uint8ArrayFromBase64String = /*#__PURE__*/ new Transformation(/*#__PURE__*/ decodeBase64(), /*#__PURE__*/ encodeBase64());
|
|
32534
32883
|
/**
|
|
32884
|
+
* Decodes a URI component encoded string into a UTF-8 string and encodes a
|
|
32885
|
+
* UTF-8 string into a URI component encoded string.
|
|
32886
|
+
*
|
|
32887
|
+
* **When to use**
|
|
32888
|
+
*
|
|
32889
|
+
* Use when you need a schema transformation to store structured data in URL
|
|
32890
|
+
* query parameters or fragments, such as composing with `Schema.parseJson` to
|
|
32891
|
+
* round-trip JSON through a URL.
|
|
32892
|
+
*
|
|
32893
|
+
* **Details**
|
|
32894
|
+
*
|
|
32895
|
+
* Decoding calls `decodeURIComponent` and fails if the input contains malformed
|
|
32896
|
+
* percent-encoding sequences. Encoding calls `encodeURIComponent`.
|
|
32897
|
+
*
|
|
32898
|
+
* **Example** (Defining a URI component schema)
|
|
32899
|
+
*
|
|
32900
|
+
* ```ts import.meta.vitest
|
|
32901
|
+
* import { Schema, SchemaTransformation } from "effect"
|
|
32902
|
+
*
|
|
32903
|
+
* const schema = Schema.String.pipe(
|
|
32904
|
+
* Schema.decodeTo(Schema.String, SchemaTransformation.stringFromUriComponent)
|
|
32905
|
+
* )
|
|
32906
|
+
* Schema.decodeSync(schema)("hello%20world") // => "hello world"
|
|
32907
|
+
* ```
|
|
32908
|
+
*
|
|
32909
|
+
* @see {@link stringFromBase64String}
|
|
32910
|
+
* @see `Schema.StringFromUriComponent` - a ready-made schema wrapping this transformation.
|
|
32911
|
+
*
|
|
32912
|
+
* @stability stable
|
|
32913
|
+
* @category encoding
|
|
32914
|
+
* @since 4.0.0
|
|
32915
|
+
*/
|
|
32916
|
+
const stringFromUriComponent = /*#__PURE__*/ new Transformation(/*#__PURE__*/ decodeUriComponent(), /*#__PURE__*/ encodeUriComponent());
|
|
32917
|
+
/**
|
|
32535
32918
|
* Decodes a JSON string with `JSON.parse` and encodes a value with
|
|
32536
32919
|
* `JSON.stringify`.
|
|
32537
32920
|
*
|
|
@@ -33440,7 +33823,7 @@ const Objects = class extends ASTNodeImpl {
|
|
|
33440
33823
|
const value = exitValue === sameExit ? inputValue : exitValue[args];
|
|
33441
33824
|
if (k2 !== missing && value !== missing) {
|
|
33442
33825
|
if (hasProperties && (expectedKeys.has(key) || expectedKeys.has(typeof k2 === "number" ? globalThis.String(k2) : k2))) return void_$2;
|
|
33443
|
-
assignProperty
|
|
33826
|
+
assignProperty(s.out, k2, value);
|
|
33444
33827
|
}
|
|
33445
33828
|
return void_$2;
|
|
33446
33829
|
};
|
|
@@ -33514,7 +33897,7 @@ const Objects = class extends ASTNodeImpl {
|
|
|
33514
33897
|
}
|
|
33515
33898
|
}
|
|
33516
33899
|
else if (parseIndexes) {
|
|
33517
|
-
const keyPairs = empty$
|
|
33900
|
+
const keyPairs = empty$6();
|
|
33518
33901
|
for (let i = 0; i < indexCount; i++) {
|
|
33519
33902
|
const index = indexes[i];
|
|
33520
33903
|
const keys = indexKeys?.[i] ?? (index.is.parameter === string ? Object.keys(record) : getIndexSignatureKeys(record, index.is.parameter, options));
|
|
@@ -33562,7 +33945,7 @@ const Objects = class extends ASTNodeImpl {
|
|
|
33562
33945
|
const exit = property.parser(value, options);
|
|
33563
33946
|
if (!effectIsExit(exit)) return resume(state, index, exit);
|
|
33564
33947
|
if (exit === sameExit) {
|
|
33565
|
-
if (hasKey) assignProperty
|
|
33948
|
+
if (hasKey) assignProperty(out, name, value);
|
|
33566
33949
|
continue;
|
|
33567
33950
|
}
|
|
33568
33951
|
const terminal = stepProperty(state, property, exit);
|
|
@@ -33606,7 +33989,7 @@ function stepProperty(s, p, exit) {
|
|
|
33606
33989
|
if (exit === sameExit) return;
|
|
33607
33990
|
const value = exit[args];
|
|
33608
33991
|
if (value !== missing) {
|
|
33609
|
-
assignProperty
|
|
33992
|
+
assignProperty(s.out, p.name, value);
|
|
33610
33993
|
return;
|
|
33611
33994
|
}
|
|
33612
33995
|
delete s.out[p.name];
|
|
@@ -33623,7 +34006,7 @@ const parsePropertiesOptions = {
|
|
|
33623
34006
|
onItem(s, p) {
|
|
33624
34007
|
if (!hasPropertySignature(s.input, p.name)) return p.parser(missing, s.options);
|
|
33625
34008
|
const value = s.input[p.name];
|
|
33626
|
-
assignProperty
|
|
34009
|
+
assignProperty(s.out, p.name, value);
|
|
33627
34010
|
return p.parser(value, s.options);
|
|
33628
34011
|
},
|
|
33629
34012
|
step: stepProperty
|
|
@@ -35914,7 +36297,7 @@ const fromReadonlyRecord = (cookies) => {
|
|
|
35914
36297
|
*/
|
|
35915
36298
|
const fromIterable$4 = (cookies) => {
|
|
35916
36299
|
const record = {};
|
|
35917
|
-
for (const cookie of cookies) assignProperty
|
|
36300
|
+
for (const cookie of cookies) assignProperty(record, cookie.name, cookie);
|
|
35918
36301
|
return fromReadonlyRecord(record);
|
|
35919
36302
|
};
|
|
35920
36303
|
/**
|
|
@@ -36140,7 +36523,7 @@ function parseHeader(header) {
|
|
|
36140
36523
|
const key = header.substring(pos, eqIdx++).trim();
|
|
36141
36524
|
if (!Object.hasOwn(result, key)) {
|
|
36142
36525
|
const val = header.charCodeAt(eqIdx) === 34 ? header.substring(eqIdx + 1, terminatorPos - 1).trim() : header.substring(eqIdx, terminatorPos).trim();
|
|
36143
|
-
assignProperty
|
|
36526
|
+
assignProperty(result, key, !(val.indexOf("%") === -1) ? tryDecodeURIComponent(val) : val);
|
|
36144
36527
|
}
|
|
36145
36528
|
pos = terminatorPos + 1;
|
|
36146
36529
|
}
|
|
@@ -36334,7 +36717,7 @@ const TypeId$10 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
|
|
|
36334
36717
|
const Proto$4 = /*#__PURE__*/ Object.defineProperties(/*#__PURE__*/ Object.create(null), {
|
|
36335
36718
|
[TypeId$10]: { value: TypeId$10 },
|
|
36336
36719
|
[symbolRedactable]: { value(context) {
|
|
36337
|
-
return redact$1(this, get$
|
|
36720
|
+
return redact$1(this, get$5(context, CurrentRedactedNames$1));
|
|
36338
36721
|
} },
|
|
36339
36722
|
toJSON: { value() {
|
|
36340
36723
|
return redact$2(this);
|
|
@@ -37352,7 +37735,7 @@ const Proto$3 = {
|
|
|
37352
37735
|
[symbolRedactable](context) {
|
|
37353
37736
|
return {
|
|
37354
37737
|
_id: "UrlParams",
|
|
37355
|
-
params: Object.fromEntries(redact(this, get$
|
|
37738
|
+
params: Object.fromEntries(redact(this, get$5(context, CurrentRedactedNames)))
|
|
37356
37739
|
};
|
|
37357
37740
|
},
|
|
37358
37741
|
toJSON() {
|
|
@@ -37553,7 +37936,7 @@ const decodeQueryKey = (key) => {
|
|
|
37553
37936
|
return key;
|
|
37554
37937
|
}
|
|
37555
37938
|
};
|
|
37556
|
-
const currentRedactedNames = () => get$
|
|
37939
|
+
const currentRedactedNames = () => get$5(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$8(), CurrentRedactedNames);
|
|
37557
37940
|
/**
|
|
37558
37941
|
* Query parameter names or patterns to redact in inspection, spans and errors.
|
|
37559
37942
|
*
|
|
@@ -37960,7 +38343,7 @@ function run(ast) {
|
|
|
37960
38343
|
function parserResult(result, input) {
|
|
37961
38344
|
if (result === sameExit) return succeed$4(input);
|
|
37962
38345
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
37963
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
38346
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
37964
38347
|
}
|
|
37965
38348
|
function runWithCompiler(compiler, ast) {
|
|
37966
38349
|
let parser;
|
|
@@ -37968,7 +38351,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
37968
38351
|
const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
37969
38352
|
if (result === sameExit) return succeed$4(input);
|
|
37970
38353
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
37971
|
-
return result[args] === missing ? getValue(missing) : result;
|
|
38354
|
+
return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
|
|
37972
38355
|
};
|
|
37973
38356
|
}
|
|
37974
38357
|
function asExit(parser) {
|
|
@@ -38263,7 +38646,7 @@ function transformSchema(node, transform) {
|
|
|
38263
38646
|
case "else":
|
|
38264
38647
|
case "contentSchema": transformed = walk(value, inEmbeddedResource);
|
|
38265
38648
|
}
|
|
38266
|
-
assignProperty
|
|
38649
|
+
assignProperty(out, key, transformed);
|
|
38267
38650
|
}
|
|
38268
38651
|
transform(out, inEmbeddedResource);
|
|
38269
38652
|
return out;
|
|
@@ -38276,13 +38659,13 @@ function rewriteRefs(schema, rewrite) {
|
|
|
38276
38659
|
});
|
|
38277
38660
|
}
|
|
38278
38661
|
function rewriteSchemaRef(schema, rewrite) {
|
|
38279
|
-
if (typeof schema.$ref === "string") assignProperty
|
|
38280
|
-
if (typeof schema.$dynamicRef === "string") assignProperty
|
|
38662
|
+
if (typeof schema.$ref === "string") assignProperty(schema, "$ref", rewrite(schema.$ref, "$ref"));
|
|
38663
|
+
if (typeof schema.$dynamicRef === "string") assignProperty(schema, "$dynamicRef", rewrite(schema.$dynamicRef, "$dynamicRef"));
|
|
38281
38664
|
}
|
|
38282
38665
|
function mapObject(value, f) {
|
|
38283
38666
|
if (!isObject(value)) return void 0;
|
|
38284
38667
|
const out = {};
|
|
38285
|
-
for (const key of Object.keys(value)) assignProperty
|
|
38668
|
+
for (const key of Object.keys(value)) assignProperty(out, key, f(value[key], key));
|
|
38286
38669
|
return out;
|
|
38287
38670
|
}
|
|
38288
38671
|
function createsResource(id) {
|
|
@@ -38499,7 +38882,7 @@ function collectJsonSchemaAnnotations(annotations, options) {
|
|
|
38499
38882
|
if (isJson(contentSchema)) out.contentSchema = contentSchema;
|
|
38500
38883
|
if (options?.includeAnnotationKey !== void 0) for (const [key, value] of Object.entries(annotations)) {
|
|
38501
38884
|
if (jsonSchemaAnnotationExcludedKeys.has(key) || !options.includeAnnotationKey(key)) continue;
|
|
38502
|
-
if (isJson(value)) assignProperty
|
|
38885
|
+
if (isJson(value)) assignProperty(out, key, value);
|
|
38503
38886
|
}
|
|
38504
38887
|
return Object.keys(out).length === 0 ? void 0 : out;
|
|
38505
38888
|
}
|
|
@@ -38645,7 +39028,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
38645
39028
|
}
|
|
38646
39029
|
const schemas = map$6(compiledSchemas, finalizeJsonSchema);
|
|
38647
39030
|
const definitions = {};
|
|
38648
|
-
for (const key of referenceKeys) if (!definitionAliases.has(key)) assignProperty
|
|
39031
|
+
for (const key of referenceKeys) if (!definitionAliases.has(key)) assignProperty(definitions, key, finalizeJsonSchema(compiledDefinitions.get(key)[0]));
|
|
38649
39032
|
return {
|
|
38650
39033
|
dialect: "draft-2020-12",
|
|
38651
39034
|
schemas,
|
|
@@ -38875,7 +39258,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
38875
39258
|
"type"
|
|
38876
39259
|
], dependencies);
|
|
38877
39260
|
const annotations = collectJsonSchemaAnnotations(property.annotations, options);
|
|
38878
|
-
assignProperty
|
|
39261
|
+
assignProperty(properties, name, annotations === void 0 ? schema : registerPendingOneOf(appendJsonSchema(schema, annotations)));
|
|
38879
39262
|
if (!property.isOptional) required.push(name);
|
|
38880
39263
|
}
|
|
38881
39264
|
if (representation.propertySignatures.length > 0) out.properties = properties;
|
|
@@ -38908,7 +39291,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
|
|
|
38908
39291
|
if (patterns.length === 0) additionalPropertySchemas.push(type);
|
|
38909
39292
|
else for (const pattern of patterns) {
|
|
38910
39293
|
const previous = patternProperties[pattern];
|
|
38911
|
-
assignProperty
|
|
39294
|
+
assignProperty(patternProperties, pattern, previous === void 0 ? type : previous === false || type === false ? false : registerPendingOneOf(appendJsonSchema(previous, type)));
|
|
38912
39295
|
}
|
|
38913
39296
|
}
|
|
38914
39297
|
const hasPatternProperties = Object.keys(patternProperties).length > 0;
|
|
@@ -39088,7 +39471,7 @@ function toRepresentations(asts, options) {
|
|
|
39088
39471
|
buildingReferences.add(reference);
|
|
39089
39472
|
const representation = on(ast);
|
|
39090
39473
|
buildingReferences.delete(reference);
|
|
39091
|
-
assignProperty
|
|
39474
|
+
assignProperty(references, reference, representation);
|
|
39092
39475
|
}
|
|
39093
39476
|
return {
|
|
39094
39477
|
_tag: "Reference",
|
|
@@ -39385,7 +39768,7 @@ function buildStruct(source, f) {
|
|
|
39385
39768
|
const res = f(k, source[k]);
|
|
39386
39769
|
if (res) {
|
|
39387
39770
|
const [nk, nv] = res;
|
|
39388
|
-
assignProperty
|
|
39771
|
+
assignProperty(out, nk, nv);
|
|
39389
39772
|
}
|
|
39390
39773
|
}
|
|
39391
39774
|
return out;
|
|
@@ -40255,7 +40638,7 @@ function Struct(fields) {
|
|
|
40255
40638
|
* @category constructors
|
|
40256
40639
|
* @since 3.10.0
|
|
40257
40640
|
*/
|
|
40258
|
-
function Record(key, value) {
|
|
40641
|
+
function Record$1(key, value) {
|
|
40259
40642
|
return make$11(record(key.ast, value.ast), {
|
|
40260
40643
|
key,
|
|
40261
40644
|
value
|
|
@@ -41310,6 +41693,40 @@ function fromJsonString(schema, options) {
|
|
|
41310
41693
|
globalThis.File;
|
|
41311
41694
|
globalThis.FormData;
|
|
41312
41695
|
globalThis.URLSearchParams;
|
|
41696
|
+
/**
|
|
41697
|
+
* Decodes a URI component encoded string into a UTF-8 string.
|
|
41698
|
+
* Can be used to store data in a URL.
|
|
41699
|
+
*
|
|
41700
|
+
* **Details**
|
|
41701
|
+
*
|
|
41702
|
+
* Decoding:
|
|
41703
|
+
* - A **valid** URI component encoded string is decoded as a UTF-8 `string`.
|
|
41704
|
+
*
|
|
41705
|
+
* Encoding:
|
|
41706
|
+
* - A `string` is encoded as a URI component encoded string.
|
|
41707
|
+
*
|
|
41708
|
+
* **Example** (Decoding URI component strings)
|
|
41709
|
+
*
|
|
41710
|
+
* ```ts import.meta.vitest
|
|
41711
|
+
* import { Schema } from "effect"
|
|
41712
|
+
*
|
|
41713
|
+
* const PaginationSchema = Schema.Struct({
|
|
41714
|
+
* maxItemPerPage: Schema.Number,
|
|
41715
|
+
* page: Schema.Number
|
|
41716
|
+
* })
|
|
41717
|
+
*
|
|
41718
|
+
* const UrlSchema = Schema.StringFromUriComponent.pipe(
|
|
41719
|
+
* Schema.decodeTo(Schema.fromJsonString(PaginationSchema))
|
|
41720
|
+
* )
|
|
41721
|
+
*
|
|
41722
|
+
* Schema.encodeSync(UrlSchema)({ maxItemPerPage: 10, page: 1 }) // => "%7B%22maxItemPerPage%22%3A10%2C%22page%22%3A1%7D"
|
|
41723
|
+
* ```
|
|
41724
|
+
*
|
|
41725
|
+
* @stability stable
|
|
41726
|
+
* @category schemas
|
|
41727
|
+
* @since 3.12.0
|
|
41728
|
+
*/
|
|
41729
|
+
const StringFromUriComponent = /*#__PURE__*/ String$2.annotate({ expected: "a URI component encoded string that will be decoded as a UTF-8 string" }).pipe(/*#__PURE__*/ decodeTo(String$2, stringFromUriComponent));
|
|
41313
41730
|
const Base64String = /*#__PURE__*/ String$2.annotate({
|
|
41314
41731
|
expected: "a base64 encoded string that will be decoded as Uint8Array",
|
|
41315
41732
|
format: "byte",
|
|
@@ -42240,6 +42657,14 @@ const MutableJson = /*#__PURE__*/ make$11(/*#__PURE__*/ annotate(MutableJson$1,
|
|
|
42240
42657
|
*/
|
|
42241
42658
|
const TypeId$6 = "~effect/http/HttpClientError";
|
|
42242
42659
|
/**
|
|
42660
|
+
* Returns `true` when a value is an `HttpClientError`.
|
|
42661
|
+
*
|
|
42662
|
+
* @stability unstable
|
|
42663
|
+
* @category guards
|
|
42664
|
+
* @since 4.0.0
|
|
42665
|
+
*/
|
|
42666
|
+
const isHttpClientError = (u) => hasProperty(u, TypeId$6);
|
|
42667
|
+
/**
|
|
42243
42668
|
* Error wrapper for HTTP client failures, exposing the failed request and the optional response through its `reason`.
|
|
42244
42669
|
*
|
|
42245
42670
|
* @stability unstable
|
|
@@ -43161,7 +43586,7 @@ var ServerClient = class {
|
|
|
43161
43586
|
annotations;
|
|
43162
43587
|
constructor(id) {
|
|
43163
43588
|
this.id = id;
|
|
43164
|
-
this.annotations = empty$
|
|
43589
|
+
this.annotations = empty$8();
|
|
43165
43590
|
}
|
|
43166
43591
|
annotate(tag, value) {
|
|
43167
43592
|
this.annotations = add(this.annotations, tag, value);
|
|
@@ -43289,7 +43714,7 @@ const make$9 = (tag, options) => {
|
|
|
43289
43714
|
successSchema: options?.stream ? Stream(successSchema, errorSchema) : successSchema,
|
|
43290
43715
|
errorSchema: options?.stream ? Never : errorSchema,
|
|
43291
43716
|
defectSchema,
|
|
43292
|
-
annotations: empty$
|
|
43717
|
+
annotations: empty$8(),
|
|
43293
43718
|
middlewares: /* @__PURE__ */ new Set()
|
|
43294
43719
|
});
|
|
43295
43720
|
};
|
|
@@ -43637,7 +44062,7 @@ function makeParser(layout, mode, parseOptions, maxFrameSize, decodeEncoded, dic
|
|
|
43637
44062
|
let bufferEnd = 0;
|
|
43638
44063
|
let stashed;
|
|
43639
44064
|
let spent = false;
|
|
43640
|
-
const body = new Reader();
|
|
44065
|
+
const body = new Reader$1();
|
|
43641
44066
|
const indexSignatures = new IndexSignatureCache(parseOptions, PARSER_INDEX_SIGNATURE_CACHE_SIZE);
|
|
43642
44067
|
const release = () => {
|
|
43643
44068
|
body.release();
|
|
@@ -44288,7 +44713,7 @@ var IndexSignatureCache = class {
|
|
|
44288
44713
|
const EMPTY_READER_ARRAY_BUFFER = /*#__PURE__*/ new ArrayBuffer(0);
|
|
44289
44714
|
const EMPTY_READER_BUFFER = /*#__PURE__*/ new Uint8Array(EMPTY_READER_ARRAY_BUFFER);
|
|
44290
44715
|
const EMPTY_READER_VIEW = /*#__PURE__*/ new DataView(EMPTY_READER_ARRAY_BUFFER);
|
|
44291
|
-
var Reader = class {
|
|
44716
|
+
var Reader$1 = class {
|
|
44292
44717
|
pos = 0;
|
|
44293
44718
|
nesting = 0;
|
|
44294
44719
|
buf = EMPTY_READER_BUFFER;
|
|
@@ -46397,7 +46822,7 @@ function decodeExtraPair(layout, r, out, seen, keys) {
|
|
|
46397
46822
|
issuePath[issuePathLen++] = key;
|
|
46398
46823
|
const value = decodeFieldPayload(signature.layout, signature.wireMask, kind, r);
|
|
46399
46824
|
issuePathLen--;
|
|
46400
|
-
if (value !== ABSENT) assignProperty
|
|
46825
|
+
if (value !== ABSENT) assignProperty(out, key, value);
|
|
46401
46826
|
}
|
|
46402
46827
|
function decodeExtraKey(keys, code, keyCode, r) {
|
|
46403
46828
|
if ((code & 1) === 1) {
|
|
@@ -46536,7 +46961,7 @@ function decodeStruct(layout, r) {
|
|
|
46536
46961
|
const value = decodeFieldPayload(field.layout, field.wireMask, kind, r);
|
|
46537
46962
|
issuePathLen--;
|
|
46538
46963
|
if (value !== ABSENT) {
|
|
46539
|
-
assignProperty
|
|
46964
|
+
assignProperty(out, field.name, value);
|
|
46540
46965
|
if (index < 32) presentMask |= 1 << index;
|
|
46541
46966
|
else (presentWide ??= /* @__PURE__ */ new Set()).add(index);
|
|
46542
46967
|
}
|
|
@@ -46587,7 +47012,7 @@ function decodeStructPositional(layout, r) {
|
|
|
46587
47012
|
issuePath[issuePathLen++] = field.name;
|
|
46588
47013
|
const value = field.inline ? decodeSlot(field.layout, r) : decodeSized(field.layout, r);
|
|
46589
47014
|
issuePathLen--;
|
|
46590
|
-
if (value !== ABSENT) assignProperty
|
|
47015
|
+
if (value !== ABSENT) assignProperty(out, field.name, value);
|
|
46591
47016
|
else if (!field.optional) {
|
|
46592
47017
|
(issues ??= []).push(missingKeyIssue(field));
|
|
46593
47018
|
if (r.options.errors !== "all") break;
|
|
@@ -46736,7 +47161,7 @@ function decodeRunSlot(plan, tables, slot, out, r) {
|
|
|
46736
47161
|
if (table === void 0 || ref >= table.length) invalid("a known back-reference", void 0, r.options);
|
|
46737
47162
|
const value = table[ref];
|
|
46738
47163
|
if (value === ABSENT) return -1;
|
|
46739
|
-
assignProperty
|
|
47164
|
+
assignProperty(out, slot.name, value);
|
|
46740
47165
|
return slot.index;
|
|
46741
47166
|
}
|
|
46742
47167
|
const saved = r.enter(code / 2);
|
|
@@ -46758,7 +47183,7 @@ function decodeRunSlot(plan, tables, slot, out, r) {
|
|
|
46758
47183
|
r.exit(saved);
|
|
46759
47184
|
if (kind === INTERN_SELF) (tables[slot.index] ??= []).push(value);
|
|
46760
47185
|
if (value === ABSENT) return -1;
|
|
46761
|
-
assignProperty
|
|
47186
|
+
assignProperty(out, slot.name, value);
|
|
46762
47187
|
return slot.index;
|
|
46763
47188
|
}
|
|
46764
47189
|
function decodeArray(layout, r) {
|
|
@@ -46884,7 +47309,7 @@ function decodeUnion(layout, r) {
|
|
|
46884
47309
|
}
|
|
46885
47310
|
const payload = decodeChecked(variant.payload, r);
|
|
46886
47311
|
if (payload === ABSENT) return ABSENT;
|
|
46887
|
-
if (!variant.tuple) for (const sentinel of variant.sentinels) assignProperty
|
|
47312
|
+
if (!variant.tuple) for (const sentinel of variant.sentinels) assignProperty(payload, sentinel.key, sentinel.literal);
|
|
46888
47313
|
return payload;
|
|
46889
47314
|
}
|
|
46890
47315
|
const member = layout.byKind.get(kind);
|
|
@@ -46899,7 +47324,7 @@ function decodeUnionPositional(layout, r) {
|
|
|
46899
47324
|
if (position === void 0) invalid("known union member", void 0, r.options);
|
|
46900
47325
|
const payload = decodeChecked(position.layout, r);
|
|
46901
47326
|
const variant = position.variant;
|
|
46902
|
-
if (variant !== void 0 && !variant.tuple && payload !== ABSENT) for (const sentinel of variant.sentinels) assignProperty
|
|
47327
|
+
if (variant !== void 0 && !variant.tuple && payload !== ABSENT) for (const sentinel of variant.sentinels) assignProperty(payload, sentinel.key, sentinel.literal);
|
|
46903
47328
|
return payload;
|
|
46904
47329
|
}
|
|
46905
47330
|
function decodeReason(layout, r) {
|
|
@@ -47067,9 +47492,9 @@ function decodeFrameBody(layout, r, mode) {
|
|
|
47067
47492
|
if (value === ABSENT) throw issueError(new MissingKey(void 0));
|
|
47068
47493
|
return value;
|
|
47069
47494
|
}
|
|
47070
|
-
let pooledReader = /*#__PURE__*/ new Reader();
|
|
47495
|
+
let pooledReader = /*#__PURE__*/ new Reader$1();
|
|
47071
47496
|
function decodeOneShot(layout, bytes, options, mode) {
|
|
47072
|
-
const r = pooledReader ?? new Reader();
|
|
47497
|
+
const r = pooledReader ?? new Reader$1();
|
|
47073
47498
|
const pooled = r === pooledReader;
|
|
47074
47499
|
if (pooled) pooledReader = void 0;
|
|
47075
47500
|
r.reset(bytes, 0, bytes.length, options, void 0, mode.positional, void 0);
|
|
@@ -47560,7 +47985,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
47560
47985
|
*/
|
|
47561
47986
|
const make$7 = (...rpcs) => makeProto({
|
|
47562
47987
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
47563
|
-
annotations: empty$
|
|
47988
|
+
annotations: empty$8()
|
|
47564
47989
|
});
|
|
47565
47990
|
//#endregion
|
|
47566
47991
|
//#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/ConfigProvider.js
|
|
@@ -48243,7 +48668,7 @@ const toConfigCursorAST = /*#__PURE__*/ memoize((root) => {
|
|
|
48243
48668
|
const out = {};
|
|
48244
48669
|
for (const key of keys) {
|
|
48245
48670
|
const child = yield* loadChildCursor(cursor, key);
|
|
48246
|
-
if (child.node !== void 0) assignProperty
|
|
48671
|
+
if (child.node !== void 0) assignProperty(out, key, child);
|
|
48247
48672
|
}
|
|
48248
48673
|
return out;
|
|
48249
48674
|
});
|
|
@@ -48373,6 +48798,7 @@ const PortSchema = /*#__PURE__*/ Int.check(/*#__PURE__*/ isBetween({
|
|
|
48373
48798
|
minimum: 1,
|
|
48374
48799
|
maximum: 65535
|
|
48375
48800
|
}));
|
|
48801
|
+
const isPath = (u) => isString$2(u) || globalThis.Array.isArray(u);
|
|
48376
48802
|
/**
|
|
48377
48803
|
* Creates a config that always succeeds with the given value, ignoring the
|
|
48378
48804
|
* provider entirely.
|
|
@@ -48433,6 +48859,15 @@ function succeed(value) {
|
|
|
48433
48859
|
function String$1(name) {
|
|
48434
48860
|
return schema(String$2, name);
|
|
48435
48861
|
}
|
|
48862
|
+
function Record(key, value, pathOrOptions, options) {
|
|
48863
|
+
const hasPath = isPath(pathOrOptions);
|
|
48864
|
+
const record = Record$1(key, value);
|
|
48865
|
+
const split = splitKeyValue(hasPath ? options : pathOrOptions);
|
|
48866
|
+
return schema(Union([record, String$2.pipe(decodeTo(toCodecStringTree(record), {
|
|
48867
|
+
decode: split.decode,
|
|
48868
|
+
encode: compose(passthrough$1({ strict: false }), split.encode)
|
|
48869
|
+
}))]), hasPath ? pathOrOptions : void 0);
|
|
48870
|
+
}
|
|
48436
48871
|
/**
|
|
48437
48872
|
* Creates a config for a port number (integer in 1–65535).
|
|
48438
48873
|
*
|
|
@@ -50043,12 +50478,28 @@ const Source = Literals([
|
|
|
50043
50478
|
"Website",
|
|
50044
50479
|
"Note"
|
|
50045
50480
|
]);
|
|
50481
|
+
Literals([
|
|
50482
|
+
"tiktok",
|
|
50483
|
+
"x",
|
|
50484
|
+
"youtube",
|
|
50485
|
+
"web",
|
|
50486
|
+
"note",
|
|
50487
|
+
"file"
|
|
50488
|
+
]).pick([
|
|
50489
|
+
"tiktok",
|
|
50490
|
+
"x",
|
|
50491
|
+
"youtube"
|
|
50492
|
+
]);
|
|
50046
50493
|
const ImageType = Literals([
|
|
50047
50494
|
"image/jpeg",
|
|
50048
50495
|
"image/png",
|
|
50049
50496
|
"image/webp",
|
|
50050
50497
|
"image/gif"
|
|
50051
50498
|
]);
|
|
50499
|
+
Struct({
|
|
50500
|
+
bytes: Uint8Array$1,
|
|
50501
|
+
type: ImageType
|
|
50502
|
+
});
|
|
50052
50503
|
const FileType = Literals([
|
|
50053
50504
|
"image/jpeg",
|
|
50054
50505
|
"image/png",
|
|
@@ -50056,14 +50507,14 @@ const FileType = Literals([
|
|
|
50056
50507
|
"video/quicktime"
|
|
50057
50508
|
]);
|
|
50058
50509
|
const Note = Struct({
|
|
50059
|
-
author: String$2,
|
|
50510
|
+
author: optionalKey(String$2),
|
|
50060
50511
|
body: optionalKey(String$2),
|
|
50061
50512
|
content: String$2,
|
|
50062
50513
|
createdAt: Finite,
|
|
50063
50514
|
file: optionalKey(FileType),
|
|
50064
50515
|
id: NoteId,
|
|
50065
50516
|
image: optionalKey(ImageType),
|
|
50066
|
-
issue: String$2,
|
|
50517
|
+
issue: optionalKey(String$2),
|
|
50067
50518
|
screenText: optionalKey(String$2),
|
|
50068
50519
|
source: Source,
|
|
50069
50520
|
status: Literals([
|
|
@@ -50077,8 +50528,9 @@ const Note = Struct({
|
|
|
50077
50528
|
title: String$2,
|
|
50078
50529
|
topics: optionalKey(String$2),
|
|
50079
50530
|
transcript: optionalKey(String$2),
|
|
50080
|
-
url:
|
|
50531
|
+
url: optionalKey(String$2)
|
|
50081
50532
|
});
|
|
50533
|
+
const NoteJson = fromJsonString(Note);
|
|
50082
50534
|
const NoteItem = Note.mapFields(omit([
|
|
50083
50535
|
"body",
|
|
50084
50536
|
"content",
|
|
@@ -50096,7 +50548,7 @@ const Capture = Struct({
|
|
|
50096
50548
|
text: pipe(String$2, check(isMinLength(1), isMaxLength(2e4)))
|
|
50097
50549
|
});
|
|
50098
50550
|
const Extraction = Struct({
|
|
50099
|
-
author: String$2,
|
|
50551
|
+
author: Option(String$2),
|
|
50100
50552
|
image: Option(String$2),
|
|
50101
50553
|
slides: optionalKey(ArraySchema(String$2)),
|
|
50102
50554
|
text: String$2,
|
|
@@ -50112,6 +50564,87 @@ const Organization = Struct({
|
|
|
50112
50564
|
title: pipe(String$2, check(isMinLength(1), isMaxLength(80))),
|
|
50113
50565
|
topics: pipe(String$2, check(isMaxLength(400)))
|
|
50114
50566
|
});
|
|
50567
|
+
const FxPost = Struct({
|
|
50568
|
+
author: Struct({
|
|
50569
|
+
id: String$2,
|
|
50570
|
+
name: String$2,
|
|
50571
|
+
screen_name: String$2
|
|
50572
|
+
}),
|
|
50573
|
+
created_timestamp: Finite,
|
|
50574
|
+
id: String$2,
|
|
50575
|
+
media: optionalKey(Struct({ all: optionalKey(ArraySchema(Struct({
|
|
50576
|
+
thumbnail_url: optionalKey(String$2),
|
|
50577
|
+
type: String$2,
|
|
50578
|
+
url: String$2
|
|
50579
|
+
}))) })),
|
|
50580
|
+
raw_text: optionalKey(Struct({ facets: ArraySchema(Struct({ replacement: optionalKey(String$2) })) })),
|
|
50581
|
+
text: String$2
|
|
50582
|
+
});
|
|
50583
|
+
const FxArticle = Struct({
|
|
50584
|
+
content: Struct({
|
|
50585
|
+
blocks: ArraySchema(Struct({
|
|
50586
|
+
entityRanges: ArraySchema(Struct({ key: Finite })),
|
|
50587
|
+
text: String$2,
|
|
50588
|
+
type: String$2
|
|
50589
|
+
})),
|
|
50590
|
+
entityMap: ArraySchema(Struct({
|
|
50591
|
+
key: String$2,
|
|
50592
|
+
value: Struct({
|
|
50593
|
+
data: Struct({
|
|
50594
|
+
markdown: optionalKey(String$2),
|
|
50595
|
+
url: optionalKey(String$2)
|
|
50596
|
+
}),
|
|
50597
|
+
type: String$2
|
|
50598
|
+
})
|
|
50599
|
+
}))
|
|
50600
|
+
}),
|
|
50601
|
+
title: String$2
|
|
50602
|
+
});
|
|
50603
|
+
const FxStatus = Struct({ status: Struct({
|
|
50604
|
+
...FxPost.fields,
|
|
50605
|
+
article: optionalKey(FxArticle),
|
|
50606
|
+
quote: optionalKey(FxPost)
|
|
50607
|
+
}) });
|
|
50608
|
+
const FxConversation = Struct({
|
|
50609
|
+
...FxStatus.fields,
|
|
50610
|
+
replies: optionalKey(ArraySchema(FxPost)),
|
|
50611
|
+
thread: optionalKey(ArraySchema(FxPost))
|
|
50612
|
+
});
|
|
50613
|
+
const OEmbed = Struct({
|
|
50614
|
+
author_name: optionalKey(String$2),
|
|
50615
|
+
html: optionalKey(String$2),
|
|
50616
|
+
thumbnail_url: optionalKey(String$2),
|
|
50617
|
+
title: optionalKey(String$2)
|
|
50618
|
+
});
|
|
50619
|
+
const TikTokPage = Struct({ __DEFAULT_SCOPE__: Struct({ "webapp.video-detail": Struct({ itemInfo: Struct({ itemStruct: Struct({
|
|
50620
|
+
author: Struct({ nickname: String$2 }),
|
|
50621
|
+
desc: String$2,
|
|
50622
|
+
imagePost: Struct({
|
|
50623
|
+
images: ArraySchema(Struct({ imageURL: Struct({ urlList: ArraySchema(String$2) }) })),
|
|
50624
|
+
title: optionalKey(String$2)
|
|
50625
|
+
})
|
|
50626
|
+
}) }) }) }) });
|
|
50627
|
+
const GitHubRepo = Struct({
|
|
50628
|
+
description: NullOr(String$2),
|
|
50629
|
+
full_name: String$2,
|
|
50630
|
+
homepage: optionalKey(NullOr(String$2)),
|
|
50631
|
+
owner: Struct({ login: String$2 }),
|
|
50632
|
+
topics: optionalKey(ArraySchema(String$2))
|
|
50633
|
+
});
|
|
50634
|
+
const GitHubComment = Struct({
|
|
50635
|
+
body: NullOr(String$2),
|
|
50636
|
+
user: Struct({ login: String$2 })
|
|
50637
|
+
});
|
|
50638
|
+
const GitHubIssue = Struct({
|
|
50639
|
+
...GitHubComment.fields,
|
|
50640
|
+
state: String$2,
|
|
50641
|
+
title: String$2
|
|
50642
|
+
});
|
|
50643
|
+
const GitHubReadme = Struct({ download_url: String$2 });
|
|
50644
|
+
const Reader = Struct({ data: Struct({
|
|
50645
|
+
content: String$2,
|
|
50646
|
+
title: String$2
|
|
50647
|
+
}) });
|
|
50115
50648
|
//#endregion
|
|
50116
50649
|
//#region src/rpcs/contracts.ts
|
|
50117
50650
|
var RpcContracts = class extends make$7(make$9("notes.watch", {
|
|
@@ -50137,4 +50670,4 @@ var RpcContracts = class extends make$7(make$9("notes.watch", {
|
|
|
50137
50670
|
payload: Struct({ id: NoteId })
|
|
50138
50671
|
})) {};
|
|
50139
50672
|
//#endregion
|
|
50140
|
-
export { CloseEvent as $, catchCauseIf as $a, close as $c, isNotUndefined as $d, offer as $i, findLast as $l, setAll$1 as $n, orDie$2 as $o, failCause as $r, includes as $s, decodeEffect as $t, getOrUndefinedUnsafe as $u, withDefault as A, formatIp as Aa, hasInterruptsOnly as Ac, flip$1 as Ad, runLast as Ai, sync$2 as Al, withDecodingDefaultKey as An, interrupt$1 as Ao, resolveDescription as Ar, try_ as As, Json as At, empty$9 as Au, constEof as B, isUnicast as Ba, effectDiscard as Bc, BaseProto as Bd, fromPull$1 as Bi, taggedEnum as Bl, unwrap$1 as Bn, map$3 as Bo, toEpochMillis as Br, withFiberSucceed as Bs, Redacted$1 as Bt, succeed$8 as Bu, Redacted as C, DnsError as Ca, done as Cc, orElse as Cd, pipeThroughChannel as Ci, effectIsExit as Cl, toCodecJson as Cn, forkIn as Co, decodeTo$1 as Cr, tapCause as Cs, Defect as Ct, takeRight as Cu, option as D, domainNameFromStringUnsafe as Da, fromReasons as Dc, Number$5 as Dd, runForEach as Di, makeSpanUnsafe as Dl, toType as Dn, gen as Do, null_ as Dr, timeoutOrElse as Ds, FalseLiterals as Dt, keys$1 as Du, map as E, nameServerFromInput as Ea, findError as Ec, toArray as Ed, runCollect as Ei, forkUnsafe$1 as El, toJsonSchemaDocument as En, fromResult as Eo, mapOrSame as Er, timeoutOption as Es, Exit as Et, has$3 as Eu, json as F, ipv4ToOctets as Fa, squash as Fc, contE as Fd, tap as Fi, make$36 as Fl, CurrentRedactedNames as Fn, logError as Fo, transform as Fr, useSpan as Fs, NonEmptyArray as Ft, fromOption$2 as Fu, isWrapper as G, annotateCurrentSpan as Ga, provide$2 as Gc, format$2 as Gd, pipeTo as Gi, drop as Gl, CurrentRedactedNames$1 as Gn, matchCauseEffectEager as Go, catchTags as Gr, exponential as Gs, Tuple as Gt, seconds as Gu, constPong as H, acquireRelease as Ha, launch as Hc, NodeInspectSymbol as Hd, map$2 as Hi, contains as Hl, has as Hn, mapError$2 as Ho, Path$1 as Hr, withParentSpan as Hs, Struct as Ht, format$1 as Hu, layerJson as I, isInetAddressV6 as Ia, CurrentMemoMap as Ic, withFiber$1 as Id, toReadableStreamEffect as Ii, nativeTracer as Il, empty as In, logFatal as Io, transformOptional as Ir, void_$1 as Is, Null as It, isFailure$1 as Iu, isStreamSchema as J, asSome as Ja, succeedContext as Jc, hash as Jd, bounded as Ji, every$1 as Jl, fromRecordUnsafe as Jn, onError as Jo, decodeText$1 as Jr, catchDone as Js, Uint8Array$1 as Jt, Service as Ju, ClientAbort as K, annotateLogs as Ka, provideMerge as Kc, redact$2 as Kd, make$26 as Ki, empty$8 as Kl, empty$2 as Kn, matchEffect as Ko, catch_ as Kr, min as Ks, URL$2 as Kt, toMillis as Ku, layerSchemaBinary as L, isLinkLocal as La, buildWithMemoMap as Lc, assignProperty$1 as Ld, toReadableStreamWith as Li, Error$2 as Ll, fromInput as Ln, logInfo as Lo, encode as Lr, when as Ls, NullOr as Lt, isResult as Lu, withRun as M, inetAddressFromIpString as Ma, isNoSuchElementError as Mc, Prototype as Md, succeed$2 as Mi, ParentSpan as Ml, omit as Mn, isEffect as Mo, string as Mr, uninterruptibleMask as Ms, Literals as Mt, make$37 as Mu, withRunClient as N, ipFromString as Na, makeDieReason as Nc, PipeInspectableProto as Nd, suspend as Ni, Tracer as Nl, getReferenceKey as Nn, log as No, toEncoded$1 as Nr, updateContext as Ns, MutableJson as Nt, fail$7 as Nu, succeed as O, NetAddressError as Oa, hasDies as Oc, String$6 as Od, runForEachArray as Oi, onExitUnsafe as Ol, withConstructorDefault as On, ignore as Oo, optionalKey$1 as Or, transposeOption as Os, Finite as Ot, map$7 as Ou, RpcSerialization as P, ipFromStringUnsafe as Pa, prettyErrors as Pc, contA as Pd, takeUntil as Pi, externalSpan as Pl, encodeUnknownEffect$1 as Pn, logDebug as Po, passthrough as Pr, updateService as Ps, Never as Pt, failVoid as Pu, makeCollectorUnsafe as Q, catchCause$1 as Qa, addFinalizerExit as Qc, isNotNullish as Qd, make$27 as Qi, findFirstIndex as Ql, set$1 as Qn, option$1 as Qo, fail$1 as Qr, endsWith as Qs, Unknown as Qt, getOrUndefined as Qu, RequestId as R, isLoopback as Ra, effect as Rc, getStackTraceLimit as Rd, unwrap$2 as Ri, TaggedClass as Rl, redactUrl as Rn, logWarning as Ro, formatIso as Rr, whileLoop as Rs, Number$1 as Rt, isSuccess$1 as Ru, Port as S, Dns as Sa, die$3 as Sc, none as Sd, orDie as Si, ConsoleRef as Sl, tag as Sn, forkChild as So, Union$1 as Sr, tap$1 as Ss, DateTimeUtcFromString as St, take$3 as Su, URL$1 as T, makeRecordUnsafe as Ta, filterInterruptors as Tc, some$1 as Td, run$1 as Ti, fiberEnterUninterruptibleUnsafe as Tl, toEncoded as Tn, fromOption as To, isOptional as Tr, timeout as Ts, Error$1 as Tt, get$5 as Tu, ServerClient as U, all$1 as Ua, merge$3 as Uc, toJson as Ud, mapError$1 as Ui, dedupe as Ul, fromIterable$2 as Un, match as Uo, FileSystem as Ur, withSpan as Us, TaggedError as Ut, millis as Uu, constPing as V, unixPathAddress as Va, empty$7 as Vc, Class$2 as Vd, fromTransform$1 as Vi, appendAll$1 as Vl, fromIterable as Vn, mapEager as Vo, defaultFormatter as Vr, withLogSpan as Vs, String$2 as Vt, try_$2 as Vu, exitSchema as W, andThen as Wa, mergeAll$2 as Wc, toStringUnknown as Wd, mkUint8Array$1 as Wi, dedupeAdjacentWith as Wl, get as Wn, matchCauseEffect as Wo, catchReason as Wr, zipWith as Ws, TrueLiterals as Wt, parts as Wu, spanName as X, cached as Xa, Scope as Xc, isIterable as Xd, end as Xi, filterMap as Xl, merge as Xn, onExitPrimitive as Xo, empty$4 as Xr, Random as Xs, UndefinedOr as Xt, empty$10 as Xu, spanAttributes as Y, asVoid as Ya, unwrap$5 as Yc, hasProperty as Yd, collect as Yi, filter$2 as Yl, isRedactedName$1 as Yn, onExit$1 as Yo, die as Yr, isDoneCause as Ys, Uint8ArrayFromBase64 as Yt, add as Yu, Collector as Z, callback$1 as Za, addFinalizer$1 as Zc, isNotNull as Zd, failCause$2 as Zi, findFirst as Zl, remove$1 as Zn, onInterrupt as Zo, ensuring as Zr, camelToSnake as Zs, Union as Zt, get$6 as Zu, QuitError as _, fromInput$2 as _a, Clock as _c, isSome as _d, mapError as _i, interrupt$2 as _l, make$11 as _n, flatMapEager as _o, FilterGroup as _r, serviceOption as _s, ArraySchema as _t, prepend$1 as _u, ImageType as a, takeAll as aa, repeat$2 as ac, contains$1 as ad, constTrue as af, fromEffect as ai, CurrentLogAnnotations as al, encodeSync as an, catchTags$1 as ao, isEmpty as ar, provideServiceEffect as as, fromWebSocket as at, groupBy as au, layer$8 as b, mebibytes as ba, annotate$1 as bc, map$9 as bd, mkUint8Array as bi, isSuccess as bl, optional as bn, forEach$1 as bo, PropertySignature as br, suspend$2 as bs, Class as bt, some as bu, NotesError as c, makeUnsafe$2 as ca, slice as cc, flatMap$7 as cd, constant as cf, fromQueue as ci, TracerTimingEnabled as cl, fromJsonString as cn, contextWith as co, fromReadable as cr, result as cs, DecodeError as ct, isArrayNonEmpty as cu, layer as d, interrupt as da, toLowerCase as dc, fromNullishOr as dd, identity as df, limitBytes as di, into as dl, isInt as dn, ensuring$2 as do, toUint8Array as dr, runFork as ds, HttpClientError as dt, join$1 as du, offerAll as ea, isEmpty$1 as ec, getUnsafe$1 as ed, isObject as ef, filter as ei, closeUnsafe as el, decodeSync as en, catchDefect as eo, isRedacted as er, orElseSucceed as es, Socket as et, flatMap$5 as eu, make as f, interruptAll as fa, trim as fc, fromUndefinedOr as fd, pipe as ff, map$1 as fi, isDeferred as fl, isMaxLength as fn, exit as fo, fromWritable as fr, runForkWith as fs, HttpClientErrorSchema as ft, last$1 as fu, layer$1 as g, badArgument as ga, round as gc, isNone as gd, mapEffect as gi, failCause$5 as gl, isSchemaError as gn, flatMap$2 as go, Filter as gr, service as gs, Any as gt, of as gu, errorReported as h, runIn as ha, parse as hc, getOrUndefined$1 as hd, mapArrayEffect as hi, fail$5 as hl, isSchema as hn, filterOrFail as ho, Arrays as hr, scoped as hs, TransportError as ht, match$3 as hu, FileType as i, take$1 as ia, padStart as ic, all$4 as id, constFalse$1 as if, fromChannel as ii, provide$3 as il, encodeEffect as in, catchTag as io, fromSetCookie as ir, provideService$2 as is, SocketReadError as it, getUnsafe as iu, Stdio as j, formatUrlUnsafe as ja, interruptors as jc, mapInput as jd, scan as ji, DisablePropagation as jl, isSchemaError$1 as jn, interruptible as jo, resolveIdentifier as jr, uninterruptible as js, Literal as jt, headUnsafe as ju, unwrap as k, formatInet as ka, hasInterrupts as kc, combine$1 as kd, runHead as ki, reportCauseUnsafe as kl, withDecodingDefault as kn, ignoreCause as ko, replaceChecks as kr, tryPromise as ks, Int as kt, toEntries as ku, Organization as l, await_ as la, split as lc, flatMapNullishOr as ld, dual as lf, fromReadableStream as li, _await as ll, is as ln, delay as lo, pipeThroughDuplex as lr, retry as ls, EmptyBodyError as lt, isReadonlyArrayEmpty as lu, errorExitCode as m, interruptAs as ma, max as mc, getOrNull as md, mapArray as mi, die$4 as ml, isPattern as mn, failCause$3 as mo, ChildProcessSpawner as mr, scope as ms, StatusCodeError as mt, map$6 as mu, Capture as n, shutdown as na, length as nc, makeUnsafe$6 as nd, isUndefined as nf, flattenIterable as ni, make$35 as nl, decodeUnknownEffect as nn, catchIf as no, value as nr, provide as ns, SocketErrorReason as nt, get$4 as nu, Note as o, publishUnsafe as oa, replace as oc, exists as od, constUndefined as of, fromIterable$5 as oi, CurrentLogSpans as ol, encodeTo as on, catch_$2 as oo, parseHeader as or, raceFirst as os, layerWebSocket as ot, head as ou, runMain as p, interruptAllAs as pa, trimEnd as pc, getOrElse as pd, pipeArguments as pf, mapAccum as pi, makeUnsafe$5 as pl, isMinLength as pn, fail$3 as po, make$18 as pr, runSync$1 as ps, InvalidUrlError as pt, lastNonEmpty as pu, getStreamSchemas as q, as as qa, succeed$5 as qc, equals$1 as qd, makeUnsafe$1 as qi, ensure as ql, fromInput$1 as qn, never$1 as qo, concat as qr, spaced as qs, URLFromString as qt, Reference as qu, Extraction as r, shutdownUnsafe as ra, match$1 as rc, merge$4 as rd, compose as rf, fromArray as ri, makeUnsafe$4 as rl, decodeUnknownOption as rn, catchReason$2 as ro, empty$3 as rr, provideContext$2 as rs, SocketOpenError as rt, getSomes as ru, NoteId as s, unbounded as sa, replaceAll as sc, filter$3 as sd, constVoid as sf, fromPubSub as si, MinimumLogLevel as sl, encodeUnknownEffect as sn, context as so, toSetCookieHeaders as sr, repeat as ss, layerWebSocketConstructorGlobal as st, headNonEmpty as su, RpcContracts as t, offerUnsafe as ta, isNonEmpty as tc, make$39 as td, isTagged as tf, flatMap as ti, forkUnsafe as tl, decodeTo as tn, catchFilter$2 as to, make$16 as tr, promise as ts, SocketError as tt, fromIterable$6 as tu, LogToStderr as u, getCurrent as ua, startsWith as uc, flatten$5 as ud, flow as uf, groupedWithin as ui, doneUnsafe as ul, isGreaterThanOrEqualTo as un, die$2 as uo, toArrayBuffer as ur, retryOrElse as us, EncodeError as ut, isReadonlyArrayNonEmpty as uu, Terminal as v, fromInputUnsafe as va, Done as vc, liftPredicate as vd, mergeAll as vi, isExit as vl, makeFilter as vn, fn as vo, Literal$1 as vr, succeed$4 as vs, Boolean$1 as vt, reduce as vu, String$1 as w, make$33 as wa, fail$4 as wc, orElseSome as wd, provideService as wi, fiberEnterInterruptibleUnsafe as wl, toCodecStringTree as wn, forkScoped as wo, isNever as wr, tapError as ws, Duration as wt, assignProperty as wu, Crypto as x, zero$1 as xa, combine as xc, match$6 as xd, onEnd as xi, succeed$6 as xl, optionalKey as xn, forever as xo, Suspend as xr, sync as xs, DateTimeUtc as xt, sort as xu, isQuitError as y, gibibytes as ya, StackTrace as yc, liftThrowable as yd, mkString as yi, isFailure as yl, mutable as yn, fnUntraced as yo, Objects as yr, succeedNone as ys, BooleanLiterals as yt, reverse as yu, ResponseDefectEncoded as z, isPrivate as za, effectContext as zc, setStackTraceLimit as zd, last as zi, TaggedError$1 as zl, setAll as zn, makeSpanScoped as zo, now as zr, withFiber as zs, Record as zt, match$4 as zu };
|
|
50673
|
+
export { constPong as $, isPrivate as $a, isNoSuchElementError as $c, combine$1 as $d, last as $i, DisablePropagation as $l, unwrap$1 as $n, makeSpanScoped as $o, toEpochMillis as $r, withFiber as $s, String$2 as $t, make$37 as $u, layer$8 as A, badArgument as Aa, split as Ac, exists as Ad, constUndefined as Af, mapError as Ai, TracerTimingEnabled as Al, make$11 as An, flatMap$2 as Ao, FilterGroup as Ar, serviceOption as As, Boolean$1 as At, headNonEmpty as Au, unwrap as B, nameServerFromInput as Ba, StackTrace as Bc, isNone as Bd, runForEach as Bi, isExit as Bl, toType as Bn, fromResult as Bo, null_ as Br, timeoutOption as Bs, Finite as Bt, prepend$1 as Bu, runMain as C, await_ as Ca, length as Cc, getOrUndefinedUnsafe as Cd, isObject as Cf, groupedWithin as Ci, forkUnsafe as Cl, isGreaterThanOrEqualTo as Cn, delay as Co, toArrayBuffer as Cr, retry as Cs, HttpClientErrorSchema as Ct, flatMap$5 as Cu, QuitError as D, interruptAllAs as Da, replace as Dc, merge$4 as Dd, compose$1 as Df, mapArray as Di, CurrentLogAnnotations as Dl, isPattern as Dn, fail$3 as Do, ChildProcessSpawner as Dr, runSync$1 as Ds, isHttpClientError as Dt, getUnsafe as Du, layer$1 as E, interruptAll as Ea, repeat$2 as Ec, makeUnsafe$6 as Ed, or as Ef, mapAccum as Ei, provide$3 as El, isMinLength as En, exit as Eo, make$18 as Er, runForkWith as Es, TransportError as Et, getSomes as Eu, String$1 as F, zero$1 as Fa, max as Fc, fromNullishOr as Fd, identity as Ff, orDie as Fi, makeUnsafe$5 as Fl, tag as Fn, forever as Fo, Union$1 as Fr, sync as Fs, Defect as Ft, last$1 as Fu, RpcSerialization as G, formatUrlUnsafe as Ga, fail$4 as Gc, match$6 as Gd, succeed$2 as Gi, effectIsExit as Gl, omit as Gn, interruptible as Go, string as Gr, uninterruptible as Gs, MutableJson as Gt, take$3 as Gu, Stdio as H, NetAddressError as Ha, combine as Hc, liftPredicate as Hd, runHead as Hi, isSuccess as Hl, withDecodingDefault as Hn, ignore as Ho, replaceChecks as Hr, transposeOption as Hs, Json as Ht, reverse as Hu, URL$1 as I, Dns as Ia, parse as Ic, fromUndefinedOr as Id, pipe as If, pipeThroughChannel as Ii, die$4 as Il, toCodecJson as In, forkChild as Io, decodeTo$1 as Ir, tap$1 as Is, Duration as It, lastNonEmpty as Iu, layerSchemaBinary as J, ipFromStringUnsafe as Ja, fromReasons as Jc, orElseSome as Jd, tap as Ji, forkUnsafe$1 as Jl, CurrentRedactedNames as Jn, logDebug as Jo, transform as Jr, updateService as Js, Null as Jt, keys$1 as Ju, json as K, inetAddressFromIpString as Ka, filterInterruptors as Kc, none as Kd, suspend as Ki, fiberEnterInterruptibleUnsafe as Kl, getReferenceKey as Kn, isEffect as Ko, toEncoded$1 as Kr, uninterruptibleMask as Ks, Never as Kt, takeRight as Ku, option as L, DnsError as La, round as Lc, getOrElse as Ld, pipeArguments as Lf, provideService as Li, fail$5 as Ll, toCodecStringTree as Ln, forkIn as Lo, isNever as Lr, tapCause as Ls, Error$1 as Lt, map$6 as Lu, Port as M, fromInputUnsafe as Ma, toLowerCase as Mc, flatMap$7 as Md, constant as Mf, mkString as Mi, doneUnsafe as Ml, mutable as Mn, fn as Mo, Objects as Mr, succeed$4 as Ms, Class as Mt, isReadonlyArrayEmpty as Mu, Record as N, gibibytes as Na, trim as Nc, flatMapNullishOr as Nd, dual as Nf, mkUint8Array as Ni, into as Nl, optional as Nn, fnUntraced as No, PropertySignature as Nr, succeedNone as Ns, DateTimeUtc as Nt, isReadonlyArrayNonEmpty as Nu, Terminal as O, interruptAs as Oa, replaceAll as Oc, all$4 as Od, constFalse$1 as Of, mapArrayEffect as Oi, CurrentLogSpans as Ol, isSchema as On, failCause$3 as Oo, Arrays as Or, scope as Os, Any as Ot, groupBy as Ou, Redacted as P, mebibytes as Pa, trimEnd as Pc, flatten$5 as Pd, flow as Pf, onEnd as Pi, isDeferred as Pl, optionalKey as Pn, forEach$1 as Po, Suspend as Pr, suspend$2 as Ps, DateTimeUtcFromString as Pt, join$1 as Pu, constPing as Q, isLoopback as Qa, interruptors as Qc, String$6 as Qd, unwrap$2 as Qi, sync$2 as Ql, setAll as Qn, logWarning as Qo, now as Qr, whileLoop as Qs, Redacted$1 as Qt, headUnsafe as Qu, schema as R, make$33 as Ra, Clock as Rc, getOrNull as Rd, run$1 as Ri, failCause$5 as Rl, toEncoded as Rn, forkScoped as Ro, isOptional as Rr, tapError as Rs, Exit as Rt, match$3 as Ru, make as S, makeUnsafe$2 as Sa, isNonEmpty as Sc, getOrUndefined as Sd, isNotUndefined as Sf, fromReadableStream as Si, closeUnsafe as Sl, is as Sn, contextWith as So, pipeThroughDuplex as Sr, result as Ss, HttpClientError as St, findLast as Su, errorReported as T, interrupt as Ta, padStart as Tc, make$39 as Td, isUndefined as Tf, map$1 as Ti, makeUnsafe$4 as Tl, isMaxLength as Tn, ensuring$2 as To, fromWritable as Tr, runFork as Ts, StatusCodeError as Tt, get$4 as Tu, withRun as U, formatInet as Ua, die$3 as Uc, liftThrowable as Ud, runLast as Ui, succeed$6 as Ul, withDecodingDefaultKey as Un, ignoreCause as Uo, resolveDescription as Ur, tryPromise as Us, Literal as Ut, some as Uu, withDefault as V, domainNameFromStringUnsafe as Va, annotate$1 as Vc, isSome as Vd, runForEachArray as Vi, isFailure as Vl, withConstructorDefault as Vn, gen as Vo, optionalKey$1 as Vr, timeoutOrElse as Vs, Int as Vt, reduce as Vu, withRunClient as W, formatIp as Wa, done as Wc, map$9 as Wd, scan as Wi, ConsoleRef as Wl, isSchemaError$1 as Wn, interrupt$1 as Wo, resolveIdentifier as Wr, try_ as Ws, Literals as Wt, sort as Wu, ResponseDefectEncoded as X, isInetAddressV6 as Xa, hasInterrupts as Xc, toArray as Xd, toReadableStreamEffect as Xi, onExitUnsafe as Xl, fromInput as Xn, logFatal as Xo, encode as Xr, void_$1 as Xs, Number$1 as Xt, toEntries as Xu, RequestId as Y, ipv4ToOctets as Ya, hasDies as Yc, some$1 as Yd, toReadableStream as Yi, makeSpanUnsafe as Yl, empty as Yn, logError as Yo, transformOptional as Yr, useSpan as Ys, NullOr as Yt, map$7 as Yu, constEof as Z, isLinkLocal as Za, hasInterruptsOnly as Zc, Number$5 as Zd, toReadableStreamWith as Zi, reportCauseUnsafe as Zl, redactUrl as Zn, logInfo as Zo, formatIso as Zr, when as Zs, Record$1 as Zt, empty$7 as Zu, Organization as _, shutdownUnsafe as _a, Random as _c, Reference as _d, hash as _f, fromChannel as _i, unwrap$5 as _l, encodeEffect as _n, catchReason$2 as _o, fromSetCookie as _r, provideContext$2 as _s, layerWebSocket as _t, every$1 as _u, FxConversation as a, pipeTo as aa, zipWith as ac, isSuccess$1 as ad, contE as af, catch_ as ai, buildWithMemoMap as al, URL$2 as an, annotateCurrentSpan as ao, empty$2 as ar, matchCauseEffectEager as as, isStreamSchema as at, random as au, LogToStderr as b, publishUnsafe as ba, includes as bc, empty$8 as bd, isNotNull as bf, fromPubSub as bi, addFinalizerExit as bl, encodeUnknownEffect as bn, catch_$2 as bo, toSetCookieHeaders as br, raceFirst as bs, EmptyBodyError as bt, findFirst as bu, GitHubIssue as c, bounded as ca, forever$1 as cc, try_$2 as cd, getStackTraceLimit as cf, die as ci, effectDiscard as cl, Uint8ArrayFromBase64 as cn, asSome as co, isRedactedName$1 as cr, onError as cs, Collector as ct, TaggedError$1 as cu, ImageType as d, failCause$2 as da, min as dc, max$1 as dd, Class$2 as df, fail$1 as di, mergeAll$2 as dl, Unknown as dn, callback$1 as do, set$1 as dr, onInterrupt as ds, Socket as dt, contains as du, fromPull$1 as ea, withFiberSucceed as ec, fail$7 as ed, flip$1 as ef, defaultFormatter as ei, isTimeoutError as el, StringFromUriComponent as en, isUnicast as eo, fromIterable as er, map$3 as es, ServerClient as et, ParentSpan as eu, Note as f, make$27 as fa, passthrough$2 as fc, millis as fd, NodeInspectSymbol as ff, failCause as fi, provide$2 as fl, decodeEffect as fn, catchCause$1 as fo, setAll$1 as fr, option$1 as fs, SocketError as ft, dedupe as fu, OEmbed as g, shutdown as ga, isDoneCause as gc, zero$2 as gd, equals$1 as gf, fromArray as gi, sync$1 as gl, decodeUnknownOption as gn, catchIf as go, empty$3 as gr, provide as gs, fromWebSocket as gt, ensure as gu, NotesError as h, offerUnsafe as ha, catchDone as hc, toMillis as hd, redact$2 as hf, flattenIterable as hi, succeedContext as hl, decodeUnknownEffect as hn, catchFilter$2 as ho, value as hr, promise as hs, SocketReadError as ht, empty$6 as hu, FileType as i, mkUint8Array$1 as ia, withTracerEnabled as ic, isResult as id, contA as if, catchTags as ii, CurrentMemoMap as il, Tuple as in, andThen as io, CurrentRedactedNames$1 as ir, matchCauseEffect as is, getStreamSchemas as it, nativeTracer as iu, Crypto as j, fromInput$2 as ja, startsWith as jc, filter$3 as jd, constVoid as jf, mergeAll as ji, _await as jl, makeFilter as jn, flatMapEager as jo, Literal$1 as jr, sleep as js, BooleanLiterals as jt, isArrayNonEmpty as ju, isQuitError as k, runIn as ka, slice as kc, contains$1 as kd, constTrue as kf, mapEffect as ki, MinimumLogLevel as kl, isSchemaError as kn, filterOrFail as ko, Filter as kr, scoped as ks, ArraySchema as kt, head as ku, GitHubReadme as l, collect as la, fromStep as lc, format$1 as ld, setStackTraceLimit as lf, empty$4 as li, launch as ll, UndefinedOr as ln, asVoid as lo, merge as lr, onExit$1 as ls, makeCollectorUnsafe as lt, taggedEnum as lu, NoteJson as m, offerAll as ma, toStep as mc, seconds as md, format$2 as mf, flatMap as mi, succeed$5 as ml, decodeTo as mn, catchDefect as mo, make$16 as mr, orElseSucceed as ms, SocketOpenError as mt, drop as mu, Capture as n, map$2 as na, withParentSpan as nc, fromOption$2 as nd, Prototype as nf, FileSystem as ni, prettyErrors as nl, TaggedError as nn, acquireRelease as no, fromIterable$2 as nr, mapError$2 as ns, isWrapper as nt, externalSpan as nu, FxStatus as o, make$26 as oa, addDelay as oc, match$4 as od, withFiber$1 as of, concat as oi, effect as ol, URLFromString as on, annotateLogs as oo, fromInput$1 as or, matchEffect as os, spanAttributes as ot, Error$2 as ou, NoteId as p, offer as pa, spaced as pc, parts as pd, toJson as pf, filter as pi, provideMerge as pl, decodeSync as pn, catchCauseIf as po, isRedacted as pr, orDie$2 as ps, SocketErrorReason as pt, dedupeAdjacentWith as pu, layerJson as q, ipFromString as qa, findError as qc, orElse as qd, takeUntil as qi, fiberEnterUninterruptibleUnsafe as ql, encodeUnknownEffect$1 as qn, log as qo, passthrough as qr, updateContext as qs, NonEmptyArray as qt, has$3 as qu, Extraction as r, mapError$1 as ra, withSpan as rc, isFailure$1 as rd, PipeInspectableProto as rf, catchReason as ri, squash as rl, TrueLiterals as rn, all$1 as ro, get as rr, match as rs, ClientAbort as rt, make$36 as ru, GitHubComment as s, makeUnsafe$1 as sa, exponential as sc, succeed$8 as sd, assignProperty as sf, decodeText$1 as si, effectContext as sl, Uint8Array$1 as sn, as as so, fromRecordUnsafe as sr, never$1 as ss, spanName as st, TaggedClass as su, RpcContracts as t, fromTransform$1 as ta, withLogSpan as tc, failVoid as td, mapInput as tf, Path$1 as ti, makeDieReason as tl, Struct as tn, unixPathAddress as to, has as tr, mapEager as ts, exitSchema as tt, Tracer as tu, GitHubRepo as u, end as ua, isSchedule as uc, fromInputUnsafe$1 as ud, BaseProto as uf, ensuring as ui, merge$3 as ul, Union as un, cached as uo, remove$1 as ur, onExitPrimitive as us, CloseEvent as ut, appendAll$1 as uu, Reader as v, take$1 as va, camelToSnake as vc, Service as vd, hasProperty as vf, fromEffect as vi, Scope as vl, encodeSync as vn, catchTag as vo, isEmpty as vr, provideService$2 as vs, layerWebSocketConstructorGlobal as vt, filter$2 as vu, errorExitCode as w, getCurrent as wa, match$1 as wc, getUnsafe$1 as wd, isTagged as wf, limitBytes as wi, make$35 as wl, isInt as wn, die$2 as wo, toUint8Array as wr, retryOrElse as ws, InvalidUrlError as wt, fromIterable$6 as wu, layer as x, unbounded as xa, isEmpty$1 as xc, get$5 as xd, isNotNullish as xf, fromQueue as xi, close as xl, fromJsonString as xn, context as xo, fromReadable as xr, repeat as xs, EncodeError as xt, findFirstIndex as xu, TikTokPage as y, takeAll as ya, endsWith as yc, add as yd, isIterable as yf, fromIterable$5 as yi, addFinalizer$1 as yl, encodeTo as yn, catchTags$1 as yo, parseHeader as yr, provideServiceEffect as ys, DecodeError as yt, filterMap as yu, succeed as z, makeRecordUnsafe as za, Done as zc, getOrUndefined$1 as zd, runCollect as zi, interrupt$2 as zl, toJsonSchemaDocument as zn, fromOption as zo, mapOrSame as zr, timeout as zs, FalseLiterals as zt, of as zu };
|