@kitman-sh/cli 0.13.8 → 0.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-q5w3v4k1.js → chunk-0tjg9eya.js} +1 -1
- package/dist/{chunk-zz589n7a.js → chunk-0wj65j5e.js} +12 -12
- package/dist/{chunk-7bytsxkf.js → chunk-1ht6jwzm.js} +13 -12
- package/dist/{chunk-5zth85pj.js → chunk-53qp6kcp.js} +2 -2
- package/dist/{chunk-gj1padza.js → chunk-69fcvx7d.js} +39 -39
- package/dist/{chunk-eg1n8wvf.js → chunk-6jtjcvnc.js} +44 -44
- package/dist/{chunk-vm2qy986.js → chunk-9gg1w4aa.js} +283 -375
- package/dist/{chunk-96svx416.js → chunk-a44ebqzx.js} +6 -6
- package/dist/{chunk-0h49y8gf.js → chunk-aezq3fyy.js} +74 -214
- package/dist/{chunk-gq7y5v3e.js → chunk-cw61zyh5.js} +1 -1
- package/dist/{chunk-5zhh41gb.js → chunk-ezv4p0zr.js} +4 -4
- package/dist/{chunk-gy9rf14f.js → chunk-fh58za51.js} +3 -3
- package/dist/{chunk-byeasm6x.js → chunk-hezxa6q5.js} +7 -7
- package/dist/{chunk-mtkstrh3.js → chunk-kq88aaa3.js} +4 -4
- package/dist/{chunk-cq2h8q9e.js → chunk-ksgt1tdc.js} +4 -4
- package/dist/{chunk-c4ccpwjy.js → chunk-pj3mer60.js} +4 -4
- package/dist/{chunk-zw3gf6r5.js → chunk-qjqa338f.js} +333 -94
- package/dist/{chunk-h1rmw7yk.js → chunk-qkjfx2ts.js} +14 -14
- package/dist/{chunk-08dyrk6y.js → chunk-rz18qefg.js} +10 -10
- package/dist/{chunk-gr17n0z3.js → chunk-s63fjc69.js} +25 -25
- package/dist/{chunk-cbpb2rww.js → chunk-tspf987k.js} +8 -8
- package/dist/{chunk-ff1r9vcq.js → chunk-v190zzc5.js} +1 -1
- package/dist/{chunk-a24jc5rx.js → chunk-wzr1n3zy.js} +7 -3
- package/dist/{chunk-z68rzf0f.js → chunk-x8sewxzm.js} +145 -145
- package/dist/{chunk-y1krmnbv.js → chunk-z5f7g1w1.js} +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -34,11 +34,8 @@ import {
|
|
|
34
34
|
getOrUndefined,
|
|
35
35
|
map4,
|
|
36
36
|
Service2,
|
|
37
|
-
|
|
38
|
-
get4,
|
|
37
|
+
get3,
|
|
39
38
|
Reference,
|
|
40
|
-
fromInputUnsafe,
|
|
41
|
-
isFinite,
|
|
42
39
|
normalize,
|
|
43
40
|
succeed,
|
|
44
41
|
fail3,
|
|
@@ -84,15 +81,14 @@ import {
|
|
|
84
81
|
fail4,
|
|
85
82
|
interrupt2,
|
|
86
83
|
void_2,
|
|
87
|
-
isSuccess2,
|
|
88
84
|
isFailure2,
|
|
89
85
|
asVoidAll,
|
|
90
|
-
|
|
86
|
+
makeUnsafe4,
|
|
91
87
|
_await,
|
|
92
88
|
interruptWith,
|
|
93
89
|
doneUnsafe,
|
|
94
90
|
Scope,
|
|
95
|
-
|
|
91
|
+
makeUnsafe5,
|
|
96
92
|
provide,
|
|
97
93
|
addFinalizerExit,
|
|
98
94
|
addFinalizer,
|
|
@@ -141,7 +137,7 @@ import {
|
|
|
141
137
|
tap2,
|
|
142
138
|
option2,
|
|
143
139
|
exit,
|
|
144
|
-
|
|
140
|
+
map7,
|
|
145
141
|
as,
|
|
146
142
|
asSome2,
|
|
147
143
|
asVoid,
|
|
@@ -156,14 +152,12 @@ import {
|
|
|
156
152
|
tapError2,
|
|
157
153
|
ignoreCause,
|
|
158
154
|
orElseSucceed,
|
|
159
|
-
sleep,
|
|
160
155
|
raceFirst,
|
|
161
156
|
when,
|
|
162
157
|
matchCauseEffect,
|
|
163
158
|
context,
|
|
164
159
|
contextWith,
|
|
165
160
|
provideContext2,
|
|
166
|
-
scope2,
|
|
167
161
|
scoped,
|
|
168
162
|
scopedWith,
|
|
169
163
|
acquireRelease,
|
|
@@ -174,7 +168,6 @@ import {
|
|
|
174
168
|
interrupt3,
|
|
175
169
|
onInterrupt,
|
|
176
170
|
uninterruptible,
|
|
177
|
-
uninterruptibleMask2,
|
|
178
171
|
forever,
|
|
179
172
|
forkChild,
|
|
180
173
|
forkIn,
|
|
@@ -201,7 +194,7 @@ import {
|
|
|
201
194
|
String4,
|
|
202
195
|
toCodecStringTree,
|
|
203
196
|
encodeUnknownJsonStringSync
|
|
204
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-qjqa338f.js";
|
|
205
198
|
|
|
206
199
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
207
200
|
var headUnsafe = (self) => {
|
|
@@ -250,6 +243,15 @@ var makeEquivalence = (equivalence) => {
|
|
|
250
243
|
return (self, that) => is(self, that) && is(that, self);
|
|
251
244
|
};
|
|
252
245
|
|
|
246
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
|
|
247
|
+
var BigInt2 = globalThis.BigInt;
|
|
248
|
+
var toNumber = (b) => {
|
|
249
|
+
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
250
|
+
return none();
|
|
251
|
+
}
|
|
252
|
+
return some(Number(b));
|
|
253
|
+
};
|
|
254
|
+
|
|
253
255
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
|
|
254
256
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
255
257
|
var bigint1 = /* @__PURE__ */ BigInt(1);
|
|
@@ -370,7 +372,7 @@ var fromStringUnsafe = (input) => {
|
|
|
370
372
|
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
371
373
|
return make(value);
|
|
372
374
|
};
|
|
373
|
-
var
|
|
375
|
+
var fromInputUnsafe = (input) => {
|
|
374
376
|
switch (typeof input) {
|
|
375
377
|
case "bigint":
|
|
376
378
|
if (input < bigint0)
|
|
@@ -383,7 +385,7 @@ var fromInputUnsafe2 = (input) => {
|
|
|
383
385
|
}
|
|
384
386
|
return invalid(`unsupported input ${input}`);
|
|
385
387
|
};
|
|
386
|
-
var bytes = (value) => typeof value === "bigint" ?
|
|
388
|
+
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
|
|
387
389
|
|
|
388
390
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
389
391
|
var join = fiberJoin;
|
|
@@ -949,7 +951,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
949
951
|
const isUnlisted = (value) => value === "." || value === ".." || isRoot(value);
|
|
950
952
|
const probe = (parent, name, named) => {
|
|
951
953
|
const path = toFsPath(join2(parent, name));
|
|
952
|
-
return fs.stat(path).pipe(
|
|
954
|
+
return fs.stat(path).pipe(map7((info) => info.type), catchReason("PlatformError", "NotFound", () => fs.readLink(path).pipe(as("SymbolicLink"), catchIf(isNotLink, () => succeed6(undefined)))), catchIf(named ? isMissing : isIgnorable, () => succeed6(undefined)), map7((type) => type === undefined ? undefined : {
|
|
953
955
|
name,
|
|
954
956
|
type
|
|
955
957
|
}));
|
|
@@ -1004,7 +1006,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1004
1006
|
return child(type === "Directory", false);
|
|
1005
1007
|
}
|
|
1006
1008
|
const path = toFsPath(relative);
|
|
1007
|
-
return fs.stat(path).pipe(
|
|
1009
|
+
return fs.stat(path).pipe(map7((info) => info.type === "Directory"), catchIf(isIgnorable, () => succeed6(false)), flatMap3((isDirectory) => {
|
|
1008
1010
|
const resolved = child(isDirectory, type === "SymbolicLink");
|
|
1009
1011
|
if (type === "SymbolicLink" || resolved?.next === undefined || result.globstar.size === 0) {
|
|
1010
1012
|
return succeed6(resolved);
|
|
@@ -1014,7 +1016,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1014
1016
|
};
|
|
1015
1017
|
let slots = DIRECTORY_CONCURRENCY;
|
|
1016
1018
|
let finishing = false;
|
|
1017
|
-
const failed =
|
|
1019
|
+
const failed = makeUnsafe4();
|
|
1018
1020
|
const fork = (walk) => walk.pipe(onError((cause) => sync2(() => {
|
|
1019
1021
|
if (!finishing) {
|
|
1020
1022
|
doneUnsafe(failed, failCause3(cause));
|
|
@@ -1030,7 +1032,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1030
1032
|
const child = visit(entry, relative, states, excluded);
|
|
1031
1033
|
if (isEffect(child)) {
|
|
1032
1034
|
const index = children.push(undefined) - 1;
|
|
1033
|
-
pending.push(
|
|
1035
|
+
pending.push(map7(child, (child) => {
|
|
1034
1036
|
children[index] = child;
|
|
1035
1037
|
}));
|
|
1036
1038
|
} else {
|
|
@@ -1114,7 +1116,7 @@ var systemError = (options) => new PlatformError(new SystemError(options));
|
|
|
1114
1116
|
var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
1115
1117
|
|
|
1116
1118
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Latch.js
|
|
1117
|
-
var
|
|
1119
|
+
var makeUnsafe = makeLatchUnsafe;
|
|
1118
1120
|
var make3 = makeLatch;
|
|
1119
1121
|
|
|
1120
1122
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableRef.js
|
|
@@ -1290,7 +1292,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
|
|
|
1290
1292
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1291
1293
|
var TypeId3 = "~effect/PubSub";
|
|
1292
1294
|
var SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
1293
|
-
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map,
|
|
1295
|
+
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe5(), makeUnsafe(false), make8(false), options.strategy(), make8(none())));
|
|
1294
1296
|
var unbounded = (options) => make5({
|
|
1295
1297
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
1296
1298
|
strategy: () => new DroppingStrategy
|
|
@@ -1309,7 +1311,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1309
1311
|
return false;
|
|
1310
1312
|
});
|
|
1311
1313
|
var subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
1312
|
-
const localScope =
|
|
1314
|
+
const localScope = get3(services, Scope);
|
|
1313
1315
|
const scope = forkUnsafe(self.scope);
|
|
1314
1316
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
1315
1317
|
return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -1353,7 +1355,7 @@ var pollForItem = (self) => callback3((resume) => {
|
|
|
1353
1355
|
}
|
|
1354
1356
|
return resume(succeed6(self.ended.current.value));
|
|
1355
1357
|
}
|
|
1356
|
-
const deferred =
|
|
1358
|
+
const deferred = makeUnsafe4();
|
|
1357
1359
|
let set = self.subscribers.get(self.subscription);
|
|
1358
1360
|
if (!set) {
|
|
1359
1361
|
set = new Set;
|
|
@@ -1385,7 +1387,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
1385
1387
|
subscribers.delete(subscription);
|
|
1386
1388
|
}
|
|
1387
1389
|
};
|
|
1388
|
-
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(),
|
|
1390
|
+
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe(false), make8(false), strategy, pubsub.replayWindow(), ended);
|
|
1389
1391
|
class UnboundedPubSub {
|
|
1390
1392
|
publisherHead = {
|
|
1391
1393
|
value: AbsentValue,
|
|
@@ -2105,7 +2107,7 @@ var finalize = (self, exit) => {
|
|
|
2105
2107
|
};
|
|
2106
2108
|
|
|
2107
2109
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Semaphore.js
|
|
2108
|
-
var
|
|
2110
|
+
var makeUnsafe2 = (permits) => new SemaphoreImpl(permits);
|
|
2109
2111
|
var firstAvailableWaiter = (self) => {
|
|
2110
2112
|
for (const waiter of self.waiters) {
|
|
2111
2113
|
if (waiter.permits <= self.free)
|
|
@@ -2256,7 +2258,7 @@ var asyncQueue = (scope, f, options) => make9({
|
|
|
2256
2258
|
}).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
|
|
2257
2259
|
startImmediately: true
|
|
2258
2260
|
}))));
|
|
2259
|
-
var callbackArray = (f, options) => fromTransform((_, scope) =>
|
|
2261
|
+
var callbackArray = (f, options) => fromTransform((_, scope) => map7(asyncQueue(scope, f, options), takeAll3));
|
|
2260
2262
|
var suspend4 = (evaluate) => fromTransform((upstream, scope) => suspend3(() => toTransform(evaluate())(upstream, scope)));
|
|
2261
2263
|
var fromIterator = (iterator) => fromPull(sync2(() => {
|
|
2262
2264
|
const iter = iterator();
|
|
@@ -2282,7 +2284,7 @@ var fromEffect = (effect) => fromPull(sync2(() => {
|
|
|
2282
2284
|
var fromEffectDrain = (effect) => fromPull(flatMap3(effect, () => done()));
|
|
2283
2285
|
var fromQueueArray = (queue) => fromPull(succeed6(takeAll3(queue)));
|
|
2284
2286
|
var fromSubscriptionArray = (subscription) => fromPull(succeed6(onInterrupt(takeAll2(subscription), () => done())));
|
|
2285
|
-
var fromPubSubArray = (pubsub) => unwrap2(
|
|
2287
|
+
var fromPubSubArray = (pubsub) => unwrap2(map7(subscribe(pubsub), fromSubscriptionArray));
|
|
2286
2288
|
var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStreamToPullUnsafe({
|
|
2287
2289
|
scope,
|
|
2288
2290
|
readable: options.evaluate(),
|
|
@@ -2312,9 +2314,9 @@ var readableStreamToPullUnsafe = (options) => {
|
|
|
2312
2314
|
});
|
|
2313
2315
|
return as(addFinalizer(options.scope, options.releaseLockOnEnd ? sync2(() => reader.releaseLock()) : promise(() => reader.cancel().catch((error) => reader.closed.then(() => Promise.reject(error), constVoid))).pipe(ensuring2(sync2(() => reader.releaseLock())))), pull);
|
|
2314
2316
|
};
|
|
2315
|
-
var
|
|
2317
|
+
var map8 = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => sync2(() => {
|
|
2316
2318
|
let i = 0;
|
|
2317
|
-
return
|
|
2319
|
+
return map7(pull, (o) => f(o, i++));
|
|
2318
2320
|
})));
|
|
2319
2321
|
var mapDone = /* @__PURE__ */ dual(2, (self, f) => mapDoneEffect(self, (o) => succeed6(f(o))));
|
|
2320
2322
|
var mapDoneEffect = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => succeed6(catchDone(pull, (done2) => flatMap3(f(done2), done)))));
|
|
@@ -2322,7 +2324,7 @@ var concurrencyIsSequential = (concurrency) => concurrency === undefined || conc
|
|
|
2322
2324
|
var mapEffect = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, f, options) => concurrencyIsSequential(options?.concurrency) ? mapEffectSequential(self, f) : mapEffectConcurrent(self, f, options));
|
|
2323
2325
|
var mapEffectSequential = (self, f) => fromTransform((upstream, scope) => {
|
|
2324
2326
|
let i = 0;
|
|
2325
|
-
return
|
|
2327
|
+
return map7(toTransform(self)(upstream, scope), flatMap3((o) => f(o, i++)));
|
|
2326
2328
|
});
|
|
2327
2329
|
var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
2328
2330
|
let i = 0;
|
|
@@ -2333,7 +2335,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
2333
2335
|
const runFork = runForkWith(yield* context());
|
|
2334
2336
|
const trackFiber = runIn(forkedScope);
|
|
2335
2337
|
if (options.unordered) {
|
|
2336
|
-
const semaphore =
|
|
2338
|
+
const semaphore = makeUnsafe2(concurrencyN);
|
|
2337
2339
|
const release = constant(semaphore.release(1));
|
|
2338
2340
|
const handle = matchCauseEffect({
|
|
2339
2341
|
onFailure: (cause) => flatMap3(failCause(queue, cause), release),
|
|
@@ -2374,7 +2376,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
2374
2376
|
return take(queue);
|
|
2375
2377
|
}));
|
|
2376
2378
|
var flatMap = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, f, options) => concurrencyIsSequential(options?.concurrency) ? flatMapSequential(self, f) : flatMapConcurrent(self, f, options));
|
|
2377
|
-
var flatMapSequential = (self, f) => fromTransform((upstream, scope) =>
|
|
2379
|
+
var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map7(toTransform(self)(upstream, scope), (pull) => {
|
|
2378
2380
|
let childPull;
|
|
2379
2381
|
let childScope;
|
|
2380
2382
|
const makePull = flatMap3(pull, (value) => {
|
|
@@ -2395,7 +2397,7 @@ var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map8(toT
|
|
|
2395
2397
|
});
|
|
2396
2398
|
return suspend3(() => childPull ?? makePull);
|
|
2397
2399
|
}));
|
|
2398
|
-
var flatMapConcurrent = (self, f, options) => self.pipe(
|
|
2400
|
+
var flatMapConcurrent = (self, f, options) => self.pipe(map8(f), mergeAll(options));
|
|
2399
2401
|
var flatten2 = (channels) => flatMap(channels, identity);
|
|
2400
2402
|
var flattenArray = (self) => transformPull(self, (pull) => {
|
|
2401
2403
|
let array;
|
|
@@ -2435,7 +2437,7 @@ var filterArray = /* @__PURE__ */ dual(2, (self, predicate) => transformPull(sel
|
|
|
2435
2437
|
}))));
|
|
2436
2438
|
var catchCause3 = /* @__PURE__ */ dual(2, (self, f) => fromTransform((upstream, scope) => {
|
|
2437
2439
|
let forkedScope = forkUnsafe(scope);
|
|
2438
|
-
return
|
|
2440
|
+
return map7(toTransform(self)(upstream, forkedScope), (pull) => {
|
|
2439
2441
|
let currentPull = pull.pipe(catchCause2((cause) => {
|
|
2440
2442
|
if (isDoneCause(cause)) {
|
|
2441
2443
|
return failCause3(cause);
|
|
@@ -2458,7 +2460,7 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, {
|
|
|
2458
2460
|
switch: switch_ = false
|
|
2459
2461
|
}) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
2460
2462
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
2461
|
-
const semaphore = switch_ ? undefined :
|
|
2463
|
+
const semaphore = switch_ ? undefined : makeUnsafe2(concurrencyN);
|
|
2462
2464
|
const doneLatch = yield* make3(true);
|
|
2463
2465
|
const fibers = new Map;
|
|
2464
2466
|
const queue = yield* bounded(bufferSize);
|
|
@@ -2632,7 +2634,7 @@ var decodeText2 = (encoding, options) => fromTransform((upstream, _scope) => syn
|
|
|
2632
2634
|
const streamOptions = {
|
|
2633
2635
|
stream: true
|
|
2634
2636
|
};
|
|
2635
|
-
let pull = upstream.pipe(
|
|
2637
|
+
let pull = upstream.pipe(map7(map6((bytes) => decoder.decode(bytes, streamOptions))), catchDone((leftover) => {
|
|
2636
2638
|
pull = done(leftover);
|
|
2637
2639
|
const last = decoder.decode();
|
|
2638
2640
|
return last.length > 0 ? succeed6(of(last)) : pull;
|
|
@@ -2659,18 +2661,18 @@ var interruptWhen2 = /* @__PURE__ */ dual(2, (self, effect) => merge(self, fromP
|
|
|
2659
2661
|
var onExit2 = /* @__PURE__ */ dual(2, (self, finalizer) => fromTransformBracket((upstream, scope, forkedScope) => addFinalizerExit(forkedScope, finalizer).pipe(andThen2(toTransform(self)(upstream, scope)))));
|
|
2660
2662
|
var ensuring3 = /* @__PURE__ */ dual(2, (self, finalizer) => onExit2(self, (_) => finalizer));
|
|
2661
2663
|
var runWith = (self, f, onHalt) => suspend3(() => {
|
|
2662
|
-
const scope =
|
|
2664
|
+
const scope = makeUnsafe5();
|
|
2663
2665
|
const makePull = toTransform(self)(done(), scope);
|
|
2664
2666
|
return catchDone(flatMap3(makePull, f), onHalt ? onHalt : succeed6).pipe(onExit((exit) => close(scope, exit)));
|
|
2665
2667
|
});
|
|
2666
|
-
var provideContext3 = /* @__PURE__ */ dual(2, (self, context) => fromTransform((upstream, scope) =>
|
|
2668
|
+
var provideContext3 = /* @__PURE__ */ dual(2, (self, context) => fromTransform((upstream, scope) => map7(provideContext2(toTransform(self)(upstream, scope), context), provideContext2(context))));
|
|
2667
2669
|
var runDrain2 = (self) => runWith(self, (pull) => forever(pull, {
|
|
2668
2670
|
disableYield: true
|
|
2669
2671
|
}));
|
|
2670
2672
|
var runForEach2 = /* @__PURE__ */ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap3(pull, f), {
|
|
2671
2673
|
disableYield: true
|
|
2672
2674
|
})));
|
|
2673
|
-
var mkUint8Array = (self) =>
|
|
2675
|
+
var mkUint8Array = (self) => map7(runFold2(self, () => ({
|
|
2674
2676
|
bytes: 0,
|
|
2675
2677
|
arrays: []
|
|
2676
2678
|
}), (acc, chunk) => {
|
|
@@ -2764,160 +2766,18 @@ var forEach2 = (f) => forEachArray(forEach((_) => f(_), {
|
|
|
2764
2766
|
var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f), forever({
|
|
2765
2767
|
disableYield: true
|
|
2766
2768
|
}), catchDone(() => endVoid)));
|
|
2767
|
-
var unwrap3 = (effect) => fromChannel(unwrap2(
|
|
2768
|
-
|
|
2769
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
|
|
2770
|
-
var TypeId8 = "~effect/RcRef";
|
|
2771
|
-
var stateEmpty = {
|
|
2772
|
-
_tag: "Empty"
|
|
2773
|
-
};
|
|
2774
|
-
var stateClosed = {
|
|
2775
|
-
_tag: "Closed"
|
|
2776
|
-
};
|
|
2777
|
-
var variance2 = {
|
|
2778
|
-
_A: identity,
|
|
2779
|
-
_E: identity
|
|
2780
|
-
};
|
|
2781
|
-
|
|
2782
|
-
class RcRefImpl {
|
|
2783
|
-
[TypeId8] = variance2;
|
|
2784
|
-
pipe() {
|
|
2785
|
-
return pipeArguments(this, arguments);
|
|
2786
|
-
}
|
|
2787
|
-
state = stateEmpty;
|
|
2788
|
-
acquire;
|
|
2789
|
-
context;
|
|
2790
|
-
scope;
|
|
2791
|
-
idleTimeToLive;
|
|
2792
|
-
constructor(acquire, context, scope, idleTimeToLive) {
|
|
2793
|
-
this.acquire = acquire;
|
|
2794
|
-
this.context = context;
|
|
2795
|
-
this.scope = scope;
|
|
2796
|
-
this.idleTimeToLive = idleTimeToLive;
|
|
2797
|
-
}
|
|
2798
|
-
}
|
|
2799
|
-
var make6 = (options) => withFiber2((fiber) => {
|
|
2800
|
-
const context = fiber.context;
|
|
2801
|
-
const scope = get4(context, Scope);
|
|
2802
|
-
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
2803
|
-
return as(addFinalizerExit(scope, () => {
|
|
2804
|
-
const state = ref.state;
|
|
2805
|
-
ref.state = stateClosed;
|
|
2806
|
-
if (state._tag === "Acquired")
|
|
2807
|
-
return close(state.scope, void_2);
|
|
2808
|
-
if (state._tag === "Acquiring")
|
|
2809
|
-
return interrupt(state.fiber);
|
|
2810
|
-
return void_3;
|
|
2811
|
-
}), ref);
|
|
2812
|
-
});
|
|
2813
|
-
var getState = (self, restore) => {
|
|
2814
|
-
switch (self.state._tag) {
|
|
2815
|
-
case "Closed": {
|
|
2816
|
-
return interrupt3;
|
|
2817
|
-
}
|
|
2818
|
-
case "Acquired": {
|
|
2819
|
-
const state = self.state;
|
|
2820
|
-
state.refCount++;
|
|
2821
|
-
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
2822
|
-
}
|
|
2823
|
-
case "Acquiring": {
|
|
2824
|
-
const state = self.state;
|
|
2825
|
-
state.awaiters++;
|
|
2826
|
-
return awaitAcquiring(self, state, restore);
|
|
2827
|
-
}
|
|
2828
|
-
case "Empty": {
|
|
2829
|
-
const acquiring = {
|
|
2830
|
-
_tag: "Acquiring",
|
|
2831
|
-
fiber: undefined,
|
|
2832
|
-
awaiters: 1,
|
|
2833
|
-
acquired: undefined
|
|
2834
|
-
};
|
|
2835
|
-
self.state = acquiring;
|
|
2836
|
-
const scope = makeUnsafe6();
|
|
2837
|
-
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
2838
|
-
if (self.state !== acquiring) {
|
|
2839
|
-
return interrupt3;
|
|
2840
|
-
}
|
|
2841
|
-
const state = {
|
|
2842
|
-
_tag: "Acquired",
|
|
2843
|
-
value,
|
|
2844
|
-
scope,
|
|
2845
|
-
fiber: undefined,
|
|
2846
|
-
refCount: acquiring.awaiters,
|
|
2847
|
-
invalidated: false
|
|
2848
|
-
};
|
|
2849
|
-
self.state = state;
|
|
2850
|
-
acquiring.acquired = state;
|
|
2851
|
-
return succeed6(state);
|
|
2852
|
-
}), onExit((exit) => {
|
|
2853
|
-
if (isSuccess2(exit))
|
|
2854
|
-
return void_3;
|
|
2855
|
-
if (self.state === acquiring)
|
|
2856
|
-
self.state = stateEmpty;
|
|
2857
|
-
return close(scope, exit);
|
|
2858
|
-
}));
|
|
2859
|
-
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
2860
|
-
return awaitAcquiring(self, acquiring, restore);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
};
|
|
2864
|
-
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
2865
|
-
const acquired = acquiring.acquired;
|
|
2866
|
-
if (acquired !== undefined) {
|
|
2867
|
-
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
2868
|
-
}
|
|
2869
|
-
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
2870
|
-
return void_3;
|
|
2871
|
-
self.state = stateEmpty;
|
|
2872
|
-
return interrupt(acquiring.fiber);
|
|
2873
|
-
});
|
|
2874
|
-
var get2 = (self_) => {
|
|
2875
|
-
const self = self_;
|
|
2876
|
-
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
2877
|
-
};
|
|
2878
|
-
var release = (self, state) => {
|
|
2879
|
-
state.refCount--;
|
|
2880
|
-
if (state.refCount > 0) {
|
|
2881
|
-
return void_3;
|
|
2882
|
-
}
|
|
2883
|
-
const idleTimeToLive = self.idleTimeToLive;
|
|
2884
|
-
if (idleTimeToLive === undefined || state.invalidated) {
|
|
2885
|
-
if (self.state === state) {
|
|
2886
|
-
self.state = stateEmpty;
|
|
2887
|
-
}
|
|
2888
|
-
return close(state.scope, void_2);
|
|
2889
|
-
} else if (!isFinite(idleTimeToLive)) {
|
|
2890
|
-
return void_3;
|
|
2891
|
-
}
|
|
2892
|
-
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
2893
|
-
if (self.state === state && state.refCount === 0) {
|
|
2894
|
-
self.state = stateEmpty;
|
|
2895
|
-
return ignoreCause(close(state.scope, void_2), {
|
|
2896
|
-
log: "Unhandled",
|
|
2897
|
-
message: "Unhandled error in RcRef finalizer"
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
return void_3;
|
|
2901
|
-
})).pipe(ensuring2(sync2(() => {
|
|
2902
|
-
state.fiber = undefined;
|
|
2903
|
-
})), runForkWith(self.context), runIn(self.scope));
|
|
2904
|
-
return void_3;
|
|
2905
|
-
};
|
|
2906
|
-
|
|
2907
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2908
|
-
var make10 = make6;
|
|
2909
|
-
var get3 = get2;
|
|
2769
|
+
var unwrap3 = (effect) => fromChannel(unwrap2(map7(effect, toChannel)));
|
|
2910
2770
|
|
|
2911
2771
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
2912
|
-
var
|
|
2913
|
-
var isStream = (u) => hasProperty(u,
|
|
2772
|
+
var TypeId8 = "~effect/Stream";
|
|
2773
|
+
var isStream = (u) => hasProperty(u, TypeId8);
|
|
2914
2774
|
var fromChannel2 = fromChannel3;
|
|
2915
2775
|
var fromPull2 = (pull) => fromChannel2(fromPull(pull));
|
|
2916
2776
|
var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
2917
2777
|
var toChannel2 = (stream) => stream.channel;
|
|
2918
2778
|
var callback = (f, options) => fromChannel2(callbackArray(f, options));
|
|
2919
2779
|
var empty2 = /* @__PURE__ */ fromChannel2(empty);
|
|
2920
|
-
var
|
|
2780
|
+
var make10 = (...values) => fromArray2(values);
|
|
2921
2781
|
var suspend = (stream) => {
|
|
2922
2782
|
const suspended = fromChannel2(suspend4(() => stream().channel));
|
|
2923
2783
|
suspendedStreams.set(suspended, stream);
|
|
@@ -2930,12 +2790,12 @@ var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel2(succee
|
|
|
2930
2790
|
var fromQueue = (queue) => fromChannel2(fromQueueArray(queue));
|
|
2931
2791
|
var fromPubSub = (pubsub) => fromChannel2(fromPubSubArray(pubsub));
|
|
2932
2792
|
var fromReadableStream = (options) => fromChannel2(fromReadableStream2(options));
|
|
2933
|
-
var unwrap = (effect) => fromChannel2(unwrap2(
|
|
2793
|
+
var unwrap = (effect) => fromChannel2(unwrap2(map7(effect, toChannel2)));
|
|
2934
2794
|
var map2 = /* @__PURE__ */ dual(2, (self, f) => suspend(() => {
|
|
2935
2795
|
let i = 0;
|
|
2936
|
-
return fromChannel2(
|
|
2796
|
+
return fromChannel2(map8(self.channel, map6((o) => f(o, i++))));
|
|
2937
2797
|
}));
|
|
2938
|
-
var mapEffect2 = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => self.channel.pipe(flattenArray, mapEffect(f, options),
|
|
2798
|
+
var mapEffect2 = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => self.channel.pipe(flattenArray, mapEffect(f, options), map8(of), fromChannel2));
|
|
2939
2799
|
var tap = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => mapEffect2(self, (a) => as(f(a), a), options));
|
|
2940
2800
|
var drainFork = /* @__PURE__ */ dual(2, (self, that) => mergeEffect2(self, runDrain(that)));
|
|
2941
2801
|
var concat = /* @__PURE__ */ dual(2, (self, that) => {
|
|
@@ -2986,7 +2846,7 @@ var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (up
|
|
|
2986
2846
|
done2 = fail4(error);
|
|
2987
2847
|
return done();
|
|
2988
2848
|
}));
|
|
2989
|
-
const pull =
|
|
2849
|
+
const pull = map7(suspend3(() => sink.transform(upstreamWithLeftover, scope)), ([value, leftover_]) => {
|
|
2990
2850
|
leftover = leftover_;
|
|
2991
2851
|
return of(value);
|
|
2992
2852
|
});
|
|
@@ -3001,7 +2861,7 @@ var splitLines = (self) => self.channel.pipe(pipeTo(splitLines2()), fromChannel2
|
|
|
3001
2861
|
var interruptWhen = /* @__PURE__ */ dual(2, (self, effect) => fromChannel2(interruptWhen2(self.channel, effect)));
|
|
3002
2862
|
var ensuring = /* @__PURE__ */ dual(2, (self, finalizer) => fromChannel2(ensuring3(self.channel, finalizer)));
|
|
3003
2863
|
var provideContext = /* @__PURE__ */ dual(2, (self, context) => fromChannel2(provideContext3(self.channel, context)));
|
|
3004
|
-
var run = /* @__PURE__ */ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap3((upstream) => runSink(sink, upstream, scope)),
|
|
2864
|
+
var run = /* @__PURE__ */ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap3((upstream) => runSink(sink, upstream, scope)), map7(([a]) => a))));
|
|
3005
2865
|
var runSink = (sink, upstream, scope) => restoreUpstreamFailure(sink.transform(upstreamFailureToDefect(upstream), scope));
|
|
3006
2866
|
var runCollect = (self) => runFold2(self.channel, () => [], (acc, chunk) => {
|
|
3007
2867
|
for (let i = 0;i < chunk.length; i++) {
|
|
@@ -3015,7 +2875,7 @@ var runFold = /* @__PURE__ */ dual(3, (self, initial, f) => runFold2(self.channe
|
|
|
3015
2875
|
}
|
|
3016
2876
|
return acc;
|
|
3017
2877
|
}));
|
|
3018
|
-
var runHead = (self) =>
|
|
2878
|
+
var runHead = (self) => map7(runHead2(self.channel), map4(getUnsafe2(0)));
|
|
3019
2879
|
var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel, (arr) => {
|
|
3020
2880
|
let i = 0;
|
|
3021
2881
|
return whileLoop({
|
|
@@ -3026,12 +2886,12 @@ var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel,
|
|
|
3026
2886
|
}));
|
|
3027
2887
|
var runDrain = (self) => runDrain2(self.channel);
|
|
3028
2888
|
var mkString = (self) => runFold2(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
3029
|
-
var mkArrayBuffer = (self) =>
|
|
2889
|
+
var mkArrayBuffer = (self) => map7(mkUint8Array(self.channel), (bytes) => bytes.buffer);
|
|
3030
2890
|
var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, context, options) => {
|
|
3031
2891
|
let currentResolve = undefined;
|
|
3032
2892
|
let fiber = undefined;
|
|
3033
2893
|
let cancelled = false;
|
|
3034
|
-
const latch =
|
|
2894
|
+
const latch = makeUnsafe(false);
|
|
3035
2895
|
const signal = options?.signal;
|
|
3036
2896
|
const onAbort = () => fiber.interruptUnsafe();
|
|
3037
2897
|
return new ReadableStream({
|
|
@@ -3077,14 +2937,14 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
3077
2937
|
}
|
|
3078
2938
|
}, options?.strategy);
|
|
3079
2939
|
});
|
|
3080
|
-
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) =>
|
|
2940
|
+
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map7(context(), (context) => toReadableStreamWith(self, context, options)));
|
|
3081
2941
|
|
|
3082
2942
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
3083
|
-
var
|
|
2943
|
+
var TypeId9 = "~effect/FileSystem";
|
|
3084
2944
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
3085
|
-
var
|
|
2945
|
+
var make11 = (impl) => FileSystem.of({
|
|
3086
2946
|
...impl,
|
|
3087
|
-
[
|
|
2947
|
+
[TypeId9]: TypeId9,
|
|
3088
2948
|
glob: make2(impl),
|
|
3089
2949
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
3090
2950
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
@@ -3100,11 +2960,11 @@ var make12 = (impl) => FileSystem.of({
|
|
|
3100
2960
|
const file = yield* impl.open(path, {
|
|
3101
2961
|
flag: "r"
|
|
3102
2962
|
});
|
|
3103
|
-
const offset = options?.offset === undefined ? undefined :
|
|
2963
|
+
const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
|
|
3104
2964
|
if (offset) {
|
|
3105
2965
|
yield* file.seek(offset, "start");
|
|
3106
2966
|
}
|
|
3107
|
-
const bytesToRead = options?.bytesToRead === undefined ? undefined :
|
|
2967
|
+
const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
|
|
3108
2968
|
let totalBytesRead = BigInt(0);
|
|
3109
2969
|
const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
|
|
3110
2970
|
const readChunk = file.readAlloc(chunkSize);
|
|
@@ -3124,7 +2984,7 @@ var make12 = (impl) => FileSystem.of({
|
|
|
3124
2984
|
sink: (path, options) => pipe(impl.open(path, {
|
|
3125
2985
|
...options,
|
|
3126
2986
|
flag: options?.flag ?? "w"
|
|
3127
|
-
}),
|
|
2987
|
+
}), map7((file) => forEach2((_) => file.writeAll(_))), unwrap3),
|
|
3128
2988
|
writeFileString: (path, data, options) => flatMap3(try_2({
|
|
3129
2989
|
try: () => new TextEncoder().encode(data),
|
|
3130
2990
|
catch: (cause) => badArgument({
|
|
@@ -3140,11 +3000,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3140
3000
|
}
|
|
3141
3001
|
|
|
3142
3002
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3143
|
-
var
|
|
3003
|
+
var TypeId10 = "~effect/Path";
|
|
3144
3004
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3145
|
-
var
|
|
3005
|
+
var make12 = (impl) => Path.of({
|
|
3146
3006
|
...impl,
|
|
3147
|
-
[
|
|
3007
|
+
[TypeId10]: TypeId10,
|
|
3148
3008
|
resolveWithin(root, input) {
|
|
3149
3009
|
if (impl.parse(input).root !== "")
|
|
3150
3010
|
return none();
|
|
@@ -3217,7 +3077,7 @@ function makeProvider(load, mapInput) {
|
|
|
3217
3077
|
function makeSource(get, transform) {
|
|
3218
3078
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3219
3079
|
}
|
|
3220
|
-
function
|
|
3080
|
+
function make6(get) {
|
|
3221
3081
|
return makeSource(get, identityPath);
|
|
3222
3082
|
}
|
|
3223
3083
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3226,7 +3086,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3226
3086
|
function fromEnvRecord(env, options) {
|
|
3227
3087
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3228
3088
|
const trie = buildEnvTrie(env);
|
|
3229
|
-
return
|
|
3089
|
+
return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3230
3090
|
}
|
|
3231
3091
|
function fromEnv(options) {
|
|
3232
3092
|
const env = options?.env ?? {
|
|
@@ -3279,7 +3139,7 @@ function trieNodeAt(root, path) {
|
|
|
3279
3139
|
}
|
|
3280
3140
|
|
|
3281
3141
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
|
|
3282
|
-
var
|
|
3142
|
+
var TypeId11 = "~effect/Config";
|
|
3283
3143
|
class ConfigError {
|
|
3284
3144
|
_tag = "ConfigError";
|
|
3285
3145
|
name = "ConfigError";
|
|
@@ -3301,14 +3161,14 @@ var Proto2 = {
|
|
|
3301
3161
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
3302
3162
|
}
|
|
3303
3163
|
}),
|
|
3304
|
-
[
|
|
3164
|
+
[TypeId11]: TypeId11,
|
|
3305
3165
|
toJSON() {
|
|
3306
3166
|
return {
|
|
3307
3167
|
_id: "Config"
|
|
3308
3168
|
};
|
|
3309
3169
|
}
|
|
3310
3170
|
};
|
|
3311
|
-
function
|
|
3171
|
+
function make7(evaluator) {
|
|
3312
3172
|
const self = Object.create(Proto2);
|
|
3313
3173
|
self.evaluator = evaluator;
|
|
3314
3174
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3316,14 +3176,14 @@ function make14(evaluator) {
|
|
|
3316
3176
|
}
|
|
3317
3177
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3318
3178
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3319
|
-
return
|
|
3179
|
+
return make7((provider, pathPrefix) => map7(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3320
3180
|
});
|
|
3321
3181
|
function all(arg) {
|
|
3322
3182
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3323
|
-
return
|
|
3183
|
+
return make7((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all3(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all2) : mapEager(all3(map(configs, (config) => evaluateAt(config, provider, pathPrefix))), all2));
|
|
3324
3184
|
}
|
|
3325
3185
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3326
|
-
return
|
|
3186
|
+
return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3327
3187
|
});
|
|
3328
3188
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3329
3189
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3442,7 +3302,7 @@ function schema(codec, path) {
|
|
|
3442
3302
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3443
3303
|
const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
|
|
3444
3304
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3445
|
-
return
|
|
3305
|
+
return make7((provider, pathPrefix) => {
|
|
3446
3306
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3447
3307
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3448
3308
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3465,7 +3325,7 @@ var optionalEnv = (name) => gen(function* () {
|
|
|
3465
3325
|
}).pipe(orElseSucceed(() => {
|
|
3466
3326
|
return;
|
|
3467
3327
|
}));
|
|
3468
|
-
var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(
|
|
3328
|
+
var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(map7((configHome) => configHome ?? `${home}/.config`));
|
|
3469
3329
|
|
|
3470
3330
|
// packages/agent-runtime/src/temp-directory.ts
|
|
3471
3331
|
var tempDirectoryScoped = (fs, options) => acquireRelease(fs.makeTempDirectory(options), (directory) => fs.remove(directory, { recursive: true, force: true }).pipe(catch_((error) => logWarning("temp_directory_not_removed", { directory, error: error.message }))));
|
|
@@ -3521,7 +3381,7 @@ var srtInheritedEnv2 = [
|
|
|
3521
3381
|
"LC_CTYPE",
|
|
3522
3382
|
"TZ"
|
|
3523
3383
|
];
|
|
3524
|
-
var inheritedEnvironment2 = (names) =>
|
|
3384
|
+
var inheritedEnvironment2 = (names) => map7(forEach(names, (name) => map7(optionalEnv(name), (value) => value === undefined ? [] : [[name, value]])), (entries) => Object.fromEntries(entries.flat()));
|
|
3525
3385
|
var shellName = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
3526
3386
|
var withOnlyEnvironment2 = (names, argv) => [
|
|
3527
3387
|
"sh",
|
|
@@ -3557,4 +3417,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3557
3417
|
...argv
|
|
3558
3418
|
];
|
|
3559
3419
|
|
|
3560
|
-
export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument,
|
|
3420
|
+
export { map, makeEquivalence, toNumber, bytes, join, interrupt, getCurrent, runIn, BadArgument, systemError, badArgument, makeUnsafe, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe2, fromTransform, mapDone, isSink, fromChannel, drain, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
|