@opencode/browse 0.0.17-dev.169 → 0.0.17-dev.171
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/{Runtime-qfc1eg1n.mjs → Runtime-jrg7sc9p.mjs} +1 -1
- package/dist/{cli-zx7g8fek.mjs → cli-n2yqdpef.mjs} +49 -49
- package/dist/cli.mjs +14 -14
- package/dist/{helpers-nxtpzjhw.mjs → helpers-na4s8h8f.mjs} +1 -1
- package/dist/{index-yaf37ery.mjs → index-j79y2me1.mjs} +2 -2
- package/dist/{legacy-runtime-rvcn5zs6.mjs → legacy-runtime-pef5jajn.mjs} +4 -4
- package/dist/{main-4074weqb.mjs → main-048kx59h.mjs} +1 -1
- package/dist/{main-wf904nhj.mjs → main-31mjsvtm.mjs} +2 -2
- package/dist/{main-w80ghbx8.mjs → main-3gx5fe95.mjs} +1 -1
- package/dist/{main-9bk4pprj.mjs → main-3mhynene.mjs} +1 -1
- package/dist/{main-m3xnn0cx.mjs → main-5snyxk65.mjs} +4 -4
- package/dist/{main-dwjfhfpm.mjs → main-6q5nqhy7.mjs} +1 -1
- package/dist/{main-v6hzbxjd.mjs → main-f98q5tcf.mjs} +12 -12
- package/dist/{main-sx7qpdfw.mjs → main-g13tfban.mjs} +3 -3
- package/dist/{main-6k1dq78p.mjs → main-gvzdjgte.mjs} +3 -3
- package/dist/main-hrrgcjhe.mjs +4 -0
- package/dist/{main-h55dwr1s.mjs → main-ma5ncx3b.mjs} +2 -2
- package/dist/{main-rvmzfmb7.mjs → main-qq7x2tgn.mjs} +5 -5
- package/dist/{main-jf7jberd.mjs → main-s3g4jwx5.mjs} +41 -41
- package/dist/{main-gbq7c729.mjs → main-t8c7aq8b.mjs} +3 -3
- package/dist/{main-xycdhwqs.mjs → main-wpt5ha44.mjs} +23 -23
- package/dist/{main-fs2ymcvd.mjs → main-x9vdxj9f.mjs} +18 -18
- package/dist/{mcp-37b0xgq0.mjs → mcp-eqfvz2d5.mjs} +60 -60
- package/dist/{migrate-49s4pykq.mjs → migrate-h0e3yv0y.mjs} +4 -4
- package/dist/{relay-jkgh5rzg.mjs → relay-9fsv094e.mjs} +306 -66
- package/dist/{runtime-update-9d3dsv6t.mjs → runtime-update-7m0tkybs.mjs} +7 -7
- package/dist/{setup-74nz1gqg.mjs → setup-ac6kjvgh.mjs} +7 -7
- package/dist/{skill-text-z1pce87x.mjs → skill-text-thdaq5mc.mjs} +14 -1
- package/dist/{supervisor-5pjptkgz.mjs → supervisor-638mhqwx.mjs} +3 -3
- package/dist/{update-n4sw8eht.mjs → update-tyrveejz.mjs} +3 -3
- package/dist/{version-2cadxvsa.mjs → version-njwyb4qk.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +14 -1
- package/dist/main-9xbcy9q0.mjs +0 -4
|
@@ -1217,7 +1217,7 @@ var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? onNone(
|
|
|
1217
1217
|
var fromNullishOr = (a) => a == null ? none() : some(a);
|
|
1218
1218
|
var fromUndefinedOr = (a) => a === undefined ? none() : some(a);
|
|
1219
1219
|
var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
|
|
1220
|
-
var
|
|
1220
|
+
var map2 = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? none() : some(f(self.value)));
|
|
1221
1221
|
var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? none() : f(self.value));
|
|
1222
1222
|
var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
|
|
1223
1223
|
var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
|
|
@@ -1844,7 +1844,7 @@ var isResult = isResult2;
|
|
|
1844
1844
|
var isFailure = isFailure3;
|
|
1845
1845
|
var isSuccess = isSuccess3;
|
|
1846
1846
|
var mapError = /* @__PURE__ */ dual(2, (self, f) => isFailure(self) ? fail2(f(self.failure)) : self);
|
|
1847
|
-
var
|
|
1847
|
+
var map3 = /* @__PURE__ */ dual(2, (self, f) => isSuccess(self) ? succeed(f(self.success)) : self);
|
|
1848
1848
|
var match2 = /* @__PURE__ */ dual(2, (self, {
|
|
1849
1849
|
onFailure,
|
|
1850
1850
|
onSuccess
|
|
@@ -1932,7 +1932,7 @@ var findLast = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
1932
1932
|
});
|
|
1933
1933
|
var empty5 = () => [];
|
|
1934
1934
|
var of = (a) => [a];
|
|
1935
|
-
var
|
|
1935
|
+
var map4 = /* @__PURE__ */ dual(2, (self, f) => self.map(f));
|
|
1936
1936
|
var reduce = /* @__PURE__ */ dual(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b));
|
|
1937
1937
|
var makeEquivalence = Array_;
|
|
1938
1938
|
|
|
@@ -3142,7 +3142,7 @@ var tapCont = function(value) {
|
|
|
3142
3142
|
var tapEffectCont = function(value) {
|
|
3143
3143
|
return new ContImpl(this.payload, succeedPayload, value);
|
|
3144
3144
|
};
|
|
3145
|
-
var asSome = (self) =>
|
|
3145
|
+
var asSome = (self) => map(self, some);
|
|
3146
3146
|
var andThen = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, isEffect2(f) ? returnPayload : andThenCont, f));
|
|
3147
3147
|
var tap2 = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, isEffect2(f) ? tapEffectCont : tapCont, f));
|
|
3148
3148
|
var asVoid3 = (self) => new ContImpl(self, returnPayload, exitVoid);
|
|
@@ -3226,8 +3226,8 @@ var flatMapEager2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
return flatMap2(self, f);
|
|
3228
3228
|
});
|
|
3229
|
-
var
|
|
3230
|
-
var mapEager2 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) :
|
|
3229
|
+
var map = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, mapCont, f));
|
|
3230
|
+
var mapEager2 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map(self, f));
|
|
3231
3231
|
var mapErrorEager2 = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMapError(self, f) : mapError3(self, f));
|
|
3232
3232
|
var mapBothEager2 = /* @__PURE__ */ dual(2, (self, options) => effectIsExit(self) ? exitMapBoth(self, options) : mapBoth(self, options));
|
|
3233
3233
|
var catchEager2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
@@ -3311,9 +3311,9 @@ var provideService2 = function() {
|
|
|
3311
3311
|
return dual(3, (self, service, impl) => provideServiceImpl(self, service, impl)).apply(this, arguments);
|
|
3312
3312
|
};
|
|
3313
3313
|
var provideServiceImpl = (self, service, implementation) => updateContext2(self, add(service, implementation));
|
|
3314
|
-
var zipWith2 = /* @__PURE__ */ dual((args) => isEffect2(args[1]), (self, that, f, options) => options?.concurrent ?
|
|
3314
|
+
var zipWith2 = /* @__PURE__ */ dual((args) => isEffect2(args[1]), (self, that, f, options) => options?.concurrent ? map(all2([self, that], {
|
|
3315
3315
|
concurrency: 2
|
|
3316
|
-
}), ([a, a2]) => f(a, a2)) : flatMap2(self, (a) =>
|
|
3316
|
+
}), ([a, a2]) => f(a, a2)) : flatMap2(self, (a) => map(that, (a2) => f(a, a2))));
|
|
3317
3317
|
var when = /* @__PURE__ */ dual(2, (self, condition) => flatMap2(condition, (pass) => pass ? asSome(self) : succeedNone));
|
|
3318
3318
|
var forever2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options) => whileLoop2({
|
|
3319
3319
|
while: constTrue,
|
|
@@ -3804,7 +3804,7 @@ var all2 = (arg, options) => {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
return suspend(() => {
|
|
3806
3806
|
const out = {};
|
|
3807
|
-
return as2(forEach2(Object.entries(arg), ([key, effect]) =>
|
|
3807
|
+
return as2(forEach2(Object.entries(arg), ([key, effect]) => map(options?.mode === "result" ? result2(effect) : effect, (value) => {
|
|
3808
3808
|
assignProperty(out, key, value);
|
|
3809
3809
|
}), {
|
|
3810
3810
|
discard: true,
|
|
@@ -4807,7 +4807,7 @@ class CurrentMemoMap extends (/* @__PURE__ */ Service2()("effect/Layer/CurrentMe
|
|
|
4807
4807
|
return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe();
|
|
4808
4808
|
}
|
|
4809
4809
|
}
|
|
4810
|
-
var buildWithMemoMap = /* @__PURE__ */ dual(3, (self, memoMap, scope) => provideService2(
|
|
4810
|
+
var buildWithMemoMap = /* @__PURE__ */ dual(3, (self, memoMap, scope) => provideService2(map(self.build(memoMap, scope), add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
|
|
4811
4811
|
var build = (self) => withFiber((fiber) => buildWithMemoMap(self, CurrentMemoMap.forkOrCreate(fiber.context), getUnsafe(fiber.context, Scope)));
|
|
4812
4812
|
var buildWithScope = /* @__PURE__ */ dual(2, (self, scope) => withFiber((fiber) => buildWithMemoMap(self, CurrentMemoMap.forkOrCreate(fiber.context), scope)));
|
|
4813
4813
|
var succeed5 = function() {
|
|
@@ -4823,17 +4823,17 @@ var effect = function() {
|
|
|
4823
4823
|
}
|
|
4824
4824
|
return effectImpl(arguments[0], arguments[1]);
|
|
4825
4825
|
};
|
|
4826
|
-
var effectImpl = (service, effect) => effectContext(
|
|
4826
|
+
var effectImpl = (service, effect) => effectContext(map(effect, (value) => make10(service, value)));
|
|
4827
4827
|
var effectContext = (effect) => fromBuildMemo((_, scope) => provide(effect, scope));
|
|
4828
4828
|
var effectDiscard = (effect) => effectContext(as2(effect, empty4()));
|
|
4829
4829
|
var mergeAllEffect = (layers, memoMap, scope) => {
|
|
4830
4830
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
4831
4831
|
return forEach2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), {
|
|
4832
4832
|
concurrency: layers.length
|
|
4833
|
-
}).pipe(
|
|
4833
|
+
}).pipe(map((context) => mergeAll2(...context)));
|
|
4834
4834
|
};
|
|
4835
4835
|
var mergeAll = (...layers) => fromBuild((memoMap, scope) => mergeAllEffect(layers, memoMap, scope));
|
|
4836
|
-
var provideWith = (self, that, f) => fromBuild((memoMap, scope) => flatMap2(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope) : that.build(memoMap, scope), (context) => self.build(memoMap, scope).pipe(provideContext(context),
|
|
4836
|
+
var provideWith = (self, that, f) => fromBuild((memoMap, scope) => flatMap2(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope) : that.build(memoMap, scope), (context) => self.build(memoMap, scope).pipe(provideContext(context), map((merged) => f(merged, context)))));
|
|
4837
4837
|
var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
|
|
4838
4838
|
var provideMerge = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, (self, that) => merge2(that, self)));
|
|
4839
4839
|
var launch = (self) => scoped2(andThen(build(self), never2));
|
|
@@ -4849,7 +4849,7 @@ var makeFailReason = (error) => new Fail(error);
|
|
|
4849
4849
|
var makeDieReason = (defect) => new Die(defect);
|
|
4850
4850
|
var makeInterruptReason = makeInterruptReason2;
|
|
4851
4851
|
var hasInterruptsOnly = hasInterruptsOnly2;
|
|
4852
|
-
var
|
|
4852
|
+
var map5 = causeMap;
|
|
4853
4853
|
var squash = causeSquash;
|
|
4854
4854
|
var findError = findError2;
|
|
4855
4855
|
var hasDies = hasDies2;
|
|
@@ -4948,12 +4948,12 @@ var metadataFn = () => {
|
|
|
4948
4948
|
};
|
|
4949
4949
|
};
|
|
4950
4950
|
};
|
|
4951
|
-
var fromStepWithMetadata = (step) => fromStep(
|
|
4951
|
+
var fromStepWithMetadata = (step) => fromStep(map(step, (f) => {
|
|
4952
4952
|
const meta = metadataFn();
|
|
4953
4953
|
return (now, input) => f(meta(now, input));
|
|
4954
4954
|
}));
|
|
4955
4955
|
var toStep = (schedule) => catchCause2(schedule.step, (cause) => succeed2(() => failCause(cause)));
|
|
4956
|
-
var toStepWithMetadata = (schedule) => clockWith2((clock) =>
|
|
4956
|
+
var toStepWithMetadata = (schedule) => clockWith2((clock) => map(toStep(schedule), (step) => {
|
|
4957
4957
|
const metaFn = metadataFn();
|
|
4958
4958
|
return (input) => suspend(() => {
|
|
4959
4959
|
const now = clock.currentTimeMillisUnsafe();
|
|
@@ -4965,15 +4965,15 @@ var toStepWithMetadata = (schedule) => clockWith2((clock) => map6(toStep(schedul
|
|
|
4965
4965
|
});
|
|
4966
4966
|
});
|
|
4967
4967
|
}));
|
|
4968
|
-
var modifyDelay = /* @__PURE__ */ dual(2, (self, f) => fromStep(
|
|
4968
|
+
var modifyDelay = /* @__PURE__ */ dual(2, (self, f) => fromStep(map(toStep(self), (step) => {
|
|
4969
4969
|
const meta = metadataFn();
|
|
4970
|
-
return (now, input) => flatMap2(step(now, input), ([output, duration]) =>
|
|
4970
|
+
return (now, input) => flatMap2(step(now, input), ([output, duration]) => map(f({
|
|
4971
4971
|
...meta(now, input),
|
|
4972
4972
|
output,
|
|
4973
4973
|
duration
|
|
4974
4974
|
}), (replacement) => [output, fromInputUnsafe(replacement)]));
|
|
4975
4975
|
})));
|
|
4976
|
-
var passthrough = (self) => fromStep(
|
|
4976
|
+
var passthrough = (self) => fromStep(map(toStep(self), (step) => (now, input) => matchEffect(step(now, input), {
|
|
4977
4977
|
onSuccess: (result) => succeed2([input, result[1]]),
|
|
4978
4978
|
onFailure: failCause,
|
|
4979
4979
|
onDone: () => done(input)
|
|
@@ -4982,7 +4982,7 @@ var spaced = (duration) => {
|
|
|
4982
4982
|
const decoded = fromInputUnsafe(duration);
|
|
4983
4983
|
return fromStepWithMetadata(succeed2((meta) => succeed2([meta.attempt - 1, decoded])));
|
|
4984
4984
|
};
|
|
4985
|
-
var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(
|
|
4985
|
+
var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map(toStep(self), (step) => {
|
|
4986
4986
|
const meta = metadataFn();
|
|
4987
4987
|
return (now, input) => flatMap2(step(now, input), (result) => {
|
|
4988
4988
|
const [output, duration] = result;
|
|
@@ -5046,7 +5046,7 @@ var buildFromOptions = (options) => {
|
|
|
5046
5046
|
input
|
|
5047
5047
|
}) => {
|
|
5048
5048
|
const applied = options.until(input);
|
|
5049
|
-
return isEffect2(applied) ?
|
|
5049
|
+
return isEffect2(applied) ? map(applied, (b) => !b) : succeed2(!applied);
|
|
5050
5050
|
});
|
|
5051
5051
|
}
|
|
5052
5052
|
if (options.times !== undefined) {
|
|
@@ -5085,7 +5085,7 @@ var tap = tap2;
|
|
|
5085
5085
|
var result = result2;
|
|
5086
5086
|
var option2 = option;
|
|
5087
5087
|
var exit = exit2;
|
|
5088
|
-
var
|
|
5088
|
+
var map6 = map;
|
|
5089
5089
|
var as = as2;
|
|
5090
5090
|
var asVoid2 = asVoid3;
|
|
5091
5091
|
var zipWith = zipWith2;
|
|
@@ -5193,4 +5193,4 @@ var flatMapEager = flatMapEager2;
|
|
|
5193
5193
|
var catchEager = catchEager2;
|
|
5194
5194
|
var fnUntracedEager = fnUntracedEager2;
|
|
5195
5195
|
|
|
5196
|
-
export { symbol2, hash, structure, array, symbol3, equals, symbolRedactable, redact, format, formatPropertyKey, formatPath, formatJson, NodeInspectSymbol, toJson, BaseProto, Class3, getStackTraceLimit, setStackTraceLimit, assignProperty, assignProperties, args, PipeInspectableProto, causeFail, exitSucceed, exitFailCause, exitFail, withFiber, Error4, TaggedError3, Done, Prototype, make9, strictEqual, Tuple2, Number3, isLessThan, isGreaterThan2, isLessThanOrEqualTo, isGreaterThanOrEqualTo2, none, some, isNone, isSome, match, getOrElse, fromNullishOr, fromUndefinedOr, getOrUndefined,
|
|
5196
|
+
export { symbol2, hash, structure, array, symbol3, equals, symbolRedactable, redact, format, formatPropertyKey, formatPath, formatJson, NodeInspectSymbol, toJson, BaseProto, Class3, getStackTraceLimit, setStackTraceLimit, assignProperty, assignProperties, args, PipeInspectableProto, causeFail, exitSucceed, exitFailCause, exitFail, withFiber, Error4, TaggedError3, Done, Prototype, make9, strictEqual, Tuple2, Number3, isLessThan, isGreaterThan2, isLessThanOrEqualTo, isGreaterThanOrEqualTo2, none, some, isNone, isSome, match, getOrElse, fromNullishOr, fromUndefinedOr, getOrUndefined, map2, flatMap, filter2, exists, Service2, makeUnsafe3, empty4, make10, add, getOrUndefined2, getOrUndefinedUnsafe, getUnsafe, get2, merge2, Reference, normalize, succeed, fail2, try_, isResult, isFailure, isSuccess, mapError, map3, match2, fromIterable, match3, append2, isArrayNonEmpty, isReadonlyArrayNonEmpty, isCanonicalArrayIndex, take3, findFirstIndex, findFirst, findLast, empty5, of, map4, reduce, makeEquivalence, fromInputUnsafe, isFinite2, isZero, zero, millis, seconds, toMillis, Scheduler, ParentSpan, externalSpan, DisablePropagation, getCurrentFiber, fiberJoin, fiberInterrupt, succeed2, sync, suspend, succeedNone, void_, callback, asSome, andThen, flatMap2, effectIsExit, exitInterrupt, exitVoid, exitZipRight, onExitPrimitive, uninterruptibleMask, resolveConcurrency, iterateEager, iterateConcurrent, fiberRunIn, makeLatchUnsafe, ClockRef, currentTimeMillis2, ConsoleRef, LogLevelOrder, reportCauseUnsafe, isCause, isReason, isFailReason, fromReasons, fail3, die, makeFailReason, makeDieReason, makeInterruptReason, hasInterruptsOnly, map5, squash, findError, hasDies, hasInterrupts, interruptors, Done2, done, IllegalArgumentError, ExceededCapacityError, UnknownError, StackTrace, isExit, succeed3, failCause2, fail4, die2, interrupt2, void_2, isSuccess2, isFailure2, hasInterrupts2, asVoid, isDeferred, makeUnsafe4, make11, _await, done2, fail5, interruptWith, isDone, isDoneUnsafe, succeed4, doneUnsafe, CurrentLogLevel, MinimumLogLevel, Scope, make12, makeUnsafe5, provide, addFinalizerExit, addFinalizer, fork, forkUnsafe, close, closeUnsafe, use, succeed5, effect, effectContext, effectDiscard, mergeAll, provide2, provideMerge, launch, catchDone, isDoneCause, doneExitFromCause, matchEffect, modifyDelay, spaced, setInputType, isEffect, all, forEach, whileLoop, promise, tryPromise, succeed6, succeedNone2, suspend2, sync2, void_3, callback2, never, gen, fail6, failCause3, failCauseSync, die3, try_2, withFiber2, fromResult, flatMap3, andThen2, tap, result, option2, exit, map6, as, asVoid2, zipWith, catch_, catchTag, catchTags, catchCause, catchDefect, catchIf, catchFilter, catchCauseIf, mapError2, orDie, tapError, tapCause, retry, sandbox, ignore, ignoreCause, orElseSucceed, timeout, timeoutOption, timeoutOrElse, sleep, race, raceFirst, when2, match4, matchCauseEffect, matchEffect2, context2, contextWith, provide3, provideContext2, serviceOption, updateContext, provideService, scope, scoped, scopedWith, acquireRelease, acquireUseRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt3, interruptible, onInterrupt, uninterruptible, uninterruptibleMask2, forever, repeat, makeSpanScoped, useSpan, withSpan, withParentSpan, forkChild, forkIn, forkScoped, forkDetach, runFork, runForkWith, runPromise, runSync, runSyncExit, fnUntraced, fn, clockWith, logFatal, logError, logDebug, annotateLogs, effectify, mapEager, mapErrorEager, mapBothEager, flatMapEager, catchEager, fnUntracedEager };
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
bodyJson,
|
|
16
16
|
HttpClient,
|
|
17
17
|
layerNodeHttp
|
|
18
|
-
} from "./main-
|
|
18
|
+
} from "./main-s3g4jwx5.mjs";
|
|
19
19
|
import {
|
|
20
20
|
opencodeBrowserBuildId2
|
|
21
|
-
} from "./main-
|
|
21
|
+
} from "./main-hrrgcjhe.mjs";
|
|
22
22
|
import {
|
|
23
23
|
stateRoot,
|
|
24
24
|
compiledBinary,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
compareVersions,
|
|
29
29
|
installedRuntime2,
|
|
30
30
|
installedVersion
|
|
31
|
-
} from "./main-
|
|
31
|
+
} from "./main-t8c7aq8b.mjs";
|
|
32
32
|
import {
|
|
33
33
|
relayAuthorization
|
|
34
|
-
} from "./main-
|
|
34
|
+
} from "./main-3gx5fe95.mjs";
|
|
35
35
|
import {
|
|
36
36
|
Pointer,
|
|
37
37
|
passthrough,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
TaggedError2,
|
|
76
76
|
toCodecStringTree,
|
|
77
77
|
Json
|
|
78
|
-
} from "./main-
|
|
78
|
+
} from "./main-f98q5tcf.mjs";
|
|
79
79
|
import {
|
|
80
80
|
assignProperty,
|
|
81
81
|
PipeInspectableProto,
|
|
@@ -86,14 +86,14 @@ import {
|
|
|
86
86
|
isSome,
|
|
87
87
|
match,
|
|
88
88
|
getOrElse,
|
|
89
|
-
|
|
89
|
+
map2,
|
|
90
90
|
Service2,
|
|
91
91
|
Reference,
|
|
92
92
|
succeed,
|
|
93
93
|
fail2,
|
|
94
94
|
isFailure,
|
|
95
95
|
isSuccess,
|
|
96
|
-
|
|
96
|
+
map3,
|
|
97
97
|
isCanonicalArrayIndex,
|
|
98
98
|
effect,
|
|
99
99
|
provide2,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
andThen2,
|
|
112
112
|
tap,
|
|
113
113
|
result,
|
|
114
|
-
|
|
114
|
+
map6,
|
|
115
115
|
catch_,
|
|
116
116
|
catchDefect,
|
|
117
117
|
mapError2,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
mapEager,
|
|
128
128
|
flatMapEager,
|
|
129
129
|
catchEager
|
|
130
|
-
} from "./main-
|
|
130
|
+
} from "./main-wpt5ha44.mjs";
|
|
131
131
|
import {
|
|
132
132
|
dual,
|
|
133
133
|
memoize,
|
|
@@ -280,13 +280,13 @@ function make2(evaluator) {
|
|
|
280
280
|
return self;
|
|
281
281
|
}
|
|
282
282
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
283
|
-
var
|
|
284
|
-
return make2((provider, pathPrefix) =>
|
|
283
|
+
var map = /* @__PURE__ */ dual(2, (self, f) => {
|
|
284
|
+
return make2((provider, pathPrefix) => map6(evaluateAt(self, provider, pathPrefix), map3(f)));
|
|
285
285
|
});
|
|
286
286
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
287
287
|
return make2((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
288
288
|
});
|
|
289
|
-
var option = (self) => self.pipe(
|
|
289
|
+
var option = (self) => self.pipe(map(some), withDefault(none()));
|
|
290
290
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
291
291
|
var cursorToString = () => "<configuration>";
|
|
292
292
|
var loadCursor = (provider, path) => provider.load(path).pipe(orDie, mapEager((node) => ({
|
|
@@ -1395,7 +1395,7 @@ var make3 = fn("RelayClient.make")(function* (options) {
|
|
|
1395
1395
|
const handleResponse = (response, path, schema) => readBody(response, path).pipe(flatMap3((body) => {
|
|
1396
1396
|
if (response.status < 200 || response.status >= 300) {
|
|
1397
1397
|
const envelope = decodeErrorEnvelope(body);
|
|
1398
|
-
const message = isSome(envelope) ? envelope.value.error : getOrElse(
|
|
1398
|
+
const message = isSome(envelope) ? envelope.value.error : getOrElse(map2(decodeErrorMessage(body), (value) => value.error), () => `Relay responded with HTTP ${response.status} for ${path}`);
|
|
1399
1399
|
return fail6(new RelayRejected({
|
|
1400
1400
|
message,
|
|
1401
1401
|
status: response.status,
|
|
@@ -1463,18 +1463,18 @@ var make3 = fn("RelayClient.make")(function* (options) {
|
|
|
1463
1463
|
shutdown: (request) => postJson("/shutdown", { ...request }, RelayShutdownResponse),
|
|
1464
1464
|
extensionStatus: getJson("/extension/status", ExtensionStatus),
|
|
1465
1465
|
targets: getJson("/json/list", TargetSummaries),
|
|
1466
|
-
sessions: getJson("/cli/sessions", SessionsContainer).pipe(
|
|
1466
|
+
sessions: getJson("/cli/sessions", SessionsContainer).pipe(map6((container) => container.sessions)),
|
|
1467
1467
|
sessionNew: (id, options) => postJson("/cli/session/new", {
|
|
1468
1468
|
...id ? { id } : {},
|
|
1469
1469
|
...options?.readOnly ? { readOnly: true } : {},
|
|
1470
1470
|
...options?.allowedOrigins && options.allowedOrigins.length > 0 ? { allowedOrigins: [...options.allowedOrigins] } : {},
|
|
1471
1471
|
...options?.browser ? { browser: options.browser } : {}
|
|
1472
|
-
}, SessionContainer).pipe(
|
|
1473
|
-
sessionAllowlist: (id, allowedOrigins) => postJson("/cli/session/allowlist", { id, allowedOrigins: [...allowedOrigins] }, SessionContainer).pipe(
|
|
1472
|
+
}, SessionContainer).pipe(map6((container) => container.session)),
|
|
1473
|
+
sessionAllowlist: (id, allowedOrigins) => postJson("/cli/session/allowlist", { id, allowedOrigins: [...allowedOrigins] }, SessionContainer).pipe(map6((container) => container.session)),
|
|
1474
1474
|
sessionEnsure: (id, options) => postJson("/v1/sessions/ensure", {
|
|
1475
1475
|
id,
|
|
1476
1476
|
...options?.readOnly === undefined ? {} : { readOnly: options.readOnly }
|
|
1477
|
-
}, SessionContainer).pipe(
|
|
1477
|
+
}, SessionContainer).pipe(map6((container) => container.session)),
|
|
1478
1478
|
sessionReset: (id) => postJson("/cli/session/reset", { id }, SessionResetResponse),
|
|
1479
1479
|
sessionAdopt: ({ sessionId, ...request }) => postJson("/cli/session/adopt", {
|
|
1480
1480
|
...request,
|
|
@@ -2011,4 +2011,4 @@ function isRelayStartingOrUnreachable(error) {
|
|
|
2011
2011
|
return isRelayStarting(error) || isRelayUnreachable(error);
|
|
2012
2012
|
}
|
|
2013
2013
|
|
|
2014
|
-
export { withDefault, option, String2, Int, Boolean2, SessionContainer, SessionsContainer, SessionDeleted, SessionResetResponse, ExecuteRequest, SessionAdoptRequest, SessionNewRequest, SessionEnsureRequest, SessionIdRequest, SessionAllowlistRequest, SessionAdoptResponse, ExecuteLogEntry, ExecuteLogSummary, ExecuteAftermath, AuthenticatedJsonRequest, AuthenticatedJsonOutcome, ExtensionStatus, RelayVersion, RelayShutdownRequest, NetworkStartRequest, NetworkSessionRequest, NetworkStopRequest, AuthProfileSummary, NetworkStopResponse, AuthProfileRequest, AuthRefreshRequest, AuthRunRequest, AuthRunResponse, RecordingQuality, RecordingTargetRequest, RecordingStartRequest, TabsCleanupResponse, SettingsGetResponse, SettingsSetResponse, FlightRecorderStartRequest, FlightRecorderSaveRequest, HttpRouteError2, formatHostForUrl2, listenHttpServer2, closeHttpServer2, closeWebSocketServer2, logCloseError2, sendJson2, readJsonBody2, stableUnpackedExtensionOrigin2, chromeExtensionOriginForPath2, parseAdditionalExtensionOrigins2, validateHostHeader2, validateBrowserFetchSite2, validateWebSocketOrigin2, defaultHost2, defaultPort2, optionalSessionId2, isValidSessionId2, requiredSessionId2, parseTargetSelection2, generateSessionId2, sendCdpResponse2, sendCdpEvent2, getObject2, getString2, createTargetUrl2, getNumber2, getIdText2, headerValue2, getTargetInfo2, isRestrictedTarget2, isRestrictedUrl2, dataUrlDocument2, portConfig, extensionOriginsConfig, endpointForPort, RelayUnreachable, RelayRejected, Service, layerFetch, layerFetchMcp, appendManagedRelayProcessLog, relayLog, shouldWaitForExtensionReconnect, relayBuildProblem, ensureRelay, restartRelay, extensionReconnectWaitMs, ensureExtensionConnected, stoppedRelayStatus, statusCollections, startManagedRelay };
|
|
2014
|
+
export { map, withDefault, option, String2, Int, Boolean2, SessionContainer, SessionsContainer, SessionDeleted, SessionResetResponse, ExecuteRequest, SessionAdoptRequest, SessionNewRequest, SessionEnsureRequest, SessionIdRequest, SessionAllowlistRequest, SessionAdoptResponse, ExecuteLogEntry, ExecuteLogSummary, ExecuteAftermath, AuthenticatedJsonRequest, AuthenticatedJsonOutcome, ExtensionStatus, RelayVersion, RelayShutdownRequest, NetworkStartRequest, NetworkSessionRequest, NetworkStopRequest, AuthProfileSummary, NetworkStopResponse, AuthProfileRequest, AuthRefreshRequest, AuthRunRequest, AuthRunResponse, RecordingQuality, RecordingTargetRequest, RecordingStartRequest, TabsCleanupResponse, SettingsGetResponse, SettingsSetResponse, FlightRecorderStartRequest, FlightRecorderSaveRequest, HttpRouteError2, formatHostForUrl2, listenHttpServer2, closeHttpServer2, closeWebSocketServer2, logCloseError2, sendJson2, readJsonBody2, stableUnpackedExtensionOrigin2, chromeExtensionOriginForPath2, parseAdditionalExtensionOrigins2, validateHostHeader2, validateBrowserFetchSite2, validateWebSocketOrigin2, defaultHost2, defaultPort2, optionalSessionId2, isValidSessionId2, requiredSessionId2, parseTargetSelection2, generateSessionId2, sendCdpResponse2, sendCdpEvent2, getObject2, getString2, createTargetUrl2, getNumber2, getIdText2, headerValue2, getTargetInfo2, isRestrictedTarget2, isRestrictedUrl2, dataUrlDocument2, portConfig, extensionOriginsConfig, endpointForPort, RelayUnreachable, RelayRejected, Service, layerFetch, layerFetchMcp, appendManagedRelayProcessLog, relayLog, shouldWaitForExtensionReconnect, relayBuildProblem, ensureRelay, restartRelay, extensionReconnectWaitMs, ensureExtensionConnected, stoppedRelayStatus, statusCollections, startManagedRelay };
|