@sanurb/ringi 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +534 -1598
- package/dist/cli.mjs.map +1 -1
- package/dist/mcp.mjs +4 -4
- package/dist/runtime.mjs +2437 -2437
- package/dist/runtime.mjs.map +1 -1
- package/package.json +2 -1
- package/server/nitro.json +1 -1
- package/server/public/assets/{_reviewId-DdOpDx4U.js → _reviewId-DszBZzPS.js} +1 -1
- package/server/public/assets/{main-FvxVz-kD.js → main-BQVB_Z0Z.js} +2 -2
- package/server/public/assets/{new-DOyplRwM.js → new-BpF6zgAP.js} +1 -1
- package/server/public/assets/{reviews-CfbuF6ib.js → reviews-Cqy8KE2-.js} +1 -1
- package/server/public/assets/reviews-YuW-Er6I.js +1 -0
- package/server/public/assets/{routes-DNxq1Fba.js → routes-Bp_N1q52.js} +1 -1
- package/server/public/assets/{routes-Dp0ODZ55.js → routes-CdmXLllM.js} +1 -1
- package/server/server/_chunks/ssr-renderer.mjs +2 -2
- package/server/server/_libs/effect+[...].mjs +396 -193
- package/server/server/{_reviewId-AWnOGz5k.mjs → _reviewId-BBo0j3l1.mjs} +2 -2
- package/server/server/{_reviewId-p9mhYVwa.mjs → _reviewId-CBLnTeaJ.mjs} +2 -2
- package/server/server/{_reviewId-DAhmekJ2.mjs → _reviewId-Ce1qqku3.mjs} +3 -3
- package/server/server/_ssr/action-bar-C68xGnWW.mjs +1 -1
- package/server/server/_ssr/{api-handler-CstW2n82.mjs → api-handler-yxu7Cbl5.mjs} +35 -3
- package/server/server/_ssr/client-runtime-BoPuAEoA.mjs +1 -1
- package/server/server/_ssr/domain-rpc-3Ds9DPr0.mjs +1 -1
- package/server/server/_ssr/file-tree-CQ5w2GHh.mjs +1 -1
- package/server/server/_ssr/load-scoped-diff-NL2XAcdz.mjs +2 -2
- package/server/server/_ssr/new-BKl_G2Ks.mjs +1 -1
- package/server/server/_ssr/new-DCz5eHkb.mjs +1 -1
- package/server/server/_ssr/reviews-C7_NIhY8.mjs +1 -1
- package/server/server/_ssr/{router-DLxN8FOm.mjs → router-5hEjszhz.mjs} +4 -4
- package/server/server/_ssr/routes-lz0AN75A.mjs +1 -1
- package/server/server/_ssr/runtime-D9IbnMlF.mjs +1 -1
- package/server/server/_ssr/ssr.mjs +7 -7
- package/server/server/_ssr/todo-m_uUvxca.mjs +1 -1
- package/server/server/{_tanstack-start-manifest_v-CnL10NRH.mjs → _tanstack-start-manifest_v--jyOFxuR.mjs} +9 -9
- package/server/server/index.mjs +905 -905
- package/server/public/assets/reviews-CJvVXRLH.js +0 -1
|
@@ -1456,7 +1456,7 @@ var asEquivalence = () => equals$2;
|
|
|
1456
1456
|
* @category constructors
|
|
1457
1457
|
* @since 2.0.0
|
|
1458
1458
|
*/
|
|
1459
|
-
var make$
|
|
1459
|
+
var make$43 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
1460
1460
|
var isStrictEquivalent = (x, y) => x === y;
|
|
1461
1461
|
/**
|
|
1462
1462
|
* Creates an equivalence relation that uses strict equality (`===`) to compare values.
|
|
@@ -1566,7 +1566,7 @@ var strictEqual = () => isStrictEquivalent;
|
|
|
1566
1566
|
* @since 4.0.0
|
|
1567
1567
|
*/
|
|
1568
1568
|
function Tuple$2(elements) {
|
|
1569
|
-
return make$
|
|
1569
|
+
return make$43((self, that) => {
|
|
1570
1570
|
if (self.length !== that.length) return false;
|
|
1571
1571
|
for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
|
|
1572
1572
|
return true;
|
|
@@ -1576,7 +1576,7 @@ function Tuple$2(elements) {
|
|
|
1576
1576
|
* @since 4.0.0
|
|
1577
1577
|
*/
|
|
1578
1578
|
function Array_$1(item) {
|
|
1579
|
-
return make$
|
|
1579
|
+
return make$43((self, that) => {
|
|
1580
1580
|
if (self.length !== that.length) return false;
|
|
1581
1581
|
for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
|
|
1582
1582
|
return true;
|
|
@@ -2944,7 +2944,7 @@ var succeed$8 = (success) => {
|
|
|
2944
2944
|
* @category constructors
|
|
2945
2945
|
* @since 2.0.0
|
|
2946
2946
|
*/
|
|
2947
|
-
function make$
|
|
2947
|
+
function make$42(compare) {
|
|
2948
2948
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
2949
2949
|
}
|
|
2950
2950
|
/**
|
|
@@ -2982,7 +2982,7 @@ function make$41(compare) {
|
|
|
2982
2982
|
* @category instances
|
|
2983
2983
|
* @since 4.0.0
|
|
2984
2984
|
*/
|
|
2985
|
-
var Number$4 = /* @__PURE__ */ make$
|
|
2985
|
+
var Number$4 = /* @__PURE__ */ make$42((self, that) => {
|
|
2986
2986
|
if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
|
|
2987
2987
|
if (globalThis.Number.isNaN(self)) return -1;
|
|
2988
2988
|
if (globalThis.Number.isNaN(that)) return 1;
|
|
@@ -3022,7 +3022,7 @@ var Number$4 = /* @__PURE__ */ make$41((self, that) => {
|
|
|
3022
3022
|
* @category mapping
|
|
3023
3023
|
* @since 2.0.0
|
|
3024
3024
|
*/
|
|
3025
|
-
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make$
|
|
3025
|
+
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make$42((b1, b2) => self(f(b1), f(b2))));
|
|
3026
3026
|
/**
|
|
3027
3027
|
* Tests whether one value is strictly greater than another according to the given order.
|
|
3028
3028
|
*
|
|
@@ -3481,7 +3481,7 @@ var getOrUndefined$1 = /* @__PURE__ */ getOrElse$1(constUndefined);
|
|
|
3481
3481
|
* @category Mapping
|
|
3482
3482
|
* @since 2.0.0
|
|
3483
3483
|
*/
|
|
3484
|
-
var map$
|
|
3484
|
+
var map$11 = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? none() : some(f(self.value)));
|
|
3485
3485
|
/**
|
|
3486
3486
|
* Filters an `Option` using a predicate. Returns `None` if the predicate is
|
|
3487
3487
|
* not satisfied or the input is `None`.
|
|
@@ -3556,7 +3556,7 @@ var filter$4 = /* @__PURE__ */ dual(2, (self, predicate) => isNone(self) ? none(
|
|
|
3556
3556
|
* @category Equivalence
|
|
3557
3557
|
* @since 2.0.0
|
|
3558
3558
|
*/
|
|
3559
|
-
var makeEquivalence$4 = (isEquivalent) => make$
|
|
3559
|
+
var makeEquivalence$4 = (isEquivalent) => make$43((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value));
|
|
3560
3560
|
//#endregion
|
|
3561
3561
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/Result.js
|
|
3562
3562
|
/**
|
|
@@ -3728,7 +3728,7 @@ var mapError$5 = /* @__PURE__ */ dual(2, (self, f) => isFailure$3(self) ? fail$9
|
|
|
3728
3728
|
* @category Mapping
|
|
3729
3729
|
* @since 4.0.0
|
|
3730
3730
|
*/
|
|
3731
|
-
var map$
|
|
3731
|
+
var map$10 = /* @__PURE__ */ dual(2, (self, f) => isSuccess$3(self) ? succeed$7(f(self.success)) : fail$9(self.failure));
|
|
3732
3732
|
//#endregion
|
|
3733
3733
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/Tuple.js
|
|
3734
3734
|
/**
|
|
@@ -3870,7 +3870,7 @@ var has = /* @__PURE__ */ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
|
3870
3870
|
* @category mapping
|
|
3871
3871
|
* @since 2.0.0
|
|
3872
3872
|
*/
|
|
3873
|
-
var map$
|
|
3873
|
+
var map$9 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3874
3874
|
const out = { ...self };
|
|
3875
3875
|
for (const key of keys(self)) out[key] = f(self[key], key);
|
|
3876
3876
|
return out;
|
|
@@ -4389,7 +4389,7 @@ var of = (a) => [a];
|
|
|
4389
4389
|
* @category mapping
|
|
4390
4390
|
* @since 2.0.0
|
|
4391
4391
|
*/
|
|
4392
|
-
var map$
|
|
4392
|
+
var map$8 = /* @__PURE__ */ dual(2, (self, f) => self.map(f));
|
|
4393
4393
|
/**
|
|
4394
4394
|
* Creates an `Equivalence` for arrays based on an element `Equivalence`. Two
|
|
4395
4395
|
* arrays are equivalent when they have the same length and all elements are
|
|
@@ -4501,7 +4501,7 @@ var isBigDecimal = (u) => hasProperty(u, TypeId$44);
|
|
|
4501
4501
|
* @since 2.0.0
|
|
4502
4502
|
* @category constructors
|
|
4503
4503
|
*/
|
|
4504
|
-
var make$
|
|
4504
|
+
var make$41 = (value, scale) => {
|
|
4505
4505
|
const o = Object.create(BigDecimalProto);
|
|
4506
4506
|
o.value = value;
|
|
4507
4507
|
o.scale = scale;
|
|
@@ -4514,7 +4514,7 @@ var make$40 = (value, scale) => {
|
|
|
4514
4514
|
*/
|
|
4515
4515
|
var makeNormalizedUnsafe = (value, scale) => {
|
|
4516
4516
|
if (value !== bigint0$2 && value % bigint10 === bigint0$2) throw new RangeError("Value must be normalized");
|
|
4517
|
-
const o = make$
|
|
4517
|
+
const o = make$41(value, scale);
|
|
4518
4518
|
o.normalized = o;
|
|
4519
4519
|
return o;
|
|
4520
4520
|
};
|
|
@@ -4579,8 +4579,8 @@ var normalize = (self) => {
|
|
|
4579
4579
|
* @category scaling
|
|
4580
4580
|
*/
|
|
4581
4581
|
var scale = /* @__PURE__ */ dual(2, (self, scale) => {
|
|
4582
|
-
if (scale > self.scale) return make$
|
|
4583
|
-
if (scale < self.scale) return make$
|
|
4582
|
+
if (scale > self.scale) return make$41(self.value * bigint10 ** BigInt(scale - self.scale), scale);
|
|
4583
|
+
if (scale < self.scale) return make$41(self.value / bigint10 ** BigInt(self.scale - scale), scale);
|
|
4584
4584
|
return self;
|
|
4585
4585
|
});
|
|
4586
4586
|
/**
|
|
@@ -4599,7 +4599,7 @@ var scale = /* @__PURE__ */ dual(2, (self, scale) => {
|
|
|
4599
4599
|
* @since 2.0.0
|
|
4600
4600
|
* @category math
|
|
4601
4601
|
*/
|
|
4602
|
-
var abs = (n) => n.value < bigint0$2 ? make$
|
|
4602
|
+
var abs = (n) => n.value < bigint0$2 ? make$41(-n.value, n.scale) : n;
|
|
4603
4603
|
/**
|
|
4604
4604
|
* Provides an `Equivalence` instance for `BigDecimal` that determines equality between BigDecimal values.
|
|
4605
4605
|
*
|
|
@@ -4618,7 +4618,7 @@ var abs = (n) => n.value < bigint0$2 ? make$40(-n.value, n.scale) : n;
|
|
|
4618
4618
|
* @category instances
|
|
4619
4619
|
* @since 2.0.0
|
|
4620
4620
|
*/
|
|
4621
|
-
var Equivalence$5 = /* @__PURE__ */ make$
|
|
4621
|
+
var Equivalence$5 = /* @__PURE__ */ make$43((self, that) => {
|
|
4622
4622
|
if (self.scale > that.scale) return scale(that, self.scale).value === self.value;
|
|
4623
4623
|
if (self.scale < that.scale) return scale(self, that.scale).value === that.value;
|
|
4624
4624
|
return self.value === that.value;
|
|
@@ -4804,7 +4804,7 @@ var fromInputUnsafe = (input) => {
|
|
|
4804
4804
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero;
|
|
4805
4805
|
if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
|
|
4806
4806
|
if (input[0] === Infinity || input[1] === Infinity) return infinity;
|
|
4807
|
-
return make$
|
|
4807
|
+
return make$40(BigInt(Math.round(input[0] * 1e9)) + BigInt(Math.round(input[1])));
|
|
4808
4808
|
}
|
|
4809
4809
|
const obj = input;
|
|
4810
4810
|
let millis = 0;
|
|
@@ -4814,11 +4814,11 @@ var fromInputUnsafe = (input) => {
|
|
|
4814
4814
|
if (obj.minutes) millis += obj.minutes * 6e4;
|
|
4815
4815
|
if (obj.seconds) millis += obj.seconds * 1e3;
|
|
4816
4816
|
if (obj.milliseconds) millis += obj.milliseconds;
|
|
4817
|
-
if (!obj.microseconds && !obj.nanoseconds) return make$
|
|
4817
|
+
if (!obj.microseconds && !obj.nanoseconds) return make$40(millis);
|
|
4818
4818
|
let nanos = BigInt(millis) * bigint1e6;
|
|
4819
4819
|
if (obj.microseconds) nanos += BigInt(obj.microseconds) * bigint1e3;
|
|
4820
4820
|
if (obj.nanoseconds) nanos += BigInt(obj.nanoseconds);
|
|
4821
|
-
return make$
|
|
4821
|
+
return make$40(nanos);
|
|
4822
4822
|
}
|
|
4823
4823
|
}
|
|
4824
4824
|
return invalid(input);
|
|
@@ -4877,7 +4877,7 @@ var DurationProto = {
|
|
|
4877
4877
|
return pipeArguments(this, arguments);
|
|
4878
4878
|
}
|
|
4879
4879
|
};
|
|
4880
|
-
var make$
|
|
4880
|
+
var make$40 = (input) => {
|
|
4881
4881
|
const duration = Object.create(DurationProto);
|
|
4882
4882
|
if (typeof input === "number") if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
|
|
4883
4883
|
else if (!Number.isFinite(input)) duration.value = input > 0 ? infinityDurationValue : negativeInfinityDurationValue;
|
|
@@ -4924,7 +4924,7 @@ var isDuration = (u) => hasProperty(u, TypeId$43);
|
|
|
4924
4924
|
* @since 2.0.0
|
|
4925
4925
|
* @category constructors
|
|
4926
4926
|
*/
|
|
4927
|
-
var zero = /* @__PURE__ */ make$
|
|
4927
|
+
var zero = /* @__PURE__ */ make$40(0);
|
|
4928
4928
|
/**
|
|
4929
4929
|
* A Duration representing infinite time.
|
|
4930
4930
|
*
|
|
@@ -4938,7 +4938,7 @@ var zero = /* @__PURE__ */ make$39(0);
|
|
|
4938
4938
|
* @since 2.0.0
|
|
4939
4939
|
* @category constructors
|
|
4940
4940
|
*/
|
|
4941
|
-
var infinity = /* @__PURE__ */ make$
|
|
4941
|
+
var infinity = /* @__PURE__ */ make$40(Infinity);
|
|
4942
4942
|
/**
|
|
4943
4943
|
* A Duration representing negative infinite time.
|
|
4944
4944
|
*
|
|
@@ -4952,7 +4952,7 @@ var infinity = /* @__PURE__ */ make$39(Infinity);
|
|
|
4952
4952
|
* @since 4.0.0
|
|
4953
4953
|
* @category constructors
|
|
4954
4954
|
*/
|
|
4955
|
-
var negativeInfinity = /* @__PURE__ */ make$
|
|
4955
|
+
var negativeInfinity = /* @__PURE__ */ make$40(-Infinity);
|
|
4956
4956
|
/**
|
|
4957
4957
|
* Creates a Duration from nanoseconds.
|
|
4958
4958
|
*
|
|
@@ -4967,7 +4967,7 @@ var negativeInfinity = /* @__PURE__ */ make$39(-Infinity);
|
|
|
4967
4967
|
* @since 2.0.0
|
|
4968
4968
|
* @category constructors
|
|
4969
4969
|
*/
|
|
4970
|
-
var nanos = (nanos) => make$
|
|
4970
|
+
var nanos = (nanos) => make$40(nanos);
|
|
4971
4971
|
/**
|
|
4972
4972
|
* Creates a Duration from microseconds.
|
|
4973
4973
|
*
|
|
@@ -4982,7 +4982,7 @@ var nanos = (nanos) => make$39(nanos);
|
|
|
4982
4982
|
* @since 2.0.0
|
|
4983
4983
|
* @category constructors
|
|
4984
4984
|
*/
|
|
4985
|
-
var micros = (micros) => make$
|
|
4985
|
+
var micros = (micros) => make$40(micros * bigint1e3);
|
|
4986
4986
|
/**
|
|
4987
4987
|
* Creates a Duration from milliseconds.
|
|
4988
4988
|
*
|
|
@@ -4997,7 +4997,7 @@ var micros = (micros) => make$39(micros * bigint1e3);
|
|
|
4997
4997
|
* @since 2.0.0
|
|
4998
4998
|
* @category constructors
|
|
4999
4999
|
*/
|
|
5000
|
-
var millis = (millis) => make$
|
|
5000
|
+
var millis = (millis) => make$40(millis);
|
|
5001
5001
|
/**
|
|
5002
5002
|
* Creates a Duration from seconds.
|
|
5003
5003
|
*
|
|
@@ -5012,7 +5012,7 @@ var millis = (millis) => make$39(millis);
|
|
|
5012
5012
|
* @since 2.0.0
|
|
5013
5013
|
* @category constructors
|
|
5014
5014
|
*/
|
|
5015
|
-
var seconds = (seconds) => make$
|
|
5015
|
+
var seconds = (seconds) => make$40(seconds * 1e3);
|
|
5016
5016
|
/**
|
|
5017
5017
|
* Creates a Duration from minutes.
|
|
5018
5018
|
*
|
|
@@ -5027,7 +5027,7 @@ var seconds = (seconds) => make$39(seconds * 1e3);
|
|
|
5027
5027
|
* @since 2.0.0
|
|
5028
5028
|
* @category constructors
|
|
5029
5029
|
*/
|
|
5030
|
-
var minutes = (minutes) => make$
|
|
5030
|
+
var minutes = (minutes) => make$40(minutes * 6e4);
|
|
5031
5031
|
/**
|
|
5032
5032
|
* Creates a Duration from hours.
|
|
5033
5033
|
*
|
|
@@ -5042,7 +5042,7 @@ var minutes = (minutes) => make$39(minutes * 6e4);
|
|
|
5042
5042
|
* @since 2.0.0
|
|
5043
5043
|
* @category constructors
|
|
5044
5044
|
*/
|
|
5045
|
-
var hours = (hours) => make$
|
|
5045
|
+
var hours = (hours) => make$40(hours * 36e5);
|
|
5046
5046
|
/**
|
|
5047
5047
|
* Creates a Duration from days.
|
|
5048
5048
|
*
|
|
@@ -5057,7 +5057,7 @@ var hours = (hours) => make$39(hours * 36e5);
|
|
|
5057
5057
|
* @since 2.0.0
|
|
5058
5058
|
* @category constructors
|
|
5059
5059
|
*/
|
|
5060
|
-
var days = (days) => make$
|
|
5060
|
+
var days = (days) => make$40(days * 864e5);
|
|
5061
5061
|
/**
|
|
5062
5062
|
* Creates a Duration from weeks.
|
|
5063
5063
|
*
|
|
@@ -5072,7 +5072,7 @@ var days = (days) => make$39(days * 864e5);
|
|
|
5072
5072
|
* @since 2.0.0
|
|
5073
5073
|
* @category constructors
|
|
5074
5074
|
*/
|
|
5075
|
-
var weeks = (weeks) => make$
|
|
5075
|
+
var weeks = (weeks) => make$40(weeks * 6048e5);
|
|
5076
5076
|
/**
|
|
5077
5077
|
* Converts a Duration to milliseconds.
|
|
5078
5078
|
*
|
|
@@ -5320,7 +5320,7 @@ var ServiceProto = {
|
|
|
5320
5320
|
return self;
|
|
5321
5321
|
},
|
|
5322
5322
|
serviceMap(self) {
|
|
5323
|
-
return make$
|
|
5323
|
+
return make$39(this, self);
|
|
5324
5324
|
},
|
|
5325
5325
|
use(f) {
|
|
5326
5326
|
return withFiber$1((fiber) => f(get$1(fiber.services, this)));
|
|
@@ -5443,7 +5443,7 @@ var emptyServiceMap = /* @__PURE__ */ makeUnsafe$7(/* @__PURE__ */ new Map());
|
|
|
5443
5443
|
* @since 4.0.0
|
|
5444
5444
|
* @category Constructors
|
|
5445
5445
|
*/
|
|
5446
|
-
var make$
|
|
5446
|
+
var make$39 = (key, service) => makeUnsafe$7(new Map([[key.key, service]]));
|
|
5447
5447
|
/**
|
|
5448
5448
|
* Adds a service to a given `ServiceMap`.
|
|
5449
5449
|
*
|
|
@@ -5671,7 +5671,7 @@ var getOption = /* @__PURE__ */ dual(2, (self, service) => {
|
|
|
5671
5671
|
* @since 4.0.0
|
|
5672
5672
|
* @category Utils
|
|
5673
5673
|
*/
|
|
5674
|
-
var merge$
|
|
5674
|
+
var merge$3 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
5675
5675
|
if (self.mapUnsafe.size === 0) return that;
|
|
5676
5676
|
if (that.mapUnsafe.size === 0) return self;
|
|
5677
5677
|
return withMapUnsafe(self, (map) => {
|
|
@@ -5924,7 +5924,7 @@ var ParentSpan = class extends Service()(ParentSpanKey) {};
|
|
|
5924
5924
|
* @since 2.0.0
|
|
5925
5925
|
* @category constructors
|
|
5926
5926
|
*/
|
|
5927
|
-
var make$
|
|
5927
|
+
var make$38 = (options) => options;
|
|
5928
5928
|
/**
|
|
5929
5929
|
* @since 2.0.0
|
|
5930
5930
|
* @category constructors
|
|
@@ -6009,7 +6009,7 @@ var TracerKey = "effect/Tracer";
|
|
|
6009
6009
|
* })
|
|
6010
6010
|
* ```
|
|
6011
6011
|
*/
|
|
6012
|
-
var Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$
|
|
6012
|
+
var Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$38({ span: (options) => new NativeSpan(options) }) });
|
|
6013
6013
|
/**
|
|
6014
6014
|
* @since 4.0.0
|
|
6015
6015
|
* @category native tracer
|
|
@@ -6407,7 +6407,7 @@ var FiberImpl = class {
|
|
|
6407
6407
|
interruptUnsafe(fiberId, annotations) {
|
|
6408
6408
|
if (this._exit) return;
|
|
6409
6409
|
let cause = causeInterrupt(fiberId);
|
|
6410
|
-
if (this.currentStackFrame) cause = causeAnnotate(cause, make$
|
|
6410
|
+
if (this.currentStackFrame) cause = causeAnnotate(cause, make$39(StackTraceKey, this.currentStackFrame));
|
|
6411
6411
|
if (annotations) cause = causeAnnotate(cause, annotations);
|
|
6412
6412
|
this._interruptedCause = this._interruptedCause ? causeCombine(this._interruptedCause, cause) : cause;
|
|
6413
6413
|
if (this.interruptible) this.evaluate(failCause$4(this._interruptedCause));
|
|
@@ -6557,7 +6557,7 @@ var fiberInterrupt = (self) => withFiber$1((fiber) => fiberInterruptAs(self, fib
|
|
|
6557
6557
|
/** @internal */
|
|
6558
6558
|
var fiberInterruptAs = /* @__PURE__ */ dual((args) => hasProperty(args[0], FiberTypeId), (self, fiberId, annotations) => withFiber$1((parent) => {
|
|
6559
6559
|
let ann = fiberStackAnnotations(parent);
|
|
6560
|
-
ann = ann && annotations ? merge$
|
|
6560
|
+
ann = ann && annotations ? merge$3(ann, annotations) : ann ?? annotations;
|
|
6561
6561
|
self.interruptUnsafe(fiberId, ann);
|
|
6562
6562
|
return asVoid$2(fiberAwait(self));
|
|
6563
6563
|
}));
|
|
@@ -6798,7 +6798,7 @@ var as$1 = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
6798
6798
|
return flatMap$3(self, (_) => b);
|
|
6799
6799
|
});
|
|
6800
6800
|
/** @internal */
|
|
6801
|
-
var asSome$1 = (self) => map$
|
|
6801
|
+
var asSome$1 = (self) => map$7(self, some);
|
|
6802
6802
|
/** @internal */
|
|
6803
6803
|
var andThen$1 = /* @__PURE__ */ dual(2, (self, f) => flatMap$3(self, (a) => isEffect$1(f) ? f : internalCall(() => f(a))));
|
|
6804
6804
|
/** @internal */
|
|
@@ -6863,9 +6863,9 @@ var flatMapEager$1 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
6863
6863
|
/** @internal */
|
|
6864
6864
|
var flatten$2 = (self) => flatMap$3(self, identity);
|
|
6865
6865
|
/** @internal */
|
|
6866
|
-
var map$
|
|
6866
|
+
var map$7 = /* @__PURE__ */ dual(2, (self, f) => flatMap$3(self, (a) => succeed$6(internalCall(() => f(a)))));
|
|
6867
6867
|
/** @internal */
|
|
6868
|
-
var mapEager$1 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map$
|
|
6868
|
+
var mapEager$1 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map$7(self, f));
|
|
6869
6869
|
/** @internal */
|
|
6870
6870
|
var mapErrorEager$1 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMapError(self, f) : mapError$4(self, f));
|
|
6871
6871
|
/** @internal */
|
|
@@ -6941,7 +6941,7 @@ var servicesWith$1 = (f) => withFiber$1((fiber) => f(fiber.services));
|
|
|
6941
6941
|
/** @internal */
|
|
6942
6942
|
var provideServices$3 = /* @__PURE__ */ dual(2, (self, services) => {
|
|
6943
6943
|
if (effectIsExit(self)) return self;
|
|
6944
|
-
return updateServices$1(self, merge$
|
|
6944
|
+
return updateServices$1(self, merge$3(services));
|
|
6945
6945
|
});
|
|
6946
6946
|
/** @internal */
|
|
6947
6947
|
var provideService$1 = function() {
|
|
@@ -7087,6 +7087,8 @@ var exitPrimitive = /* @__PURE__ */ makePrimitive({
|
|
|
7087
7087
|
}
|
|
7088
7088
|
});
|
|
7089
7089
|
/** @internal */
|
|
7090
|
+
var delay$1 = /* @__PURE__ */ dual(2, (self, duration) => andThen$1(sleep$1(duration), self));
|
|
7091
|
+
/** @internal */
|
|
7090
7092
|
var timeoutOrElse$1 = /* @__PURE__ */ dual(2, (self, options) => raceFirst$1(self, flatMap$3(sleep$1(options.duration), options.orElse)));
|
|
7091
7093
|
/** @internal */
|
|
7092
7094
|
var timeout$1 = /* @__PURE__ */ dual(2, (self, duration) => timeoutOrElse$1(self, {
|
|
@@ -7271,7 +7273,7 @@ var cachedInvalidateWithTTL$1 = /* @__PURE__ */ dual(2, (self, ttl) => sync$1(()
|
|
|
7271
7273
|
})];
|
|
7272
7274
|
}));
|
|
7273
7275
|
/** @internal */
|
|
7274
|
-
var cachedWithTTL$1 = /* @__PURE__ */ dual(2, (self, timeToLive) => map$
|
|
7276
|
+
var cachedWithTTL$1 = /* @__PURE__ */ dual(2, (self, timeToLive) => map$7(cachedInvalidateWithTTL$1(self, timeToLive), (tuple) => tuple[0]));
|
|
7275
7277
|
/** @internal */
|
|
7276
7278
|
var cached$1 = (self) => cachedWithTTL$1(self, infinity);
|
|
7277
7279
|
/** @internal */
|
|
@@ -8233,7 +8235,7 @@ var hasInterruptsOnly = hasInterruptsOnly$1;
|
|
|
8233
8235
|
* @category mapping
|
|
8234
8236
|
* @since 4.0.0
|
|
8235
8237
|
*/
|
|
8236
|
-
var map$
|
|
8238
|
+
var map$6 = causeMap;
|
|
8237
8239
|
/**
|
|
8238
8240
|
* Merges two causes into a single cause whose `reasons` array is the union
|
|
8239
8241
|
* of both inputs (de-duplicated by value equality).
|
|
@@ -9124,7 +9126,7 @@ var Scope = scopeTag;
|
|
|
9124
9126
|
* @category constructors
|
|
9125
9127
|
* @since 2.0.0
|
|
9126
9128
|
*/
|
|
9127
|
-
var make$
|
|
9129
|
+
var make$37 = scopeMake;
|
|
9128
9130
|
/**
|
|
9129
9131
|
* Creates a new `Scope` synchronously without wrapping it in an `Effect`.
|
|
9130
9132
|
* This is useful when you need a scope immediately but should be used with caution
|
|
@@ -9555,7 +9557,7 @@ var CurrentMemoMap = class extends Service()("effect/Layer/CurrentMemoMap") {
|
|
|
9555
9557
|
* @since 2.0.0
|
|
9556
9558
|
* @category memo map
|
|
9557
9559
|
*/
|
|
9558
|
-
var buildWithMemoMap = /* @__PURE__ */ dual(3, (self, memoMap, scope) => provideService$1(map$
|
|
9560
|
+
var buildWithMemoMap = /* @__PURE__ */ dual(3, (self, memoMap, scope) => provideService$1(map$7(self.build(memoMap, scope), add$2(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
|
|
9559
9561
|
/**
|
|
9560
9562
|
* Builds a layer into an `Effect` value. Any resources associated with this
|
|
9561
9563
|
* layer will be released when the specified scope is closed unless their scope
|
|
@@ -9640,8 +9642,8 @@ var buildWithScope = /* @__PURE__ */ dual(2, (self, scope) => withFiber$1((fiber
|
|
|
9640
9642
|
* @category constructors
|
|
9641
9643
|
*/
|
|
9642
9644
|
var succeed$4 = function() {
|
|
9643
|
-
if (arguments.length === 1) return (resource) => succeedServices(make$
|
|
9644
|
-
return succeedServices(make$
|
|
9645
|
+
if (arguments.length === 1) return (resource) => succeedServices(make$39(arguments[0], resource));
|
|
9646
|
+
return succeedServices(make$39(arguments[0], arguments[1]));
|
|
9645
9647
|
};
|
|
9646
9648
|
/**
|
|
9647
9649
|
* Constructs a layer from the specified value, which must return one or more
|
|
@@ -9713,7 +9715,7 @@ var effect = function() {
|
|
|
9713
9715
|
if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
|
|
9714
9716
|
return effectImpl(arguments[0], arguments[1]);
|
|
9715
9717
|
};
|
|
9716
|
-
var effectImpl = (service, effect) => effectServices(map$
|
|
9718
|
+
var effectImpl = (service, effect) => effectServices(map$7(effect, (value) => make$39(service, value)));
|
|
9717
9719
|
/**
|
|
9718
9720
|
* Constructs a layer from the specified scoped effect, which must return one
|
|
9719
9721
|
* or more services.
|
|
@@ -9770,7 +9772,7 @@ var effectServices = (effect) => fromBuildMemo((_, scope) => provide$4(effect, s
|
|
|
9770
9772
|
var effectDiscard = (effect) => effectServices(as$1(effect, empty$9()));
|
|
9771
9773
|
var mergeAllEffect = (layers, memoMap, scope) => {
|
|
9772
9774
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
9773
|
-
return forEach$1(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$
|
|
9775
|
+
return forEach$1(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$7((services) => mergeAll$2(...services)));
|
|
9774
9776
|
};
|
|
9775
9777
|
/**
|
|
9776
9778
|
* Combines all the provided layers concurrently, creating a new layer with merged input, error, and output types.
|
|
@@ -9804,7 +9806,7 @@ var mergeAllEffect = (layers, memoMap, scope) => {
|
|
|
9804
9806
|
* @category zipping
|
|
9805
9807
|
*/
|
|
9806
9808
|
var mergeAll$1 = (...layers) => fromBuild((memoMap, scope) => mergeAllEffect(layers, memoMap, scope));
|
|
9807
|
-
var provideWith = (self, that, f) => fromBuild((memoMap, scope) => flatMap$3(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope) : that.build(memoMap, scope), (context) => self.build(memoMap, scope).pipe(provideServices$3(context), map$
|
|
9809
|
+
var provideWith = (self, that, f) => fromBuild((memoMap, scope) => flatMap$3(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope) : that.build(memoMap, scope), (context) => self.build(memoMap, scope).pipe(provideServices$3(context), map$7((merged) => f(merged, context)))));
|
|
9808
9810
|
/**
|
|
9809
9811
|
* Feeds the output services of this builder into the input of the specified
|
|
9810
9812
|
* builder, resulting in a new builder with the inputs of this builder as
|
|
@@ -9944,7 +9946,7 @@ var provide$3 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that,
|
|
|
9944
9946
|
* @since 2.0.0
|
|
9945
9947
|
* @category utils
|
|
9946
9948
|
*/
|
|
9947
|
-
var provideMerge = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, (self, that) => merge$
|
|
9949
|
+
var provideMerge = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, (self, that) => merge$3(that, self)));
|
|
9948
9950
|
//#endregion
|
|
9949
9951
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/ExecutionPlan.js
|
|
9950
9952
|
/**
|
|
@@ -10271,7 +10273,7 @@ var metadataFn = () => {
|
|
|
10271
10273
|
* @since 4.0.0
|
|
10272
10274
|
* @category constructors
|
|
10273
10275
|
*/
|
|
10274
|
-
var fromStepWithMetadata = (step) => fromStep(map$
|
|
10276
|
+
var fromStepWithMetadata = (step) => fromStep(map$7(step, (f) => {
|
|
10275
10277
|
const meta = metadataFn();
|
|
10276
10278
|
return (now, input) => f(meta(now, input));
|
|
10277
10279
|
}));
|
|
@@ -10307,7 +10309,7 @@ var toStep = (schedule) => catchCause$2(schedule.step, (cause) => succeed$6(() =
|
|
|
10307
10309
|
* @since 4.0.0
|
|
10308
10310
|
* @category destructors
|
|
10309
10311
|
*/
|
|
10310
|
-
var toStepWithMetadata = (schedule) => clockWith$2((clock) => map$
|
|
10312
|
+
var toStepWithMetadata = (schedule) => clockWith$2((clock) => map$7(toStep(schedule), (step) => {
|
|
10311
10313
|
const metaFn = metadataFn();
|
|
10312
10314
|
return (input) => suspend$4(() => {
|
|
10313
10315
|
const now = clock.currentTimeMillisUnsafe();
|
|
@@ -10402,7 +10404,7 @@ var exponential = (base, factor = 2) => {
|
|
|
10402
10404
|
* @since 2.0.0
|
|
10403
10405
|
* @category utilities
|
|
10404
10406
|
*/
|
|
10405
|
-
var passthrough$2 = (self) => fromStep(map$
|
|
10407
|
+
var passthrough$2 = (self) => fromStep(map$7(toStep(self), (step) => (now, input) => matchEffect$1(step(now, input), {
|
|
10406
10408
|
onSuccess: (result) => succeed$6([input, result[1]]),
|
|
10407
10409
|
onFailure: failCause$4,
|
|
10408
10410
|
onDone: () => done$1(input)
|
|
@@ -10460,7 +10462,7 @@ var spaced = (duration) => {
|
|
|
10460
10462
|
const decoded = fromInputUnsafe(duration);
|
|
10461
10463
|
return fromStepWithMetadata(succeed$6((meta) => succeed$6([meta.attempt - 1, decoded])));
|
|
10462
10464
|
};
|
|
10463
|
-
var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map$
|
|
10465
|
+
var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map$7(toStep(self), (step) => {
|
|
10464
10466
|
const meta = metadataFn();
|
|
10465
10467
|
return (now, input) => flatMap$3(step(now, input), (result) => {
|
|
10466
10468
|
const [output, duration] = result;
|
|
@@ -10545,7 +10547,7 @@ var buildFromOptions = (options) => {
|
|
|
10545
10547
|
});
|
|
10546
10548
|
if (options.until) schedule = while_(schedule, ({ input }) => {
|
|
10547
10549
|
const applied = options.until(input);
|
|
10548
|
-
return isEffect$1(applied) ? map$
|
|
10550
|
+
return isEffect$1(applied) ? map$7(applied, (b) => !b) : succeed$6(!applied);
|
|
10549
10551
|
});
|
|
10550
10552
|
if (options.times !== void 0) schedule = while_(schedule, ({ attempt }) => succeed$6(attempt <= options.times));
|
|
10551
10553
|
return schedule;
|
|
@@ -11582,7 +11584,7 @@ var exit = exit$1;
|
|
|
11582
11584
|
* @since 2.0.0
|
|
11583
11585
|
* @category Mapping
|
|
11584
11586
|
*/
|
|
11585
|
-
var map$
|
|
11587
|
+
var map$4 = map$7;
|
|
11586
11588
|
/**
|
|
11587
11589
|
* Replaces the value inside an effect with a constant value.
|
|
11588
11590
|
*
|
|
@@ -12103,6 +12105,27 @@ var orElseSucceed = orElseSucceed$1;
|
|
|
12103
12105
|
*/
|
|
12104
12106
|
var timeout = timeout$1;
|
|
12105
12107
|
/**
|
|
12108
|
+
* Returns an effect that is delayed from this effect by the specified
|
|
12109
|
+
* `Duration`.
|
|
12110
|
+
*
|
|
12111
|
+
* @example
|
|
12112
|
+
* ```ts
|
|
12113
|
+
* import { Console, Effect } from "effect"
|
|
12114
|
+
*
|
|
12115
|
+
* const program = Effect.delay(
|
|
12116
|
+
* Console.log("Delayed message"),
|
|
12117
|
+
* "1 second"
|
|
12118
|
+
* )
|
|
12119
|
+
*
|
|
12120
|
+
* Effect.runFork(program)
|
|
12121
|
+
* // Waits 1 second, then prints: "Delayed message"
|
|
12122
|
+
* ```
|
|
12123
|
+
*
|
|
12124
|
+
* @since 2.0.0
|
|
12125
|
+
* @category Delays & Timeouts
|
|
12126
|
+
*/
|
|
12127
|
+
var delay = delay$1;
|
|
12128
|
+
/**
|
|
12106
12129
|
* Handles both success and failure cases of an effect without performing side
|
|
12107
12130
|
* effects.
|
|
12108
12131
|
*
|
|
@@ -14378,7 +14401,7 @@ var decodeBase64$1 = (str) => {
|
|
|
14378
14401
|
* @since 4.0.0
|
|
14379
14402
|
* @category decoding
|
|
14380
14403
|
*/
|
|
14381
|
-
var decodeBase64String = (str) => map$
|
|
14404
|
+
var decodeBase64String = (str) => map$10(decodeBase64$1(str), (_) => decoder.decode(_));
|
|
14382
14405
|
var encoder$1 = /* @__PURE__ */ new TextEncoder();
|
|
14383
14406
|
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
14384
14407
|
var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
|
|
@@ -14701,7 +14724,7 @@ var isRedacted = (u) => hasProperty(u, TypeId$35);
|
|
|
14701
14724
|
* @since 3.3.0
|
|
14702
14725
|
* @category constructors
|
|
14703
14726
|
*/
|
|
14704
|
-
var make$
|
|
14727
|
+
var make$34 = (value, options) => {
|
|
14705
14728
|
const self = Object.create(Proto$13);
|
|
14706
14729
|
if (options?.label) self.label = options.label;
|
|
14707
14730
|
redactedRegistry.set(self, value);
|
|
@@ -15256,7 +15279,7 @@ var OneOf = class extends Base$1 {
|
|
|
15256
15279
|
}
|
|
15257
15280
|
};
|
|
15258
15281
|
/** @internal */
|
|
15259
|
-
function make$
|
|
15282
|
+
function make$33(input, out) {
|
|
15260
15283
|
if (isIssue(out)) return out;
|
|
15261
15284
|
if (out === void 0) return;
|
|
15262
15285
|
if (typeof out === "boolean") return out ? void 0 : new InvalidValue(some(input));
|
|
@@ -15584,7 +15607,7 @@ var Getter = class Getter extends Class$3 {
|
|
|
15584
15607
|
this.run = run;
|
|
15585
15608
|
}
|
|
15586
15609
|
map(f) {
|
|
15587
|
-
return new Getter((oe, options) => this.run(oe, options).pipe(mapEager(map$
|
|
15610
|
+
return new Getter((oe, options) => this.run(oe, options).pipe(mapEager(map$11(f))));
|
|
15588
15611
|
}
|
|
15589
15612
|
compose(other) {
|
|
15590
15613
|
if (isPassthrough(this)) return other;
|
|
@@ -15669,7 +15692,7 @@ function onSome(f) {
|
|
|
15669
15692
|
* @since 4.0.0
|
|
15670
15693
|
*/
|
|
15671
15694
|
function transform$2(f) {
|
|
15672
|
-
return transformOptional(map$
|
|
15695
|
+
return transformOptional(map$11(f));
|
|
15673
15696
|
}
|
|
15674
15697
|
/**
|
|
15675
15698
|
* Creates a getter that applies a fallible, effectful transformation to present values.
|
|
@@ -16175,7 +16198,7 @@ function isTransformation(u) {
|
|
|
16175
16198
|
*
|
|
16176
16199
|
* @since 4.0.0
|
|
16177
16200
|
*/
|
|
16178
|
-
var make$
|
|
16201
|
+
var make$32 = (options) => {
|
|
16179
16202
|
if (isTransformation(options)) return options;
|
|
16180
16203
|
return new Transformation(options.decode, options.encode);
|
|
16181
16204
|
};
|
|
@@ -17866,7 +17889,7 @@ var FilterGroup = class FilterGroup extends Class$3 {
|
|
|
17866
17889
|
};
|
|
17867
17890
|
/** @internal */
|
|
17868
17891
|
function makeFilter$1(filter, annotations, aborted = false) {
|
|
17869
|
-
return new Filter((input, ast, options) => make$
|
|
17892
|
+
return new Filter((input, ast, options) => make$33(input, filter(input, ast, options)), annotations, aborted);
|
|
17870
17893
|
}
|
|
17871
17894
|
/**
|
|
17872
17895
|
* Creates a {@link Filter} that validates strings against a regular expression.
|
|
@@ -18406,7 +18429,7 @@ var lambda = (f) => f;
|
|
|
18406
18429
|
/**
|
|
18407
18430
|
* @since 4.0.0
|
|
18408
18431
|
*/
|
|
18409
|
-
var map$
|
|
18432
|
+
var map$3 = /* @__PURE__ */ dual(2, (self, f) => self === void 0 ? void 0 : f(self));
|
|
18410
18433
|
/**
|
|
18411
18434
|
* @since 4.0.0
|
|
18412
18435
|
*/
|
|
@@ -18740,11 +18763,11 @@ var SchemaProto = {
|
|
|
18740
18763
|
}
|
|
18741
18764
|
};
|
|
18742
18765
|
/** @internal */
|
|
18743
|
-
function make$
|
|
18766
|
+
function make$31(ast, options) {
|
|
18744
18767
|
const self = Object.create(SchemaProto);
|
|
18745
18768
|
if (options) Object.assign(self, options);
|
|
18746
18769
|
self.ast = ast;
|
|
18747
|
-
self.rebuild = (ast) => make$
|
|
18770
|
+
self.rebuild = (ast) => make$31(ast, options);
|
|
18748
18771
|
self.makeUnsafe = makeUnsafe$2(self);
|
|
18749
18772
|
self.makeOption = makeOption(self);
|
|
18750
18773
|
return self;
|
|
@@ -18762,7 +18785,7 @@ function toCodecJsonBase(ast) {
|
|
|
18762
18785
|
case "Declaration": {
|
|
18763
18786
|
const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
|
|
18764
18787
|
if (isFunction(getLink)) {
|
|
18765
|
-
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$
|
|
18788
|
+
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$31(toEncoded$1(tp))) : []);
|
|
18766
18789
|
const to = toCodecJson$1(link.to);
|
|
18767
18790
|
return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
|
|
18768
18791
|
}
|
|
@@ -18824,7 +18847,7 @@ function fromASTs$1(asts) {
|
|
|
18824
18847
|
const uniqueReferences = /* @__PURE__ */ new Set();
|
|
18825
18848
|
const visiting = /* @__PURE__ */ new Set();
|
|
18826
18849
|
return {
|
|
18827
|
-
representations: map$
|
|
18850
|
+
representations: map$8(asts, (ast) => recur(ast)),
|
|
18828
18851
|
references
|
|
18829
18852
|
};
|
|
18830
18853
|
function gen(prefix = "_") {
|
|
@@ -18875,7 +18898,7 @@ function fromASTs$1(asts) {
|
|
|
18875
18898
|
}
|
|
18876
18899
|
function getEncodedSchema(last) {
|
|
18877
18900
|
const getLink = last.annotations?.toCodecJson ?? last.annotations?.toCodec;
|
|
18878
|
-
if (isFunction(getLink)) return replaceEncoding(last, [getLink(last.typeParameters.map((tp) => make$
|
|
18901
|
+
if (isFunction(getLink)) return replaceEncoding(last, [getLink(last.typeParameters.map((tp) => make$31(toEncoded$1(tp))))]);
|
|
18879
18902
|
return null_;
|
|
18880
18903
|
}
|
|
18881
18904
|
function on(last) {
|
|
@@ -19045,10 +19068,10 @@ function fromASTAnnotations(annotations) {
|
|
|
19045
19068
|
function toJsonSchemaMultiDocument$1(multiDocument, options) {
|
|
19046
19069
|
const generateDescriptions = options?.generateDescriptions ?? false;
|
|
19047
19070
|
const additionalProperties = options?.additionalProperties ?? false;
|
|
19048
|
-
const definitions = map$
|
|
19071
|
+
const definitions = map$9(multiDocument.references, (d) => recur(d));
|
|
19049
19072
|
return {
|
|
19050
19073
|
dialect: "draft-2020-12",
|
|
19051
|
-
schemas: map$
|
|
19074
|
+
schemas: map$8(multiDocument.representations, (s) => recur(s)),
|
|
19052
19075
|
definitions
|
|
19053
19076
|
};
|
|
19054
19077
|
function recur(s) {
|
|
@@ -19743,7 +19766,7 @@ function toMultiDocumentOpenApi3_1(multiDocument) {
|
|
|
19743
19766
|
}
|
|
19744
19767
|
return {
|
|
19745
19768
|
dialect: "openapi-3.1",
|
|
19746
|
-
schemas: map$
|
|
19769
|
+
schemas: map$8(multiDocument.schemas, rewrite),
|
|
19747
19770
|
definitions: mapEntries(multiDocument.definitions, (definition, key) => [keyMap.get(key) ?? key, rewrite(definition)])
|
|
19748
19771
|
};
|
|
19749
19772
|
}
|
|
@@ -19833,7 +19856,7 @@ var TypeId$30 = TypeId$31;
|
|
|
19833
19856
|
*/
|
|
19834
19857
|
function declareConstructor() {
|
|
19835
19858
|
return (typeParameters, run, annotations) => {
|
|
19836
|
-
return make$
|
|
19859
|
+
return make$30(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$30(ast))), annotations));
|
|
19837
19860
|
};
|
|
19838
19861
|
}
|
|
19839
19862
|
/**
|
|
@@ -20039,7 +20062,7 @@ var encodeSync = encodeSync$1;
|
|
|
20039
20062
|
* @category Constructors
|
|
20040
20063
|
* @since 4.0.0
|
|
20041
20064
|
*/
|
|
20042
|
-
var make$
|
|
20065
|
+
var make$30 = make$31;
|
|
20043
20066
|
/**
|
|
20044
20067
|
* Tests if a value is a `Schema`.
|
|
20045
20068
|
*
|
|
@@ -20070,7 +20093,7 @@ function isSchema(u) {
|
|
|
20070
20093
|
*
|
|
20071
20094
|
* @since 4.0.0
|
|
20072
20095
|
*/
|
|
20073
|
-
var optionalKey = /* @__PURE__ */ lambda((schema) => make$
|
|
20096
|
+
var optionalKey = /* @__PURE__ */ lambda((schema) => make$30(optionalKey$1(schema.ast), { schema }));
|
|
20074
20097
|
/**
|
|
20075
20098
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
20076
20099
|
* `undefined`.
|
|
@@ -20103,14 +20126,14 @@ var optional = /* @__PURE__ */ lambda((self) => optionalKey(UndefinedOr(self)));
|
|
|
20103
20126
|
*
|
|
20104
20127
|
* @since 4.0.0
|
|
20105
20128
|
*/
|
|
20106
|
-
var toType = /* @__PURE__ */ lambda((schema) => make$
|
|
20129
|
+
var toType = /* @__PURE__ */ lambda((schema) => make$30(toType$1(schema.ast), { schema }));
|
|
20107
20130
|
/**
|
|
20108
20131
|
* Extracts the encoded-side schema: sets `Type` to equal the `Encoded`,
|
|
20109
20132
|
* discarding the decoding transformation path.
|
|
20110
20133
|
*
|
|
20111
20134
|
* @since 4.0.0
|
|
20112
20135
|
*/
|
|
20113
|
-
var toEncoded = /* @__PURE__ */ lambda((schema) => make$
|
|
20136
|
+
var toEncoded = /* @__PURE__ */ lambda((schema) => make$30(toEncoded$1(schema.ast), { schema }));
|
|
20114
20137
|
/**
|
|
20115
20138
|
* Creates a schema for a single literal value (string, number, bigint, boolean, or null).
|
|
20116
20139
|
*
|
|
@@ -20128,7 +20151,7 @@ var toEncoded = /* @__PURE__ */ lambda((schema) => make$29(toEncoded$1(schema.as
|
|
|
20128
20151
|
* @since 4.0.0
|
|
20129
20152
|
*/
|
|
20130
20153
|
function Literal(literal) {
|
|
20131
|
-
const out = make$
|
|
20154
|
+
const out = make$30(new Literal$1(literal), {
|
|
20132
20155
|
literal,
|
|
20133
20156
|
transform(to) {
|
|
20134
20157
|
return out.pipe(decodeTo(Literal(to), {
|
|
@@ -20144,41 +20167,41 @@ function Literal(literal) {
|
|
|
20144
20167
|
*
|
|
20145
20168
|
* @since 4.0.0
|
|
20146
20169
|
*/
|
|
20147
|
-
var Never = /* @__PURE__ */ make$
|
|
20170
|
+
var Never = /* @__PURE__ */ make$30(never$3);
|
|
20148
20171
|
/**
|
|
20149
20172
|
* Schema for the `any` type. Accepts any value without validation.
|
|
20150
20173
|
*
|
|
20151
20174
|
* @see {@link Unknown} for a safer alternative that uses `unknown`.
|
|
20152
20175
|
* @since 4.0.0
|
|
20153
20176
|
*/
|
|
20154
|
-
var Any = /* @__PURE__ */ make$
|
|
20177
|
+
var Any = /* @__PURE__ */ make$30(any);
|
|
20155
20178
|
/**
|
|
20156
20179
|
* Schema for the `unknown` type. Accepts any value without validation.
|
|
20157
20180
|
*
|
|
20158
20181
|
* @see {@link Any} for the `any` variant.
|
|
20159
20182
|
* @since 4.0.0
|
|
20160
20183
|
*/
|
|
20161
|
-
var Unknown = /* @__PURE__ */ make$
|
|
20184
|
+
var Unknown = /* @__PURE__ */ make$30(unknown);
|
|
20162
20185
|
/**
|
|
20163
20186
|
* Schema for the `null` literal. Validates that the input is strictly `null`.
|
|
20164
20187
|
*
|
|
20165
20188
|
* @see {@link NullOr} for a union with another schema.
|
|
20166
20189
|
* @since 4.0.0
|
|
20167
20190
|
*/
|
|
20168
|
-
var Null = /* @__PURE__ */ make$
|
|
20191
|
+
var Null = /* @__PURE__ */ make$30(null_);
|
|
20169
20192
|
/**
|
|
20170
20193
|
* Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
|
|
20171
20194
|
*
|
|
20172
20195
|
* @see {@link UndefinedOr} for a union with another schema.
|
|
20173
20196
|
* @since 4.0.0
|
|
20174
20197
|
*/
|
|
20175
|
-
var Undefined = /* @__PURE__ */ make$
|
|
20198
|
+
var Undefined = /* @__PURE__ */ make$30(undefined_);
|
|
20176
20199
|
/**
|
|
20177
20200
|
* Schema for `string` values. Validates that the input is `typeof` `"string"`.
|
|
20178
20201
|
*
|
|
20179
20202
|
* @since 4.0.0
|
|
20180
20203
|
*/
|
|
20181
|
-
var String$1 = /* @__PURE__ */ make$
|
|
20204
|
+
var String$1 = /* @__PURE__ */ make$30(string$1);
|
|
20182
20205
|
/**
|
|
20183
20206
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
20184
20207
|
*
|
|
@@ -20190,22 +20213,22 @@ var String$1 = /* @__PURE__ */ make$29(string$1);
|
|
|
20190
20213
|
* @see {@link Finite} for a schema that excludes non-finite values.
|
|
20191
20214
|
* @since 4.0.0
|
|
20192
20215
|
*/
|
|
20193
|
-
var Number$1 = /* @__PURE__ */ make$
|
|
20216
|
+
var Number$1 = /* @__PURE__ */ make$30(number);
|
|
20194
20217
|
/**
|
|
20195
20218
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
20196
20219
|
*
|
|
20197
20220
|
* @category Boolean
|
|
20198
20221
|
* @since 4.0.0
|
|
20199
20222
|
*/
|
|
20200
|
-
var Boolean$1 = /* @__PURE__ */ make$
|
|
20223
|
+
var Boolean$1 = /* @__PURE__ */ make$30(boolean);
|
|
20201
20224
|
/**
|
|
20202
20225
|
* Schema for the `void` type. Accepts `undefined` as the encoded value.
|
|
20203
20226
|
*
|
|
20204
20227
|
* @since 4.0.0
|
|
20205
20228
|
*/
|
|
20206
|
-
var Void = /* @__PURE__ */ make$
|
|
20229
|
+
var Void = /* @__PURE__ */ make$30(void_);
|
|
20207
20230
|
function makeStruct(ast, fields) {
|
|
20208
|
-
return make$
|
|
20231
|
+
return make$30(ast, {
|
|
20209
20232
|
fields,
|
|
20210
20233
|
mapFields(f, options) {
|
|
20211
20234
|
const fields = f(this.fields);
|
|
@@ -20270,13 +20293,13 @@ function Struct(fields) {
|
|
|
20270
20293
|
*/
|
|
20271
20294
|
function Record(key, value, options) {
|
|
20272
20295
|
const keyValueCombiner = options?.keyValueCombiner?.decode || options?.keyValueCombiner?.encode ? new KeyValueCombiner(options.keyValueCombiner.decode, options.keyValueCombiner.encode) : void 0;
|
|
20273
|
-
return make$
|
|
20296
|
+
return make$30(record(key.ast, value.ast, keyValueCombiner), {
|
|
20274
20297
|
key,
|
|
20275
20298
|
value
|
|
20276
20299
|
});
|
|
20277
20300
|
}
|
|
20278
20301
|
function makeTuple(ast, elements) {
|
|
20279
|
-
return make$
|
|
20302
|
+
return make$30(ast, {
|
|
20280
20303
|
elements,
|
|
20281
20304
|
mapElements(f, options) {
|
|
20282
20305
|
const elements = f(this.elements);
|
|
@@ -20309,7 +20332,7 @@ function Tuple(elements) {
|
|
|
20309
20332
|
* @category Constructors
|
|
20310
20333
|
* @since 4.0.0
|
|
20311
20334
|
*/
|
|
20312
|
-
var ArraySchema = /* @__PURE__ */ lambda((schema) => make$
|
|
20335
|
+
var ArraySchema = /* @__PURE__ */ lambda((schema) => make$30(new Arrays(false, [], [schema.ast]), { schema }));
|
|
20313
20336
|
/**
|
|
20314
20337
|
* Defines a non-empty `ReadonlyArray` schema — at least one element required.
|
|
20315
20338
|
* Type is `readonly [T, ...T[]]`.
|
|
@@ -20328,9 +20351,9 @@ var ArraySchema = /* @__PURE__ */ lambda((schema) => make$29(new Arrays(false, [
|
|
|
20328
20351
|
* @category Constructors
|
|
20329
20352
|
* @since 4.0.0
|
|
20330
20353
|
*/
|
|
20331
|
-
var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$
|
|
20354
|
+
var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$30(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
|
|
20332
20355
|
function makeUnion(ast, members) {
|
|
20333
|
-
return make$
|
|
20356
|
+
return make$30(ast, {
|
|
20334
20357
|
members,
|
|
20335
20358
|
mapMembers(f, options) {
|
|
20336
20359
|
const members = f(this.members);
|
|
@@ -20380,7 +20403,7 @@ function Union(members, options) {
|
|
|
20380
20403
|
*/
|
|
20381
20404
|
function Literals(literals) {
|
|
20382
20405
|
const members = literals.map(Literal);
|
|
20383
|
-
return make$
|
|
20406
|
+
return make$30(union(members, "anyOf", void 0), {
|
|
20384
20407
|
literals,
|
|
20385
20408
|
members,
|
|
20386
20409
|
mapMembers(f) {
|
|
@@ -20432,7 +20455,7 @@ var UndefinedOr = /* @__PURE__ */ lambda((self) => Union([self, Undefined]));
|
|
|
20432
20455
|
* @since 4.0.0
|
|
20433
20456
|
*/
|
|
20434
20457
|
function suspend$2(f) {
|
|
20435
|
-
return make$
|
|
20458
|
+
return make$30(new Suspend(() => f().ast));
|
|
20436
20459
|
}
|
|
20437
20460
|
/**
|
|
20438
20461
|
* Pipeable function that attaches one or more filter checks to a schema without
|
|
@@ -20461,14 +20484,14 @@ function check(...checks) {
|
|
|
20461
20484
|
* @since 4.0.0
|
|
20462
20485
|
*/
|
|
20463
20486
|
function brand(identifier) {
|
|
20464
|
-
return (schema) => make$
|
|
20487
|
+
return (schema) => make$30(brand$1(schema.ast, identifier), {
|
|
20465
20488
|
schema,
|
|
20466
20489
|
identifier
|
|
20467
20490
|
});
|
|
20468
20491
|
}
|
|
20469
20492
|
function decodeTo(to, transformation) {
|
|
20470
20493
|
return (from) => {
|
|
20471
|
-
return make$
|
|
20494
|
+
return make$30(decodeTo$1(from.ast, to.ast, transformation ? make$32(transformation) : passthrough()), {
|
|
20472
20495
|
from,
|
|
20473
20496
|
to
|
|
20474
20497
|
});
|
|
@@ -20505,7 +20528,7 @@ function decodeTo(to, transformation) {
|
|
|
20505
20528
|
*/
|
|
20506
20529
|
function withConstructorDefault(defaultValue) {
|
|
20507
20530
|
return (schema) => {
|
|
20508
|
-
return make$
|
|
20531
|
+
return make$30(withConstructorDefault$1(schema.ast, defaultValue), { schema });
|
|
20509
20532
|
};
|
|
20510
20533
|
}
|
|
20511
20534
|
/**
|
|
@@ -20649,7 +20672,7 @@ function instanceOf(constructor, annotations) {
|
|
|
20649
20672
|
*/
|
|
20650
20673
|
function link() {
|
|
20651
20674
|
return (encodeTo, transformation) => {
|
|
20652
|
-
return new Link(encodeTo.ast, make$
|
|
20675
|
+
return new Link(encodeTo.ast, make$32(transformation));
|
|
20653
20676
|
};
|
|
20654
20677
|
}
|
|
20655
20678
|
/**
|
|
@@ -20749,7 +20772,7 @@ function isMinLength(minLength, annotations) {
|
|
|
20749
20772
|
* @since 4.0.0
|
|
20750
20773
|
*/
|
|
20751
20774
|
function Option(value) {
|
|
20752
|
-
return make$
|
|
20775
|
+
return make$30(declareConstructor()([value], ([value]) => (input, ast, options) => {
|
|
20753
20776
|
if (isOption(input)) {
|
|
20754
20777
|
if (isNone(input)) return succeedNone;
|
|
20755
20778
|
return mapBothEager(decodeUnknownEffect$1(value)(input.value, options), {
|
|
@@ -20813,7 +20836,7 @@ function OptionFromNullOr(schema) {
|
|
|
20813
20836
|
* @since 4.0.0
|
|
20814
20837
|
*/
|
|
20815
20838
|
function CauseReason(error, defect) {
|
|
20816
|
-
return make$
|
|
20839
|
+
return make$30(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
|
|
20817
20840
|
if (!isReason(input)) return fail$5(new InvalidType(ast, some(input)));
|
|
20818
20841
|
switch (input._tag) {
|
|
20819
20842
|
case "Fail": return mapBothEager(decodeUnknownEffect$1(error)(input.error, options), {
|
|
@@ -20899,7 +20922,7 @@ function causeReasonToFormatter(error, defect) {
|
|
|
20899
20922
|
* @since 4.0.0
|
|
20900
20923
|
*/
|
|
20901
20924
|
function Cause(error, defect) {
|
|
20902
|
-
return make$
|
|
20925
|
+
return make$30(declareConstructor()([error, defect], ([error, defect]) => {
|
|
20903
20926
|
const failures = ArraySchema(CauseReason(error, defect));
|
|
20904
20927
|
return (input, ast, options) => {
|
|
20905
20928
|
if (!isCause(input)) return fail$5(new InvalidType(ast, some(input)));
|
|
@@ -20990,7 +21013,7 @@ var Defect = /* @__PURE__ */ Union([/* @__PURE__ */ ErrorJsonEncoded.pipe(/* @__
|
|
|
20990
21013
|
* @since 4.0.0
|
|
20991
21014
|
*/
|
|
20992
21015
|
function Exit(value, error, defect) {
|
|
20993
|
-
return make$
|
|
21016
|
+
return make$30(declareConstructor()([
|
|
20994
21017
|
value,
|
|
20995
21018
|
error,
|
|
20996
21019
|
defect
|
|
@@ -21266,7 +21289,7 @@ function getClassSchemaFactory(from, identifier, annotations) {
|
|
|
21266
21289
|
return (self) => {
|
|
21267
21290
|
if (memo === void 0) {
|
|
21268
21291
|
const transformation = getClassTransformation(self);
|
|
21269
|
-
const to = make$
|
|
21292
|
+
const to = make$30(new Declaration([from.ast], () => (input, ast) => {
|
|
21270
21293
|
return input instanceof self || hasProperty(input, getClassTypeId(identifier)) ? succeed$3(input) : fail$5(new InvalidType(ast, some(input)));
|
|
21271
21294
|
}, {
|
|
21272
21295
|
identifier,
|
|
@@ -21398,11 +21421,11 @@ var TaggedErrorClass = (identifier) => {
|
|
|
21398
21421
|
* @since 4.0.0
|
|
21399
21422
|
*/
|
|
21400
21423
|
function toCodecJson(schema) {
|
|
21401
|
-
return make$
|
|
21424
|
+
return make$30(toCodecJson$1(schema.ast));
|
|
21402
21425
|
}
|
|
21403
21426
|
function toCodecStringTree(schema, options) {
|
|
21404
|
-
if (options?.keepDeclarations === true) return make$
|
|
21405
|
-
else return make$
|
|
21427
|
+
if (options?.keepDeclarations === true) return make$30(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema.ast)));
|
|
21428
|
+
else return make$30(toCodecEnsureArray(serializerStringTree(schema.ast)));
|
|
21406
21429
|
}
|
|
21407
21430
|
function getStringTreePriority(ast) {
|
|
21408
21431
|
switch (ast._tag) {
|
|
@@ -21421,7 +21444,7 @@ function serializerTree(ast, recur, onMissingAnnotation) {
|
|
|
21421
21444
|
case "Declaration": {
|
|
21422
21445
|
const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
|
|
21423
21446
|
if (isFunction(getLink)) {
|
|
21424
|
-
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$
|
|
21447
|
+
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$30(recur(toEncoded$1(tp)))) : []);
|
|
21425
21448
|
const to = recur(link.to);
|
|
21426
21449
|
return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
|
|
21427
21450
|
}
|
|
@@ -21603,7 +21626,7 @@ var makeUnsafe$1 = makeLatchUnsafe;
|
|
|
21603
21626
|
* @category constructors
|
|
21604
21627
|
* @since 3.8.0
|
|
21605
21628
|
*/
|
|
21606
|
-
var make$
|
|
21629
|
+
var make$29 = makeLatch;
|
|
21607
21630
|
//#endregion
|
|
21608
21631
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/MutableList.js
|
|
21609
21632
|
/**
|
|
@@ -21704,7 +21727,7 @@ var Empty$3 = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
|
|
|
21704
21727
|
* @since 4.0.0
|
|
21705
21728
|
* @category constructors
|
|
21706
21729
|
*/
|
|
21707
|
-
var make$
|
|
21730
|
+
var make$28 = () => ({
|
|
21708
21731
|
head: void 0,
|
|
21709
21732
|
tail: void 0,
|
|
21710
21733
|
length: 0
|
|
@@ -22070,12 +22093,12 @@ var QueueProto = {
|
|
|
22070
22093
|
* })
|
|
22071
22094
|
* ```
|
|
22072
22095
|
*/
|
|
22073
|
-
var make$
|
|
22096
|
+
var make$27 = (options) => withFiber$1((fiber) => {
|
|
22074
22097
|
const self = Object.create(QueueProto);
|
|
22075
22098
|
self.dispatcher = fiber.currentDispatcher;
|
|
22076
22099
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
22077
22100
|
self.strategy = options?.strategy ?? "suspend";
|
|
22078
|
-
self.messages = make$
|
|
22101
|
+
self.messages = make$28();
|
|
22079
22102
|
self.scheduleRunning = false;
|
|
22080
22103
|
self.state = {
|
|
22081
22104
|
_tag: "Open",
|
|
@@ -22110,7 +22133,7 @@ var make$26 = (options) => withFiber$1((fiber) => {
|
|
|
22110
22133
|
* @since 2.0.0
|
|
22111
22134
|
* @category Constructors
|
|
22112
22135
|
*/
|
|
22113
|
-
var bounded = (capacity) => make$
|
|
22136
|
+
var bounded = (capacity) => make$27({ capacity });
|
|
22114
22137
|
/**
|
|
22115
22138
|
* Creates a bounded queue with sliding strategy. When the queue reaches capacity,
|
|
22116
22139
|
* new elements are added and the oldest elements are dropped.
|
|
@@ -22141,7 +22164,7 @@ var bounded = (capacity) => make$26({ capacity });
|
|
|
22141
22164
|
* @since 2.0.0
|
|
22142
22165
|
* @category Constructors
|
|
22143
22166
|
*/
|
|
22144
|
-
var sliding = (capacity) => make$
|
|
22167
|
+
var sliding = (capacity) => make$27({
|
|
22145
22168
|
capacity,
|
|
22146
22169
|
strategy: "sliding"
|
|
22147
22170
|
});
|
|
@@ -22949,7 +22972,7 @@ var SemaphoreImpl = class {
|
|
|
22949
22972
|
* @since 2.0.0
|
|
22950
22973
|
* @category constructors
|
|
22951
22974
|
*/
|
|
22952
|
-
var make$
|
|
22975
|
+
var make$26 = (permits) => sync$1(() => new SemaphoreImpl(permits));
|
|
22953
22976
|
//#endregion
|
|
22954
22977
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/Channel.js
|
|
22955
22978
|
/**
|
|
@@ -23044,7 +23067,7 @@ var transformPull = (self, f) => fromTransform$1((upstream, scope) => flatMap$2(
|
|
|
23044
23067
|
* @category constructors
|
|
23045
23068
|
* @since 4.0.0
|
|
23046
23069
|
*/
|
|
23047
|
-
var fromPull = (effect) => fromTransform$1((_, __) => effect);
|
|
23070
|
+
var fromPull$1 = (effect) => fromTransform$1((_, __) => effect);
|
|
23048
23071
|
/**
|
|
23049
23072
|
* Creates a `Channel` from a transformation function that operates on upstream
|
|
23050
23073
|
* pulls, but also provides a forked scope that closes when the resulting
|
|
@@ -23126,7 +23149,7 @@ var succeed$2 = (value) => fromEffect(succeed$3(value));
|
|
|
23126
23149
|
* @since 2.0.0
|
|
23127
23150
|
* @category constructors
|
|
23128
23151
|
*/
|
|
23129
|
-
var empty$7 = /* @__PURE__ */ fromPull(/* @__PURE__ */ succeed$3(/* @__PURE__ */ done$1()));
|
|
23152
|
+
var empty$7 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed$3(/* @__PURE__ */ done$1()));
|
|
23130
23153
|
/**
|
|
23131
23154
|
* Constructs a channel that fails immediately with the specified error.
|
|
23132
23155
|
*
|
|
@@ -23156,7 +23179,7 @@ var empty$7 = /* @__PURE__ */ fromPull(/* @__PURE__ */ succeed$3(/* @__PURE__ */
|
|
|
23156
23179
|
* @since 2.0.0
|
|
23157
23180
|
* @category constructors
|
|
23158
23181
|
*/
|
|
23159
|
-
var fail$3 = (error) => fromPull(succeed$3(fail$5(error)));
|
|
23182
|
+
var fail$3 = (error) => fromPull$1(succeed$3(fail$5(error)));
|
|
23160
23183
|
/**
|
|
23161
23184
|
* Constructs a channel that fails immediately with the specified `Cause`.
|
|
23162
23185
|
*
|
|
@@ -23180,7 +23203,7 @@ var fail$3 = (error) => fromPull(succeed$3(fail$5(error)));
|
|
|
23180
23203
|
* @since 2.0.0
|
|
23181
23204
|
* @category constructors
|
|
23182
23205
|
*/
|
|
23183
|
-
var failCause = (cause) => fromPull(failCause$2(cause));
|
|
23206
|
+
var failCause = (cause) => fromPull$1(failCause$2(cause));
|
|
23184
23207
|
/**
|
|
23185
23208
|
* Use an effect to write a single value to the channel.
|
|
23186
23209
|
*
|
|
@@ -23217,7 +23240,7 @@ var failCause = (cause) => fromPull(failCause$2(cause));
|
|
|
23217
23240
|
* @since 2.0.0
|
|
23218
23241
|
* @category constructors
|
|
23219
23242
|
*/
|
|
23220
|
-
var fromEffect = (effect) => fromPull(sync(() => {
|
|
23243
|
+
var fromEffect = (effect) => fromPull$1(sync(() => {
|
|
23221
23244
|
let done = false;
|
|
23222
23245
|
return suspend$3(() => {
|
|
23223
23246
|
if (done) return done$1();
|
|
@@ -23231,7 +23254,7 @@ var fromEffect = (effect) => fromPull(sync(() => {
|
|
|
23231
23254
|
* @since 4.0.0
|
|
23232
23255
|
* @category constructors
|
|
23233
23256
|
*/
|
|
23234
|
-
var fromEffectDrain = (effect) => fromPull(flatMap$2(effect, () => done$1()));
|
|
23257
|
+
var fromEffectDrain = (effect) => fromPull$1(flatMap$2(effect, () => done$1()));
|
|
23235
23258
|
/**
|
|
23236
23259
|
* Create a channel from a queue that emits arrays of elements
|
|
23237
23260
|
*
|
|
@@ -23274,7 +23297,7 @@ var fromEffectDrain = (effect) => fromPull(flatMap$2(effect, () => done$1()));
|
|
|
23274
23297
|
* @since 4.0.0
|
|
23275
23298
|
* @category constructors
|
|
23276
23299
|
*/
|
|
23277
|
-
var fromQueueArray = (queue) => fromPull(succeed$3(takeAll(queue)));
|
|
23300
|
+
var fromQueueArray = (queue) => fromPull$1(succeed$3(takeAll(queue)));
|
|
23278
23301
|
/**
|
|
23279
23302
|
* Maps the output of this channel using the specified function.
|
|
23280
23303
|
*
|
|
@@ -23313,9 +23336,9 @@ var fromQueueArray = (queue) => fromPull(succeed$3(takeAll(queue)));
|
|
|
23313
23336
|
* @since 2.0.0
|
|
23314
23337
|
* @category Sequencing
|
|
23315
23338
|
*/
|
|
23316
|
-
var map$
|
|
23339
|
+
var map$2 = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => sync(() => {
|
|
23317
23340
|
let i = 0;
|
|
23318
|
-
return map$
|
|
23341
|
+
return map$4(pull, (o) => f(o, i++));
|
|
23319
23342
|
})));
|
|
23320
23343
|
var concurrencyIsSequential = (concurrency) => concurrency === void 0 || concurrency !== "unbounded" && concurrency <= 1;
|
|
23321
23344
|
/**
|
|
@@ -23351,7 +23374,7 @@ var concurrencyIsSequential = (concurrency) => concurrency === void 0 || concurr
|
|
|
23351
23374
|
* @category sequencing
|
|
23352
23375
|
*/
|
|
23353
23376
|
var flatMap$1 = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, f, options) => concurrencyIsSequential(options?.concurrency) ? flatMapSequential(self, f) : flatMapConcurrent(self, f, options));
|
|
23354
|
-
var flatMapSequential = (self, f) => fromTransform$1((upstream, scope) => map$
|
|
23377
|
+
var flatMapSequential = (self, f) => fromTransform$1((upstream, scope) => map$4(toTransform(self)(upstream, scope), (pull) => {
|
|
23355
23378
|
let childPull;
|
|
23356
23379
|
let childScope;
|
|
23357
23380
|
const makePull = flatMap$2(pull, (value) => {
|
|
@@ -23370,7 +23393,7 @@ var flatMapSequential = (self, f) => fromTransform$1((upstream, scope) => map$3(
|
|
|
23370
23393
|
});
|
|
23371
23394
|
return suspend$3(() => childPull ?? makePull);
|
|
23372
23395
|
}));
|
|
23373
|
-
var flatMapConcurrent = (self, f, options) => self.pipe(map$
|
|
23396
|
+
var flatMapConcurrent = (self, f, options) => self.pipe(map$2(f), mergeAll(options));
|
|
23374
23397
|
/**
|
|
23375
23398
|
* Flattens a channel that outputs arrays into a channel that outputs individual elements.
|
|
23376
23399
|
*
|
|
@@ -23456,7 +23479,7 @@ var flattenArray = (self) => transformPull(self, (pull) => {
|
|
|
23456
23479
|
*/
|
|
23457
23480
|
var catchCause = /* @__PURE__ */ dual(2, (self, f) => fromTransform$1((upstream, scope) => {
|
|
23458
23481
|
let forkedScope = forkUnsafe(scope);
|
|
23459
|
-
return map$
|
|
23482
|
+
return map$4(toTransform(self)(upstream, forkedScope), (pull) => {
|
|
23460
23483
|
let currentPull = pull.pipe(catchCause$1((cause) => {
|
|
23461
23484
|
if (isDoneCause(cause)) return failCause$2(cause);
|
|
23462
23485
|
const toClose = forkedScope;
|
|
@@ -23525,7 +23548,7 @@ var mapError$1 = /* @__PURE__ */ dual(2, (self, f) => catch_(self, (err) => fail
|
|
|
23525
23548
|
var mergeAll = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurrency, switch: switch_ = false }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
23526
23549
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
23527
23550
|
const semaphore = switch_ ? void 0 : makeUnsafe(concurrencyN);
|
|
23528
|
-
const doneLatch = yield* make$
|
|
23551
|
+
const doneLatch = yield* make$29(true);
|
|
23529
23552
|
const fibers = /* @__PURE__ */ new Set();
|
|
23530
23553
|
const queue = yield* bounded(bufferSize);
|
|
23531
23554
|
yield* addFinalizer$1(forkedScope, shutdown(queue));
|
|
@@ -23559,6 +23582,54 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, { bufferSize = 16, concurrency
|
|
|
23559
23582
|
return take(queue);
|
|
23560
23583
|
})));
|
|
23561
23584
|
/**
|
|
23585
|
+
* Returns a new channel, which is the merge of this channel and the specified
|
|
23586
|
+
* channel.
|
|
23587
|
+
*
|
|
23588
|
+
* @example
|
|
23589
|
+
* ```ts
|
|
23590
|
+
* import { Channel, Data } from "effect"
|
|
23591
|
+
*
|
|
23592
|
+
* class MergeError extends Data.TaggedError("MergeError")<{
|
|
23593
|
+
* readonly source: string
|
|
23594
|
+
* }> {}
|
|
23595
|
+
*
|
|
23596
|
+
* // Create two channels
|
|
23597
|
+
* const leftChannel = Channel.fromIterable([1, 2, 3])
|
|
23598
|
+
* const rightChannel = Channel.fromIterable(["a", "b", "c"])
|
|
23599
|
+
*
|
|
23600
|
+
* // Merge them with "either" halt strategy
|
|
23601
|
+
* const mergedChannel = Channel.merge(leftChannel, rightChannel, {
|
|
23602
|
+
* haltStrategy: "either"
|
|
23603
|
+
* })
|
|
23604
|
+
*
|
|
23605
|
+
* // Outputs elements from both channels concurrently
|
|
23606
|
+
* // Order may vary: 1, "a", 2, "b", 3, "c"
|
|
23607
|
+
* ```
|
|
23608
|
+
*
|
|
23609
|
+
* @since 2.0.0
|
|
23610
|
+
* @category utils
|
|
23611
|
+
*/
|
|
23612
|
+
var merge$2 = /* @__PURE__ */ dual((args) => isChannel(args[0]) && isChannel(args[1]), (left, right, options) => fromTransformBracket(fnUntraced(function* (upstream, _scope, forkedScope) {
|
|
23613
|
+
const strategy = options?.haltStrategy ?? "both";
|
|
23614
|
+
const queue = yield* bounded(0);
|
|
23615
|
+
yield* addFinalizer$1(forkedScope, shutdown(queue));
|
|
23616
|
+
let done = 0;
|
|
23617
|
+
function onExit(side, cause) {
|
|
23618
|
+
done++;
|
|
23619
|
+
if (!isDoneCause(cause)) return failCause$1(queue, cause);
|
|
23620
|
+
switch (strategy) {
|
|
23621
|
+
case "both": return done === 2 ? failCause$1(queue, cause) : void_$1;
|
|
23622
|
+
case "left":
|
|
23623
|
+
case "right": return side === strategy ? failCause$1(queue, cause) : void_$1;
|
|
23624
|
+
case "either": return failCause$1(queue, cause);
|
|
23625
|
+
}
|
|
23626
|
+
}
|
|
23627
|
+
const runSide = (side, channel, scope) => toTransform(channel)(upstream, scope).pipe(flatMap$2((pull) => pull.pipe(flatMap$2((value) => offer(queue, value)), forever)), onError((cause) => andThen(close(scope, doneExitFromCause(cause)), onExit(side, cause))), forkIn(forkedScope));
|
|
23628
|
+
yield* runSide("left", left, forkUnsafe(forkedScope));
|
|
23629
|
+
yield* runSide("right", right, forkUnsafe(forkedScope));
|
|
23630
|
+
return take(queue);
|
|
23631
|
+
})));
|
|
23632
|
+
/**
|
|
23562
23633
|
* Returns a new channel that pipes the output of this channel into the
|
|
23563
23634
|
* specified channel. The returned channel has the input type of this channel,
|
|
23564
23635
|
* and the output type of the specified channel, terminating with the value of
|
|
@@ -23688,7 +23759,7 @@ var runWith = (self, f, onHalt) => suspend$3(() => {
|
|
|
23688
23759
|
* @since 4.0.0
|
|
23689
23760
|
* @category Services
|
|
23690
23761
|
*/
|
|
23691
|
-
var provideServices$1 = /* @__PURE__ */ dual(2, (self, services) => fromTransform$1((upstream, scope) => map$
|
|
23762
|
+
var provideServices$1 = /* @__PURE__ */ dual(2, (self, services) => fromTransform$1((upstream, scope) => map$4(provideServices$2(toTransform(self)(upstream, scope), services), provideServices$2(services))));
|
|
23692
23763
|
/**
|
|
23693
23764
|
* Runs a channel and applies an effect to each output element.
|
|
23694
23765
|
*
|
|
@@ -23958,6 +24029,68 @@ var isStream = (u) => hasProperty(u, TypeId$24);
|
|
|
23958
24029
|
*/
|
|
23959
24030
|
var fromChannel = fromChannel$1;
|
|
23960
24031
|
/**
|
|
24032
|
+
* Creates a stream that emits void values spaced by the specified duration.
|
|
24033
|
+
*
|
|
24034
|
+
* @example
|
|
24035
|
+
* ```ts
|
|
24036
|
+
* import { Console, Effect, Stream } from "effect"
|
|
24037
|
+
*
|
|
24038
|
+
* const program = Effect.gen(function*() {
|
|
24039
|
+
* const ticks = yield* Stream.tick("200 millis").pipe(
|
|
24040
|
+
* Stream.take(3),
|
|
24041
|
+
* Stream.runCollect
|
|
24042
|
+
* )
|
|
24043
|
+
* yield* Console.log(ticks)
|
|
24044
|
+
* })
|
|
24045
|
+
*
|
|
24046
|
+
* Effect.runPromise(program)
|
|
24047
|
+
* // Output: [ undefined, undefined, undefined ]
|
|
24048
|
+
* ```
|
|
24049
|
+
*
|
|
24050
|
+
* @since 2.0.0
|
|
24051
|
+
* @category Constructors
|
|
24052
|
+
*/
|
|
24053
|
+
var tick = (interval) => fromPull(sync(() => {
|
|
24054
|
+
let first = true;
|
|
24055
|
+
const effect = succeed$3(of(void 0));
|
|
24056
|
+
const delayed = delay(effect, interval);
|
|
24057
|
+
return suspend$3(() => {
|
|
24058
|
+
if (first) {
|
|
24059
|
+
first = false;
|
|
24060
|
+
return effect;
|
|
24061
|
+
}
|
|
24062
|
+
return delayed;
|
|
24063
|
+
});
|
|
24064
|
+
}));
|
|
24065
|
+
/**
|
|
24066
|
+
* Creates a stream from a pull effect, such as one produced by `Stream.toPull`.
|
|
24067
|
+
*
|
|
24068
|
+
* A pull effect yields chunks on demand and completes when the upstream stream ends.
|
|
24069
|
+
* See `Stream.toPull` for a matching producer.
|
|
24070
|
+
*
|
|
24071
|
+
* @example
|
|
24072
|
+
* ```ts
|
|
24073
|
+
* import { Console, Effect, Stream } from "effect"
|
|
24074
|
+
*
|
|
24075
|
+
* const program = Effect.scoped(
|
|
24076
|
+
* Effect.gen(function*() {
|
|
24077
|
+
* const source = Stream.make(1, 2, 3)
|
|
24078
|
+
* const pull = yield* Stream.toPull(source)
|
|
24079
|
+
* const stream = Stream.fromPull(Effect.succeed(pull))
|
|
24080
|
+
* const values = yield* Stream.runCollect(stream)
|
|
24081
|
+
* yield* Console.log(values)
|
|
24082
|
+
* })
|
|
24083
|
+
* )
|
|
24084
|
+
*
|
|
24085
|
+
* Effect.runPromise(program)
|
|
24086
|
+
* // Output: [1, 2, 3]
|
|
24087
|
+
* ```
|
|
24088
|
+
*
|
|
24089
|
+
* @since 2.0.0
|
|
24090
|
+
* @category Constructors
|
|
24091
|
+
*/
|
|
24092
|
+
var fromPull = (pull) => fromChannel(fromPull$1(pull));
|
|
24093
|
+
/**
|
|
23961
24094
|
* Creates a channel from a stream.
|
|
23962
24095
|
*
|
|
23963
24096
|
* @example
|
|
@@ -24000,6 +24133,27 @@ var toChannel = (stream) => stream.channel;
|
|
|
24000
24133
|
*/
|
|
24001
24134
|
var empty$6 = /* @__PURE__ */ fromChannel(empty$7);
|
|
24002
24135
|
/**
|
|
24136
|
+
* Creates a stream from a sequence of values.
|
|
24137
|
+
*
|
|
24138
|
+
* @example
|
|
24139
|
+
* ```ts
|
|
24140
|
+
* import { Console, Effect, Stream } from "effect"
|
|
24141
|
+
*
|
|
24142
|
+
* const stream = Stream.make(1, 2, 3)
|
|
24143
|
+
*
|
|
24144
|
+
* const program = Effect.gen(function*() {
|
|
24145
|
+
* const values = yield* Stream.runCollect(stream)
|
|
24146
|
+
* yield* Console.log(values) // [ 1, 2, 3 ]
|
|
24147
|
+
* })
|
|
24148
|
+
*
|
|
24149
|
+
* Effect.runPromise(program)
|
|
24150
|
+
* ```
|
|
24151
|
+
*
|
|
24152
|
+
* @since 2.0.0
|
|
24153
|
+
* @category Constructors
|
|
24154
|
+
*/
|
|
24155
|
+
var make$25 = (...values) => fromArray(values);
|
|
24156
|
+
/**
|
|
24003
24157
|
* Creates a lazily constructed stream.
|
|
24004
24158
|
*
|
|
24005
24159
|
* The stream factory is evaluated each time the stream is run.
|
|
@@ -24166,7 +24320,30 @@ var fromReadableStream = (options) => fromChannel(fromTransform$1(fnUntraced(fun
|
|
|
24166
24320
|
* @since 2.0.0
|
|
24167
24321
|
* @category Constructors
|
|
24168
24322
|
*/
|
|
24169
|
-
var unwrap = (effect) => fromChannel(unwrap$1(map$
|
|
24323
|
+
var unwrap = (effect) => fromChannel(unwrap$1(map$4(effect, toChannel)));
|
|
24324
|
+
/**
|
|
24325
|
+
* Transforms the elements of this stream using the supplied function.
|
|
24326
|
+
*
|
|
24327
|
+
* @example
|
|
24328
|
+
* ```ts
|
|
24329
|
+
* import { Console, Effect, Stream } from "effect"
|
|
24330
|
+
*
|
|
24331
|
+
* const stream = Stream.fromArray([1, 2, 3]).pipe(Stream.map((n, i) => n + i))
|
|
24332
|
+
* const program = Stream.runCollect(stream).pipe(
|
|
24333
|
+
* Effect.tap((values) => Console.log(values))
|
|
24334
|
+
* )
|
|
24335
|
+
*
|
|
24336
|
+
* Effect.runPromise(program)
|
|
24337
|
+
* // [ 1, 3, 5 ]
|
|
24338
|
+
* ```
|
|
24339
|
+
*
|
|
24340
|
+
* @since 2.0.0
|
|
24341
|
+
* @category Mapping
|
|
24342
|
+
*/
|
|
24343
|
+
var map$1 = /* @__PURE__ */ dual(2, (self, f) => suspend(() => {
|
|
24344
|
+
let i = 0;
|
|
24345
|
+
return fromChannel(map$2(self.channel, map$8((o) => f(o, i++))));
|
|
24346
|
+
}));
|
|
24170
24347
|
/**
|
|
24171
24348
|
* Maps each element to a stream and concatenates the results in order.
|
|
24172
24349
|
*
|
|
@@ -24239,6 +24416,32 @@ var flatten = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options)
|
|
|
24239
24416
|
*/
|
|
24240
24417
|
var concat = /* @__PURE__ */ dual(2, (self, that) => flatten(fromArray([self, that])));
|
|
24241
24418
|
/**
|
|
24419
|
+
* Merges two streams, emitting elements from both as they arrive.
|
|
24420
|
+
*
|
|
24421
|
+
* By default, the merged stream ends when both streams end. Use
|
|
24422
|
+
* `haltStrategy` to change the termination behavior.
|
|
24423
|
+
*
|
|
24424
|
+
* @example
|
|
24425
|
+
* ```ts
|
|
24426
|
+
* import { Console, Effect, Stream } from "effect"
|
|
24427
|
+
*
|
|
24428
|
+
* const fast = Stream.make(1, 2, 3)
|
|
24429
|
+
* const slow = Stream.fromEffect(Effect.delay(Effect.succeed(4), "50 millis"))
|
|
24430
|
+
*
|
|
24431
|
+
* const program = Effect.gen(function*() {
|
|
24432
|
+
* const result = yield* Stream.runCollect(Stream.merge(fast, slow))
|
|
24433
|
+
* yield* Console.log(result)
|
|
24434
|
+
* })
|
|
24435
|
+
*
|
|
24436
|
+
* Effect.runPromise(program)
|
|
24437
|
+
* // Output: [ 1, 2, 3, 4 ]
|
|
24438
|
+
* ```
|
|
24439
|
+
*
|
|
24440
|
+
* @since 2.0.0
|
|
24441
|
+
* @category Merging
|
|
24442
|
+
*/
|
|
24443
|
+
var merge$1 = /* @__PURE__ */ dual((args) => isStream(args[0]) && isStream(args[1]), (self, that, options) => fromChannel(merge$2(toChannel(self), toChannel(that), options)));
|
|
24444
|
+
/**
|
|
24242
24445
|
* Runs an effect when the stream fails without changing its values or error,
|
|
24243
24446
|
* unless the tap effect itself fails.
|
|
24244
24447
|
*
|
|
@@ -24431,7 +24634,7 @@ var provideServices = /* @__PURE__ */ dual(2, (self, services) => fromChannel(pr
|
|
|
24431
24634
|
* @since 2.0.0
|
|
24432
24635
|
* @category Destructors
|
|
24433
24636
|
*/
|
|
24434
|
-
var run = /* @__PURE__ */ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap$2((upstream) => sink.transform(upstream, scope)), map$
|
|
24637
|
+
var run = /* @__PURE__ */ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap$2((upstream) => sink.transform(upstream, scope)), map$4(([a]) => a))));
|
|
24435
24638
|
/**
|
|
24436
24639
|
* Runs the provided effectful callback for each element of the stream.
|
|
24437
24640
|
*
|
|
@@ -24552,7 +24755,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
24552
24755
|
* @since 2.0.0
|
|
24553
24756
|
* @category Destructors
|
|
24554
24757
|
*/
|
|
24555
|
-
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map$
|
|
24758
|
+
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map$4(services(), (context) => toReadableStreamWith(self, context, options)));
|
|
24556
24759
|
//#endregion
|
|
24557
24760
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.41/node_modules/effect/dist/FileSystem.js
|
|
24558
24761
|
var TypeId$23 = "~effect/platform/FileSystem";
|
|
@@ -26908,7 +27111,7 @@ var fromInputNested = (input) => {
|
|
|
26908
27111
|
* @since 4.0.0
|
|
26909
27112
|
* @category Equivalence
|
|
26910
27113
|
*/
|
|
26911
|
-
var Equivalence$1 = /* @__PURE__ */ make$
|
|
27114
|
+
var Equivalence$1 = /* @__PURE__ */ make$43((a, b) => arrayEquivalence(a.params, b.params));
|
|
26912
27115
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence$1(/* @__PURE__ */ makeEquivalence$3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ strictEqual()]));
|
|
26913
27116
|
/**
|
|
26914
27117
|
* @since 4.0.0
|
|
@@ -27312,8 +27515,8 @@ var redact = /* @__PURE__ */ dual(2, (self, key) => {
|
|
|
27312
27515
|
const modify = (key) => {
|
|
27313
27516
|
if (typeof key === "string") {
|
|
27314
27517
|
const k = key.toLowerCase();
|
|
27315
|
-
if (k in self) out[k] = make$
|
|
27316
|
-
} else for (const name in self) if (key.test(name)) out[name] = make$
|
|
27518
|
+
if (k in self) out[k] = make$34(self[k]);
|
|
27519
|
+
} else for (const name in self) if (key.test(name)) out[name] = make$34(self[name]);
|
|
27317
27520
|
};
|
|
27318
27521
|
if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
|
|
27319
27522
|
else modify(key);
|
|
@@ -27343,7 +27546,7 @@ var Proto$7 = {
|
|
|
27343
27546
|
toJSON() {
|
|
27344
27547
|
return {
|
|
27345
27548
|
_id: "effect/Cookies",
|
|
27346
|
-
cookies: map$
|
|
27549
|
+
cookies: map$9(this.cookies, (cookie) => cookie.toJSON())
|
|
27347
27550
|
};
|
|
27348
27551
|
},
|
|
27349
27552
|
pipe() {
|
|
@@ -29530,8 +29733,8 @@ var makeConfig = (headers) => withFiber((fiber) => {
|
|
|
29530
29733
|
headers,
|
|
29531
29734
|
maxParts: fiber.getRef(MaxParts),
|
|
29532
29735
|
maxFieldSize: Number(fiber.getRef(MaxFieldSize)),
|
|
29533
|
-
maxPartSize: map$
|
|
29534
|
-
maxTotalSize: map$
|
|
29736
|
+
maxPartSize: map$3(fiber.getRef(MaxFileSize), Number),
|
|
29737
|
+
maxTotalSize: map$3(fiber.getRef(MaxBodySize), Number),
|
|
29535
29738
|
isFile: mimeTypes.length === 0 ? void 0 : (info) => !mimeTypes.some((_) => info.contentType.includes(_)) && defaultIsFile(info)
|
|
29536
29739
|
});
|
|
29537
29740
|
});
|
|
@@ -29539,7 +29742,7 @@ var makeConfig = (headers) => withFiber((fiber) => {
|
|
|
29539
29742
|
* @since 4.0.0
|
|
29540
29743
|
* @category Parsers
|
|
29541
29744
|
*/
|
|
29542
|
-
var makeChannel = (headers) => fromTransform$1((upstream) => map$
|
|
29745
|
+
var makeChannel = (headers) => fromTransform$1((upstream) => map$4(makeConfig(headers), (config) => {
|
|
29543
29746
|
let partsBuffer = [];
|
|
29544
29747
|
let exit = none();
|
|
29545
29748
|
const parser = make$12({
|
|
@@ -29550,7 +29753,7 @@ var makeChannel = (headers) => fromTransform$1((upstream) => map$3(makeConfig(he
|
|
|
29550
29753
|
onFile(info) {
|
|
29551
29754
|
let chunks = [];
|
|
29552
29755
|
let finished = false;
|
|
29553
|
-
const pullChunks = fromPull(succeed$3(suspend$3(function loop() {
|
|
29756
|
+
const pullChunks = fromPull$1(succeed$3(suspend$3(function loop() {
|
|
29554
29757
|
if (!isReadonlyArrayNonEmpty(chunks)) return finished ? done$1() : flatMap$2(pump, loop);
|
|
29555
29758
|
const chunk = chunks;
|
|
29556
29759
|
chunks = [];
|
|
@@ -29723,8 +29926,8 @@ var limitsServices = (options) => {
|
|
|
29723
29926
|
const map = /* @__PURE__ */ new Map();
|
|
29724
29927
|
if (options.maxParts !== void 0) map.set(MaxParts.key, options.maxParts);
|
|
29725
29928
|
if (options.maxFieldSize !== void 0) map.set(MaxFieldSize.key, Size(options.maxFieldSize));
|
|
29726
|
-
if (options.maxFileSize !== void 0) map.set(MaxFileSize.key, map$
|
|
29727
|
-
if (options.maxTotalSize !== void 0) map.set(MaxBodySize.key, map$
|
|
29929
|
+
if (options.maxFileSize !== void 0) map.set(MaxFileSize.key, map$3(options.maxFileSize, Size));
|
|
29930
|
+
if (options.maxTotalSize !== void 0) map.set(MaxBodySize.key, map$3(options.maxTotalSize, Size));
|
|
29728
29931
|
if (options.fieldMimeTypes !== void 0) map.set(FieldMimeTypes.key, options.fieldMimeTypes);
|
|
29729
29932
|
return makeUnsafe$7(map);
|
|
29730
29933
|
};
|
|
@@ -30397,7 +30600,7 @@ var make$10 = (f) => makeWith$1((effect) => flatMap$2(effect, (request) => withF
|
|
|
30397
30600
|
* @since 4.0.0
|
|
30398
30601
|
* @category mapping & sequencing
|
|
30399
30602
|
*/
|
|
30400
|
-
var mapRequest = /* @__PURE__ */ dual(2, (self, f) => makeWith$1(self.postprocess, (request) => map$
|
|
30603
|
+
var mapRequest = /* @__PURE__ */ dual(2, (self, f) => makeWith$1(self.postprocess, (request) => map$4(self.preprocess(request), f)));
|
|
30401
30604
|
/**
|
|
30402
30605
|
* Retries common transient errors, such as rate limiting, timeouts or network issues.
|
|
30403
30606
|
*
|
|
@@ -30443,7 +30646,7 @@ var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNa
|
|
|
30443
30646
|
/**
|
|
30444
30647
|
* @since 4.0.0
|
|
30445
30648
|
*/
|
|
30446
|
-
var layerMergedServices = (effect$1) => effect(HttpClient)(servicesWith((services) => map$
|
|
30649
|
+
var layerMergedServices = (effect$1) => effect(HttpClient)(servicesWith((services) => map$4(effect$1, (client) => transformResponse$1(client, updateServices((input) => merge$3(services, input))))));
|
|
30447
30650
|
var responseRegistry = /* @__PURE__ */ (() => {
|
|
30448
30651
|
if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
|
|
30449
30652
|
const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
|
|
@@ -30569,7 +30772,7 @@ var make$9 = /* @__PURE__ */ fnUntraced(function* (impl) {
|
|
|
30569
30772
|
return impl.fileResponse(path, options?.status ?? 200, options?.statusText, headers, start, end, contentLength);
|
|
30570
30773
|
}),
|
|
30571
30774
|
fileWebResponse(file, options) {
|
|
30572
|
-
return map$
|
|
30775
|
+
return map$4(etagGen.fromFileWeb(file), (etag) => {
|
|
30573
30776
|
const headers = merge(options?.headers ? fromInput(options.headers) : empty$3, fromRecordUnsafe({
|
|
30574
30777
|
etag: toString(etag),
|
|
30575
30778
|
"last-modified": new Date(file.lastModified).toUTCString()
|
|
@@ -30842,7 +31045,7 @@ var makeMiddleware = (middleware, options) => options?.global ? effectDiscard(ge
|
|
|
30842
31045
|
const router = yield* HttpRouter;
|
|
30843
31046
|
const fn = isEffect(middleware) ? yield* middleware : middleware;
|
|
30844
31047
|
yield* router.addGlobalMiddleware(fn);
|
|
30845
|
-
})) : new MiddlewareImpl(isEffect(middleware) ? effectServices(map$
|
|
31048
|
+
})) : new MiddlewareImpl(isEffect(middleware) ? effectServices(map$4(middleware, (fn) => makeUnsafe$7(new Map([[fnContextKey, fn]])))) : succeedServices(makeUnsafe$7(new Map([[fnContextKey, middleware]]))));
|
|
30846
31049
|
var middlewareId = 0;
|
|
30847
31050
|
var fnContextKey = "effect/http/HttpRouter/MiddlewareFn";
|
|
30848
31051
|
var MiddlewareImpl = class MiddlewareImpl {
|
|
@@ -31183,7 +31386,7 @@ var Proto$3 = {
|
|
|
31183
31386
|
annotateMerge(annotations) {
|
|
31184
31387
|
return makeProto$4({
|
|
31185
31388
|
...this,
|
|
31186
|
-
annotations: merge$
|
|
31389
|
+
annotations: merge$3(this.annotations, annotations)
|
|
31187
31390
|
});
|
|
31188
31391
|
}
|
|
31189
31392
|
};
|
|
@@ -31294,7 +31497,7 @@ var Proto$2 = {
|
|
|
31294
31497
|
const newGroups = { ...this.groups };
|
|
31295
31498
|
for (const key in api.groups) {
|
|
31296
31499
|
const newGroup = api.groups[key];
|
|
31297
|
-
newGroup.annotations = merge$
|
|
31500
|
+
newGroup.annotations = merge$3(api.annotations, newGroup.annotations);
|
|
31298
31501
|
newGroups[key] = newGroup;
|
|
31299
31502
|
}
|
|
31300
31503
|
return makeProto$3({
|
|
@@ -31306,14 +31509,14 @@ var Proto$2 = {
|
|
|
31306
31509
|
prefix(prefix) {
|
|
31307
31510
|
return makeProto$3({
|
|
31308
31511
|
identifier: this.identifier,
|
|
31309
|
-
groups: map$
|
|
31512
|
+
groups: map$9(this.groups, (group) => group.prefix(prefix)),
|
|
31310
31513
|
annotations: this.annotations
|
|
31311
31514
|
});
|
|
31312
31515
|
},
|
|
31313
31516
|
middleware(tag) {
|
|
31314
31517
|
return makeProto$3({
|
|
31315
31518
|
identifier: this.identifier,
|
|
31316
|
-
groups: map$
|
|
31519
|
+
groups: map$9(this.groups, (group) => group.middleware(tag)),
|
|
31317
31520
|
annotations: this.annotations
|
|
31318
31521
|
});
|
|
31319
31522
|
},
|
|
@@ -31328,7 +31531,7 @@ var Proto$2 = {
|
|
|
31328
31531
|
return makeProto$3({
|
|
31329
31532
|
identifier: this.identifier,
|
|
31330
31533
|
groups: this.groups,
|
|
31331
|
-
annotations: merge$
|
|
31534
|
+
annotations: merge$3(this.annotations, annotations)
|
|
31332
31535
|
});
|
|
31333
31536
|
}
|
|
31334
31537
|
};
|
|
@@ -31361,7 +31564,7 @@ var make$6 = (identifier) => makeProto$3({
|
|
|
31361
31564
|
var reflect = (self, options) => {
|
|
31362
31565
|
const groups = Object.values(self.groups);
|
|
31363
31566
|
for (const group of groups) {
|
|
31364
|
-
const groupAnnotations = merge$
|
|
31567
|
+
const groupAnnotations = merge$3(self.annotations, group.annotations);
|
|
31365
31568
|
options.onGroup({
|
|
31366
31569
|
group,
|
|
31367
31570
|
mergedAnnotations: groupAnnotations
|
|
@@ -31376,7 +31579,7 @@ var reflect = (self, options) => {
|
|
|
31376
31579
|
group,
|
|
31377
31580
|
endpoint,
|
|
31378
31581
|
middleware: endpoint.middlewares,
|
|
31379
|
-
mergedAnnotations: merge$
|
|
31582
|
+
mergedAnnotations: merge$3(groupAnnotations, endpoint.annotations),
|
|
31380
31583
|
successes: extractResponseContent(getSuccessSchemas(endpoint), getStatusSuccess),
|
|
31381
31584
|
errors: extractResponseContent(getErrorSchemas(endpoint), getStatusError)
|
|
31382
31585
|
});
|
|
@@ -31735,7 +31938,7 @@ function fromApi(api, options) {
|
|
|
31735
31938
|
return "/" + path.map(escapeToken).join("/");
|
|
31736
31939
|
}
|
|
31737
31940
|
if (isArrayNonEmpty(pathOps)) {
|
|
31738
|
-
const jsonSchemaMultiDocument = toMultiDocumentOpenApi3_1(toJsonSchemaMultiDocument(fromASTs(map$
|
|
31941
|
+
const jsonSchemaMultiDocument = toMultiDocumentOpenApi3_1(toJsonSchemaMultiDocument(fromASTs(map$8(pathOps, (op) => op.ast)), { additionalProperties: options?.additionalProperties }));
|
|
31739
31942
|
const patchOps = pathOps.map((op, i) => {
|
|
31740
31943
|
return {
|
|
31741
31944
|
op: "replace",
|
|
@@ -31836,7 +32039,7 @@ var makeSecurityScheme = (security) => {
|
|
|
31836
32039
|
scheme: "basic"
|
|
31837
32040
|
};
|
|
31838
32041
|
case "Bearer": {
|
|
31839
|
-
const format = getOption(security.annotations, Format).pipe(map$
|
|
32042
|
+
const format = getOption(security.annotations, Format).pipe(map$11((format) => ({ bearerFormat: format })), getOrUndefined$1);
|
|
31840
32043
|
return {
|
|
31841
32044
|
...meta,
|
|
31842
32045
|
type: "http",
|
|
@@ -31912,19 +32115,19 @@ var HandlersTypeId = /* @__PURE__ */ Symbol.for("@effect/platform/HttpApiBuilder
|
|
|
31912
32115
|
*/
|
|
31913
32116
|
var securityDecode = (self) => {
|
|
31914
32117
|
switch (self._tag) {
|
|
31915
|
-
case "Bearer": return map$
|
|
32118
|
+
case "Bearer": return map$4(HttpServerRequest.asEffect(), (request) => make$34((request.headers.authorization ?? "").slice(bearerLen)));
|
|
31916
32119
|
case "ApiKey": {
|
|
31917
32120
|
const key = self.in === "header" ? self.key.toLowerCase() : self.key;
|
|
31918
32121
|
const schema = Struct({ [key]: String$1 });
|
|
31919
32122
|
return match$2(self.in === "query" ? schemaSearchParams(schema) : self.in === "cookie" ? schemaCookies(schema) : schemaHeaders(schema), {
|
|
31920
|
-
onFailure: () => make$
|
|
31921
|
-
onSuccess: (match) => make$
|
|
32123
|
+
onFailure: () => make$34(""),
|
|
32124
|
+
onSuccess: (match) => make$34(match[key])
|
|
31922
32125
|
});
|
|
31923
32126
|
}
|
|
31924
32127
|
case "Basic": {
|
|
31925
32128
|
const empty = {
|
|
31926
32129
|
username: "",
|
|
31927
|
-
password: make$
|
|
32130
|
+
password: make$34("")
|
|
31928
32131
|
};
|
|
31929
32132
|
return HttpServerRequest.asEffect().pipe(flatMap$2((request) => decodeBase64String((request.headers.authorization ?? "").slice(basicLen)).asEffect()), match$2({
|
|
31930
32133
|
onFailure: () => empty,
|
|
@@ -31933,7 +32136,7 @@ var securityDecode = (self) => {
|
|
|
31933
32136
|
if (parts.length !== 2) return empty;
|
|
31934
32137
|
return {
|
|
31935
32138
|
username: parts[0],
|
|
31936
|
-
password: make$
|
|
32139
|
+
password: make$34(parts[1])
|
|
31937
32140
|
};
|
|
31938
32141
|
}
|
|
31939
32142
|
}));
|
|
@@ -32009,16 +32212,16 @@ function decodePayload(payloadBy, httpRequest, query) {
|
|
|
32009
32212
|
}));
|
|
32010
32213
|
case "Json": return flatMap$2(orDie(httpRequest.json), decode);
|
|
32011
32214
|
case "Text": return flatMap$2(orDie(httpRequest.text), decode);
|
|
32012
|
-
case "FormUrlEncoded": return flatMap$2(hasBody$1 ? map$
|
|
32013
|
-
case "Uint8Array": return flatMap$2(map$
|
|
32215
|
+
case "FormUrlEncoded": return flatMap$2(hasBody$1 ? map$4(orDie(httpRequest.urlParamsBody), toRecord$1) : succeed$3(query), decode);
|
|
32216
|
+
case "Uint8Array": return flatMap$2(map$4(orDie(httpRequest.arrayBuffer), (buffer) => new Uint8Array(buffer)), decode);
|
|
32014
32217
|
}
|
|
32015
32218
|
}
|
|
32016
32219
|
function handlerToHttpEffect(group, endpoint, services, handler, isRaw) {
|
|
32017
32220
|
const encodeSuccess = encodeUnknownEffect(makeSuccessSchema(endpoint));
|
|
32018
32221
|
const encodeError = encodeUnknownEffect(makeErrorSchema(endpoint));
|
|
32019
|
-
const decodeParams = map$
|
|
32020
|
-
const decodeHeaders = map$
|
|
32021
|
-
const decodeQuery = map$
|
|
32222
|
+
const decodeParams = map$3(endpoint.params, decodeUnknownEffect);
|
|
32223
|
+
const decodeHeaders = map$3(endpoint.headers, decodeUnknownEffect);
|
|
32224
|
+
const decodeQuery = map$3(endpoint.query, decodeUnknownEffect);
|
|
32022
32225
|
const payloadBy = endpoint.payload.size > 0 && !isRaw ? buildPayloadDecoders(endpoint.payload) : void 0;
|
|
32023
32226
|
return applyMiddleware$1(group, endpoint, services, gen(function* () {
|
|
32024
32227
|
const services = getCurrent().services;
|
|
@@ -32186,11 +32389,11 @@ var makeClient = (api, options) => gen(function* () {
|
|
|
32186
32389
|
successes.forEach((schemas, status) => {
|
|
32187
32390
|
decodeMap[status] = schemasToResponse(schemas);
|
|
32188
32391
|
});
|
|
32189
|
-
const encodeParams = map$
|
|
32392
|
+
const encodeParams = map$3(endpoint.params, encodeUnknownEffect);
|
|
32190
32393
|
const payloadSchemas = getPayloadSchemas(endpoint);
|
|
32191
32394
|
const encodePayload = isArrayNonEmpty(payloadSchemas) ? hasBody(endpoint.method) ? encodeUnknownEffect(getEncodePayloadSchema(payloadSchemas, endpoint.method)) : encodeUnknownEffect(Union(payloadSchemas)) : void 0;
|
|
32192
|
-
const encodeHeaders = map$
|
|
32193
|
-
const encodeQuery = map$
|
|
32395
|
+
const encodeHeaders = map$3(endpoint.headers, encodeUnknownEffect);
|
|
32396
|
+
const encodeQuery = map$3(endpoint.query, encodeUnknownEffect);
|
|
32194
32397
|
const middlewareKeys = Array.from(onEndpointOptions.middleware, (tag) => `${tag.key}/Client`);
|
|
32195
32398
|
const endpointFn = fnUntraced(function* (request) {
|
|
32196
32399
|
let httpRequest = make$16(endpoint.method)(endpoint.path);
|
|
@@ -32369,7 +32572,7 @@ var Proto$1 = {
|
|
|
32369
32572
|
return makeProto$2({
|
|
32370
32573
|
identifier: this.identifier,
|
|
32371
32574
|
topLevel: this.topLevel,
|
|
32372
|
-
endpoints: map$
|
|
32575
|
+
endpoints: map$9(this.endpoints, (endpoint) => endpoint.prefix(prefix)),
|
|
32373
32576
|
annotations: this.annotations
|
|
32374
32577
|
});
|
|
32375
32578
|
},
|
|
@@ -32377,7 +32580,7 @@ var Proto$1 = {
|
|
|
32377
32580
|
return makeProto$2({
|
|
32378
32581
|
identifier: this.identifier,
|
|
32379
32582
|
topLevel: this.topLevel,
|
|
32380
|
-
endpoints: map$
|
|
32583
|
+
endpoints: map$9(this.endpoints, (endpoint) => endpoint.middleware(middleware)),
|
|
32381
32584
|
annotations: this.annotations
|
|
32382
32585
|
});
|
|
32383
32586
|
},
|
|
@@ -32386,7 +32589,7 @@ var Proto$1 = {
|
|
|
32386
32589
|
identifier: this.identifier,
|
|
32387
32590
|
topLevel: this.topLevel,
|
|
32388
32591
|
endpoints: this.endpoints,
|
|
32389
|
-
annotations: merge$
|
|
32592
|
+
annotations: merge$3(this.annotations, annotations)
|
|
32390
32593
|
});
|
|
32391
32594
|
},
|
|
32392
32595
|
annotate(annotation, value) {
|
|
@@ -32401,7 +32604,7 @@ var Proto$1 = {
|
|
|
32401
32604
|
return makeProto$2({
|
|
32402
32605
|
identifier: this.identifier,
|
|
32403
32606
|
topLevel: this.topLevel,
|
|
32404
|
-
endpoints: map$
|
|
32607
|
+
endpoints: map$9(this.endpoints, (endpoint) => endpoint.annotateMerge(annotations)),
|
|
32405
32608
|
annotations: this.annotations
|
|
32406
32609
|
});
|
|
32407
32610
|
},
|
|
@@ -32409,7 +32612,7 @@ var Proto$1 = {
|
|
|
32409
32612
|
return makeProto$2({
|
|
32410
32613
|
identifier: this.identifier,
|
|
32411
32614
|
topLevel: this.topLevel,
|
|
32412
|
-
endpoints: map$
|
|
32615
|
+
endpoints: map$9(this.endpoints, (endpoint) => endpoint.annotate(annotation, value)),
|
|
32413
32616
|
annotations: this.annotations
|
|
32414
32617
|
});
|
|
32415
32618
|
},
|
|
@@ -32464,7 +32667,7 @@ var schema$1 = /* @__PURE__ */ declare(isStream);
|
|
|
32464
32667
|
* @category Stream
|
|
32465
32668
|
*/
|
|
32466
32669
|
function Stream(success, error) {
|
|
32467
|
-
return make$
|
|
32670
|
+
return make$30(schema$1.ast, {
|
|
32468
32671
|
[StreamSchemaTypeId]: StreamSchemaTypeId,
|
|
32469
32672
|
success,
|
|
32470
32673
|
error
|
|
@@ -32563,7 +32766,7 @@ var Proto = {
|
|
|
32563
32766
|
errorSchema: this.errorSchema,
|
|
32564
32767
|
defectSchema: this.defectSchema,
|
|
32565
32768
|
middlewares: this.middlewares,
|
|
32566
|
-
annotations: merge$
|
|
32769
|
+
annotations: merge$3(this.annotations, context)
|
|
32567
32770
|
});
|
|
32568
32771
|
}
|
|
32569
32772
|
};
|
|
@@ -32839,7 +33042,7 @@ var withRun = () => (f) => suspend$3(() => {
|
|
|
32839
33042
|
buffer.push([args, context]);
|
|
32840
33043
|
return void_$1;
|
|
32841
33044
|
});
|
|
32842
|
-
return map$
|
|
33045
|
+
return map$4(f((...args) => write(...args)), (a) => ({
|
|
32843
33046
|
...a,
|
|
32844
33047
|
run(f) {
|
|
32845
33048
|
return semaphore.withPermits(1)(gen(function* () {
|
|
@@ -32894,7 +33097,7 @@ var makeNoSerialization$1 = /* @__PURE__ */ fnUntraced(function* (group, options
|
|
|
32894
33097
|
}
|
|
32895
33098
|
const queue = onStreamRequest(rpc, middleware, rpc.payloadSchema.makeUnsafe(payload), headers, opts?.streamBufferSize ?? 16, context);
|
|
32896
33099
|
if (opts?.asQueue) return queue;
|
|
32897
|
-
return unwrap(map$
|
|
33100
|
+
return unwrap(map$4(queue, fromQueue));
|
|
32898
33101
|
};
|
|
32899
33102
|
};
|
|
32900
33103
|
const onEffectRequest = (rpc, middleware, span, payload, headers, context, discard) => withFiber((parentFiber) => {
|
|
@@ -33170,7 +33373,7 @@ var rpcSchemas = (rpc) => {
|
|
|
33170
33373
|
let entry = rpcSchemasCache.get(rpc);
|
|
33171
33374
|
if (entry !== void 0) return entry;
|
|
33172
33375
|
entry = {
|
|
33173
|
-
decodeChunk: map$
|
|
33376
|
+
decodeChunk: map$11(getStreamSchemas(rpc.successSchema), (streamSchemas) => decodeUnknownEffect(toCodecJson(NonEmptyArray(streamSchemas.success)))),
|
|
33174
33377
|
encodePayload: encodeEffect(toCodecJson(rpc.payloadSchema)),
|
|
33175
33378
|
decodeExit: decodeUnknownEffect(toCodecJson(exitSchema(rpc)))
|
|
33176
33379
|
};
|
|
@@ -33352,17 +33555,17 @@ var RpcGroupProto = {
|
|
|
33352
33555
|
});
|
|
33353
33556
|
},
|
|
33354
33557
|
annotateRpcs(service, value) {
|
|
33355
|
-
return this.annotateRpcsMerge(make$
|
|
33558
|
+
return this.annotateRpcsMerge(make$39(service, value));
|
|
33356
33559
|
},
|
|
33357
33560
|
annotateMerge(context) {
|
|
33358
33561
|
return makeProto({
|
|
33359
33562
|
requests: this.requests,
|
|
33360
|
-
annotations: merge$
|
|
33563
|
+
annotations: merge$3(this.annotations, context)
|
|
33361
33564
|
});
|
|
33362
33565
|
},
|
|
33363
33566
|
annotateRpcsMerge(serviceMap) {
|
|
33364
33567
|
const requests = /* @__PURE__ */ new Map();
|
|
33365
|
-
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.annotateMerge(merge$
|
|
33568
|
+
for (const [tag, rpc] of this.requests) requests.set(tag, rpc.annotateMerge(merge$3(serviceMap, rpc.annotations)));
|
|
33366
33569
|
return makeProto({
|
|
33367
33570
|
requests,
|
|
33368
33571
|
annotations: this.annotations
|
|
@@ -33397,7 +33600,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
33397
33600
|
const services$3 = yield* services();
|
|
33398
33601
|
const scope = get$1(services$3, Scope);
|
|
33399
33602
|
const trackFiber = runIn(forkUnsafe(scope, "parallel"));
|
|
33400
|
-
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$
|
|
33603
|
+
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$26(concurrency);
|
|
33401
33604
|
const clients = /* @__PURE__ */ new Map();
|
|
33402
33605
|
let isShutdown = false;
|
|
33403
33606
|
const shutdownLatch = makeUnsafe$1(false);
|
|
@@ -33606,7 +33809,7 @@ var applyMiddleware = (services, handler, options) => {
|
|
|
33606
33809
|
var make = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
33607
33810
|
const { disconnects, end, run, send, supportsAck, supportsSpanPropagation, supportsTransferables } = yield* Protocol;
|
|
33608
33811
|
const services$2 = yield* services();
|
|
33609
|
-
const scope = yield* make$
|
|
33812
|
+
const scope = yield* make$37();
|
|
33610
33813
|
const server = yield* makeNoSerialization(group, {
|
|
33611
33814
|
...options,
|
|
33612
33815
|
disableClientAcks: !supportsAck,
|
|
@@ -33669,7 +33872,7 @@ var make = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
|
33669
33872
|
const clients = /* @__PURE__ */ new Map();
|
|
33670
33873
|
const handleEncode = (client, requestId, encodeDefect, collector, effect, onSuccess) => (collector ? provideService(effect, Collector, collector) : effect).pipe(flatMap$2((a) => send(client.id, onSuccess(a), collector && collector.clearUnsafe())), catchCause$1((cause) => {
|
|
33671
33874
|
client.schemas.delete(requestId);
|
|
33672
|
-
return andThen(sendRequestDefect(client, requestId, encodeDefect, squash(map$
|
|
33875
|
+
return andThen(sendRequestDefect(client, requestId, encodeDefect, squash(map$6(cause, (e) => e.issue.toString()))), server.write(client.id, {
|
|
33673
33876
|
_tag: "Interrupt",
|
|
33674
33877
|
requestId,
|
|
33675
33878
|
interruptors: []
|
|
@@ -33810,7 +34013,7 @@ var makeProtocolWithHttpEffect = /* @__PURE__ */ gen(function* () {
|
|
|
33810
34013
|
const serialization = yield* RpcSerialization;
|
|
33811
34014
|
const includesFraming = serialization.includesFraming;
|
|
33812
34015
|
const isBinary = !serialization.contentType.includes("json");
|
|
33813
|
-
const disconnects = yield* make$
|
|
34016
|
+
const disconnects = yield* make$27();
|
|
33814
34017
|
let writeRequest;
|
|
33815
34018
|
let clientId = 0;
|
|
33816
34019
|
const clients = /* @__PURE__ */ new Map();
|
|
@@ -33821,9 +34024,9 @@ var makeProtocolWithHttpEffect = /* @__PURE__ */ gen(function* () {
|
|
|
33821
34024
|
const request = getUnsafe(fiber.services, HttpServerRequest);
|
|
33822
34025
|
const scope = getUnsafe(fiber.services, Scope);
|
|
33823
34026
|
const requestHeaders = Object.entries(request.headers);
|
|
33824
|
-
const data = yield* orDie(isBinary ? map$
|
|
34027
|
+
const data = yield* orDie(isBinary ? map$4(request.arrayBuffer, (buf) => new Uint8Array(buf)) : request.text);
|
|
33825
34028
|
const id = clientId++;
|
|
33826
|
-
const queue = yield* make$
|
|
34029
|
+
const queue = yield* make$27();
|
|
33827
34030
|
const parser = serialization.makeUnsafe();
|
|
33828
34031
|
const offer$1 = (data) => typeof data === "string" ? offer(queue, encoder.encode(data)) : offer(queue, data);
|
|
33829
34032
|
const client = {
|
|
@@ -33930,7 +34133,7 @@ var layerProtocolHttp = (options) => {
|
|
|
33930
34133
|
};
|
|
33931
34134
|
var makeSocketProtocol = /* @__PURE__ */ gen(function* () {
|
|
33932
34135
|
const serialization = yield* RpcSerialization;
|
|
33933
|
-
const disconnects = yield* make$
|
|
34136
|
+
const disconnects = yield* make$27();
|
|
33934
34137
|
let clientId = 0;
|
|
33935
34138
|
const clients = /* @__PURE__ */ new Map();
|
|
33936
34139
|
const clientIds = /* @__PURE__ */ new Set();
|
|
@@ -34021,7 +34224,7 @@ var layer = /* @__PURE__ */ layerMergedServices(/* @__PURE__ */ succeed$3(/* @__
|
|
|
34021
34224
|
const fetch = fiber.getRef(Fetch);
|
|
34022
34225
|
const options = fiber.services.mapUnsafe.get(RequestInit.key) ?? {};
|
|
34023
34226
|
const headers = options.headers ? merge(fromInput(options.headers), request.headers) : request.headers;
|
|
34024
|
-
const send = (body) => map$
|
|
34227
|
+
const send = (body) => map$4(tryPromise({
|
|
34025
34228
|
try: () => fetch(url, {
|
|
34026
34229
|
...options,
|
|
34027
34230
|
method: request.method,
|
|
@@ -34044,4 +34247,4 @@ var layer = /* @__PURE__ */ layerMergedServices(/* @__PURE__ */ succeed$3(/* @__
|
|
|
34044
34247
|
return send(void 0);
|
|
34045
34248
|
})));
|
|
34046
34249
|
//#endregion
|
|
34047
|
-
export {
|
|
34250
|
+
export { brand as $, ensuring as A, sync as At, sliding as B, makeMemoMap as Bt, stream as C, mapError$2 as Ct, string as D, runFork as Dt, layer$5 as E, promise as Et, merge$1 as F, try_ as Ft, Literals as G, pretty as Gt, ArraySchema as H, provide$3 as Ht, tapCause as I, void_$1 as It, OptionFromNullOr as J, isSome as Jt, NullOr as K, Service as Kt, tick as L, withSpan as Lt, isStream as M, tapCause$2 as Mt, make$25 as N, timeout as Nt, withDefault as O, runSync as Ot, map$1 as P, tryPromise as Pt, Unknown as Q, offer as R, exponential as Rt, retryTransient as S, map$4 as St, consolePretty as T, orElseSucceed as Tt, Boolean$1 as U, isSuccess$1 as Ut, interrupt as V, mergeAll$1 as Vt, Literal as W, hasInterruptsOnly as Wt, Struct as X, none as Xt, String$1 as Y, map$11 as Yt, TaggedErrorClass as Z, some as Zt, status as _, flatMap$2 as _t, make$2 as a, suspend$2 as at, layerServices as b, isEffect as bt, make$4 as c, acquireUseRelease as ct, layer$2 as d, asVoid as dt, check as et, make$6 as f, catchCause$1 as ft, post as g, ensuring$2 as gt, patch as h, die as ht, layerProtocolHttp$1 as i, optionalKey as it, fromQueue as j, tap as jt, concat as k, succeed$3 as kt, make$5 as l, andThen as lt, get as m, catchTags as mt, layerHttp as n, isMinLength as nt, layerNdjson as o, withDecodingDefaultKey as ot, del as p, catchTag as pt, Number$1 as q, getOrNull as qt, make$1 as r, optional as rt, make$3 as s, acquireRelease as st, layer as t, decodeUnknownOption as tt, group as u, as as ut, toWebHandler as v, fn as vt, make$21 as w, matchCauseEffect as wt, filterStatusOk as x, logError as xt, use as y, gen as yt, shutdown as z, effect as zt };
|