@opencode/browse 0.0.11-dev.76 → 0.0.11-dev.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cli-qpkh40gh.mjs → cli-e9x2hzbm.mjs} +63 -52
- package/dist/cli.mjs +30 -19
- package/dist/{helpers-kp0j46jt.mjs → helpers-681ybn8r.mjs} +2 -2
- package/dist/{index-0dcypq31.mjs → index-yzz55kxm.mjs} +1 -1
- package/dist/{main-eej5z0y5.mjs → main-0yxzwqt8.mjs} +6 -6
- package/dist/main-1ja7rnnp.mjs +4 -0
- package/dist/main-3d4mj1xj.mjs +157 -0
- package/dist/main-4qeb707s.mjs +161 -0
- package/dist/{main-rt6g5418.mjs → main-8z9d979q.mjs} +15 -15
- package/dist/{main-nqmm7pdz.mjs → main-93xmqcr3.mjs} +47 -47
- package/dist/{main-gevbt7h7.mjs → main-csnx585b.mjs} +151 -151
- package/dist/{setup-j76yv51b.mjs → main-fkskfb8a.mjs} +3608 -4406
- package/dist/main-ftsbt0hk.mjs +73 -0
- package/dist/{main-brv9dhy5.mjs → main-gdvgbgce.mjs} +9 -9
- package/dist/{main-ajza8egc.mjs → main-mysz5yma.mjs} +44 -39
- package/dist/main-qzvstggv.mjs +465 -0
- package/dist/main-vgzr4689.mjs +61 -0
- package/dist/{mcp-sy8qgkyr.mjs → mcp-3v0wxzr5.mjs} +139 -138
- package/dist/migrate-5phz1hha.mjs +233 -0
- package/dist/{relay-ateyg5ax.mjs → relay-4chyv51v.mjs} +128 -123
- package/dist/runtime-update-pzazb7sh.mjs +156 -0
- package/dist/setup-5g5kza58.mjs +956 -0
- package/dist/{skill-text-x7sccp6h.mjs → skill-text-mrxy6zpc.mjs} +5 -4
- package/dist/{supervisor-0rvjpf4e.mjs → supervisor-bfrn5cxb.mjs} +38 -17
- package/dist/{update-rbd2025v.mjs → update-42j1j7w1.mjs} +3 -3
- package/dist/{version-4cjr3wpp.mjs → version-w0dwcyve.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +5 -4
- package/dist/main-7wgmq04v.mjs +0 -303
- package/dist/main-exnm62gg.mjs +0 -4
- package/dist/main-hm4fcpfz.mjs +0 -131
- package/dist/main-rn7hdcq2.mjs +0 -805
- package/dist/runtime-update-70gqzynp.mjs +0 -200
|
@@ -1236,7 +1236,7 @@ var FailureImpl = function(failure) {
|
|
|
1236
1236
|
this.failure = failure;
|
|
1237
1237
|
};
|
|
1238
1238
|
FailureImpl.prototype = FailureProto;
|
|
1239
|
-
var
|
|
1239
|
+
var fail = (failure) => new FailureImpl(failure);
|
|
1240
1240
|
var SuccessImpl = function(success) {
|
|
1241
1241
|
this.success = success;
|
|
1242
1242
|
};
|
|
@@ -1882,26 +1882,26 @@ var normalize = (n) => n > 0 ? Math.floor(n) : 0;
|
|
|
1882
1882
|
|
|
1883
1883
|
// node_modules/effect/dist/Result.js
|
|
1884
1884
|
var succeed = succeed7;
|
|
1885
|
-
var
|
|
1885
|
+
var fail2 = fail;
|
|
1886
1886
|
var try_2 = (evaluate) => {
|
|
1887
1887
|
if (isFunction(evaluate)) {
|
|
1888
1888
|
try {
|
|
1889
1889
|
return succeed(evaluate());
|
|
1890
1890
|
} catch (e) {
|
|
1891
|
-
return
|
|
1891
|
+
return fail2(e);
|
|
1892
1892
|
}
|
|
1893
1893
|
} else {
|
|
1894
1894
|
try {
|
|
1895
1895
|
return succeed(evaluate.try());
|
|
1896
1896
|
} catch (e) {
|
|
1897
|
-
return
|
|
1897
|
+
return fail2(evaluate.catch(e));
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
1900
|
};
|
|
1901
1901
|
var isResult = isResult2;
|
|
1902
1902
|
var isFailure = isFailure3;
|
|
1903
1903
|
var isSuccess = isSuccess3;
|
|
1904
|
-
var mapError2 = /* @__PURE__ */ dual(2, (self, f) => isFailure(self) ?
|
|
1904
|
+
var mapError2 = /* @__PURE__ */ dual(2, (self, f) => isFailure(self) ? fail2(f(self.failure)) : self);
|
|
1905
1905
|
var map2 = /* @__PURE__ */ dual(2, (self, f) => isSuccess(self) ? succeed(f(self.success)) : self);
|
|
1906
1906
|
var match5 = /* @__PURE__ */ dual(2, (self, {
|
|
1907
1907
|
onFailure,
|
|
@@ -2419,7 +2419,7 @@ var makeInterruptReason = (fiberId) => new Interrupt(fiberId);
|
|
|
2419
2419
|
var causeInterrupt = (fiberId) => new CauseImpl([new Interrupt(fiberId)]);
|
|
2420
2420
|
var findFail = (self) => {
|
|
2421
2421
|
const reason = self.reasons.find(isFailReason);
|
|
2422
|
-
return reason ? succeed(reason) :
|
|
2422
|
+
return reason ? succeed(reason) : fail2(self);
|
|
2423
2423
|
};
|
|
2424
2424
|
var findError = (self) => {
|
|
2425
2425
|
for (let i = 0;i < self.reasons.length; i++) {
|
|
@@ -2428,12 +2428,12 @@ var findError = (self) => {
|
|
|
2428
2428
|
return succeed(reason.error);
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
|
-
return
|
|
2431
|
+
return fail2(self);
|
|
2432
2432
|
};
|
|
2433
2433
|
var hasDies2 = (self) => self.reasons.some(isDieReason);
|
|
2434
2434
|
var findDefect = (self) => {
|
|
2435
2435
|
const reason = self.reasons.find(isDieReason);
|
|
2436
|
-
return reason ? succeed(reason.defect) :
|
|
2436
|
+
return reason ? succeed(reason.defect) : fail2(self);
|
|
2437
2437
|
};
|
|
2438
2438
|
var hasInterrupts3 = (self) => self.reasons.some(isInterruptReason);
|
|
2439
2439
|
var causeFilterInterruptors = (self) => {
|
|
@@ -2447,7 +2447,7 @@ var causeFilterInterruptors = (self) => {
|
|
|
2447
2447
|
interruptors.add(f.fiberId);
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
2450
|
-
return interruptors ? succeed(interruptors) :
|
|
2450
|
+
return interruptors ? succeed(interruptors) : fail2(self);
|
|
2451
2451
|
};
|
|
2452
2452
|
var causeInterruptors = (self) => {
|
|
2453
2453
|
const result = causeFilterInterruptors(self);
|
|
@@ -3383,7 +3383,7 @@ var catchEager2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
3383
3383
|
var exitInterrupt = (fiberId) => exitFailCause(causeInterrupt(fiberId));
|
|
3384
3384
|
var exitIsSuccess = (self) => self._tag === "Success";
|
|
3385
3385
|
var exitIsFailure = (self) => self._tag === "Failure";
|
|
3386
|
-
var exitFilterCause = (self) => self._tag === "Failure" ? succeed(self.cause) :
|
|
3386
|
+
var exitFilterCause = (self) => self._tag === "Failure" ? succeed(self.cause) : fail2(self);
|
|
3387
3387
|
var exitHasInterrupts = (self) => self._tag === "Failure" && hasInterrupts3(self.cause);
|
|
3388
3388
|
var exitVoid = /* @__PURE__ */ exitSucceed(undefined);
|
|
3389
3389
|
var exitMap = /* @__PURE__ */ dual(2, (self, f) => self._tag === "Success" ? exitSucceed(f(self.value)) : self);
|
|
@@ -3435,7 +3435,7 @@ var updateService = /* @__PURE__ */ dual(3, (self, service, f) => updateContext(
|
|
|
3435
3435
|
return s;
|
|
3436
3436
|
return add(s, service, next);
|
|
3437
3437
|
}));
|
|
3438
|
-
var
|
|
3438
|
+
var context = () => getContext;
|
|
3439
3439
|
var getContext = /* @__PURE__ */ withFiber((fiber) => succeed2(fiber.context));
|
|
3440
3440
|
var contextWith2 = (f) => withFiber((fiber) => f(fiber.context));
|
|
3441
3441
|
var provideContext3 = /* @__PURE__ */ dual(2, (self, context) => {
|
|
@@ -3453,7 +3453,7 @@ var provideServiceImpl = (self, service, implementation) => updateContext(self,
|
|
|
3453
3453
|
var zipWith = /* @__PURE__ */ dual((args) => isEffect2(args[1]), (self, that, f, options) => options?.concurrent ? map7(all2([self, that], {
|
|
3454
3454
|
concurrency: 2
|
|
3455
3455
|
}), ([a, a2]) => f(a, a2)) : flatMap2(self, (a) => map7(that, (a2) => f(a, a2))));
|
|
3456
|
-
var
|
|
3456
|
+
var when = /* @__PURE__ */ dual(2, (self, condition) => flatMap2(condition, (pass) => pass ? asSome(self) : succeedNone));
|
|
3457
3457
|
var forever2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options) => whileLoop2({
|
|
3458
3458
|
while: constTrue,
|
|
3459
3459
|
body: constant(options?.disableYield ? self : flatMap2(self, (_) => yieldNow)),
|
|
@@ -3517,7 +3517,7 @@ var catchTags2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, cases
|
|
|
3517
3517
|
let keys;
|
|
3518
3518
|
return catchFilter2(self, (e) => {
|
|
3519
3519
|
keys ??= Object.keys(cases);
|
|
3520
|
-
return hasProperty(e, "_tag") && isString(e["_tag"]) && keys.includes(e["_tag"]) ? succeed(e) :
|
|
3520
|
+
return hasProperty(e, "_tag") && isString(e["_tag"]) && keys.includes(e["_tag"]) ? succeed(e) : fail2(e);
|
|
3521
3521
|
}, (e) => cases[e["_tag"]](e), orElse);
|
|
3522
3522
|
});
|
|
3523
3523
|
var mapError3 = /* @__PURE__ */ dual(2, (self, f) => catch_2(self, (error) => failSync(() => f(error))));
|
|
@@ -3561,7 +3561,7 @@ var option = (self) => match6(self, {
|
|
|
3561
3561
|
onSuccess: some
|
|
3562
3562
|
});
|
|
3563
3563
|
var result2 = (self) => matchEager(self, {
|
|
3564
|
-
onFailure:
|
|
3564
|
+
onFailure: fail2,
|
|
3565
3565
|
onSuccess: succeed
|
|
3566
3566
|
});
|
|
3567
3567
|
var matchCauseEffect2 = /* @__PURE__ */ dual(2, (self, options) => new OnSuccessAndFailureImpl(self, options.onSuccess.length !== 1 ? (a) => options.onSuccess(a) : options.onSuccess, options.onFailure.length !== 1 ? (cause) => options.onFailure(cause) : options.onFailure));
|
|
@@ -4543,7 +4543,7 @@ var wallTimeNanos = /* @__PURE__ */ function() {
|
|
|
4543
4543
|
}();
|
|
4544
4544
|
var clockWith = (f) => withFiber((fiber) => f(fiber.getRef(ClockRef)));
|
|
4545
4545
|
var sleep2 = (duration) => clockWith((clock) => clock.sleep(fromInputUnsafe(duration)));
|
|
4546
|
-
var
|
|
4546
|
+
var currentTimeMillis2 = /* @__PURE__ */ clockWith((clock) => clock.currentTimeMillis);
|
|
4547
4547
|
var TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
|
|
4548
4548
|
class TimeoutError extends (/* @__PURE__ */ TaggedError3("TimeoutError")) {
|
|
4549
4549
|
[TimeoutErrorTypeId] = TimeoutErrorTypeId;
|
|
@@ -4772,13 +4772,13 @@ var reportCauseUnsafe = (fiber, cause, defectsOnly) => {
|
|
|
4772
4772
|
var isExit = isExit2;
|
|
4773
4773
|
var succeed3 = exitSucceed;
|
|
4774
4774
|
var failCause = exitFailCause;
|
|
4775
|
-
var
|
|
4775
|
+
var fail3 = exitFail;
|
|
4776
4776
|
var die = exitDie;
|
|
4777
4777
|
var interrupt = exitInterrupt;
|
|
4778
4778
|
var void_2 = exitVoid;
|
|
4779
4779
|
var isSuccess2 = exitIsSuccess;
|
|
4780
4780
|
var isFailure2 = exitIsFailure;
|
|
4781
|
-
var
|
|
4781
|
+
var hasInterrupts2 = exitHasInterrupts;
|
|
4782
4782
|
var asVoid = exitAsVoid;
|
|
4783
4783
|
|
|
4784
4784
|
// node_modules/effect/dist/Deferred.js
|
|
@@ -4816,7 +4816,7 @@ var _await = (self) => callback((resume) => {
|
|
|
4816
4816
|
});
|
|
4817
4817
|
var completeWith = /* @__PURE__ */ dual(2, (self, effect) => sync(() => doneUnsafe(self, effect)));
|
|
4818
4818
|
var done = completeWith;
|
|
4819
|
-
var
|
|
4819
|
+
var fail4 = /* @__PURE__ */ dual(2, (self, error) => done(self, exitFail(error)));
|
|
4820
4820
|
var failCause4 = /* @__PURE__ */ dual(2, (self, cause) => done(self, exitFailCause(cause)));
|
|
4821
4821
|
var interruptWith = /* @__PURE__ */ dual(2, (self, fiberId) => failCause4(self, causeInterrupt(fiberId)));
|
|
4822
4822
|
var isDone2 = (self) => sync(() => isDoneUnsafe(self));
|
|
@@ -4992,7 +4992,7 @@ var map4 = causeMap;
|
|
|
4992
4992
|
var squash = causeSquash;
|
|
4993
4993
|
var findError2 = findError;
|
|
4994
4994
|
var hasDies = hasDies2;
|
|
4995
|
-
var
|
|
4995
|
+
var hasInterrupts = hasInterrupts3;
|
|
4996
4996
|
var interruptors = causeInterruptors;
|
|
4997
4997
|
var isDone3 = isDone;
|
|
4998
4998
|
var Done2 = Done;
|
|
@@ -5034,8 +5034,8 @@ var filterDone = (cause) => {
|
|
|
5034
5034
|
}
|
|
5035
5035
|
}
|
|
5036
5036
|
if (done === undefined)
|
|
5037
|
-
return
|
|
5038
|
-
return hasFailure ?
|
|
5037
|
+
return fail2(cause);
|
|
5038
|
+
return hasFailure ? fail2(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed(done);
|
|
5039
5039
|
};
|
|
5040
5040
|
var filterDoneLeftover = (cause) => {
|
|
5041
5041
|
const done = filterDone(cause);
|
|
@@ -5227,7 +5227,7 @@ var void_3 = void_;
|
|
|
5227
5227
|
var callback2 = callback;
|
|
5228
5228
|
var never = never2;
|
|
5229
5229
|
var gen = gen2;
|
|
5230
|
-
var
|
|
5230
|
+
var fail5 = fail6;
|
|
5231
5231
|
var failCause5 = failCause3;
|
|
5232
5232
|
var failCauseSync2 = failCauseSync;
|
|
5233
5233
|
var die2 = die3;
|
|
@@ -5267,11 +5267,11 @@ var timeoutOrElse = timeoutOrElse2;
|
|
|
5267
5267
|
var sleep = sleep2;
|
|
5268
5268
|
var race = race2;
|
|
5269
5269
|
var raceFirst = raceFirst2;
|
|
5270
|
-
var
|
|
5270
|
+
var when2 = when;
|
|
5271
5271
|
var match3 = match6;
|
|
5272
5272
|
var matchCauseEffect = matchCauseEffect2;
|
|
5273
5273
|
var matchEffect = matchEffect2;
|
|
5274
|
-
var
|
|
5274
|
+
var context2 = context;
|
|
5275
5275
|
var contextWith = contextWith2;
|
|
5276
5276
|
var provide3 = provide4;
|
|
5277
5277
|
var provideContext = provideContext3;
|
|
@@ -5332,13 +5332,13 @@ var effectify = (fn, onError, onSyncError) => (...args) => callback2((resume) =>
|
|
|
5332
5332
|
try {
|
|
5333
5333
|
fn(...args, (err, result) => {
|
|
5334
5334
|
if (err) {
|
|
5335
|
-
resume(
|
|
5335
|
+
resume(fail5(onError ? onError(err, args) : err));
|
|
5336
5336
|
} else {
|
|
5337
5337
|
resume(succeed6(result));
|
|
5338
5338
|
}
|
|
5339
5339
|
});
|
|
5340
5340
|
} catch (err) {
|
|
5341
|
-
resume(onSyncError ?
|
|
5341
|
+
resume(onSyncError ? fail5(onSyncError(err, args)) : die2(err));
|
|
5342
5342
|
}
|
|
5343
5343
|
});
|
|
5344
5344
|
var mapEager = mapEager2;
|
|
@@ -5534,7 +5534,7 @@ var tryDecodeURIComponent = (str) => {
|
|
|
5534
5534
|
|
|
5535
5535
|
// node_modules/effect/dist/internal/redacted.js
|
|
5536
5536
|
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
5537
|
-
var
|
|
5537
|
+
var value = (self) => {
|
|
5538
5538
|
if (redactedRegistry.has(self)) {
|
|
5539
5539
|
return redactedRegistry.get(self);
|
|
5540
5540
|
} else {
|
|
@@ -5572,7 +5572,7 @@ var Proto3 = {
|
|
|
5572
5572
|
return isRedacted(that) && equals(redactedRegistry.get(this), redactedRegistry.get(that));
|
|
5573
5573
|
}
|
|
5574
5574
|
};
|
|
5575
|
-
var
|
|
5575
|
+
var value2 = value;
|
|
5576
5576
|
|
|
5577
5577
|
// node_modules/effect/dist/http/Headers.js
|
|
5578
5578
|
var TypeId10 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
@@ -5712,7 +5712,7 @@ var MutableRefProto = {
|
|
|
5712
5712
|
};
|
|
5713
5713
|
}
|
|
5714
5714
|
};
|
|
5715
|
-
var
|
|
5715
|
+
var make9 = (value) => {
|
|
5716
5716
|
const ref = Object.create(MutableRefProto);
|
|
5717
5717
|
ref.current = value;
|
|
5718
5718
|
return ref;
|
|
@@ -5861,7 +5861,7 @@ var makeUnsafe5 = makeLatchUnsafe;
|
|
|
5861
5861
|
|
|
5862
5862
|
// node_modules/effect/dist/MutableList.js
|
|
5863
5863
|
var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
|
|
5864
|
-
var
|
|
5864
|
+
var make10 = () => ({
|
|
5865
5865
|
head: undefined,
|
|
5866
5866
|
tail: undefined,
|
|
5867
5867
|
length: 0
|
|
@@ -6028,12 +6028,12 @@ var QueueProto = {
|
|
|
6028
6028
|
};
|
|
6029
6029
|
}
|
|
6030
6030
|
};
|
|
6031
|
-
var
|
|
6031
|
+
var make11 = (options) => withFiber((fiber) => {
|
|
6032
6032
|
const self = Object.create(QueueProto);
|
|
6033
6033
|
self.dispatcher = fiber.currentDispatcher;
|
|
6034
6034
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
6035
6035
|
self.strategy = options?.strategy ?? "suspend";
|
|
6036
|
-
self.messages =
|
|
6036
|
+
self.messages = make10();
|
|
6037
6037
|
self.scheduleRunning = false;
|
|
6038
6038
|
self.state = {
|
|
6039
6039
|
_tag: "Open",
|
|
@@ -6043,10 +6043,10 @@ var make10 = (options) => withFiber((fiber) => {
|
|
|
6043
6043
|
};
|
|
6044
6044
|
return succeed2(self);
|
|
6045
6045
|
});
|
|
6046
|
-
var bounded = (capacity) =>
|
|
6046
|
+
var bounded = (capacity) => make11({
|
|
6047
6047
|
capacity
|
|
6048
6048
|
});
|
|
6049
|
-
var dropping = (capacity) =>
|
|
6049
|
+
var dropping = (capacity) => make11({
|
|
6050
6050
|
capacity,
|
|
6051
6051
|
strategy: "dropping"
|
|
6052
6052
|
});
|
|
@@ -6346,14 +6346,14 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
|
|
|
6346
6346
|
return onError(pull, onCause);
|
|
6347
6347
|
}));
|
|
6348
6348
|
var toTransform = (channel) => channel.transform;
|
|
6349
|
-
var asyncQueue = (scope, f, options) =>
|
|
6349
|
+
var asyncQueue = (scope, f, options) => make11({
|
|
6350
6350
|
capacity: options?.bufferSize,
|
|
6351
6351
|
strategy: options?.strategy
|
|
6352
6352
|
}).pipe(tap((queue) => addFinalizer(scope, shutdown(queue))), tap((queue) => forkIn(provide(f(queue), scope), scope)));
|
|
6353
6353
|
var callbackArray = (f, options) => fromTransform((_, scope) => map5(asyncQueue(scope, f, options), takeAll2));
|
|
6354
6354
|
var suspend3 = (evaluate) => fromTransform((upstream, scope) => suspend2(() => toTransform(evaluate())(upstream, scope)));
|
|
6355
6355
|
var empty7 = /* @__PURE__ */ fromPull(/* @__PURE__ */ succeed6(/* @__PURE__ */ done3()));
|
|
6356
|
-
var fail8 = (error) => fromPull(succeed6(
|
|
6356
|
+
var fail8 = (error) => fromPull(succeed6(fail5(error)));
|
|
6357
6357
|
var failCause6 = (cause) => fromPull(failCause5(cause));
|
|
6358
6358
|
var fromQueueArray = (queue) => fromPull(succeed6(takeAll2(queue)));
|
|
6359
6359
|
var fromReadableStream = (options) => fromTransform((_, scope) => readableStreamToPullUnsafe({
|
|
@@ -6364,7 +6364,7 @@ var fromReadableStream = (options) => fromTransform((_, scope) => readableStream
|
|
|
6364
6364
|
}));
|
|
6365
6365
|
var readableStreamToPullUnsafe = (options) => {
|
|
6366
6366
|
const reader = options.readable.getReader();
|
|
6367
|
-
const exit = options.exit ??
|
|
6367
|
+
const exit = options.exit ?? make9(undefined);
|
|
6368
6368
|
const pull = suspend2(() => {
|
|
6369
6369
|
if (exit.current)
|
|
6370
6370
|
return exit.current;
|
|
@@ -6778,7 +6778,7 @@ var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (up
|
|
|
6778
6778
|
}
|
|
6779
6779
|
return upstream;
|
|
6780
6780
|
}).pipe(catch_((error) => {
|
|
6781
|
-
done =
|
|
6781
|
+
done = fail3(error);
|
|
6782
6782
|
return done3();
|
|
6783
6783
|
}));
|
|
6784
6784
|
const pull = map5(suspend2(() => sink.transform(upstreamWithLeftover, scope)), ([value, leftover_]) => {
|
|
@@ -6848,7 +6848,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
6848
6848
|
}
|
|
6849
6849
|
}, options?.strategy);
|
|
6850
6850
|
});
|
|
6851
|
-
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map5(
|
|
6851
|
+
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map5(context2(), (context) => toReadableStreamWith(self, context, options)));
|
|
6852
6852
|
|
|
6853
6853
|
// node_modules/effect/dist/PlatformError.js
|
|
6854
6854
|
var TypeId18 = "~effect/PlatformError";
|
|
@@ -6892,7 +6892,7 @@ var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
|
6892
6892
|
var make17 = (impl) => FileSystem.of({
|
|
6893
6893
|
...impl,
|
|
6894
6894
|
[TypeId19]: TypeId19,
|
|
6895
|
-
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) :
|
|
6895
|
+
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail5(e))),
|
|
6896
6896
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_({
|
|
6897
6897
|
try: () => new TextDecoder(encoding).decode(_),
|
|
6898
6898
|
catch: (cause) => badArgument({
|
|
@@ -6951,7 +6951,7 @@ var decode = (str) => {
|
|
|
6951
6951
|
const stripped = stripCrlf(str);
|
|
6952
6952
|
const length = stripped.length;
|
|
6953
6953
|
if (length % 4 !== 0) {
|
|
6954
|
-
return
|
|
6954
|
+
return fail2(new EncodingError({
|
|
6955
6955
|
kind: "Decode",
|
|
6956
6956
|
module: "Base64",
|
|
6957
6957
|
input: stripped,
|
|
@@ -6960,7 +6960,7 @@ var decode = (str) => {
|
|
|
6960
6960
|
}
|
|
6961
6961
|
const index = stripped.indexOf("=");
|
|
6962
6962
|
if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) {
|
|
6963
|
-
return
|
|
6963
|
+
return fail2(new EncodingError({
|
|
6964
6964
|
kind: "Decode",
|
|
6965
6965
|
module: "Base64",
|
|
6966
6966
|
input: stripped,
|
|
@@ -6978,7 +6978,7 @@ var decode = (str) => {
|
|
|
6978
6978
|
}
|
|
6979
6979
|
return succeed(result);
|
|
6980
6980
|
} catch (cause) {
|
|
6981
|
-
return
|
|
6981
|
+
return fail2(new EncodingError({
|
|
6982
6982
|
kind: "Decode",
|
|
6983
6983
|
module: "Base64",
|
|
6984
6984
|
input: stripped,
|
|
@@ -7545,7 +7545,7 @@ var defectFromJson = (options) => transform2({
|
|
|
7545
7545
|
encode: makeEncodeDefect(options)
|
|
7546
7546
|
});
|
|
7547
7547
|
var urlFromString = /* @__PURE__ */ transformEffect2({
|
|
7548
|
-
decode: (s, options) => URL.canParse(s) ? succeed6(new URL(s)) :
|
|
7548
|
+
decode: (s, options) => URL.canParse(s) ? succeed6(new URL(s)) : fail5(new InvalidValue({
|
|
7549
7549
|
expected: "a valid URL string"
|
|
7550
7550
|
}, s, options)),
|
|
7551
7551
|
encode: (url) => succeed6(url.href)
|
|
@@ -7804,7 +7804,7 @@ function templateLiteralTransformation(template) {
|
|
|
7804
7804
|
const segments = segmentTemplateLiteralParts(template, s, options);
|
|
7805
7805
|
if (segments)
|
|
7806
7806
|
return succeed6(segments);
|
|
7807
|
-
return
|
|
7807
|
+
return fail5(new InvalidValue({
|
|
7808
7808
|
expected: "a string matching template literal parts"
|
|
7809
7809
|
}, s, options));
|
|
7810
7810
|
}), transform((parts) => parts.join("")));
|
|
@@ -7961,12 +7961,12 @@ var Arrays = class extends ASTNodeImpl {
|
|
|
7961
7961
|
else
|
|
7962
7962
|
state.issues = [issue];
|
|
7963
7963
|
} else {
|
|
7964
|
-
return
|
|
7964
|
+
return fail5(new Composite(ast, [issue], input, options));
|
|
7965
7965
|
}
|
|
7966
7966
|
}
|
|
7967
7967
|
}
|
|
7968
7968
|
if (state.issues) {
|
|
7969
|
-
return
|
|
7969
|
+
return fail5(new Composite(ast, state.issues, input, options));
|
|
7970
7970
|
}
|
|
7971
7971
|
return succeed9(state.output);
|
|
7972
7972
|
};
|
|
@@ -8005,7 +8005,7 @@ var Arrays = class extends ASTNodeImpl {
|
|
|
8005
8005
|
return missingExit;
|
|
8006
8006
|
try {
|
|
8007
8007
|
if (!Array.isArray(input)) {
|
|
8008
|
-
return
|
|
8008
|
+
return fail5(new InvalidType(ast, input, options));
|
|
8009
8009
|
}
|
|
8010
8010
|
if (!elements) {
|
|
8011
8011
|
elements = ast.elements.map((ast) => ({
|
|
@@ -8056,7 +8056,7 @@ function stepArray(s, item, exit, i) {
|
|
|
8056
8056
|
else
|
|
8057
8057
|
s.issues = [issue];
|
|
8058
8058
|
} else {
|
|
8059
|
-
return
|
|
8059
|
+
return fail3(new Composite(s.ast, [issue], s.input, s.options));
|
|
8060
8060
|
}
|
|
8061
8061
|
}
|
|
8062
8062
|
}
|
|
@@ -8084,7 +8084,7 @@ var wrapPropertyKeyIssue = (s, ast, key, exit) => {
|
|
|
8084
8084
|
else
|
|
8085
8085
|
s.issues = [pointer];
|
|
8086
8086
|
} else {
|
|
8087
|
-
return
|
|
8087
|
+
return fail3(new Composite(ast, [pointer], s.input, s.options));
|
|
8088
8088
|
}
|
|
8089
8089
|
};
|
|
8090
8090
|
var FINITE_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?";
|
|
@@ -8239,7 +8239,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
8239
8239
|
return missing;
|
|
8240
8240
|
}
|
|
8241
8241
|
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
8242
|
-
return yield*
|
|
8242
|
+
return yield* fail5(new InvalidType(ast, input, options));
|
|
8243
8243
|
}
|
|
8244
8244
|
compileMembers();
|
|
8245
8245
|
const record = input;
|
|
@@ -8277,7 +8277,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
8277
8277
|
}
|
|
8278
8278
|
continue;
|
|
8279
8279
|
} else {
|
|
8280
|
-
return yield*
|
|
8280
|
+
return yield* fail5(new Composite(ast, [issue], input, options));
|
|
8281
8281
|
}
|
|
8282
8282
|
}
|
|
8283
8283
|
}
|
|
@@ -8318,7 +8318,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
8318
8318
|
yield* eff;
|
|
8319
8319
|
}
|
|
8320
8320
|
if (state.issues) {
|
|
8321
|
-
return yield*
|
|
8321
|
+
return yield* fail5(new Composite(ast, state.issues, input, options));
|
|
8322
8322
|
}
|
|
8323
8323
|
return out;
|
|
8324
8324
|
});
|
|
@@ -8344,7 +8344,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
8344
8344
|
return (fallback ??= makeFallback())(input, options);
|
|
8345
8345
|
}
|
|
8346
8346
|
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) {
|
|
8347
|
-
return
|
|
8347
|
+
return fail5(new InvalidType(ast, input, options));
|
|
8348
8348
|
}
|
|
8349
8349
|
const props = compileMembers();
|
|
8350
8350
|
const record = input;
|
|
@@ -8426,7 +8426,7 @@ function stepProperty(s, p, exit) {
|
|
|
8426
8426
|
s.issues = [issue];
|
|
8427
8427
|
return;
|
|
8428
8428
|
} else {
|
|
8429
|
-
return
|
|
8429
|
+
return fail3(new Composite(s.ast, [issue], s.input, s.options));
|
|
8430
8430
|
}
|
|
8431
8431
|
}
|
|
8432
8432
|
}
|
|
@@ -8750,7 +8750,7 @@ var Union2 = class extends ASTNodeImpl {
|
|
|
8750
8750
|
}
|
|
8751
8751
|
const candidates = (index ??= getCandidateIndex(ast.types))(input, isConstructor);
|
|
8752
8752
|
if (candidates.length === 0) {
|
|
8753
|
-
return
|
|
8753
|
+
return fail5(new AnyOf(ast, [], input, options));
|
|
8754
8754
|
}
|
|
8755
8755
|
if (candidates.length === 1) {
|
|
8756
8756
|
const result = parser(candidates[0])(input, options);
|
|
@@ -8812,7 +8812,7 @@ function failSingleUnionCandidate(ast, cause, input, options) {
|
|
|
8812
8812
|
const issue = getSchemaIssue(cause);
|
|
8813
8813
|
if (!issue)
|
|
8814
8814
|
return failCause(cause);
|
|
8815
|
-
return
|
|
8815
|
+
return fail3(new AnyOf(ast, [issue], input, options));
|
|
8816
8816
|
}
|
|
8817
8817
|
function catchSingleUnionCandidate(ast, result, input, options) {
|
|
8818
8818
|
return catchCause(result, (cause) => failSingleUnionCandidate(ast, cause, input, options));
|
|
@@ -8831,7 +8831,7 @@ function parseUnionCandidates(ast, parser, candidates, input, options) {
|
|
|
8831
8831
|
if (!eff) {
|
|
8832
8832
|
if (state.out)
|
|
8833
8833
|
return state.out;
|
|
8834
|
-
return
|
|
8834
|
+
return fail5(new AnyOf(ast, state.issues ?? [], input, options));
|
|
8835
8835
|
}
|
|
8836
8836
|
return resumeUnion(eff, state);
|
|
8837
8837
|
}
|
|
@@ -8841,7 +8841,7 @@ function resumeUnion(eff, state) {
|
|
|
8841
8841
|
return succeed6(state.input);
|
|
8842
8842
|
if (state.out)
|
|
8843
8843
|
return state.out;
|
|
8844
|
-
return
|
|
8844
|
+
return fail5(new AnyOf(state.ast, state.issues ?? [], state.input, state.options));
|
|
8845
8845
|
});
|
|
8846
8846
|
}
|
|
8847
8847
|
var parseUnion = /* @__PURE__ */ iterateEager()({
|
|
@@ -8861,7 +8861,7 @@ var parseUnion = /* @__PURE__ */ iterateEager()({
|
|
|
8861
8861
|
} else {
|
|
8862
8862
|
if (s.out && s.successes) {
|
|
8863
8863
|
s.successes.push(s.ast.types[i]);
|
|
8864
|
-
return
|
|
8864
|
+
return fail3(new OneOf(s.ast, s.successes, s.input, s.options));
|
|
8865
8865
|
}
|
|
8866
8866
|
s.out = exit;
|
|
8867
8867
|
if (s.successes) {
|
|
@@ -9238,7 +9238,7 @@ function fromConst(ast, value) {
|
|
|
9238
9238
|
return missingExit;
|
|
9239
9239
|
if (input === value)
|
|
9240
9240
|
return succeed;
|
|
9241
|
-
return
|
|
9241
|
+
return fail5(new InvalidType(ast, input, options));
|
|
9242
9242
|
};
|
|
9243
9243
|
}
|
|
9244
9244
|
function fromRefinement(ast, refinement) {
|
|
@@ -9247,7 +9247,7 @@ function fromRefinement(ast, refinement) {
|
|
|
9247
9247
|
return missingExit;
|
|
9248
9248
|
if (refinement(input))
|
|
9249
9249
|
return sameExit;
|
|
9250
|
-
return
|
|
9250
|
+
return fail5(new InvalidType(ast, input, options));
|
|
9251
9251
|
};
|
|
9252
9252
|
}
|
|
9253
9253
|
function segmentTemplateLiteralParts(ast, input, options) {
|
|
@@ -9446,7 +9446,7 @@ function isTree(u, isLeaf) {
|
|
|
9446
9446
|
function isJson(u) {
|
|
9447
9447
|
return isTree(u, isJsonLeaf);
|
|
9448
9448
|
}
|
|
9449
|
-
var Json2 = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isJson(input) ? sameExit :
|
|
9449
|
+
var Json2 = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isJson(input) ? sameExit : fail5(new InvalidType(ast, input, options)), {
|
|
9450
9450
|
representation: {
|
|
9451
9451
|
id: "effect/schema/Json",
|
|
9452
9452
|
payload: null
|
|
@@ -9462,7 +9462,7 @@ var objectKeywordToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union2([/
|
|
|
9462
9462
|
function isStringTree(u) {
|
|
9463
9463
|
return isTree(u, isStringTreeLeaf);
|
|
9464
9464
|
}
|
|
9465
|
-
var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isStringTree(input) ? sameExit :
|
|
9465
|
+
var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options) => isStringTree(input) ? sameExit : fail5(new InvalidType(ast, input, options)), {
|
|
9466
9466
|
expected: "StringTree",
|
|
9467
9467
|
toCodecStringTree: () => {
|
|
9468
9468
|
return;
|
|
@@ -9555,7 +9555,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
9555
9555
|
if (input !== missing && output !== missing) {
|
|
9556
9556
|
const issues = collectIssues(encodingChecks, input, undefined, ast, options);
|
|
9557
9557
|
if (issues) {
|
|
9558
|
-
result =
|
|
9558
|
+
result = fail5(new Composite(ast, issues, input, options));
|
|
9559
9559
|
}
|
|
9560
9560
|
}
|
|
9561
9561
|
}
|
|
@@ -9564,7 +9564,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
9564
9564
|
if (input !== missing && value !== missing) {
|
|
9565
9565
|
const issues = collectIssues(encodingChecks, input, undefined, ast, options);
|
|
9566
9566
|
if (issues) {
|
|
9567
|
-
return
|
|
9567
|
+
return fail5(new Composite(ast, issues, input, options));
|
|
9568
9568
|
}
|
|
9569
9569
|
}
|
|
9570
9570
|
return succeed6(value);
|
|
@@ -9579,7 +9579,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
9579
9579
|
return result;
|
|
9580
9580
|
const issues = collectIssues(checks, value, undefined, ast, options);
|
|
9581
9581
|
if (issues) {
|
|
9582
|
-
result =
|
|
9582
|
+
result = fail5(new Composite(ast, issues, value, options));
|
|
9583
9583
|
}
|
|
9584
9584
|
}
|
|
9585
9585
|
} else {
|
|
@@ -9587,7 +9587,7 @@ function compile(ast, compile, compileField, base, specialize) {
|
|
|
9587
9587
|
if (value !== missing) {
|
|
9588
9588
|
const issues = collectIssues(checks, value, undefined, ast, options);
|
|
9589
9589
|
if (issues) {
|
|
9590
|
-
return
|
|
9590
|
+
return fail5(new Composite(ast, issues, value, options));
|
|
9591
9591
|
}
|
|
9592
9592
|
}
|
|
9593
9593
|
return succeed6(value);
|
|
@@ -9758,7 +9758,7 @@ function makeOption(schema) {
|
|
|
9758
9758
|
function make19(schema) {
|
|
9759
9759
|
return makeConstructorSync(toType2(schema.ast));
|
|
9760
9760
|
}
|
|
9761
|
-
function
|
|
9761
|
+
function is(schema) {
|
|
9762
9762
|
return _is(schema.ast);
|
|
9763
9763
|
}
|
|
9764
9764
|
function makeIs(ast) {
|
|
@@ -9826,7 +9826,7 @@ var mergeParseOptions = (options, overrideOptions) => overrideOptions ? {
|
|
|
9826
9826
|
} : options;
|
|
9827
9827
|
var getValue = (value) => {
|
|
9828
9828
|
if (value === missing) {
|
|
9829
|
-
return
|
|
9829
|
+
return fail5(new InvalidValue);
|
|
9830
9830
|
}
|
|
9831
9831
|
return succeed6(value);
|
|
9832
9832
|
};
|
|
@@ -9876,7 +9876,7 @@ function asResult(parser) {
|
|
|
9876
9876
|
if (isSuccess2(exit)) {
|
|
9877
9877
|
return succeed(exit.value);
|
|
9878
9878
|
}
|
|
9879
|
-
return
|
|
9879
|
+
return fail2(getSchemaIssueOrThrow(exit.cause, "Result adapter can only return schema issues"));
|
|
9880
9880
|
};
|
|
9881
9881
|
}
|
|
9882
9882
|
function runSync3(effect, message) {
|
|
@@ -11296,11 +11296,11 @@ function isSchemaError(u) {
|
|
|
11296
11296
|
var TypeId25 = TypeId24;
|
|
11297
11297
|
function declareConstructor() {
|
|
11298
11298
|
return (typeParameters, run, annotations) => {
|
|
11299
|
-
return
|
|
11299
|
+
return make8(new Declaration(typeParameters.map(getAST), (typeParameters) => run(typeParameters.map((ast) => make8(ast))), annotations));
|
|
11300
11300
|
};
|
|
11301
11301
|
}
|
|
11302
11302
|
function declare(is, annotations) {
|
|
11303
|
-
return declareConstructor()([], () => (input, ast, options) => is(input) ? succeed6(input) :
|
|
11303
|
+
return declareConstructor()([], () => (input, ast, options) => is(input) ? succeed6(input) : fail5(new InvalidType(ast, input, options)), annotations);
|
|
11304
11304
|
}
|
|
11305
11305
|
class SchemaError extends (/* @__PURE__ */ TaggedError("SchemaError")) {
|
|
11306
11306
|
[SchemaErrorTypeId] = SchemaErrorTypeId;
|
|
@@ -11358,7 +11358,7 @@ function runSchemaErrorSync(self) {
|
|
|
11358
11358
|
}
|
|
11359
11359
|
throw getSchemaErrorOrThrow(exit.cause, "Sync adapter can only throw schema errors");
|
|
11360
11360
|
}
|
|
11361
|
-
var
|
|
11361
|
+
var is2 = is;
|
|
11362
11362
|
function decodeUnknownEffect2(schema, options) {
|
|
11363
11363
|
const parser = decodeUnknownEffect(schema, options);
|
|
11364
11364
|
return (input, options) => {
|
|
@@ -11394,27 +11394,27 @@ function encodeUnknownSync(schema, options) {
|
|
|
11394
11394
|
};
|
|
11395
11395
|
}
|
|
11396
11396
|
var encodeSync = encodeUnknownSync;
|
|
11397
|
-
var
|
|
11397
|
+
var make8 = make20;
|
|
11398
11398
|
function isSchema(u) {
|
|
11399
11399
|
return hasProperty(u, TypeId25) && u[TypeId25] === TypeId25;
|
|
11400
11400
|
}
|
|
11401
|
-
var optionalKey = /* @__PURE__ */ lambda((schema) =>
|
|
11401
|
+
var optionalKey = /* @__PURE__ */ lambda((schema) => make8(optionalKey2(schema.ast), {
|
|
11402
11402
|
schema
|
|
11403
11403
|
}));
|
|
11404
11404
|
var optional = /* @__PURE__ */ lambda((self) => {
|
|
11405
11405
|
const schema = UndefinedOr(self);
|
|
11406
|
-
return
|
|
11406
|
+
return make8(optional2(self.ast), {
|
|
11407
11407
|
schema
|
|
11408
11408
|
});
|
|
11409
11409
|
});
|
|
11410
|
-
var toType = /* @__PURE__ */ lambda((schema) =>
|
|
11410
|
+
var toType = /* @__PURE__ */ lambda((schema) => make8(toType2(schema.ast), {
|
|
11411
11411
|
schema
|
|
11412
11412
|
}));
|
|
11413
|
-
var toEncoded2 = /* @__PURE__ */ lambda((schema) =>
|
|
11413
|
+
var toEncoded2 = /* @__PURE__ */ lambda((schema) => make8(toEncoded(schema.ast), {
|
|
11414
11414
|
schema
|
|
11415
11415
|
}));
|
|
11416
11416
|
function Literal(literal) {
|
|
11417
|
-
const out =
|
|
11417
|
+
const out = make8(new Literal2(literal), {
|
|
11418
11418
|
literal,
|
|
11419
11419
|
transform(to) {
|
|
11420
11420
|
return out.pipe(decodeTo2(Literal(to), {
|
|
@@ -11429,21 +11429,21 @@ function templateLiteralParts(parts) {
|
|
|
11429
11429
|
return parts.map((part) => isSchema(part) ? part.ast : new Literal2(part));
|
|
11430
11430
|
}
|
|
11431
11431
|
function TemplateLiteral(parts) {
|
|
11432
|
-
return
|
|
11432
|
+
return make8(new TemplateLiteral2(templateLiteralParts(parts)), {
|
|
11433
11433
|
parts
|
|
11434
11434
|
});
|
|
11435
11435
|
}
|
|
11436
|
-
var Never = /* @__PURE__ */
|
|
11437
|
-
var Any = /* @__PURE__ */
|
|
11438
|
-
var Unknown = /* @__PURE__ */
|
|
11439
|
-
var Null = /* @__PURE__ */
|
|
11440
|
-
var Undefined2 = /* @__PURE__ */
|
|
11441
|
-
var String3 = /* @__PURE__ */
|
|
11442
|
-
var Number2 = /* @__PURE__ */
|
|
11443
|
-
var Boolean3 = /* @__PURE__ */
|
|
11444
|
-
var Void = /* @__PURE__ */
|
|
11436
|
+
var Never = /* @__PURE__ */ make8(never4);
|
|
11437
|
+
var Any = /* @__PURE__ */ make8(any);
|
|
11438
|
+
var Unknown = /* @__PURE__ */ make8(unknown);
|
|
11439
|
+
var Null = /* @__PURE__ */ make8(null_);
|
|
11440
|
+
var Undefined2 = /* @__PURE__ */ make8(undefined_2);
|
|
11441
|
+
var String3 = /* @__PURE__ */ make8(string2);
|
|
11442
|
+
var Number2 = /* @__PURE__ */ make8(number2);
|
|
11443
|
+
var Boolean3 = /* @__PURE__ */ make8(boolean);
|
|
11444
|
+
var Void = /* @__PURE__ */ make8(void_4);
|
|
11445
11445
|
function makeStruct(ast, fields) {
|
|
11446
|
-
return
|
|
11446
|
+
return make8(ast, {
|
|
11447
11447
|
fields,
|
|
11448
11448
|
mapFields(f, options) {
|
|
11449
11449
|
const fields = f(this.fields);
|
|
@@ -11458,19 +11458,19 @@ function fieldsAssign(fields) {
|
|
|
11458
11458
|
return lambda((struct) => struct.mapFields(assign(fields)));
|
|
11459
11459
|
}
|
|
11460
11460
|
function Record(key, value) {
|
|
11461
|
-
return
|
|
11461
|
+
return make8(record(key.ast, value.ast), {
|
|
11462
11462
|
key,
|
|
11463
11463
|
value
|
|
11464
11464
|
});
|
|
11465
11465
|
}
|
|
11466
11466
|
function StructWithRest(schema, records) {
|
|
11467
|
-
return
|
|
11467
|
+
return make8(structWithRest(schema.ast, records.map(getAST)), {
|
|
11468
11468
|
schema,
|
|
11469
11469
|
records
|
|
11470
11470
|
});
|
|
11471
11471
|
}
|
|
11472
11472
|
function makeTuple(ast, elements) {
|
|
11473
|
-
return
|
|
11473
|
+
return make8(ast, {
|
|
11474
11474
|
elements,
|
|
11475
11475
|
mapElements(f, options) {
|
|
11476
11476
|
const elements = f(this.elements);
|
|
@@ -11481,14 +11481,14 @@ function makeTuple(ast, elements) {
|
|
|
11481
11481
|
function Tuple(elements) {
|
|
11482
11482
|
return makeTuple(tuple(elements), elements);
|
|
11483
11483
|
}
|
|
11484
|
-
var ArraySchema = /* @__PURE__ */ lambda((schema) =>
|
|
11484
|
+
var ArraySchema = /* @__PURE__ */ lambda((schema) => make8(new Arrays(false, [], [schema.ast]), {
|
|
11485
11485
|
value: schema
|
|
11486
11486
|
}));
|
|
11487
|
-
var NonEmptyArray = /* @__PURE__ */ lambda((schema) =>
|
|
11487
|
+
var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make8(new Arrays(false, [schema.ast], [schema.ast]), {
|
|
11488
11488
|
value: schema
|
|
11489
11489
|
}));
|
|
11490
11490
|
function makeUnion(ast, members) {
|
|
11491
|
-
return
|
|
11491
|
+
return make8(ast, {
|
|
11492
11492
|
members,
|
|
11493
11493
|
mapMembers(f, options) {
|
|
11494
11494
|
const members = f(this.members);
|
|
@@ -11501,7 +11501,7 @@ function Union(members, options) {
|
|
|
11501
11501
|
}
|
|
11502
11502
|
function Literals(literals) {
|
|
11503
11503
|
const members = literals.map(Literal);
|
|
11504
|
-
return
|
|
11504
|
+
return make8(union(members, undefined, undefined), {
|
|
11505
11505
|
literals,
|
|
11506
11506
|
members,
|
|
11507
11507
|
mapMembers(f) {
|
|
@@ -11519,7 +11519,7 @@ var NullOr = /* @__PURE__ */ lambda((self) => Union([self, Null]));
|
|
|
11519
11519
|
var UndefinedOr = /* @__PURE__ */ lambda((self) => Union([self, Undefined2]));
|
|
11520
11520
|
function decodeTo2(to, transformation) {
|
|
11521
11521
|
return (from) => {
|
|
11522
|
-
return
|
|
11522
|
+
return make8(decodeTo(from.ast, to.ast, transformation ? makeTransformation(transformation) : passthrough3()), {
|
|
11523
11523
|
from,
|
|
11524
11524
|
to
|
|
11525
11525
|
});
|
|
@@ -11537,16 +11537,16 @@ function decode2(transformation) {
|
|
|
11537
11537
|
};
|
|
11538
11538
|
}
|
|
11539
11539
|
function withConstructorDefault(defaultValue) {
|
|
11540
|
-
return (schema) =>
|
|
11540
|
+
return (schema) => make8(withConstructorDefault2(schema.ast, defaultValue), {
|
|
11541
11541
|
schema
|
|
11542
11542
|
});
|
|
11543
11543
|
}
|
|
11544
|
-
function
|
|
11544
|
+
function tag2(literal) {
|
|
11545
11545
|
return Literal(literal).pipe(withConstructorDefault(succeed6(literal)));
|
|
11546
11546
|
}
|
|
11547
11547
|
function TaggedStruct(value, fields) {
|
|
11548
11548
|
return Struct({
|
|
11549
|
-
_tag:
|
|
11549
|
+
_tag: tag2(value),
|
|
11550
11550
|
...fields
|
|
11551
11551
|
});
|
|
11552
11552
|
}
|
|
@@ -11582,7 +11582,7 @@ function toTaggedUnion(tag) {
|
|
|
11582
11582
|
discriminantKeys.add(key);
|
|
11583
11583
|
discriminants.push(literal);
|
|
11584
11584
|
assignProperty(cases, literal, schema);
|
|
11585
|
-
assignProperty(guards, literal,
|
|
11585
|
+
assignProperty(guards, literal, is(toType(schema)));
|
|
11586
11586
|
return;
|
|
11587
11587
|
}
|
|
11588
11588
|
}
|
|
@@ -11637,7 +11637,7 @@ function TaggedUnion(casesByTag) {
|
|
|
11637
11637
|
match,
|
|
11638
11638
|
matchOrElse
|
|
11639
11639
|
} = toTaggedUnion("_tag")(union);
|
|
11640
|
-
return
|
|
11640
|
+
return make8(union.ast, {
|
|
11641
11641
|
cases,
|
|
11642
11642
|
isAnyOf,
|
|
11643
11643
|
guards,
|
|
@@ -11689,7 +11689,7 @@ function isBase64(annotations) {
|
|
|
11689
11689
|
...annotations
|
|
11690
11690
|
});
|
|
11691
11691
|
}
|
|
11692
|
-
var Finite = /* @__PURE__ */
|
|
11692
|
+
var Finite = /* @__PURE__ */ make8(finite);
|
|
11693
11693
|
function makeIsGreaterThan(options) {
|
|
11694
11694
|
const gt = isGreaterThan2(options.order);
|
|
11695
11695
|
const formatter = options.formatter ?? format;
|
|
@@ -12000,7 +12000,7 @@ var File = /* @__PURE__ */ instanceOf(globalThis.File, {
|
|
|
12000
12000
|
lastModified: Int2
|
|
12001
12001
|
}), transformEffect2({
|
|
12002
12002
|
decode: (e, options) => match5(decode(e.data), {
|
|
12003
|
-
onFailure: () =>
|
|
12003
|
+
onFailure: () => fail5(new InvalidValue({
|
|
12004
12004
|
expected: "a valid Base64 string"
|
|
12005
12005
|
}, e.data, options)),
|
|
12006
12006
|
onSuccess: (bytes) => {
|
|
@@ -12038,10 +12038,10 @@ var FormData2 = /* @__PURE__ */ instanceOf(globalThis.FormData, {
|
|
|
12038
12038
|
}),
|
|
12039
12039
|
expected: "FormData",
|
|
12040
12040
|
toCodecJson: () => link()(ArraySchema(Tuple([String3, Union([Struct({
|
|
12041
|
-
_tag:
|
|
12041
|
+
_tag: tag2("String"),
|
|
12042
12042
|
value: String3
|
|
12043
12043
|
}), Struct({
|
|
12044
|
-
_tag:
|
|
12044
|
+
_tag: tag2("File"),
|
|
12045
12045
|
value: File
|
|
12046
12046
|
})])])), transformEffect2({
|
|
12047
12047
|
decode: (e) => {
|
|
@@ -12106,7 +12106,7 @@ var Uint8ArrayFromBase64 = /* @__PURE__ */ Base64String.pipe(/* @__PURE__ */ dec
|
|
|
12106
12106
|
function CauseReason(error, defect) {
|
|
12107
12107
|
const schema = declareConstructor()([error, defect], ([error, defect]) => (input, ast, options) => {
|
|
12108
12108
|
if (!isReason(input)) {
|
|
12109
|
-
return
|
|
12109
|
+
return fail5(new InvalidType(ast, input, options));
|
|
12110
12110
|
}
|
|
12111
12111
|
switch (input._tag) {
|
|
12112
12112
|
case "Fail":
|
|
@@ -12176,7 +12176,7 @@ function CauseReason(error, defect) {
|
|
|
12176
12176
|
}
|
|
12177
12177
|
}))
|
|
12178
12178
|
});
|
|
12179
|
-
return
|
|
12179
|
+
return make8(schema.ast, {
|
|
12180
12180
|
error,
|
|
12181
12181
|
defect
|
|
12182
12182
|
});
|
|
@@ -12186,7 +12186,7 @@ function Cause(error, defect) {
|
|
|
12186
12186
|
const failures = ArraySchema(CauseReason(error, defect));
|
|
12187
12187
|
return (input, ast, options) => {
|
|
12188
12188
|
if (!isCause2(input)) {
|
|
12189
|
-
return
|
|
12189
|
+
return fail5(new InvalidType(ast, input, options));
|
|
12190
12190
|
}
|
|
12191
12191
|
return mapBothEager2(decodeUnknownEffect(failures)(input.reasons, options), {
|
|
12192
12192
|
onSuccess: fromReasons,
|
|
@@ -12213,7 +12213,7 @@ function Cause(error, defect) {
|
|
|
12213
12213
|
}) => failures
|
|
12214
12214
|
}))
|
|
12215
12215
|
});
|
|
12216
|
-
return
|
|
12216
|
+
return make8(schema.ast, {
|
|
12217
12217
|
error,
|
|
12218
12218
|
defect
|
|
12219
12219
|
});
|
|
@@ -12229,7 +12229,7 @@ function Exit(value, error, defect) {
|
|
|
12229
12229
|
const cause = Cause(error, defect);
|
|
12230
12230
|
return (input, ast, options) => {
|
|
12231
12231
|
if (!isExit(input)) {
|
|
12232
|
-
return
|
|
12232
|
+
return fail5(new InvalidType(ast, input, options));
|
|
12233
12233
|
}
|
|
12234
12234
|
switch (input._tag) {
|
|
12235
12235
|
case "Success":
|
|
@@ -12274,7 +12274,7 @@ function Exit(value, error, defect) {
|
|
|
12274
12274
|
}
|
|
12275
12275
|
}))
|
|
12276
12276
|
});
|
|
12277
|
-
return
|
|
12277
|
+
return make8(schema.ast, {
|
|
12278
12278
|
value,
|
|
12279
12279
|
error,
|
|
12280
12280
|
defect
|
|
@@ -12375,8 +12375,8 @@ function getClassSchemaFactory(from, identifier, annotations) {
|
|
|
12375
12375
|
const ClassTypeId = getClassTypeId(identifier);
|
|
12376
12376
|
const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
|
|
12377
12377
|
const transformation = getClassTransformation(self);
|
|
12378
|
-
const to =
|
|
12379
|
-
return isClassValue(input) ? succeed6(input) :
|
|
12378
|
+
const to = make8(new Declaration([from.ast], () => (input, ast, options) => {
|
|
12379
|
+
return isClassValue(input) ? succeed6(input) : fail5(new InvalidType(ast, input, options));
|
|
12380
12380
|
}, {
|
|
12381
12381
|
identifier,
|
|
12382
12382
|
[CONSTRUCTOR_ANNOTATION_KEY]: ([from]) => ({
|
|
@@ -12415,7 +12415,7 @@ var Error2 = (identifier) => (schema, annotations) => {
|
|
|
12415
12415
|
var TaggedError2 = (identifier) => {
|
|
12416
12416
|
return (tagValue, schema, annotations) => {
|
|
12417
12417
|
const struct = isStruct(schema) ? schema.mapFields((fields) => ({
|
|
12418
|
-
_tag:
|
|
12418
|
+
_tag: tag2(tagValue),
|
|
12419
12419
|
...fields
|
|
12420
12420
|
}), {
|
|
12421
12421
|
unsafePreserveChecks: true
|
|
@@ -12429,7 +12429,7 @@ function toJsonSchemaDocument(schema, options) {
|
|
|
12429
12429
|
}
|
|
12430
12430
|
var toCodecJson = toCodecJson2;
|
|
12431
12431
|
var toCodecStringTree = toCodecStringTree2;
|
|
12432
|
-
var Json = /* @__PURE__ */
|
|
12432
|
+
var Json = /* @__PURE__ */ make8(/* @__PURE__ */ annotate(Json2, {
|
|
12433
12433
|
toCode: () => ({
|
|
12434
12434
|
runtime: "Schema.Json",
|
|
12435
12435
|
Type: "Schema.Json"
|
|
@@ -12929,7 +12929,7 @@ var make23 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
|
|
|
12929
12929
|
const controller = scopedController ?? new AbortController;
|
|
12930
12930
|
const urlResult = make21(request.url, request.urlParams, getOrUndefined(request.hash));
|
|
12931
12931
|
if (isFailure(urlResult)) {
|
|
12932
|
-
return
|
|
12932
|
+
return fail5(new HttpClientError({
|
|
12933
12933
|
reason: new InvalidUrlError({
|
|
12934
12934
|
request,
|
|
12935
12935
|
cause: urlResult.failure
|
|
@@ -12948,7 +12948,7 @@ var make23 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
|
|
|
12948
12948
|
return succeed6(new InterruptibleResponse(response, controller));
|
|
12949
12949
|
},
|
|
12950
12950
|
onFailure(cause) {
|
|
12951
|
-
if (
|
|
12951
|
+
if (hasInterrupts(cause)) {
|
|
12952
12952
|
controller.abort();
|
|
12953
12953
|
}
|
|
12954
12954
|
return failCause5(cause);
|
|
@@ -12994,7 +12994,7 @@ var make23 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
|
|
|
12994
12994
|
return succeed6(new InterruptibleResponse(response, controller));
|
|
12995
12995
|
},
|
|
12996
12996
|
onFailure(cause) {
|
|
12997
|
-
if (!scopedController &&
|
|
12997
|
+
if (!scopedController && hasInterrupts(cause)) {
|
|
12998
12998
|
controller.abort();
|
|
12999
12999
|
}
|
|
13000
13000
|
return failCause5(cause);
|
|
@@ -13175,7 +13175,7 @@ var pullIntoWritable = (options) => options.pull.pipe(flatMap3((chunk) => {
|
|
|
13175
13175
|
});
|
|
13176
13176
|
});
|
|
13177
13177
|
}) : identity, raceFirst(callback2((resume) => {
|
|
13178
|
-
const onError = (error) => resume(
|
|
13178
|
+
const onError = (error) => resume(fail5(options.onError(error)));
|
|
13179
13179
|
options.writable.once("error", onError);
|
|
13180
13180
|
return sync2(() => {
|
|
13181
13181
|
options.writable.off("error", onError);
|
|
@@ -13191,7 +13191,7 @@ var fromReadableChannel = (options) => fromTransform((_, scope) => readableToPul
|
|
|
13191
13191
|
chunkSize: options.chunkSize,
|
|
13192
13192
|
closeOnDone: options.closeOnDone
|
|
13193
13193
|
}));
|
|
13194
|
-
var toReadable = (stream) => map5(
|
|
13194
|
+
var toReadable = (stream) => map5(context2(), (context) => new StreamAdapter(context, stream));
|
|
13195
13195
|
var toArrayBuffer = (readable, options) => {
|
|
13196
13196
|
const maxBytesNumber = toMaxBytes(options?.maxBytes);
|
|
13197
13197
|
const onError = options?.onError ?? defaultOnError;
|
|
@@ -13203,7 +13203,7 @@ var toArrayBuffer = (readable, options) => {
|
|
|
13203
13203
|
if ("closed" in stream && !stream.closed) {
|
|
13204
13204
|
stream.destroy();
|
|
13205
13205
|
}
|
|
13206
|
-
resume(
|
|
13206
|
+
resume(fail5(onError(err)));
|
|
13207
13207
|
});
|
|
13208
13208
|
stream.once("end", () => {
|
|
13209
13209
|
const buffer = buffers.length === 1 ? buffers[0] : Buffer.concat(buffers);
|
|
@@ -13219,7 +13219,7 @@ var toArrayBuffer = (readable, options) => {
|
|
|
13219
13219
|
if ("closed" in stream && !stream.closed) {
|
|
13220
13220
|
stream.destroy();
|
|
13221
13221
|
}
|
|
13222
|
-
resume(
|
|
13222
|
+
resume(fail5(onError(new Error("maxBytes exceeded"))));
|
|
13223
13223
|
}
|
|
13224
13224
|
});
|
|
13225
13225
|
return sync2(() => {
|
|
@@ -13232,17 +13232,17 @@ var toArrayBuffer = (readable, options) => {
|
|
|
13232
13232
|
var readableToPullUnsafe = (options) => {
|
|
13233
13233
|
const readable = options.readable;
|
|
13234
13234
|
const closeOnDone = options.closeOnDone ?? true;
|
|
13235
|
-
const exit = options.exit ??
|
|
13235
|
+
const exit = options.exit ?? make9(undefined);
|
|
13236
13236
|
const latch = options.latch ?? makeUnsafe5(false);
|
|
13237
13237
|
function onReadable() {
|
|
13238
13238
|
latch.openUnsafe();
|
|
13239
13239
|
}
|
|
13240
13240
|
function onError(error) {
|
|
13241
|
-
exit.current =
|
|
13241
|
+
exit.current = fail3(options.onError(error));
|
|
13242
13242
|
latch.openUnsafe();
|
|
13243
13243
|
}
|
|
13244
13244
|
function onEnd() {
|
|
13245
|
-
exit.current =
|
|
13245
|
+
exit.current = fail3(Done2());
|
|
13246
13246
|
latch.openUnsafe();
|
|
13247
13247
|
}
|
|
13248
13248
|
readable.on("readable", onReadable);
|
|
@@ -13255,7 +13255,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
13255
13255
|
return exit.current;
|
|
13256
13256
|
}
|
|
13257
13257
|
if (readable.readableEnded) {
|
|
13258
|
-
return
|
|
13258
|
+
return fail5(Done2());
|
|
13259
13259
|
}
|
|
13260
13260
|
latch.closeUnsafe();
|
|
13261
13261
|
return flatMap3(latch.await, loop);
|
|
@@ -13676,7 +13676,7 @@ var sendBody = (nodeRequest, request, body) => suspend2(() => {
|
|
|
13676
13676
|
});
|
|
13677
13677
|
var waitForResponse = (nodeRequest, request) => callback2((resume) => {
|
|
13678
13678
|
function onError(cause) {
|
|
13679
|
-
resume(
|
|
13679
|
+
resume(fail5(new HttpClientError({
|
|
13680
13680
|
reason: new TransportError({
|
|
13681
13681
|
request,
|
|
13682
13682
|
cause
|
|
@@ -13698,7 +13698,7 @@ var waitForResponse = (nodeRequest, request) => callback2((resume) => {
|
|
|
13698
13698
|
});
|
|
13699
13699
|
var waitForFinish = (nodeRequest, request) => callback2((resume) => {
|
|
13700
13700
|
function onError(cause) {
|
|
13701
|
-
resume(
|
|
13701
|
+
resume(fail5(new HttpClientError({
|
|
13702
13702
|
reason: new TransportError({
|
|
13703
13703
|
request,
|
|
13704
13704
|
cause
|
|
@@ -13928,13 +13928,13 @@ function _format(sep, pathObject) {
|
|
|
13928
13928
|
}
|
|
13929
13929
|
function fromFileUrl(url) {
|
|
13930
13930
|
if (url.protocol !== "file:") {
|
|
13931
|
-
return
|
|
13931
|
+
return fail5(new BadArgument({
|
|
13932
13932
|
module: "Path",
|
|
13933
13933
|
method: "fromFileUrl",
|
|
13934
13934
|
description: "URL must be of scheme file"
|
|
13935
13935
|
}));
|
|
13936
13936
|
} else if (url.hostname !== "") {
|
|
13937
|
-
return
|
|
13937
|
+
return fail5(new BadArgument({
|
|
13938
13938
|
module: "Path",
|
|
13939
13939
|
method: "fromFileUrl",
|
|
13940
13940
|
description: "Invalid file URL host"
|
|
@@ -13945,7 +13945,7 @@ function fromFileUrl(url) {
|
|
|
13945
13945
|
if (pathname[n] === "%") {
|
|
13946
13946
|
const third = pathname.codePointAt(n + 2) | 32;
|
|
13947
13947
|
if (pathname[n + 1] === "2" && third === 102) {
|
|
13948
|
-
return
|
|
13948
|
+
return fail5(new BadArgument({
|
|
13949
13949
|
module: "Path",
|
|
13950
13950
|
method: "fromFileUrl",
|
|
13951
13951
|
description: "must not include encoded / characters"
|
|
@@ -14789,7 +14789,7 @@ var make26 = /* @__PURE__ */ gen(function* () {
|
|
|
14789
14789
|
const deferred = makeUnsafe3();
|
|
14790
14790
|
const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);
|
|
14791
14791
|
handle.on("error", (error) => {
|
|
14792
|
-
resume(
|
|
14792
|
+
resume(fail5(toPlatformError("spawn", error, command)));
|
|
14793
14793
|
});
|
|
14794
14794
|
handle.on("exit", (...args) => {
|
|
14795
14795
|
doneUnsafe(deferred, succeed3(args));
|
|
@@ -14806,7 +14806,7 @@ var make26 = /* @__PURE__ */ gen(function* () {
|
|
|
14806
14806
|
return callback2((resume) => {
|
|
14807
14807
|
taskkill(childProcess, (error) => {
|
|
14808
14808
|
if (error) {
|
|
14809
|
-
resume(
|
|
14809
|
+
resume(fail5(toPlatformError("kill", toError(error), command)));
|
|
14810
14810
|
} else {
|
|
14811
14811
|
resume(void_3);
|
|
14812
14812
|
}
|
|
@@ -14833,7 +14833,7 @@ var make26 = /* @__PURE__ */ gen(function* () {
|
|
|
14833
14833
|
const killed = childProcess.kill(signal);
|
|
14834
14834
|
if (!killed) {
|
|
14835
14835
|
const error = new globalThis.Error("Failed to kill child process");
|
|
14836
|
-
return
|
|
14836
|
+
return fail5(toPlatformError("kill", error, command));
|
|
14837
14837
|
}
|
|
14838
14838
|
return void_3;
|
|
14839
14839
|
});
|
|
@@ -14955,7 +14955,7 @@ var make26 = /* @__PURE__ */ gen(function* () {
|
|
|
14955
14955
|
return succeed6(ExitCode(code));
|
|
14956
14956
|
}
|
|
14957
14957
|
const error = new globalThis.Error(`Process interrupted due to receipt of signal: '${signal}'`);
|
|
14958
|
-
return
|
|
14958
|
+
return fail5(toPlatformError("exitCode", error, cmd));
|
|
14959
14959
|
});
|
|
14960
14960
|
const kill = (options) => terminateProcessGroup(cmd, childProcess, exitSignal, options);
|
|
14961
14961
|
return makeHandle({
|
|
@@ -15187,7 +15187,7 @@ var make27 = (impl) => {
|
|
|
15187
15187
|
randomULID: clockWith2((clock) => succeed6(ulidString(clock.currentTimeMillisUnsafe(), randomBytesUnsafe(10))))
|
|
15188
15188
|
});
|
|
15189
15189
|
};
|
|
15190
|
-
var validateSize = (method, size) => Number.isSafeInteger(size) && size >= 0 ? succeed6(size) :
|
|
15190
|
+
var validateSize = (method, size) => Number.isSafeInteger(size) && size >= 0 ? succeed6(size) : fail5(badArgument({
|
|
15191
15191
|
module: "Crypto",
|
|
15192
15192
|
method,
|
|
15193
15193
|
description: "size must be a non-negative safe integer"
|
|
@@ -15362,7 +15362,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
15362
15362
|
return suspend2(() => {
|
|
15363
15363
|
const position = from === "start" ? offset : this.position + offset;
|
|
15364
15364
|
if (position < BigInt(0)) {
|
|
15365
|
-
return
|
|
15365
|
+
return fail5(badArgument({
|
|
15366
15366
|
module: "FileSystem",
|
|
15367
15367
|
method: "seek",
|
|
15368
15368
|
description: "Cannot seek before the start of the file"
|
|
@@ -15408,7 +15408,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
15408
15408
|
return some(dst);
|
|
15409
15409
|
});
|
|
15410
15410
|
} catch (cause) {
|
|
15411
|
-
return
|
|
15411
|
+
return fail5(handleBadArgument("readAlloc")(cause));
|
|
15412
15412
|
}
|
|
15413
15413
|
});
|
|
15414
15414
|
}
|
|
@@ -15438,7 +15438,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
15438
15438
|
const position = this.position;
|
|
15439
15439
|
return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "writeAll"), (nodePosition) => flatMap3(nodeWriteAll(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
|
|
15440
15440
|
if (bytesWritten === 0) {
|
|
15441
|
-
return
|
|
15441
|
+
return fail5(systemError({
|
|
15442
15442
|
module: "FileSystem",
|
|
15443
15443
|
method: "writeAll",
|
|
15444
15444
|
_tag: "WriteZero",
|
|
@@ -15487,13 +15487,13 @@ var readFile2 = (path) => callback2((resume, signal) => {
|
|
|
15487
15487
|
signal
|
|
15488
15488
|
}, (err, data) => {
|
|
15489
15489
|
if (err) {
|
|
15490
|
-
resume(
|
|
15490
|
+
resume(fail5(handleErrnoException("FileSystem", "readFile")(err, [path])));
|
|
15491
15491
|
} else {
|
|
15492
15492
|
resume(succeed6(data));
|
|
15493
15493
|
}
|
|
15494
15494
|
});
|
|
15495
15495
|
} catch (err) {
|
|
15496
|
-
resume(
|
|
15496
|
+
resume(fail5(handleBadArgument("readFile")(err)));
|
|
15497
15497
|
}
|
|
15498
15498
|
});
|
|
15499
15499
|
var readLink = /* @__PURE__ */ (() => {
|
|
@@ -15598,13 +15598,13 @@ var writeFile2 = (path, data, options) => callback2((resume, signal) => {
|
|
|
15598
15598
|
mode: options?.mode
|
|
15599
15599
|
}, (err) => {
|
|
15600
15600
|
if (err) {
|
|
15601
|
-
resume(
|
|
15601
|
+
resume(fail5(handleErrnoException("FileSystem", "writeFile")(err, [path])));
|
|
15602
15602
|
} else {
|
|
15603
15603
|
resume(void_3);
|
|
15604
15604
|
}
|
|
15605
15605
|
});
|
|
15606
15606
|
} catch (err) {
|
|
15607
|
-
resume(
|
|
15607
|
+
resume(fail5(handleBadArgument("writeFile")(err)));
|
|
15608
15608
|
}
|
|
15609
15609
|
});
|
|
15610
15610
|
var makeFileSystem = /* @__PURE__ */ map5(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make17({
|
|
@@ -15740,7 +15740,7 @@ var TypeId36 = "~effect/Terminal";
|
|
|
15740
15740
|
var QuitErrorTypeId = "~effect/Terminal/QuitError";
|
|
15741
15741
|
|
|
15742
15742
|
class QuitError extends (/* @__PURE__ */ Error2("QuitError")({
|
|
15743
|
-
_tag: /* @__PURE__ */
|
|
15743
|
+
_tag: /* @__PURE__ */ tag2("QuitError")
|
|
15744
15744
|
})) {
|
|
15745
15745
|
[QuitErrorTypeId] = QuitErrorTypeId;
|
|
15746
15746
|
}
|
|
@@ -15756,7 +15756,7 @@ import * as readline from "node:readline";
|
|
|
15756
15756
|
var make31 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
15757
15757
|
const stdin = process.stdin;
|
|
15758
15758
|
const stdout = process.stdout;
|
|
15759
|
-
const lines = yield*
|
|
15759
|
+
const lines = yield* make11();
|
|
15760
15760
|
let inputEnded = stdin.readableEnded;
|
|
15761
15761
|
let readlineActive = false;
|
|
15762
15762
|
const onStdinEnd = () => {
|
|
@@ -15811,7 +15811,7 @@ var make31 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
15811
15811
|
const columns = sync2(() => stdout.columns ?? 0);
|
|
15812
15812
|
const rows = sync2(() => stdout.rows ?? 0);
|
|
15813
15813
|
const readInput = gen(function* () {
|
|
15814
|
-
const queue = yield*
|
|
15814
|
+
const queue = yield* make11();
|
|
15815
15815
|
const handleKeypress = (s, k) => {
|
|
15816
15816
|
const userInput = {
|
|
15817
15817
|
input: fromUndefinedOr(s),
|
|
@@ -15851,7 +15851,7 @@ var make31 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
15851
15851
|
onSome: succeed6
|
|
15852
15852
|
})), mapError(() => new QuitError({}))));
|
|
15853
15853
|
const display = (prompt) => uninterruptible(callback2((resume) => {
|
|
15854
|
-
stdout.write(prompt, (err) => isNullish(err) ? resume(void_3) : resume(
|
|
15854
|
+
stdout.write(prompt, (err) => isNullish(err) ? resume(void_3) : resume(fail5(badArgument({
|
|
15855
15855
|
module: "Terminal",
|
|
15856
15856
|
method: "display",
|
|
15857
15857
|
description: "Failed to write prompt to stdout",
|
|
@@ -15876,4 +15876,4 @@ var layer13 = layer12;
|
|
|
15876
15876
|
|
|
15877
15877
|
// node_modules/@effect/platform-node/dist/NodeServices.js
|
|
15878
15878
|
var layer2 = /* @__PURE__ */ provideMerge(layer4, /* @__PURE__ */ mergeAll(layer8, layer6, layer10, layer, layer13));
|
|
15879
|
-
export { hash, equals, redact, format, NodeInspectSymbol, toJson, getStackTraceLimit, setStackTraceLimit, assignProperty, PipeInspectableProto, withFiber, Prototype, isGreaterThanOrEqualTo, none, some, isNone, isSome, match, getOrElse, fromUndefinedOr, getOrUndefined, map, flatMap, exists, Service2, makeUnsafe2, empty, make4, add, getOrUndefined2, getOrUndefinedUnsafe, getUnsafe, get, merge, Reference,
|
|
15879
|
+
export { hash, equals, redact, format, NodeInspectSymbol, toJson, getStackTraceLimit, setStackTraceLimit, assignProperty, PipeInspectableProto, withFiber, Prototype, isGreaterThanOrEqualTo, none, some, isNone, isSome, match, getOrElse, fromUndefinedOr, getOrUndefined, map, flatMap, exists, Service2, makeUnsafe2, empty, make4, add, getOrUndefined2, getOrUndefinedUnsafe, getUnsafe, get, merge, Reference, normalize, succeed, fail2, isResult, isFailure, isSuccess, map2, filter, match2, isReadonlyArrayNonEmpty, isCanonicalArrayIndex, take, findFirstIndex, findFirst, findLast, empty2, map3, reduce, fromInputUnsafe, isFinite2, isZero, zero, millis, toMillis, Scheduler, Class, taggedEnum, TaggedError, ParentSpan, externalSpan, getCurrentFiber, succeed2, sync, suspend, succeedNone, void_, callback, asSome, flatMap2, onExitPrimitive, uninterruptibleMask, ClockRef, currentTimeMillis2, ConsoleRef, LogLevelOrder, reportCauseUnsafe, map4, squash, hasDies, hasInterrupts, interruptors, IllegalArgumentError, ExceededCapacityError, StackTrace, isExit, succeed3, failCause, fail3, die, interrupt, void_2, isSuccess2, isFailure2, hasInterrupts2, asVoid, isDeferred, makeUnsafe3, make5, _await, done, fail4, interruptWith, succeed4, doneUnsafe, CurrentLogLevel, MinimumLogLevel, Scope, make6, makeUnsafe4, provide, addFinalizerExit, addFinalizer, fork, forkUnsafe, close, closeUnsafe, use, succeed5, effect, effectContext, effectDiscard, mergeAll, provide2, provideMerge, launch, catchDone, modifyDelay, spaced, setInputType, isEffect, all, forEach, whileLoop, promise, tryPromise, succeed6, succeedNone2, suspend2, sync2, void_3, callback2, never, gen, fail5, die2, try_, withFiber2, fromResult, flatMap3, andThen, tap, result, option2, exit, map5, as, asVoid2, catch_, catchTag, catchTags, catchCause, catchDefect, catchIf, catchFilter, catchCauseIf, mapError, orDie, tapError, tapCause, retry, sandbox, ignore, ignoreCause, orElseSucceed, timeout, timeoutOption, timeoutOrElse, sleep, race, raceFirst, when2, match3, matchCauseEffect, matchEffect, context2, contextWith, provide3, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, acquireUseRelease, ensuring, onError, onExit, interrupt2, interruptible, onInterrupt, uninterruptible, uninterruptibleMask2, forever, repeat, makeSpanScoped, useSpan, withSpan, withParentSpan, forkChild, forkIn, forkScoped, forkDetach, runFork, runForkWith, runPromise, runSync, fnUntraced, fn, logFatal, logError, logDebug, annotateLogs, mapEager, flatMapEager, catchEager, encode, decode, empty3, make7, value2, empty4, fromInput, fromRecordUnsafe, set, setAll, merge2, remove, Pointer, defaultFormatter, passthrough, transformEffect, transformOptional, withDefault2, Transformation, unknown, applyToSelfOrLastLinkEncoding, decodeTo, toEncoded, _is, decodeUnknownEffect, omit, declare, SchemaError, is2, decodeUnknownEffect2, decodeUnknownOption, decodeUnknownResult, decodeUnknownSync, decodeSync, encodeUnknownEffect, encodeEffect, encodeUnknownOption, encodeSync, make8, isSchema, optionalKey, optional, toType, toEncoded2, Literal, TemplateLiteral, Never, Any, Unknown, Null, String3, Number2, Boolean3, Void, Struct, fieldsAssign, Record, StructWithRest, Tuple, ArraySchema, NonEmptyArray, Union, Literals, NullOr, UndefinedOr, decodeTo2, TrueLiterals, FalseLiterals, BooleanLiterals, decode2, withConstructorDefault, tag2, TaggedStruct, TaggedUnion, Opaque, makeFilter, isPattern, Finite, isGreaterThan, isGreaterThanOrEqualTo2, isBetween, isInt, Int2, isMaxLength, NonEmptyString, Defect, Uint8ArrayFromBase64, Exit, Class2, Error2, TaggedError2, toJsonSchemaDocument, toCodecJson, toCodecStringTree, Json, JsonObject, join, interrupt3, getCurrent, runIn, makeUnsafe5, make9, set2, Empty, make10, append, prepend, takeAll, take2, remove2, make11, bounded, dropping, offer, offerUnsafe, offerAll, failCause2, end, shutdownUnsafe, takeAll2, take3, isStream, fromQueue, unwrap, provideContext2, run2, runForEach, runForEachArray, FileSystem, Path, errorExitCode, errorReported, Stdio, QuitError, isQuitError, Terminal, empty5, jsonUnsafe, get2, post, setHeader, bodyJson, HttpClient, layerNodeHttp, exports_NodeHttpClient, runMain, exports_NodeRuntime, layer, exports_NodeStdio, layer2, exports_NodeServices };
|