@dual-os/linear-api 6.0.4 → 6.0.6
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/Runner.js +229 -463
- package/Runner.js.map +5 -9
- package/bundle-inventory.json +1 -1
- package/dist/auth.js +4 -4
- package/dist/channel/internal/webhook.js +3 -3
- package/dist/channel/linear-app-client.js +3 -3
- package/dist/channel/linear-app-definition.js +3 -3
- package/dist/channel/linear-app.js +6 -6
- package/dist/generated/http.js +5 -5
- package/dist/generated/operations.js +6 -6
- package/dist/generated/plugin.js +8 -8
- package/dist/plugin.js +11 -11
- package/dist/triggers.js +7 -7
- package/dual-contracts.json +1 -0
- package/dual-plugin.json +1 -1
- package/package.json +1 -1
- package/{plugin-5bqv66ke.js → plugin-0jjx6wrv.js} +3 -3
- package/{plugin-9w5999vc.js → plugin-2j6qrbsr.js} +3 -3
- package/{plugin-dbxxf9k5.js → plugin-7kckxk75.js} +3 -3
- package/{plugin-d4a2ytg0.js → plugin-ahbd9ttm.js} +296 -303
- package/{plugin-d4a2ytg0.js.map → plugin-ahbd9ttm.js.map} +7 -9
- package/{plugin-s3mapcpn.js → plugin-cmxmbpzy.js} +3 -3
- package/{plugin-bcdkw9ac.js → plugin-d2qpfdcz.js} +5 -5
- package/{plugin-v0kgp19h.js → plugin-djc9kq8k.js} +54 -39
- package/{plugin-v0kgp19h.js.map → plugin-djc9kq8k.js.map} +5 -4
- package/{plugin-xv11dhcc.js → plugin-fxgg72q4.js} +5 -5
- package/{plugin-e503g25g.js → plugin-tcgb970h.js} +9 -9
- package/{plugin-e503g25g.js.map → plugin-tcgb970h.js.map} +2 -2
- package/{plugin-15tbf6dq.js → plugin-w5daqkj4.js} +2 -2
- package/{plugin-srg9rdjf.js → plugin-wemjvjrr.js} +2 -2
- /package/licenses/{@dual-os_sdk@0.8.1 → @dual-os_sdk@0.10.0}/LICENSE +0 -0
- /package/{plugin-5bqv66ke.js.map → plugin-0jjx6wrv.js.map} +0 -0
- /package/{plugin-9w5999vc.js.map → plugin-2j6qrbsr.js.map} +0 -0
- /package/{plugin-dbxxf9k5.js.map → plugin-7kckxk75.js.map} +0 -0
- /package/{plugin-s3mapcpn.js.map → plugin-cmxmbpzy.js.map} +0 -0
- /package/{plugin-bcdkw9ac.js.map → plugin-d2qpfdcz.js.map} +0 -0
- /package/{plugin-xv11dhcc.js.map → plugin-fxgg72q4.js.map} +0 -0
- /package/{plugin-15tbf6dq.js.map → plugin-w5daqkj4.js.map} +0 -0
- /package/{plugin-srg9rdjf.js.map → plugin-wemjvjrr.js.map} +0 -0
|
@@ -599,7 +599,7 @@ var byReferenceUnsafe = (obj) => {
|
|
|
599
599
|
var make8 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
600
600
|
var isStrictEquivalent = (x, y) => x === y;
|
|
601
601
|
var strictEqual = () => isStrictEquivalent;
|
|
602
|
-
function
|
|
602
|
+
function Tuple(elements) {
|
|
603
603
|
return make8((self, that) => {
|
|
604
604
|
if (self.length !== that.length) {
|
|
605
605
|
return false;
|
|
@@ -1146,7 +1146,7 @@ var causeCombine = /* @__PURE__ */ dual(2, (self, that) => {
|
|
|
1146
1146
|
var causeAddInterrupts = (self, interrupts) => {
|
|
1147
1147
|
const reasons = self.reasons.slice();
|
|
1148
1148
|
for (const reason of interrupts.reasons) {
|
|
1149
|
-
if (
|
|
1149
|
+
if (isInterruptReason(reason) && !reasons.some((r) => isInterruptReason(r) && r.fiberId === reason.fiberId && r.annotations === reason.annotations)) {
|
|
1150
1150
|
reasons.push(reason);
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
@@ -1184,7 +1184,7 @@ var causeAnnotate = /* @__PURE__ */ dual((args) => isCause(args[0]), (self, anno
|
|
|
1184
1184
|
});
|
|
1185
1185
|
var isFailReason = (self) => self._tag === "Fail";
|
|
1186
1186
|
var isDieReason = (self) => self._tag === "Die";
|
|
1187
|
-
var
|
|
1187
|
+
var isInterruptReason = (self) => self._tag === "Interrupt";
|
|
1188
1188
|
function defaultEvaluate(_fiber) {
|
|
1189
1189
|
return exitDie(`Effect.evaluate: Not implemented`);
|
|
1190
1190
|
}
|
|
@@ -1369,7 +1369,7 @@ var Done2 = (value) => {
|
|
|
1369
1369
|
};
|
|
1370
1370
|
};
|
|
1371
1371
|
var doneVoid = /* @__PURE__ */ exitFail(DoneVoid);
|
|
1372
|
-
var
|
|
1372
|
+
var done3 = (value) => {
|
|
1373
1373
|
if (value === undefined)
|
|
1374
1374
|
return doneVoid;
|
|
1375
1375
|
return exitFail(Done2(value));
|
|
@@ -1651,7 +1651,7 @@ var applyOverlays = (map, overlay) => {
|
|
|
1651
1651
|
applyOverlays(map, overlay.parent);
|
|
1652
1652
|
map.set(overlay.key, overlay.value);
|
|
1653
1653
|
};
|
|
1654
|
-
var
|
|
1654
|
+
var flatten2 = (self) => {
|
|
1655
1655
|
if (self._flat)
|
|
1656
1656
|
return self._flat;
|
|
1657
1657
|
if (!self.overlay)
|
|
@@ -1676,7 +1676,7 @@ var lookup = (self, key) => {
|
|
|
1676
1676
|
if (value === undefined && !impl.base.has(key))
|
|
1677
1677
|
return notFound;
|
|
1678
1678
|
if (impl.overlay && ++impl.baseHits >= impl.base.size && impl.baseHits >= FlattenAfterBaseHits) {
|
|
1679
|
-
impl.base =
|
|
1679
|
+
impl.base = flatten2(impl);
|
|
1680
1680
|
impl.overlay = undefined;
|
|
1681
1681
|
impl.depth = 0;
|
|
1682
1682
|
}
|
|
@@ -1688,7 +1688,7 @@ var makeUnsafe = (mapUnsafe, options) => {
|
|
|
1688
1688
|
};
|
|
1689
1689
|
var Proto = {
|
|
1690
1690
|
get mapUnsafe() {
|
|
1691
|
-
return
|
|
1691
|
+
return flatten2(this);
|
|
1692
1692
|
},
|
|
1693
1693
|
...PipeInspectableProto,
|
|
1694
1694
|
[TypeId3]: {
|
|
@@ -1723,7 +1723,7 @@ var Proto = {
|
|
|
1723
1723
|
var hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
|
|
1724
1724
|
var isContext = (u) => hasProperty(u, TypeId3);
|
|
1725
1725
|
var isReference = (u) => !!u[ReferenceTypeId];
|
|
1726
|
-
var
|
|
1726
|
+
var empty6 = () => emptyContext2;
|
|
1727
1727
|
var emptyContext2 = /* @__PURE__ */ makeUnsafe(/* @__PURE__ */ new Map);
|
|
1728
1728
|
var make9 = (key, service) => makeUnsafe(new Map([[key.key, service]]));
|
|
1729
1729
|
var add = /* @__PURE__ */ dual(3, (self, key, service) => addUnsafe(self, key.key, service));
|
|
@@ -1891,7 +1891,7 @@ var normalizeNonEmpty = (n) => Math.max(1, normalize(n));
|
|
|
1891
1891
|
|
|
1892
1892
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
1893
1893
|
var make10 = (...elements) => elements;
|
|
1894
|
-
var makeEquivalence2 =
|
|
1894
|
+
var makeEquivalence2 = Tuple;
|
|
1895
1895
|
|
|
1896
1896
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
1897
1897
|
var headUnsafe = (self) => {
|
|
@@ -1931,7 +1931,6 @@ var constEmptyIterator = {
|
|
|
1931
1931
|
};
|
|
1932
1932
|
}
|
|
1933
1933
|
};
|
|
1934
|
-
var empty = () => constEmpty;
|
|
1935
1934
|
|
|
1936
1935
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Array.js
|
|
1937
1936
|
var Array2 = globalThis.Array;
|
|
@@ -2047,7 +2046,7 @@ var hashBucketsAdd = (buckets, value) => {
|
|
|
2047
2046
|
bucket.push(value);
|
|
2048
2047
|
return true;
|
|
2049
2048
|
};
|
|
2050
|
-
var
|
|
2049
|
+
var empty = () => [];
|
|
2051
2050
|
var of = (a) => [a];
|
|
2052
2051
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => self.map(f));
|
|
2053
2052
|
var flatMap2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
@@ -2094,7 +2093,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
2094
2093
|
return out;
|
|
2095
2094
|
});
|
|
2096
2095
|
var reduce = /* @__PURE__ */ dual(3, (self, b, f) => fromIterable2(self).reduce((b, a, i) => f(b, a, i), b));
|
|
2097
|
-
var fromNullishOr2 = (a) => a == null ?
|
|
2096
|
+
var fromNullishOr2 = (a) => a == null ? empty() : [a];
|
|
2098
2097
|
var every = /* @__PURE__ */ dual(2, (self, refinement) => self.every(refinement));
|
|
2099
2098
|
var some2 = /* @__PURE__ */ dual(2, (self, predicate) => self.some(predicate));
|
|
2100
2099
|
var makeEquivalence3 = Array_;
|
|
@@ -2549,14 +2548,6 @@ var format2 = (self) => {
|
|
|
2549
2548
|
};
|
|
2550
2549
|
|
|
2551
2550
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Filter.js
|
|
2552
|
-
var toPredicate = (self) => (input) => !isFailure3(self(input));
|
|
2553
|
-
var has2 = (key) => (input) => input.has(key) ? succeed(input) : fail(input);
|
|
2554
|
-
var compose = /* @__PURE__ */ dual(2, (left, right) => (input) => {
|
|
2555
|
-
const leftOut = left(input);
|
|
2556
|
-
if (isFailure3(leftOut))
|
|
2557
|
-
return leftOut;
|
|
2558
|
-
return right(leftOut.success);
|
|
2559
|
-
});
|
|
2560
2551
|
var toOption = (self) => (input) => {
|
|
2561
2552
|
const result = self(input);
|
|
2562
2553
|
return isFailure3(result) ? none() : some(result.success);
|
|
@@ -2971,7 +2962,7 @@ class Interrupt extends ReasonBase {
|
|
|
2971
2962
|
};
|
|
2972
2963
|
}
|
|
2973
2964
|
[symbol2](that) {
|
|
2974
|
-
return
|
|
2965
|
+
return isInterruptReason(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
|
|
2975
2966
|
}
|
|
2976
2967
|
[symbol]() {
|
|
2977
2968
|
return string(`${this._tag}:${this.fiberId}`);
|
|
@@ -2992,7 +2983,7 @@ var findErrorOption = /* @__PURE__ */ toOption(findError);
|
|
|
2992
2983
|
var hasDies = (self) => self.reasons.some(isDieReason);
|
|
2993
2984
|
var causeElectDefects = (self) => hasDies(self) && hasFails(self) ? causeFromReasons(self.reasons.map((reason) => reason._tag === "Fail" && !isDone2(reason.error) ? new Die(reason.error, reason.annotations) : reason)) : self;
|
|
2994
2985
|
var findRecoverableError = (self) => hasDies(self) ? fail(causeElectDefects(self)) : findError(self);
|
|
2995
|
-
var hasInterrupts2 = (self) => self.reasons.some(
|
|
2986
|
+
var hasInterrupts2 = (self) => self.reasons.some(isInterruptReason);
|
|
2996
2987
|
var causeFilterInterruptors = (self) => {
|
|
2997
2988
|
let interruptors;
|
|
2998
2989
|
for (let i = 0;i < self.reasons.length; i++) {
|
|
@@ -3006,7 +2997,6 @@ var causeFilterInterruptors = (self) => {
|
|
|
3006
2997
|
}
|
|
3007
2998
|
return interruptors ? succeed(interruptors) : fail(self);
|
|
3008
2999
|
};
|
|
3009
|
-
var hasInterruptsOnly2 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason2);
|
|
3010
3000
|
var causeMap = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3011
3001
|
let hasFail = false;
|
|
3012
3002
|
const failures = self.reasons.map((failure) => {
|
|
@@ -3317,7 +3307,7 @@ class FiberImpl {
|
|
|
3317
3307
|
}
|
|
3318
3308
|
this._stack.length = 0;
|
|
3319
3309
|
this._children = undefined;
|
|
3320
|
-
this.context =
|
|
3310
|
+
this.context = empty6();
|
|
3321
3311
|
const cache = this.cache;
|
|
3322
3312
|
if (cache.span !== undefined || cache.stackFrame !== undefined) {
|
|
3323
3313
|
this.cache = {
|
|
@@ -3523,7 +3513,7 @@ var fiberInterruptAs = /* @__PURE__ */ dual((args) => hasProperty(args[0], Fiber
|
|
|
3523
3513
|
}));
|
|
3524
3514
|
var fiberInterruptAll = (fibers) => withFiber2((parent) => {
|
|
3525
3515
|
const annotations = fiberStackAnnotations(parent);
|
|
3526
|
-
let fiberArr =
|
|
3516
|
+
let fiberArr = empty();
|
|
3527
3517
|
for (const fiber of fibers) {
|
|
3528
3518
|
fiber.interruptUnsafe(parent.id, annotations);
|
|
3529
3519
|
fiberArr.push(fiber);
|
|
@@ -3879,7 +3869,7 @@ var raceAllFirst = (all, options) => withFiber2((parent) => {
|
|
|
3879
3869
|
if (done)
|
|
3880
3870
|
break;
|
|
3881
3871
|
const index = i++;
|
|
3882
|
-
const fiber =
|
|
3872
|
+
const fiber = forkUnsafe2(parent, effect, true, true, false);
|
|
3883
3873
|
fibers.add(fiber);
|
|
3884
3874
|
fiber.addObserver((exit) => {
|
|
3885
3875
|
fibers.delete(fiber);
|
|
@@ -3906,11 +3896,11 @@ var flatMapEager = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
3906
3896
|
}
|
|
3907
3897
|
return flatMap5(self, f);
|
|
3908
3898
|
});
|
|
3909
|
-
var
|
|
3899
|
+
var flatten3 = (self) => flatMap5(self, identity);
|
|
3910
3900
|
var map6 = /* @__PURE__ */ dual(2, (self, f) => new ContImpl(self, mapCont, f));
|
|
3911
3901
|
var mapEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMap(self, f) : map6(self, f));
|
|
3912
3902
|
var mapErrorEager = /* @__PURE__ */ dual(2, (self, f) => effectIsExit(self) ? exitMapError(self, f) : mapError3(self, f));
|
|
3913
|
-
var mapBothEager = /* @__PURE__ */ dual(2, (self, options) => effectIsExit(self) ? exitMapBoth(self, options) :
|
|
3903
|
+
var mapBothEager = /* @__PURE__ */ dual(2, (self, options) => effectIsExit(self) ? exitMapBoth(self, options) : mapBoth2(self, options));
|
|
3914
3904
|
var exitInterrupt = (fiberId) => exitFailCause(causeInterrupt(fiberId));
|
|
3915
3905
|
var exitIsSuccess = (self) => self._tag === "Success";
|
|
3916
3906
|
var exitIsFailure = (self) => self._tag === "Failure";
|
|
@@ -3982,7 +3972,7 @@ var forever2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options
|
|
|
3982
3972
|
body: constant(options?.disableYield ? self : flatMap5(self, (_) => yieldNow)),
|
|
3983
3973
|
step: constVoid
|
|
3984
3974
|
}));
|
|
3985
|
-
var
|
|
3975
|
+
var catchCause = /* @__PURE__ */ dual(2, (self, f) => new OnFailureImpl(self, f.length !== 1 ? (cause) => f(cause) : f));
|
|
3986
3976
|
var OnFailureProto = /* @__PURE__ */ makePrimitiveProto({
|
|
3987
3977
|
op: "OnFailure",
|
|
3988
3978
|
[evaluate]: evaluateCont
|
|
@@ -3992,19 +3982,18 @@ var OnFailureImpl = function(self, f) {
|
|
|
3992
3982
|
this[contE] = f;
|
|
3993
3983
|
};
|
|
3994
3984
|
OnFailureImpl.prototype = OnFailureProto;
|
|
3995
|
-
var catchCauseIf2 = /* @__PURE__ */ dual(3, (self, predicate, f) =>
|
|
3985
|
+
var catchCauseIf2 = /* @__PURE__ */ dual(3, (self, predicate, f) => catchCause(self, (cause) => {
|
|
3996
3986
|
if (!predicate(cause)) {
|
|
3997
3987
|
return failCause2(cause);
|
|
3998
3988
|
}
|
|
3999
3989
|
return f(cause);
|
|
4000
3990
|
}));
|
|
4001
|
-
var catchCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) =>
|
|
3991
|
+
var catchCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause(self, (cause) => {
|
|
4002
3992
|
const eb = filter(cause);
|
|
4003
3993
|
return isFailure3(eb) ? failCause2(eb.failure) : f(eb.success, cause);
|
|
4004
3994
|
}));
|
|
4005
3995
|
var catch_2 = /* @__PURE__ */ dual(2, (self, f) => catchCauseFilter(self, findRecoverableError, (e) => f(e)));
|
|
4006
|
-
var
|
|
4007
|
-
var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause2(self, (cause) => {
|
|
3996
|
+
var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause(self, (cause) => {
|
|
4008
3997
|
const result = filter(cause);
|
|
4009
3998
|
if (isFailure3(result)) {
|
|
4010
3999
|
return failCause2(cause);
|
|
@@ -4012,7 +4001,7 @@ var tapCauseFilter = /* @__PURE__ */ dual(3, (self, filter, f) => catchCause2(se
|
|
|
4012
4001
|
return andThen2(f(result.success, cause), failCause2(cause));
|
|
4013
4002
|
}));
|
|
4014
4003
|
var tapError2 = /* @__PURE__ */ dual(2, (self, f) => tapCauseFilter(self, findError, (e) => f(e)));
|
|
4015
|
-
var catchIf2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, predicate, f, orElse) =>
|
|
4004
|
+
var catchIf2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, predicate, f, orElse) => catchCause(self, (cause) => {
|
|
4016
4005
|
const error = findRecoverableError(cause);
|
|
4017
4006
|
if (isFailure3(error))
|
|
4018
4007
|
return failCause2(error.failure);
|
|
@@ -4031,8 +4020,8 @@ var catchReason2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, err
|
|
|
4031
4020
|
return f(reason, e);
|
|
4032
4021
|
return orElse ? orElse(reason, e) : fail8(e);
|
|
4033
4022
|
}));
|
|
4034
|
-
var mapError3 = /* @__PURE__ */ dual(2, (self, f) =>
|
|
4035
|
-
var
|
|
4023
|
+
var mapError3 = /* @__PURE__ */ dual(2, (self, f) => catchCause(self, (cause) => failCause2(causeMap(cause, f))));
|
|
4024
|
+
var mapBoth2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
|
|
4036
4025
|
onFailure: (cause) => failCause2(causeMap(cause, options.onFailure)),
|
|
4037
4026
|
onSuccess: (a) => sync2(() => options.onSuccess(a))
|
|
4038
4027
|
}));
|
|
@@ -4190,7 +4179,7 @@ var runFinalizer = (finalizer, exit_) => {
|
|
|
4190
4179
|
return exitDie(defect);
|
|
4191
4180
|
}
|
|
4192
4181
|
};
|
|
4193
|
-
var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer :
|
|
4182
|
+
var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause2(causeElectDefects(causeCombine(exit_.cause, cause))));
|
|
4194
4183
|
var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalizers, exit_) {
|
|
4195
4184
|
let exits = [];
|
|
4196
4185
|
const fibers = [];
|
|
@@ -4201,7 +4190,7 @@ var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalize
|
|
|
4201
4190
|
if (self.strategy === "sequential") {
|
|
4202
4191
|
exits.push(yield* exit(runFinalizer(finalizer, exit_)));
|
|
4203
4192
|
} else if (key !== parent) {
|
|
4204
|
-
fibers.push(
|
|
4193
|
+
fibers.push(forkUnsafe2(parent, runFinalizer(finalizer, exit_), true, true, "inherit"));
|
|
4205
4194
|
}
|
|
4206
4195
|
}
|
|
4207
4196
|
if (fibers.length > 0) {
|
|
@@ -4209,7 +4198,6 @@ var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced2(function* (self, finalize
|
|
|
4209
4198
|
}
|
|
4210
4199
|
return yield* exitAsVoidAll(exits);
|
|
4211
4200
|
});
|
|
4212
|
-
var scopeFork = (scope, finalizerStrategy) => sync2(() => scopeForkUnsafe(scope, finalizerStrategy));
|
|
4213
4201
|
var scopeForkUnsafe = (scope, finalizerStrategy) => {
|
|
4214
4202
|
const child = makeScope(finalizerStrategy, scope);
|
|
4215
4203
|
if (scope.state._tag === "Closed") {
|
|
@@ -4273,6 +4261,7 @@ var makeScope = (finalizerStrategy = "sequential", parent) => ({
|
|
|
4273
4261
|
var constScopeEmpty = {
|
|
4274
4262
|
_tag: "Empty"
|
|
4275
4263
|
};
|
|
4264
|
+
var scopeMake = (finalizerStrategy) => sync2(() => scopeMakeUnsafe(finalizerStrategy));
|
|
4276
4265
|
var scope2 = scopeTag;
|
|
4277
4266
|
var provideScope = /* @__PURE__ */ provideService2(scopeTag);
|
|
4278
4267
|
var scoped2 = (self) => withFiber2((fiber) => {
|
|
@@ -4576,7 +4565,7 @@ var iterateConcurrentImpl = (options) => {
|
|
|
4576
4565
|
});
|
|
4577
4566
|
} else {
|
|
4578
4567
|
effect = undefined;
|
|
4579
|
-
const fiber =
|
|
4568
|
+
const fiber = forkUnsafe2(parentFiber, eff, true, true, "inherit");
|
|
4580
4569
|
if (fiber._exit) {
|
|
4581
4570
|
terminal = step(state, item, fiber._exit, index);
|
|
4582
4571
|
if (terminal)
|
|
@@ -4658,9 +4647,9 @@ var forEachConcurrent = /* @__PURE__ */ iterateConcurrentImpl({
|
|
|
4658
4647
|
var filterOrElse2 = /* @__PURE__ */ dual(3, (self, predicate, orElse) => flatMap5(self, (a) => predicate(a) ? succeed6(a) : orElse(a)));
|
|
4659
4648
|
var forkChild2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, options) => withFiber2((fiber) => {
|
|
4660
4649
|
interruptChildrenPatch();
|
|
4661
|
-
return succeed6(
|
|
4650
|
+
return succeed6(forkUnsafe2(fiber, self, options?.startImmediately, false, options?.uninterruptible ?? false));
|
|
4662
4651
|
}));
|
|
4663
|
-
var
|
|
4652
|
+
var forkUnsafe2 = (parent, effect, immediate = false, daemon = false, uninterruptible = false) => {
|
|
4664
4653
|
const parentRuntime = parent;
|
|
4665
4654
|
const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
|
|
4666
4655
|
const child = new FiberImpl(parentRuntime.context, interruptible);
|
|
@@ -4678,7 +4667,7 @@ var forkUnsafe = (parent, effect, immediate = false, daemon = false, uninterrupt
|
|
|
4678
4667
|
};
|
|
4679
4668
|
var fiberScopeFinalizer = (fiber) => () => withFiber2((current) => current === fiber ? void_3 : fiberInterrupt(fiber));
|
|
4680
4669
|
var forkIn2 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, scope, options) => withFiber2((parent) => {
|
|
4681
|
-
const fiber = scope.state._tag === "Closed" ? new FiberImpl(parent.context) :
|
|
4670
|
+
const fiber = scope.state._tag === "Closed" ? new FiberImpl(parent.context) : forkUnsafe2(parent, self, options?.startImmediately, true, options?.uninterruptible);
|
|
4682
4671
|
if (!fiber._exit) {
|
|
4683
4672
|
if (scope.state._tag !== "Closed") {
|
|
4684
4673
|
scopeAddFinalizerUnsafe(scope, fiber, fiberScopeFinalizer(fiber));
|
|
@@ -4723,8 +4712,21 @@ var fiberRunIn = /* @__PURE__ */ dual(2, (self, scope) => {
|
|
|
4723
4712
|
self.addObserver(() => scopeRemoveFinalizerUnsafe(scope, self));
|
|
4724
4713
|
return self;
|
|
4725
4714
|
});
|
|
4726
|
-
var runFork2 = /* @__PURE__ */ runForkWith2(/* @__PURE__ */
|
|
4727
|
-
var
|
|
4715
|
+
var runFork2 = /* @__PURE__ */ runForkWith2(/* @__PURE__ */ empty6());
|
|
4716
|
+
var runCallbackWith2 = (context) => {
|
|
4717
|
+
const runFork = runForkWith2(context);
|
|
4718
|
+
return (effect, options) => {
|
|
4719
|
+
const fiber = runFork(effect, options);
|
|
4720
|
+
if (options?.onExit) {
|
|
4721
|
+
fiber.addObserver(options.onExit);
|
|
4722
|
+
}
|
|
4723
|
+
return (interruptor) => {
|
|
4724
|
+
return fiber.interruptUnsafe(interruptor);
|
|
4725
|
+
};
|
|
4726
|
+
};
|
|
4727
|
+
};
|
|
4728
|
+
var runCallback2 = /* @__PURE__ */ runCallbackWith2(/* @__PURE__ */ empty6());
|
|
4729
|
+
var runPromiseExitWith2 = (context) => {
|
|
4728
4730
|
const runFork = runForkWith2(context);
|
|
4729
4731
|
return (effect, options) => {
|
|
4730
4732
|
const fiber = runFork(effect, options);
|
|
@@ -4733,8 +4735,9 @@ var runPromiseExitWith = (context) => {
|
|
|
4733
4735
|
});
|
|
4734
4736
|
};
|
|
4735
4737
|
};
|
|
4736
|
-
var
|
|
4737
|
-
|
|
4738
|
+
var runPromiseExit2 = /* @__PURE__ */ runPromiseExitWith2(/* @__PURE__ */ empty6());
|
|
4739
|
+
var runPromiseWith2 = (context) => {
|
|
4740
|
+
const runPromiseExit = runPromiseExitWith2(context);
|
|
4738
4741
|
return (effect, options) => runPromiseExit(effect, options).then((exit) => {
|
|
4739
4742
|
if (exit._tag === "Failure") {
|
|
4740
4743
|
throw causeSquash(exit.cause);
|
|
@@ -4742,8 +4745,8 @@ var runPromiseWith = (context) => {
|
|
|
4742
4745
|
return exit.value;
|
|
4743
4746
|
});
|
|
4744
4747
|
};
|
|
4745
|
-
var
|
|
4746
|
-
var
|
|
4748
|
+
var runPromise2 = /* @__PURE__ */ runPromiseWith2(/* @__PURE__ */ empty6());
|
|
4749
|
+
var runSyncExitWith2 = (context) => {
|
|
4747
4750
|
const runFork = runForkWith2(context);
|
|
4748
4751
|
return (effect) => {
|
|
4749
4752
|
if (effectIsExit(effect))
|
|
@@ -4756,9 +4759,9 @@ var runSyncExitWith = (context) => {
|
|
|
4756
4759
|
return fiber._exit ?? exitDie(new AsyncFiberError(fiber));
|
|
4757
4760
|
};
|
|
4758
4761
|
};
|
|
4759
|
-
var
|
|
4760
|
-
var
|
|
4761
|
-
const runSyncExit =
|
|
4762
|
+
var runSyncExit2 = /* @__PURE__ */ runSyncExitWith2(/* @__PURE__ */ empty6());
|
|
4763
|
+
var runSyncWith2 = (context) => {
|
|
4764
|
+
const runSyncExit = runSyncExitWith2(context);
|
|
4762
4765
|
return (effect) => {
|
|
4763
4766
|
const exit = runSyncExit(effect);
|
|
4764
4767
|
if (exit._tag === "Failure")
|
|
@@ -4766,7 +4769,7 @@ var runSyncWith = (context) => {
|
|
|
4766
4769
|
return exit.value;
|
|
4767
4770
|
};
|
|
4768
4771
|
};
|
|
4769
|
-
var
|
|
4772
|
+
var runSync2 = /* @__PURE__ */ runSyncWith2(/* @__PURE__ */ empty6());
|
|
4770
4773
|
var succeedTrue = /* @__PURE__ */ succeed6(true);
|
|
4771
4774
|
var succeedFalse = /* @__PURE__ */ succeed6(false);
|
|
4772
4775
|
|
|
@@ -4888,7 +4891,7 @@ var makeSpanUnsafe = (fiber, name, options) => {
|
|
|
4888
4891
|
span = noopSpan({
|
|
4889
4892
|
name,
|
|
4890
4893
|
parent,
|
|
4891
|
-
annotations: add(options?.annotations ??
|
|
4894
|
+
annotations: add(options?.annotations ?? empty6(), DisablePropagation, true)
|
|
4892
4895
|
});
|
|
4893
4896
|
} else {
|
|
4894
4897
|
const tracer = fiber.cache.tracer ?? nativeTracer;
|
|
@@ -4901,7 +4904,7 @@ var makeSpanUnsafe = (fiber, name, options) => {
|
|
|
4901
4904
|
span = tracer.span({
|
|
4902
4905
|
name,
|
|
4903
4906
|
parent,
|
|
4904
|
-
annotations: options?.annotations ??
|
|
4907
|
+
annotations: options?.annotations ?? empty6(),
|
|
4905
4908
|
links,
|
|
4906
4909
|
startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint02,
|
|
4907
4910
|
kind: options?.kind ?? "internal",
|
|
@@ -5250,7 +5253,6 @@ var DeferredImpl = function() {
|
|
|
5250
5253
|
};
|
|
5251
5254
|
DeferredImpl.prototype = DeferredProto;
|
|
5252
5255
|
var makeUnsafe2 = () => new DeferredImpl;
|
|
5253
|
-
var make = () => sync2(() => makeUnsafe2());
|
|
5254
5256
|
var _await = (self) => callback3((resume) => {
|
|
5255
5257
|
if (self.effect)
|
|
5256
5258
|
return resume(self.effect);
|
|
@@ -5266,8 +5268,8 @@ var _await = (self) => callback3((resume) => {
|
|
|
5266
5268
|
});
|
|
5267
5269
|
});
|
|
5268
5270
|
var completeWith = /* @__PURE__ */ dual(2, (self, effect) => sync2(() => doneUnsafe(self, effect)));
|
|
5269
|
-
var
|
|
5270
|
-
var fail4 = /* @__PURE__ */ dual(2, (self, error) =>
|
|
5271
|
+
var done2 = completeWith;
|
|
5272
|
+
var fail4 = /* @__PURE__ */ dual(2, (self, error) => done2(self, exitFail(error)));
|
|
5271
5273
|
var isDone = (self) => sync2(() => isDoneUnsafe(self));
|
|
5272
5274
|
var isDoneUnsafe = (self) => self.effect !== undefined;
|
|
5273
5275
|
var doneUnsafe = (self, effect) => {
|
|
@@ -5283,19 +5285,18 @@ var doneUnsafe = (self, effect) => {
|
|
|
5283
5285
|
}
|
|
5284
5286
|
return true;
|
|
5285
5287
|
};
|
|
5286
|
-
var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask2((restore) => flatMap5(exit(restore(self)), (exit) => done3(deferred, exit))));
|
|
5287
5288
|
|
|
5288
5289
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/References.js
|
|
5289
5290
|
var TracerTimingEnabled2 = TracerTimingEnabled;
|
|
5290
5291
|
|
|
5291
5292
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Scope.js
|
|
5292
5293
|
var Scope = scopeTag;
|
|
5294
|
+
var make = scopeMake;
|
|
5293
5295
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
5294
|
-
var
|
|
5296
|
+
var provide2 = provideScope;
|
|
5295
5297
|
var addFinalizerExit = scopeAddFinalizerExit;
|
|
5296
5298
|
var addFinalizer = scopeAddFinalizer;
|
|
5297
|
-
var
|
|
5298
|
-
var forkUnsafe2 = scopeForkUnsafe;
|
|
5299
|
+
var forkUnsafe = scopeForkUnsafe;
|
|
5299
5300
|
var close = scopeClose;
|
|
5300
5301
|
|
|
5301
5302
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Layer.js
|
|
@@ -5338,7 +5339,7 @@ var fromBuildUnsafe = (build) => {
|
|
|
5338
5339
|
return self;
|
|
5339
5340
|
};
|
|
5340
5341
|
var fromBuild = (build) => fromBuildUnsafe((memoMap, scope) => {
|
|
5341
|
-
const layerScope =
|
|
5342
|
+
const layerScope = forkUnsafe(scope);
|
|
5342
5343
|
return onExit2(build(memoMap, layerScope), (exit) => exit._tag === "Failure" ? close(layerScope, exit) : void_3);
|
|
5343
5344
|
});
|
|
5344
5345
|
var fromBuildMemo = (build) => {
|
|
@@ -5400,7 +5401,7 @@ var succeed3 = function() {
|
|
|
5400
5401
|
return succeedContext(make9(arguments[0], arguments[1]));
|
|
5401
5402
|
};
|
|
5402
5403
|
var succeedContext = (context) => fromBuildUnsafe(constant(succeed6(context)));
|
|
5403
|
-
var
|
|
5404
|
+
var empty7 = /* @__PURE__ */ succeedContext(/* @__PURE__ */ empty6());
|
|
5404
5405
|
var effect = function() {
|
|
5405
5406
|
if (arguments.length === 1) {
|
|
5406
5407
|
return (effect) => effectImpl(arguments[0], effect);
|
|
@@ -5408,10 +5409,10 @@ var effect = function() {
|
|
|
5408
5409
|
return effectImpl(arguments[0], arguments[1]);
|
|
5409
5410
|
};
|
|
5410
5411
|
var effectImpl = (service, effect) => effectContext(map6(effect, (value) => make9(service, value)));
|
|
5411
|
-
var effectContext = (effect) => fromBuildMemo((_, scope) =>
|
|
5412
|
+
var effectContext = (effect) => fromBuildMemo((_, scope) => provide2(effect, scope));
|
|
5412
5413
|
var mergeAllEffect = (layers, memoMap, scope) => {
|
|
5413
|
-
const parentScope =
|
|
5414
|
-
return forEach2(layers, (layer) => layer.build(memoMap,
|
|
5414
|
+
const parentScope = forkUnsafe(scope, "parallel");
|
|
5415
|
+
return forEach2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), {
|
|
5415
5416
|
concurrency: layers.length
|
|
5416
5417
|
}).pipe(map6((context) => mergeAll2(...context)));
|
|
5417
5418
|
};
|
|
@@ -5489,19 +5490,16 @@ var asVoidAll = exitAsVoidAll;
|
|
|
5489
5490
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Cause.js
|
|
5490
5491
|
var isCause2 = isCause;
|
|
5491
5492
|
var isFailReason2 = isFailReason;
|
|
5492
|
-
var isInterruptReason = isInterruptReason2;
|
|
5493
5493
|
var fromReasons = causeFromReasons;
|
|
5494
5494
|
var fail2 = causeFail;
|
|
5495
5495
|
var die3 = causeDie;
|
|
5496
|
-
var hasInterruptsOnly = hasInterruptsOnly2;
|
|
5497
5496
|
var map7 = causeMap;
|
|
5498
5497
|
var squash = causeSquash;
|
|
5499
5498
|
var findErrorOption2 = findErrorOption;
|
|
5500
5499
|
var hasInterrupts = hasInterrupts2;
|
|
5501
|
-
var filterInterruptors = causeFilterInterruptors;
|
|
5502
5500
|
var isDone3 = isDone2;
|
|
5503
5501
|
var Done = Done2;
|
|
5504
|
-
var done =
|
|
5502
|
+
var done = done3;
|
|
5505
5503
|
var IllegalArgumentError2 = IllegalArgumentError;
|
|
5506
5504
|
var UnknownError = UnknownError2;
|
|
5507
5505
|
|
|
@@ -5934,10 +5932,6 @@ var matchEffect3 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
|
|
|
5934
5932
|
}
|
|
5935
5933
|
}));
|
|
5936
5934
|
|
|
5937
|
-
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/layer.js
|
|
5938
|
-
var provideLayer = (self, layer, options) => scopedWith((scope) => flatMap5(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext2(self, context)));
|
|
5939
|
-
var provide4 = /* @__PURE__ */ dual((args) => isEffect2(args[0]), (self, source, options) => isContext(source) ? provideContext2(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
|
|
5940
|
-
|
|
5941
5935
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Effect.js
|
|
5942
5936
|
var isEffect = isEffect2;
|
|
5943
5937
|
var all = all3;
|
|
@@ -5965,7 +5959,7 @@ var withFiber = withFiber2;
|
|
|
5965
5959
|
var fromResult2 = fromResult;
|
|
5966
5960
|
var fromOption2 = fromOption4;
|
|
5967
5961
|
var flatMap3 = flatMap5;
|
|
5968
|
-
var
|
|
5962
|
+
var flatten = flatten3;
|
|
5969
5963
|
var andThen = andThen2;
|
|
5970
5964
|
var tap = tap2;
|
|
5971
5965
|
var result = result2;
|
|
@@ -5979,13 +5973,13 @@ var zipWith = zipWith3;
|
|
|
5979
5973
|
var catch_ = catch_2;
|
|
5980
5974
|
var catchTag = catchTag2;
|
|
5981
5975
|
var catchReason = catchReason2;
|
|
5982
|
-
var
|
|
5976
|
+
var catchCause2 = catchCause;
|
|
5983
5977
|
var catchIf = catchIf2;
|
|
5984
5978
|
var catchCauseIf = catchCauseIf2;
|
|
5985
5979
|
var mapError = mapError3;
|
|
5980
|
+
var mapBoth = mapBoth2;
|
|
5986
5981
|
var orDie = orDie2;
|
|
5987
5982
|
var tapError3 = tapError2;
|
|
5988
|
-
var tapCause = tapCause2;
|
|
5989
5983
|
var ignore = ignore2;
|
|
5990
5984
|
var ignoreCause = ignoreCause2;
|
|
5991
5985
|
var orElseSucceed2 = orElseSucceed;
|
|
@@ -5998,7 +5992,6 @@ var matchCauseEffect2 = matchCauseEffect;
|
|
|
5998
5992
|
var matchEffect = matchEffect2;
|
|
5999
5993
|
var context = context2;
|
|
6000
5994
|
var contextWith2 = contextWith;
|
|
6001
|
-
var provide2 = provide4;
|
|
6002
5995
|
var provideContext = provideContext2;
|
|
6003
5996
|
var serviceOption = serviceOption2;
|
|
6004
5997
|
var updateContext2 = updateContext;
|
|
@@ -6025,13 +6018,19 @@ var forkIn = forkIn2;
|
|
|
6025
6018
|
var forkScoped = forkScoped2;
|
|
6026
6019
|
var runFork = runFork2;
|
|
6027
6020
|
var runForkWith = runForkWith2;
|
|
6028
|
-
var
|
|
6029
|
-
var
|
|
6030
|
-
var
|
|
6021
|
+
var runCallbackWith = runCallbackWith2;
|
|
6022
|
+
var runCallback = runCallback2;
|
|
6023
|
+
var runPromise = runPromise2;
|
|
6024
|
+
var runPromiseWith = runPromiseWith2;
|
|
6025
|
+
var runPromiseExit = runPromiseExit2;
|
|
6026
|
+
var runPromiseExitWith = runPromiseExitWith2;
|
|
6027
|
+
var runSync = runSync2;
|
|
6028
|
+
var runSyncWith = runSyncWith2;
|
|
6029
|
+
var runSyncExit = runSyncExit2;
|
|
6030
|
+
var runSyncExitWith = runSyncExitWith2;
|
|
6031
6031
|
var fnUntraced = fnUntraced2;
|
|
6032
6032
|
var fn = fn2;
|
|
6033
6033
|
var clockWith = clockWith2;
|
|
6034
|
-
var logError = /* @__PURE__ */ logWithLevel("Error");
|
|
6035
6034
|
var effectify = (fn, onError, onSyncError) => (...args) => callback((resume) => {
|
|
6036
6035
|
let synchronous = true;
|
|
6037
6036
|
let pending;
|
|
@@ -6834,12 +6833,12 @@ class HashMapImpl {
|
|
|
6834
6833
|
}
|
|
6835
6834
|
var emptyNode = /* @__PURE__ */ new EmptyNode;
|
|
6836
6835
|
var isHashMap = (u) => hasProperty(u, HashMapTypeId);
|
|
6837
|
-
var
|
|
6836
|
+
var empty8 = () => new HashMapImpl(false, 0, emptyNode, 0);
|
|
6838
6837
|
var get5 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
6839
6838
|
const impl = self;
|
|
6840
6839
|
return impl._root.get(0, hash(key), key);
|
|
6841
6840
|
});
|
|
6842
|
-
var
|
|
6841
|
+
var has2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
6843
6842
|
const impl = self;
|
|
6844
6843
|
return impl._root.has(0, hash(key), key);
|
|
6845
6844
|
});
|
|
@@ -6876,7 +6875,7 @@ var HashSetProto = {
|
|
|
6876
6875
|
return optimize(combine(hashSetSeed, hash(keyMap(this))));
|
|
6877
6876
|
},
|
|
6878
6877
|
[symbol2](that) {
|
|
6879
|
-
return isHashSet(that) && size2(this) === size2(that) && every2(this, (value) =>
|
|
6878
|
+
return isHashSet(that) && size2(this) === size2(that) && every2(this, (value) => has3(that, value));
|
|
6880
6879
|
},
|
|
6881
6880
|
[Symbol.iterator]() {
|
|
6882
6881
|
return keys2(keyMap(this));
|
|
@@ -6906,13 +6905,13 @@ var makeImpl2 = (keyMap) => {
|
|
|
6906
6905
|
var isHashSet = (u) => hasProperty(u, HashSetTypeId);
|
|
6907
6906
|
var keyMap = (self) => self.keyMap;
|
|
6908
6907
|
var fromIterable3 = (values) => {
|
|
6909
|
-
let map =
|
|
6908
|
+
let map = empty8();
|
|
6910
6909
|
for (const value of values) {
|
|
6911
6910
|
map = set2(map, value, true);
|
|
6912
6911
|
}
|
|
6913
6912
|
return makeImpl2(map);
|
|
6914
6913
|
};
|
|
6915
|
-
var
|
|
6914
|
+
var has3 = (self, value) => has2(keyMap(self), value);
|
|
6916
6915
|
var size2 = (self) => size(keyMap(self));
|
|
6917
6916
|
var every2 = (self, predicate) => {
|
|
6918
6917
|
for (const value of self) {
|
|
@@ -6925,7 +6924,7 @@ var every2 = (self, predicate) => {
|
|
|
6925
6924
|
|
|
6926
6925
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/HashSet.js
|
|
6927
6926
|
var fromIterable4 = fromIterable3;
|
|
6928
|
-
var
|
|
6927
|
+
var has4 = /* @__PURE__ */ dual(2, has3);
|
|
6929
6928
|
var size3 = size2;
|
|
6930
6929
|
|
|
6931
6930
|
// ../../../../node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
|
|
@@ -7189,10 +7188,10 @@ var Proto5 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
|
|
|
7189
7188
|
});
|
|
7190
7189
|
var make15 = (input) => Object.assign(Object.create(Proto5), input);
|
|
7191
7190
|
var Equivalence3 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
|
|
7192
|
-
var
|
|
7191
|
+
var empty2 = /* @__PURE__ */ Object.create(Proto5);
|
|
7193
7192
|
var fromInput = (input) => {
|
|
7194
7193
|
if (input === undefined) {
|
|
7195
|
-
return
|
|
7194
|
+
return empty2;
|
|
7196
7195
|
} else if (Symbol.iterator in input) {
|
|
7197
7196
|
const out = Object.create(Proto5);
|
|
7198
7197
|
for (const [k, v] of input) {
|
|
@@ -7353,7 +7352,7 @@ var fromInputNested = (input) => {
|
|
|
7353
7352
|
var coerce = (value) => isRedacted(value) ? value : String(value);
|
|
7354
7353
|
var Equivalence4 = /* @__PURE__ */ make8((a, b) => arrayEquivalence(a.params, b.params));
|
|
7355
7354
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence3(/* @__PURE__ */ makeEquivalence2([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
|
|
7356
|
-
var
|
|
7355
|
+
var empty3 = /* @__PURE__ */ make16([]);
|
|
7357
7356
|
var getFirst = /* @__PURE__ */ dual(2, (self, key) => findFirst(self.params, ([k]) => k === key).pipe(map(([, value]) => unwrap3(value))));
|
|
7358
7357
|
var set5 = /* @__PURE__ */ dual(3, (self, key, value) => make16(append(filter2(self.params, ([k]) => k !== key), [key, coerce(value)])));
|
|
7359
7358
|
var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
@@ -7422,7 +7421,7 @@ var decodeQueryKey = (key) => {
|
|
|
7422
7421
|
return key;
|
|
7423
7422
|
}
|
|
7424
7423
|
};
|
|
7425
|
-
var currentRedactedNames = () => get(globalThis[currentFiberTypeId]?.context ??
|
|
7424
|
+
var currentRedactedNames = () => get(globalThis[currentFiberTypeId]?.context ?? empty6(), CurrentRedactedNames2);
|
|
7426
7425
|
var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
|
|
7427
7426
|
defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
|
|
7428
7427
|
});
|
|
@@ -7772,7 +7771,7 @@ var runGetter = (self, input, options) => {
|
|
|
7772
7771
|
};
|
|
7773
7772
|
var makeGetter = (fields) => Object.assign(Object.create(Prototype2), fields);
|
|
7774
7773
|
var composeOptionalEffect = (first, second) => transformOptionalEffect((input, options) => flatMapEager2(runGetter(first, input, options), (output) => runGetter(second, output, options)));
|
|
7775
|
-
var
|
|
7774
|
+
var compose = /* @__PURE__ */ dual(2, (self, other) => {
|
|
7776
7775
|
if (self._tag === "Passthrough")
|
|
7777
7776
|
return other;
|
|
7778
7777
|
if (other._tag === "Passthrough")
|
|
@@ -8659,7 +8658,7 @@ var Objects = class extends ASTNodeImpl {
|
|
|
8659
8658
|
}
|
|
8660
8659
|
}
|
|
8661
8660
|
} else if (parseIndexes) {
|
|
8662
|
-
const keyPairs =
|
|
8661
|
+
const keyPairs = empty();
|
|
8663
8662
|
for (let i = 0;i < indexCount; i++) {
|
|
8664
8663
|
const index = indexes[i];
|
|
8665
8664
|
const keys = indexKeys?.[i] ?? (index.is.parameter === string2 ? Object.keys(record) : getIndexSignatureKeys(record, index.is.parameter, options));
|
|
@@ -9177,7 +9176,7 @@ function failSingleUnionCandidate(ast, cause, input, options) {
|
|
|
9177
9176
|
return fail3(new AnyOf(ast, [issue], input, options));
|
|
9178
9177
|
}
|
|
9179
9178
|
function catchSingleUnionCandidate(ast, result, input, options) {
|
|
9180
|
-
return
|
|
9179
|
+
return catchCause2(result, (cause) => failSingleUnionCandidate(ast, cause, input, options));
|
|
9181
9180
|
}
|
|
9182
9181
|
function parseUnionCandidates(ast, parser, candidates, input, options) {
|
|
9183
9182
|
const state = {
|
|
@@ -9587,33 +9586,33 @@ var toType2 = /* @__PURE__ */ memoizeIdempotent((ast) => {
|
|
|
9587
9586
|
return type;
|
|
9588
9587
|
});
|
|
9589
9588
|
var toEncoded = /* @__PURE__ */ memoizeIdempotent((ast) => {
|
|
9590
|
-
return toType2(
|
|
9589
|
+
return toType2(flip3(ast));
|
|
9591
9590
|
});
|
|
9592
9591
|
function flipEncoding(ast, encoding) {
|
|
9593
9592
|
const links = encoding;
|
|
9594
9593
|
const len = links.length;
|
|
9595
9594
|
const last = links[len - 1];
|
|
9596
|
-
const ls = [new Link(
|
|
9595
|
+
const ls = [new Link(flip3(replaceEncoding(ast, undefined)), links[0].transformation.flip())];
|
|
9597
9596
|
for (let i = 1;i < len; i++) {
|
|
9598
|
-
ls.unshift(new Link(
|
|
9597
|
+
ls.unshift(new Link(flip3(links[i - 1].to), links[i].transformation.flip()));
|
|
9599
9598
|
}
|
|
9600
|
-
const to =
|
|
9599
|
+
const to = flip3(last.to);
|
|
9601
9600
|
if (to.encoding) {
|
|
9602
9601
|
return replaceEncoding(to, [...to.encoding, ...ls]);
|
|
9603
9602
|
} else {
|
|
9604
9603
|
return replaceEncoding(to, ls);
|
|
9605
9604
|
}
|
|
9606
9605
|
}
|
|
9607
|
-
var
|
|
9606
|
+
var flip3 = /* @__PURE__ */ memoize((ast) => {
|
|
9608
9607
|
if (ast.encoding) {
|
|
9609
9608
|
return flipEncoding(ast, ast.encoding);
|
|
9610
9609
|
}
|
|
9611
9610
|
const owner = getContextOwner(ast);
|
|
9612
9611
|
if (owner !== ast) {
|
|
9613
|
-
const flipped =
|
|
9612
|
+
const flipped = flip3(owner);
|
|
9614
9613
|
return flipped === owner ? ast : replaceContext(flipped, ast.context);
|
|
9615
9614
|
}
|
|
9616
|
-
return "flip" in ast ? ast.flip(
|
|
9615
|
+
return "flip" in ast ? ast.flip(flip3) : ("recur" in ast) ? ast.recur(flip3) : ast;
|
|
9617
9616
|
});
|
|
9618
9617
|
function fromConst(ast, value) {
|
|
9619
9618
|
const succeed = value === 0 ? sameExit : succeed7(value);
|
|
@@ -9828,7 +9827,7 @@ function compileTransformationUnsafe(transformation) {
|
|
|
9828
9827
|
}
|
|
9829
9828
|
}
|
|
9830
9829
|
var fromOptionalEffect = (effect) => flatMapEager2(effect, fromOptionExit);
|
|
9831
|
-
var wrapEncoding = (ast, input, options, effect) =>
|
|
9830
|
+
var wrapEncoding = (ast, input, options, effect) => catchCause2(effect, (cause) => failCauseSync2(() => map7(cause, (issue) => new Encoding(ast, issue, input, options))));
|
|
9832
9831
|
function makeConstructorParser(descriptor, compile) {
|
|
9833
9832
|
const transform = compileTransformation(descriptor.link.transformation);
|
|
9834
9833
|
let sourceParser;
|
|
@@ -10084,7 +10083,7 @@ function makeEffect(schema) {
|
|
|
10084
10083
|
function makeOption(schema) {
|
|
10085
10084
|
const parser = makeEffect(schema);
|
|
10086
10085
|
return (input, options) => {
|
|
10087
|
-
const exit =
|
|
10086
|
+
const exit = runSyncExit(parser(input, options));
|
|
10088
10087
|
if (isSuccess2(exit)) {
|
|
10089
10088
|
return some(exit.value);
|
|
10090
10089
|
}
|
|
@@ -10123,7 +10122,7 @@ function makeIs(ast) {
|
|
|
10123
10122
|
}
|
|
10124
10123
|
const parser = entry.parser;
|
|
10125
10124
|
return (input) => {
|
|
10126
|
-
const exit =
|
|
10125
|
+
const exit = runSyncExit(parserResult(parser(input, defaultParseOptions), input));
|
|
10127
10126
|
if (isSuccess2(exit))
|
|
10128
10127
|
return true;
|
|
10129
10128
|
getSchemaIssueOrThrow(exit.cause, "Type guard adapter can only return false for schema issues");
|
|
@@ -10152,7 +10151,7 @@ function decodeUnknownOption(schema, options) {
|
|
|
10152
10151
|
}
|
|
10153
10152
|
var decodeOption2 = decodeUnknownOption;
|
|
10154
10153
|
function encodeUnknownEffect(schema, options) {
|
|
10155
|
-
const parser = run2(
|
|
10154
|
+
const parser = run2(flip3(schema.ast));
|
|
10156
10155
|
return options === undefined ? parser : (input, overrideOptions) => parser(input, mergeParseOptions(options, overrideOptions));
|
|
10157
10156
|
}
|
|
10158
10157
|
var mergeParseOptions = (options, overrideOptions) => overrideOptions ? {
|
|
@@ -10191,7 +10190,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
10191
10190
|
};
|
|
10192
10191
|
}
|
|
10193
10192
|
function asExit(parser) {
|
|
10194
|
-
return (input, options) =>
|
|
10193
|
+
return (input, options) => runSyncExit(parser(input, options));
|
|
10195
10194
|
}
|
|
10196
10195
|
function asOption(parser) {
|
|
10197
10196
|
const parserExit = asExit(parser);
|
|
@@ -10205,7 +10204,7 @@ function asOption(parser) {
|
|
|
10205
10204
|
};
|
|
10206
10205
|
}
|
|
10207
10206
|
function runSync3(effect, message) {
|
|
10208
|
-
const exit =
|
|
10207
|
+
const exit = runSyncExit(effect);
|
|
10209
10208
|
if (isSuccess2(exit)) {
|
|
10210
10209
|
return exit.value;
|
|
10211
10210
|
}
|
|
@@ -11869,7 +11868,7 @@ function fromIssueEffect(self) {
|
|
|
11869
11868
|
if (effectIsExit(self)) {
|
|
11870
11869
|
return fromIssueExit(self);
|
|
11871
11870
|
}
|
|
11872
|
-
return
|
|
11871
|
+
return catchCause2(self, (cause) => failCauseSync2(() => map7(cause, (issue) => new SchemaError(issue))));
|
|
11873
11872
|
}
|
|
11874
11873
|
function fromIssueExit(exit) {
|
|
11875
11874
|
return isSuccess2(exit) ? exit : failCause3(map7(exit.cause, (issue) => new SchemaError(issue)));
|
|
@@ -11892,7 +11891,7 @@ function getSchemaErrorOrThrow(cause, message) {
|
|
|
11892
11891
|
return schemaError;
|
|
11893
11892
|
}
|
|
11894
11893
|
function runSchemaErrorSync(self) {
|
|
11895
|
-
const exit =
|
|
11894
|
+
const exit = runSyncExit(self);
|
|
11896
11895
|
if (isSuccess2(exit)) {
|
|
11897
11896
|
return exit.value;
|
|
11898
11897
|
}
|
|
@@ -11950,6 +11949,19 @@ var optional = /* @__PURE__ */ lambda((self) => {
|
|
|
11950
11949
|
var toType = /* @__PURE__ */ lambda((schema) => make19(toType2(schema.ast), {
|
|
11951
11950
|
schema
|
|
11952
11951
|
}));
|
|
11952
|
+
var FlipTypeId = "~effect/Schema/flip";
|
|
11953
|
+
function isFlip$(schema) {
|
|
11954
|
+
return hasProperty(schema, FlipTypeId) && schema[FlipTypeId] === FlipTypeId;
|
|
11955
|
+
}
|
|
11956
|
+
function flip(schema) {
|
|
11957
|
+
if (isFlip$(schema)) {
|
|
11958
|
+
return schema.schema.rebuild(flip3(schema.ast));
|
|
11959
|
+
}
|
|
11960
|
+
return make19(flip3(schema.ast), {
|
|
11961
|
+
[FlipTypeId]: FlipTypeId,
|
|
11962
|
+
schema
|
|
11963
|
+
});
|
|
11964
|
+
}
|
|
11953
11965
|
function Literal(literal) {
|
|
11954
11966
|
const out = make19(new Literal2(literal), {
|
|
11955
11967
|
literal,
|
|
@@ -12002,7 +12014,7 @@ function makeTuple(ast, elements) {
|
|
|
12002
12014
|
}
|
|
12003
12015
|
});
|
|
12004
12016
|
}
|
|
12005
|
-
function
|
|
12017
|
+
function Tuple2(elements) {
|
|
12006
12018
|
return makeTuple(tuple(elements), elements);
|
|
12007
12019
|
}
|
|
12008
12020
|
var ArraySchema = /* @__PURE__ */ lambda((schema) => make19(new Arrays(false, [], [schema.ast]), {
|
|
@@ -12988,7 +13000,6 @@ var exhaustive2 = exhaustive;
|
|
|
12988
13000
|
var await_ = fiberAwait;
|
|
12989
13001
|
var join2 = fiberJoin;
|
|
12990
13002
|
var interrupt2 = fiberInterrupt;
|
|
12991
|
-
var interruptAll = fiberInterruptAll;
|
|
12992
13003
|
var getCurrent = getCurrentFiber;
|
|
12993
13004
|
var runIn = fiberRunIn;
|
|
12994
13005
|
|
|
@@ -13525,13 +13536,13 @@ var ChannelProto = {
|
|
|
13525
13536
|
};
|
|
13526
13537
|
var fromTransform = (transform) => {
|
|
13527
13538
|
const self = Object.create(ChannelProto);
|
|
13528
|
-
self.transform = (upstream, scope) =>
|
|
13539
|
+
self.transform = (upstream, scope) => catchCause2(transform(upstream, scope), (cause) => succeed4(failCause(cause)));
|
|
13529
13540
|
return self;
|
|
13530
13541
|
};
|
|
13531
13542
|
var transformPull = (self, f) => fromTransform((upstream, scope) => flatMap3(toTransform(self)(upstream, scope), (pull) => f(pull, scope)));
|
|
13532
13543
|
var fromPull2 = (effect) => fromTransform((_, __) => effect);
|
|
13533
13544
|
var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream, scope) {
|
|
13534
|
-
const closableScope =
|
|
13545
|
+
const closableScope = forkUnsafe(scope);
|
|
13535
13546
|
const onCause = (cause) => close(closableScope, doneExitFromCause(cause));
|
|
13536
13547
|
const pull = yield* onError(f(upstream, scope, closableScope), onCause);
|
|
13537
13548
|
return onError(pull, onCause);
|
|
@@ -13541,7 +13552,7 @@ var DefaultChunkSize = 4096;
|
|
|
13541
13552
|
var asyncQueue = (scope, f, options) => make2({
|
|
13542
13553
|
capacity: options?.bufferSize,
|
|
13543
13554
|
strategy: options?.strategy
|
|
13544
|
-
}).pipe(tap((queue) => addFinalizer(scope, shutdown(queue))), tap((queue) =>
|
|
13555
|
+
}).pipe(tap((queue) => addFinalizer(scope, shutdown(queue))), tap((queue) => provide2(f(queue), scope).pipe(catchCause2((cause) => failCause4(queue, cause)), forkIn(scope, {
|
|
13545
13556
|
startImmediately: true
|
|
13546
13557
|
}))));
|
|
13547
13558
|
var callbackArray = (f, options) => fromTransform((_, scope) => map4(asyncQueue(scope, f, options), takeAll2));
|
|
@@ -13572,7 +13583,7 @@ var fromIteratorArray = (iterator, chunkSize = DefaultChunkSize) => {
|
|
|
13572
13583
|
};
|
|
13573
13584
|
var fromIterableArray = (iterable, chunkSize = DefaultChunkSize) => fromIteratorArray(() => iterable[Symbol.iterator](), chunkSize);
|
|
13574
13585
|
var succeed8 = (value) => fromEffect2(succeed4(value));
|
|
13575
|
-
var
|
|
13586
|
+
var empty10 = /* @__PURE__ */ fromPull2(/* @__PURE__ */ succeed4(/* @__PURE__ */ done()));
|
|
13576
13587
|
var fail10 = (error) => fromPull2(succeed4(fail5(error)));
|
|
13577
13588
|
var fromEffect2 = (effect) => fromPull2(sync(() => {
|
|
13578
13589
|
let done2 = false;
|
|
@@ -13646,13 +13657,13 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
13646
13657
|
return void_2;
|
|
13647
13658
|
}), forever({
|
|
13648
13659
|
disableYield: true
|
|
13649
|
-
}),
|
|
13660
|
+
}), catchCause2((cause) => semaphore.withPermits(concurrencyN - 1)(failCause4(queue, cause))), forkIn(forkedScope));
|
|
13650
13661
|
} else {
|
|
13651
13662
|
const effects = yield* bounded(concurrencyN - 2);
|
|
13652
13663
|
yield* addFinalizer(forkedScope, shutdown(effects));
|
|
13653
|
-
yield* take(effects).pipe(
|
|
13664
|
+
yield* take(effects).pipe(flatten, flatMap3((value) => offer(queue, value)), forever({
|
|
13654
13665
|
disableYield: true
|
|
13655
|
-
}),
|
|
13666
|
+
}), catchCause2((cause) => failCause4(queue, cause)), forkIn(forkedScope));
|
|
13656
13667
|
let errorCause;
|
|
13657
13668
|
const onExit = (exit) => {
|
|
13658
13669
|
if (exit._tag === "Success")
|
|
@@ -13670,7 +13681,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
13670
13681
|
return offer(effects, join2(fiber));
|
|
13671
13682
|
}), forever({
|
|
13672
13683
|
disableYield: true
|
|
13673
|
-
}),
|
|
13684
|
+
}), catchCause2((cause) => offer(effects, failCause3(cause)).pipe(andThen(failCause4(effects, cause)))), forkIn(forkedScope));
|
|
13674
13685
|
}
|
|
13675
13686
|
return take(queue);
|
|
13676
13687
|
}));
|
|
@@ -13679,7 +13690,7 @@ var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map4(toT
|
|
|
13679
13690
|
let childPull;
|
|
13680
13691
|
let childScope;
|
|
13681
13692
|
const makePull = flatMap3(pull, (value) => {
|
|
13682
|
-
childScope ??=
|
|
13693
|
+
childScope ??= forkUnsafe(scope);
|
|
13683
13694
|
return flatMapEager2(toTransform(f(value))(upstream, childScope), (pull) => {
|
|
13684
13695
|
childPull = catchHalt(pull);
|
|
13685
13696
|
return childPull;
|
|
@@ -13734,6 +13745,46 @@ var filterMapArray = /* @__PURE__ */ dual(2, (self, filter) => transformPull(sel
|
|
|
13734
13745
|
}
|
|
13735
13746
|
return isReadonlyArrayNonEmpty(passes) ? succeed4(passes) : flatMap3(pull, loop);
|
|
13736
13747
|
}))));
|
|
13748
|
+
var mapAccum = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, initial, f, options) => fromTransform((upstream, scope) => map4(toTransform(self)(upstream, scope), (pull) => {
|
|
13749
|
+
let state = initial();
|
|
13750
|
+
let current;
|
|
13751
|
+
let index = 0;
|
|
13752
|
+
let cause;
|
|
13753
|
+
const pullNext = matchCauseEffect2(pull, {
|
|
13754
|
+
onFailure(cause_) {
|
|
13755
|
+
cause = cause_;
|
|
13756
|
+
const b = options?.onHalt && options.onHalt(state);
|
|
13757
|
+
return b && b.length > 0 ? succeed4([state, b]) : failCause(cause_);
|
|
13758
|
+
},
|
|
13759
|
+
onSuccess(a) {
|
|
13760
|
+
const b = f(state, a);
|
|
13761
|
+
return isArray(b) ? succeed4(b) : b;
|
|
13762
|
+
}
|
|
13763
|
+
});
|
|
13764
|
+
const pump = suspend(function loop() {
|
|
13765
|
+
if (current === undefined) {
|
|
13766
|
+
if (cause)
|
|
13767
|
+
return failCause(cause);
|
|
13768
|
+
return flatMap3(pullNext, ([newState, values]) => {
|
|
13769
|
+
state = newState;
|
|
13770
|
+
if (values.length === 0) {
|
|
13771
|
+
return loop();
|
|
13772
|
+
} else if (values.length === 1) {
|
|
13773
|
+
return succeed4(values[0]);
|
|
13774
|
+
}
|
|
13775
|
+
current = values;
|
|
13776
|
+
return loop();
|
|
13777
|
+
});
|
|
13778
|
+
}
|
|
13779
|
+
const next = current[index++];
|
|
13780
|
+
if (index >= current.length) {
|
|
13781
|
+
current = undefined;
|
|
13782
|
+
index = 0;
|
|
13783
|
+
}
|
|
13784
|
+
return succeed4(next);
|
|
13785
|
+
});
|
|
13786
|
+
return pump;
|
|
13787
|
+
})));
|
|
13737
13788
|
var tapError4 = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => succeed4(tapError3(pull, (err) => isDone3(err) ? void_2 : asVoid2(f(err))))));
|
|
13738
13789
|
var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
|
|
13739
13790
|
bufferSize = 16,
|
|
@@ -13759,7 +13810,7 @@ var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
|
|
|
13759
13810
|
}
|
|
13760
13811
|
}
|
|
13761
13812
|
const channel = pullFiber === undefined ? yield* pull : yield* join2(pullFiber);
|
|
13762
|
-
const childScope =
|
|
13813
|
+
const childScope = forkUnsafe(forkedScope);
|
|
13763
13814
|
const childPull = yield* toTransform(channel)(upstream, childScope);
|
|
13764
13815
|
while (fibers.size >= concurrencyN) {
|
|
13765
13816
|
const [fiber, fiberScope] = headUnsafe(fibers);
|
|
@@ -13788,7 +13839,7 @@ var mergeAll3 = /* @__PURE__ */ dual(2, (channels, {
|
|
|
13788
13839
|
doneLatch.closeUnsafe();
|
|
13789
13840
|
fibers.set(fiber, childScope);
|
|
13790
13841
|
}
|
|
13791
|
-
}).pipe(
|
|
13842
|
+
}).pipe(catchCause2((cause) => {
|
|
13792
13843
|
const halt = filterDone(cause);
|
|
13793
13844
|
if (isSuccess(halt)) {
|
|
13794
13845
|
return doneLatch.whenOpen(failCause4(queue, cause));
|
|
@@ -13824,8 +13875,8 @@ var merge4 = /* @__PURE__ */ dual((args) => isChannel(args[0]) && isChannel(args
|
|
|
13824
13875
|
onFailure: (cause) => onExit(side, cause),
|
|
13825
13876
|
onSuccess: () => onExit(side, cause)
|
|
13826
13877
|
}))), forkIn(forkedScope));
|
|
13827
|
-
yield* runSide("left", left,
|
|
13828
|
-
yield* runSide("right", right,
|
|
13878
|
+
yield* runSide("left", left, forkUnsafe(forkedScope));
|
|
13879
|
+
yield* runSide("right", right, forkUnsafe(forkedScope));
|
|
13829
13880
|
return take(queue);
|
|
13830
13881
|
})));
|
|
13831
13882
|
var mergeEffect = /* @__PURE__ */ dual(2, (self, effect) => merge4(self, fromEffectDrain(effect), {
|
|
@@ -13925,15 +13976,15 @@ var decodeText2 = (encoding, options) => fromTransform((upstream, _scope) => syn
|
|
|
13925
13976
|
var pipeTo = /* @__PURE__ */ dual(2, (self, that) => fromTransform((upstream, scope) => flatMap3(toTransform(self)(upstream, scope), (upstream) => toTransform(that)(upstream, scope))));
|
|
13926
13977
|
var isUpstreamFailure = (reason) => reason._tag === "Die" && isDone3(reason.defect) && isCause2(reason.defect.value);
|
|
13927
13978
|
var hasUpstreamFailure = (cause) => cause.reasons.some(isUpstreamFailure);
|
|
13928
|
-
var upstreamFailureToDefect = (pull) =>
|
|
13979
|
+
var upstreamFailureToDefect = (pull) => catchCause2(pull, (cause) => isDoneCause(cause) ? failCause(cause) : die(Done(cause)));
|
|
13929
13980
|
var unwrapUpstreamFailure = (cause) => hasUpstreamFailure(cause) ? fromReasons(cause.reasons.flatMap((reason) => isUpstreamFailure(reason) ? reason.defect.value.reasons : [reason])) : cause;
|
|
13930
|
-
var restoreUpstreamFailure = (effect) =>
|
|
13981
|
+
var restoreUpstreamFailure = (effect) => catchCause2(effect, (cause) => failCause(unwrapUpstreamFailure(cause)));
|
|
13931
13982
|
var unwrap = (channel) => fromTransform((upstream, scope) => {
|
|
13932
13983
|
let pull;
|
|
13933
13984
|
return succeed4(suspend(() => {
|
|
13934
13985
|
if (pull)
|
|
13935
13986
|
return pull;
|
|
13936
|
-
return channel.pipe(
|
|
13987
|
+
return channel.pipe(provide2(scope), flatMap3((channel) => toTransform(channel)(upstream, scope)), flatMap3((pull_) => pull = pull_));
|
|
13937
13988
|
}));
|
|
13938
13989
|
});
|
|
13939
13990
|
var interruptWhen = /* @__PURE__ */ dual(2, (self, effect) => merge4(self, fromPull2(succeed4(flatMap3(effect, done))), {
|
|
@@ -13949,7 +14000,7 @@ var runWith = (self, f, onHalt) => suspend(() => {
|
|
|
13949
14000
|
var runDrain2 = (self) => runWith(self, (pull) => forever(pull, {
|
|
13950
14001
|
disableYield: true
|
|
13951
14002
|
}));
|
|
13952
|
-
var
|
|
14003
|
+
var runForEach = /* @__PURE__ */ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap3(pull, f), {
|
|
13953
14004
|
disableYield: true
|
|
13954
14005
|
})));
|
|
13955
14006
|
var mkUint8Array = (self) => map4(runFold(self, () => ({
|
|
@@ -14019,7 +14070,7 @@ var fromPull = (pull) => fromChannel(fromPull2(pull));
|
|
|
14019
14070
|
var transformPull2 = (self, f) => fromChannel(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
14020
14071
|
var toChannel = (stream) => stream.channel;
|
|
14021
14072
|
var callback2 = (f, options) => fromChannel(callbackArray(f, options));
|
|
14022
|
-
var
|
|
14073
|
+
var empty4 = /* @__PURE__ */ fromChannel(empty10);
|
|
14023
14074
|
var suspend3 = (stream) => {
|
|
14024
14075
|
const suspended = fromChannel(suspend5(() => stream().channel));
|
|
14025
14076
|
suspendedStreams.set(suspended, stream);
|
|
@@ -14028,7 +14079,7 @@ var suspend3 = (stream) => {
|
|
|
14028
14079
|
var suspendedStreams = /* @__PURE__ */ new WeakMap;
|
|
14029
14080
|
var fail6 = (error) => fromChannel(fail10(error));
|
|
14030
14081
|
var fromIterable = (iterable, options) => Array.isArray(iterable) && options?.chunkSize === undefined ? fromArray2(iterable) : fromChannel(fromIterableArray(iterable, options?.chunkSize));
|
|
14031
|
-
var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed8(array)) :
|
|
14082
|
+
var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed8(array)) : empty4;
|
|
14032
14083
|
var fromReadableStream2 = (options) => fromChannel(fromReadableStream(options));
|
|
14033
14084
|
var paginate = (s, f) => fromPull(sync(() => {
|
|
14034
14085
|
let state = s;
|
|
@@ -14056,6 +14107,13 @@ var merge = /* @__PURE__ */ dual((args) => isStream(args[0]) && isStream(args[1]
|
|
|
14056
14107
|
var mergeEffect2 = /* @__PURE__ */ dual(2, (self, effect) => self.channel.pipe(mergeEffect(effect), fromChannel));
|
|
14057
14108
|
var filterMap2 = /* @__PURE__ */ dual(2, (self, filter) => fromChannel(filterMapArray(toChannel(self), filter)));
|
|
14058
14109
|
var tapError = /* @__PURE__ */ dual(2, (self, f) => self.channel.pipe(tapError4(f), fromChannel));
|
|
14110
|
+
var emptyArr = /* @__PURE__ */ empty();
|
|
14111
|
+
var mapAccumEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, initial, f, options) => self.channel.pipe(flattenArray, mapAccum(initial, (state, a) => map4(f(state, a), ([state, values]) => [state, isReadonlyArrayNonEmpty(values) ? of(values) : empty()]), options?.onHalt ? {
|
|
14112
|
+
onHalt(state) {
|
|
14113
|
+
const arr = options.onHalt(state);
|
|
14114
|
+
return isReadonlyArrayNonEmpty(arr) ? of(arr) : emptyArr;
|
|
14115
|
+
}
|
|
14116
|
+
} : undefined), fromChannel));
|
|
14059
14117
|
var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (upstream, scope) => sync(() => {
|
|
14060
14118
|
let done2;
|
|
14061
14119
|
let leftover;
|
|
@@ -14089,17 +14147,10 @@ var runCollect = (self) => runFold(self.channel, () => [], (acc, chunk) => {
|
|
|
14089
14147
|
return acc;
|
|
14090
14148
|
});
|
|
14091
14149
|
var runHead = (self) => map4(runHead2(self.channel), map(getUnsafe2(0)));
|
|
14092
|
-
var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel, (arr) => {
|
|
14093
|
-
let i = 0;
|
|
14094
|
-
return whileLoop2({
|
|
14095
|
-
while: () => i < arr.length,
|
|
14096
|
-
body: () => f(arr[i++]),
|
|
14097
|
-
step: constVoid
|
|
14098
|
-
});
|
|
14099
|
-
}));
|
|
14100
14150
|
var runDrain = (self) => runDrain2(self.channel);
|
|
14101
14151
|
var mkString = (self) => runFold(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
14102
14152
|
var mkArrayBuffer = (self) => map4(mkUint8Array(self.channel), (bytes) => bytes.buffer);
|
|
14153
|
+
var mkUint8Array2 = (self) => mkUint8Array(self.channel);
|
|
14103
14154
|
var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, context, options) => {
|
|
14104
14155
|
let currentResolve = undefined;
|
|
14105
14156
|
let fiber = undefined;
|
|
@@ -14109,7 +14160,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
14109
14160
|
const onAbort = () => fiber.interruptUnsafe();
|
|
14110
14161
|
return new ReadableStream({
|
|
14111
14162
|
start(controller) {
|
|
14112
|
-
fiber = runFork(provideContext(
|
|
14163
|
+
fiber = runFork(provideContext(runForEach(transformPull(self.channel, (pull) => succeed4(latch.whenOpen(pull))), (chunk) => sync(() => {
|
|
14113
14164
|
latch.closeUnsafe();
|
|
14114
14165
|
for (let i = 0;i < chunk.length; i++) {
|
|
14115
14166
|
controller.enqueue(chunk[i]);
|
|
@@ -14146,7 +14197,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
14146
14197
|
if (!fiber)
|
|
14147
14198
|
return;
|
|
14148
14199
|
cancelled = true;
|
|
14149
|
-
return
|
|
14200
|
+
return runPromise(asVoid2(interrupt2(fiber)));
|
|
14150
14201
|
}
|
|
14151
14202
|
}, options?.strategy);
|
|
14152
14203
|
});
|
|
@@ -14327,7 +14378,7 @@ class Empty2 extends Proto8 {
|
|
|
14327
14378
|
};
|
|
14328
14379
|
}
|
|
14329
14380
|
}
|
|
14330
|
-
var
|
|
14381
|
+
var empty5 = /* @__PURE__ */ new Empty2;
|
|
14331
14382
|
class Uint8Array3 extends Proto8 {
|
|
14332
14383
|
_tag = "Uint8Array";
|
|
14333
14384
|
contentType;
|
|
@@ -14497,8 +14548,8 @@ function makeWith(method, url, urlParams, hash, headers, body) {
|
|
|
14497
14548
|
self.body = body;
|
|
14498
14549
|
return self;
|
|
14499
14550
|
}
|
|
14500
|
-
var
|
|
14501
|
-
var make24 = (method) => (url, options) => modify(
|
|
14551
|
+
var empty11 = /* @__PURE__ */ makeWith("GET", "", empty3, /* @__PURE__ */ none(), empty2, empty5);
|
|
14552
|
+
var make24 = (method) => (url, options) => modify(empty11, {
|
|
14502
14553
|
method,
|
|
14503
14554
|
url,
|
|
14504
14555
|
...options ?? undefined
|
|
@@ -14835,7 +14886,7 @@ class WebHttpClientResponse extends Class2 {
|
|
|
14835
14886
|
cause
|
|
14836
14887
|
})
|
|
14837
14888
|
})
|
|
14838
|
-
}).pipe(cached,
|
|
14889
|
+
}).pipe(cached, runSync);
|
|
14839
14890
|
}
|
|
14840
14891
|
arrayBufferBody;
|
|
14841
14892
|
get arrayBuffer() {
|
|
@@ -14851,7 +14902,7 @@ class WebHttpClientResponse extends Class2 {
|
|
|
14851
14902
|
cause
|
|
14852
14903
|
})
|
|
14853
14904
|
})
|
|
14854
|
-
}).pipe(cached,
|
|
14905
|
+
}).pipe(cached, runSync);
|
|
14855
14906
|
return this.arrayBufferBody;
|
|
14856
14907
|
}
|
|
14857
14908
|
get upgrade() {
|
|
@@ -15269,7 +15320,7 @@ var fetch = /* @__PURE__ */ make25((request, url, signal, fiber) => {
|
|
|
15269
15320
|
return send(undefined);
|
|
15270
15321
|
});
|
|
15271
15322
|
var layer2 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed4(fetch));
|
|
15272
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15323
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/_virtual/_rolldown/runtime.js
|
|
15273
15324
|
var __defProp = Object.defineProperty;
|
|
15274
15325
|
var __exportAll3 = (all, no_symbols) => {
|
|
15275
15326
|
let target = {};
|
|
@@ -15283,7 +15334,7 @@ var __exportAll3 = (all, no_symbols) => {
|
|
|
15283
15334
|
return target;
|
|
15284
15335
|
};
|
|
15285
15336
|
|
|
15286
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15337
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DefinitionError.js
|
|
15287
15338
|
var DefinitionIdentifierKindSchema = Literals([
|
|
15288
15339
|
"dual",
|
|
15289
15340
|
"plugin",
|
|
@@ -15335,7 +15386,7 @@ var DuplicateAuthMethodIdentifierError = class extends TaggedError2()("Duplicate
|
|
|
15335
15386
|
}) {
|
|
15336
15387
|
};
|
|
15337
15388
|
|
|
15338
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15389
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/identifier.js
|
|
15339
15390
|
var identifierSchema = String3.check(isPattern2(/^[a-z0-9]+(?:-[a-z0-9]+)*$/));
|
|
15340
15391
|
var isIdentifier = is(identifierSchema);
|
|
15341
15392
|
var validateIdentifier = (kind, identifier) => {
|
|
@@ -15360,12 +15411,12 @@ var validateIdentifier = (kind, identifier) => {
|
|
|
15360
15411
|
});
|
|
15361
15412
|
};
|
|
15362
15413
|
|
|
15363
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15414
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/proto.js
|
|
15364
15415
|
var PipeableProto = { pipe() {
|
|
15365
15416
|
return pipeArguments(this, arguments);
|
|
15366
15417
|
} };
|
|
15367
15418
|
|
|
15368
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15419
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Action.js
|
|
15369
15420
|
var Action_exports = /* @__PURE__ */ __exportAll3({
|
|
15370
15421
|
ActionHandlerError: () => ActionHandlerError,
|
|
15371
15422
|
RetryableActionHandlerError: () => RetryableActionHandlerError,
|
|
@@ -15478,7 +15529,7 @@ var make26 = (identifier, options) => {
|
|
|
15478
15529
|
};
|
|
15479
15530
|
var isAction = (u) => hasProperty(u, TypeId29);
|
|
15480
15531
|
|
|
15481
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15532
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodBinding.js
|
|
15482
15533
|
var makeBinding = (options) => ({
|
|
15483
15534
|
connectionId: options.connectionId,
|
|
15484
15535
|
method: options.method,
|
|
@@ -15488,7 +15539,7 @@ var makeBinding = (options) => ({
|
|
|
15488
15539
|
});
|
|
15489
15540
|
var isBindingForMethod = (binding, method) => binding.method === method;
|
|
15490
15541
|
|
|
15491
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15542
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuth2TokenRefresher.js
|
|
15492
15543
|
var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll3({
|
|
15493
15544
|
OAuth2TokenRefresher: () => OAuth2TokenRefresher_exports,
|
|
15494
15545
|
Service: () => Service3
|
|
@@ -15496,7 +15547,7 @@ var OAuth2TokenRefresher_exports = /* @__PURE__ */ __exportAll3({
|
|
|
15496
15547
|
var Service3 = class extends Service()("@dual-os/sdk/AuthMethod/OAuth2TokenRefresher") {
|
|
15497
15548
|
};
|
|
15498
15549
|
|
|
15499
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15550
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethodExecution.js
|
|
15500
15551
|
var hookError = (methodIdentifier, operation, cause) => new AuthMethodHookError({
|
|
15501
15552
|
cause,
|
|
15502
15553
|
methodIdentifier,
|
|
@@ -15658,7 +15709,7 @@ var test = (method, material, context) => {
|
|
|
15658
15709
|
return decodeMaterial(method, material).pipe(flatMap3((decodedMaterial) => testHook === undefined ? succeed4({ ok: true }) : runHook(impl.identifier, "test", () => testHook(decodedMaterial, hookContext(context)))));
|
|
15659
15710
|
};
|
|
15660
15711
|
|
|
15661
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15712
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AuthMethod.js
|
|
15662
15713
|
var AuthMethod_exports = /* @__PURE__ */ __exportAll3({
|
|
15663
15714
|
AuthMethodHookError: () => AuthMethodHookError,
|
|
15664
15715
|
AuthMethodHookOperation: () => AuthMethodHookOperation,
|
|
@@ -15832,18 +15883,29 @@ var oauth2 = (identifier, options) => {
|
|
|
15832
15883
|
};
|
|
15833
15884
|
var isAuthMethod = (u) => hasProperty(u, TypeId30);
|
|
15834
15885
|
|
|
15835
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15836
|
-
var
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
}),
|
|
15841
|
-
contentType: NullOr(String3),
|
|
15842
|
-
filename: NullOr(String3),
|
|
15886
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Files.js
|
|
15887
|
+
var File3 = TaggedStruct("File", {
|
|
15888
|
+
contentType: String3,
|
|
15889
|
+
id: NonEmptyString,
|
|
15890
|
+
name: String3,
|
|
15843
15891
|
sizeBytes: Natural
|
|
15892
|
+
}).annotate({ description: "A file: pass the reference a file input or an earlier step returned." });
|
|
15893
|
+
var FileError = class extends TaggedError2()("FileError", {
|
|
15894
|
+
cause: optionalKey(Redacted(Unknown, { disallowJsonEncode: true })),
|
|
15895
|
+
message: String3
|
|
15896
|
+
}) {
|
|
15897
|
+
};
|
|
15898
|
+
var Service4 = class extends Service()("@dual-os/sdk/Files/Service") {
|
|
15899
|
+
};
|
|
15900
|
+
var service3 = pipe(serviceOption(Service4), flatMap3(fromOption2(() => FileError.make({ message: "Files are only available during a Dual plugin invocation" }))));
|
|
15901
|
+
var read = fnUntraced(function* (file) {
|
|
15902
|
+
return yield* (yield* service3).read(file);
|
|
15903
|
+
});
|
|
15904
|
+
var write = fnUntraced(function* (file) {
|
|
15905
|
+
return yield* (yield* service3).write(file);
|
|
15844
15906
|
});
|
|
15845
15907
|
|
|
15846
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
15908
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannel.js
|
|
15847
15909
|
var AgentChannel_exports = /* @__PURE__ */ __exportAll3({
|
|
15848
15910
|
AccessOutcome: () => AccessOutcome,
|
|
15849
15911
|
AgentChannel: () => AgentChannel_exports,
|
|
@@ -15977,7 +16039,7 @@ var VerifiedIdentity = Struct({
|
|
|
15977
16039
|
var AccessOutcome = Struct({ decision: Literals(["allow", "deny"]) });
|
|
15978
16040
|
var Verification = Struct({ verified: Literal(true) });
|
|
15979
16041
|
var Exposure = Literals(["webhook", "host"]);
|
|
15980
|
-
var RequiredChecks =
|
|
16042
|
+
var RequiredChecks = Tuple2([Literal("access")]);
|
|
15981
16043
|
var Message = Struct({
|
|
15982
16044
|
content: Content,
|
|
15983
16045
|
conversation: Destination,
|
|
@@ -16110,7 +16172,7 @@ var ContextMessage = Struct({
|
|
|
16110
16172
|
...contextMessageFields,
|
|
16111
16173
|
assets: optionalKey(ArraySchema(Asset).check(isMaxLength(20)))
|
|
16112
16174
|
});
|
|
16113
|
-
var AssetFile =
|
|
16175
|
+
var AssetFile = File3.check(makeFilter2((file) => file.sizeBytes > 0 && file.sizeBytes <= 10485760));
|
|
16114
16176
|
var FailureCode = Literals([
|
|
16115
16177
|
"rejected",
|
|
16116
16178
|
"unauthorized",
|
|
@@ -16415,7 +16477,7 @@ var make28 = (identifier, options) => {
|
|
|
16415
16477
|
};
|
|
16416
16478
|
var isAgentChannel = (value) => hasProperty(value, TypeId31);
|
|
16417
16479
|
|
|
16418
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16480
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/handler-context.js
|
|
16419
16481
|
var groupKeyPrefix = "@dual-os/sdk/Plugin/Handlers/";
|
|
16420
16482
|
var handlerGroupKey = (pluginId) => `${groupKeyPrefix}${pluginId}`;
|
|
16421
16483
|
var isGroupKey = startsWith(groupKeyPrefix);
|
|
@@ -16436,13 +16498,13 @@ var findHandler = (context, providerId, handlerKey) => {
|
|
|
16436
16498
|
return isMap(group) ? group.get(handlerKey) : undefined;
|
|
16437
16499
|
};
|
|
16438
16500
|
|
|
16439
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16501
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/schema-runtime.js
|
|
16440
16502
|
function decodeJson(schema, value) {
|
|
16441
16503
|
return decodeUnknownEffect(toCodecJson2(schema))(value);
|
|
16442
16504
|
}
|
|
16443
16505
|
var decodeJsonMapError = (schema, value, mapError2) => decodeJson(schema, value).pipe(mapError(mapError2));
|
|
16444
16506
|
|
|
16445
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16507
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/ConnectionResolver.js
|
|
16446
16508
|
var ConnectionIdNotAllowedError = class extends TaggedError2()("ConnectionIdNotAllowedError", {
|
|
16447
16509
|
connectionId: String3,
|
|
16448
16510
|
phase: optional(String3),
|
|
@@ -16535,10 +16597,10 @@ var ConnectionResolverStoreError = class extends TaggedError2()("ConnectionResol
|
|
|
16535
16597
|
])
|
|
16536
16598
|
}) {
|
|
16537
16599
|
};
|
|
16538
|
-
var
|
|
16600
|
+
var Service5 = class extends Service()("@dual-os/sdk/ConnectionResolver") {
|
|
16539
16601
|
};
|
|
16540
16602
|
|
|
16541
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16603
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-execution.js
|
|
16542
16604
|
var knownAuthMethodIds = (methods) => methods.map((method) => method.identifier);
|
|
16543
16605
|
var fullAuthMethodId = (providerId, method) => `${providerId}/${method.identifier}`;
|
|
16544
16606
|
var findMethod = (providerId, methods, methodId) => methods.find((method) => method.identifier === methodId || fullAuthMethodId(providerId, method) === methodId);
|
|
@@ -16573,7 +16635,7 @@ var failConnectionIdNotAllowed = (targetKind, targetId, phase, providerId, conne
|
|
|
16573
16635
|
targetKind
|
|
16574
16636
|
}));
|
|
16575
16637
|
var resolveRuntimeConnection = (targetKind, targetId, phase, providerId, methods, connectionId, context) => gen(function* () {
|
|
16576
|
-
const resolved = yield* (yield*
|
|
16638
|
+
const resolved = yield* (yield* Service5).resolve({
|
|
16577
16639
|
target: {
|
|
16578
16640
|
providerId,
|
|
16579
16641
|
targetId,
|
|
@@ -16598,7 +16660,7 @@ var resolveRuntimeConnection = (targetKind, targetId, phase, providerId, methods
|
|
|
16598
16660
|
});
|
|
16599
16661
|
});
|
|
16600
16662
|
|
|
16601
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16663
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime-shared.js
|
|
16602
16664
|
var decodeConfig = (triggerId, schema, value) => decodeJsonMapError(schema, value, (error) => new InvalidTriggerConfigError({
|
|
16603
16665
|
description: error.message,
|
|
16604
16666
|
triggerId
|
|
@@ -16733,7 +16795,7 @@ var withRuntimeContext = (entry, phase, connectionId, context2, run) => {
|
|
|
16733
16795
|
return resolveRuntimeConnection("trigger", entry.triggerId, phase, entry.providerId, requiredAuthMethods, connectionId, context2).pipe(flatMap3((binding) => run(runtimeContext(authRuntimeContext(binding)))));
|
|
16734
16796
|
};
|
|
16735
16797
|
|
|
16736
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16798
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/trigger-runtime.js
|
|
16737
16799
|
var runPhase = (options) => gen(function* () {
|
|
16738
16800
|
const { entry, phase, request } = options;
|
|
16739
16801
|
const runtime = yield* options.hook;
|
|
@@ -16816,7 +16878,7 @@ var poll2 = (entry, request) => runPhase({
|
|
|
16816
16878
|
phase: "poll",
|
|
16817
16879
|
request
|
|
16818
16880
|
});
|
|
16819
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
16881
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Trigger.js
|
|
16820
16882
|
var Trigger_exports = /* @__PURE__ */ __exportAll3({
|
|
16821
16883
|
InvalidTriggerConfigError: () => InvalidTriggerConfigError,
|
|
16822
16884
|
InvalidTriggerOutputError: () => InvalidTriggerOutputError,
|
|
@@ -17028,10 +17090,10 @@ var verify2 = verify;
|
|
|
17028
17090
|
var parse3 = parse2;
|
|
17029
17091
|
var poll3 = poll2;
|
|
17030
17092
|
|
|
17031
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17093
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/collection-utils.js
|
|
17032
17094
|
var appendElements = (existing, additions) => [...existing, ...additions];
|
|
17033
17095
|
|
|
17034
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17096
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/children.js
|
|
17035
17097
|
var partitionChildren = (children) => ({
|
|
17036
17098
|
actions: children.filter(isAction),
|
|
17037
17099
|
groups: children.filter(isGroup),
|
|
@@ -17071,7 +17133,7 @@ var assertUniqueMixedChildIdentifiers = (ownerKind, ownerIdentifier, existing, a
|
|
|
17071
17133
|
assertAdditions(ownerKind, ownerIdentifier, seenChildren(existing), additions.map((addition) => [addition, childKind(addition)]));
|
|
17072
17134
|
};
|
|
17073
17135
|
|
|
17074
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17136
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Group.js
|
|
17075
17137
|
var Group_exports = /* @__PURE__ */ __exportAll3({
|
|
17076
17138
|
TypeId: () => TypeId33,
|
|
17077
17139
|
add: () => add4,
|
|
@@ -17133,7 +17195,7 @@ var withAction = dual(2, (value, action) => appendChildren(value, [action], "act
|
|
|
17133
17195
|
var withTrigger = dual(2, (value, trigger) => appendChildren(value, [trigger], "trigger"));
|
|
17134
17196
|
var add4 = dual((args) => isGroup(args[0]), (group, ...children) => appendChildren(group, children));
|
|
17135
17197
|
|
|
17136
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17198
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/auth-runtime.js
|
|
17137
17199
|
var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
|
|
17138
17200
|
const seen = /* @__PURE__ */ new Set;
|
|
17139
17201
|
for (const method of methods) {
|
|
@@ -17146,7 +17208,7 @@ var assertNoDuplicateAuthMethodIdentifiers = (providerIdentifier, methods) => {
|
|
|
17146
17208
|
}
|
|
17147
17209
|
};
|
|
17148
17210
|
|
|
17149
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17211
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/capabilities.js
|
|
17150
17212
|
var walkCapabilities = (provider, select) => {
|
|
17151
17213
|
const entries = [];
|
|
17152
17214
|
const visit = (owner, prefix) => {
|
|
@@ -17165,7 +17227,7 @@ var walkCapabilities = (provider, select) => {
|
|
|
17165
17227
|
return entries;
|
|
17166
17228
|
};
|
|
17167
17229
|
|
|
17168
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17230
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/plugin-handlers.js
|
|
17169
17231
|
var missingDeclaration = (kind, localId, pluginId) => {
|
|
17170
17232
|
throw new Error(`missing ${kind} handler for "${localId}" in plugin "${pluginId}"`);
|
|
17171
17233
|
};
|
|
@@ -17210,7 +17272,7 @@ var toHandlers = (plugin, handlers) => gen(function* () {
|
|
|
17210
17272
|
return makeUnsafe(/* @__PURE__ */ new Map([[handlerGroupKey(plugin.identifier), map]]));
|
|
17211
17273
|
});
|
|
17212
17274
|
|
|
17213
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17275
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/Plugin.js
|
|
17214
17276
|
var Plugin_exports = /* @__PURE__ */ __exportAll3({
|
|
17215
17277
|
TypeId: () => TypeId34,
|
|
17216
17278
|
add: () => add5,
|
|
@@ -17218,7 +17280,7 @@ var Plugin_exports = /* @__PURE__ */ __exportAll3({
|
|
|
17218
17280
|
isGitRequest: () => isGitRequest,
|
|
17219
17281
|
isPlugin: () => isPlugin,
|
|
17220
17282
|
make: () => make6,
|
|
17221
|
-
provide: () =>
|
|
17283
|
+
provide: () => provide4,
|
|
17222
17284
|
toLayer: () => toLayer2,
|
|
17223
17285
|
withAction: () => withAction2,
|
|
17224
17286
|
withAgentChannel: () => withAgentChannel,
|
|
@@ -17293,7 +17355,7 @@ var make6 = (identifier) => makePlugin({
|
|
|
17293
17355
|
iconUrl: undefined,
|
|
17294
17356
|
iconUrlDark: undefined,
|
|
17295
17357
|
identifier,
|
|
17296
|
-
layer:
|
|
17358
|
+
layer: empty7,
|
|
17297
17359
|
name: undefined,
|
|
17298
17360
|
sandboxAccess: undefined,
|
|
17299
17361
|
triggers: []
|
|
@@ -17343,7 +17405,7 @@ var withAgentChannel = (channel) => (plugin) => {
|
|
|
17343
17405
|
validateDefinition(channel.definition, plugin.identifier, plugin.authMethods);
|
|
17344
17406
|
return update2(plugin, { agentChannels: [...plugin.agentChannels, channel] });
|
|
17345
17407
|
};
|
|
17346
|
-
var
|
|
17408
|
+
var provide4 = dual(2, (plugin, layer) => update2(plugin, { layer: provideMerge(plugin.layer, layer) }));
|
|
17347
17409
|
var makeHandlers = (actions, triggers, agentChannels = {}) => ({
|
|
17348
17410
|
action: (name, handler) => makeHandlers({
|
|
17349
17411
|
...actions,
|
|
@@ -17381,7 +17443,7 @@ var toLayer2 = (plugin, build) => effectContext(gen(function* () {
|
|
|
17381
17443
|
return yield* toHandlers(plugin, handlers);
|
|
17382
17444
|
}));
|
|
17383
17445
|
|
|
17384
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17446
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AgentChannelRuntime.js
|
|
17385
17447
|
var ConnectionContext = Struct({
|
|
17386
17448
|
actor: optionalKey(Union([Struct({
|
|
17387
17449
|
kind: Literal("user"),
|
|
@@ -17416,10 +17478,10 @@ var AccessInput = Struct({
|
|
|
17416
17478
|
deploymentSettings: Unknown,
|
|
17417
17479
|
identity: VerifiedIdentity
|
|
17418
17480
|
});
|
|
17419
|
-
var
|
|
17481
|
+
var Service6 = class extends Service()("@dual-os/sdk/AgentChannelRuntime") {
|
|
17420
17482
|
};
|
|
17421
17483
|
var fail11 = (code) => new ChannelError({ code });
|
|
17422
|
-
var safe = (effect2, code) => effect2.pipe(
|
|
17484
|
+
var safe = (effect2, code) => effect2.pipe(catchCause2((cause) => hasInterrupts(cause) ? interrupt : fail5(fail11(code))));
|
|
17423
17485
|
var AssetResultJson = Json.check(makeFilter2((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= 14680064));
|
|
17424
17486
|
var Json3 = Json.check(makeFilter2((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= resultByteLimit));
|
|
17425
17487
|
var strict = { onExcessProperty: "error" };
|
|
@@ -17435,7 +17497,7 @@ var decodeData = fn("AgentChannelRuntime.decodeData")(function* (schema, input,
|
|
|
17435
17497
|
var invokeHandler = (handler, effect2) => effect2.pipe(provideContext(handler.context), catch_((error) => decode4(TaggedStruct("AgentChannelHandlerError", { code: FailureCode }), isObject(error) ? { ...error } : error, "provider_failure").pipe(flatMap3((checked) => fail5(new ChannelError({
|
|
17436
17498
|
code: "provider_failure",
|
|
17437
17499
|
providerCode: checked.code
|
|
17438
|
-
}))))),
|
|
17500
|
+
}))))), catchCause2((cause) => {
|
|
17439
17501
|
if (hasInterrupts(cause))
|
|
17440
17502
|
return interrupt;
|
|
17441
17503
|
const error = findErrorOption2(cause);
|
|
@@ -17468,7 +17530,7 @@ var resolveAuth = fn("AgentChannelRuntime.resolveAuth")(function* (providerId, c
|
|
|
17468
17530
|
}
|
|
17469
17531
|
if (connectionId === undefined)
|
|
17470
17532
|
return yield* fail11("invalid_auth");
|
|
17471
|
-
const resolver = yield* serviceOption(
|
|
17533
|
+
const resolver = yield* serviceOption(Service5);
|
|
17472
17534
|
if (isNone(resolver))
|
|
17473
17535
|
return yield* fail11("invalid_auth");
|
|
17474
17536
|
const raw = yield* safe(suspend(() => resolver.value.resolve({
|
|
@@ -17516,7 +17578,7 @@ var find = (plugins, pin) => {
|
|
|
17516
17578
|
};
|
|
17517
17579
|
}
|
|
17518
17580
|
};
|
|
17519
|
-
var layer4 = (plugins) => effect(
|
|
17581
|
+
var layer4 = (plugins) => effect(Service6, gen(function* () {
|
|
17520
17582
|
const context2 = yield* context();
|
|
17521
17583
|
const get = fn("AgentChannelRuntime.get")(function* (input) {
|
|
17522
17584
|
const pin = yield* decode4(Pin, input, "invalid_input");
|
|
@@ -17656,7 +17718,7 @@ var layer4 = (plugins) => effect(Service5, gen(function* () {
|
|
|
17656
17718
|
const value = yield* decodeData(schema, request.value, "invalid_input");
|
|
17657
17719
|
return yield* json2(yield* safe(encodeUnknownEffect2(schema)(value, strict), "invalid_input"), "invalid_input");
|
|
17658
17720
|
});
|
|
17659
|
-
return
|
|
17721
|
+
return Service6.of({
|
|
17660
17722
|
checkAccess: (input) => run(checkAccess(input)),
|
|
17661
17723
|
decodeDefinitionSettings: (input) => run(decodeSettings("definitionSettings")(input)),
|
|
17662
17724
|
decodeDeploymentSettings: (input) => run(decodeSettings("deploymentSettings")(input)),
|
|
@@ -17665,7 +17727,7 @@ var layer4 = (plugins) => effect(Service5, gen(function* () {
|
|
|
17665
17727
|
});
|
|
17666
17728
|
}));
|
|
17667
17729
|
|
|
17668
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17730
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/AiProvider.js
|
|
17669
17731
|
var TypeId35 = "@dual-os/sdk/AiProvider";
|
|
17670
17732
|
var RuntimeConfig = Struct({
|
|
17671
17733
|
apiKey: optional(String3),
|
|
@@ -17723,7 +17785,7 @@ var withAuthMethods2 = dual(2, (provider, methods) => {
|
|
|
17723
17785
|
var withAuthMethod2 = dual(2, (provider, method) => withAuthMethods2(provider, [method]));
|
|
17724
17786
|
var withRuntimeConfig = dual(2, (provider, resolve) => makeProvider2(optionsFromProvider(provider), provider.authMethods, resolve));
|
|
17725
17787
|
|
|
17726
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17788
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/actions.js
|
|
17727
17789
|
var entriesOf = (installation) => walkCapabilities(installation.plugin, (owner) => owner.actions).map(({ localId, canonicalId, node }) => ({
|
|
17728
17790
|
action: node,
|
|
17729
17791
|
actionId: canonicalId,
|
|
@@ -17744,7 +17806,7 @@ var resolveAction = (installations, actionId, version) => {
|
|
|
17744
17806
|
return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
|
|
17745
17807
|
};
|
|
17746
17808
|
|
|
17747
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17809
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/triggers.js
|
|
17748
17810
|
var entriesOf2 = (installation) => walkCapabilities(installation.plugin, (owner) => owner.triggers).map((walked) => ({
|
|
17749
17811
|
authMethods: installation.plugin.authMethods,
|
|
17750
17812
|
localId: walked.localId,
|
|
@@ -17765,7 +17827,7 @@ var resolveRuntimeTrigger = (installations, triggerId, version) => {
|
|
|
17765
17827
|
return entry === undefined || version !== undefined && entry.pluginVersion !== version ? undefined : entry;
|
|
17766
17828
|
};
|
|
17767
17829
|
|
|
17768
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17830
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/registry.js
|
|
17769
17831
|
var authMethodId = (providerId, methodId) => `${providerId}/${methodId}`;
|
|
17770
17832
|
var schemaJson = (schema) => toJsonSchemaDocument2(schema, { onExcessProperty: "error" });
|
|
17771
17833
|
var authMethodMetadataJson = (method) => {
|
|
@@ -17924,7 +17986,7 @@ var materializeResolvedRegistry = (input) => {
|
|
|
17924
17986
|
};
|
|
17925
17987
|
};
|
|
17926
17988
|
|
|
17927
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
17989
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRegistry.js
|
|
17928
17990
|
var TriggerNotFoundError = class extends TaggedError2()("TriggerNotFoundError", { triggerId: String3 }) {
|
|
17929
17991
|
};
|
|
17930
17992
|
var materializePlugin = (plugin, options) => ({
|
|
@@ -17943,7 +18005,7 @@ var materializePlugin = (plugin, options) => ({
|
|
|
17943
18005
|
}).providers
|
|
17944
18006
|
});
|
|
17945
18007
|
|
|
17946
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18008
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/internal/dual/invoke.js
|
|
17947
18009
|
var FieldIssue = class extends Class4("FieldIssue")({
|
|
17948
18010
|
message: String3,
|
|
17949
18011
|
path: String3
|
|
@@ -18016,7 +18078,7 @@ var invokeResolvedActionJson = (providerId, actionId, pluginVersion, action, aut
|
|
|
18016
18078
|
fields: schemaErrorFields(error)
|
|
18017
18079
|
}))));
|
|
18018
18080
|
|
|
18019
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18081
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/DualRuntime.js
|
|
18020
18082
|
var install = (plugin, version) => ({
|
|
18021
18083
|
plugin,
|
|
18022
18084
|
version
|
|
@@ -18083,7 +18145,7 @@ var toLayer = (app) => {
|
|
|
18083
18145
|
})) : succeed4(method);
|
|
18084
18146
|
};
|
|
18085
18147
|
return effect(Service2, gen(function* () {
|
|
18086
|
-
const channels = yield*
|
|
18148
|
+
const channels = yield* Service6;
|
|
18087
18149
|
const context2 = yield* context();
|
|
18088
18150
|
const appContext = indexGroups(context2);
|
|
18089
18151
|
const provideRuntimeContext = (effect2) => effect2.pipe(updateContext2((input) => merge2(appContext, input)));
|
|
@@ -18220,29 +18282,7 @@ var toLayer = (app) => {
|
|
|
18220
18282
|
})).pipe(provide(layer4(app.plugins.map((installation) => installation.plugin))), provide(app.layer));
|
|
18221
18283
|
};
|
|
18222
18284
|
|
|
18223
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18224
|
-
var File3 = TaggedStruct("File", {
|
|
18225
|
-
contentType: String3,
|
|
18226
|
-
id: NonEmptyString,
|
|
18227
|
-
name: String3,
|
|
18228
|
-
sizeBytes: Natural
|
|
18229
|
-
}).annotate({ description: "A file: pass the reference a file input or an earlier step returned." });
|
|
18230
|
-
var FileError = class extends TaggedError2()("FileError", {
|
|
18231
|
-
cause: optionalKey(Redacted(Unknown, { disallowJsonEncode: true })),
|
|
18232
|
-
message: String3
|
|
18233
|
-
}) {
|
|
18234
|
-
};
|
|
18235
|
-
var Service6 = class extends Service()("@dual-os/sdk/Files/Service") {
|
|
18236
|
-
};
|
|
18237
|
-
var service3 = pipe(serviceOption(Service6), flatMap3(fromOption2(() => FileError.make({ message: "Files are only available when Dual calls the action" }))));
|
|
18238
|
-
var read = fnUntraced(function* (file) {
|
|
18239
|
-
return yield* (yield* service3).read(file);
|
|
18240
|
-
});
|
|
18241
|
-
var write = fnUntraced(function* (file) {
|
|
18242
|
-
return yield* (yield* service3).write(file);
|
|
18243
|
-
});
|
|
18244
|
-
|
|
18245
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.8.1+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
|
|
18285
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/OAuthFlow.js
|
|
18246
18286
|
var OAuthConnectionValidationFailed = class extends TaggedError2()("OAuthConnectionValidationFailed", {
|
|
18247
18287
|
cause: optionalKey(Redacted(Defect())),
|
|
18248
18288
|
message: String3
|
|
@@ -18300,7 +18340,7 @@ var ReservedTokenHeaders = fromIterable4([
|
|
|
18300
18340
|
]);
|
|
18301
18341
|
var TokenHeaders = Record(String3, String3.check(isPattern2(/^[\t\x20-\x7e\x80-\xff]*$/u))).check(makeFilter2((headers) => {
|
|
18302
18342
|
const names = map3(keys(headers), toLowerCase);
|
|
18303
|
-
return size3(fromIterable4(names)) === names.length && every(names, (name) => /^[!#$%&'*+.^_`|~0-9a-z-]+$/u.test(name) && !
|
|
18343
|
+
return size3(fromIterable4(names)) === names.length && every(names, (name) => /^[!#$%&'*+.^_`|~0-9a-z-]+$/u.test(name) && !has4(ReservedTokenHeaders, name) && !startsWith("proxy-")(name) && !startsWith("sec-")(name));
|
|
18304
18344
|
}, { message: "Invalid provider token headers" }));
|
|
18305
18345
|
Struct({
|
|
18306
18346
|
authorizationParams: Record(String3, String3),
|
|
@@ -18658,7 +18698,7 @@ var oauth2TokenRefresherLayer = effect(Service3, gen(function* () {
|
|
|
18658
18698
|
}).pipe(map4((refreshed) => refreshed.tokens)) });
|
|
18659
18699
|
}));
|
|
18660
18700
|
|
|
18661
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
18701
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/remote-runtime.js
|
|
18662
18702
|
var Identity = Struct({
|
|
18663
18703
|
artifactDigest: String3.check(isPattern2(/^[a-f0-9]{128}$/u)),
|
|
18664
18704
|
invocationId: NonEmptyString,
|
|
@@ -18839,13 +18879,14 @@ function failure(error) {
|
|
|
18839
18879
|
retryable: false
|
|
18840
18880
|
};
|
|
18841
18881
|
}
|
|
18842
|
-
var unavailableFiles =
|
|
18882
|
+
var unavailableFiles = Service4.of({
|
|
18843
18883
|
read: () => fail5(FileError.make({ message: "Dual Files is not available to this operation" })),
|
|
18844
18884
|
write: () => fail5(FileError.make({ message: "Dual Files is not available to this operation" }))
|
|
18845
18885
|
});
|
|
18846
|
-
var filesUnavailable = succeed3(
|
|
18886
|
+
var filesUnavailable = succeed3(Service4, unavailableFiles);
|
|
18847
18887
|
var FileFailure = Struct({ message: String3 });
|
|
18848
18888
|
function filesService(access, http) {
|
|
18889
|
+
let writes = 0;
|
|
18849
18890
|
const client = mapRequest(http, flow(prependUrl(`${access.url}/api/plugin-files`), bearerToken(access.token)));
|
|
18850
18891
|
function call(request, read) {
|
|
18851
18892
|
return pipe(gen(function* () {
|
|
@@ -18858,13 +18899,16 @@ function filesService(access, http) {
|
|
|
18858
18899
|
message: "Cannot reach Dual Files"
|
|
18859
18900
|
})));
|
|
18860
18901
|
}
|
|
18861
|
-
return
|
|
18902
|
+
return Service4.of({
|
|
18862
18903
|
read: (file) => call(get7(`/${encodeURIComponent(file.id)}`), (response) => map4(response.arrayBuffer, (buffer) => new Uint8Array(buffer))),
|
|
18863
|
-
write: (file) => call(pipe(post("", { urlParams: {
|
|
18904
|
+
write: (file) => suspend(() => call(pipe(post("", { urlParams: {
|
|
18905
|
+
name: file.name,
|
|
18906
|
+
writeIndex: `${writes++}`
|
|
18907
|
+
} }), bodyUint8Array(file.bytes, file.contentType ?? undefined)), (response) => flatMap3(response.json, decodeUnknownEffect(File3))))
|
|
18864
18908
|
});
|
|
18865
18909
|
}
|
|
18866
18910
|
function connectionService(request) {
|
|
18867
|
-
return
|
|
18911
|
+
return Service5.of({ resolve: (input) => {
|
|
18868
18912
|
const selected = request.connection;
|
|
18869
18913
|
if (selected === undefined)
|
|
18870
18914
|
return fail5(ConnectionRequiredError.make(input.target));
|
|
@@ -18971,7 +19015,7 @@ var execute = fn("RemoteRuntime.execute")(function* (request) {
|
|
|
18971
19015
|
},
|
|
18972
19016
|
identity: request.identity
|
|
18973
19017
|
};
|
|
18974
|
-
return yield* pipe(run3(request), provideService(
|
|
19018
|
+
return yield* pipe(run3(request), provideService(Service5, connectionService(request)), provideService(Service4, pipe(fromUndefinedOr(request.files), flatMap((access) => map(http, (client) => filesService(access, client))), getOrElse(() => unavailableFiles))), flatMap3(fnUntraced(function* (value) {
|
|
18975
19019
|
if (value === undefined)
|
|
18976
19020
|
return {
|
|
18977
19021
|
_tag: "success",
|
|
@@ -18998,7 +19042,7 @@ var execute = fn("RemoteRuntime.execute")(function* (request) {
|
|
|
18998
19042
|
})));
|
|
18999
19043
|
});
|
|
19000
19044
|
|
|
19001
|
-
// ../../../../node_modules/.bun/@dual-os+sdk@0.
|
|
19045
|
+
// ../../../../node_modules/.bun/@dual-os+sdk@0.10.0+a827849ded09603e/node_modules/@dual-os/sdk/dist/PluginRuntime.js
|
|
19002
19046
|
var PluginExecutionError = class extends TaggedError2()("PluginExecutionError", {
|
|
19003
19047
|
category: Literals([
|
|
19004
19048
|
"transport",
|
|
@@ -19012,51 +19056,9 @@ var PluginExecutionError = class extends TaggedError2()("PluginExecutionError",
|
|
|
19012
19056
|
}) {
|
|
19013
19057
|
};
|
|
19014
19058
|
var maxPayloadBytes = 1048576;
|
|
19059
|
+
var maxResponseBytes = 52428800;
|
|
19015
19060
|
var maxMetadataBytes = 67108864;
|
|
19016
19061
|
var maxChannelResultBytes = 16777216;
|
|
19017
|
-
function ipcMessages(channel) {
|
|
19018
|
-
return callback2((queue) => {
|
|
19019
|
-
const message = (value) => {
|
|
19020
|
-
offerUnsafe(queue, value);
|
|
19021
|
-
};
|
|
19022
|
-
const disconnected = () => {
|
|
19023
|
-
endUnsafe(queue);
|
|
19024
|
-
};
|
|
19025
|
-
const failed = (cause) => {
|
|
19026
|
-
failCauseUnsafe(queue, fail2(PluginExecutionError.make({
|
|
19027
|
-
category: "runner",
|
|
19028
|
-
cause: make4(cause),
|
|
19029
|
-
message: "Plugin IPC channel failed"
|
|
19030
|
-
})));
|
|
19031
|
-
};
|
|
19032
|
-
return acquireRelease(sync(() => {
|
|
19033
|
-
channel.on("message", message);
|
|
19034
|
-
channel.on("disconnect", disconnected);
|
|
19035
|
-
channel.on("error", failed);
|
|
19036
|
-
}), () => sync(() => {
|
|
19037
|
-
channel.removeListener("message", message);
|
|
19038
|
-
channel.removeListener("disconnect", disconnected);
|
|
19039
|
-
channel.removeListener("error", failed);
|
|
19040
|
-
}));
|
|
19041
|
-
});
|
|
19042
|
-
}
|
|
19043
|
-
function sendIpc(channel, value) {
|
|
19044
|
-
return try_2({
|
|
19045
|
-
try: () => {
|
|
19046
|
-
if (!channel.connected || channel.send === undefined)
|
|
19047
|
-
throw PluginExecutionError.make({
|
|
19048
|
-
category: "runner",
|
|
19049
|
-
message: "Plugin IPC channel is closed"
|
|
19050
|
-
});
|
|
19051
|
-
channel.send(value);
|
|
19052
|
-
},
|
|
19053
|
-
catch: (cause) => PluginExecutionError.make({
|
|
19054
|
-
category: "runner",
|
|
19055
|
-
cause: make4(cause),
|
|
19056
|
-
message: "Cannot send plugin IPC message"
|
|
19057
|
-
})
|
|
19058
|
-
});
|
|
19059
|
-
}
|
|
19060
19062
|
var OAuthContinuation = Struct({
|
|
19061
19063
|
expiresAt: DateFromString,
|
|
19062
19064
|
pkceVerifier: NullOr(String3),
|
|
@@ -19124,8 +19126,6 @@ var ExecutionRequest = Union([
|
|
|
19124
19126
|
ChannelSettingsRequest
|
|
19125
19127
|
]);
|
|
19126
19128
|
var Request4 = Union([ExecutionRequest, TaggedStruct("extract", { identity: Identity })]);
|
|
19127
|
-
var Input2 = Union([Request4, TaggedStruct("cancel", { identity: Identity })]);
|
|
19128
|
-
var Output = Union([Response, TaggedStruct("interrupted", { identity: Identity })]);
|
|
19129
19129
|
function checkMessageSize(value, maximum) {
|
|
19130
19130
|
if (new TextEncoder().encode(JSON.stringify(value)).byteLength <= maximum)
|
|
19131
19131
|
return void_2;
|
|
@@ -19135,31 +19135,31 @@ function checkMessageSize(value, maximum) {
|
|
|
19135
19135
|
}));
|
|
19136
19136
|
}
|
|
19137
19137
|
var encodeInput = fnUntraced(function* (input) {
|
|
19138
|
-
const encoded = yield* encodeEffect(
|
|
19138
|
+
const encoded = yield* encodeEffect(Request4)(input);
|
|
19139
19139
|
yield* checkMessageSize(encoded, maxPayloadBytes);
|
|
19140
19140
|
return encoded;
|
|
19141
19141
|
});
|
|
19142
19142
|
var decodeInput = fnUntraced(function* (input) {
|
|
19143
19143
|
const json = yield* decodeUnknownEffect(Json)(input);
|
|
19144
19144
|
yield* checkMessageSize(json, maxPayloadBytes);
|
|
19145
|
-
return yield* decodeUnknownEffect(
|
|
19145
|
+
return yield* decodeUnknownEffect(Request4)(json);
|
|
19146
19146
|
});
|
|
19147
19147
|
var encodeOutput = fnUntraced(function* (output, maximum) {
|
|
19148
|
-
const encoded = yield* encodeEffect(
|
|
19148
|
+
const encoded = yield* encodeEffect(Response)(output);
|
|
19149
19149
|
yield* checkMessageSize(encoded, maximum);
|
|
19150
19150
|
return encoded;
|
|
19151
19151
|
});
|
|
19152
19152
|
var decodeOutput = fnUntraced(function* (output) {
|
|
19153
19153
|
const json = yield* decodeUnknownEffect(Json)(output);
|
|
19154
19154
|
yield* checkMessageSize(json, maxMetadataBytes);
|
|
19155
|
-
return yield* decodeUnknownEffect(
|
|
19155
|
+
return yield* decodeUnknownEffect(Response)(json);
|
|
19156
19156
|
});
|
|
19157
19157
|
function responseLimit(request) {
|
|
19158
19158
|
if ("_tag" in request && request._tag === "extract")
|
|
19159
19159
|
return maxMetadataBytes;
|
|
19160
19160
|
if ("context" in request && request.operation._tag === "channelExecute")
|
|
19161
19161
|
return maxChannelResultBytes;
|
|
19162
|
-
return
|
|
19162
|
+
return maxResponseBytes;
|
|
19163
19163
|
}
|
|
19164
19164
|
var Invocation = Struct({
|
|
19165
19165
|
entrypoint: String3.check(isPattern2(/^[A-Za-z0-9_-]+(?:[./][A-Za-z0-9_-]+)*$/u)),
|
|
@@ -19180,24 +19180,17 @@ var encodeRequest = fnUntraced(function* (request) {
|
|
|
19180
19180
|
return encoded;
|
|
19181
19181
|
});
|
|
19182
19182
|
var readBounded = fnUntraced(function* (input, maximum = maxPayloadBytes) {
|
|
19183
|
-
|
|
19184
|
-
bytes: Buffer.alloc(maximum),
|
|
19185
|
-
size: 0
|
|
19186
|
-
};
|
|
19187
|
-
yield* pipe(input, runForEach((chunk) => gen(function* () {
|
|
19188
|
-
if (output.size + chunk.byteLength > maximum)
|
|
19189
|
-
return yield* PluginExecutionError.make({
|
|
19190
|
-
category: "protocol",
|
|
19191
|
-
message: "Plugin payload exceeds its transport limit"
|
|
19192
|
-
});
|
|
19193
|
-
Buffer.from(chunk).copy(output.bytes, output.size);
|
|
19194
|
-
output.size += chunk.byteLength;
|
|
19195
|
-
})), mapError((cause) => PluginExecutionError.make({
|
|
19196
|
-
cause: make4(cause),
|
|
19183
|
+
return yield* pipe(input, mapAccumEffect(() => 0, (size, chunk) => size + chunk.byteLength > maximum ? fail5(PluginExecutionError.make({
|
|
19197
19184
|
category: "protocol",
|
|
19198
|
-
message: "
|
|
19199
|
-
})))
|
|
19200
|
-
|
|
19185
|
+
message: "Plugin payload exceeds its transport limit"
|
|
19186
|
+
})) : succeed4([size + chunk.byteLength, [chunk]])), mkUint8Array2, mapBoth({
|
|
19187
|
+
onSuccess: (bytes) => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("utf8"),
|
|
19188
|
+
onFailure: (cause) => PluginExecutionError.make({
|
|
19189
|
+
cause: make4(cause),
|
|
19190
|
+
category: "protocol",
|
|
19191
|
+
message: "Cannot read plugin payload"
|
|
19192
|
+
})
|
|
19193
|
+
}));
|
|
19201
19194
|
});
|
|
19202
19195
|
var verifyResponse = fnUntraced(function* (request, response) {
|
|
19203
19196
|
if (response.identity.invocationId !== request.identity.invocationId || response.identity.artifactDigest !== request.identity.artifactDigest || response.identity.organizationId !== request.identity.organizationId || response.identity.pluginKey !== request.identity.pluginKey || response.identity.pluginVersion !== request.identity.pluginVersion)
|
|
@@ -19305,7 +19298,7 @@ var execute3 = fnUntraced(function* (request) {
|
|
|
19305
19298
|
return yield* executeChannelSettings(request);
|
|
19306
19299
|
});
|
|
19307
19300
|
|
|
19308
|
-
export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNotNull, isNullish, isNotNullish, isObject, hasProperty,
|
|
19301
|
+
export { pipeArguments, dual, identity, constVoid, pipe, flow, isString, isUndefined, isNotUndefined, isNotNull, isNullish, isNotNullish, isObject, hasProperty, equals, byReferenceUnsafe, format, NodeInspectSymbol, toJson, BaseProto, PipeInspectableProto, Prototype, String2, Number2, mapInput, none, some, isNone, isSome, match, getOrElse, orElse, fromNullishOr, fromUndefinedOr, getOrNull, getOrUndefined, liftThrowable, map, flatMap, filter, liftPredicate, Service, makeUnsafe, add, getUnsafe, get, Reference, succeed, fail, failVoid, fromOption, try_, isSuccess, match2, getOrThrow, fromEntries, toEntries, has, map2, ensure, match3, append, appendAll, isArray, isReadonlyArrayNonEmpty, getUnsafe2, head, headNonEmpty, takeRight, findFirst, sort, sortWith, zip, contains, empty, of, map3, flatMap2, getSomes, filterMap, filter2, reduce, fromNullishOr2, every, some2, dedupe, join, fromInputUnsafe, isFinite, millis, toMillis, TaggedClass, Error2, TaggedError, scopeRemoveFinalizerUnsafe, fiberEnterUninterruptibleUnsafe, fail2, squash, hasInterrupts, Done, done, UnknownError, succeed2, fail3, void_, isSuccess2, isFailure, makeUnsafe2, _await, done2, fail4, isDone, isDoneUnsafe, doneUnsafe, Scope, make, makeUnsafe3, addFinalizerExit, addFinalizer, forkUnsafe, close, makeMemoMapUnsafe, buildWithMemoMap, buildWithScope, succeed3, effect, mergeAll, provide, provideMerge, currentTimeMillis, increment, between, toUpperCase, toLowerCase, capitalize, replace, trim, slice, isEmpty, isNonEmpty, split, startsWith, endsWith, match4, replaceAll, catchDone, isDoneCause, isEffect, all, forEach, promise, tryPromise, succeed4, suspend, sync, void_2, undefined_, callback, never, gen, fail5, failSync, failCause, die, try_2, withFiber, fromOption2, flatMap3, flatten, andThen, tap, result, map4, as, zipWith, catch_, catchTag, catchReason, catchIf, catchCauseIf, mapError, mapBoth, orDie, ignore, ignoreCause, timeout, timeoutOrElse, sleep, raceFirst, filterOrElse, matchEffect, context, provideContext, serviceOption, provideService, scope, scoped, acquireRelease, addFinalizer2, ensuring, onError, onExit, cached, interrupt, uninterruptible, uninterruptibleMask, forever, forkChild, forkIn, forkScoped, runFork, runForkWith, runCallbackWith, runCallback, runPromise, runPromiseWith, runPromiseExit, runPromiseExitWith, runSync, runSyncWith, runSyncExit, runSyncExitWith, fnUntraced, fn, clockWith, effectify, await_, join2, interrupt2, getCurrent, runIn, make2, sliding, offer, offerUnsafe, failCauseUnsafe, endUnsafe, take, poll, encode, encode2, decode, makeZoned, make3, toUtc, toDateUtc, toEpochMillis, formatIso, formatIsoOffset, isRedacted, make4, value, empty2, empty3, InvalidValue, compose, transformEffect, is, decodeUnknownEffect, decodeEffect, decodeOption, encodeEffect, isSchema, optionalKey, optional, toType, flip, Literal, Never, Unknown, String3, Number3, Boolean2, Struct, Record, StructWithRest, ArraySchema, Union, Literals, NullOr, suspend2, decodeTo, tag, TaggedStruct, Finite, Int, Natural, isMaxLength, NonEmptyString, Defect, fromJsonString, Uint8Array2, Uint8ArrayFromBase64, Uint8ArrayFromHex, DateTimeUtcFromString, Error3, TaggedError2, toEquivalence, Json, makeUnsafe4, make5, get2, set, update, fromTransform, toTransform, mapDone, unwrap, isStream, fromChannel, fromEffect, fromPull, callback2, empty4, suspend3, fail6, fromIterable, paginate, unwrap2, mapEffect, flatMap4, drainFork, merge, filterMap2, tapError, transduce, decodeText, splitLines, run, runCollect, runHead, runDrain, mkString, layer, fromUnknown, value2, when, whenOr, discriminatorsExhaustive, orElse2, __exportAll3, empty5, HttpClientError, InvalidUrlError, makeWith, post, put, del, setMethod, setHeader, setHeaders, bearerToken, acceptJson, setUrl, setUrlParam, setBody, bodyUint8Array, bodyJsonUnsafe, bodyFormDataRecord, schemaBodyJson, HttpClient, transformResponse, filterStatusOk, mapRequest, mapRequestEffect, RequestInit, layer2, Action_exports, ActionHandlerError, fromHttpClientFailure, AuthMethod_exports, File3, read, write, AgentChannel_exports, Key, Event, commandSchema, materializePlugin, Trigger_exports, fromPlugin, Service2, toLayer, Group_exports, layer3, oauth2TokenRefresherLayer, Plugin_exports, make6, isPlugin, filesUnavailable, PluginExecutionError, decodeInput, encodeOutput, responseLimit, execute3 };
|
|
19309
19302
|
|
|
19310
|
-
//# debugId=
|
|
19311
|
-
//# sourceMappingURL=plugin-
|
|
19303
|
+
//# debugId=177F6432AA9FC66F64756E2164756E21
|
|
19304
|
+
//# sourceMappingURL=plugin-ahbd9ttm.js.map
|