@deslop/workbench 0.0.300 → 0.0.305
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/client/assets/agent-C7AGYCbR.js +2 -0
- package/dist/client/assets/{agent-CcHomDRK.js → agent-DAtPiqFc.js} +1 -1
- package/dist/client/assets/{browser-B8fkyBtE.js → browser-C9CioR-6.js} +1 -1
- package/dist/client/assets/browser-tjb_rUHN.js +2 -0
- package/dist/client/assets/{button-Bqawukg7.js → button-CcQhG-Sh.js} +11 -11
- package/dist/client/assets/composite-D6OT7BpY.js +1 -0
- package/dist/client/assets/dialog-BEWSq-pP.js +153 -0
- package/dist/client/assets/diff-CkEZJzkn.js +2 -0
- package/dist/client/assets/diff-sODa_qu9.js +115 -0
- package/dist/client/assets/fallbacks-CzbUcCp6.js +1 -0
- package/dist/client/assets/index-Cl7Hl1HJ.css +2 -0
- package/dist/client/assets/{index-B8GNfTc7.js → index-Pxxow7tc.js} +3 -3
- package/dist/client/assets/loader-circle-CS6z4ADU.js +1 -0
- package/dist/client/assets/route-DStELzmA.js +2 -0
- package/dist/client/assets/route-aA7yFkjp.js +45 -0
- package/dist/client/assets/{run-DNgqimzY.js → run-Ck2ZRm8_.js} +1 -1
- package/dist/client/assets/run-xTdsjUtJ.js +2 -0
- package/dist/client/assets/state-DUa-6AT3.js +2 -0
- package/dist/client/assets/terminal-BxxTf_cr.js +1 -0
- package/dist/client/assets/terminal-SjWbsgWp.js +2 -0
- package/dist/client/assets/{terminal-BDNA0nGZ.js → terminal-rDaSmJ0r.js} +8 -8
- package/dist/client/assets/{triangle-alert-CvzZ7Dfq.js → triangle-alert-BQeVqgy8.js} +1 -1
- package/dist/client/index.html +12 -13
- package/dist/server.js +1065 -599
- package/package.json +1 -1
- package/dist/client/assets/agent-DhIB78HL.js +0 -2
- package/dist/client/assets/browser-ClOwyJJZ.js +0 -2
- package/dist/client/assets/check-DpJM7J4T.js +0 -1
- package/dist/client/assets/composite-DXpCs7eA.js +0 -1
- package/dist/client/assets/dialog-PAzkmCTH.js +0 -153
- package/dist/client/assets/diff-Wdd9xz8g.js +0 -113
- package/dist/client/assets/diff-gY3qhzPv.js +0 -2
- package/dist/client/assets/fallbacks-BUiFDlyX.js +0 -1
- package/dist/client/assets/index-CB7nvBDM.css +0 -2
- package/dist/client/assets/info-NaVIP-PS.js +0 -1
- package/dist/client/assets/loader-circle-DCgJgOPt.js +0 -1
- package/dist/client/assets/route-DGc1kMxd.js +0 -2
- package/dist/client/assets/route-dsd1lleB.js +0 -45
- package/dist/client/assets/run-CSGyvcrt.js +0 -2
- package/dist/client/assets/state-nIOT1NpG.js +0 -2
- package/dist/client/assets/terminal-D8j15kd-.js +0 -2
- package/dist/client/assets/terminal-Dn-2EhdC.js +0 -1
package/dist/server.js
CHANGED
|
@@ -9,14 +9,14 @@ import { Duplex, Readable } from "node:stream";
|
|
|
9
9
|
import { Readable as Readable$1 } from "stream";
|
|
10
10
|
import { createRequire as createRequire$1 } from "module";
|
|
11
11
|
import * as fs from "fs";
|
|
12
|
-
import * as path from "path";
|
|
12
|
+
import * as path$1 from "path";
|
|
13
13
|
import * as zlib from "zlib";
|
|
14
14
|
import * as Crypto$1 from "node:crypto";
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
16
16
|
import * as NFS from "node:fs";
|
|
17
17
|
import * as OS from "node:os";
|
|
18
18
|
import * as Path from "node:path";
|
|
19
|
-
import { join } from "node:path";
|
|
19
|
+
import path, { join } from "node:path";
|
|
20
20
|
import * as NodeStreamP from "node:stream/promises";
|
|
21
21
|
import { pipeline } from "node:stream/promises";
|
|
22
22
|
import { readFile } from "node:fs/promises";
|
|
@@ -4360,7 +4360,7 @@ const done$2 = (value) => {
|
|
|
4360
4360
|
* @category constructors
|
|
4361
4361
|
* @since 2.0.0
|
|
4362
4362
|
*/
|
|
4363
|
-
const make$
|
|
4363
|
+
const make$65 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
4364
4364
|
const isStrictEquivalent = (x, y) => x === y;
|
|
4365
4365
|
/**
|
|
4366
4366
|
* Creates an equivalence relation that uses strict equality (`===`) to compare values.
|
|
@@ -4473,7 +4473,7 @@ const strictEqual = () => isStrictEquivalent;
|
|
|
4473
4473
|
* @since 4.0.0
|
|
4474
4474
|
*/
|
|
4475
4475
|
function Tuple$1(elements) {
|
|
4476
|
-
return make$
|
|
4476
|
+
return make$65((self, that) => {
|
|
4477
4477
|
if (self.length !== that.length) return false;
|
|
4478
4478
|
for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
|
|
4479
4479
|
return true;
|
|
@@ -4483,7 +4483,7 @@ function Tuple$1(elements) {
|
|
|
4483
4483
|
* @since 4.0.0
|
|
4484
4484
|
*/
|
|
4485
4485
|
function Array_(item) {
|
|
4486
|
-
return make$
|
|
4486
|
+
return make$65((self, that) => {
|
|
4487
4487
|
if (self.length !== that.length) return false;
|
|
4488
4488
|
for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
|
|
4489
4489
|
return true;
|
|
@@ -4501,9 +4501,9 @@ const isArrayNonEmpty$1 = (self) => self.length > 0;
|
|
|
4501
4501
|
/**
|
|
4502
4502
|
* @since 2.0.0
|
|
4503
4503
|
*/
|
|
4504
|
-
const TypeId$
|
|
4504
|
+
const TypeId$51 = "~effect/data/Option";
|
|
4505
4505
|
const CommonProto$1 = {
|
|
4506
|
-
[TypeId$
|
|
4506
|
+
[TypeId$51]: { _A: (_) => _ },
|
|
4507
4507
|
...PipeInspectableProto,
|
|
4508
4508
|
[Symbol.iterator]() {
|
|
4509
4509
|
return new SingleShotGen(this);
|
|
@@ -4554,7 +4554,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
|
|
|
4554
4554
|
}
|
|
4555
4555
|
});
|
|
4556
4556
|
/** @internal */
|
|
4557
|
-
const isOption = (input) => hasProperty(input, TypeId$
|
|
4557
|
+
const isOption = (input) => hasProperty(input, TypeId$51);
|
|
4558
4558
|
/** @internal */
|
|
4559
4559
|
const isNone$1 = (fa) => fa._tag === "None";
|
|
4560
4560
|
/** @internal */
|
|
@@ -4569,9 +4569,9 @@ const some$1 = (value) => {
|
|
|
4569
4569
|
};
|
|
4570
4570
|
//#endregion
|
|
4571
4571
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/internal/result.js
|
|
4572
|
-
const TypeId$
|
|
4572
|
+
const TypeId$50 = "~effect/data/Result";
|
|
4573
4573
|
const CommonProto = {
|
|
4574
|
-
[TypeId$
|
|
4574
|
+
[TypeId$50]: {
|
|
4575
4575
|
/* v8 ignore next 2 */
|
|
4576
4576
|
_A: (_) => _,
|
|
4577
4577
|
_E: (_) => _
|
|
@@ -4622,7 +4622,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
|
|
|
4622
4622
|
}
|
|
4623
4623
|
});
|
|
4624
4624
|
/** @internal */
|
|
4625
|
-
const isResult = (input) => hasProperty(input, TypeId$
|
|
4625
|
+
const isResult = (input) => hasProperty(input, TypeId$50);
|
|
4626
4626
|
/** @internal */
|
|
4627
4627
|
const isFailure$2 = (result) => result._tag === "Failure";
|
|
4628
4628
|
/** @internal */
|
|
@@ -4756,7 +4756,7 @@ const succeed$8 = (success) => {
|
|
|
4756
4756
|
* @category constructors
|
|
4757
4757
|
* @since 2.0.0
|
|
4758
4758
|
*/
|
|
4759
|
-
function make$
|
|
4759
|
+
function make$64(compare) {
|
|
4760
4760
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
4761
4761
|
}
|
|
4762
4762
|
/**
|
|
@@ -4789,7 +4789,7 @@ function make$63(compare) {
|
|
|
4789
4789
|
* @category instances
|
|
4790
4790
|
* @since 4.0.0
|
|
4791
4791
|
*/
|
|
4792
|
-
const String$5 = /*#__PURE__*/ make$
|
|
4792
|
+
const String$5 = /*#__PURE__*/ make$64((self, that) => self < that ? -1 : 1);
|
|
4793
4793
|
/**
|
|
4794
4794
|
* Order instance for numbers that compares them numerically.
|
|
4795
4795
|
*
|
|
@@ -4824,7 +4824,7 @@ const String$5 = /*#__PURE__*/ make$63((self, that) => self < that ? -1 : 1);
|
|
|
4824
4824
|
* @category instances
|
|
4825
4825
|
* @since 4.0.0
|
|
4826
4826
|
*/
|
|
4827
|
-
const Number$5 = /*#__PURE__*/ make$
|
|
4827
|
+
const Number$5 = /*#__PURE__*/ make$64((self, that) => {
|
|
4828
4828
|
if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
|
|
4829
4829
|
if (globalThis.Number.isNaN(self)) return -1;
|
|
4830
4830
|
if (globalThis.Number.isNaN(that)) return 1;
|
|
@@ -4863,7 +4863,7 @@ const Number$5 = /*#__PURE__*/ make$63((self, that) => {
|
|
|
4863
4863
|
* @category mapping
|
|
4864
4864
|
* @since 2.0.0
|
|
4865
4865
|
*/
|
|
4866
|
-
const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$
|
|
4866
|
+
const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$64((b1, b2) => self(f(b1), f(b2))));
|
|
4867
4867
|
/**
|
|
4868
4868
|
* Checks whether one value is strictly less than another according to the given order.
|
|
4869
4869
|
*
|
|
@@ -5153,7 +5153,7 @@ const isSome = isSome$1;
|
|
|
5153
5153
|
* @category pattern matching
|
|
5154
5154
|
* @since 2.0.0
|
|
5155
5155
|
*/
|
|
5156
|
-
const match$
|
|
5156
|
+
const match$5 = /*#__PURE__*/ dual(2, (self, { onNone, onSome }) => isNone(self) ? onNone() : onSome(self.value));
|
|
5157
5157
|
/**
|
|
5158
5158
|
* Extracts the value from a `Some`, or evaluates a fallback thunk on `None`.
|
|
5159
5159
|
*
|
|
@@ -5401,7 +5401,7 @@ const map$9 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : some(f(
|
|
|
5401
5401
|
* @category sequencing
|
|
5402
5402
|
* @since 2.0.0
|
|
5403
5403
|
*/
|
|
5404
|
-
const flatMap$
|
|
5404
|
+
const flatMap$6 = /*#__PURE__*/ dual(2, (self, f) => isNone(self) ? none() : f(self.value));
|
|
5405
5405
|
/**
|
|
5406
5406
|
* Filters an `Option` using a predicate. Returns `None` if the predicate is
|
|
5407
5407
|
* not satisfied or the input is `None`.
|
|
@@ -5664,7 +5664,7 @@ const isSuccess$1 = isSuccess$2;
|
|
|
5664
5664
|
* @category pattern matching
|
|
5665
5665
|
* @since 2.0.0
|
|
5666
5666
|
*/
|
|
5667
|
-
const match$
|
|
5667
|
+
const match$4 = /*#__PURE__*/ dual(2, (self, { onFailure, onSuccess }) => isFailure$1(self) ? onFailure(self.failure) : onSuccess(self.success));
|
|
5668
5668
|
//#endregion
|
|
5669
5669
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Tuple.js
|
|
5670
5670
|
/**
|
|
@@ -5694,7 +5694,7 @@ const match$3 = /*#__PURE__*/ dual(2, (self, { onFailure, onSuccess }) => isFail
|
|
|
5694
5694
|
* @category constructors
|
|
5695
5695
|
* @since 2.0.0
|
|
5696
5696
|
*/
|
|
5697
|
-
const make$
|
|
5697
|
+
const make$63 = (...elements) => elements;
|
|
5698
5698
|
/**
|
|
5699
5699
|
* Creates an `Equivalence` for tuples by comparing corresponding elements
|
|
5700
5700
|
* using the provided per-position `Equivalence`s. Two tuples are equivalent
|
|
@@ -5852,7 +5852,7 @@ const toEntries = /*#__PURE__*/ (/* @__PURE__ */ dual(2, (self, f) => {
|
|
|
5852
5852
|
* @category guards
|
|
5853
5853
|
* @since 2.0.0
|
|
5854
5854
|
*/
|
|
5855
|
-
const has$
|
|
5855
|
+
const has$3 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
5856
5856
|
/**
|
|
5857
5857
|
* Maps a record into another record by applying a transformation function to each of its values.
|
|
5858
5858
|
*
|
|
@@ -5929,7 +5929,7 @@ const keys = (self) => Object.keys(self);
|
|
|
5929
5929
|
* @since 2.0.0
|
|
5930
5930
|
*/
|
|
5931
5931
|
const isSubrecordBy = (equivalence) => dual(2, (self, that) => {
|
|
5932
|
-
for (const key of keys(self)) if (!has$
|
|
5932
|
+
for (const key of keys(self)) if (!has$3(that, key) || !equivalence(self[key], that[key])) return false;
|
|
5933
5933
|
return true;
|
|
5934
5934
|
});
|
|
5935
5935
|
/**
|
|
@@ -6176,7 +6176,7 @@ const ensure = (self) => Array$1.isArray(self) ? self : [self];
|
|
|
6176
6176
|
* @category pattern matching
|
|
6177
6177
|
* @since 2.0.0
|
|
6178
6178
|
*/
|
|
6179
|
-
const match$
|
|
6179
|
+
const match$3 = /*#__PURE__*/ dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
|
|
6180
6180
|
/**
|
|
6181
6181
|
* Adds a single element to the end of an iterable, returning a `NonEmptyArray`.
|
|
6182
6182
|
*
|
|
@@ -6465,35 +6465,6 @@ const drop$1 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
|
6465
6465
|
return input.slice(clamp(n, input), input.length);
|
|
6466
6466
|
});
|
|
6467
6467
|
/**
|
|
6468
|
-
* Removes the last `n` elements, creating a new array.
|
|
6469
|
-
*
|
|
6470
|
-
* **When to use**
|
|
6471
|
-
*
|
|
6472
|
-
* Use to remove the last `n` elements from an iterable.
|
|
6473
|
-
*
|
|
6474
|
-
* **Details**
|
|
6475
|
-
*
|
|
6476
|
-
* `n` is clamped to `[0, length]`.
|
|
6477
|
-
*
|
|
6478
|
-
* **Example** (Dropping from the end)
|
|
6479
|
-
*
|
|
6480
|
-
* ```ts
|
|
6481
|
-
* import { Array } from "effect"
|
|
6482
|
-
*
|
|
6483
|
-
* console.log(Array.dropRight([1, 2, 3, 4, 5], 2)) // [1, 2, 3]
|
|
6484
|
-
* ```
|
|
6485
|
-
*
|
|
6486
|
-
* @see {@link drop} — remove from the start
|
|
6487
|
-
* @see {@link takeRight} — keep from the end
|
|
6488
|
-
*
|
|
6489
|
-
* @category getters
|
|
6490
|
-
* @since 2.0.0
|
|
6491
|
-
*/
|
|
6492
|
-
const dropRight = /*#__PURE__*/ dual(2, (self, n) => {
|
|
6493
|
-
const input = fromIterable$2(self);
|
|
6494
|
-
return input.slice(0, input.length - clamp(n, input));
|
|
6495
|
-
});
|
|
6496
|
-
/**
|
|
6497
6468
|
* Reverses an iterable into a new array.
|
|
6498
6469
|
*
|
|
6499
6470
|
* **When to use**
|
|
@@ -6747,6 +6718,42 @@ const of = (a) => [a];
|
|
|
6747
6718
|
*/
|
|
6748
6719
|
const map$7 = /*#__PURE__*/ dual(2, (self, f) => self.map(f));
|
|
6749
6720
|
/**
|
|
6721
|
+
* Maps each element to an array and flattens the results into a single array.
|
|
6722
|
+
*
|
|
6723
|
+
* **When to use**
|
|
6724
|
+
*
|
|
6725
|
+
* Use to map each element to zero or more values and concatenate the results in
|
|
6726
|
+
* one pass.
|
|
6727
|
+
*
|
|
6728
|
+
* **Details**
|
|
6729
|
+
*
|
|
6730
|
+
* - The function receives `(element, index)`.
|
|
6731
|
+
* - Returns `NonEmptyArray` when both input and mapped arrays are non-empty.
|
|
6732
|
+
*
|
|
6733
|
+
* **Example** (FlatMapping an array)
|
|
6734
|
+
*
|
|
6735
|
+
* ```ts
|
|
6736
|
+
* import { Array } from "effect"
|
|
6737
|
+
*
|
|
6738
|
+
* console.log(Array.flatMap([1, 2, 3], (x) => [x, x * 2])) // [1, 2, 2, 4, 3, 6]
|
|
6739
|
+
* ```
|
|
6740
|
+
*
|
|
6741
|
+
* @see {@link map} — transform without flattening
|
|
6742
|
+
* @see {@link flatten} — flatten without mapping
|
|
6743
|
+
*
|
|
6744
|
+
* @category sequencing
|
|
6745
|
+
* @since 2.0.0
|
|
6746
|
+
*/
|
|
6747
|
+
const flatMap$5 = /*#__PURE__*/ dual(2, (self, f) => {
|
|
6748
|
+
if (isReadonlyArrayEmpty(self)) return [];
|
|
6749
|
+
const out = [];
|
|
6750
|
+
for (let i = 0; i < self.length; i++) {
|
|
6751
|
+
const inner = f(self[i], i);
|
|
6752
|
+
for (let j = 0; j < inner.length; j++) out.push(inner[j]);
|
|
6753
|
+
}
|
|
6754
|
+
return out;
|
|
6755
|
+
});
|
|
6756
|
+
/**
|
|
6750
6757
|
* Extracts all `Some` values from an iterable of `Option`s, discarding `None`s.
|
|
6751
6758
|
*
|
|
6752
6759
|
* **When to use**
|
|
@@ -7127,7 +7134,7 @@ const ServiceProto = {
|
|
|
7127
7134
|
.../*#__PURE__*/ Prototype({
|
|
7128
7135
|
label: "Service",
|
|
7129
7136
|
evaluate(fiber) {
|
|
7130
|
-
return exitSucceed(get$
|
|
7137
|
+
return exitSucceed(get$9(fiber.context, this));
|
|
7131
7138
|
}
|
|
7132
7139
|
}),
|
|
7133
7140
|
toJSON() {
|
|
@@ -7141,17 +7148,17 @@ const ServiceProto = {
|
|
|
7141
7148
|
return self;
|
|
7142
7149
|
},
|
|
7143
7150
|
context(self) {
|
|
7144
|
-
return make$
|
|
7151
|
+
return make$62(this, self);
|
|
7145
7152
|
},
|
|
7146
7153
|
use(f) {
|
|
7147
|
-
return withFiber$1((fiber) => f(get$
|
|
7154
|
+
return withFiber$1((fiber) => f(get$9(fiber.context, this)));
|
|
7148
7155
|
},
|
|
7149
7156
|
useSync(f) {
|
|
7150
|
-
return withFiber$1((fiber) => exitSucceed(f(get$
|
|
7157
|
+
return withFiber$1((fiber) => exitSucceed(f(get$9(fiber.context, this))));
|
|
7151
7158
|
}
|
|
7152
7159
|
};
|
|
7153
7160
|
const ReferenceTypeId = "~effect/Context/Reference";
|
|
7154
|
-
const TypeId$
|
|
7161
|
+
const TypeId$49 = "~effect/Context";
|
|
7155
7162
|
/**
|
|
7156
7163
|
* Creates a `Context` from an existing service map without validating or
|
|
7157
7164
|
* copying it.
|
|
@@ -7186,7 +7193,7 @@ const makeUnsafe$8 = (mapUnsafe) => {
|
|
|
7186
7193
|
};
|
|
7187
7194
|
const Proto$15 = {
|
|
7188
7195
|
...PipeInspectableProto,
|
|
7189
|
-
[TypeId$
|
|
7196
|
+
[TypeId$49]: { _Services: (_) => _ },
|
|
7190
7197
|
toJSON() {
|
|
7191
7198
|
return {
|
|
7192
7199
|
_id: "Context",
|
|
@@ -7238,7 +7245,7 @@ const Proto$15 = {
|
|
|
7238
7245
|
* @category guards
|
|
7239
7246
|
* @since 2.0.0
|
|
7240
7247
|
*/
|
|
7241
|
-
const isContext = (u) => hasProperty(u, TypeId$
|
|
7248
|
+
const isContext = (u) => hasProperty(u, TypeId$49);
|
|
7242
7249
|
/**
|
|
7243
7250
|
* Checks whether the provided argument is a `Reference`.
|
|
7244
7251
|
*
|
|
@@ -7296,7 +7303,7 @@ const emptyContext = /*#__PURE__*/ makeUnsafe$8(/*#__PURE__*/ new Map());
|
|
|
7296
7303
|
* @category constructors
|
|
7297
7304
|
* @since 2.0.0
|
|
7298
7305
|
*/
|
|
7299
|
-
const make$
|
|
7306
|
+
const make$62 = (key, service) => makeUnsafe$8(new Map([[key.key, service]]));
|
|
7300
7307
|
/**
|
|
7301
7308
|
* Adds a service to a given `Context`.
|
|
7302
7309
|
*
|
|
@@ -7486,7 +7493,7 @@ const getUnsafe = /*#__PURE__*/ dual(2, (self, service) => {
|
|
|
7486
7493
|
* @category getters
|
|
7487
7494
|
* @since 2.0.0
|
|
7488
7495
|
*/
|
|
7489
|
-
const get$
|
|
7496
|
+
const get$9 = getUnsafe;
|
|
7490
7497
|
/**
|
|
7491
7498
|
* Gets the value for a `Context.Reference`, returning its cached default when
|
|
7492
7499
|
* the context does not contain an override.
|
|
@@ -7742,7 +7749,7 @@ const withMapUnsafe = (self, f) => {
|
|
|
7742
7749
|
const Reference = Service;
|
|
7743
7750
|
//#endregion
|
|
7744
7751
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Duration.js
|
|
7745
|
-
const TypeId$
|
|
7752
|
+
const TypeId$48 = "~effect/time/Duration";
|
|
7746
7753
|
const bigint0$2 = /*#__PURE__*/ BigInt(0);
|
|
7747
7754
|
const bigint1e3 = /*#__PURE__*/ BigInt(1e3);
|
|
7748
7755
|
const bigint1e6 = /*#__PURE__*/ BigInt(1e6);
|
|
@@ -7801,13 +7808,13 @@ const fromInputUnsafe = (input) => {
|
|
|
7801
7808
|
}
|
|
7802
7809
|
case "object": {
|
|
7803
7810
|
if (input === null) break;
|
|
7804
|
-
if (TypeId$
|
|
7811
|
+
if (TypeId$48 in input) return input;
|
|
7805
7812
|
if (Array.isArray(input)) {
|
|
7806
7813
|
if (input.length !== 2 || !input.every(isNumber)) return invalid(input);
|
|
7807
7814
|
if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$1;
|
|
7808
7815
|
if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
|
|
7809
7816
|
if (input[0] === Infinity || input[1] === Infinity) return infinity;
|
|
7810
|
-
return make$
|
|
7817
|
+
return make$61(BigInt(Math.round(input[0] * 1e9)) + BigInt(Math.round(input[1])));
|
|
7811
7818
|
}
|
|
7812
7819
|
const obj = input;
|
|
7813
7820
|
let millis = 0;
|
|
@@ -7817,11 +7824,11 @@ const fromInputUnsafe = (input) => {
|
|
|
7817
7824
|
if (obj.minutes) millis += obj.minutes * 6e4;
|
|
7818
7825
|
if (obj.seconds) millis += obj.seconds * 1e3;
|
|
7819
7826
|
if (obj.milliseconds) millis += obj.milliseconds;
|
|
7820
|
-
if (!obj.microseconds && !obj.nanoseconds) return make$
|
|
7827
|
+
if (!obj.microseconds && !obj.nanoseconds) return make$61(millis);
|
|
7821
7828
|
let nanos = BigInt(millis) * bigint1e6;
|
|
7822
7829
|
if (obj.microseconds) nanos += BigInt(obj.microseconds) * bigint1e3;
|
|
7823
7830
|
if (obj.nanoseconds) nanos += BigInt(obj.nanoseconds);
|
|
7824
|
-
return make$
|
|
7831
|
+
return make$61(nanos);
|
|
7825
7832
|
}
|
|
7826
7833
|
}
|
|
7827
7834
|
return invalid(input);
|
|
@@ -7836,7 +7843,7 @@ const zeroDurationValue = {
|
|
|
7836
7843
|
const infinityDurationValue = { _tag: "Infinity" };
|
|
7837
7844
|
const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
|
|
7838
7845
|
const DurationProto = {
|
|
7839
|
-
[TypeId$
|
|
7846
|
+
[TypeId$48]: TypeId$48,
|
|
7840
7847
|
[symbol$3]() {
|
|
7841
7848
|
return structure(this.value);
|
|
7842
7849
|
},
|
|
@@ -7880,7 +7887,7 @@ const DurationProto = {
|
|
|
7880
7887
|
return pipeArguments(this, arguments);
|
|
7881
7888
|
}
|
|
7882
7889
|
};
|
|
7883
|
-
const make$
|
|
7890
|
+
const make$61 = (input) => {
|
|
7884
7891
|
const duration = Object.create(DurationProto);
|
|
7885
7892
|
if (typeof input === "number") if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
|
|
7886
7893
|
else if (!Number.isFinite(input)) duration.value = input > 0 ? infinityDurationValue : negativeInfinityDurationValue;
|
|
@@ -7914,7 +7921,7 @@ const make$60 = (input) => {
|
|
|
7914
7921
|
* @category guards
|
|
7915
7922
|
* @since 2.0.0
|
|
7916
7923
|
*/
|
|
7917
|
-
const isDuration = (u) => hasProperty(u, TypeId$
|
|
7924
|
+
const isDuration = (u) => hasProperty(u, TypeId$48);
|
|
7918
7925
|
/**
|
|
7919
7926
|
* Checks whether a Duration is finite (not infinite).
|
|
7920
7927
|
*
|
|
@@ -7968,7 +7975,7 @@ const isZero$1 = (self) => {
|
|
|
7968
7975
|
* @category constructors
|
|
7969
7976
|
* @since 2.0.0
|
|
7970
7977
|
*/
|
|
7971
|
-
const zero$1 = /*#__PURE__*/ make$
|
|
7978
|
+
const zero$1 = /*#__PURE__*/ make$61(0);
|
|
7972
7979
|
/**
|
|
7973
7980
|
* A Duration representing infinite time.
|
|
7974
7981
|
*
|
|
@@ -7983,7 +7990,7 @@ const zero$1 = /*#__PURE__*/ make$60(0);
|
|
|
7983
7990
|
* @category constructors
|
|
7984
7991
|
* @since 2.0.0
|
|
7985
7992
|
*/
|
|
7986
|
-
const infinity = /*#__PURE__*/ make$
|
|
7993
|
+
const infinity = /*#__PURE__*/ make$61(Infinity);
|
|
7987
7994
|
/**
|
|
7988
7995
|
* A Duration representing negative infinite time.
|
|
7989
7996
|
*
|
|
@@ -7998,7 +8005,7 @@ const infinity = /*#__PURE__*/ make$60(Infinity);
|
|
|
7998
8005
|
* @category constructors
|
|
7999
8006
|
* @since 4.0.0
|
|
8000
8007
|
*/
|
|
8001
|
-
const negativeInfinity = /*#__PURE__*/ make$
|
|
8008
|
+
const negativeInfinity = /*#__PURE__*/ make$61(-Infinity);
|
|
8002
8009
|
/**
|
|
8003
8010
|
* Creates a Duration from nanoseconds.
|
|
8004
8011
|
*
|
|
@@ -8014,7 +8021,7 @@ const negativeInfinity = /*#__PURE__*/ make$60(-Infinity);
|
|
|
8014
8021
|
* @category constructors
|
|
8015
8022
|
* @since 2.0.0
|
|
8016
8023
|
*/
|
|
8017
|
-
const nanos = (nanos) => make$
|
|
8024
|
+
const nanos = (nanos) => make$61(nanos);
|
|
8018
8025
|
/**
|
|
8019
8026
|
* Creates a Duration from microseconds.
|
|
8020
8027
|
*
|
|
@@ -8030,7 +8037,7 @@ const nanos = (nanos) => make$60(nanos);
|
|
|
8030
8037
|
* @category constructors
|
|
8031
8038
|
* @since 2.0.0
|
|
8032
8039
|
*/
|
|
8033
|
-
const micros = (micros) => make$
|
|
8040
|
+
const micros = (micros) => make$61(micros * bigint1e3);
|
|
8034
8041
|
/**
|
|
8035
8042
|
* Creates a Duration from milliseconds.
|
|
8036
8043
|
*
|
|
@@ -8046,7 +8053,7 @@ const micros = (micros) => make$60(micros * bigint1e3);
|
|
|
8046
8053
|
* @category constructors
|
|
8047
8054
|
* @since 2.0.0
|
|
8048
8055
|
*/
|
|
8049
|
-
const millis = (millis) => make$
|
|
8056
|
+
const millis = (millis) => make$61(millis);
|
|
8050
8057
|
/**
|
|
8051
8058
|
* Creates a Duration from seconds.
|
|
8052
8059
|
*
|
|
@@ -8062,7 +8069,7 @@ const millis = (millis) => make$60(millis);
|
|
|
8062
8069
|
* @category constructors
|
|
8063
8070
|
* @since 2.0.0
|
|
8064
8071
|
*/
|
|
8065
|
-
const seconds = (seconds) => make$
|
|
8072
|
+
const seconds = (seconds) => make$61(seconds * 1e3);
|
|
8066
8073
|
/**
|
|
8067
8074
|
* Creates a Duration from minutes.
|
|
8068
8075
|
*
|
|
@@ -8078,7 +8085,7 @@ const seconds = (seconds) => make$60(seconds * 1e3);
|
|
|
8078
8085
|
* @category constructors
|
|
8079
8086
|
* @since 2.0.0
|
|
8080
8087
|
*/
|
|
8081
|
-
const minutes = (minutes) => make$
|
|
8088
|
+
const minutes = (minutes) => make$61(minutes * 6e4);
|
|
8082
8089
|
/**
|
|
8083
8090
|
* Creates a Duration from hours.
|
|
8084
8091
|
*
|
|
@@ -8094,7 +8101,7 @@ const minutes = (minutes) => make$60(minutes * 6e4);
|
|
|
8094
8101
|
* @category constructors
|
|
8095
8102
|
* @since 2.0.0
|
|
8096
8103
|
*/
|
|
8097
|
-
const hours = (hours) => make$
|
|
8104
|
+
const hours = (hours) => make$61(hours * 36e5);
|
|
8098
8105
|
/**
|
|
8099
8106
|
* Creates a Duration from days.
|
|
8100
8107
|
*
|
|
@@ -8110,7 +8117,7 @@ const hours = (hours) => make$60(hours * 36e5);
|
|
|
8110
8117
|
* @category constructors
|
|
8111
8118
|
* @since 2.0.0
|
|
8112
8119
|
*/
|
|
8113
|
-
const days = (days) => make$
|
|
8120
|
+
const days = (days) => make$61(days * 864e5);
|
|
8114
8121
|
/**
|
|
8115
8122
|
* Creates a Duration from weeks.
|
|
8116
8123
|
*
|
|
@@ -8126,7 +8133,7 @@ const days = (days) => make$60(days * 864e5);
|
|
|
8126
8133
|
* @category constructors
|
|
8127
8134
|
* @since 2.0.0
|
|
8128
8135
|
*/
|
|
8129
|
-
const weeks = (weeks) => make$
|
|
8136
|
+
const weeks = (weeks) => make$61(weeks * 6048e5);
|
|
8130
8137
|
/**
|
|
8131
8138
|
* Converts a Duration to milliseconds.
|
|
8132
8139
|
*
|
|
@@ -8142,7 +8149,7 @@ const weeks = (weeks) => make$60(weeks * 6048e5);
|
|
|
8142
8149
|
* @category getters
|
|
8143
8150
|
* @since 2.0.0
|
|
8144
8151
|
*/
|
|
8145
|
-
const toMillis = (self) => match$
|
|
8152
|
+
const toMillis = (self) => match$2(fromInputUnsafe(self), {
|
|
8146
8153
|
onMillis: identity,
|
|
8147
8154
|
onNanos: (nanos) => Number(nanos) / 1e6,
|
|
8148
8155
|
onInfinity: () => Infinity,
|
|
@@ -8163,7 +8170,7 @@ const toMillis = (self) => match$1(fromInputUnsafe(self), {
|
|
|
8163
8170
|
* @category getters
|
|
8164
8171
|
* @since 2.0.0
|
|
8165
8172
|
*/
|
|
8166
|
-
const toSeconds = (self) => match$
|
|
8173
|
+
const toSeconds = (self) => match$2(fromInputUnsafe(self), {
|
|
8167
8174
|
onMillis: (millis) => millis / 1e3,
|
|
8168
8175
|
onNanos: (nanos) => Number(nanos) / 1e9,
|
|
8169
8176
|
onInfinity: () => Infinity,
|
|
@@ -8226,7 +8233,7 @@ const toNanosUnsafe = (input) => {
|
|
|
8226
8233
|
* @category pattern matching
|
|
8227
8234
|
* @since 2.0.0
|
|
8228
8235
|
*/
|
|
8229
|
-
const match$
|
|
8236
|
+
const match$2 = /*#__PURE__*/ dual(2, (self, options) => {
|
|
8230
8237
|
switch (self.value._tag) {
|
|
8231
8238
|
case "Millis": return options.onMillis(self.value.millis);
|
|
8232
8239
|
case "Nanos": return options.onNanos(self.value.nanos);
|
|
@@ -8328,7 +8335,7 @@ const toPredicate = (self) => (input) => !isFailure$1(self(input));
|
|
|
8328
8335
|
* @category constructors
|
|
8329
8336
|
* @since 4.0.0
|
|
8330
8337
|
*/
|
|
8331
|
-
const has$
|
|
8338
|
+
const has$2 = (key) => (input) => input.has(key) ? succeed$7(input) : fail$7(input);
|
|
8332
8339
|
/**
|
|
8333
8340
|
* Composes two filters sequentially, feeding the output of the first into the second.
|
|
8334
8341
|
*
|
|
@@ -8682,7 +8689,7 @@ var ParentSpan = class extends Service()(ParentSpanKey) {};
|
|
|
8682
8689
|
* @category constructors
|
|
8683
8690
|
* @since 2.0.0
|
|
8684
8691
|
*/
|
|
8685
|
-
const make$
|
|
8692
|
+
const make$60 = (options) => options;
|
|
8686
8693
|
/**
|
|
8687
8694
|
* Creates an `ExternalSpan` from trace and span identifiers, defaulting
|
|
8688
8695
|
* `sampled` to `true` and annotations to an empty context when they are not
|
|
@@ -8827,7 +8834,7 @@ const TracerKey = "effect/Tracer";
|
|
|
8827
8834
|
* @category references
|
|
8828
8835
|
* @since 2.0.0
|
|
8829
8836
|
*/
|
|
8830
|
-
const Tracer = /*#__PURE__*/ Reference(TracerKey, { defaultValue: () => make$
|
|
8837
|
+
const Tracer = /*#__PURE__*/ Reference(TracerKey, { defaultValue: () => make$60({ span: (options) => new NativeSpan(options) }) });
|
|
8831
8838
|
/**
|
|
8832
8839
|
* Default in-memory `Span` implementation used by the native tracer. It
|
|
8833
8840
|
* generates span and trace identifiers, stores attributes, events, and links,
|
|
@@ -9237,7 +9244,7 @@ var FiberImpl = class {
|
|
|
9237
9244
|
interruptUnsafe(fiberId, annotations) {
|
|
9238
9245
|
if (this._exit) return;
|
|
9239
9246
|
let cause = causeInterrupt(fiberId);
|
|
9240
|
-
if (this.currentStackFrame) cause = causeAnnotate(cause, make$
|
|
9247
|
+
if (this.currentStackFrame) cause = causeAnnotate(cause, make$62(StackTraceKey, this.currentStackFrame));
|
|
9241
9248
|
if (annotations) cause = causeAnnotate(cause, annotations);
|
|
9242
9249
|
this._interruptedCause = this._interruptedCause ? causeCombine(this._interruptedCause, cause) : cause;
|
|
9243
9250
|
if (this.interruptible) this.evaluate(failCause$5(this._interruptedCause));
|
|
@@ -9428,7 +9435,7 @@ const suspend$3 = /*#__PURE__*/ makePrimitive({
|
|
|
9428
9435
|
}
|
|
9429
9436
|
});
|
|
9430
9437
|
/** @internal */
|
|
9431
|
-
const fromResult$1 = /*#__PURE__*/ match$
|
|
9438
|
+
const fromResult$1 = /*#__PURE__*/ match$4({
|
|
9432
9439
|
onFailure: fail$6,
|
|
9433
9440
|
onSuccess: succeed$6
|
|
9434
9441
|
});
|
|
@@ -9602,7 +9609,7 @@ const as$1 = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
9602
9609
|
return flatMap$4(self, (_) => b);
|
|
9603
9610
|
});
|
|
9604
9611
|
/** @internal */
|
|
9605
|
-
const asSome = (self) => map$6(self, some);
|
|
9612
|
+
const asSome$1 = (self) => map$6(self, some);
|
|
9606
9613
|
/** @internal */
|
|
9607
9614
|
const andThen$1 = /*#__PURE__*/ dual(2, (self, f) => flatMap$4(self, (a) => isEffect$1(f) ? f : internalCall(() => f(a))));
|
|
9608
9615
|
/** @internal */
|
|
@@ -9761,7 +9768,7 @@ const provideServiceImpl = (self, service, implementation) => updateContext$1(se
|
|
|
9761
9768
|
return add(s, service, implementation);
|
|
9762
9769
|
});
|
|
9763
9770
|
/** @internal */
|
|
9764
|
-
const when$1 = /*#__PURE__*/ dual(2, (self, condition) => flatMap$4(condition, (pass) => pass ? asSome(self) : succeedNone$1));
|
|
9771
|
+
const when$1 = /*#__PURE__*/ dual(2, (self, condition) => flatMap$4(condition, (pass) => pass ? asSome$1(self) : succeedNone$1));
|
|
9765
9772
|
/** @internal */
|
|
9766
9773
|
const forever$2 = /*#__PURE__*/ dual((args) => isEffect$1(args[0]), (self, options) => whileLoop$1({
|
|
9767
9774
|
while: constTrue,
|
|
@@ -9844,7 +9851,7 @@ const ignore$2 = /*#__PURE__*/ dual((args) => isEffect$1(args[0]), (self, option
|
|
|
9844
9851
|
});
|
|
9845
9852
|
});
|
|
9846
9853
|
/** @internal */
|
|
9847
|
-
const option$2 = (self) => match(self, {
|
|
9854
|
+
const option$2 = (self) => match$1(self, {
|
|
9848
9855
|
onFailure: none,
|
|
9849
9856
|
onSuccess: some
|
|
9850
9857
|
});
|
|
@@ -9877,7 +9884,7 @@ const matchEffect$2 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
|
|
|
9877
9884
|
onSuccess: options.onSuccess
|
|
9878
9885
|
}));
|
|
9879
9886
|
/** @internal */
|
|
9880
|
-
const match = /*#__PURE__*/ dual(2, (self, options) => matchEffect$2(self, {
|
|
9887
|
+
const match$1 = /*#__PURE__*/ dual(2, (self, options) => matchEffect$2(self, {
|
|
9881
9888
|
onFailure: (error) => sync$1(() => options.onFailure(error)),
|
|
9882
9889
|
onSuccess: (value) => sync$1(() => options.onSuccess(value))
|
|
9883
9890
|
}));
|
|
@@ -9889,7 +9896,7 @@ const matchEager = /*#__PURE__*/ dual(2, (self, options) => {
|
|
|
9889
9896
|
if (isFailure$1(error)) return self;
|
|
9890
9897
|
return exitSucceed(options.onFailure(error.success));
|
|
9891
9898
|
}
|
|
9892
|
-
return match(self, options);
|
|
9899
|
+
return match$1(self, options);
|
|
9893
9900
|
});
|
|
9894
9901
|
/** @internal */
|
|
9895
9902
|
const exit$1 = (self) => effectIsExit(self) ? exitSucceed(self) : exitPrimitive(self);
|
|
@@ -9907,11 +9914,9 @@ const exitPrimitive = /*#__PURE__*/ makePrimitive({
|
|
|
9907
9914
|
}
|
|
9908
9915
|
});
|
|
9909
9916
|
/** @internal */
|
|
9910
|
-
const delay$1 = /*#__PURE__*/ dual(2, (self, duration) => andThen$1(sleep$1(duration), self));
|
|
9911
|
-
/** @internal */
|
|
9912
9917
|
const timeoutOrElse$1 = /*#__PURE__*/ dual(2, (self, options) => raceFirst$1(self, flatMap$4(sleep$1(options.duration), options.orElse)));
|
|
9913
9918
|
/** @internal */
|
|
9914
|
-
const timeoutOption$1 = /*#__PURE__*/ dual(2, (self, duration) => raceFirst$1(asSome(self), as$1(sleep$1(duration), none())));
|
|
9919
|
+
const timeoutOption$1 = /*#__PURE__*/ dual(2, (self, duration) => raceFirst$1(asSome$1(self), as$1(sleep$1(duration), none())));
|
|
9915
9920
|
/** @internal */
|
|
9916
9921
|
const ScopeTypeId = "~effect/Scope";
|
|
9917
9922
|
/** @internal */
|
|
@@ -10489,11 +10494,11 @@ const NoopSpanProto = {
|
|
|
10489
10494
|
const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
10490
10495
|
const filterDisablePropagation = (span) => {
|
|
10491
10496
|
if (!span) return none();
|
|
10492
|
-
return get$
|
|
10497
|
+
return get$9(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some(span);
|
|
10493
10498
|
};
|
|
10494
10499
|
/** @internal */
|
|
10495
10500
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
10496
|
-
const disablePropagation = !fiber.getRef(TracerEnabled$1) || options?.annotations && get$
|
|
10501
|
+
const disablePropagation = !fiber.getRef(TracerEnabled$1) || options?.annotations && get$9(options.annotations, DisablePropagation);
|
|
10497
10502
|
const parent = options?.parent !== void 0 ? some(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.currentSpan);
|
|
10498
10503
|
let span;
|
|
10499
10504
|
if (disablePropagation) span = noopSpan({
|
|
@@ -10778,6 +10783,8 @@ function interruptChildrenPatch() {
|
|
|
10778
10783
|
fiberMiddleware.interruptChildren ??= fiberInterruptChildren;
|
|
10779
10784
|
}
|
|
10780
10785
|
/** @internal */
|
|
10786
|
+
const undefined_$2 = /*#__PURE__*/ succeed$6(void 0);
|
|
10787
|
+
/** @internal */
|
|
10781
10788
|
const reportCauseUnsafe = (fiber, cause, defectsOnly) => {
|
|
10782
10789
|
const reporters = fiber.getRef(CurrentErrorReporters);
|
|
10783
10790
|
if (reporters.size === 0) return;
|
|
@@ -10791,7 +10798,7 @@ const reportCauseUnsafe = (fiber, cause, defectsOnly) => {
|
|
|
10791
10798
|
};
|
|
10792
10799
|
//#endregion
|
|
10793
10800
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Deferred.js
|
|
10794
|
-
const TypeId$
|
|
10801
|
+
const TypeId$47 = "~effect/Deferred";
|
|
10795
10802
|
/**
|
|
10796
10803
|
* Checks whether a value is a `Deferred`.
|
|
10797
10804
|
*
|
|
@@ -10803,9 +10810,9 @@ const TypeId$46 = "~effect/Deferred";
|
|
|
10803
10810
|
* @category guards
|
|
10804
10811
|
* @since 4.0.0
|
|
10805
10812
|
*/
|
|
10806
|
-
const isDeferred = (u) => hasProperty(u, TypeId$
|
|
10813
|
+
const isDeferred = (u) => hasProperty(u, TypeId$47);
|
|
10807
10814
|
const DeferredProto = {
|
|
10808
|
-
[TypeId$
|
|
10815
|
+
[TypeId$47]: {
|
|
10809
10816
|
_A: identity,
|
|
10810
10817
|
_E: identity
|
|
10811
10818
|
},
|
|
@@ -11617,7 +11624,7 @@ const Scope = scopeTag;
|
|
|
11617
11624
|
* @category constructors
|
|
11618
11625
|
* @since 2.0.0
|
|
11619
11626
|
*/
|
|
11620
|
-
const make$
|
|
11627
|
+
const make$59 = scopeMake;
|
|
11621
11628
|
/**
|
|
11622
11629
|
* Creates a new `Scope` synchronously without wrapping it in an `Effect`.
|
|
11623
11630
|
* This is useful when you need a scope immediately but should be used with caution
|
|
@@ -11847,14 +11854,14 @@ const close = scopeClose;
|
|
|
11847
11854
|
const closeUnsafe = scopeCloseUnsafe;
|
|
11848
11855
|
//#endregion
|
|
11849
11856
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Layer.js
|
|
11850
|
-
const TypeId$
|
|
11857
|
+
const TypeId$46 = "~effect/Layer";
|
|
11851
11858
|
const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
11852
11859
|
const memoMapReuse = (entry, scope) => {
|
|
11853
11860
|
entry.observers++;
|
|
11854
11861
|
return andThen$1(scopeAddFinalizerExit(scope, (exit) => entry.finalizer(exit)), entry.effect);
|
|
11855
11862
|
};
|
|
11856
11863
|
const LayerProto = {
|
|
11857
|
-
[TypeId$
|
|
11864
|
+
[TypeId$46]: {
|
|
11858
11865
|
_ROut: identity,
|
|
11859
11866
|
_E: identity,
|
|
11860
11867
|
_RIn: identity
|
|
@@ -12187,8 +12194,8 @@ const buildWithScope = /*#__PURE__*/ dual(2, (self, scope) => withFiber$1((fiber
|
|
|
12187
12194
|
* @since 2.0.0
|
|
12188
12195
|
*/
|
|
12189
12196
|
const succeed$4 = function() {
|
|
12190
|
-
if (arguments.length === 1) return (resource) => succeedContext(make$
|
|
12191
|
-
return succeedContext(make$
|
|
12197
|
+
if (arguments.length === 1) return (resource) => succeedContext(make$62(arguments[0], resource));
|
|
12198
|
+
return succeedContext(make$62(arguments[0], arguments[1]));
|
|
12192
12199
|
};
|
|
12193
12200
|
/**
|
|
12194
12201
|
* Constructs a layer that provides all services in an already available
|
|
@@ -12305,7 +12312,7 @@ const effect = function() {
|
|
|
12305
12312
|
if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
|
|
12306
12313
|
return effectImpl(arguments[0], arguments[1]);
|
|
12307
12314
|
};
|
|
12308
|
-
const effectImpl = (service, effect) => effectContext(map$6(effect, (value) => make$
|
|
12315
|
+
const effectImpl = (service, effect) => effectContext(map$6(effect, (value) => make$62(service, value)));
|
|
12309
12316
|
/**
|
|
12310
12317
|
* Constructs a layer from an effect that produces all services in a `Context`.
|
|
12311
12318
|
*
|
|
@@ -12404,7 +12411,7 @@ const effectDiscard = (effect) => effectContext(as$1(effect, empty$12()));
|
|
|
12404
12411
|
*/
|
|
12405
12412
|
const unwrap$4 = (self) => {
|
|
12406
12413
|
const service = Service("effect/Layer/unwrap");
|
|
12407
|
-
return flatMap$3(effect(service)(self), get$
|
|
12414
|
+
return flatMap$3(effect(service)(self), get$9(service));
|
|
12408
12415
|
};
|
|
12409
12416
|
const mergeAllEffect = (layers, memoMap, scope) => {
|
|
12410
12417
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
@@ -13649,11 +13656,11 @@ const Clock = ClockRef;
|
|
|
13649
13656
|
//#endregion
|
|
13650
13657
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/internal/dateTime.js
|
|
13651
13658
|
/** @internal */
|
|
13652
|
-
const TypeId$
|
|
13659
|
+
const TypeId$45 = "~effect/time/DateTime";
|
|
13653
13660
|
/** @internal */
|
|
13654
13661
|
const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
13655
13662
|
const Proto$14 = {
|
|
13656
|
-
[TypeId$
|
|
13663
|
+
[TypeId$45]: TypeId$45,
|
|
13657
13664
|
pipe() {
|
|
13658
13665
|
return pipeArguments(this, arguments);
|
|
13659
13666
|
},
|
|
@@ -14218,7 +14225,7 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
|
|
|
14218
14225
|
*
|
|
14219
14226
|
* @since 2.0.0
|
|
14220
14227
|
*/
|
|
14221
|
-
const TypeId$
|
|
14228
|
+
const TypeId$44 = "~effect/Schedule";
|
|
14222
14229
|
/**
|
|
14223
14230
|
* Context reference containing metadata for the currently running schedule step.
|
|
14224
14231
|
*
|
|
@@ -14243,7 +14250,7 @@ const CurrentMetadata = /*#__PURE__*/ Reference("effect/Schedule/CurrentMetadata
|
|
|
14243
14250
|
elapsedSincePrevious: 0
|
|
14244
14251
|
}) });
|
|
14245
14252
|
const ScheduleProto = {
|
|
14246
|
-
[TypeId$
|
|
14253
|
+
[TypeId$44]: {
|
|
14247
14254
|
_Out: identity,
|
|
14248
14255
|
_In: identity,
|
|
14249
14256
|
_Env: identity
|
|
@@ -14272,7 +14279,7 @@ const ScheduleProto = {
|
|
|
14272
14279
|
* @category guards
|
|
14273
14280
|
* @since 2.0.0
|
|
14274
14281
|
*/
|
|
14275
|
-
const isSchedule = (u) => hasProperty(u, TypeId$
|
|
14282
|
+
const isSchedule = (u) => hasProperty(u, TypeId$44);
|
|
14276
14283
|
/**
|
|
14277
14284
|
* Creates a Schedule from a step function that returns a Pull.
|
|
14278
14285
|
*
|
|
@@ -14676,7 +14683,7 @@ const MetricRegistry = /*#__PURE__*/ Reference("~effect/observability/Metric/Met
|
|
|
14676
14683
|
* @since 4.0.0
|
|
14677
14684
|
*/
|
|
14678
14685
|
const snapshotUnsafe = (context) => {
|
|
14679
|
-
const registry = get$
|
|
14686
|
+
const registry = get$9(context, MetricRegistry);
|
|
14680
14687
|
return Array.from(registry.values()).map(({ hooks, ...meta }) => ({
|
|
14681
14688
|
...meta,
|
|
14682
14689
|
state: hooks.get(context)
|
|
@@ -15259,6 +15266,7 @@ const suspend$2 = suspend$3;
|
|
|
15259
15266
|
*/
|
|
15260
15267
|
const sync = sync$1;
|
|
15261
15268
|
const void_$1 = void_$3;
|
|
15269
|
+
const undefined_$1 = undefined_$2;
|
|
15262
15270
|
/**
|
|
15263
15271
|
* Creates an `Effect` from a callback-based asynchronous API.
|
|
15264
15272
|
*
|
|
@@ -15928,6 +15936,24 @@ const map$4 = map$6;
|
|
|
15928
15936
|
*/
|
|
15929
15937
|
const as = as$1;
|
|
15930
15938
|
/**
|
|
15939
|
+
* Maps the success value of an `Effect` to `Some`, preserving failures.
|
|
15940
|
+
*
|
|
15941
|
+
* **Example** (Wrapping success in Option.some)
|
|
15942
|
+
*
|
|
15943
|
+
* ```ts
|
|
15944
|
+
* import { Effect } from "effect"
|
|
15945
|
+
*
|
|
15946
|
+
* const program = Effect.asSome(Effect.succeed(42))
|
|
15947
|
+
*
|
|
15948
|
+
* Effect.runPromise(program).then(console.log)
|
|
15949
|
+
* // { _id: 'Option', _tag: 'Some', value: 42 }
|
|
15950
|
+
* ```
|
|
15951
|
+
*
|
|
15952
|
+
* @category mapping
|
|
15953
|
+
* @since 2.0.0
|
|
15954
|
+
*/
|
|
15955
|
+
const asSome = asSome$1;
|
|
15956
|
+
/**
|
|
15931
15957
|
* Maps the success value of an `Effect` to `void`, preserving failures.
|
|
15932
15958
|
*
|
|
15933
15959
|
* **Example** (Discarding success values)
|
|
@@ -16471,28 +16497,6 @@ const timeoutOption = timeoutOption$1;
|
|
|
16471
16497
|
*/
|
|
16472
16498
|
const timeoutOrElse = timeoutOrElse$1;
|
|
16473
16499
|
/**
|
|
16474
|
-
* Returns an effect that is delayed from this effect by the specified
|
|
16475
|
-
* `Duration`.
|
|
16476
|
-
*
|
|
16477
|
-
* **Example** (Delaying an effect)
|
|
16478
|
-
*
|
|
16479
|
-
* ```ts
|
|
16480
|
-
* import { Console, Effect } from "effect"
|
|
16481
|
-
*
|
|
16482
|
-
* const program = Effect.delay(
|
|
16483
|
-
* Console.log("Delayed message"),
|
|
16484
|
-
* "1 second"
|
|
16485
|
-
* )
|
|
16486
|
-
*
|
|
16487
|
-
* Effect.runFork(program)
|
|
16488
|
-
* // Waits 1 second, then prints: "Delayed message"
|
|
16489
|
-
* ```
|
|
16490
|
-
*
|
|
16491
|
-
* @category delays & timeouts
|
|
16492
|
-
* @since 2.0.0
|
|
16493
|
-
*/
|
|
16494
|
-
const delay = delay$1;
|
|
16495
|
-
/**
|
|
16496
16500
|
* Returns an effect that suspends the current fiber for the specified duration
|
|
16497
16501
|
* without blocking a JavaScript thread.
|
|
16498
16502
|
*
|
|
@@ -18851,7 +18855,7 @@ const redactedRegistry = /*#__PURE__*/ new WeakMap();
|
|
|
18851
18855
|
*
|
|
18852
18856
|
* @since 3.3.0
|
|
18853
18857
|
*/
|
|
18854
|
-
const TypeId$
|
|
18858
|
+
const TypeId$43 = "~effect/data/Redacted";
|
|
18855
18859
|
/**
|
|
18856
18860
|
* Returns `true` if a value is a `Redacted` wrapper.
|
|
18857
18861
|
*
|
|
@@ -18879,7 +18883,7 @@ const TypeId$42 = "~effect/data/Redacted";
|
|
|
18879
18883
|
* @category refinements
|
|
18880
18884
|
* @since 3.3.0
|
|
18881
18885
|
*/
|
|
18882
|
-
const isRedacted = (u) => hasProperty(u, TypeId$
|
|
18886
|
+
const isRedacted = (u) => hasProperty(u, TypeId$43);
|
|
18883
18887
|
/**
|
|
18884
18888
|
* Creates a `Redacted` wrapper for a sensitive value.
|
|
18885
18889
|
*
|
|
@@ -18905,14 +18909,14 @@ const isRedacted = (u) => hasProperty(u, TypeId$42);
|
|
|
18905
18909
|
* @category constructors
|
|
18906
18910
|
* @since 3.3.0
|
|
18907
18911
|
*/
|
|
18908
|
-
const make$
|
|
18912
|
+
const make$56 = (value, options) => {
|
|
18909
18913
|
const self = Object.create(Proto$13);
|
|
18910
18914
|
if (options?.label) self.label = options.label;
|
|
18911
18915
|
redactedRegistry.set(self, value);
|
|
18912
18916
|
return self;
|
|
18913
18917
|
};
|
|
18914
18918
|
const Proto$13 = {
|
|
18915
|
-
[TypeId$
|
|
18919
|
+
[TypeId$43]: { _A: (_) => _ },
|
|
18916
18920
|
label: void 0,
|
|
18917
18921
|
...PipeInspectableProto,
|
|
18918
18922
|
toJSON() {
|
|
@@ -18930,7 +18934,7 @@ const Proto$13 = {
|
|
|
18930
18934
|
};
|
|
18931
18935
|
//#endregion
|
|
18932
18936
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/SchemaIssue.js
|
|
18933
|
-
const TypeId$
|
|
18937
|
+
const TypeId$42 = "~effect/SchemaIssue/Issue";
|
|
18934
18938
|
/**
|
|
18935
18939
|
* Returns `true` if the given value is an {@link Issue}.
|
|
18936
18940
|
*
|
|
@@ -18961,10 +18965,10 @@ const TypeId$41 = "~effect/SchemaIssue/Issue";
|
|
|
18961
18965
|
* @since 4.0.0
|
|
18962
18966
|
*/
|
|
18963
18967
|
function isIssue(u) {
|
|
18964
|
-
return hasProperty(u, TypeId$
|
|
18968
|
+
return hasProperty(u, TypeId$42);
|
|
18965
18969
|
}
|
|
18966
18970
|
var Base$1 = class {
|
|
18967
|
-
[TypeId$
|
|
18971
|
+
[TypeId$42] = TypeId$42;
|
|
18968
18972
|
toString() {
|
|
18969
18973
|
return defaultFormatter(this);
|
|
18970
18974
|
}
|
|
@@ -19413,7 +19417,7 @@ function makeSingle(input, out) {
|
|
|
19413
19417
|
return makeFilterIssue(input, out);
|
|
19414
19418
|
}
|
|
19415
19419
|
/** @internal */
|
|
19416
|
-
function make$
|
|
19420
|
+
function make$55(input, ast, out) {
|
|
19417
19421
|
if (Array.isArray(out)) {
|
|
19418
19422
|
if (isReadonlyArrayNonEmpty(out)) {
|
|
19419
19423
|
if (out.length === 1) return makeFilterIssue(input, out[0]);
|
|
@@ -20092,9 +20096,9 @@ function split(options) {
|
|
|
20092
20096
|
*
|
|
20093
20097
|
* @since 2.0.0
|
|
20094
20098
|
*/
|
|
20095
|
-
const TypeId$
|
|
20099
|
+
const TypeId$41 = "~effect/BigDecimal";
|
|
20096
20100
|
const BigDecimalProto = {
|
|
20097
|
-
[TypeId$
|
|
20101
|
+
[TypeId$41]: TypeId$41,
|
|
20098
20102
|
[symbol$3]() {
|
|
20099
20103
|
const normalized = normalize(this);
|
|
20100
20104
|
return combine$1(hash(normalized.value), number$1(normalized.scale));
|
|
@@ -20140,7 +20144,7 @@ const BigDecimalProto = {
|
|
|
20140
20144
|
* @category guards
|
|
20141
20145
|
* @since 2.0.0
|
|
20142
20146
|
*/
|
|
20143
|
-
const isBigDecimal = (u) => hasProperty(u, TypeId$
|
|
20147
|
+
const isBigDecimal = (u) => hasProperty(u, TypeId$41);
|
|
20144
20148
|
/**
|
|
20145
20149
|
* Creates a `BigDecimal` from a `bigint` value and a scale.
|
|
20146
20150
|
*
|
|
@@ -20168,7 +20172,7 @@ const isBigDecimal = (u) => hasProperty(u, TypeId$40);
|
|
|
20168
20172
|
* @category constructors
|
|
20169
20173
|
* @since 2.0.0
|
|
20170
20174
|
*/
|
|
20171
|
-
const make$
|
|
20175
|
+
const make$54 = (value, scale) => {
|
|
20172
20176
|
const o = Object.create(BigDecimalProto);
|
|
20173
20177
|
o.value = value;
|
|
20174
20178
|
o.scale = scale;
|
|
@@ -20181,7 +20185,7 @@ const make$53 = (value, scale) => {
|
|
|
20181
20185
|
*/
|
|
20182
20186
|
const makeNormalizedUnsafe = (value, scale) => {
|
|
20183
20187
|
if (value !== bigint0 && value % bigint10 === bigint0) throw new RangeError("Value must be normalized");
|
|
20184
|
-
const o = make$
|
|
20188
|
+
const o = make$54(value, scale);
|
|
20185
20189
|
o.normalized = o;
|
|
20186
20190
|
return o;
|
|
20187
20191
|
};
|
|
@@ -20264,8 +20268,8 @@ const normalize = (self) => {
|
|
|
20264
20268
|
* @since 2.0.0
|
|
20265
20269
|
*/
|
|
20266
20270
|
const scale = /*#__PURE__*/ dual(2, (self, scale) => {
|
|
20267
|
-
if (scale > self.scale) return make$
|
|
20268
|
-
if (scale < self.scale) return make$
|
|
20271
|
+
if (scale > self.scale) return make$54(self.value * bigint10 ** BigInt(scale - self.scale), scale);
|
|
20272
|
+
if (scale < self.scale) return make$54(self.value / bigint10 ** BigInt(self.scale - scale), scale);
|
|
20269
20273
|
return self;
|
|
20270
20274
|
});
|
|
20271
20275
|
/**
|
|
@@ -20289,7 +20293,7 @@ const scale = /*#__PURE__*/ dual(2, (self, scale) => {
|
|
|
20289
20293
|
* @category math
|
|
20290
20294
|
* @since 2.0.0
|
|
20291
20295
|
*/
|
|
20292
|
-
const abs = (n) => n.value < bigint0 ? make$
|
|
20296
|
+
const abs = (n) => n.value < bigint0 ? make$54(-n.value, n.scale) : n;
|
|
20293
20297
|
/**
|
|
20294
20298
|
* Provides an `Equivalence` instance for `BigDecimal` that determines equality between BigDecimal values.
|
|
20295
20299
|
*
|
|
@@ -20314,7 +20318,7 @@ const abs = (n) => n.value < bigint0 ? make$53(-n.value, n.scale) : n;
|
|
|
20314
20318
|
* @category instances
|
|
20315
20319
|
* @since 2.0.0
|
|
20316
20320
|
*/
|
|
20317
|
-
const Equivalence$2 = /*#__PURE__*/ make$
|
|
20321
|
+
const Equivalence$2 = /*#__PURE__*/ make$65((self, that) => {
|
|
20318
20322
|
if (self.scale > that.scale) return scale(that, self.scale).value === self.value;
|
|
20319
20323
|
if (self.scale < that.scale) return scale(self, that.scale).value === that.value;
|
|
20320
20324
|
return self.value === that.value;
|
|
@@ -20475,7 +20479,7 @@ const isZero = (n) => n.value === bigint0;
|
|
|
20475
20479
|
const isNegative = (n) => n.value < bigint0;
|
|
20476
20480
|
//#endregion
|
|
20477
20481
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/SchemaTransformation.js
|
|
20478
|
-
const TypeId$
|
|
20482
|
+
const TypeId$40 = "~effect/SchemaTransformation/Transformation";
|
|
20479
20483
|
/**
|
|
20480
20484
|
* Represents a bidirectional transformation between a decoded type `T` and an encoded
|
|
20481
20485
|
* type `E`, built from a pair of `Getter`s.
|
|
@@ -20518,7 +20522,7 @@ const TypeId$39 = "~effect/SchemaTransformation/Transformation";
|
|
|
20518
20522
|
* @since 4.0.0
|
|
20519
20523
|
*/
|
|
20520
20524
|
var Transformation = class Transformation {
|
|
20521
|
-
[TypeId$
|
|
20525
|
+
[TypeId$40] = TypeId$40;
|
|
20522
20526
|
_tag = "Transformation";
|
|
20523
20527
|
decode;
|
|
20524
20528
|
encode;
|
|
@@ -20564,7 +20568,7 @@ var Transformation = class Transformation {
|
|
|
20564
20568
|
* @since 4.0.0
|
|
20565
20569
|
*/
|
|
20566
20570
|
function isTransformation(u) {
|
|
20567
|
-
return hasProperty(u, TypeId$
|
|
20571
|
+
return hasProperty(u, TypeId$40);
|
|
20568
20572
|
}
|
|
20569
20573
|
/**
|
|
20570
20574
|
* Constructs a `Transformation` from an object with `decode` and `encode`
|
|
@@ -20597,7 +20601,7 @@ function isTransformation(u) {
|
|
|
20597
20601
|
* @category constructors
|
|
20598
20602
|
* @since 3.10.0
|
|
20599
20603
|
*/
|
|
20600
|
-
const make$
|
|
20604
|
+
const make$53 = (options) => {
|
|
20601
20605
|
if (isTransformation(options)) return options;
|
|
20602
20606
|
return new Transformation(options.decode, options.encode);
|
|
20603
20607
|
};
|
|
@@ -20946,7 +20950,7 @@ var Context = class {
|
|
|
20946
20950
|
this.annotations = annotations;
|
|
20947
20951
|
}
|
|
20948
20952
|
};
|
|
20949
|
-
const TypeId$
|
|
20953
|
+
const TypeId$39 = "~effect/Schema";
|
|
20950
20954
|
/**
|
|
20951
20955
|
* Represents the abstract base class for all {@link AST} node variants.
|
|
20952
20956
|
*
|
|
@@ -20968,7 +20972,7 @@ const TypeId$38 = "~effect/Schema";
|
|
|
20968
20972
|
* @since 4.0.0
|
|
20969
20973
|
*/
|
|
20970
20974
|
var Base = class {
|
|
20971
|
-
[TypeId$
|
|
20975
|
+
[TypeId$39] = TypeId$39;
|
|
20972
20976
|
annotations;
|
|
20973
20977
|
checks;
|
|
20974
20978
|
encoding;
|
|
@@ -22203,7 +22207,7 @@ var FilterGroup = class FilterGroup extends Class$3 {
|
|
|
22203
22207
|
};
|
|
22204
22208
|
/** @internal */
|
|
22205
22209
|
function makeFilter$1(filter, annotations, aborted = false) {
|
|
22206
|
-
return new Filter((input, ast, options) => make$
|
|
22210
|
+
return new Filter((input, ast, options) => make$55(input, ast, filter(input, ast, options)), annotations, aborted);
|
|
22207
22211
|
}
|
|
22208
22212
|
/**
|
|
22209
22213
|
* Creates a {@link Filter} that validates strings by running `RegExp.test`.
|
|
@@ -22731,7 +22735,7 @@ function nominal() {
|
|
|
22731
22735
|
*
|
|
22732
22736
|
* @since 4.0.0
|
|
22733
22737
|
*/
|
|
22734
|
-
const TypeId$
|
|
22738
|
+
const TypeId$38 = "~effect/platform/PlatformError";
|
|
22735
22739
|
/**
|
|
22736
22740
|
* Error data for an invalid argument passed to a platform API.
|
|
22737
22741
|
*
|
|
@@ -22841,7 +22845,7 @@ var PlatformError = class extends TaggedError("PlatformError") {
|
|
|
22841
22845
|
*
|
|
22842
22846
|
* @since 4.0.0
|
|
22843
22847
|
*/
|
|
22844
|
-
[TypeId$
|
|
22848
|
+
[TypeId$38] = TypeId$38;
|
|
22845
22849
|
get message() {
|
|
22846
22850
|
return this.reason.message;
|
|
22847
22851
|
}
|
|
@@ -23138,7 +23142,7 @@ const makeUnsafe$4 = makeLatchUnsafe;
|
|
|
23138
23142
|
* @category constructors
|
|
23139
23143
|
* @since 4.0.0
|
|
23140
23144
|
*/
|
|
23141
|
-
const make$
|
|
23145
|
+
const make$52 = makeLatch;
|
|
23142
23146
|
//#endregion
|
|
23143
23147
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/MutableList.js
|
|
23144
23148
|
/**
|
|
@@ -23210,7 +23214,7 @@ const Empty$2 = /*#__PURE__*/ Symbol.for("effect/MutableList/Empty");
|
|
|
23210
23214
|
* @category constructors
|
|
23211
23215
|
* @since 2.0.0
|
|
23212
23216
|
*/
|
|
23213
|
-
const make$
|
|
23217
|
+
const make$51 = () => ({
|
|
23214
23218
|
head: void 0,
|
|
23215
23219
|
tail: void 0,
|
|
23216
23220
|
length: 0
|
|
@@ -23626,9 +23630,9 @@ const filter$1 = (self, f) => {
|
|
|
23626
23630
|
const remove$5 = (self, value) => filter$1(self, (v) => v !== value);
|
|
23627
23631
|
//#endregion
|
|
23628
23632
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/MutableRef.js
|
|
23629
|
-
const TypeId$
|
|
23633
|
+
const TypeId$37 = "~effect/MutableRef";
|
|
23630
23634
|
const MutableRefProto = {
|
|
23631
|
-
[TypeId$
|
|
23635
|
+
[TypeId$37]: TypeId$37,
|
|
23632
23636
|
...PipeInspectableProto,
|
|
23633
23637
|
toJSON() {
|
|
23634
23638
|
return {
|
|
@@ -23666,7 +23670,7 @@ const MutableRefProto = {
|
|
|
23666
23670
|
* @category constructors
|
|
23667
23671
|
* @since 2.0.0
|
|
23668
23672
|
*/
|
|
23669
|
-
const make$
|
|
23673
|
+
const make$50 = (value) => {
|
|
23670
23674
|
const ref = Object.create(MutableRefProto);
|
|
23671
23675
|
ref.current = value;
|
|
23672
23676
|
return ref;
|
|
@@ -23703,7 +23707,7 @@ const make$49 = (value) => {
|
|
|
23703
23707
|
* @category general
|
|
23704
23708
|
* @since 2.0.0
|
|
23705
23709
|
*/
|
|
23706
|
-
const get$
|
|
23710
|
+
const get$8 = (self) => self.current;
|
|
23707
23711
|
/**
|
|
23708
23712
|
* Sets the MutableRef to a new value and returns the reference.
|
|
23709
23713
|
*
|
|
@@ -23814,7 +23818,7 @@ const set$6 = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
23814
23818
|
*
|
|
23815
23819
|
* @since 2.0.0
|
|
23816
23820
|
*/
|
|
23817
|
-
const TypeId$
|
|
23821
|
+
const TypeId$36 = "~effect/PubSub";
|
|
23818
23822
|
const SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
23819
23823
|
/**
|
|
23820
23824
|
* Creates a PubSub with a custom atomic implementation and strategy.
|
|
@@ -23839,7 +23843,7 @@ const SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
|
23839
23843
|
* @category constructors
|
|
23840
23844
|
* @since 4.0.0
|
|
23841
23845
|
*/
|
|
23842
|
-
const make$
|
|
23846
|
+
const make$49 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(), /* @__PURE__ */ new Map(), makeUnsafe$6(), makeUnsafe$4(false), make$50(false), options.strategy()));
|
|
23843
23847
|
/**
|
|
23844
23848
|
* Creates a bounded `PubSub` that applies backpressure when it reaches
|
|
23845
23849
|
* capacity.
|
|
@@ -23871,7 +23875,7 @@ const make$48 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(),
|
|
|
23871
23875
|
* @category constructors
|
|
23872
23876
|
* @since 2.0.0
|
|
23873
23877
|
*/
|
|
23874
|
-
const bounded$1 = (capacity) => make$
|
|
23878
|
+
const bounded$1 = (capacity) => make$49({
|
|
23875
23879
|
atomicPubSub: () => makeAtomicBounded(capacity),
|
|
23876
23880
|
strategy: () => new BackPressureStrategy()
|
|
23877
23881
|
});
|
|
@@ -23909,7 +23913,7 @@ const bounded$1 = (capacity) => make$48({
|
|
|
23909
23913
|
* @category constructors
|
|
23910
23914
|
* @since 2.0.0
|
|
23911
23915
|
*/
|
|
23912
|
-
const unbounded$1 = (options) => make$
|
|
23916
|
+
const unbounded$1 = (options) => make$49({
|
|
23913
23917
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
23914
23918
|
strategy: () => new DroppingStrategy()
|
|
23915
23919
|
});
|
|
@@ -24156,7 +24160,7 @@ const publishUnsafe = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
24156
24160
|
* @since 2.0.0
|
|
24157
24161
|
*/
|
|
24158
24162
|
const subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
24159
|
-
const localScope = get$
|
|
24163
|
+
const localScope = get$9(services, Scope);
|
|
24160
24164
|
const scope = forkUnsafe(self.scope);
|
|
24161
24165
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy);
|
|
24162
24166
|
return addFinalizer$1(scope, unsubscribe(subscription)).pipe(andThen(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -24325,7 +24329,7 @@ const removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
24325
24329
|
set.delete(pollers);
|
|
24326
24330
|
if (set.size === 0) subscribers.delete(subscription);
|
|
24327
24331
|
};
|
|
24328
|
-
const makeSubscriptionUnsafe = (pubsub, subscribers, strategy) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$
|
|
24332
|
+
const makeSubscriptionUnsafe = (pubsub, subscribers, strategy) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$51(), makeUnsafe$4(false), make$50(false), strategy, pubsub.replayWindow());
|
|
24329
24333
|
var BoundedPubSubArb = class {
|
|
24330
24334
|
array;
|
|
24331
24335
|
publisherIndex = 0;
|
|
@@ -24880,7 +24884,7 @@ var SubscriptionImpl = class {
|
|
|
24880
24884
|
}
|
|
24881
24885
|
};
|
|
24882
24886
|
var PubSubImpl = class {
|
|
24883
|
-
[TypeId$
|
|
24887
|
+
[TypeId$36] = { _A: identity };
|
|
24884
24888
|
pubsub;
|
|
24885
24889
|
subscribers;
|
|
24886
24890
|
scope;
|
|
@@ -24929,7 +24933,7 @@ const ensureCapacity = (capacity) => {
|
|
|
24929
24933
|
* @since 4.0.0
|
|
24930
24934
|
*/
|
|
24931
24935
|
var BackPressureStrategy = class {
|
|
24932
|
-
publishers = /*#__PURE__*/ make$
|
|
24936
|
+
publishers = /*#__PURE__*/ make$51();
|
|
24933
24937
|
get shutdown() {
|
|
24934
24938
|
return withFiber((fiber) => forEach$1(takeAll$2(this.publishers), ([_, deferred, last]) => last ? interruptWith(deferred, fiber.id) : void_$1, {
|
|
24935
24939
|
concurrency: "unbounded",
|
|
@@ -24942,7 +24946,7 @@ var BackPressureStrategy = class {
|
|
|
24942
24946
|
this.offerUnsafe(elements, deferred);
|
|
24943
24947
|
this.onPubSubEmptySpaceUnsafe(pubsub, subscribers);
|
|
24944
24948
|
this.completeSubscribersUnsafe(pubsub, subscribers);
|
|
24945
|
-
return (get$
|
|
24949
|
+
return (get$8(isShutdown) ? interrupt$1 : _await(deferred)).pipe(onInterrupt(() => {
|
|
24946
24950
|
this.removeUnsafe(deferred);
|
|
24947
24951
|
return void_$1;
|
|
24948
24952
|
}));
|
|
@@ -25227,7 +25231,7 @@ const emptyReplayWindow = {
|
|
|
25227
25231
|
*
|
|
25228
25232
|
* @since 3.8.0
|
|
25229
25233
|
*/
|
|
25230
|
-
const TypeId$
|
|
25234
|
+
const TypeId$35 = "~effect/Queue";
|
|
25231
25235
|
const EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
25232
25236
|
const DequeueTypeId = "~effect/Queue/Dequeue";
|
|
25233
25237
|
const variance$1 = {
|
|
@@ -25235,7 +25239,7 @@ const variance$1 = {
|
|
|
25235
25239
|
_E: identity
|
|
25236
25240
|
};
|
|
25237
25241
|
const QueueProto = {
|
|
25238
|
-
[TypeId$
|
|
25242
|
+
[TypeId$35]: variance$1,
|
|
25239
25243
|
[EnqueueTypeId]: variance$1,
|
|
25240
25244
|
[DequeueTypeId]: variance$1,
|
|
25241
25245
|
...PipeInspectableProto,
|
|
@@ -25289,12 +25293,12 @@ const QueueProto = {
|
|
|
25289
25293
|
* @category constructors
|
|
25290
25294
|
* @since 4.0.0
|
|
25291
25295
|
*/
|
|
25292
|
-
const make$
|
|
25296
|
+
const make$48 = (options) => withFiber$1((fiber) => {
|
|
25293
25297
|
const self = Object.create(QueueProto);
|
|
25294
25298
|
self.dispatcher = fiber.currentDispatcher;
|
|
25295
25299
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
25296
25300
|
self.strategy = options?.strategy ?? "suspend";
|
|
25297
|
-
self.messages = make$
|
|
25301
|
+
self.messages = make$51();
|
|
25298
25302
|
self.scheduleRunning = false;
|
|
25299
25303
|
self.state = {
|
|
25300
25304
|
_tag: "Open",
|
|
@@ -25332,7 +25336,7 @@ const make$47 = (options) => withFiber$1((fiber) => {
|
|
|
25332
25336
|
* @category constructors
|
|
25333
25337
|
* @since 2.0.0
|
|
25334
25338
|
*/
|
|
25335
|
-
const bounded = (capacity) => make$
|
|
25339
|
+
const bounded = (capacity) => make$48({ capacity });
|
|
25336
25340
|
/**
|
|
25337
25341
|
* Creates an unbounded queue that can grow to any size without blocking producers.
|
|
25338
25342
|
*
|
|
@@ -25368,7 +25372,7 @@ const bounded = (capacity) => make$47({ capacity });
|
|
|
25368
25372
|
* @category constructors
|
|
25369
25373
|
* @since 2.0.0
|
|
25370
25374
|
*/
|
|
25371
|
-
const unbounded = () => make$
|
|
25375
|
+
const unbounded = () => make$48();
|
|
25372
25376
|
/**
|
|
25373
25377
|
* Adds a message to the queue. Returns `false` if the queue is done.
|
|
25374
25378
|
*
|
|
@@ -26119,7 +26123,7 @@ var SemaphoreImpl = class {
|
|
|
26119
26123
|
return (self) => uninterruptibleMask$1((restore) => {
|
|
26120
26124
|
if (this.free < n) return succeedNone$1;
|
|
26121
26125
|
this.taken += n;
|
|
26122
|
-
return onExitPrimitive$1(restore(asSome(self)), () => {
|
|
26126
|
+
return onExitPrimitive$1(restore(asSome$1(self)), () => {
|
|
26123
26127
|
this.updateTakenUnsafe(getCurrentFiber(), (taken) => taken - n);
|
|
26124
26128
|
}, true);
|
|
26125
26129
|
});
|
|
@@ -26158,7 +26162,7 @@ var SemaphoreImpl = class {
|
|
|
26158
26162
|
* @category constructors
|
|
26159
26163
|
* @since 4.0.0
|
|
26160
26164
|
*/
|
|
26161
|
-
const make$
|
|
26165
|
+
const make$47 = (permits) => sync$1(() => new SemaphoreImpl(permits));
|
|
26162
26166
|
/**
|
|
26163
26167
|
* Runs an effect with a single permit and releases the permit when the effect
|
|
26164
26168
|
* completes.
|
|
@@ -26261,7 +26265,7 @@ const withPermit = (self, effect) => {
|
|
|
26261
26265
|
* @category type IDs
|
|
26262
26266
|
* @since 4.0.0
|
|
26263
26267
|
*/
|
|
26264
|
-
const TypeId$
|
|
26268
|
+
const TypeId$34 = "~effect/Channel";
|
|
26265
26269
|
/**
|
|
26266
26270
|
* Checks whether a value is a `Channel`.
|
|
26267
26271
|
*
|
|
@@ -26278,9 +26282,9 @@ const TypeId$33 = "~effect/Channel";
|
|
|
26278
26282
|
* @category guards
|
|
26279
26283
|
* @since 3.5.4
|
|
26280
26284
|
*/
|
|
26281
|
-
const isChannel = (u) => hasProperty(u, TypeId$
|
|
26285
|
+
const isChannel = (u) => hasProperty(u, TypeId$34);
|
|
26282
26286
|
const ChannelProto = {
|
|
26283
|
-
[TypeId$
|
|
26287
|
+
[TypeId$34]: {
|
|
26284
26288
|
_Env: identity,
|
|
26285
26289
|
_InErr: identity,
|
|
26286
26290
|
_InElem: identity,
|
|
@@ -26406,7 +26410,7 @@ const toTransform = (channel) => channel.transform;
|
|
|
26406
26410
|
* @since 4.0.0
|
|
26407
26411
|
*/
|
|
26408
26412
|
const DefaultChunkSize = 4096;
|
|
26409
|
-
const asyncQueue = (scope, f, options) => make$
|
|
26413
|
+
const asyncQueue = (scope, f, options) => make$48({
|
|
26410
26414
|
capacity: options?.bufferSize,
|
|
26411
26415
|
strategy: options?.strategy
|
|
26412
26416
|
}).pipe(tap((queue) => addFinalizer$1(scope, shutdown(queue))), tap((queue) => forkIn(provide$3(f(queue), scope), scope)));
|
|
@@ -27421,7 +27425,7 @@ const orDie$1 = (self) => catch_$1(self, die);
|
|
|
27421
27425
|
const mergeAll = /*#__PURE__*/ dual(2, (channels, { bufferSize = 16, concurrency, switch: switch_ = false }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
27422
27426
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
27423
27427
|
const semaphore = switch_ ? void 0 : makeUnsafe$3(concurrencyN);
|
|
27424
|
-
const doneLatch = yield* make$
|
|
27428
|
+
const doneLatch = yield* make$52(true);
|
|
27425
27429
|
const fibers = /* @__PURE__ */ new Set();
|
|
27426
27430
|
const queue = yield* bounded(bufferSize);
|
|
27427
27431
|
yield* addFinalizer$1(forkedScope, shutdown(queue));
|
|
@@ -27860,14 +27864,14 @@ const runFold = /*#__PURE__*/ dual(3, (self, initial, f) => suspend$2(() => {
|
|
|
27860
27864
|
const toPullScoped = (self, scope) => toTransform(self)(done(), scope);
|
|
27861
27865
|
//#endregion
|
|
27862
27866
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/internal/stream.js
|
|
27863
|
-
const TypeId$
|
|
27867
|
+
const TypeId$33 = "~effect/Stream";
|
|
27864
27868
|
const streamVariance = {
|
|
27865
27869
|
_R: identity,
|
|
27866
27870
|
_E: identity,
|
|
27867
27871
|
_A: identity
|
|
27868
27872
|
};
|
|
27869
27873
|
const StreamProto = {
|
|
27870
|
-
[TypeId$
|
|
27874
|
+
[TypeId$33]: streamVariance,
|
|
27871
27875
|
pipe() {
|
|
27872
27876
|
return pipeArguments(this, arguments);
|
|
27873
27877
|
}
|
|
@@ -27880,7 +27884,7 @@ const fromChannel$2 = (channel) => {
|
|
|
27880
27884
|
};
|
|
27881
27885
|
//#endregion
|
|
27882
27886
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Sink.js
|
|
27883
|
-
const TypeId$
|
|
27887
|
+
const TypeId$32 = "~effect/Sink";
|
|
27884
27888
|
const endVoid = /*#__PURE__*/ succeed$3([void 0]);
|
|
27885
27889
|
const sinkVariance = {
|
|
27886
27890
|
_A: identity,
|
|
@@ -27890,7 +27894,7 @@ const sinkVariance = {
|
|
|
27890
27894
|
_R: identity
|
|
27891
27895
|
};
|
|
27892
27896
|
const SinkProto = {
|
|
27893
|
-
[TypeId$
|
|
27897
|
+
[TypeId$32]: sinkVariance,
|
|
27894
27898
|
pipe() {
|
|
27895
27899
|
return pipeArguments(this, arguments);
|
|
27896
27900
|
}
|
|
@@ -27913,7 +27917,7 @@ const SinkProto = {
|
|
|
27913
27917
|
* @category guards
|
|
27914
27918
|
* @since 4.0.0
|
|
27915
27919
|
*/
|
|
27916
|
-
const isSink = (u) => hasProperty(u, TypeId$
|
|
27920
|
+
const isSink = (u) => hasProperty(u, TypeId$32);
|
|
27917
27921
|
/**
|
|
27918
27922
|
* Creates a sink from a `Channel`.
|
|
27919
27923
|
*
|
|
@@ -28062,9 +28066,9 @@ const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap$2(
|
|
|
28062
28066
|
const unwrap$2 = (effect) => fromChannel$1(unwrap$3(map$4(effect, toChannel$1)));
|
|
28063
28067
|
//#endregion
|
|
28064
28068
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/MutableHashMap.js
|
|
28065
|
-
const TypeId$
|
|
28069
|
+
const TypeId$31 = "~effect/collections/MutableHashMap";
|
|
28066
28070
|
const MutableHashMapProto = {
|
|
28067
|
-
[TypeId$
|
|
28071
|
+
[TypeId$31]: TypeId$31,
|
|
28068
28072
|
[Symbol.iterator]() {
|
|
28069
28073
|
return this.backing[Symbol.iterator]();
|
|
28070
28074
|
},
|
|
@@ -28154,7 +28158,7 @@ const empty$9 = () => {
|
|
|
28154
28158
|
* @category elements
|
|
28155
28159
|
* @since 2.0.0
|
|
28156
28160
|
*/
|
|
28157
|
-
const get$
|
|
28161
|
+
const get$7 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
28158
28162
|
if (self.backing.has(key)) return some(self.backing.get(key));
|
|
28159
28163
|
else if (isSimpleKey(key)) return none();
|
|
28160
28164
|
const refKey = referentialKeysCache.get(self);
|
|
@@ -28201,7 +28205,7 @@ const getFromBucket = (self, bucket, key) => {
|
|
|
28201
28205
|
* @category elements
|
|
28202
28206
|
* @since 2.0.0
|
|
28203
28207
|
*/
|
|
28204
|
-
const has = /*#__PURE__*/ dual(2, (self, key) => isSome(get$
|
|
28208
|
+
const has$1 = /*#__PURE__*/ dual(2, (self, key) => isSome(get$7(self, key)));
|
|
28205
28209
|
/**
|
|
28206
28210
|
* Sets a key-value pair in the MutableHashMap, mutating the map in place.
|
|
28207
28211
|
* If the key already exists, its value is updated.
|
|
@@ -28432,9 +28436,9 @@ const size = (self) => self.backing.size;
|
|
|
28432
28436
|
*
|
|
28433
28437
|
* @since 3.5.0
|
|
28434
28438
|
*/
|
|
28435
|
-
const TypeId$
|
|
28439
|
+
const TypeId$30 = "~effect/RcMap";
|
|
28436
28440
|
const makeUnsafe$2 = (options) => ({
|
|
28437
|
-
[TypeId$
|
|
28441
|
+
[TypeId$30]: TypeId$30,
|
|
28438
28442
|
lookup: options.lookup,
|
|
28439
28443
|
context: options.context,
|
|
28440
28444
|
scope: options.scope,
|
|
@@ -28494,9 +28498,9 @@ const makeUnsafe$2 = (options) => ({
|
|
|
28494
28498
|
* @category models
|
|
28495
28499
|
* @since 3.5.0
|
|
28496
28500
|
*/
|
|
28497
|
-
const make$
|
|
28501
|
+
const make$46 = (options) => withFiber((fiber) => {
|
|
28498
28502
|
const context = fiber.context;
|
|
28499
|
-
const scope = get$
|
|
28503
|
+
const scope = get$9(context, Scope);
|
|
28500
28504
|
const self = makeUnsafe$2({
|
|
28501
28505
|
lookup: options.lookup,
|
|
28502
28506
|
context,
|
|
@@ -28554,11 +28558,11 @@ const make$45 = (options) => withFiber((fiber) => {
|
|
|
28554
28558
|
* @category combinators
|
|
28555
28559
|
* @since 3.5.0
|
|
28556
28560
|
*/
|
|
28557
|
-
const get$
|
|
28561
|
+
const get$6 = /*#__PURE__*/ dual(2, (self, key) => uninterruptibleMask((restore) => {
|
|
28558
28562
|
if (self.state._tag === "Closed") return interrupt$1;
|
|
28559
28563
|
const state = self.state;
|
|
28560
28564
|
const parent = getCurrent();
|
|
28561
|
-
const o = get$
|
|
28565
|
+
const o = get$7(state.map, key);
|
|
28562
28566
|
let entry;
|
|
28563
28567
|
if (o._tag === "Some") {
|
|
28564
28568
|
entry = o.value;
|
|
@@ -28588,7 +28592,7 @@ const get$5 = /*#__PURE__*/ dual(2, (self, key) => uninterruptibleMask((restore)
|
|
|
28588
28592
|
const release = (self, key, entry) => withFiber((fiber) => {
|
|
28589
28593
|
entry.refCount--;
|
|
28590
28594
|
if (entry.refCount > 0) return void_$1;
|
|
28591
|
-
else if (self.state._tag === "Closed" || !has(self.state.map, key) || isZero$1(entry.idleTimeToLive)) {
|
|
28595
|
+
else if (self.state._tag === "Closed" || !has$1(self.state.map, key) || isZero$1(entry.idleTimeToLive)) {
|
|
28592
28596
|
if (self.state._tag === "Open") remove$4(self.state.map, key);
|
|
28593
28597
|
return close(entry.scope, void_$2);
|
|
28594
28598
|
} else if (!isFinite$1(entry.idleTimeToLive)) return void_$1;
|
|
@@ -28611,7 +28615,7 @@ const release = (self, key, entry) => withFiber((fiber) => {
|
|
|
28611
28615
|
});
|
|
28612
28616
|
//#endregion
|
|
28613
28617
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/internal/rcRef.js
|
|
28614
|
-
const TypeId$
|
|
28618
|
+
const TypeId$29 = "~effect/RcRef";
|
|
28615
28619
|
const stateEmpty = { _tag: "Empty" };
|
|
28616
28620
|
const stateClosed = { _tag: "Closed" };
|
|
28617
28621
|
const variance = {
|
|
@@ -28619,7 +28623,7 @@ const variance = {
|
|
|
28619
28623
|
_E: identity
|
|
28620
28624
|
};
|
|
28621
28625
|
var RcRefImpl = class {
|
|
28622
|
-
[TypeId$
|
|
28626
|
+
[TypeId$29] = variance;
|
|
28623
28627
|
pipe() {
|
|
28624
28628
|
return pipeArguments(this, arguments);
|
|
28625
28629
|
}
|
|
@@ -28637,9 +28641,9 @@ var RcRefImpl = class {
|
|
|
28637
28641
|
}
|
|
28638
28642
|
};
|
|
28639
28643
|
/** @internal */
|
|
28640
|
-
const make$
|
|
28644
|
+
const make$45 = (options) => withFiber((fiber) => {
|
|
28641
28645
|
const context = fiber.context;
|
|
28642
|
-
const scope = get$
|
|
28646
|
+
const scope = get$9(context, Scope);
|
|
28643
28647
|
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive ? fromInputUnsafe(options.idleTimeToLive) : void 0);
|
|
28644
28648
|
return as(addFinalizerExit(scope, () => {
|
|
28645
28649
|
const close$1 = ref.state._tag === "Acquired" ? close(ref.state.scope, void_$2) : void_$1;
|
|
@@ -28671,7 +28675,7 @@ const getState = (self) => uninterruptibleMask((restore) => {
|
|
|
28671
28675
|
}
|
|
28672
28676
|
});
|
|
28673
28677
|
/** @internal */
|
|
28674
|
-
const get$
|
|
28678
|
+
const get$5 = /*#__PURE__*/ fnUntraced(function* (self_) {
|
|
28675
28679
|
const self = self_;
|
|
28676
28680
|
const state = yield* getState(self);
|
|
28677
28681
|
const scope$6 = yield* scope;
|
|
@@ -28740,7 +28744,7 @@ const get$4 = /*#__PURE__*/ fnUntraced(function* (self_) {
|
|
|
28740
28744
|
* @category constructors
|
|
28741
28745
|
* @since 3.5.0
|
|
28742
28746
|
*/
|
|
28743
|
-
const make$
|
|
28747
|
+
const make$44 = make$45;
|
|
28744
28748
|
/**
|
|
28745
28749
|
* Gets the value from an `RcRef`, acquiring it first if needed.
|
|
28746
28750
|
*
|
|
@@ -28784,7 +28788,7 @@ const make$43 = make$44;
|
|
|
28784
28788
|
* @category combinators
|
|
28785
28789
|
* @since 3.5.0
|
|
28786
28790
|
*/
|
|
28787
|
-
const get$
|
|
28791
|
+
const get$4 = get$5;
|
|
28788
28792
|
//#endregion
|
|
28789
28793
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Stream.js
|
|
28790
28794
|
/**
|
|
@@ -28884,7 +28888,7 @@ const get$3 = get$4;
|
|
|
28884
28888
|
* @category type IDs
|
|
28885
28889
|
* @since 4.0.0
|
|
28886
28890
|
*/
|
|
28887
|
-
const TypeId$
|
|
28891
|
+
const TypeId$28 = "~effect/Stream";
|
|
28888
28892
|
/**
|
|
28889
28893
|
* Checks whether a value is a Stream.
|
|
28890
28894
|
*
|
|
@@ -28909,7 +28913,7 @@ const TypeId$27 = "~effect/Stream";
|
|
|
28909
28913
|
* @category guards
|
|
28910
28914
|
* @since 4.0.0
|
|
28911
28915
|
*/
|
|
28912
|
-
const isStream = (u) => hasProperty(u, TypeId$
|
|
28916
|
+
const isStream = (u) => hasProperty(u, TypeId$28);
|
|
28913
28917
|
/**
|
|
28914
28918
|
* Creates a stream from a array-emitting `Channel`.
|
|
28915
28919
|
*
|
|
@@ -28957,42 +28961,6 @@ const fromChannel = fromChannel$2;
|
|
|
28957
28961
|
*/
|
|
28958
28962
|
const fromEffectRepeat = (effect) => fromPull(succeed$3(map$4(effect, of)));
|
|
28959
28963
|
/**
|
|
28960
|
-
* Creates a stream that emits `void` immediately once, then emits another
|
|
28961
|
-
* `void` after each specified interval.
|
|
28962
|
-
*
|
|
28963
|
-
* **Example** (Emitting ticks on an interval)
|
|
28964
|
-
*
|
|
28965
|
-
* ```ts
|
|
28966
|
-
* import { Console, Effect, Stream } from "effect"
|
|
28967
|
-
*
|
|
28968
|
-
* const program = Effect.gen(function*() {
|
|
28969
|
-
* const ticks = yield* Stream.tick("200 millis").pipe(
|
|
28970
|
-
* Stream.take(3),
|
|
28971
|
-
* Stream.runCollect
|
|
28972
|
-
* )
|
|
28973
|
-
* yield* Console.log(ticks)
|
|
28974
|
-
* })
|
|
28975
|
-
*
|
|
28976
|
-
* Effect.runPromise(program)
|
|
28977
|
-
* // Output: [ undefined, undefined, undefined ]
|
|
28978
|
-
* ```
|
|
28979
|
-
*
|
|
28980
|
-
* @category constructors
|
|
28981
|
-
* @since 2.0.0
|
|
28982
|
-
*/
|
|
28983
|
-
const tick = (interval) => fromPull(sync(() => {
|
|
28984
|
-
let first = true;
|
|
28985
|
-
const effect = succeed$3(of(void 0));
|
|
28986
|
-
const delayed = delay(effect, interval);
|
|
28987
|
-
return suspend$2(() => {
|
|
28988
|
-
if (first) {
|
|
28989
|
-
first = false;
|
|
28990
|
-
return effect;
|
|
28991
|
-
}
|
|
28992
|
-
return delayed;
|
|
28993
|
-
});
|
|
28994
|
-
}));
|
|
28995
|
-
/**
|
|
28996
28964
|
* Creates a stream from a pull effect, such as one produced by `Stream.toPull`.
|
|
28997
28965
|
*
|
|
28998
28966
|
* **Details**
|
|
@@ -29154,7 +29122,7 @@ const empty$8 = /*#__PURE__*/ fromChannel(empty$10);
|
|
|
29154
29122
|
* @category constructors
|
|
29155
29123
|
* @since 2.0.0
|
|
29156
29124
|
*/
|
|
29157
|
-
const make$
|
|
29125
|
+
const make$43 = (...values) => fromArray(values);
|
|
29158
29126
|
/**
|
|
29159
29127
|
* Creates a lazily constructed stream.
|
|
29160
29128
|
*
|
|
@@ -30321,7 +30289,7 @@ const toReadableStreamEffect = /*#__PURE__*/ dual((args) => isStream(args[0]), (
|
|
|
30321
30289
|
*
|
|
30322
30290
|
* @since 4.0.0
|
|
30323
30291
|
*/
|
|
30324
|
-
const TypeId$
|
|
30292
|
+
const TypeId$27 = "~effect/platform/FileSystem";
|
|
30325
30293
|
/**
|
|
30326
30294
|
* Creates a `Size` from various numeric input types.
|
|
30327
30295
|
*
|
|
@@ -30429,9 +30397,9 @@ const FileSystem = /*#__PURE__*/ Service("effect/platform/FileSystem");
|
|
|
30429
30397
|
* @category constructors
|
|
30430
30398
|
* @since 4.0.0
|
|
30431
30399
|
*/
|
|
30432
|
-
const make$
|
|
30400
|
+
const make$42 = (impl) => FileSystem.of({
|
|
30433
30401
|
...impl,
|
|
30434
|
-
[TypeId$
|
|
30402
|
+
[TypeId$27]: TypeId$27,
|
|
30435
30403
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$3(false) : fail$3(e))),
|
|
30436
30404
|
readFileString: (path, encoding) => flatMap$2(impl.readFile(path), (_) => try_({
|
|
30437
30405
|
try: () => new TextDecoder(encoding).decode(_),
|
|
@@ -30452,7 +30420,7 @@ const make$41 = (impl) => FileSystem.of({
|
|
|
30452
30420
|
return fromPull(succeed$3(flatMap$2(suspend$2(() => {
|
|
30453
30421
|
if (bytesToRead !== void 0 && bytesToRead <= totalBytesRead) return done();
|
|
30454
30422
|
return bytesToRead !== void 0 && bytesToRead - totalBytesRead < chunkSize ? file.readAlloc(bytesToRead - totalBytesRead) : readChunk;
|
|
30455
|
-
}), match$
|
|
30423
|
+
}), match$5({
|
|
30456
30424
|
onNone: () => done(),
|
|
30457
30425
|
onSome: (buf) => {
|
|
30458
30426
|
totalBytesRead += BigInt(buf.length);
|
|
@@ -30605,7 +30573,7 @@ var WatchBackend = class extends Service()("effect/platform/FileSystem/WatchBack
|
|
|
30605
30573
|
* @category type IDs
|
|
30606
30574
|
* @since 4.0.0
|
|
30607
30575
|
*/
|
|
30608
|
-
const TypeId$
|
|
30576
|
+
const TypeId$26 = "~effect/platform/Path";
|
|
30609
30577
|
/**
|
|
30610
30578
|
* Service tag for accessing the current `Path` implementation.
|
|
30611
30579
|
*
|
|
@@ -30734,7 +30702,7 @@ const makeHandle = (params) => Object.assign(Object.create(HandleProto), params)
|
|
|
30734
30702
|
* @category models
|
|
30735
30703
|
* @since 4.0.0
|
|
30736
30704
|
*/
|
|
30737
|
-
const make$
|
|
30705
|
+
const make$41 = (spawn) => {
|
|
30738
30706
|
const streamString = (command, options) => spawn(command).pipe(map$4((handle) => decodeText(options?.includeStderr === true ? handle.all : handle.stdout)), unwrap$1);
|
|
30739
30707
|
const streamLines = (command, options) => splitLines(streamString(command, options));
|
|
30740
30708
|
return ChildProcessSpawner.of({
|
|
@@ -30798,7 +30766,7 @@ var ChildProcessSpawner = class extends Service()("effect/process/ChildProcessSp
|
|
|
30798
30766
|
*
|
|
30799
30767
|
* @since 4.0.0
|
|
30800
30768
|
*/
|
|
30801
|
-
const TypeId$
|
|
30769
|
+
const TypeId$25 = "~effect/unstable/process/ChildProcess";
|
|
30802
30770
|
const Proto$12 = {
|
|
30803
30771
|
.../*#__PURE__*/ Prototype({
|
|
30804
30772
|
label: "Command",
|
|
@@ -30806,7 +30774,7 @@ const Proto$12 = {
|
|
|
30806
30774
|
return getUnsafe(fiber.context, ChildProcessSpawner).spawn(this);
|
|
30807
30775
|
}
|
|
30808
30776
|
}),
|
|
30809
|
-
[TypeId$
|
|
30777
|
+
[TypeId$25]: TypeId$25
|
|
30810
30778
|
};
|
|
30811
30779
|
const makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto$12), {
|
|
30812
30780
|
_tag: "StandardCommand",
|
|
@@ -30845,7 +30813,7 @@ const makeStandardCommand = (command, args, options) => Object.assign(Object.cre
|
|
|
30845
30813
|
* @category constructors
|
|
30846
30814
|
* @since 4.0.0
|
|
30847
30815
|
*/
|
|
30848
|
-
const make$
|
|
30816
|
+
const make$40 = function make(...args) {
|
|
30849
30817
|
if (isTemplateString(args[0])) {
|
|
30850
30818
|
const [templates, ...expressions] = args;
|
|
30851
30819
|
const tokens = parseTemplates(templates, expressions);
|
|
@@ -31230,7 +31198,7 @@ const readableToPullUnsafe = (options) => {
|
|
|
31230
31198
|
const readable = options.readable;
|
|
31231
31199
|
if (readable.readableEnded) return succeed$3(done());
|
|
31232
31200
|
const closeOnDone = options.closeOnDone ?? true;
|
|
31233
|
-
const exit = options.exit ?? make$
|
|
31201
|
+
const exit = options.exit ?? make$50(void 0);
|
|
31234
31202
|
const latch = makeUnsafe$4(false);
|
|
31235
31203
|
function onReadable() {
|
|
31236
31204
|
latch.openUnsafe();
|
|
@@ -31567,7 +31535,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
|
|
|
31567
31535
|
const stdinConfig = resolveStdinOption(command.options);
|
|
31568
31536
|
const sourceStream = unwrap$1(succeed$3(getSourceStream(handles[handles.length - 1], options.from)));
|
|
31569
31537
|
const toOption = options.to ?? "stdin";
|
|
31570
|
-
if (toOption === "stdin") handles.push(yield* spawnCommand(make$
|
|
31538
|
+
if (toOption === "stdin") handles.push(yield* spawnCommand(make$40(command.command, command.args, {
|
|
31571
31539
|
...command.options,
|
|
31572
31540
|
stdin: {
|
|
31573
31541
|
...stdinConfig,
|
|
@@ -31579,7 +31547,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
|
|
|
31579
31547
|
if (isNotUndefined(fd)) {
|
|
31580
31548
|
const fdName$1 = fdName(fd);
|
|
31581
31549
|
const existingFds = command.options.additionalFds ?? {};
|
|
31582
|
-
handles.push(yield* spawnCommand(make$
|
|
31550
|
+
handles.push(yield* spawnCommand(make$40(command.command, command.args, {
|
|
31583
31551
|
...command.options,
|
|
31584
31552
|
additionalFds: {
|
|
31585
31553
|
...existingFds,
|
|
@@ -31589,7 +31557,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
|
|
|
31589
31557
|
}
|
|
31590
31558
|
}
|
|
31591
31559
|
})));
|
|
31592
|
-
} else handles.push(yield* spawnCommand(make$
|
|
31560
|
+
} else handles.push(yield* spawnCommand(make$40(command.command, command.args, {
|
|
31593
31561
|
...command.options,
|
|
31594
31562
|
stdin: {
|
|
31595
31563
|
...stdinConfig,
|
|
@@ -31620,7 +31588,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
|
|
|
31620
31588
|
}
|
|
31621
31589
|
}
|
|
31622
31590
|
});
|
|
31623
|
-
return make$
|
|
31591
|
+
return make$41(spawnCommand);
|
|
31624
31592
|
}));
|
|
31625
31593
|
/**
|
|
31626
31594
|
* Flattens a `Command` into an array of `StandardCommand`s along with pipe
|
|
@@ -31750,7 +31718,7 @@ const RefProto = {
|
|
|
31750
31718
|
*/
|
|
31751
31719
|
const makeUnsafe$1 = (value) => {
|
|
31752
31720
|
const self = Object.create(RefProto);
|
|
31753
|
-
self.ref = make$
|
|
31721
|
+
self.ref = make$50(value);
|
|
31754
31722
|
return self;
|
|
31755
31723
|
};
|
|
31756
31724
|
/**
|
|
@@ -31777,7 +31745,7 @@ const makeUnsafe$1 = (value) => {
|
|
|
31777
31745
|
* @category constructors
|
|
31778
31746
|
* @since 2.0.0
|
|
31779
31747
|
*/
|
|
31780
|
-
const make$
|
|
31748
|
+
const make$38 = (value) => sync(() => makeUnsafe$1(value));
|
|
31781
31749
|
/**
|
|
31782
31750
|
* Gets the current value of the Ref.
|
|
31783
31751
|
*
|
|
@@ -31802,7 +31770,7 @@ const make$37 = (value) => sync(() => makeUnsafe$1(value));
|
|
|
31802
31770
|
* @category getters
|
|
31803
31771
|
* @since 2.0.0
|
|
31804
31772
|
*/
|
|
31805
|
-
const get$
|
|
31773
|
+
const get$3 = (self) => sync(() => self.ref.current);
|
|
31806
31774
|
/**
|
|
31807
31775
|
* Sets the value of the Ref to the specified value.
|
|
31808
31776
|
*
|
|
@@ -32367,7 +32335,7 @@ var HashMapImpl = class {
|
|
|
32367
32335
|
const thatImpl = that;
|
|
32368
32336
|
if (this.size !== thatImpl.size) return false;
|
|
32369
32337
|
for (const [key, value] of this) {
|
|
32370
|
-
const otherValue = pipe(that, get$
|
|
32338
|
+
const otherValue = pipe(that, get$2(key));
|
|
32371
32339
|
if (isNone(otherValue) || !equals$2(value, otherValue.value)) return false;
|
|
32372
32340
|
}
|
|
32373
32341
|
return true;
|
|
@@ -32402,10 +32370,14 @@ const isHashMap = (u) => hasProperty(u, HashMapTypeId);
|
|
|
32402
32370
|
/** @internal */
|
|
32403
32371
|
const empty$7 = () => new HashMapImpl(false, 0, emptyNode, 0);
|
|
32404
32372
|
/** @internal */
|
|
32405
|
-
const get$
|
|
32373
|
+
const get$2 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
32406
32374
|
return self._root.get(0, hash(key), key);
|
|
32407
32375
|
});
|
|
32408
32376
|
/** @internal */
|
|
32377
|
+
const has = /*#__PURE__*/ dual(2, (self, key) => {
|
|
32378
|
+
return self._root.has(0, hash(key), key);
|
|
32379
|
+
});
|
|
32380
|
+
/** @internal */
|
|
32409
32381
|
const set$3 = /*#__PURE__*/ dual(3, (self, key, value) => {
|
|
32410
32382
|
const impl = self;
|
|
32411
32383
|
const hash$2 = hash(key);
|
|
@@ -32441,6 +32413,12 @@ const values$1 = (self) => {
|
|
|
32441
32413
|
};
|
|
32442
32414
|
};
|
|
32443
32415
|
/** @internal */
|
|
32416
|
+
const modifyAt$1 = /*#__PURE__*/ dual(3, (self, key, f) => {
|
|
32417
|
+
const updated = f(get$2(self, key));
|
|
32418
|
+
if (isNone(updated)) return has(self, key) ? remove$3(self, key) : self;
|
|
32419
|
+
return set$3(self, key, updated.value);
|
|
32420
|
+
});
|
|
32421
|
+
/** @internal */
|
|
32444
32422
|
const remove$3 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
32445
32423
|
const impl = self;
|
|
32446
32424
|
const hash$3 = hash(key);
|
|
@@ -32550,6 +32528,29 @@ const remove$3 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
|
32550
32528
|
*/
|
|
32551
32529
|
const empty$6 = empty$7;
|
|
32552
32530
|
/**
|
|
32531
|
+
* Looks up the value for the specified key in the `HashMap` safely using the
|
|
32532
|
+
* internal hashing function.
|
|
32533
|
+
*
|
|
32534
|
+
* **Example** (Looking up values)
|
|
32535
|
+
*
|
|
32536
|
+
* ```ts
|
|
32537
|
+
* import { HashMap } from "effect"
|
|
32538
|
+
*
|
|
32539
|
+
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
32540
|
+
*
|
|
32541
|
+
* console.log(HashMap.get(map, "a")) // Option.some(1)
|
|
32542
|
+
* console.log(HashMap.get(map, "c")) // Option.none()
|
|
32543
|
+
*
|
|
32544
|
+
* // Using pipe syntax
|
|
32545
|
+
* const value = HashMap.get("b")(map)
|
|
32546
|
+
* console.log(value) // Option.some(2)
|
|
32547
|
+
* ```
|
|
32548
|
+
*
|
|
32549
|
+
* @category elements
|
|
32550
|
+
* @since 2.0.0
|
|
32551
|
+
*/
|
|
32552
|
+
const get$1 = get$2;
|
|
32553
|
+
/**
|
|
32553
32554
|
* Sets the specified key to the specified value using the internal hashing
|
|
32554
32555
|
* function.
|
|
32555
32556
|
*
|
|
@@ -32590,6 +32591,34 @@ const set$2 = set$3;
|
|
|
32590
32591
|
*/
|
|
32591
32592
|
const values = values$1;
|
|
32592
32593
|
/**
|
|
32594
|
+
* Sets or removes the specified key using an update function.
|
|
32595
|
+
*
|
|
32596
|
+
* **Details**
|
|
32597
|
+
*
|
|
32598
|
+
* The update function receives `Some(value)` when the key exists or `None`
|
|
32599
|
+
* when it does not. Returning `Some(newValue)` stores the value, and returning
|
|
32600
|
+
* `None` removes the key or leaves it absent.
|
|
32601
|
+
*
|
|
32602
|
+
* **Example** (Updating values with Options)
|
|
32603
|
+
*
|
|
32604
|
+
* ```ts
|
|
32605
|
+
* import { HashMap, Option } from "effect"
|
|
32606
|
+
*
|
|
32607
|
+
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
32608
|
+
*
|
|
32609
|
+
* // Increment existing value or set to 1 if not present
|
|
32610
|
+
* const updateFn = (option: Option.Option<number>) =>
|
|
32611
|
+
* Option.isSome(option) ? Option.some(option.value + 1) : Option.some(1)
|
|
32612
|
+
*
|
|
32613
|
+
* const updated = HashMap.modifyAt(map, "a", updateFn)
|
|
32614
|
+
* console.log(HashMap.get(updated, "a")) // Option.some(2)
|
|
32615
|
+
* ```
|
|
32616
|
+
*
|
|
32617
|
+
* @category transforming
|
|
32618
|
+
* @since 2.0.0
|
|
32619
|
+
*/
|
|
32620
|
+
const modifyAt = modifyAt$1;
|
|
32621
|
+
/**
|
|
32593
32622
|
* Removes the entry for the specified key in the `HashMap` using the internal
|
|
32594
32623
|
* hashing function.
|
|
32595
32624
|
*
|
|
@@ -32665,6 +32694,22 @@ const lambda = (f) => f;
|
|
|
32665
32694
|
* @since 4.0.0
|
|
32666
32695
|
*/
|
|
32667
32696
|
const map$1 = /*#__PURE__*/ dual(2, (self, f) => self === void 0 ? void 0 : f(self));
|
|
32697
|
+
/**
|
|
32698
|
+
* Pattern matches on an `A | undefined` value, running `onDefined` when the
|
|
32699
|
+
* value is present or evaluating `onUndefined` when the value is `undefined`.
|
|
32700
|
+
*
|
|
32701
|
+
* **When to use**
|
|
32702
|
+
*
|
|
32703
|
+
* Use when you need to turn an `A | undefined` into a non-optional result by
|
|
32704
|
+
* handling both the defined and undefined branches in one expression.
|
|
32705
|
+
*
|
|
32706
|
+
* @see {@link map} for transforming defined values while preserving `undefined`
|
|
32707
|
+
* @see {@link getOrThrowWith} for throwing when the value is `undefined` instead of returning a fallback branch
|
|
32708
|
+
*
|
|
32709
|
+
* @category pattern matching
|
|
32710
|
+
* @since 4.0.0
|
|
32711
|
+
*/
|
|
32712
|
+
const match = /*#__PURE__*/ dual(2, (self, { onDefined, onUndefined }) => self === void 0 ? onUndefined() : onDefined(self));
|
|
32668
32713
|
//#endregion
|
|
32669
32714
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/SchemaParser.js
|
|
32670
32715
|
/**
|
|
@@ -32793,7 +32838,7 @@ function makeOption(schema) {
|
|
|
32793
32838
|
* @category constructors
|
|
32794
32839
|
* @since 4.0.0
|
|
32795
32840
|
*/
|
|
32796
|
-
function make$
|
|
32841
|
+
function make$37(schema) {
|
|
32797
32842
|
const parser = makeEffect(schema);
|
|
32798
32843
|
return (input, options) => {
|
|
32799
32844
|
return runSync(mapErrorEager(parser(input, options), (issue) => new Error(issue.toString(), { cause: issue })));
|
|
@@ -32999,9 +33044,9 @@ const recur$1 = /*#__PURE__*/ memoize((ast) => {
|
|
|
32999
33044
|
//#endregion
|
|
33000
33045
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/internal/schema/schema.js
|
|
33001
33046
|
/** @internal */
|
|
33002
|
-
const TypeId$
|
|
33047
|
+
const TypeId$24 = "~effect/Schema/Schema";
|
|
33003
33048
|
const SchemaProto = {
|
|
33004
|
-
[TypeId$
|
|
33049
|
+
[TypeId$24]: TypeId$24,
|
|
33005
33050
|
pipe() {
|
|
33006
33051
|
return pipeArguments(this, arguments);
|
|
33007
33052
|
},
|
|
@@ -33016,13 +33061,13 @@ const SchemaProto = {
|
|
|
33016
33061
|
}
|
|
33017
33062
|
};
|
|
33018
33063
|
/** @internal */
|
|
33019
|
-
function make$
|
|
33064
|
+
function make$36(ast, options) {
|
|
33020
33065
|
const self = Object.create(SchemaProto);
|
|
33021
33066
|
if (options) Object.assign(self, options);
|
|
33022
33067
|
self.ast = ast;
|
|
33023
|
-
self.rebuild = (ast) => make$
|
|
33068
|
+
self.rebuild = (ast) => make$36(ast, options);
|
|
33024
33069
|
self.makeEffect = flow(makeEffect(self), mapErrorEager((issue) => new SchemaError(issue)));
|
|
33025
|
-
self.make = make$
|
|
33070
|
+
self.make = make$37(self);
|
|
33026
33071
|
self.makeOption = makeOption(self);
|
|
33027
33072
|
return self;
|
|
33028
33073
|
}
|
|
@@ -33072,7 +33117,7 @@ function makeReorder(getPriority) {
|
|
|
33072
33117
|
}
|
|
33073
33118
|
//#endregion
|
|
33074
33119
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Schema.js
|
|
33075
|
-
const TypeId$
|
|
33120
|
+
const TypeId$23 = TypeId$24;
|
|
33076
33121
|
/**
|
|
33077
33122
|
* Creates a schema for a **parametric** type (a generic container such as
|
|
33078
33123
|
* `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
|
|
@@ -33124,7 +33169,7 @@ const TypeId$22 = TypeId$23;
|
|
|
33124
33169
|
*/
|
|
33125
33170
|
function declareConstructor() {
|
|
33126
33171
|
return (typeParameters, run, annotations) => {
|
|
33127
|
-
return make$
|
|
33172
|
+
return make$35(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make$35(ast))), annotations));
|
|
33128
33173
|
};
|
|
33129
33174
|
}
|
|
33130
33175
|
/**
|
|
@@ -33209,6 +33254,25 @@ function decodeUnknownEffect(schema, options) {
|
|
|
33209
33254
|
};
|
|
33210
33255
|
}
|
|
33211
33256
|
/**
|
|
33257
|
+
* Decodes a typed input (the schema's `Encoded` type) against a schema,
|
|
33258
|
+
* returning an `Effect` that succeeds with the decoded value or fails with a
|
|
33259
|
+
* {@link SchemaError}.
|
|
33260
|
+
*
|
|
33261
|
+
* **When to use**
|
|
33262
|
+
*
|
|
33263
|
+
* Use when the input is already typed as the schema's `Encoded` type.
|
|
33264
|
+
*
|
|
33265
|
+
* **Details**
|
|
33266
|
+
*
|
|
33267
|
+
* For `unknown` input use {@link decodeUnknownEffect}.
|
|
33268
|
+
* Options may be provided either when creating the decoder or when applying it;
|
|
33269
|
+
* application options override creation options.
|
|
33270
|
+
*
|
|
33271
|
+
* @category decoding
|
|
33272
|
+
* @since 4.0.0
|
|
33273
|
+
*/
|
|
33274
|
+
const decodeEffect = decodeUnknownEffect;
|
|
33275
|
+
/**
|
|
33212
33276
|
* Decodes an `unknown` input against a schema synchronously, returning the
|
|
33213
33277
|
* decoded value or throwing an `Error` whose cause contains the schema issue.
|
|
33214
33278
|
*
|
|
@@ -33282,6 +33346,25 @@ function encodeUnknownEffect(schema, options) {
|
|
|
33282
33346
|
};
|
|
33283
33347
|
}
|
|
33284
33348
|
/**
|
|
33349
|
+
* Encodes a typed input (the schema's `Type`) against a schema, returning an
|
|
33350
|
+
* `Effect` that succeeds with the encoded value or fails with a
|
|
33351
|
+
* {@link SchemaError}.
|
|
33352
|
+
*
|
|
33353
|
+
* **When to use**
|
|
33354
|
+
*
|
|
33355
|
+
* Use when the input is already typed as the schema's `Type`.
|
|
33356
|
+
*
|
|
33357
|
+
* **Details**
|
|
33358
|
+
*
|
|
33359
|
+
* For `unknown` input use {@link encodeUnknownEffect}.
|
|
33360
|
+
* Options may be provided either when creating the encoder or when applying it;
|
|
33361
|
+
* application options override creation options.
|
|
33362
|
+
*
|
|
33363
|
+
* @category encoding
|
|
33364
|
+
* @since 4.0.0
|
|
33365
|
+
*/
|
|
33366
|
+
const encodeEffect = encodeUnknownEffect;
|
|
33367
|
+
/**
|
|
33285
33368
|
* Encodes a typed input (the schema's `Type`) against a schema synchronously,
|
|
33286
33369
|
* throwing a {@link SchemaError} on failure.
|
|
33287
33370
|
*
|
|
@@ -33317,7 +33400,7 @@ const encodeSync = encodeSync$1;
|
|
|
33317
33400
|
* @category constructors
|
|
33318
33401
|
* @since 3.10.0
|
|
33319
33402
|
*/
|
|
33320
|
-
const make$
|
|
33403
|
+
const make$35 = make$36;
|
|
33321
33404
|
/**
|
|
33322
33405
|
* Checks whether a value is a `Schema`.
|
|
33323
33406
|
*
|
|
@@ -33325,7 +33408,7 @@ const make$34 = make$35;
|
|
|
33325
33408
|
* @since 3.10.0
|
|
33326
33409
|
*/
|
|
33327
33410
|
function isSchema(u) {
|
|
33328
|
-
return hasProperty(u, TypeId$
|
|
33411
|
+
return hasProperty(u, TypeId$23) && u[TypeId$23] === TypeId$23;
|
|
33329
33412
|
}
|
|
33330
33413
|
/**
|
|
33331
33414
|
* Creates an exact optional key schema for struct fields. Unlike `optional`,
|
|
@@ -33349,7 +33432,7 @@ function isSchema(u) {
|
|
|
33349
33432
|
* @category combinators
|
|
33350
33433
|
* @since 4.0.0
|
|
33351
33434
|
*/
|
|
33352
|
-
const optionalKey = /*#__PURE__*/ lambda((schema) => make$
|
|
33435
|
+
const optionalKey = /*#__PURE__*/ lambda((schema) => make$35(optionalKey$1(schema.ast), { schema }));
|
|
33353
33436
|
/**
|
|
33354
33437
|
* Marks a struct field as optional, allowing the key to be absent or
|
|
33355
33438
|
* `undefined`.
|
|
@@ -33399,7 +33482,7 @@ const optional = /*#__PURE__*/ lambda((self) => optionalKey(UndefinedOr(self)));
|
|
|
33399
33482
|
* @since 3.10.0
|
|
33400
33483
|
*/
|
|
33401
33484
|
function Literal(literal) {
|
|
33402
|
-
const out = make$
|
|
33485
|
+
const out = make$35(new Literal$1(literal), {
|
|
33403
33486
|
literal,
|
|
33404
33487
|
transform(to) {
|
|
33405
33488
|
return out.pipe(decodeTo(Literal(to), {
|
|
@@ -33416,7 +33499,7 @@ function Literal(literal) {
|
|
|
33416
33499
|
* @category schemas
|
|
33417
33500
|
* @since 3.10.0
|
|
33418
33501
|
*/
|
|
33419
|
-
const Never = /*#__PURE__*/ make$
|
|
33502
|
+
const Never = /*#__PURE__*/ make$35(never);
|
|
33420
33503
|
/**
|
|
33421
33504
|
* Schema for the `any` type. Accepts any value without validation.
|
|
33422
33505
|
*
|
|
@@ -33424,7 +33507,7 @@ const Never = /*#__PURE__*/ make$34(never);
|
|
|
33424
33507
|
* @category schemas
|
|
33425
33508
|
* @since 3.10.0
|
|
33426
33509
|
*/
|
|
33427
|
-
const Any = /*#__PURE__*/ make$
|
|
33510
|
+
const Any = /*#__PURE__*/ make$35(any);
|
|
33428
33511
|
/**
|
|
33429
33512
|
* Schema for the `unknown` type. Accepts any value without validation.
|
|
33430
33513
|
*
|
|
@@ -33432,7 +33515,7 @@ const Any = /*#__PURE__*/ make$34(any);
|
|
|
33432
33515
|
* @category schemas
|
|
33433
33516
|
* @since 3.10.0
|
|
33434
33517
|
*/
|
|
33435
|
-
const Unknown = /*#__PURE__*/ make$
|
|
33518
|
+
const Unknown = /*#__PURE__*/ make$35(unknown);
|
|
33436
33519
|
/**
|
|
33437
33520
|
* Schema for the `undefined` literal. Validates that the input is strictly `undefined`.
|
|
33438
33521
|
*
|
|
@@ -33440,14 +33523,14 @@ const Unknown = /*#__PURE__*/ make$34(unknown);
|
|
|
33440
33523
|
* @category schemas
|
|
33441
33524
|
* @since 3.10.0
|
|
33442
33525
|
*/
|
|
33443
|
-
const Undefined = /*#__PURE__*/ make$
|
|
33526
|
+
const Undefined = /*#__PURE__*/ make$35(undefined_);
|
|
33444
33527
|
/**
|
|
33445
33528
|
* Schema for `string` values. Validates that the input is `typeof` `"string"`.
|
|
33446
33529
|
*
|
|
33447
33530
|
* @category schemas
|
|
33448
33531
|
* @since 4.0.0
|
|
33449
33532
|
*/
|
|
33450
|
-
const String$1 = /*#__PURE__*/ make$
|
|
33533
|
+
const String$1 = /*#__PURE__*/ make$35(string$1);
|
|
33451
33534
|
/**
|
|
33452
33535
|
* Schema for `number` values, including `NaN`, `Infinity`, and `-Infinity`.
|
|
33453
33536
|
*
|
|
@@ -33462,7 +33545,7 @@ const String$1 = /*#__PURE__*/ make$34(string$1);
|
|
|
33462
33545
|
* @category schemas
|
|
33463
33546
|
* @since 4.0.0
|
|
33464
33547
|
*/
|
|
33465
|
-
const Number$1 = /*#__PURE__*/ make$
|
|
33548
|
+
const Number$1 = /*#__PURE__*/ make$35(number);
|
|
33466
33549
|
/**
|
|
33467
33550
|
* Schema for `boolean` values. Validates that the input is `typeof` `"boolean"`.
|
|
33468
33551
|
*
|
|
@@ -33475,16 +33558,16 @@ const Number$1 = /*#__PURE__*/ make$34(number);
|
|
|
33475
33558
|
* @category boolean
|
|
33476
33559
|
* @since 4.0.0
|
|
33477
33560
|
*/
|
|
33478
|
-
const Boolean$1 = /*#__PURE__*/ make$
|
|
33561
|
+
const Boolean$1 = /*#__PURE__*/ make$35(boolean);
|
|
33479
33562
|
/**
|
|
33480
33563
|
* Schema for the `void` type. Accepts `undefined` as the encoded value.
|
|
33481
33564
|
*
|
|
33482
33565
|
* @category schemas
|
|
33483
33566
|
* @since 3.10.0
|
|
33484
33567
|
*/
|
|
33485
|
-
const Void = /*#__PURE__*/ make$
|
|
33568
|
+
const Void = /*#__PURE__*/ make$35(void_);
|
|
33486
33569
|
function makeStruct(ast, fields) {
|
|
33487
|
-
return make$
|
|
33570
|
+
return make$35(ast, {
|
|
33488
33571
|
fields,
|
|
33489
33572
|
mapFields(f, options) {
|
|
33490
33573
|
const fields = f(this.fields);
|
|
@@ -33551,13 +33634,13 @@ function Struct(fields) {
|
|
|
33551
33634
|
*/
|
|
33552
33635
|
function Record(key, value, options) {
|
|
33553
33636
|
const keyValueCombiner = options?.keyValueCombiner?.decode || options?.keyValueCombiner?.encode ? new KeyValueCombiner(options.keyValueCombiner.decode, options.keyValueCombiner.encode) : void 0;
|
|
33554
|
-
return make$
|
|
33637
|
+
return make$35(record(key.ast, value.ast, keyValueCombiner), {
|
|
33555
33638
|
key,
|
|
33556
33639
|
value
|
|
33557
33640
|
});
|
|
33558
33641
|
}
|
|
33559
33642
|
function makeTuple(ast, elements) {
|
|
33560
|
-
return make$
|
|
33643
|
+
return make$35(ast, {
|
|
33561
33644
|
elements,
|
|
33562
33645
|
mapElements(f, options) {
|
|
33563
33646
|
const elements = f(this.elements);
|
|
@@ -33569,9 +33652,9 @@ function makeTuple(ast, elements) {
|
|
|
33569
33652
|
* @category constructors
|
|
33570
33653
|
* @since 4.0.0
|
|
33571
33654
|
*/
|
|
33572
|
-
const ArraySchema = /*#__PURE__*/ lambda((schema) => make$
|
|
33655
|
+
const ArraySchema = /*#__PURE__*/ lambda((schema) => make$35(new Arrays(false, [], [schema.ast]), { value: schema }));
|
|
33573
33656
|
function makeUnion(ast, members) {
|
|
33574
|
-
return make$
|
|
33657
|
+
return make$35(ast, {
|
|
33575
33658
|
members,
|
|
33576
33659
|
mapMembers(f, options) {
|
|
33577
33660
|
const members = f(this.members);
|
|
@@ -33624,7 +33707,7 @@ function Union(members, options) {
|
|
|
33624
33707
|
*/
|
|
33625
33708
|
function Literals(literals) {
|
|
33626
33709
|
const members = literals.map(Literal);
|
|
33627
|
-
return make$
|
|
33710
|
+
return make$35(union(members, "anyOf", void 0), {
|
|
33628
33711
|
literals,
|
|
33629
33712
|
members,
|
|
33630
33713
|
mapMembers(f) {
|
|
@@ -33647,7 +33730,7 @@ function Literals(literals) {
|
|
|
33647
33730
|
const UndefinedOr = /*#__PURE__*/ lambda((self) => Union([self, Undefined]));
|
|
33648
33731
|
function decodeTo(to, transformation) {
|
|
33649
33732
|
return (from) => {
|
|
33650
|
-
return make$
|
|
33733
|
+
return make$35(decodeTo$1(from.ast, to.ast, transformation ? make$53(transformation) : passthrough()), {
|
|
33651
33734
|
from,
|
|
33652
33735
|
to
|
|
33653
33736
|
});
|
|
@@ -33681,7 +33764,7 @@ function decodeTo(to, transformation) {
|
|
|
33681
33764
|
* @since 3.10.0
|
|
33682
33765
|
*/
|
|
33683
33766
|
function withConstructorDefault(defaultValue) {
|
|
33684
|
-
return (schema) => make$
|
|
33767
|
+
return (schema) => make$35(withConstructorDefault$1(schema.ast, mapErrorEager(defaultValue, (e) => e.issue)), { schema });
|
|
33685
33768
|
}
|
|
33686
33769
|
/**
|
|
33687
33770
|
* Combines a {@link Literal} schema with {@link withConstructorDefault}, making it ideal
|
|
@@ -33790,7 +33873,7 @@ function instanceOf(constructor, annotations) {
|
|
|
33790
33873
|
*/
|
|
33791
33874
|
function link$1() {
|
|
33792
33875
|
return (encodeTo, transformation) => {
|
|
33793
|
-
return new Link(encodeTo.ast, make$
|
|
33876
|
+
return new Link(encodeTo.ast, make$53(transformation));
|
|
33794
33877
|
};
|
|
33795
33878
|
}
|
|
33796
33879
|
/**
|
|
@@ -33988,7 +34071,7 @@ function isInt(annotations) {
|
|
|
33988
34071
|
* @since 4.0.0
|
|
33989
34072
|
*/
|
|
33990
34073
|
function CauseReason(error, defect) {
|
|
33991
|
-
return make$
|
|
34074
|
+
return make$35(declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
|
|
33992
34075
|
if (!isReason(input)) return fail$3(new InvalidType(ast, some(input)));
|
|
33993
34076
|
switch (input._tag) {
|
|
33994
34077
|
case "Fail": return mapBothEager(decodeUnknownEffect$1(error)(input.error, options), {
|
|
@@ -34089,7 +34172,7 @@ function causeReasonToFormatter(error, defect) {
|
|
|
34089
34172
|
* @since 3.10.0
|
|
34090
34173
|
*/
|
|
34091
34174
|
function Cause(error, defect) {
|
|
34092
|
-
return make$
|
|
34175
|
+
return make$35(declareConstructor()([error, defect], ([error, defect]) => {
|
|
34093
34176
|
const failures = ArraySchema(CauseReason(error, defect));
|
|
34094
34177
|
return (input, ast, options) => {
|
|
34095
34178
|
if (!isCause(input)) return fail$3(new InvalidType(ast, some(input)));
|
|
@@ -34192,7 +34275,7 @@ const Defect = /*#__PURE__*/ Union([/*#__PURE__*/ ErrorJsonEncoded.pipe(/*#__PUR
|
|
|
34192
34275
|
* @since 3.10.0
|
|
34193
34276
|
*/
|
|
34194
34277
|
function Exit(value, error, defect) {
|
|
34195
|
-
return make$
|
|
34278
|
+
return make$35(declareConstructor()([
|
|
34196
34279
|
value,
|
|
34197
34280
|
error,
|
|
34198
34281
|
defect
|
|
@@ -34373,7 +34456,7 @@ function makeClass(Inherited, identifier, struct$1, annotations, proto) {
|
|
|
34373
34456
|
disableChecks: true
|
|
34374
34457
|
});
|
|
34375
34458
|
}
|
|
34376
|
-
static [TypeId$
|
|
34459
|
+
static [TypeId$23] = TypeId$23;
|
|
34377
34460
|
get [ClassTypeId]() {
|
|
34378
34461
|
return ClassTypeId;
|
|
34379
34462
|
}
|
|
@@ -34434,7 +34517,7 @@ function getClassSchemaFactory(from, identifier, annotations) {
|
|
|
34434
34517
|
return (self) => {
|
|
34435
34518
|
if (memo === void 0) {
|
|
34436
34519
|
const transformation = getClassTransformation(self);
|
|
34437
|
-
const to = make$
|
|
34520
|
+
const to = make$35(new Declaration([from.ast], () => (input, ast) => {
|
|
34438
34521
|
return input instanceof self || hasProperty(input, getClassTypeId(identifier)) ? succeed$3(input) : fail$3(new InvalidType(ast, some(input)));
|
|
34439
34522
|
}, {
|
|
34440
34523
|
identifier,
|
|
@@ -34587,7 +34670,7 @@ const TaggedErrorClass = (identifier) => {
|
|
|
34587
34670
|
* @since 4.0.0
|
|
34588
34671
|
*/
|
|
34589
34672
|
function toCodecJson(schema) {
|
|
34590
|
-
return make$
|
|
34673
|
+
return make$35(toCodecJsonTop(schema.ast));
|
|
34591
34674
|
}
|
|
34592
34675
|
const toCodecJsonTop = /*#__PURE__*/ toCodec((ast) => {
|
|
34593
34676
|
const out = toCodecJsonBase(ast, toCodecJsonTop);
|
|
@@ -34598,7 +34681,7 @@ function toCodecJsonBase(ast, recur) {
|
|
|
34598
34681
|
case "Declaration": {
|
|
34599
34682
|
const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
|
|
34600
34683
|
if (isFunction(getLink)) {
|
|
34601
|
-
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$
|
|
34684
|
+
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$36(toEncoded(tp))) : []);
|
|
34602
34685
|
const to = recur(link.to);
|
|
34603
34686
|
return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
|
|
34604
34687
|
}
|
|
@@ -34627,7 +34710,7 @@ function toCodecJsonBase(ast, recur) {
|
|
|
34627
34710
|
return ast;
|
|
34628
34711
|
}
|
|
34629
34712
|
function toCodecStringTree(schema, options) {
|
|
34630
|
-
return make$
|
|
34713
|
+
return make$35(toCodecEnsureArray(options?.keepDeclarations === true ? serializerStringTreeKeepDeclarations(schema.ast) : serializerStringTree(schema.ast)));
|
|
34631
34714
|
}
|
|
34632
34715
|
function getStringTreePriority(ast) {
|
|
34633
34716
|
switch (ast._tag) {
|
|
@@ -34646,7 +34729,7 @@ function serializerTree(ast, recur, onMissingAnnotation) {
|
|
|
34646
34729
|
case "Declaration": {
|
|
34647
34730
|
const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
|
|
34648
34731
|
if (isFunction(getLink)) {
|
|
34649
|
-
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$
|
|
34732
|
+
const link = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$35(recur(toEncoded(tp)))) : []);
|
|
34650
34733
|
const to = recur(link.to);
|
|
34651
34734
|
return replaceEncoding(ast, to === link.to ? [link] : [new Link(to, link.transformation)]);
|
|
34652
34735
|
}
|
|
@@ -34773,11 +34856,11 @@ function onSerializerEnsureArray(ast) {
|
|
|
34773
34856
|
*
|
|
34774
34857
|
* @since 4.0.0
|
|
34775
34858
|
*/
|
|
34776
|
-
const TypeId$
|
|
34859
|
+
const TypeId$22 = "~effect/http/Cookies";
|
|
34777
34860
|
const CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
34778
34861
|
TaggedError("CookieError");
|
|
34779
34862
|
const Proto$11 = {
|
|
34780
|
-
[TypeId$
|
|
34863
|
+
[TypeId$22]: TypeId$22,
|
|
34781
34864
|
...BaseProto,
|
|
34782
34865
|
toJSON() {
|
|
34783
34866
|
return {
|
|
@@ -35102,12 +35185,12 @@ const tryDecodeURIComponent = (str) => {
|
|
|
35102
35185
|
* @category type IDs
|
|
35103
35186
|
* @since 4.0.0
|
|
35104
35187
|
*/
|
|
35105
|
-
const TypeId$
|
|
35188
|
+
const TypeId$21 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
|
|
35106
35189
|
const Proto$10 = /*#__PURE__*/ Object.create(null);
|
|
35107
35190
|
Object.defineProperties(Proto$10, {
|
|
35108
|
-
[TypeId$
|
|
35191
|
+
[TypeId$21]: { value: TypeId$21 },
|
|
35109
35192
|
[symbolRedactable]: { value(context) {
|
|
35110
|
-
return redact(this, get$
|
|
35193
|
+
return redact(this, get$9(context, CurrentRedactedNames));
|
|
35111
35194
|
} },
|
|
35112
35195
|
toJSON: { value() {
|
|
35113
35196
|
return redact$1(this);
|
|
@@ -35121,7 +35204,7 @@ Object.defineProperties(Proto$10, {
|
|
|
35121
35204
|
toString: { value: BaseProto.toString },
|
|
35122
35205
|
[NodeInspectSymbol]: { value: BaseProto[NodeInspectSymbol] }
|
|
35123
35206
|
});
|
|
35124
|
-
const make$
|
|
35207
|
+
const make$34 = (input) => Object.assign(Object.create(Proto$10), input);
|
|
35125
35208
|
/**
|
|
35126
35209
|
* Provides an `Equivalence` instance that compares `Headers` by header names
|
|
35127
35210
|
* and string values.
|
|
@@ -35181,7 +35264,7 @@ const fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto$10);
|
|
|
35181
35264
|
* @since 4.0.0
|
|
35182
35265
|
*/
|
|
35183
35266
|
const set$1 = /*#__PURE__*/ dual(3, (self, key, value) => {
|
|
35184
|
-
const out = make$
|
|
35267
|
+
const out = make$34(self);
|
|
35185
35268
|
out[key.toLowerCase()] = value;
|
|
35186
35269
|
return out;
|
|
35187
35270
|
});
|
|
@@ -35195,7 +35278,7 @@ const set$1 = /*#__PURE__*/ dual(3, (self, key, value) => {
|
|
|
35195
35278
|
* @category combinators
|
|
35196
35279
|
* @since 4.0.0
|
|
35197
35280
|
*/
|
|
35198
|
-
const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$
|
|
35281
|
+
const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$34({
|
|
35199
35282
|
...self,
|
|
35200
35283
|
...fromInput$1(headers)
|
|
35201
35284
|
}));
|
|
@@ -35210,7 +35293,7 @@ const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$33({
|
|
|
35210
35293
|
* @since 4.0.0
|
|
35211
35294
|
*/
|
|
35212
35295
|
const merge = /*#__PURE__*/ dual(2, (self, headers) => {
|
|
35213
|
-
const out = make$
|
|
35296
|
+
const out = make$34(self);
|
|
35214
35297
|
Object.assign(out, headers);
|
|
35215
35298
|
return out;
|
|
35216
35299
|
});
|
|
@@ -35225,7 +35308,7 @@ const merge = /*#__PURE__*/ dual(2, (self, headers) => {
|
|
|
35225
35308
|
* @since 4.0.0
|
|
35226
35309
|
*/
|
|
35227
35310
|
const remove$1 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
35228
|
-
const out = make$
|
|
35311
|
+
const out = make$34(self);
|
|
35229
35312
|
delete out[key.toLowerCase()];
|
|
35230
35313
|
return out;
|
|
35231
35314
|
});
|
|
@@ -35244,8 +35327,8 @@ const redact = /*#__PURE__*/ dual(2, (self, key) => {
|
|
|
35244
35327
|
const modify = (key) => {
|
|
35245
35328
|
if (typeof key === "string") {
|
|
35246
35329
|
const k = key.toLowerCase();
|
|
35247
|
-
if (k in self) out[k] = make$
|
|
35248
|
-
} else for (const name in self) if (key.test(name)) out[name] = make$
|
|
35330
|
+
if (k in self) out[k] = make$56(self[k]);
|
|
35331
|
+
} else for (const name in self) if (key.test(name)) out[name] = make$56(self[name]);
|
|
35249
35332
|
};
|
|
35250
35333
|
if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
|
|
35251
35334
|
else modify(key);
|
|
@@ -35300,7 +35383,7 @@ const CurrentRedactedNames = /*#__PURE__*/ Reference("effect/Headers/CurrentReda
|
|
|
35300
35383
|
*
|
|
35301
35384
|
* @since 4.0.0
|
|
35302
35385
|
*/
|
|
35303
|
-
const TypeId$
|
|
35386
|
+
const TypeId$20 = "~effect/http/HttpClientError";
|
|
35304
35387
|
/**
|
|
35305
35388
|
* Error wrapper for HTTP client failures, exposing the failed request and the optional response through its `reason`.
|
|
35306
35389
|
*
|
|
@@ -35320,7 +35403,7 @@ var HttpClientError = class extends TaggedError("HttpClientError") {
|
|
|
35320
35403
|
*
|
|
35321
35404
|
* @since 4.0.0
|
|
35322
35405
|
*/
|
|
35323
|
-
[TypeId$
|
|
35406
|
+
[TypeId$20] = TypeId$20;
|
|
35324
35407
|
/**
|
|
35325
35408
|
* HTTP request associated with the client failure.
|
|
35326
35409
|
*
|
|
@@ -35443,7 +35526,7 @@ var EmptyBodyError = class extends TaggedError("EmptyBodyError") {
|
|
|
35443
35526
|
return formatMessage(formatReason(this._tag), this.description, info);
|
|
35444
35527
|
}
|
|
35445
35528
|
};
|
|
35446
|
-
ErrorClass(TypeId$
|
|
35529
|
+
ErrorClass(TypeId$20)({
|
|
35447
35530
|
_tag: /*#__PURE__*/ tag("HttpError"),
|
|
35448
35531
|
kind: /*#__PURE__*/ Literals([
|
|
35449
35532
|
"EncodeError",
|
|
@@ -35495,10 +35578,10 @@ ErrorClass(TypeId$19)({
|
|
|
35495
35578
|
*
|
|
35496
35579
|
* @since 4.0.0
|
|
35497
35580
|
*/
|
|
35498
|
-
const TypeId$
|
|
35581
|
+
const TypeId$19 = "~effect/http/UrlParams";
|
|
35499
35582
|
const Proto$9 = {
|
|
35500
35583
|
...PipeInspectableProto,
|
|
35501
|
-
[TypeId$
|
|
35584
|
+
[TypeId$19]: TypeId$19,
|
|
35502
35585
|
[Symbol.iterator]() {
|
|
35503
35586
|
return this.params[Symbol.iterator]();
|
|
35504
35587
|
},
|
|
@@ -35525,7 +35608,7 @@ const Proto$9 = {
|
|
|
35525
35608
|
* @category constructors
|
|
35526
35609
|
* @since 4.0.0
|
|
35527
35610
|
*/
|
|
35528
|
-
const make$
|
|
35611
|
+
const make$33 = (params) => {
|
|
35529
35612
|
const self = Object.create(Proto$9);
|
|
35530
35613
|
self.params = params;
|
|
35531
35614
|
return self;
|
|
@@ -35548,7 +35631,7 @@ const fromInput = (input) => {
|
|
|
35548
35631
|
const [keys, value] = parsed[i];
|
|
35549
35632
|
out.push([`${keys[0]}[${keys.slice(1).join("][")}]`, value]);
|
|
35550
35633
|
} else out.push(parsed[i]);
|
|
35551
|
-
return make$
|
|
35634
|
+
return make$33(out);
|
|
35552
35635
|
};
|
|
35553
35636
|
const fromInputNested = (input) => {
|
|
35554
35637
|
const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$2(input) : Object.entries(input);
|
|
@@ -35572,7 +35655,7 @@ const fromInputNested = (input) => {
|
|
|
35572
35655
|
* @category instances
|
|
35573
35656
|
* @since 4.0.0
|
|
35574
35657
|
*/
|
|
35575
|
-
const Equivalence = /*#__PURE__*/ make$
|
|
35658
|
+
const Equivalence = /*#__PURE__*/ make$65((a, b) => arrayEquivalence(a.params, b.params));
|
|
35576
35659
|
const arrayEquivalence = /*#__PURE__*/ makeEquivalence(/*#__PURE__*/ makeEquivalence$2([/*#__PURE__*/ strictEqual(), /*#__PURE__*/ strictEqual()]));
|
|
35577
35660
|
/**
|
|
35578
35661
|
* An empty `UrlParams` value.
|
|
@@ -35580,7 +35663,7 @@ const arrayEquivalence = /*#__PURE__*/ makeEquivalence(/*#__PURE__*/ makeEquival
|
|
|
35580
35663
|
* @category constructors
|
|
35581
35664
|
* @since 4.0.0
|
|
35582
35665
|
*/
|
|
35583
|
-
const empty$3 = /*#__PURE__*/ make$
|
|
35666
|
+
const empty$3 = /*#__PURE__*/ make$33([]);
|
|
35584
35667
|
/**
|
|
35585
35668
|
* Sets multiple query parameters from input.
|
|
35586
35669
|
*
|
|
@@ -35696,12 +35779,12 @@ const baseUrl = () => {
|
|
|
35696
35779
|
*
|
|
35697
35780
|
* @since 4.0.0
|
|
35698
35781
|
*/
|
|
35699
|
-
const TypeId$
|
|
35782
|
+
const TypeId$18 = "~effect/http/HttpBody";
|
|
35700
35783
|
TaggedError("HttpBodyError");
|
|
35701
35784
|
var Proto$8 = class {
|
|
35702
|
-
[TypeId$
|
|
35785
|
+
[TypeId$18];
|
|
35703
35786
|
constructor() {
|
|
35704
|
-
this[TypeId$
|
|
35787
|
+
this[TypeId$18] = TypeId$18;
|
|
35705
35788
|
}
|
|
35706
35789
|
[NodeInspectSymbol]() {
|
|
35707
35790
|
return this.toJSON();
|
|
@@ -35928,9 +36011,9 @@ const allShort = [
|
|
|
35928
36011
|
];
|
|
35929
36012
|
//#endregion
|
|
35930
36013
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/http/HttpClientRequest.js
|
|
35931
|
-
const TypeId$
|
|
36014
|
+
const TypeId$17 = "~effect/http/HttpClientRequest";
|
|
35932
36015
|
const Proto$7 = {
|
|
35933
|
-
[TypeId$
|
|
36016
|
+
[TypeId$17]: TypeId$17,
|
|
35934
36017
|
...BaseProto,
|
|
35935
36018
|
toJSON() {
|
|
35936
36019
|
return {
|
|
@@ -35976,7 +36059,7 @@ const empty$1 = /*#__PURE__*/ makeWith$1("GET", "", empty$3, /*#__PURE__*/ none(
|
|
|
35976
36059
|
* @category constructors
|
|
35977
36060
|
* @since 4.0.0
|
|
35978
36061
|
*/
|
|
35979
|
-
const make$
|
|
36062
|
+
const make$32 = (method) => (url, options) => modify$1(empty$1, {
|
|
35980
36063
|
method,
|
|
35981
36064
|
url,
|
|
35982
36065
|
...options ?? void 0
|
|
@@ -35987,7 +36070,7 @@ const make$31 = (method) => (url, options) => modify(empty$1, {
|
|
|
35987
36070
|
* @category combinators
|
|
35988
36071
|
* @since 4.0.0
|
|
35989
36072
|
*/
|
|
35990
|
-
const modify = /*#__PURE__*/ dual(2, (self, options) => {
|
|
36073
|
+
const modify$1 = /*#__PURE__*/ dual(2, (self, options) => {
|
|
35991
36074
|
let result = self;
|
|
35992
36075
|
if (options.method) result = setMethod(result, options.method);
|
|
35993
36076
|
if (options.url) result = setUrl(result, options.url);
|
|
@@ -36113,7 +36196,7 @@ const setBody$1 = /*#__PURE__*/ dual(2, (self, body) => {
|
|
|
36113
36196
|
* @category type IDs
|
|
36114
36197
|
* @since 4.0.0
|
|
36115
36198
|
*/
|
|
36116
|
-
const TypeId$
|
|
36199
|
+
const TypeId$16 = "~effect/http/HttpIncomingMessage";
|
|
36117
36200
|
/**
|
|
36118
36201
|
* Context reference for the optional maximum size allowed when reading an incoming message body.
|
|
36119
36202
|
*
|
|
@@ -36191,7 +36274,7 @@ const inspect = (self, that) => {
|
|
|
36191
36274
|
* @category type IDs
|
|
36192
36275
|
* @since 4.0.0
|
|
36193
36276
|
*/
|
|
36194
|
-
const TypeId$
|
|
36277
|
+
const TypeId$15 = "~effect/http/HttpClientResponse";
|
|
36195
36278
|
/**
|
|
36196
36279
|
* Wraps a Web `Response` and its original `HttpClientRequest` as an `HttpClientResponse`.
|
|
36197
36280
|
*
|
|
@@ -36200,16 +36283,16 @@ const TypeId$14 = "~effect/http/HttpClientResponse";
|
|
|
36200
36283
|
*/
|
|
36201
36284
|
const fromWeb$1 = (request, source) => new WebHttpClientResponse(request, source);
|
|
36202
36285
|
var WebHttpClientResponse = class extends Class$2 {
|
|
36286
|
+
[TypeId$16];
|
|
36203
36287
|
[TypeId$15];
|
|
36204
|
-
[TypeId$14];
|
|
36205
36288
|
request;
|
|
36206
36289
|
source;
|
|
36207
36290
|
constructor(request, source) {
|
|
36208
36291
|
super();
|
|
36209
36292
|
this.request = request;
|
|
36210
36293
|
this.source = source;
|
|
36294
|
+
this[TypeId$16] = TypeId$16;
|
|
36211
36295
|
this[TypeId$15] = TypeId$15;
|
|
36212
|
-
this[TypeId$14] = TypeId$14;
|
|
36213
36296
|
}
|
|
36214
36297
|
toJSON() {
|
|
36215
36298
|
return inspect(this, {
|
|
@@ -36357,7 +36440,7 @@ var WebHttpClientResponse = class extends Class$2 {
|
|
|
36357
36440
|
* @since 4.0.0
|
|
36358
36441
|
*/
|
|
36359
36442
|
const toHeaders = (span) => fromRecordUnsafe({
|
|
36360
|
-
b3: `${span.traceId}-${span.spanId}-${span.sampled ? "1" : "0"}${match$
|
|
36443
|
+
b3: `${span.traceId}-${span.spanId}-${span.sampled ? "1" : "0"}${match$5(span.parent, {
|
|
36361
36444
|
onNone: () => "",
|
|
36362
36445
|
onSome: (parent) => `-${parent.spanId}`
|
|
36363
36446
|
})}`,
|
|
@@ -36451,7 +36534,7 @@ const w3c = (headers) => {
|
|
|
36451
36534
|
};
|
|
36452
36535
|
//#endregion
|
|
36453
36536
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/http/HttpClient.js
|
|
36454
|
-
const TypeId$
|
|
36537
|
+
const TypeId$14 = "~effect/http/HttpClient";
|
|
36455
36538
|
/**
|
|
36456
36539
|
* Service tag for the default outgoing HTTP client service.
|
|
36457
36540
|
*
|
|
@@ -36491,7 +36574,7 @@ const makeWith = (postprocess, preprocess) => {
|
|
|
36491
36574
|
return self;
|
|
36492
36575
|
};
|
|
36493
36576
|
const Proto$6 = {
|
|
36494
|
-
[TypeId$
|
|
36577
|
+
[TypeId$14]: TypeId$14,
|
|
36495
36578
|
pipe() {
|
|
36496
36579
|
return pipeArguments(this, arguments);
|
|
36497
36580
|
},
|
|
@@ -36500,7 +36583,7 @@ const Proto$6 = {
|
|
|
36500
36583
|
return { _id: "effect/HttpClient" };
|
|
36501
36584
|
},
|
|
36502
36585
|
.../*#__PURE__*/ Object.fromEntries(/*#__PURE__*/ allShort.map(([fullMethod, method]) => [method, function(url, options) {
|
|
36503
|
-
return this.execute(make$
|
|
36586
|
+
return this.execute(make$32(fullMethod)(url, options));
|
|
36504
36587
|
}]))
|
|
36505
36588
|
};
|
|
36506
36589
|
/**
|
|
@@ -36513,7 +36596,7 @@ const Proto$6 = {
|
|
|
36513
36596
|
* @category constructors
|
|
36514
36597
|
* @since 4.0.0
|
|
36515
36598
|
*/
|
|
36516
|
-
const make$
|
|
36599
|
+
const make$31 = (f) => makeWith((effect) => flatMap$2(effect, (request) => withFiber((fiber) => {
|
|
36517
36600
|
const scopedController = scopedRequests.get(request);
|
|
36518
36601
|
const controller = scopedController ?? new AbortController();
|
|
36519
36602
|
const urlResult = makeUrl(request.url, request.urlParams, getOrUndefined$1(request.hash));
|
|
@@ -36628,8 +36711,8 @@ var InterruptibleResponse = class {
|
|
|
36628
36711
|
this.original = original;
|
|
36629
36712
|
this.controller = controller;
|
|
36630
36713
|
}
|
|
36631
|
-
[TypeId$14] = TypeId$14;
|
|
36632
36714
|
[TypeId$15] = TypeId$15;
|
|
36715
|
+
[TypeId$16] = TypeId$16;
|
|
36633
36716
|
applyInterrupt(effect) {
|
|
36634
36717
|
return suspend$2(() => {
|
|
36635
36718
|
responseRegistry.unregister(this.original);
|
|
@@ -36756,7 +36839,7 @@ function parse$1(input) {
|
|
|
36756
36839
|
const FULL_PATH_REGEXP = /^https?:\/\/.*?\//;
|
|
36757
36840
|
const OPTIONAL_PARAM_REGEXP = /(\/:[^/()]*?)\?(\/?)/;
|
|
36758
36841
|
/** @internal */
|
|
36759
|
-
const make$
|
|
36842
|
+
const make$30 = (options = {}) => new RouterImpl(options);
|
|
36760
36843
|
var RouterImpl = class {
|
|
36761
36844
|
constructor(options = {}) {
|
|
36762
36845
|
this.options = {
|
|
@@ -37275,7 +37358,7 @@ const httpMethods = [
|
|
|
37275
37358
|
* @since 1.0.0
|
|
37276
37359
|
* @category constructors
|
|
37277
37360
|
*/
|
|
37278
|
-
const make$
|
|
37361
|
+
const make$29 = make$30;
|
|
37279
37362
|
//#endregion
|
|
37280
37363
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/ErrorReporter.js
|
|
37281
37364
|
/**
|
|
@@ -37313,14 +37396,14 @@ const make$28 = make$29;
|
|
|
37313
37396
|
const ignore = "~effect/ErrorReporter/ignore";
|
|
37314
37397
|
//#endregion
|
|
37315
37398
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/http/HttpServerResponse.js
|
|
37316
|
-
const TypeId$
|
|
37399
|
+
const TypeId$13 = "~effect/http/HttpServerResponse";
|
|
37317
37400
|
/**
|
|
37318
37401
|
* Returns `true` when the supplied value is an `HttpServerResponse`.
|
|
37319
37402
|
*
|
|
37320
37403
|
* @category guards
|
|
37321
37404
|
* @since 4.0.0
|
|
37322
37405
|
*/
|
|
37323
|
-
const isHttpServerResponse = (u) => hasProperty(u, TypeId$
|
|
37406
|
+
const isHttpServerResponse = (u) => hasProperty(u, TypeId$13);
|
|
37324
37407
|
/**
|
|
37325
37408
|
* Creates an empty HTTP response.
|
|
37326
37409
|
*
|
|
@@ -37453,7 +37536,7 @@ const setBody = /*#__PURE__*/ dual(2, (self, body) => makeResponse({
|
|
|
37453
37536
|
}));
|
|
37454
37537
|
const Proto$5 = {
|
|
37455
37538
|
...PipeInspectableProto,
|
|
37456
|
-
[TypeId$
|
|
37539
|
+
[TypeId$13]: TypeId$13,
|
|
37457
37540
|
[ignore]: true,
|
|
37458
37541
|
toJSON() {
|
|
37459
37542
|
return {
|
|
@@ -37651,7 +37734,7 @@ const toResponseOrElseDefect = (u, orElse) => {
|
|
|
37651
37734
|
*
|
|
37652
37735
|
* @since 4.0.0
|
|
37653
37736
|
*/
|
|
37654
|
-
const TypeId$
|
|
37737
|
+
const TypeId$12 = "~effect/http/HttpServerError";
|
|
37655
37738
|
/**
|
|
37656
37739
|
* Tagged error for failures that occur while handling an HTTP server request.
|
|
37657
37740
|
*
|
|
@@ -37672,7 +37755,7 @@ var HttpServerError = class extends TaggedError("HttpServerError") {
|
|
|
37672
37755
|
});
|
|
37673
37756
|
else super(props);
|
|
37674
37757
|
}
|
|
37675
|
-
[TypeId$
|
|
37758
|
+
[TypeId$12] = TypeId$12;
|
|
37676
37759
|
stack = `${this.name}: ${this.message}`;
|
|
37677
37760
|
get request() {
|
|
37678
37761
|
return this.reason.request;
|
|
@@ -37948,7 +38031,7 @@ const exitResponse = (exit) => {
|
|
|
37948
38031
|
*
|
|
37949
38032
|
* @since 2.0.0
|
|
37950
38033
|
*/
|
|
37951
|
-
const TypeId$
|
|
38034
|
+
const TypeId$11 = "~effect/FiberSet";
|
|
37952
38035
|
/**
|
|
37953
38036
|
* Checks whether a value is a FiberSet.
|
|
37954
38037
|
*
|
|
@@ -37968,9 +38051,9 @@ const TypeId$10 = "~effect/FiberSet";
|
|
|
37968
38051
|
* @category refinements
|
|
37969
38052
|
* @since 2.0.0
|
|
37970
38053
|
*/
|
|
37971
|
-
const isFiberSet = (u) => hasProperty(u, TypeId$
|
|
38054
|
+
const isFiberSet = (u) => hasProperty(u, TypeId$11);
|
|
37972
38055
|
const Proto$4 = {
|
|
37973
|
-
[TypeId$
|
|
38056
|
+
[TypeId$11]: TypeId$11,
|
|
37974
38057
|
[Symbol.iterator]() {
|
|
37975
38058
|
if (this.state._tag === "Closed") return empty$14();
|
|
37976
38059
|
return this.state.backing[Symbol.iterator]();
|
|
@@ -38023,7 +38106,7 @@ const makeUnsafe = (backing, deferred) => {
|
|
|
38023
38106
|
* @category constructors
|
|
38024
38107
|
* @since 2.0.0
|
|
38025
38108
|
*/
|
|
38026
|
-
const make$
|
|
38109
|
+
const make$28 = () => acquireRelease(sync(() => makeUnsafe(/* @__PURE__ */ new Set(), makeUnsafe$7())), (set) => suspend$2(() => {
|
|
38027
38110
|
const state = set.state;
|
|
38028
38111
|
if (state._tag === "Closed") return void_$1;
|
|
38029
38112
|
set.state = { _tag: "Closed" };
|
|
@@ -38031,7 +38114,7 @@ const make$27 = () => acquireRelease(sync(() => makeUnsafe(/* @__PURE__ */ new S
|
|
|
38031
38114
|
return interruptAll(fibers).pipe(into(set.deferred));
|
|
38032
38115
|
}));
|
|
38033
38116
|
const internalFiberId = -1;
|
|
38034
|
-
const isInternalInterruption = /*#__PURE__*/ toPredicate(/*#__PURE__*/ compose(filterInterruptors, /*#__PURE__*/ has$
|
|
38117
|
+
const isInternalInterruption = /*#__PURE__*/ toPredicate(/*#__PURE__*/ compose(filterInterruptors, /*#__PURE__*/ has$2(internalFiberId)));
|
|
38035
38118
|
/**
|
|
38036
38119
|
* Adds an existing fiber to the `FiberSet` using a synchronous, unsafe
|
|
38037
38120
|
* mutation.
|
|
@@ -38149,7 +38232,7 @@ const join$1 = (self) => _await(self.deferred);
|
|
|
38149
38232
|
* @category type IDs
|
|
38150
38233
|
* @since 4.0.0
|
|
38151
38234
|
*/
|
|
38152
|
-
const TypeId$
|
|
38235
|
+
const TypeId$10 = "~effect/socket/Socket";
|
|
38153
38236
|
/**
|
|
38154
38237
|
* Service tag for bidirectional socket transports.
|
|
38155
38238
|
*
|
|
@@ -38169,8 +38252,8 @@ const Socket = /*#__PURE__*/ Service("effect/socket/Socket");
|
|
|
38169
38252
|
* @category constructors
|
|
38170
38253
|
* @since 4.0.0
|
|
38171
38254
|
*/
|
|
38172
|
-
const make$
|
|
38173
|
-
[TypeId$
|
|
38255
|
+
const make$27 = (options) => Socket.of({
|
|
38256
|
+
[TypeId$10]: TypeId$10,
|
|
38174
38257
|
runRaw: options.runRaw,
|
|
38175
38258
|
run: options.run ?? ((handler, opts) => options.runRaw((data) => typeof data === "string" ? handler(encoder.encode(data)) : data instanceof Uint8Array ? handler(data) : handler(new Uint8Array(data)), opts)),
|
|
38176
38259
|
runString: options.runString ?? (options.run ? (handler, opts) => options.run((data) => handler(decoder$1.decode(data)), opts) : (handler, opts) => options.runRaw((data) => typeof data === "string" ? handler(data) : data instanceof Uint8Array ? handler(decoder$1.decode(data)) : handler(decoder$1.decode(new Uint8Array(data))), opts)),
|
|
@@ -38382,7 +38465,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
|
|
|
38382
38465
|
const acquireContext = fiber.context;
|
|
38383
38466
|
const closeCodeIsError = options?.closeCodeIsError ?? defaultCloseCodeIsError;
|
|
38384
38467
|
const runRaw = (handler, opts) => scopedWith(fnUntraced(function* (scope) {
|
|
38385
|
-
const fiberSet = yield* make$
|
|
38468
|
+
const fiberSet = yield* make$28().pipe(provide$3(scope));
|
|
38386
38469
|
const ws = yield* provide$3(acquire, scope);
|
|
38387
38470
|
const run = yield* provideService(runtime(fiberSet)(), WebSocket$1, ws);
|
|
38388
38471
|
let open = false;
|
|
@@ -38442,7 +38525,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber) => {
|
|
|
38442
38525
|
if (isCloseEvent(chunk)) ws.close(chunk.code, chunk.reason);
|
|
38443
38526
|
else ws.send(chunk);
|
|
38444
38527
|
}));
|
|
38445
|
-
return succeed$3(make$
|
|
38528
|
+
return succeed$3(make$27({
|
|
38446
38529
|
runRaw,
|
|
38447
38530
|
writer: succeed$3(write)
|
|
38448
38531
|
}));
|
|
@@ -38910,7 +38993,7 @@ const constValueChars = [
|
|
|
38910
38993
|
1,
|
|
38911
38994
|
1
|
|
38912
38995
|
];
|
|
38913
|
-
function make$
|
|
38996
|
+
function make$26() {
|
|
38914
38997
|
const decoder = new TextDecoder();
|
|
38915
38998
|
const state = {
|
|
38916
38999
|
state: State$1.key,
|
|
@@ -39087,7 +39170,7 @@ function makeState(needle_) {
|
|
|
39087
39170
|
matchIndex: 0
|
|
39088
39171
|
};
|
|
39089
39172
|
}
|
|
39090
|
-
function make$
|
|
39173
|
+
function make$25(needle, callback, seed) {
|
|
39091
39174
|
const state = makeState(needle);
|
|
39092
39175
|
if (seed !== void 0) {
|
|
39093
39176
|
state.previousChunk = seed;
|
|
@@ -39196,7 +39279,7 @@ function parseBoundary(headers) {
|
|
|
39196
39279
|
return parse(headers["content-type"]).parameters.boundary;
|
|
39197
39280
|
}
|
|
39198
39281
|
function noopOnChunk(_chunk) {}
|
|
39199
|
-
function make$
|
|
39282
|
+
function make$24({ headers, onFile: onPart, onField, onError, onDone, isFile = defaultIsFile$1, maxParts = Infinity, maxTotalSize = Infinity, maxPartSize = Infinity, maxFieldSize = 1024 * 1024 }) {
|
|
39200
39283
|
const boundary = parseBoundary(headers);
|
|
39201
39284
|
if (boundary === void 0) {
|
|
39202
39285
|
onError({ _tag: "InvalidBoundary" });
|
|
@@ -39223,8 +39306,8 @@ function make$23({ headers, onFile: onPart, onField, onError, onDone, isFile = d
|
|
|
39223
39306
|
state.isFile = true;
|
|
39224
39307
|
state.onChunk = noopOnChunk;
|
|
39225
39308
|
}
|
|
39226
|
-
const headerParser = make$
|
|
39227
|
-
const split = make$
|
|
39309
|
+
const headerParser = make$26();
|
|
39310
|
+
const split = make$25(`\r\n--${boundary}`, function(index, chunk) {
|
|
39228
39311
|
if (index === 0) {
|
|
39229
39312
|
skipBody();
|
|
39230
39313
|
return;
|
|
@@ -39335,7 +39418,7 @@ function decodeField$1(info, value) {
|
|
|
39335
39418
|
}
|
|
39336
39419
|
//#endregion
|
|
39337
39420
|
//#region ../../node_modules/.pnpm/multipasta@0.2.7/node_modules/multipasta/dist/esm/index.js
|
|
39338
|
-
const make$
|
|
39421
|
+
const make$23 = make$24;
|
|
39339
39422
|
const defaultIsFile = defaultIsFile$1;
|
|
39340
39423
|
const decodeField = decodeField$1;
|
|
39341
39424
|
//#endregion
|
|
@@ -39387,7 +39470,7 @@ const decodeField = decodeField$1;
|
|
|
39387
39470
|
* @category type IDs
|
|
39388
39471
|
* @since 4.0.0
|
|
39389
39472
|
*/
|
|
39390
|
-
const TypeId$
|
|
39473
|
+
const TypeId$9 = "~effect/http/Multipart";
|
|
39391
39474
|
const MultipartErrorTypeId = "~effect/http/Multipart/MultipartError";
|
|
39392
39475
|
/**
|
|
39393
39476
|
* Error reason carried by a `MultipartError`.
|
|
@@ -39451,7 +39534,7 @@ var MultipartError = class MultipartError extends TaggedError("MultipartError")
|
|
|
39451
39534
|
* @since 4.0.0
|
|
39452
39535
|
*/
|
|
39453
39536
|
const makeConfig = (headers) => withFiber((fiber) => {
|
|
39454
|
-
const mimeTypes = get$
|
|
39537
|
+
const mimeTypes = get$9(fiber.context, FieldMimeTypes);
|
|
39455
39538
|
return succeed$3({
|
|
39456
39539
|
headers,
|
|
39457
39540
|
maxParts: fiber.getRef(MaxParts),
|
|
@@ -39462,10 +39545,10 @@ const makeConfig = (headers) => withFiber((fiber) => {
|
|
|
39462
39545
|
});
|
|
39463
39546
|
});
|
|
39464
39547
|
var PartBase$1 = class extends Class$2 {
|
|
39465
|
-
[TypeId$
|
|
39548
|
+
[TypeId$9];
|
|
39466
39549
|
constructor() {
|
|
39467
39550
|
super();
|
|
39468
|
-
this[TypeId$
|
|
39551
|
+
this[TypeId$9] = TypeId$9;
|
|
39469
39552
|
}
|
|
39470
39553
|
};
|
|
39471
39554
|
const defaultWriteFile = (path, file) => flatMap$2(FileSystem, (fs) => mapError$2(run$1(file.content, fs.sink(path)), (cause) => MultipartError.fromReason("InternalError", cause)));
|
|
@@ -39582,7 +39665,7 @@ const FieldMimeTypes = /*#__PURE__*/ Reference("effect/http/Multipart/FieldMimeT
|
|
|
39582
39665
|
* @category type IDs
|
|
39583
39666
|
* @since 4.0.0
|
|
39584
39667
|
*/
|
|
39585
|
-
const TypeId$
|
|
39668
|
+
const TypeId$8 = "~effect/http/HttpServerRequest";
|
|
39586
39669
|
/**
|
|
39587
39670
|
* Service tag for the active server-side HTTP request.
|
|
39588
39671
|
*
|
|
@@ -39715,7 +39798,7 @@ const requestPreResponseHandlers = /*#__PURE__*/ new WeakMap();
|
|
|
39715
39798
|
* @category constructors
|
|
39716
39799
|
* @since 4.0.0
|
|
39717
39800
|
*/
|
|
39718
|
-
const make$
|
|
39801
|
+
const make$22 = (middleware) => middleware;
|
|
39719
39802
|
const loggerDisabledRequests = /*#__PURE__*/ new WeakSet();
|
|
39720
39803
|
const stripSearchAndHash = (url) => {
|
|
39721
39804
|
const queryIndex = url.indexOf("?");
|
|
@@ -39755,7 +39838,7 @@ const SpanNameGenerator = /*#__PURE__*/ Reference("@effect/platform/HttpMiddlewa
|
|
|
39755
39838
|
* @category Logger
|
|
39756
39839
|
* @since 4.0.0
|
|
39757
39840
|
*/
|
|
39758
|
-
const logger = /*#__PURE__*/ make$
|
|
39841
|
+
const logger = /*#__PURE__*/ make$22((httpApp) => withFiber((fiber) => {
|
|
39759
39842
|
const request = getUnsafe(fiber.context, HttpServerRequest);
|
|
39760
39843
|
const path = stripSearchAndHash(request.url);
|
|
39761
39844
|
return withLogSpan(flatMap$2(exit(httpApp), (exit) => {
|
|
@@ -39781,7 +39864,7 @@ const logger = /*#__PURE__*/ make$21((httpApp) => withFiber((fiber) => {
|
|
|
39781
39864
|
* @category Tracer
|
|
39782
39865
|
* @since 4.0.0
|
|
39783
39866
|
*/
|
|
39784
|
-
const tracer = /*#__PURE__*/ make$
|
|
39867
|
+
const tracer = /*#__PURE__*/ make$22((httpApp) => withFiber((fiber) => {
|
|
39785
39868
|
const request = getUnsafe(fiber.context, HttpServerRequest);
|
|
39786
39869
|
if (!fiber.getRef(TracerEnabled) || fiber.getRef(TracerDisabledWhen)(request)) return httpApp;
|
|
39787
39870
|
const span = makeSpanUnsafe(fiber, fiber.getRef(SpanNameGenerator)(request), {
|
|
@@ -39825,7 +39908,7 @@ const tracer = /*#__PURE__*/ make$21((httpApp) => withFiber((fiber) => {
|
|
|
39825
39908
|
* @category Proxying
|
|
39826
39909
|
* @since 4.0.0
|
|
39827
39910
|
*/
|
|
39828
|
-
const xForwardedHeaders = /*#__PURE__*/ make$
|
|
39911
|
+
const xForwardedHeaders = /*#__PURE__*/ make$22((httpApp) => updateService(httpApp, HttpServerRequest, (request) => request.headers["x-forwarded-host"] ? request.modify({
|
|
39829
39912
|
headers: set$1(request.headers, "host", request.headers["x-forwarded-host"]),
|
|
39830
39913
|
remoteAddress: fromNullishOr(request.headers["x-forwarded-for"]?.split(",")[0].trim())
|
|
39831
39914
|
}) : request));
|
|
@@ -39955,7 +40038,7 @@ const toString = (self) => {
|
|
|
39955
40038
|
*/
|
|
39956
40039
|
var Generator = class extends Service()("effect/http/Etag/Generator") {};
|
|
39957
40040
|
const fromFileInfo = (info) => {
|
|
39958
|
-
const mtime = match$
|
|
40041
|
+
const mtime = match$5(info.mtime, {
|
|
39959
40042
|
onNone: () => "0",
|
|
39960
40043
|
onSome: (mtime) => mtime.getTime().toString(16)
|
|
39961
40044
|
});
|
|
@@ -40059,7 +40142,7 @@ var HttpPlatform = class extends Service()("effect/http/HttpPlatform") {};
|
|
|
40059
40142
|
* @category constructors
|
|
40060
40143
|
* @since 4.0.0
|
|
40061
40144
|
*/
|
|
40062
|
-
const make$
|
|
40145
|
+
const make$21 = /*#__PURE__*/ fnUntraced(function* (impl) {
|
|
40063
40146
|
const fs = yield* FileSystem;
|
|
40064
40147
|
const etagGen = yield* Generator;
|
|
40065
40148
|
return HttpPlatform.of({
|
|
@@ -40139,7 +40222,7 @@ var HttpServer = class extends Service()("effect/http/HttpServer") {};
|
|
|
40139
40222
|
* @category constructors
|
|
40140
40223
|
* @since 4.0.0
|
|
40141
40224
|
*/
|
|
40142
|
-
const make$
|
|
40225
|
+
const make$20 = (options) => options;
|
|
40143
40226
|
/**
|
|
40144
40227
|
* Creates a layer that starts serving an HTTP response effect with the current
|
|
40145
40228
|
* `HttpServer`.
|
|
@@ -40238,7 +40321,7 @@ const withLogAddress = (layer) => effectDiscard(logAddress).pipe(provideMerge(la
|
|
|
40238
40321
|
*
|
|
40239
40322
|
* @since 4.0.0
|
|
40240
40323
|
*/
|
|
40241
|
-
const TypeId$
|
|
40324
|
+
const TypeId$7 = "~effect/http/HttpRouter";
|
|
40242
40325
|
/**
|
|
40243
40326
|
* Service tag for the HTTP router used while constructing an HTTP application.
|
|
40244
40327
|
* Route and middleware layers require this service to register themselves with
|
|
@@ -40259,8 +40342,8 @@ const HttpRouter = /*#__PURE__*/ Service("effect/http/HttpRouter");
|
|
|
40259
40342
|
* @category HttpRouter
|
|
40260
40343
|
* @since 4.0.0
|
|
40261
40344
|
*/
|
|
40262
|
-
const make$
|
|
40263
|
-
const router = make$
|
|
40345
|
+
const make$19 = /*#__PURE__*/ gen(function* () {
|
|
40346
|
+
const router = make$29(yield* RouterConfig);
|
|
40264
40347
|
const middleware = /* @__PURE__ */ new Set();
|
|
40265
40348
|
const addAll = (routes) => contextWith((context) => {
|
|
40266
40349
|
const middleware = getMiddleware(context);
|
|
@@ -40285,7 +40368,7 @@ const make$18 = /*#__PURE__*/ gen(function* () {
|
|
|
40285
40368
|
return void_$1;
|
|
40286
40369
|
});
|
|
40287
40370
|
return HttpRouter.of({
|
|
40288
|
-
[TypeId$
|
|
40371
|
+
[TypeId$7]: TypeId$7,
|
|
40289
40372
|
prefixed(prefix) {
|
|
40290
40373
|
return HttpRouter.of({
|
|
40291
40374
|
...this,
|
|
@@ -40368,7 +40451,7 @@ var RouteContext = class extends Service()("effect/http/HttpRouter/RouteContext"
|
|
|
40368
40451
|
* @category HttpRouter
|
|
40369
40452
|
* @since 4.0.0
|
|
40370
40453
|
*/
|
|
40371
|
-
const layer$20 = /*#__PURE__*/ effect(HttpRouter)(make$
|
|
40454
|
+
const layer$20 = /*#__PURE__*/ effect(HttpRouter)(make$19);
|
|
40372
40455
|
const RouteTypeId = "~effect/http/HttpRouter/Route";
|
|
40373
40456
|
const makeRoute = (options) => ({
|
|
40374
40457
|
...options,
|
|
@@ -40428,7 +40511,7 @@ const prefixPath = /*#__PURE__*/ dual(2, (self, prefix) => {
|
|
|
40428
40511
|
const prefixRoute = /*#__PURE__*/ dual(2, (self, prefix) => makeRoute({
|
|
40429
40512
|
...self,
|
|
40430
40513
|
path: prefixPath(self.path, prefix),
|
|
40431
|
-
prefix: match$
|
|
40514
|
+
prefix: match$5(self.prefix, {
|
|
40432
40515
|
onNone: () => prefix,
|
|
40433
40516
|
onSome: (existingPrefix) => prefixPath(existingPrefix, prefix)
|
|
40434
40517
|
})
|
|
@@ -40519,7 +40602,7 @@ var MiddlewareImpl = class MiddlewareImpl {
|
|
|
40519
40602
|
const stack = [context.mapUnsafe.get(fnContextKey)];
|
|
40520
40603
|
if (this.dependencies) {
|
|
40521
40604
|
const memoMap = yield* CurrentMemoMap;
|
|
40522
|
-
const scope = get$
|
|
40605
|
+
const scope = get$9(context, Scope);
|
|
40523
40606
|
const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
|
|
40524
40607
|
stack.push(...getMiddleware(depsContext));
|
|
40525
40608
|
}
|
|
@@ -40718,7 +40801,7 @@ const schema$1 = /*#__PURE__*/ declare(isStream);
|
|
|
40718
40801
|
* @since 4.0.0
|
|
40719
40802
|
*/
|
|
40720
40803
|
function Stream(success, error) {
|
|
40721
|
-
return make$
|
|
40804
|
+
return make$35(schema$1.ast, {
|
|
40722
40805
|
[StreamSchemaTypeId]: StreamSchemaTypeId,
|
|
40723
40806
|
success,
|
|
40724
40807
|
error
|
|
@@ -40740,7 +40823,7 @@ var ClientAbort = class extends Service()("effect/rpc/RpcSchema/ClientAbort") {
|
|
|
40740
40823
|
};
|
|
40741
40824
|
//#endregion
|
|
40742
40825
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/rpc/Rpc.js
|
|
40743
|
-
const TypeId$
|
|
40826
|
+
const TypeId$6 = "~effect/rpc/Rpc";
|
|
40744
40827
|
/**
|
|
40745
40828
|
* Represents server-side metadata for the client associated with an RPC request.
|
|
40746
40829
|
*
|
|
@@ -40770,7 +40853,7 @@ var ServerClient = class {
|
|
|
40770
40853
|
}
|
|
40771
40854
|
};
|
|
40772
40855
|
const Proto$3 = {
|
|
40773
|
-
[TypeId$
|
|
40856
|
+
[TypeId$6]: TypeId$6,
|
|
40774
40857
|
pipe() {
|
|
40775
40858
|
return pipeArguments(this, arguments);
|
|
40776
40859
|
},
|
|
@@ -40872,7 +40955,7 @@ const makeProto$1 = (options) => {
|
|
|
40872
40955
|
* @category constructors
|
|
40873
40956
|
* @since 4.0.0
|
|
40874
40957
|
*/
|
|
40875
|
-
const make$
|
|
40958
|
+
const make$18 = (tag, options) => {
|
|
40876
40959
|
const successSchema = options?.success ?? Void;
|
|
40877
40960
|
const errorSchema = options?.error ?? Never;
|
|
40878
40961
|
const defectSchema = options?.defect ?? Defect;
|
|
@@ -43127,7 +43210,7 @@ var require_detect_libc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43127
43210
|
//#region ../../node_modules/.pnpm/node-gyp-build-optional-packages@5.2.2/node_modules/node-gyp-build-optional-packages/node-gyp-build.js
|
|
43128
43211
|
var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
43129
43212
|
var fs$1 = __require("fs");
|
|
43130
|
-
var path$
|
|
43213
|
+
var path$2 = __require("path");
|
|
43131
43214
|
var url = __require("url");
|
|
43132
43215
|
var os$1 = __require("os");
|
|
43133
43216
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
@@ -43147,30 +43230,30 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
43147
43230
|
return runtimeRequire(load.resolve(dir));
|
|
43148
43231
|
}
|
|
43149
43232
|
load.resolve = load.path = function(dir) {
|
|
43150
|
-
dir = path$
|
|
43233
|
+
dir = path$2.resolve(dir || ".");
|
|
43151
43234
|
var packageName = "";
|
|
43152
43235
|
var packageNameError;
|
|
43153
43236
|
try {
|
|
43154
|
-
packageName = runtimeRequire(path$
|
|
43237
|
+
packageName = runtimeRequire(path$2.join(dir, "package.json")).name;
|
|
43155
43238
|
var varName = packageName.toUpperCase().replace(/-/g, "_");
|
|
43156
43239
|
if (process.env[varName + "_PREBUILD"]) dir = process.env[varName + "_PREBUILD"];
|
|
43157
43240
|
} catch (err) {
|
|
43158
43241
|
packageNameError = err;
|
|
43159
43242
|
}
|
|
43160
43243
|
if (!prebuildsOnly) {
|
|
43161
|
-
var release = getFirst(path$
|
|
43244
|
+
var release = getFirst(path$2.join(dir, "build/Release"), matchBuild);
|
|
43162
43245
|
if (release) return release;
|
|
43163
|
-
var debug = getFirst(path$
|
|
43246
|
+
var debug = getFirst(path$2.join(dir, "build/Debug"), matchBuild);
|
|
43164
43247
|
if (debug) return debug;
|
|
43165
43248
|
}
|
|
43166
43249
|
var prebuild = resolve(dir);
|
|
43167
43250
|
if (prebuild) return prebuild;
|
|
43168
|
-
var nearby = resolve(path$
|
|
43251
|
+
var nearby = resolve(path$2.dirname(process.execPath));
|
|
43169
43252
|
if (nearby) return nearby;
|
|
43170
43253
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
|
|
43171
43254
|
var packageResolutionError;
|
|
43172
43255
|
try {
|
|
43173
|
-
return resolveFile(path$
|
|
43256
|
+
return resolveFile(path$2.dirname(__require("module").createRequire(url.pathToFileURL(path$2.join(dir, "package.json"))).resolve(platformPackage)));
|
|
43174
43257
|
} catch (error) {
|
|
43175
43258
|
packageResolutionError = error;
|
|
43176
43259
|
}
|
|
@@ -43190,13 +43273,13 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
43190
43273
|
if (packageResolutionError) errMessage += "Error resolving package: " + packageResolutionError.message + "\n";
|
|
43191
43274
|
throw new Error(errMessage);
|
|
43192
43275
|
function resolve(dir) {
|
|
43193
|
-
var tuple = readdirSync(path$
|
|
43276
|
+
var tuple = readdirSync(path$2.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
43194
43277
|
if (!tuple) return;
|
|
43195
|
-
return resolveFile(path$
|
|
43278
|
+
return resolveFile(path$2.join(dir, "prebuilds", tuple.name));
|
|
43196
43279
|
}
|
|
43197
43280
|
function resolveFile(prebuilds) {
|
|
43198
43281
|
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
43199
|
-
if (winner) return path$
|
|
43282
|
+
if (winner) return path$2.join(prebuilds, winner.file);
|
|
43200
43283
|
}
|
|
43201
43284
|
};
|
|
43202
43285
|
function readdirSync(dir) {
|
|
@@ -43208,7 +43291,7 @@ var require_node_gyp_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
43208
43291
|
}
|
|
43209
43292
|
function getFirst(dir, filter) {
|
|
43210
43293
|
var files = readdirSync(dir).filter(filter);
|
|
43211
|
-
return files[0] && path$
|
|
43294
|
+
return files[0] && path$2.join(dir, files[0]);
|
|
43212
43295
|
}
|
|
43213
43296
|
function matchBuild(name) {
|
|
43214
43297
|
return /\.node$/.test(name);
|
|
@@ -43513,7 +43596,7 @@ const withRun = () => (f) => suspend$2(() => {
|
|
|
43513
43596
|
* @category type IDs
|
|
43514
43597
|
* @since 4.0.0
|
|
43515
43598
|
*/
|
|
43516
|
-
const TypeId$
|
|
43599
|
+
const TypeId$5 = "~effect/Stdio";
|
|
43517
43600
|
/**
|
|
43518
43601
|
* Service tag for process standard I/O.
|
|
43519
43602
|
*
|
|
@@ -43528,7 +43611,7 @@ const TypeId$4 = "~effect/Stdio";
|
|
|
43528
43611
|
* @category services
|
|
43529
43612
|
* @since 4.0.0
|
|
43530
43613
|
*/
|
|
43531
|
-
const Stdio = /*#__PURE__*/ Service(TypeId$
|
|
43614
|
+
const Stdio = /*#__PURE__*/ Service(TypeId$5);
|
|
43532
43615
|
/**
|
|
43533
43616
|
* Creates a `Stdio` service implementation from the provided fields and
|
|
43534
43617
|
* attaches the `Stdio` type identifier.
|
|
@@ -43549,8 +43632,8 @@ const Stdio = /*#__PURE__*/ Service(TypeId$4);
|
|
|
43549
43632
|
* @category constructors
|
|
43550
43633
|
* @since 4.0.0
|
|
43551
43634
|
*/
|
|
43552
|
-
const make$
|
|
43553
|
-
[TypeId$
|
|
43635
|
+
const make$17 = (options) => ({
|
|
43636
|
+
[TypeId$5]: TypeId$5,
|
|
43554
43637
|
...options
|
|
43555
43638
|
});
|
|
43556
43639
|
//#endregion
|
|
@@ -43571,9 +43654,9 @@ const makeNoSerialization = /*#__PURE__*/ fnUntraced(function* (group, options)
|
|
|
43571
43654
|
const concurrency = options.concurrency ?? "unbounded";
|
|
43572
43655
|
const disableFatalDefects = options.disableFatalDefects ?? false;
|
|
43573
43656
|
const services = yield* context$1();
|
|
43574
|
-
const scope = get$
|
|
43657
|
+
const scope = get$9(services, Scope);
|
|
43575
43658
|
const trackFiber = runIn(forkUnsafe(scope, "parallel"));
|
|
43576
|
-
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$
|
|
43659
|
+
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$47(concurrency);
|
|
43577
43660
|
const clients = /* @__PURE__ */ new Map();
|
|
43578
43661
|
let isShutdown = false;
|
|
43579
43662
|
const shutdownLatch = makeUnsafe$4(false);
|
|
@@ -43808,10 +43891,10 @@ const applyMiddleware = (context, handler, options) => {
|
|
|
43808
43891
|
* @category server
|
|
43809
43892
|
* @since 4.0.0
|
|
43810
43893
|
*/
|
|
43811
|
-
const make$
|
|
43894
|
+
const make$16 = /*#__PURE__*/ fnUntraced(function* (group, options) {
|
|
43812
43895
|
const { disconnects, end, run, send, supportsAck, supportsSpanPropagation, supportsTransferables } = yield* Protocol;
|
|
43813
43896
|
const services = yield* context$1();
|
|
43814
|
-
const scope = yield* make$
|
|
43897
|
+
const scope = yield* make$59();
|
|
43815
43898
|
const server = yield* makeNoSerialization(group, {
|
|
43816
43899
|
...options,
|
|
43817
43900
|
disableClientAcks: !supportsAck,
|
|
@@ -43956,7 +44039,7 @@ const make$15 = /*#__PURE__*/ fnUntraced(function* (group, options) {
|
|
|
43956
44039
|
* @category server
|
|
43957
44040
|
* @since 4.0.0
|
|
43958
44041
|
*/
|
|
43959
|
-
const layer$19 = (group, options) => effectDiscard(forkScoped(make$
|
|
44042
|
+
const layer$19 = (group, options) => effectDiscard(forkScoped(make$16(group, options)));
|
|
43960
44043
|
/**
|
|
43961
44044
|
* Creates a RPC server that registers a HTTP route with a `HttpRouter`.
|
|
43962
44045
|
*
|
|
@@ -44041,7 +44124,7 @@ const makeProtocolWithHttpEffect = /*#__PURE__*/ gen(function* () {
|
|
|
44041
44124
|
const serialization = yield* RpcSerialization;
|
|
44042
44125
|
const includesFraming = serialization.includesFraming;
|
|
44043
44126
|
const isBinary = !serialization.contentType.includes("json");
|
|
44044
|
-
const disconnects = yield* make$
|
|
44127
|
+
const disconnects = yield* make$48();
|
|
44045
44128
|
let writeRequest;
|
|
44046
44129
|
let clientId = 0;
|
|
44047
44130
|
const clients = /* @__PURE__ */ new Map();
|
|
@@ -44054,7 +44137,7 @@ const makeProtocolWithHttpEffect = /*#__PURE__*/ gen(function* () {
|
|
|
44054
44137
|
const requestHeaders = Object.entries(request.headers);
|
|
44055
44138
|
const data = yield* orDie$2(isBinary ? map$4(request.arrayBuffer, (buf) => new Uint8Array(buf)) : request.text);
|
|
44056
44139
|
const id = clientId++;
|
|
44057
|
-
const queue = yield* make$
|
|
44140
|
+
const queue = yield* make$48();
|
|
44058
44141
|
const parser = serialization.makeUnsafe();
|
|
44059
44142
|
const requestIds = [];
|
|
44060
44143
|
const offer$1 = (data) => typeof data === "string" ? offer(queue, encoder.encode(data)) : offer(queue, data);
|
|
@@ -44165,7 +44248,7 @@ const layerProtocolHttp = (options) => {
|
|
|
44165
44248
|
};
|
|
44166
44249
|
const makeSocketProtocol = /*#__PURE__*/ gen(function* () {
|
|
44167
44250
|
const serialization = yield* RpcSerialization;
|
|
44168
|
-
const disconnects = yield* make$
|
|
44251
|
+
const disconnects = yield* make$48();
|
|
44169
44252
|
let clientId = 0;
|
|
44170
44253
|
const clients = /* @__PURE__ */ new Map();
|
|
44171
44254
|
const clientIds = /* @__PURE__ */ new Set();
|
|
@@ -44337,7 +44420,7 @@ const RpcGroupProto = {
|
|
|
44337
44420
|
});
|
|
44338
44421
|
},
|
|
44339
44422
|
annotateRpcs(service, value) {
|
|
44340
|
-
return this.annotateRpcsMerge(make$
|
|
44423
|
+
return this.annotateRpcsMerge(make$62(service, value));
|
|
44341
44424
|
},
|
|
44342
44425
|
annotateMerge(context) {
|
|
44343
44426
|
return makeProto({
|
|
@@ -44364,7 +44447,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
44364
44447
|
* @category groups
|
|
44365
44448
|
* @since 4.0.0
|
|
44366
44449
|
*/
|
|
44367
|
-
const make$
|
|
44450
|
+
const make$15 = (...rpcs) => makeProto({
|
|
44368
44451
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
44369
44452
|
annotations: empty$12()
|
|
44370
44453
|
});
|
|
@@ -44640,7 +44723,7 @@ const Proto$2 = {
|
|
|
44640
44723
|
* @category constructors
|
|
44641
44724
|
* @since 2.0.0
|
|
44642
44725
|
*/
|
|
44643
|
-
function make$
|
|
44726
|
+
function make$14(get, mapInput, prefix) {
|
|
44644
44727
|
const self = Object.create(Proto$2);
|
|
44645
44728
|
self.get = get;
|
|
44646
44729
|
self.mapInput = mapInput;
|
|
@@ -44706,7 +44789,7 @@ function fromEnv(options) {
|
|
|
44706
44789
|
...import.meta.env
|
|
44707
44790
|
};
|
|
44708
44791
|
const trie = buildEnvTrie(env);
|
|
44709
|
-
return make$
|
|
44792
|
+
return make$14((path) => succeed$3(nodeAtEnv(trie, env, path)));
|
|
44710
44793
|
}
|
|
44711
44794
|
function buildEnvTrie(env) {
|
|
44712
44795
|
const root = {};
|
|
@@ -44742,7 +44825,7 @@ function trieNodeAt(root, path) {
|
|
|
44742
44825
|
}
|
|
44743
44826
|
//#endregion
|
|
44744
44827
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Config.js
|
|
44745
|
-
const TypeId$
|
|
44828
|
+
const TypeId$4 = "~effect/Config";
|
|
44746
44829
|
/**
|
|
44747
44830
|
* Returns `true` if `u` is a `Config` instance.
|
|
44748
44831
|
*
|
|
@@ -44763,7 +44846,7 @@ const TypeId$3 = "~effect/Config";
|
|
|
44763
44846
|
* @category guards
|
|
44764
44847
|
* @since 2.0.0
|
|
44765
44848
|
*/
|
|
44766
|
-
const isConfig = (u) => hasProperty(u, TypeId$
|
|
44849
|
+
const isConfig = (u) => hasProperty(u, TypeId$4);
|
|
44767
44850
|
/**
|
|
44768
44851
|
* Represents the error type produced when config loading or validation fails.
|
|
44769
44852
|
*
|
|
@@ -44807,7 +44890,7 @@ const Proto$1 = {
|
|
|
44807
44890
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
44808
44891
|
}
|
|
44809
44892
|
}),
|
|
44810
|
-
[TypeId$
|
|
44893
|
+
[TypeId$4]: TypeId$4,
|
|
44811
44894
|
toJSON() {
|
|
44812
44895
|
return { _id: "Config" };
|
|
44813
44896
|
}
|
|
@@ -44847,7 +44930,7 @@ const Proto$1 = {
|
|
|
44847
44930
|
* @category constructors
|
|
44848
44931
|
* @since 4.0.0
|
|
44849
44932
|
*/
|
|
44850
|
-
function make$
|
|
44933
|
+
function make$13(parse) {
|
|
44851
44934
|
const self = Object.create(Proto$1);
|
|
44852
44935
|
self.parse = parse;
|
|
44853
44936
|
return self;
|
|
@@ -44883,7 +44966,7 @@ function make$12(parse) {
|
|
|
44883
44966
|
* @since 2.0.0
|
|
44884
44967
|
*/
|
|
44885
44968
|
const map = /*#__PURE__*/ dual(2, (self, f) => {
|
|
44886
|
-
return make$
|
|
44969
|
+
return make$13((provider) => map$4(self.parse(provider), f));
|
|
44887
44970
|
});
|
|
44888
44971
|
/**
|
|
44889
44972
|
* Provides a fallback config when parsing fails with a `ConfigError`.
|
|
@@ -44917,7 +45000,7 @@ const map = /*#__PURE__*/ dual(2, (self, f) => {
|
|
|
44917
45000
|
* @since 2.0.0
|
|
44918
45001
|
*/
|
|
44919
45002
|
const orElse = /*#__PURE__*/ dual(2, (self, that) => {
|
|
44920
|
-
return make$
|
|
45003
|
+
return make$13((provider) => catch_$2(self.parse(provider), (error) => that(error).parse(provider)));
|
|
44921
45004
|
});
|
|
44922
45005
|
function isMissingDataOnly(issue) {
|
|
44923
45006
|
switch (issue._tag) {
|
|
@@ -45042,7 +45125,7 @@ const option = (self) => self.pipe(map(some), withDefault(none()));
|
|
|
45042
45125
|
*/
|
|
45043
45126
|
const unwrap = (wrapped) => {
|
|
45044
45127
|
if (isConfig(wrapped)) return wrapped;
|
|
45045
|
-
return make$
|
|
45128
|
+
return make$13((provider) => {
|
|
45046
45129
|
return all(Object.entries(wrapped).map(([key, config]) => unwrap(config).parse(provider).pipe(map$4((value) => [key, value])))).pipe(map$4(Object.fromEntries));
|
|
45047
45130
|
});
|
|
45048
45131
|
};
|
|
@@ -45159,7 +45242,7 @@ function schema(codec, path) {
|
|
|
45159
45242
|
const decodeUnknownEffect = decodeUnknownEffect$1(codecStringTree);
|
|
45160
45243
|
const codecStringTreeEncoded = toEncoded(codecStringTree.ast);
|
|
45161
45244
|
const defaultPath = typeof path === "string" ? [path] : path ?? [];
|
|
45162
|
-
return make$
|
|
45245
|
+
return make$13((provider) => {
|
|
45163
45246
|
const path = provider.prefix ? [...provider.prefix, ...defaultPath] : defaultPath;
|
|
45164
45247
|
return recur(codecStringTreeEncoded, provider, defaultPath).pipe(flatMapEager((tree) => decodeUnknownEffect(tree).pipe(mapErrorEager((issue) => new SchemaError(path.length > 0 ? new Pointer(path, issue) : issue)))), mapErrorEager((cause) => new ConfigError(cause)));
|
|
45165
45248
|
});
|
|
@@ -45193,7 +45276,7 @@ const Port = /*#__PURE__*/ Int.check(/*#__PURE__*/ isBetween({
|
|
|
45193
45276
|
* @since 2.0.0
|
|
45194
45277
|
*/
|
|
45195
45278
|
function fail(err) {
|
|
45196
|
-
return make$
|
|
45279
|
+
return make$13(() => fail$3(new ConfigError(err)));
|
|
45197
45280
|
}
|
|
45198
45281
|
/**
|
|
45199
45282
|
* Creates a config that always succeeds with the given value, ignoring the
|
|
@@ -45218,7 +45301,7 @@ function fail(err) {
|
|
|
45218
45301
|
* @since 2.0.0
|
|
45219
45302
|
*/
|
|
45220
45303
|
function succeed(value) {
|
|
45221
|
-
return make$
|
|
45304
|
+
return make$13(() => succeed$3(value));
|
|
45222
45305
|
}
|
|
45223
45306
|
/**
|
|
45224
45307
|
* Creates a config for a single string value.
|
|
@@ -49193,7 +49276,7 @@ const watchNode = (path) => callback((queue) => acquireRelease(sync(() => {
|
|
|
49193
49276
|
});
|
|
49194
49277
|
return watcher;
|
|
49195
49278
|
}), (watcher) => sync(() => watcher.close())));
|
|
49196
|
-
const watch = (backend, path) => stat(path).pipe(map$4((stat) => backend.pipe(flatMap$
|
|
49279
|
+
const watch = (backend, path) => stat(path).pipe(map$4((stat) => backend.pipe(flatMap$6((_) => _.register(path, stat)), getOrElse$1(() => watchNode(path)))), unwrap$1);
|
|
49197
49280
|
const writeFile = (path, data, options) => callback$1((resume, signal) => {
|
|
49198
49281
|
try {
|
|
49199
49282
|
NFS.writeFile(path, data, {
|
|
@@ -49208,7 +49291,7 @@ const writeFile = (path, data, options) => callback$1((resume, signal) => {
|
|
|
49208
49291
|
resume(fail$3(handleBadArgument("writeFile")(err)));
|
|
49209
49292
|
}
|
|
49210
49293
|
});
|
|
49211
|
-
const makeFileSystem = /*#__PURE__*/ map$4(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$
|
|
49294
|
+
const makeFileSystem = /*#__PURE__*/ map$4(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$42({
|
|
49212
49295
|
access,
|
|
49213
49296
|
chmod,
|
|
49214
49297
|
chown,
|
|
@@ -49325,13 +49408,13 @@ var NodeHttpIncomingMessage = class extends Class$2 {
|
|
|
49325
49408
|
*
|
|
49326
49409
|
* @since 4.0.0
|
|
49327
49410
|
*/
|
|
49328
|
-
[TypeId$
|
|
49411
|
+
[TypeId$16];
|
|
49329
49412
|
source;
|
|
49330
49413
|
onError;
|
|
49331
49414
|
remoteAddressOverride;
|
|
49332
49415
|
constructor(source, onError, remoteAddressOverride) {
|
|
49333
49416
|
super();
|
|
49334
|
-
this[TypeId$
|
|
49417
|
+
this[TypeId$16] = TypeId$16;
|
|
49335
49418
|
this.source = source;
|
|
49336
49419
|
this.onError = onError;
|
|
49337
49420
|
this.remoteAddressOverride = remoteAddressOverride;
|
|
@@ -49478,7 +49561,7 @@ var RequestInit = class extends Service()("effect/http/FetchHttpClient/RequestIn
|
|
|
49478
49561
|
* @category layers
|
|
49479
49562
|
* @since 4.0.0
|
|
49480
49563
|
*/
|
|
49481
|
-
const layer$16 = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed$3(/* @__PURE__ */ make$
|
|
49564
|
+
const layer$16 = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed$3(/* @__PURE__ */ make$31((request, url, signal, fiber) => {
|
|
49482
49565
|
const fetch = fiber.getRef(Fetch);
|
|
49483
49566
|
const options = fiber.context.mapUnsafe.get(RequestInit.key) ?? {};
|
|
49484
49567
|
let headers = options.headers ? merge(fromInput$1(options.headers), request.headers) : request.headers;
|
|
@@ -49538,7 +49621,7 @@ const layer$16 = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed$3(/* @__
|
|
|
49538
49621
|
* @category constructors
|
|
49539
49622
|
* @since 4.0.0
|
|
49540
49623
|
*/
|
|
49541
|
-
const make$
|
|
49624
|
+
const make$12 = /*#__PURE__*/ make$21({
|
|
49542
49625
|
fileResponse(path, status, statusText, headers, start, end, contentLength) {
|
|
49543
49626
|
return raw(contentLength === 0 ? Readable.from([]) : NFS.createReadStream(path, {
|
|
49544
49627
|
start,
|
|
@@ -49571,7 +49654,7 @@ const make$11 = /*#__PURE__*/ make$20({
|
|
|
49571
49654
|
* @category layers
|
|
49572
49655
|
* @since 4.0.0
|
|
49573
49656
|
*/
|
|
49574
|
-
const layer$15 = /*#__PURE__*/ pipe(/*#__PURE__*/ effect(HttpPlatform)(make$
|
|
49657
|
+
const layer$15 = /*#__PURE__*/ pipe(/*#__PURE__*/ effect(HttpPlatform)(make$12), /*#__PURE__*/ provide$2(layer$17), /*#__PURE__*/ provide$2(layer$21));
|
|
49575
49658
|
//#endregion
|
|
49576
49659
|
//#region ../../node_modules/.pnpm/multipasta@0.2.7/node_modules/multipasta/dist/esm/node.js
|
|
49577
49660
|
var MultipastaStream = class extends Duplex {
|
|
@@ -49582,7 +49665,7 @@ var MultipastaStream = class extends Duplex {
|
|
|
49582
49665
|
super({ readableObjectMode: true });
|
|
49583
49666
|
let currentError;
|
|
49584
49667
|
let currentFile;
|
|
49585
|
-
this._parser = make$
|
|
49668
|
+
this._parser = make$23({
|
|
49586
49669
|
...config,
|
|
49587
49670
|
onField: (info, value) => {
|
|
49588
49671
|
if (currentError !== void 0) return;
|
|
@@ -49637,7 +49720,7 @@ var MultipastaStream = class extends Duplex {
|
|
|
49637
49720
|
callback();
|
|
49638
49721
|
}
|
|
49639
49722
|
};
|
|
49640
|
-
const make$
|
|
49723
|
+
const make$11 = (config) => new MultipastaStream(config);
|
|
49641
49724
|
var FileStream = class extends Readable {
|
|
49642
49725
|
info;
|
|
49643
49726
|
_parent;
|
|
@@ -49700,7 +49783,7 @@ var FileStream = class extends Readable {
|
|
|
49700
49783
|
*/
|
|
49701
49784
|
const stream = (source, headers) => makeConfig(headers).pipe(map$4((config) => fromReadable({
|
|
49702
49785
|
evaluate() {
|
|
49703
|
-
const parser = make$
|
|
49786
|
+
const parser = make$11(config);
|
|
49704
49787
|
source.pipe(parser);
|
|
49705
49788
|
return parser;
|
|
49706
49789
|
},
|
|
@@ -49719,10 +49802,10 @@ const persisted = (source, headers) => toPersisted(stream(source, headers), (pat
|
|
|
49719
49802
|
}));
|
|
49720
49803
|
const convertPart = (part) => part._tag === "Field" ? new FieldImpl(part.info, part.value) : new FileImpl(part);
|
|
49721
49804
|
var PartBase = class extends Class$2 {
|
|
49722
|
-
[TypeId$
|
|
49805
|
+
[TypeId$9];
|
|
49723
49806
|
constructor() {
|
|
49724
49807
|
super();
|
|
49725
|
-
this[TypeId$
|
|
49808
|
+
this[TypeId$9] = TypeId$9;
|
|
49726
49809
|
}
|
|
49727
49810
|
};
|
|
49728
49811
|
var FieldImpl = class extends PartBase {
|
|
@@ -49844,7 +49927,7 @@ function convertError(cause) {
|
|
|
49844
49927
|
*
|
|
49845
49928
|
* @since 4.0.0
|
|
49846
49929
|
*/
|
|
49847
|
-
const TypeId$
|
|
49930
|
+
const TypeId$3 = "~effect/platform/Crypto";
|
|
49848
49931
|
/**
|
|
49849
49932
|
* Service tag for platform cryptography.
|
|
49850
49933
|
*
|
|
@@ -49902,7 +49985,7 @@ const Crypto = /*#__PURE__*/ Service("effect/Crypto");
|
|
|
49902
49985
|
* @category constructors
|
|
49903
49986
|
* @since 4.0.0
|
|
49904
49987
|
*/
|
|
49905
|
-
const make$
|
|
49988
|
+
const make$10 = (impl) => {
|
|
49906
49989
|
const randomBytesUnsafe = impl.randomBytes;
|
|
49907
49990
|
const randomBytes = (size) => map$4(validateSize("randomBytes", size), randomBytesUnsafe);
|
|
49908
49991
|
const nextDoubleUnsafe = () => {
|
|
@@ -49911,7 +49994,7 @@ const make$9 = (impl) => {
|
|
|
49911
49994
|
};
|
|
49912
49995
|
const nextIntUnsafe = () => Math.floor(nextDoubleUnsafe() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
|
|
49913
49996
|
return Crypto.of({
|
|
49914
|
-
[TypeId$
|
|
49997
|
+
[TypeId$3]: TypeId$3,
|
|
49915
49998
|
randomBytes,
|
|
49916
49999
|
nextDoubleUnsafe,
|
|
49917
50000
|
nextIntUnsafe,
|
|
@@ -50041,7 +50124,7 @@ const digest = (algorithm, data) => try_({
|
|
|
50041
50124
|
* @category layers
|
|
50042
50125
|
* @since 1.0.0
|
|
50043
50126
|
*/
|
|
50044
|
-
const layer$13 = /* @__PURE__ */ succeed$4(Crypto, /* @__PURE__ */ make$
|
|
50127
|
+
const layer$13 = /* @__PURE__ */ succeed$4(Crypto, /* @__PURE__ */ make$10({
|
|
50045
50128
|
randomBytes: Crypto$1.randomBytes,
|
|
50046
50129
|
digest
|
|
50047
50130
|
}));
|
|
@@ -50131,7 +50214,7 @@ const toFileUrl = (path) => try_({
|
|
|
50131
50214
|
* @since 4.0.0
|
|
50132
50215
|
*/
|
|
50133
50216
|
const layer$11 = /* @__PURE__ */ succeed$4(Path$1)({
|
|
50134
|
-
[TypeId$
|
|
50217
|
+
[TypeId$26]: TypeId$26,
|
|
50135
50218
|
...Path,
|
|
50136
50219
|
fromFileUrl,
|
|
50137
50220
|
toFileUrl
|
|
@@ -50172,7 +50255,7 @@ const layer$11 = /* @__PURE__ */ succeed$4(Path$1)({
|
|
|
50172
50255
|
* @category layers
|
|
50173
50256
|
* @since 4.0.0
|
|
50174
50257
|
*/
|
|
50175
|
-
const layer$9 = /* @__PURE__ */ succeed$4(Stdio, /*#__PURE__*/ make$
|
|
50258
|
+
const layer$9 = /* @__PURE__ */ succeed$4(Stdio, /*#__PURE__*/ make$17({
|
|
50176
50259
|
args: /*#__PURE__*/ sync(() => process.argv.slice(2)),
|
|
50177
50260
|
stdout: (options) => fromWritable({
|
|
50178
50261
|
evaluate: () => process.stdout,
|
|
@@ -50207,7 +50290,7 @@ const layer$9 = /* @__PURE__ */ succeed$4(Stdio, /*#__PURE__*/ make$16({
|
|
|
50207
50290
|
}));
|
|
50208
50291
|
//#endregion
|
|
50209
50292
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/Terminal.js
|
|
50210
|
-
const TypeId$
|
|
50293
|
+
const TypeId$2 = "~effect/platform/Terminal";
|
|
50211
50294
|
ErrorClass("QuitError")({ _tag: /*#__PURE__*/ tag("QuitError") });
|
|
50212
50295
|
/**
|
|
50213
50296
|
* Service tag for command-line input and output services.
|
|
@@ -50239,9 +50322,9 @@ const Terminal$1 = /*#__PURE__*/ Service("effect/platform/Terminal");
|
|
|
50239
50322
|
* @category constructors
|
|
50240
50323
|
* @since 4.0.0
|
|
50241
50324
|
*/
|
|
50242
|
-
const make$
|
|
50325
|
+
const make$8 = (impl) => Terminal$1.of({
|
|
50243
50326
|
...impl,
|
|
50244
|
-
[TypeId$
|
|
50327
|
+
[TypeId$2]: TypeId$2
|
|
50245
50328
|
});
|
|
50246
50329
|
/**
|
|
50247
50330
|
* Provides the default process-backed `Terminal` service, ending key input on
|
|
@@ -50253,7 +50336,7 @@ const make$7 = (impl) => Terminal$1.of({
|
|
|
50253
50336
|
const layer$8 = /*#__PURE__*/ effect(Terminal$1, /*#__PURE__*/ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
50254
50337
|
const stdin = process.stdin;
|
|
50255
50338
|
const stdout = process.stdout;
|
|
50256
|
-
const rlRef = yield* make$
|
|
50339
|
+
const rlRef = yield* make$44({ acquire: acquireRelease(sync(() => {
|
|
50257
50340
|
const rl = readline.createInterface({
|
|
50258
50341
|
input: stdin,
|
|
50259
50342
|
escapeCodeTimeout: 50
|
|
@@ -50268,8 +50351,8 @@ const layer$8 = /*#__PURE__*/ effect(Terminal$1, /*#__PURE__*/ (/* @__PURE__ */
|
|
|
50268
50351
|
const columns = sync(() => stdout.columns ?? 0);
|
|
50269
50352
|
const rows = sync(() => stdout.rows ?? 0);
|
|
50270
50353
|
const readInput = gen(function* () {
|
|
50271
|
-
yield* get$
|
|
50272
|
-
const queue = yield* make$
|
|
50354
|
+
yield* get$4(rlRef);
|
|
50355
|
+
const queue = yield* make$48();
|
|
50273
50356
|
const handleKeypress = (s, k) => {
|
|
50274
50357
|
const userInput = {
|
|
50275
50358
|
input: fromUndefinedOr(s),
|
|
@@ -50287,7 +50370,7 @@ const layer$8 = /*#__PURE__*/ effect(Terminal$1, /*#__PURE__*/ (/* @__PURE__ */
|
|
|
50287
50370
|
stdin.on("keypress", handleKeypress);
|
|
50288
50371
|
return queue;
|
|
50289
50372
|
});
|
|
50290
|
-
const readLine = scoped$3(flatMap$2(get$
|
|
50373
|
+
const readLine = scoped$3(flatMap$2(get$4(rlRef), (readlineInterface) => callback$1((resume) => {
|
|
50291
50374
|
const onLine = (line) => resume(succeed$3(line));
|
|
50292
50375
|
readlineInterface.once("line", onLine);
|
|
50293
50376
|
return sync(() => readlineInterface.off("line", onLine));
|
|
@@ -50300,7 +50383,7 @@ const layer$8 = /*#__PURE__*/ effect(Terminal$1, /*#__PURE__*/ (/* @__PURE__ */
|
|
|
50300
50383
|
cause: err
|
|
50301
50384
|
}))));
|
|
50302
50385
|
}));
|
|
50303
|
-
return make$
|
|
50386
|
+
return make$8({
|
|
50304
50387
|
columns,
|
|
50305
50388
|
rows,
|
|
50306
50389
|
readInput,
|
|
@@ -50363,7 +50446,7 @@ const layer$6 = /*#__PURE__*/ provideMerge(layer$22, /*#__PURE__*/ mergeAll$1(la
|
|
|
50363
50446
|
* @category constructors
|
|
50364
50447
|
* @since 4.0.0
|
|
50365
50448
|
*/
|
|
50366
|
-
const make$
|
|
50449
|
+
const make$6 = /*#__PURE__*/ fnUntraced(function* (evaluate, options) {
|
|
50367
50450
|
const scope$2 = yield* scope;
|
|
50368
50451
|
const server = evaluate();
|
|
50369
50452
|
const shutdown = yield* callback$1((resume) => {
|
|
@@ -50392,7 +50475,7 @@ const make$5 = /*#__PURE__*/ fnUntraced(function* (evaluate, options) {
|
|
|
50392
50475
|
const wss = yield* acquireRelease(sync(() => new import_websocket_server.default({ noServer: true })), (wss) => callback$1((resume) => {
|
|
50393
50476
|
wss.close(() => resume(void_$1));
|
|
50394
50477
|
})).pipe(provide$3(scope$2), cached);
|
|
50395
|
-
return make$
|
|
50478
|
+
return make$20({
|
|
50396
50479
|
address: typeof address === "string" ? {
|
|
50397
50480
|
_tag: "UnixAddress",
|
|
50398
50481
|
path: address
|
|
@@ -50481,7 +50564,7 @@ const makeUpgradeHandler = (lazyWss, httpEffect, options) => {
|
|
|
50481
50564
|
});
|
|
50482
50565
|
};
|
|
50483
50566
|
var ServerRequestImpl = class ServerRequestImpl extends NodeHttpIncomingMessage {
|
|
50484
|
-
[TypeId$
|
|
50567
|
+
[TypeId$8];
|
|
50485
50568
|
response;
|
|
50486
50569
|
upgradeEffect;
|
|
50487
50570
|
url;
|
|
@@ -50491,7 +50574,7 @@ var ServerRequestImpl = class ServerRequestImpl extends NodeHttpIncomingMessage
|
|
|
50491
50574
|
request: this,
|
|
50492
50575
|
cause
|
|
50493
50576
|
}) }), remoteAddressOverride);
|
|
50494
|
-
this[TypeId$
|
|
50577
|
+
this[TypeId$8] = TypeId$8;
|
|
50495
50578
|
this.response = response;
|
|
50496
50579
|
this.upgradeEffect = upgradeEffect;
|
|
50497
50580
|
this.url = url;
|
|
@@ -50559,7 +50642,7 @@ const layerHttpServices = /*#__PURE__*/ mergeAll$1(layer$15, layerWeak, layer$6)
|
|
|
50559
50642
|
* @category layers
|
|
50560
50643
|
* @since 4.0.0
|
|
50561
50644
|
*/
|
|
50562
|
-
const layerConfig = (evaluate, options) => mergeAll$1(effect(HttpServer)(flatMap$2(unwrap(options), (options) => make$
|
|
50645
|
+
const layerConfig = (evaluate, options) => mergeAll$1(effect(HttpServer)(flatMap$2(unwrap(options), (options) => make$6(evaluate, options))), layerHttpServices);
|
|
50563
50646
|
const handleResponse = (request, response) => {
|
|
50564
50647
|
const nodeResponse = request.resolvedResponse;
|
|
50565
50648
|
if (nodeResponse.writableEnded) return void_$1;
|
|
@@ -51157,7 +51240,7 @@ const CurrentLoggers = CurrentLoggers$1;
|
|
|
51157
51240
|
* @category constructors
|
|
51158
51241
|
* @since 2.0.0
|
|
51159
51242
|
*/
|
|
51160
|
-
const make$
|
|
51243
|
+
const make$5 = loggerMake;
|
|
51161
51244
|
/**
|
|
51162
51245
|
* Creates a `Layer` which will overwrite the current set of loggers with the
|
|
51163
51246
|
* specified array of `loggers`.
|
|
@@ -51283,6 +51366,182 @@ const nextIntBetween = (min, max, options) => {
|
|
|
51283
51366
|
});
|
|
51284
51367
|
};
|
|
51285
51368
|
//#endregion
|
|
51369
|
+
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/unstable/persistence/KeyValueStore.js
|
|
51370
|
+
/**
|
|
51371
|
+
* Effectful key/value storage for persistence backends.
|
|
51372
|
+
*
|
|
51373
|
+
* This module defines the `KeyValueStore` service used by the persistence
|
|
51374
|
+
* package when a simple string or binary store is enough. It is useful for
|
|
51375
|
+
* lightweight durable state, browser storage, local file-backed data, SQL
|
|
51376
|
+
* tables, test stores, and as the storage primitive underneath higher-level
|
|
51377
|
+
* persistence APIs.
|
|
51378
|
+
*
|
|
51379
|
+
* Values are stored as strings or `Uint8Array`s, and `toSchemaStore` adds a
|
|
51380
|
+
* schema-aware JSON layer for typed values. Schema changes can make existing
|
|
51381
|
+
* JSON fail to decode, and `prefix` should be used to separate namespaces when
|
|
51382
|
+
* several logical stores share the same backend. This service does not provide
|
|
51383
|
+
* native TTL support; higher-level persistence layers encode expiration
|
|
51384
|
+
* metadata in stored values when they need TTLs.
|
|
51385
|
+
*
|
|
51386
|
+
* Backend behavior is intentionally small but not identical: Web Storage is
|
|
51387
|
+
* string-only, `makeStringOnly` stores binary values as base64, filesystem
|
|
51388
|
+
* keys become encoded file names, SQL stores value type metadata in a table,
|
|
51389
|
+
* and the memory layer is process-local. Choose keys, prefixes, table names,
|
|
51390
|
+
* and value formats with those backend constraints in mind.
|
|
51391
|
+
*
|
|
51392
|
+
* @since 4.0.0
|
|
51393
|
+
*/
|
|
51394
|
+
const TypeId$1 = "~effect/persistence/KeyValueStore";
|
|
51395
|
+
const ErrorTypeId = "~effect/persistence/KeyValueStore/KeyValueStoreError";
|
|
51396
|
+
/**
|
|
51397
|
+
* Error raised by key/value store operations, including the failed method,
|
|
51398
|
+
* optional key, message, and cause.
|
|
51399
|
+
*
|
|
51400
|
+
* @category errors
|
|
51401
|
+
* @since 4.0.0
|
|
51402
|
+
*/
|
|
51403
|
+
var KeyValueStoreError = class extends TaggedError("KeyValueStoreError") {
|
|
51404
|
+
/**
|
|
51405
|
+
* Marks this value as a key-value store error for runtime guards.
|
|
51406
|
+
*
|
|
51407
|
+
* @since 4.0.0
|
|
51408
|
+
*/
|
|
51409
|
+
[ErrorTypeId] = ErrorTypeId;
|
|
51410
|
+
};
|
|
51411
|
+
/**
|
|
51412
|
+
* Service tag for string and binary key/value storage.
|
|
51413
|
+
*
|
|
51414
|
+
* **When to use**
|
|
51415
|
+
*
|
|
51416
|
+
* Use to access or provide the persistence store used for lightweight durable
|
|
51417
|
+
* state.
|
|
51418
|
+
*
|
|
51419
|
+
* @category services
|
|
51420
|
+
* @since 4.0.0
|
|
51421
|
+
*/
|
|
51422
|
+
const KeyValueStore = /*#__PURE__*/ Service("effect/persistence/KeyValueStore");
|
|
51423
|
+
/**
|
|
51424
|
+
* Constructs a `KeyValueStore` from primitive store operations.
|
|
51425
|
+
*
|
|
51426
|
+
* **Details**
|
|
51427
|
+
*
|
|
51428
|
+
* Default implementations are derived for `has`, `isEmpty`, `modify`, and
|
|
51429
|
+
* `modifyUint8Array` unless they are provided in the options.
|
|
51430
|
+
*
|
|
51431
|
+
* @category constructors
|
|
51432
|
+
* @since 4.0.0
|
|
51433
|
+
*/
|
|
51434
|
+
const make$4 = (options) => KeyValueStore.of({
|
|
51435
|
+
[TypeId$1]: TypeId$1,
|
|
51436
|
+
has: (key) => map$4(options.get(key), isNotUndefined),
|
|
51437
|
+
isEmpty: map$4(options.size, (size) => size === 0),
|
|
51438
|
+
modify: (key, f) => flatMap$2(options.get(key), (o) => {
|
|
51439
|
+
if (o === void 0) return undefined_$1;
|
|
51440
|
+
const newValue = f(o);
|
|
51441
|
+
return as(options.set(key, newValue), newValue);
|
|
51442
|
+
}),
|
|
51443
|
+
modifyUint8Array: (key, f) => flatMap$2(options.getUint8Array(key), (o) => {
|
|
51444
|
+
if (o === void 0) return undefined_$1;
|
|
51445
|
+
const newValue = f(o);
|
|
51446
|
+
return as(options.set(key, newValue), newValue);
|
|
51447
|
+
}),
|
|
51448
|
+
...options
|
|
51449
|
+
});
|
|
51450
|
+
/**
|
|
51451
|
+
* Provides a `KeyValueStore` backed by files in the specified directory.
|
|
51452
|
+
*
|
|
51453
|
+
* **Details**
|
|
51454
|
+
*
|
|
51455
|
+
* The directory is created if needed, and each key is encoded as a file name.
|
|
51456
|
+
*
|
|
51457
|
+
* @category layers
|
|
51458
|
+
* @since 4.0.0
|
|
51459
|
+
*/
|
|
51460
|
+
const layerFileSystem = (directory) => effect(KeyValueStore)(gen(function* () {
|
|
51461
|
+
const fs = yield* FileSystem;
|
|
51462
|
+
const path = yield* Path$1;
|
|
51463
|
+
const keyPath = (key) => path.join(directory, encodeURIComponent(key));
|
|
51464
|
+
if (!(yield* fs.exists(directory))) yield* fs.makeDirectory(directory, { recursive: true });
|
|
51465
|
+
return make$4({
|
|
51466
|
+
get: (key) => catchTag(fs.readFileString(keyPath(key)), "PlatformError", (cause) => cause.reason._tag === "NotFound" ? undefined_$1 : fail$3(new KeyValueStoreError({
|
|
51467
|
+
method: "get",
|
|
51468
|
+
key,
|
|
51469
|
+
message: `Unable to get item with key ${key}`,
|
|
51470
|
+
cause
|
|
51471
|
+
}))),
|
|
51472
|
+
getUint8Array: (key) => catchTag(fs.readFile(keyPath(key)), "PlatformError", (cause) => cause.reason._tag === "NotFound" ? undefined_$1 : fail$3(new KeyValueStoreError({
|
|
51473
|
+
method: "getUint8Array",
|
|
51474
|
+
key,
|
|
51475
|
+
message: `Unable to get item with key ${key}`,
|
|
51476
|
+
cause
|
|
51477
|
+
}))),
|
|
51478
|
+
set: (key, value) => mapError$2(typeof value === "string" ? fs.writeFileString(keyPath(key), value) : fs.writeFile(keyPath(key), value), (cause) => new KeyValueStoreError({
|
|
51479
|
+
method: "set",
|
|
51480
|
+
key,
|
|
51481
|
+
message: `Unable to set item with key ${key}`,
|
|
51482
|
+
cause
|
|
51483
|
+
})),
|
|
51484
|
+
remove: (key) => mapError$2(fs.remove(keyPath(key)), (cause) => new KeyValueStoreError({
|
|
51485
|
+
method: "remove",
|
|
51486
|
+
key,
|
|
51487
|
+
message: `Unable to remove item with key ${key}`,
|
|
51488
|
+
cause
|
|
51489
|
+
})),
|
|
51490
|
+
has: (key) => mapError$2(fs.exists(keyPath(key)), (cause) => new KeyValueStoreError({
|
|
51491
|
+
method: "has",
|
|
51492
|
+
key,
|
|
51493
|
+
message: `Unable to check existence of item with key ${key}`,
|
|
51494
|
+
cause
|
|
51495
|
+
})),
|
|
51496
|
+
clear: mapError$2(andThen(fs.remove(directory, { recursive: true }), fs.makeDirectory(directory, { recursive: true })), (cause) => new KeyValueStoreError({
|
|
51497
|
+
method: "clear",
|
|
51498
|
+
message: `Unable to clear storage`,
|
|
51499
|
+
cause
|
|
51500
|
+
})),
|
|
51501
|
+
size: matchEffect(fs.readDirectory(directory), {
|
|
51502
|
+
onSuccess: (files) => succeed$3(files.length),
|
|
51503
|
+
onFailure: (cause) => fail$3(new KeyValueStoreError({
|
|
51504
|
+
method: "size",
|
|
51505
|
+
message: `Unable to get size`,
|
|
51506
|
+
cause
|
|
51507
|
+
}))
|
|
51508
|
+
})
|
|
51509
|
+
});
|
|
51510
|
+
}));
|
|
51511
|
+
const SchemaStoreTypeId = "~effect/persistence/KeyValueStore/SchemaStore";
|
|
51512
|
+
/**
|
|
51513
|
+
* Adapts a `KeyValueStore` into a `SchemaStore` using the schema's JSON codec.
|
|
51514
|
+
*
|
|
51515
|
+
* @category SchemaStore
|
|
51516
|
+
* @since 4.0.0
|
|
51517
|
+
*/
|
|
51518
|
+
const toSchemaStore = (self, schema) => {
|
|
51519
|
+
const jsonSchema = fromJsonString(toCodecJson(schema));
|
|
51520
|
+
const decode = decodeEffect(jsonSchema);
|
|
51521
|
+
const encode = encodeEffect(jsonSchema);
|
|
51522
|
+
const get = (key) => flatMap$2(self.get(key), match({
|
|
51523
|
+
onUndefined: () => succeedNone,
|
|
51524
|
+
onDefined: (value) => asSome(decode(value))
|
|
51525
|
+
}));
|
|
51526
|
+
const set = (key, value) => flatMap$2(encode(value), (json) => self.set(key, json));
|
|
51527
|
+
const modify = (key, f) => flatMap$2(get(key), (o) => {
|
|
51528
|
+
if (isNone(o)) return succeedNone;
|
|
51529
|
+
const newValue = f(o.value);
|
|
51530
|
+
return as(set(key, newValue), some(newValue));
|
|
51531
|
+
});
|
|
51532
|
+
return {
|
|
51533
|
+
[SchemaStoreTypeId]: SchemaStoreTypeId,
|
|
51534
|
+
get,
|
|
51535
|
+
set,
|
|
51536
|
+
modify,
|
|
51537
|
+
remove: self.remove,
|
|
51538
|
+
clear: self.clear,
|
|
51539
|
+
size: self.size,
|
|
51540
|
+
has: self.has,
|
|
51541
|
+
isEmpty: self.isEmpty
|
|
51542
|
+
};
|
|
51543
|
+
};
|
|
51544
|
+
//#endregion
|
|
51286
51545
|
//#region ../../node_modules/.pnpm/effect@4.0.0-beta.74/node_modules/effect/dist/SubscriptionRef.js
|
|
51287
51546
|
/**
|
|
51288
51547
|
* The `SubscriptionRef` module combines a fiber-safe mutable reference with a
|
|
@@ -51445,6 +51704,37 @@ const setUnsafe = (self, value) => {
|
|
|
51445
51704
|
publishUnsafe(self.pubsub, value);
|
|
51446
51705
|
};
|
|
51447
51706
|
/**
|
|
51707
|
+
* Modifies the `SubscriptionRef` atomically with a function that computes a
|
|
51708
|
+
* return value and a new value, notifying subscribers of the change.
|
|
51709
|
+
*
|
|
51710
|
+
* **Example** (Modifying a value)
|
|
51711
|
+
*
|
|
51712
|
+
* ```ts
|
|
51713
|
+
* import { Effect, SubscriptionRef } from "effect"
|
|
51714
|
+
*
|
|
51715
|
+
* const program = Effect.gen(function*() {
|
|
51716
|
+
* const ref = yield* SubscriptionRef.make(10)
|
|
51717
|
+
*
|
|
51718
|
+
* const result = yield* SubscriptionRef.modify(ref, (n) => [
|
|
51719
|
+
* `Old value was ${n}`,
|
|
51720
|
+
* n * 2
|
|
51721
|
+
* ])
|
|
51722
|
+
* console.log(result)
|
|
51723
|
+
*
|
|
51724
|
+
* const newValue = yield* SubscriptionRef.get(ref)
|
|
51725
|
+
* console.log("New value:", newValue)
|
|
51726
|
+
* })
|
|
51727
|
+
* ```
|
|
51728
|
+
*
|
|
51729
|
+
* @category modifications
|
|
51730
|
+
* @since 2.0.0
|
|
51731
|
+
*/
|
|
51732
|
+
const modify = /*#__PURE__*/ dual(2, (self, modify) => self.semaphore.withPermit(sync(() => {
|
|
51733
|
+
const [b, newValue] = modify(self.value);
|
|
51734
|
+
setUnsafe(self, newValue);
|
|
51735
|
+
return b;
|
|
51736
|
+
})));
|
|
51737
|
+
/**
|
|
51448
51738
|
* Sets the value of the `SubscriptionRef`, notifying all subscribers of the
|
|
51449
51739
|
* change.
|
|
51450
51740
|
*
|
|
@@ -51833,9 +52123,16 @@ const GitDiffStatus = Literals([
|
|
|
51833
52123
|
"renamed"
|
|
51834
52124
|
]);
|
|
51835
52125
|
const GitDiffScope = Literals(["staged-to-worktree", "head-to-staged"]);
|
|
52126
|
+
var GitDiffSegment = class extends Class("GitDiffSegment")({
|
|
52127
|
+
filePath: String$1,
|
|
52128
|
+
fingerprint: String$1,
|
|
52129
|
+
id: String$1,
|
|
52130
|
+
type: Literals(["commit", "worktree"])
|
|
52131
|
+
}) {};
|
|
51836
52132
|
var GitDiff = class extends Class("GitDiff")({
|
|
51837
52133
|
filePath: String$1,
|
|
51838
52134
|
patch: String$1,
|
|
52135
|
+
segments: ArraySchema(GitDiffSegment),
|
|
51839
52136
|
status: GitDiffStatus
|
|
51840
52137
|
}) {};
|
|
51841
52138
|
const GitReviewFrom = Union([Struct({
|
|
@@ -51958,7 +52255,22 @@ const AgentSession = Struct({
|
|
|
51958
52255
|
label: String$1,
|
|
51959
52256
|
uuid: String$1
|
|
51960
52257
|
});
|
|
51961
|
-
var
|
|
52258
|
+
var ReviewMark = class extends Class("ReviewMark")({
|
|
52259
|
+
filePath: String$1,
|
|
52260
|
+
fingerprint: String$1,
|
|
52261
|
+
segmentId: String$1
|
|
52262
|
+
}) {};
|
|
52263
|
+
var ReviewComment = class extends Class("ReviewComment")({
|
|
52264
|
+
body: String$1,
|
|
52265
|
+
filePath: String$1,
|
|
52266
|
+
lineNumber: Number$1,
|
|
52267
|
+
side: optional(Literals(["additions", "deletions"]))
|
|
52268
|
+
}) {};
|
|
52269
|
+
var ReviewState = class extends Class("ReviewState")({
|
|
52270
|
+
comments: ArraySchema(ReviewComment),
|
|
52271
|
+
marks: ArraySchema(ReviewMark)
|
|
52272
|
+
}) {};
|
|
52273
|
+
var RpcContracts = class extends make$15(make$18("agents.create", {
|
|
51962
52274
|
error: TerminalError,
|
|
51963
52275
|
payload: Struct({
|
|
51964
52276
|
args: ArraySchema(String$1),
|
|
@@ -51972,25 +52284,25 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
51972
52284
|
label: String$1
|
|
51973
52285
|
}),
|
|
51974
52286
|
success: AgentSession
|
|
51975
|
-
}), make$
|
|
52287
|
+
}), make$18("agents.remove", {
|
|
51976
52288
|
error: TerminalError,
|
|
51977
52289
|
payload: Struct({
|
|
51978
52290
|
cwd: String$1,
|
|
51979
52291
|
uuid: String$1
|
|
51980
52292
|
})
|
|
51981
|
-
}), make$
|
|
52293
|
+
}), make$18("agents.watch", {
|
|
51982
52294
|
error: TerminalError,
|
|
51983
52295
|
payload: Struct({ cwd: String$1 }),
|
|
51984
52296
|
stream: true,
|
|
51985
52297
|
success: ArraySchema(AgentSession)
|
|
51986
|
-
}), make$
|
|
52298
|
+
}), make$18("projects.watch", {
|
|
51987
52299
|
stream: true,
|
|
51988
52300
|
success: ArraySchema(GitProject)
|
|
51989
|
-
}), make$
|
|
52301
|
+
}), make$18("projects.branches", {
|
|
51990
52302
|
error: GitError,
|
|
51991
52303
|
payload: Struct({ cwd: String$1 }),
|
|
51992
52304
|
success: GitBranchesSnapshot
|
|
51993
|
-
}), make$
|
|
52305
|
+
}), make$18("review.watch", {
|
|
51994
52306
|
error: GitError,
|
|
51995
52307
|
payload: Struct({
|
|
51996
52308
|
cwd: String$1,
|
|
@@ -51998,14 +52310,14 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
51998
52310
|
}),
|
|
51999
52311
|
stream: true,
|
|
52000
52312
|
success: ArraySchema(GitDiff)
|
|
52001
|
-
}), make$
|
|
52313
|
+
}), make$18("review.metadata", {
|
|
52002
52314
|
error: GitError,
|
|
52003
52315
|
payload: Struct({
|
|
52004
52316
|
base: optional(String$1),
|
|
52005
52317
|
cwd: String$1
|
|
52006
52318
|
}),
|
|
52007
52319
|
success: GitReviewMetadata
|
|
52008
|
-
}), make$
|
|
52320
|
+
}), make$18("review.watchRange", {
|
|
52009
52321
|
error: GitError,
|
|
52010
52322
|
payload: Struct({
|
|
52011
52323
|
cwd: String$1,
|
|
@@ -52014,38 +52326,76 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
52014
52326
|
}),
|
|
52015
52327
|
stream: true,
|
|
52016
52328
|
success: ArraySchema(GitDiff)
|
|
52017
|
-
}), make$
|
|
52329
|
+
}), make$18("review.state.watch", {
|
|
52330
|
+
error: GitError,
|
|
52331
|
+
payload: Struct({
|
|
52332
|
+
base: String$1,
|
|
52333
|
+
cwd: String$1
|
|
52334
|
+
}),
|
|
52335
|
+
stream: true,
|
|
52336
|
+
success: ReviewState
|
|
52337
|
+
}), make$18("review.state.mark", {
|
|
52338
|
+
error: GitError,
|
|
52339
|
+
payload: Struct({
|
|
52340
|
+
base: String$1,
|
|
52341
|
+
cwd: String$1,
|
|
52342
|
+
marks: ArraySchema(ReviewMark)
|
|
52343
|
+
})
|
|
52344
|
+
}), make$18("review.state.unmark", {
|
|
52345
|
+
error: GitError,
|
|
52346
|
+
payload: Struct({
|
|
52347
|
+
base: String$1,
|
|
52348
|
+
cwd: String$1,
|
|
52349
|
+
marks: ArraySchema(ReviewMark)
|
|
52350
|
+
})
|
|
52351
|
+
}), make$18("review.comments.save", {
|
|
52352
|
+
error: GitError,
|
|
52353
|
+
payload: Struct({
|
|
52354
|
+
base: String$1,
|
|
52355
|
+
comment: ReviewComment,
|
|
52356
|
+
cwd: String$1
|
|
52357
|
+
})
|
|
52358
|
+
}), make$18("review.comments.delete", {
|
|
52359
|
+
error: GitError,
|
|
52360
|
+
payload: Struct({
|
|
52361
|
+
base: String$1,
|
|
52362
|
+
cwd: String$1,
|
|
52363
|
+
filePath: String$1,
|
|
52364
|
+
lineNumber: Number$1,
|
|
52365
|
+
side: optional(Literals(["additions", "deletions"]))
|
|
52366
|
+
})
|
|
52367
|
+
}), make$18("review.createWipCommit", {
|
|
52018
52368
|
error: GitError,
|
|
52019
52369
|
payload: Struct({
|
|
52020
52370
|
cwd: String$1,
|
|
52021
52371
|
message: String$1
|
|
52022
52372
|
})
|
|
52023
|
-
}), make$
|
|
52373
|
+
}), make$18("review.commitAndPush", {
|
|
52024
52374
|
error: GitError,
|
|
52025
52375
|
payload: Struct({
|
|
52026
52376
|
base: String$1,
|
|
52027
52377
|
cwd: String$1,
|
|
52028
52378
|
message: String$1
|
|
52029
52379
|
})
|
|
52030
|
-
}), make$
|
|
52380
|
+
}), make$18("review.stageFile", {
|
|
52031
52381
|
error: GitError,
|
|
52032
52382
|
payload: Struct({
|
|
52033
52383
|
cwd: String$1,
|
|
52034
52384
|
filePath: String$1
|
|
52035
52385
|
})
|
|
52036
|
-
}), make$
|
|
52386
|
+
}), make$18("review.unstageFile", {
|
|
52037
52387
|
error: GitError,
|
|
52038
52388
|
payload: Struct({
|
|
52039
52389
|
cwd: String$1,
|
|
52040
52390
|
filePath: String$1
|
|
52041
52391
|
})
|
|
52042
|
-
}), make$
|
|
52392
|
+
}), make$18("review.discardFile", {
|
|
52043
52393
|
error: GitError,
|
|
52044
52394
|
payload: Struct({
|
|
52045
52395
|
cwd: String$1,
|
|
52046
52396
|
filePath: String$1
|
|
52047
52397
|
})
|
|
52048
|
-
}), make$
|
|
52398
|
+
}), make$18("projects.createWorktree", {
|
|
52049
52399
|
error: GitError,
|
|
52050
52400
|
payload: Struct({
|
|
52051
52401
|
baseBranch: String$1,
|
|
@@ -52058,13 +52408,13 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
52058
52408
|
])
|
|
52059
52409
|
}),
|
|
52060
52410
|
success: String$1
|
|
52061
|
-
}), make$
|
|
52411
|
+
}), make$18("projects.deleteWorktree", {
|
|
52062
52412
|
error: GitError,
|
|
52063
52413
|
payload: Struct({
|
|
52064
52414
|
cwd: String$1,
|
|
52065
52415
|
force: Boolean$1
|
|
52066
52416
|
})
|
|
52067
|
-
}), make$
|
|
52417
|
+
}), make$18("runs.scripts", {
|
|
52068
52418
|
error: TerminalError,
|
|
52069
52419
|
payload: Struct({ cwd: String$1 }),
|
|
52070
52420
|
success: ArraySchema(Struct({
|
|
@@ -52072,7 +52422,7 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
52072
52422
|
name: String$1,
|
|
52073
52423
|
tasks: ArraySchema(String$1)
|
|
52074
52424
|
}))
|
|
52075
|
-
}), make$
|
|
52425
|
+
}), make$18("terminal.write", {
|
|
52076
52426
|
error: TerminalError,
|
|
52077
52427
|
payload: Struct({
|
|
52078
52428
|
args: optional(ArraySchema(String$1)),
|
|
@@ -52082,7 +52432,7 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
52082
52432
|
sessionId: optional(String$1)
|
|
52083
52433
|
}),
|
|
52084
52434
|
success: TerminalState
|
|
52085
|
-
}), make$
|
|
52435
|
+
}), make$18("terminal.resize", {
|
|
52086
52436
|
error: TerminalError,
|
|
52087
52437
|
payload: Struct({
|
|
52088
52438
|
args: optional(ArraySchema(String$1)),
|
|
@@ -52093,20 +52443,20 @@ var RpcContracts = class extends make$14(make$17("agents.create", {
|
|
|
52093
52443
|
sessionId: optional(String$1)
|
|
52094
52444
|
}),
|
|
52095
52445
|
success: TerminalState
|
|
52096
|
-
}), make$
|
|
52446
|
+
}), make$18("terminal.restart", {
|
|
52097
52447
|
error: TerminalError,
|
|
52098
52448
|
payload: TerminalPayload,
|
|
52099
52449
|
success: TerminalState
|
|
52100
|
-
}), make$
|
|
52450
|
+
}), make$18("terminal.stop", {
|
|
52101
52451
|
error: TerminalError,
|
|
52102
52452
|
payload: TerminalPayload,
|
|
52103
52453
|
success: TerminalState
|
|
52104
|
-
}), make$
|
|
52454
|
+
}), make$18("terminal.ports", {
|
|
52105
52455
|
error: TerminalError,
|
|
52106
52456
|
payload: TerminalPayload,
|
|
52107
52457
|
stream: true,
|
|
52108
52458
|
success: ArraySchema(Number$1)
|
|
52109
|
-
}), make$
|
|
52459
|
+
}), make$18("terminal.watch", {
|
|
52110
52460
|
error: TerminalError,
|
|
52111
52461
|
payload: TerminalPayload,
|
|
52112
52462
|
stream: true,
|
|
@@ -52118,10 +52468,10 @@ const makeGitExecutor = gen(function* () {
|
|
|
52118
52468
|
const execString = yield* ChildProcessSpawner.useSync((spawner) => spawner.string);
|
|
52119
52469
|
return {
|
|
52120
52470
|
lines: fnUntraced(function* (cwd, args) {
|
|
52121
|
-
return yield* pipe((yield* ChildProcessSpawner.useSync((spawner) => spawner.lines))(make$
|
|
52471
|
+
return yield* pipe((yield* ChildProcessSpawner.useSync((spawner) => spawner.lines))(make$40("git", args, { cwd })), mapError$2((cause) => new GitError({ cause })));
|
|
52122
52472
|
}),
|
|
52123
52473
|
string: fnUntraced(function* (cwd, args) {
|
|
52124
|
-
return yield* pipe(execString(make$
|
|
52474
|
+
return yield* pipe(execString(make$40("git", args, { cwd })), mapError$2((cause) => new GitError({ cause })));
|
|
52125
52475
|
})
|
|
52126
52476
|
};
|
|
52127
52477
|
});
|
|
@@ -52168,7 +52518,7 @@ var GitWorkspace = class extends Service()("@deslop/git/service/GitWorkspace", {
|
|
|
52168
52518
|
});
|
|
52169
52519
|
});
|
|
52170
52520
|
const collectRepositoriesFromRoots = fnUntraced(function* (roots, repositories) {
|
|
52171
|
-
return yield* match$
|
|
52521
|
+
return yield* match$3(roots, {
|
|
52172
52522
|
onEmpty: () => succeed$3(repositories),
|
|
52173
52523
|
onNonEmpty: (roots) => pipe(fs.readDirectory(roots[0]), orElseSucceed(() => empty$13()), flatMap$2((entries) => {
|
|
52174
52524
|
if (contains(entries, ".git")) return pipe(git.string(roots[0], [
|
|
@@ -52275,14 +52625,14 @@ var GitWorkspace = class extends Service()("@deslop/git/service/GitWorkspace", {
|
|
|
52275
52625
|
clone: fnUntraced(function* (input) {
|
|
52276
52626
|
const targetDirectory = path.isAbsolute(input.directory) ? input.directory : path.join(input.cwd, input.directory);
|
|
52277
52627
|
yield* pipe(fs.makeDirectory(targetDirectory, { recursive: true }), ignore$1);
|
|
52278
|
-
yield* pipe(execString(make$
|
|
52628
|
+
yield* pipe(execString(make$40("git", [
|
|
52279
52629
|
"clone",
|
|
52280
52630
|
"--depth",
|
|
52281
52631
|
"1",
|
|
52282
52632
|
"--single-branch",
|
|
52283
52633
|
input.url,
|
|
52284
52634
|
targetDirectory
|
|
52285
|
-
], { cwd: input.cwd })), asVoid, catch_$2(() => pipe(execString(make$
|
|
52635
|
+
], { cwd: input.cwd })), asVoid, catch_$2(() => pipe(execString(make$40("git", [
|
|
52286
52636
|
"-C",
|
|
52287
52637
|
targetDirectory,
|
|
52288
52638
|
"pull",
|
|
@@ -52404,15 +52754,46 @@ var GitWorktree = class extends Service()("@deslop/git/service/GitWorktree", { m
|
|
|
52404
52754
|
function toArgs(to) {
|
|
52405
52755
|
return to.type === "ref" ? [to.ref] : empty$13();
|
|
52406
52756
|
}
|
|
52407
|
-
function
|
|
52408
|
-
|
|
52409
|
-
|
|
52410
|
-
|
|
52411
|
-
|
|
52757
|
+
function segmentsByFile(segments) {
|
|
52758
|
+
return reduce(segments, empty$6(), (groups, segment) => modifyAt(groups, segment.filePath, (current) => some(append$1(getOrElse$1(current, () => empty$13()), segment))));
|
|
52759
|
+
}
|
|
52760
|
+
function diffFromPatchChunk(chunk, segments) {
|
|
52761
|
+
const deleted = /^deleted file mode /mu.test(chunk);
|
|
52762
|
+
const filePath = (deleted ? chunk.match(/^--- a\/(.+)$/mu)?.[1] : void 0) ?? chunk.match(/^\+\+\+ b\/(.+)$/mu)?.[1] ?? chunk.match(/^--- a\/(.+)$/mu)?.[1] ?? chunk.match(/^diff --git a\/.+ b\/(.+)$/mu)?.[1] ?? "";
|
|
52763
|
+
const status = /^new file mode /mu.test(chunk) ? "added" : deleted ? "deleted" : /^rename (from|to) /mu.test(chunk) ? "renamed" : "modified";
|
|
52764
|
+
return new GitDiff({
|
|
52765
|
+
filePath,
|
|
52766
|
+
patch: chunk,
|
|
52767
|
+
segments: getOrElse$1(get$1(segments, filePath), () => empty$13()),
|
|
52768
|
+
status
|
|
52769
|
+
});
|
|
52412
52770
|
}
|
|
52413
|
-
function
|
|
52414
|
-
|
|
52771
|
+
function diffsFromPatch(patch, segments) {
|
|
52772
|
+
const groupedSegments = segmentsByFile(segments);
|
|
52773
|
+
return pipe(patch.split(/(?=^diff --git )/mu), filter$2(isNonEmpty$1), map$7((chunk) => diffFromPatchChunk(chunk, groupedSegments)));
|
|
52774
|
+
}
|
|
52775
|
+
function attachSegments(diffs, segments) {
|
|
52776
|
+
const groupedSegments = segmentsByFile(segments);
|
|
52777
|
+
return map$7(diffs, (diff) => new GitDiff({
|
|
52778
|
+
filePath: diff.filePath,
|
|
52779
|
+
patch: diff.patch,
|
|
52780
|
+
segments: getOrElse$1(get$1(groupedSegments, diff.filePath), () => empty$13()),
|
|
52781
|
+
status: diff.status
|
|
52782
|
+
}));
|
|
52415
52783
|
}
|
|
52784
|
+
const gitDiffs = fnUntraced(function* (input) {
|
|
52785
|
+
return diffsFromPatch(yield* git.string(config.cwd, [
|
|
52786
|
+
"diff",
|
|
52787
|
+
...input.args,
|
|
52788
|
+
"--ignore-all-space",
|
|
52789
|
+
"--ignore-blank-lines",
|
|
52790
|
+
"--ignore-cr-at-eol",
|
|
52791
|
+
"--patch",
|
|
52792
|
+
"--find-renames",
|
|
52793
|
+
"-U999999",
|
|
52794
|
+
"--no-ext-diff"
|
|
52795
|
+
]), input.segments);
|
|
52796
|
+
});
|
|
52416
52797
|
const untrackedDiffs = gen(function* () {
|
|
52417
52798
|
return yield* forEach$1(yield* git.lines(config.cwd, [
|
|
52418
52799
|
"ls-files",
|
|
@@ -52421,70 +52802,88 @@ var GitWorktree = class extends Service()("@deslop/git/service/GitWorktree", { m
|
|
|
52421
52802
|
]), (filePath) => pipe(fs.readFileString(path.join(config.cwd, filePath)), orElseSucceed(() => ""), map$4((content) => new GitDiff({
|
|
52422
52803
|
filePath,
|
|
52423
52804
|
patch: `diff --git a/${filePath} b/${filePath}\nnew file mode 100644\n--- /dev/null\n+++ b/${filePath}\n@@ -0,0 +1,${length(split$1("\n")(content))} @@\n${pipe(split$1("\n")(content), map$7((line) => `+${line}`), join$3("\n"))}`,
|
|
52805
|
+
segments: [new GitDiffSegment({
|
|
52806
|
+
filePath,
|
|
52807
|
+
fingerprint: content,
|
|
52808
|
+
id: "HEAD->worktree",
|
|
52809
|
+
type: "worktree"
|
|
52810
|
+
})],
|
|
52424
52811
|
status: "added"
|
|
52425
52812
|
}))), { concurrency: "unbounded" });
|
|
52426
52813
|
});
|
|
52427
52814
|
const reviewDiffs = fnUntraced(function* (scope) {
|
|
52428
|
-
const
|
|
52429
|
-
"
|
|
52430
|
-
|
|
52431
|
-
|
|
52432
|
-
"--ignore-blank-lines",
|
|
52433
|
-
"--ignore-cr-at-eol",
|
|
52434
|
-
"--name-status"
|
|
52435
|
-
] : [
|
|
52436
|
-
"diff",
|
|
52437
|
-
"--ignore-all-space",
|
|
52438
|
-
"--ignore-blank-lines",
|
|
52439
|
-
"--ignore-cr-at-eol",
|
|
52440
|
-
"--name-status"
|
|
52441
|
-
];
|
|
52442
|
-
const diffs = yield* pipe(git.lines(config.cwd, args), flatMap$2(forEach$1((line) => pipe(git.string(config.cwd, appendAll(dropRight(args, 1), [
|
|
52443
|
-
"--patch",
|
|
52444
|
-
"--find-renames",
|
|
52445
|
-
"-U999999",
|
|
52446
|
-
"--no-ext-diff",
|
|
52447
|
-
"--",
|
|
52448
|
-
filePathFromNameStatus(line)
|
|
52449
|
-
])), map$4((patch) => new GitDiff({
|
|
52450
|
-
filePath: filePathFromNameStatus(line),
|
|
52451
|
-
patch,
|
|
52452
|
-
status: statusFromNameStatus(line)
|
|
52453
|
-
}))), { concurrency: "unbounded" })));
|
|
52815
|
+
const diffs = yield* gitDiffs({
|
|
52816
|
+
args: scope === "head-to-staged" ? ["--cached"] : empty$13(),
|
|
52817
|
+
segments: empty$13()
|
|
52818
|
+
});
|
|
52454
52819
|
if (scope === "head-to-staged") return diffs;
|
|
52455
52820
|
return yield* pipe(untrackedDiffs, map$4(appendAll(diffs)));
|
|
52456
52821
|
});
|
|
52822
|
+
const commitSegmentDiffs = fnUntraced(function* (input) {
|
|
52823
|
+
return pipe((yield* git.string(config.cwd, [
|
|
52824
|
+
"log",
|
|
52825
|
+
"--reverse",
|
|
52826
|
+
"--format=%x00DESLOP-COMMIT%x00%H%x00%P",
|
|
52827
|
+
"--find-renames",
|
|
52828
|
+
"--name-only",
|
|
52829
|
+
`${input.from}..${input.to}`
|
|
52830
|
+
])).split("\0DESLOP-COMMIT\0"), filter$2(isNonEmpty$1), flatMap$5((entry) => {
|
|
52831
|
+
const lines = split$1("\n")(entry);
|
|
52832
|
+
const header = lines[0] ?? "";
|
|
52833
|
+
const parts = split$1("\0")(header);
|
|
52834
|
+
const commit = parts[0] ?? "";
|
|
52835
|
+
const id = `${pipe(parts[1] ?? "", split$1(" "), filter$2(isNonEmpty$1))[0] ?? `${commit}^`}->${commit}`;
|
|
52836
|
+
return pipe(drop$1(lines, 1), filter$2(isNonEmpty$1), map$7((filePath) => new GitDiffSegment({
|
|
52837
|
+
filePath,
|
|
52838
|
+
fingerprint: `${id}:${filePath}`,
|
|
52839
|
+
id,
|
|
52840
|
+
type: "commit"
|
|
52841
|
+
})));
|
|
52842
|
+
}));
|
|
52843
|
+
});
|
|
52457
52844
|
const reviewRangeDiffs = fnUntraced(function* (input) {
|
|
52458
52845
|
const from = yield* resolveFrom(input.from);
|
|
52459
|
-
const
|
|
52460
|
-
|
|
52461
|
-
|
|
52462
|
-
|
|
52463
|
-
|
|
52464
|
-
|
|
52465
|
-
|
|
52466
|
-
|
|
52467
|
-
|
|
52468
|
-
|
|
52469
|
-
|
|
52470
|
-
|
|
52471
|
-
|
|
52472
|
-
|
|
52473
|
-
|
|
52474
|
-
|
|
52475
|
-
|
|
52476
|
-
|
|
52477
|
-
|
|
52478
|
-
|
|
52479
|
-
|
|
52480
|
-
|
|
52481
|
-
|
|
52482
|
-
|
|
52483
|
-
|
|
52484
|
-
|
|
52485
|
-
|
|
52486
|
-
|
|
52487
|
-
|
|
52846
|
+
const to = input.to.type === "ref" ? input.to.ref : "HEAD";
|
|
52847
|
+
if (from === "HEAD" && input.to.type === "worktree") return yield* pipe(untrackedDiffs, map$4(appendAll(pipe(yield* gitDiffs({
|
|
52848
|
+
args: ["HEAD"],
|
|
52849
|
+
segments: empty$13()
|
|
52850
|
+
}), map$7((diff) => {
|
|
52851
|
+
const segment = new GitDiffSegment({
|
|
52852
|
+
filePath: diff.filePath,
|
|
52853
|
+
fingerprint: diff.patch,
|
|
52854
|
+
id: "HEAD->worktree",
|
|
52855
|
+
type: "worktree"
|
|
52856
|
+
});
|
|
52857
|
+
return new GitDiff({
|
|
52858
|
+
filePath: diff.filePath,
|
|
52859
|
+
patch: diff.patch,
|
|
52860
|
+
segments: [segment],
|
|
52861
|
+
status: diff.status
|
|
52862
|
+
});
|
|
52863
|
+
})))));
|
|
52864
|
+
const [commitSegments, trackedWorktreeDiffs, untracked, diffs] = yield* all([
|
|
52865
|
+
commitSegmentDiffs({
|
|
52866
|
+
from,
|
|
52867
|
+
to
|
|
52868
|
+
}),
|
|
52869
|
+
input.to.type === "worktree" ? gitDiffs({
|
|
52870
|
+
args: ["HEAD"],
|
|
52871
|
+
segments: empty$13()
|
|
52872
|
+
}) : succeed$3(empty$13()),
|
|
52873
|
+
input.to.type === "worktree" ? untrackedDiffs : succeed$3(empty$13()),
|
|
52874
|
+
gitDiffs({
|
|
52875
|
+
args: [from, ...toArgs(input.to)],
|
|
52876
|
+
segments: empty$13()
|
|
52877
|
+
})
|
|
52878
|
+
], { concurrency: "unbounded" });
|
|
52879
|
+
const diffsWithSegments = attachSegments(diffs, appendAll(commitSegments, pipe(trackedWorktreeDiffs, map$7((diff) => new GitDiffSegment({
|
|
52880
|
+
filePath: diff.filePath,
|
|
52881
|
+
fingerprint: diff.patch,
|
|
52882
|
+
id: "HEAD->worktree",
|
|
52883
|
+
type: "worktree"
|
|
52884
|
+
})), appendAll(flatMap$5(untracked, (diff) => diff.segments)))));
|
|
52885
|
+
if (input.to.type === "ref") return diffsWithSegments;
|
|
52886
|
+
return appendAll(diffsWithSegments, untracked);
|
|
52488
52887
|
});
|
|
52489
52888
|
const suggestBase = gen(function* () {
|
|
52490
52889
|
return yield* pipe([
|
|
@@ -52526,6 +52925,7 @@ var GitWorktree = class extends Service()("@deslop/git/service/GitWorktree", { m
|
|
|
52526
52925
|
});
|
|
52527
52926
|
})));
|
|
52528
52927
|
});
|
|
52928
|
+
const worktreeChanges = pipe(make$43(void 0), merge$1(pipe(fs.watch(config.cwd), catch_(() => empty$8), map$2(() => void 0))), debounce(millis(50)));
|
|
52529
52929
|
return {
|
|
52530
52930
|
commitAndPush: fnUntraced(function* (input) {
|
|
52531
52931
|
if (yield* hasWorktreeChanges) return yield* fail$3(new GitError({ message: "Create a WIP commit before squashing." }));
|
|
@@ -52610,8 +53010,8 @@ var GitWorktree = class extends Service()("@deslop/git/service/GitWorktree", { m
|
|
|
52610
53010
|
filePath
|
|
52611
53011
|
]), asVoid);
|
|
52612
53012
|
}),
|
|
52613
|
-
watchReviewDiffs: (scope) => pipe(
|
|
52614
|
-
watchReviewRangeDiffs: (input) => pipe(
|
|
53013
|
+
watchReviewDiffs: (scope) => pipe(worktreeChanges, mapEffect(() => pipe(reviewDiffs(scope), catchTag("GitError", () => succeed$3(empty$13())))), changesWith((left, right) => length(left) === length(right) && every(left, (leftDiff, index) => right[index] !== void 0 && leftDiff.filePath === right[index].filePath && leftDiff.status === right[index].status && leftDiff.patch === right[index].patch))),
|
|
53014
|
+
watchReviewRangeDiffs: (input) => pipe(worktreeChanges, mapEffect(() => pipe(reviewRangeDiffs(input), catchTag("GitError", () => succeed$3(empty$13())))), changesWith((left, right) => length(left) === length(right) && every(left, (leftDiff, index) => right[index] !== void 0 && leftDiff.filePath === right[index].filePath && leftDiff.status === right[index].status && leftDiff.patch === right[index].patch)))
|
|
52615
53015
|
};
|
|
52616
53016
|
}) }) {
|
|
52617
53017
|
static layer = flow(this.make, effect(this));
|
|
@@ -52623,7 +53023,7 @@ function parseProcessParents(output) {
|
|
|
52623
53023
|
const columns = split$1(/\s+/)(trim(line));
|
|
52624
53024
|
const pid = Number(columns[0]);
|
|
52625
53025
|
const ppid = Number(columns[1]);
|
|
52626
|
-
return Number.isFinite(pid) && Number.isFinite(ppid) ? succeed$7(make$
|
|
53026
|
+
return Number.isFinite(pid) && Number.isFinite(ppid) ? succeed$7(make$63(pid, ppid)) : failVoid;
|
|
52627
53027
|
})));
|
|
52628
53028
|
}
|
|
52629
53029
|
function parseListeningPorts(output) {
|
|
@@ -52653,7 +53053,7 @@ function descendantsOf(ancestorPid, parents) {
|
|
|
52653
53053
|
return pipe(fromIterable$2(parents.keys()), filter$2((pid) => pid !== ancestorPid && isDescendant(pid, ancestorPid, parents)));
|
|
52654
53054
|
}
|
|
52655
53055
|
const commandString = fnUntraced(function* (command, args, message) {
|
|
52656
|
-
return yield* pipe((yield* ChildProcessSpawner.useSync((spawner) => spawner.string))(make$
|
|
53056
|
+
return yield* pipe((yield* ChildProcessSpawner.useSync((spawner) => spawner.string))(make$40(command, args)), mapError$2((cause) => new TerminalError({
|
|
52657
53057
|
cause,
|
|
52658
53058
|
message
|
|
52659
53059
|
})));
|
|
@@ -52729,13 +53129,13 @@ function completeSignalData(input) {
|
|
|
52729
53129
|
var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { make: fnUntraced(function* (config) {
|
|
52730
53130
|
const dataQueue = yield* unbounded();
|
|
52731
53131
|
const events = yield* bounded$1({ capacity: 256 });
|
|
52732
|
-
const lifecycleLock = yield* make$
|
|
52733
|
-
const screenLock = yield* make$
|
|
52734
|
-
const sequenceRef = yield* make$
|
|
52735
|
-
const signalBuffer = yield* make$
|
|
52736
|
-
const portOwners = yield* make$
|
|
52737
|
-
const processRef = yield* make$
|
|
52738
|
-
const sizeRef = yield* make$
|
|
53132
|
+
const lifecycleLock = yield* make$47(1);
|
|
53133
|
+
const screenLock = yield* make$47(1);
|
|
53134
|
+
const sequenceRef = yield* make$38(0);
|
|
53135
|
+
const signalBuffer = yield* make$38("");
|
|
53136
|
+
const portOwners = yield* make$38(/* @__PURE__ */ new Map());
|
|
53137
|
+
const processRef = yield* make$38(void 0);
|
|
53138
|
+
const sizeRef = yield* make$38({
|
|
52739
53139
|
cols: 120,
|
|
52740
53140
|
rows: 32
|
|
52741
53141
|
});
|
|
@@ -52766,7 +53166,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52766
53166
|
const requestSnapshot = withPermit(screenLock, gen(function* () {
|
|
52767
53167
|
return {
|
|
52768
53168
|
data: serialize.serialize({ scrollback: 1e4 }),
|
|
52769
|
-
sequence: yield* get$
|
|
53169
|
+
sequence: yield* get$3(sequenceRef)
|
|
52770
53170
|
};
|
|
52771
53171
|
}));
|
|
52772
53172
|
function setState(state) {
|
|
@@ -52814,12 +53214,12 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52814
53214
|
for (const match of data.matchAll(/\x1b\]9;4;([^\x07\x1b]*)(?:\x07|\x1b\\)/gu)) runFork(setActiveState(match[1] === "0" ? "idle" : "running"));
|
|
52815
53215
|
}
|
|
52816
53216
|
const readBufferedSignals = fnUntraced(function* (data) {
|
|
52817
|
-
const next = completeSignalData(`${yield* get$
|
|
53217
|
+
const next = completeSignalData(`${yield* get$3(signalBuffer)}${data}`);
|
|
52818
53218
|
yield* set$4(signalBuffer, next.pending);
|
|
52819
53219
|
readSignals(next.complete);
|
|
52820
53220
|
});
|
|
52821
53221
|
const interruptProcessTree = fnUntraced(function* (subprocess, signal) {
|
|
52822
|
-
const descendants = yield* pipe(all([readProcessParents, get$
|
|
53222
|
+
const descendants = yield* pipe(all([readProcessParents, get$3(portOwners)]), map$4(([parents, owners]) => dedupe([...descendantsOf(subprocess.pid, parents), ...fromIterable$2(owners.values())])), timeoutOption("250 millis"), map$4((option) => getOrElse$1(option, empty$13)), catch_$2(() => succeed$3(empty$13())));
|
|
52823
53223
|
yield* sync(() => {
|
|
52824
53224
|
try {
|
|
52825
53225
|
if (nodeProcess.platform !== "win32") nodeProcess.kill(-subprocess.pid, signal);
|
|
@@ -52853,7 +53253,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52853
53253
|
yield* setPorts([]);
|
|
52854
53254
|
});
|
|
52855
53255
|
const stopProcess = fnUntraced(function* (state) {
|
|
52856
|
-
const handle = yield* get$
|
|
53256
|
+
const handle = yield* get$3(processRef);
|
|
52857
53257
|
if (!handle) {
|
|
52858
53258
|
if (state) yield* setState(state);
|
|
52859
53259
|
return;
|
|
@@ -52871,7 +53271,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52871
53271
|
screen.reset();
|
|
52872
53272
|
}), andThen(publish$1({ type: "reset" }))));
|
|
52873
53273
|
yield* startRun;
|
|
52874
|
-
const size = yield* get$
|
|
53274
|
+
const size = yield* get$3(sizeRef);
|
|
52875
53275
|
const subprocess = yield* try_({
|
|
52876
53276
|
catch: (cause) => new TerminalError({
|
|
52877
53277
|
cause,
|
|
@@ -52894,7 +53294,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52894
53294
|
}),
|
|
52895
53295
|
exit: subprocess.onExit((event) => {
|
|
52896
53296
|
runFork(withPermit(lifecycleLock, gen(function* () {
|
|
52897
|
-
if ((yield* get$
|
|
53297
|
+
if ((yield* get$3(processRef)) !== handle) return;
|
|
52898
53298
|
yield* clearProcess(handle);
|
|
52899
53299
|
if (autostart) {
|
|
52900
53300
|
yield* pipe(sleep("1 second"), andThen(spawnProcess()), catch_$2(() => setState("failed")));
|
|
@@ -52925,7 +53325,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52925
53325
|
}));
|
|
52926
53326
|
if (autostart) yield* pipe(startProcess(), withPermit(lifecycleLock), catch_$2(() => setState("failed")));
|
|
52927
53327
|
yield* pipe(gen(function* () {
|
|
52928
|
-
const process = yield* get$
|
|
53328
|
+
const process = yield* get$3(processRef);
|
|
52929
53329
|
if (!process?.process.pid) {
|
|
52930
53330
|
yield* set$4(portOwners, /* @__PURE__ */ new Map());
|
|
52931
53331
|
yield* setPorts([]);
|
|
@@ -52941,13 +53341,13 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52941
53341
|
yield* setPorts(nextPorts);
|
|
52942
53342
|
}), ignore$1, repeat(spaced("1 second")), forkScoped);
|
|
52943
53343
|
const resize = fnUntraced(function* (nextSize) {
|
|
52944
|
-
const size = yield* get$
|
|
53344
|
+
const size = yield* get$3(sizeRef);
|
|
52945
53345
|
if (size.cols === nextSize.cols && size.rows === nextSize.rows) return;
|
|
52946
53346
|
yield* set$4(sizeRef, nextSize);
|
|
52947
53347
|
yield* withPermit(screenLock, sync(() => {
|
|
52948
53348
|
screen.resize(nextSize.cols, nextSize.rows);
|
|
52949
53349
|
}));
|
|
52950
|
-
const process = yield* get$
|
|
53350
|
+
const process = yield* get$3(processRef);
|
|
52951
53351
|
if (!process) return;
|
|
52952
53352
|
yield* try_({
|
|
52953
53353
|
catch: (cause) => new TerminalError({
|
|
@@ -52960,7 +53360,7 @@ var Terminal = class extends Service()("@deslop/terminal/service/Terminal", { ma
|
|
|
52960
53360
|
});
|
|
52961
53361
|
});
|
|
52962
53362
|
const write = fnUntraced(function* (data) {
|
|
52963
|
-
const process = yield* get$
|
|
53363
|
+
const process = yield* get$3(processRef);
|
|
52964
53364
|
if (!process) return;
|
|
52965
53365
|
yield* try_({
|
|
52966
53366
|
catch: (cause) => new TerminalError({
|
|
@@ -53058,7 +53458,7 @@ function splitParallelCommands(script) {
|
|
|
53058
53458
|
...state,
|
|
53059
53459
|
current: state.current + char
|
|
53060
53460
|
};
|
|
53061
|
-
return pipe(liftPredicate(trim(state.current), isNonEmpty$1), match$
|
|
53461
|
+
return pipe(liftPredicate(trim(state.current), isNonEmpty$1), match$5({
|
|
53062
53462
|
onNone: () => ({
|
|
53063
53463
|
...state,
|
|
53064
53464
|
current: ""
|
|
@@ -53070,7 +53470,7 @@ function splitParallelCommands(script) {
|
|
|
53070
53470
|
})
|
|
53071
53471
|
}));
|
|
53072
53472
|
}));
|
|
53073
|
-
return pipe(liftPredicate(trim(state.current), isNonEmpty$1), match$
|
|
53473
|
+
return pipe(liftPredicate(trim(state.current), isNonEmpty$1), match$5({
|
|
53074
53474
|
onNone: () => state.commands,
|
|
53075
53475
|
onSome: (command) => [...state.commands, command]
|
|
53076
53476
|
}));
|
|
@@ -53087,22 +53487,59 @@ const AgentSessionKey = Struct({
|
|
|
53087
53487
|
cwd: String$1,
|
|
53088
53488
|
uuid: String$1
|
|
53089
53489
|
});
|
|
53090
|
-
const TerminalSessions = make$
|
|
53490
|
+
const TerminalSessions = make$46({
|
|
53091
53491
|
idleTimeToLive: infinity,
|
|
53092
53492
|
lookup: fnUntraced(function* (config) {
|
|
53093
|
-
return get$
|
|
53493
|
+
return get$9(yield* buildWithScope(Terminal.layer(config), yield* scope), Terminal);
|
|
53094
53494
|
})
|
|
53095
53495
|
});
|
|
53096
|
-
const GitWorktreeSessions = make$
|
|
53496
|
+
const GitWorktreeSessions = make$46({
|
|
53097
53497
|
idleTimeToLive: minutes(5),
|
|
53098
53498
|
lookup: fnUntraced(function* (cwd) {
|
|
53099
|
-
return get$
|
|
53499
|
+
return get$9(yield* buildWithScope(GitWorktree.layer({ cwd }), yield* scope), GitWorktree);
|
|
53100
53500
|
})
|
|
53101
53501
|
});
|
|
53102
53502
|
const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
53103
53503
|
const git = yield* GitWorkspace;
|
|
53104
53504
|
const terminals = yield* TerminalSessions;
|
|
53105
53505
|
const gitWorktrees = yield* GitWorktreeSessions;
|
|
53506
|
+
const fs = yield* FileSystem;
|
|
53507
|
+
const reviewStore = toSchemaStore(yield* KeyValueStore, ReviewState);
|
|
53508
|
+
const reviewStateKey = fnUntraced(function* (input) {
|
|
53509
|
+
const root = yield* pipe(fs.realPath(input.cwd), orElseSucceed(() => input.cwd));
|
|
53510
|
+
return Buffer.from(`${root}\u0000${input.base}`, "utf8").toString("base64url");
|
|
53511
|
+
});
|
|
53512
|
+
const readReviewState = fnUntraced(function* (key) {
|
|
53513
|
+
return yield* pipe(reviewStore.get(`review-state/${key}`), map$4(getOrElse$1(() => new ReviewState({
|
|
53514
|
+
comments: empty$13(),
|
|
53515
|
+
marks: empty$13()
|
|
53516
|
+
}))), orElseSucceed(() => new ReviewState({
|
|
53517
|
+
comments: empty$13(),
|
|
53518
|
+
marks: empty$13()
|
|
53519
|
+
})));
|
|
53520
|
+
});
|
|
53521
|
+
const reviewStates = yield* make$46({
|
|
53522
|
+
idleTimeToLive: minutes(5),
|
|
53523
|
+
lookup: fnUntraced(function* (key) {
|
|
53524
|
+
return yield* make$3(yield* readReviewState(key));
|
|
53525
|
+
})
|
|
53526
|
+
});
|
|
53527
|
+
const updateReviewState = fnUntraced(function* (input, f) {
|
|
53528
|
+
return yield* pipe(scoped$3(gen(function* () {
|
|
53529
|
+
const key = yield* reviewStateKey(input);
|
|
53530
|
+
const state = yield* modify(yield* get$6(reviewStates, key), (current) => {
|
|
53531
|
+
const next = f(current);
|
|
53532
|
+
return [next, next];
|
|
53533
|
+
});
|
|
53534
|
+
yield* reviewStore.set(`review-state/${key}`, state);
|
|
53535
|
+
})), mapError$2((cause) => new GitError({ cause })));
|
|
53536
|
+
});
|
|
53537
|
+
function commentKey(input) {
|
|
53538
|
+
return `${input.filePath}:${input.side ?? "additions"}:${input.lineNumber}`;
|
|
53539
|
+
}
|
|
53540
|
+
function markKey(input) {
|
|
53541
|
+
return `${input.filePath}:${input.segmentId}:${input.fingerprint}`;
|
|
53542
|
+
}
|
|
53106
53543
|
const agents = yield* make$3(empty$6());
|
|
53107
53544
|
return RpcContracts.of({
|
|
53108
53545
|
"agents.create": (payload) => gen(function* () {
|
|
@@ -53119,7 +53556,7 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
|
53119
53556
|
cwd: session.cwd,
|
|
53120
53557
|
uuid: session.uuid
|
|
53121
53558
|
}), session));
|
|
53122
|
-
const terminal = yield* get$
|
|
53559
|
+
const terminal = yield* get$6(terminals, TerminalSessionKey.make({
|
|
53123
53560
|
args: session.args,
|
|
53124
53561
|
command: session.command,
|
|
53125
53562
|
cwd: session.cwd,
|
|
@@ -53136,22 +53573,51 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
|
53136
53573
|
cwd: payload.cwd,
|
|
53137
53574
|
uuid: payload.uuid
|
|
53138
53575
|
}))),
|
|
53139
|
-
"agents.watch": (payload) => unwrap$1(pipe(get(agents), map$4((current) => pipe(make$
|
|
53576
|
+
"agents.watch": (payload) => unwrap$1(pipe(get(agents), map$4((current) => pipe(make$43(current), concat(drop(1)(changes(agents))), map$2((sessions) => pipe(fromIterable$2(values(sessions)), filter$2((session) => session.cwd === payload.cwd))))))),
|
|
53140
53577
|
"projects.branches": (payload) => git.branches(payload.cwd),
|
|
53141
53578
|
"projects.createWorktree": (payload) => git.createWorktree(payload),
|
|
53142
53579
|
"projects.deleteWorktree": (payload) => git.deleteWorktree(payload),
|
|
53143
|
-
"projects.watch": () => unwrap$1(pipe(get(git.projects), map$4((projects) => pipe(make$
|
|
53144
|
-
"review.
|
|
53580
|
+
"projects.watch": () => unwrap$1(pipe(get(git.projects), map$4((projects) => pipe(make$43(projects), concat(drop(1)(changes(git.projects))))))),
|
|
53581
|
+
"review.comments.delete": (payload) => updateReviewState(payload, (state) => {
|
|
53582
|
+
const key = commentKey(payload);
|
|
53583
|
+
return new ReviewState({
|
|
53584
|
+
comments: filter$2(state.comments, (comment) => commentKey(comment) !== key),
|
|
53585
|
+
marks: state.marks
|
|
53586
|
+
});
|
|
53587
|
+
}),
|
|
53588
|
+
"review.comments.save": (payload) => updateReviewState(payload, (state) => {
|
|
53589
|
+
const key = commentKey(payload.comment);
|
|
53590
|
+
return new ReviewState({
|
|
53591
|
+
comments: append$1(filter$2(state.comments, (comment) => commentKey(comment) !== key), payload.comment),
|
|
53592
|
+
marks: state.marks
|
|
53593
|
+
});
|
|
53594
|
+
}),
|
|
53595
|
+
"review.commitAndPush": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.commitAndPush({
|
|
53145
53596
|
base: payload.base,
|
|
53146
53597
|
message: payload.message
|
|
53147
53598
|
}))),
|
|
53148
|
-
"review.createWipCommit": (payload) => pipe(get$
|
|
53149
|
-
"review.discardFile": (payload) => pipe(get$
|
|
53150
|
-
"review.metadata": (payload) => pipe(get$
|
|
53151
|
-
"review.stageFile": (payload) => pipe(get$
|
|
53152
|
-
"review.
|
|
53153
|
-
|
|
53154
|
-
|
|
53599
|
+
"review.createWipCommit": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.createWipCommit(payload.message))),
|
|
53600
|
+
"review.discardFile": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.discardFile(payload.filePath))),
|
|
53601
|
+
"review.metadata": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.metadata({ base: payload.base }))),
|
|
53602
|
+
"review.stageFile": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.stageFile(payload.filePath))),
|
|
53603
|
+
"review.state.mark": (payload) => updateReviewState(payload, (state) => {
|
|
53604
|
+
const keys = new Set(map$7(payload.marks, markKey));
|
|
53605
|
+
return new ReviewState({
|
|
53606
|
+
comments: state.comments,
|
|
53607
|
+
marks: appendAll(filter$2(state.marks, (mark) => !keys.has(markKey(mark))), payload.marks)
|
|
53608
|
+
});
|
|
53609
|
+
}),
|
|
53610
|
+
"review.state.unmark": (payload) => updateReviewState(payload, (state) => {
|
|
53611
|
+
const keys = new Set(map$7(payload.marks, markKey));
|
|
53612
|
+
return new ReviewState({
|
|
53613
|
+
comments: state.comments,
|
|
53614
|
+
marks: filter$2(state.marks, (mark) => !keys.has(markKey(mark)))
|
|
53615
|
+
});
|
|
53616
|
+
}),
|
|
53617
|
+
"review.state.watch": (payload) => unwrap$1(pipe(reviewStateKey(payload), flatMap$2((key) => get$6(reviewStates, key)), flatMap$2((ref) => pipe(get(ref), map$4((state) => concat(drop(1)(changes(ref)))(make$43(state))))))),
|
|
53618
|
+
"review.unstageFile": (payload) => pipe(get$6(gitWorktrees, payload.cwd), flatMap$2((worktree) => worktree.unstageFile(payload.filePath))),
|
|
53619
|
+
"review.watch": (payload) => unwrap$1(pipe(get$6(gitWorktrees, payload.cwd), map$4((worktree) => worktree.watchReviewDiffs(payload.scope)))),
|
|
53620
|
+
"review.watchRange": (payload) => unwrap$1(pipe(get$6(gitWorktrees, payload.cwd), map$4((worktree) => worktree.watchReviewRangeDiffs({
|
|
53155
53621
|
from: payload.from,
|
|
53156
53622
|
to: payload.to
|
|
53157
53623
|
})))),
|
|
@@ -53166,15 +53632,15 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
|
53166
53632
|
name,
|
|
53167
53633
|
tasks: splitParallelCommands(command)
|
|
53168
53634
|
}))))),
|
|
53169
|
-
"terminal.ports": (payload) => unwrap$1(pipe(get$
|
|
53170
|
-
"terminal.resize": (payload) => pipe(get$
|
|
53635
|
+
"terminal.ports": (payload) => unwrap$1(pipe(get$6(terminals, TerminalSessionKey.make(payload)), map$4((terminal) => terminal.ports))),
|
|
53636
|
+
"terminal.resize": (payload) => pipe(get$6(terminals, TerminalSessionKey.make(payload)), flatMap$2((terminal) => terminal.resize({
|
|
53171
53637
|
cols: payload.cols,
|
|
53172
53638
|
rows: payload.rows
|
|
53173
53639
|
}))),
|
|
53174
|
-
"terminal.restart": (payload) => pipe(get$
|
|
53175
|
-
"terminal.stop": (payload) => pipe(get$
|
|
53176
|
-
"terminal.watch": (payload) => unwrap$1(pipe(get$
|
|
53177
|
-
"terminal.write": (payload) => pipe(get$
|
|
53640
|
+
"terminal.restart": (payload) => pipe(get$6(terminals, TerminalSessionKey.make(payload)), flatMap$2((terminal) => terminal.restart())),
|
|
53641
|
+
"terminal.stop": (payload) => pipe(get$6(terminals, TerminalSessionKey.make(payload)), flatMap$2((terminal) => terminal.stop())),
|
|
53642
|
+
"terminal.watch": (payload) => unwrap$1(pipe(get$6(terminals, TerminalSessionKey.make(payload)), map$4((terminal) => terminal.updates))),
|
|
53643
|
+
"terminal.write": (payload) => pipe(get$6(terminals, TerminalSessionKey.make(payload)), flatMap$2((terminal) => terminal.write(payload.data)))
|
|
53178
53644
|
});
|
|
53179
53645
|
}));
|
|
53180
53646
|
//#endregion
|
|
@@ -62591,7 +63057,7 @@ const make$1 = /*#__PURE__*/ gen(function* () {
|
|
|
62591
63057
|
const loggerProvider = yield* OtelLoggerProvider;
|
|
62592
63058
|
const clock = yield* Clock;
|
|
62593
63059
|
const otelLogger = loggerProvider.getLogger("@effect/opentelemetry");
|
|
62594
|
-
return make$
|
|
63060
|
+
return make$5((options) => {
|
|
62595
63061
|
const attributes = { fiberId: options.fiber.id };
|
|
62596
63062
|
const span = getOrUndefined(options.fiber.context, ParentSpan);
|
|
62597
63063
|
if (isNotUndefined(span)) {
|
|
@@ -66604,7 +67070,7 @@ var OtelTraceState = class extends Service()("@effect/opentelemetry/Tracer/OtelT
|
|
|
66604
67070
|
* @category constructors
|
|
66605
67071
|
* @since 4.0.0
|
|
66606
67072
|
*/
|
|
66607
|
-
const make = /*#__PURE__*/ map$4(/*#__PURE__*/ service(OtelTracer), (tracer) => make$
|
|
67073
|
+
const make = /*#__PURE__*/ map$4(/*#__PURE__*/ service(OtelTracer), (tracer) => make$60({
|
|
66608
67074
|
span(options) {
|
|
66609
67075
|
return new OtelSpan(context, trace, tracer, options);
|
|
66610
67076
|
},
|
|
@@ -69785,7 +70251,7 @@ function readFileFromEnv(signalSpecificEnvVar, nonSignalSpecificEnvVar, warningM
|
|
|
69785
70251
|
const nonSignalSpecificPath = (0, import_src$1.getStringFromEnv)(nonSignalSpecificEnvVar);
|
|
69786
70252
|
const filePath = signalSpecificPath ?? nonSignalSpecificPath;
|
|
69787
70253
|
if (filePath != null) try {
|
|
69788
|
-
return fs.readFileSync(path.resolve(process.cwd(), filePath));
|
|
70254
|
+
return fs.readFileSync(path$1.resolve(process.cwd(), filePath));
|
|
69789
70255
|
} catch {
|
|
69790
70256
|
diag.warn(warningMessage);
|
|
69791
70257
|
return;
|
|
@@ -69947,7 +70413,7 @@ var import_src = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
69947
70413
|
});
|
|
69948
70414
|
})))();
|
|
69949
70415
|
function OtelLayer(serviceName) {
|
|
69950
|
-
return unwrap$4(map$4(option(string("VITE_OTEL_URL")), match$
|
|
70416
|
+
return unwrap$4(map$4(option(string("VITE_OTEL_URL")), match$5({
|
|
69951
70417
|
onNone: () => empty$11,
|
|
69952
70418
|
onSome: (url) => layer(() => ({
|
|
69953
70419
|
resource: { serviceName },
|
|
@@ -69957,7 +70423,7 @@ function OtelLayer(serviceName) {
|
|
|
69957
70423
|
}
|
|
69958
70424
|
//#endregion
|
|
69959
70425
|
//#region src/lib/serverRuntime.ts
|
|
69960
|
-
const LiveLayers = pipe(empty$11, provideMerge(RpcHandlers), provideMerge(GitWorkspace.layer), provideMerge(OtelLayer("workbench-server")), provideMerge(layer$16), provideMerge(layerMsgPack));
|
|
70426
|
+
const LiveLayers = pipe(empty$11, provideMerge(RpcHandlers), provideMerge(GitWorkspace.layer), provideMerge(unwrap$4(pipe(string("HOME"), withDefault(process.cwd()), map$4((home) => layerFileSystem(path.join(home, ".deslop")))))), provideMerge(OtelLayer("workbench-server")), provideMerge(layer$16), provideMerge(layerMsgPack));
|
|
69961
70427
|
//#endregion
|
|
69962
70428
|
//#region ../../packages/browser/src/http.ts
|
|
69963
70429
|
const INJECTED_HEAD = `<script>
|