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