@kitman-sh/cli 0.13.9 → 0.13.10
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-ksgt1tdc.js → chunk-0nh3w4vn.js} +7 -7
- package/dist/{chunk-cw61zyh5.js → chunk-24h0y27w.js} +1 -1
- package/dist/{chunk-0wj65j5e.js → chunk-2dwqak36.js} +7 -7
- package/dist/{chunk-53qp6kcp.js → chunk-4crf5vhd.js} +2 -2
- package/dist/{chunk-wzr1n3zy.js → chunk-6n3m0t02.js} +25 -5
- package/dist/{chunk-hezxa6q5.js → chunk-6x4wkf0x.js} +7 -7
- package/dist/{chunk-s63fjc69.js → chunk-813vn8sn.js} +20 -20
- package/dist/{chunk-rz18qefg.js → chunk-bkecckjn.js} +7 -7
- package/dist/{chunk-6jtjcvnc.js → chunk-c60xk73g.js} +46 -46
- package/dist/{chunk-qkjfx2ts.js → chunk-d4pxty7x.js} +16 -16
- package/dist/{chunk-z5f7g1w1.js → chunk-ggmwpwhf.js} +2 -2
- package/dist/{chunk-1ht6jwzm.js → chunk-hkg8s472.js} +8 -8
- package/dist/{chunk-v190zzc5.js → chunk-j34gensq.js} +1 -1
- package/dist/{chunk-69fcvx7d.js → chunk-jkddgvev.js} +74 -54
- package/dist/{chunk-a44ebqzx.js → chunk-kj1zjrs9.js} +6 -6
- package/dist/{chunk-ezv4p0zr.js → chunk-kk32jckf.js} +4 -4
- package/dist/{chunk-fh58za51.js → chunk-mmd7mjv0.js} +3 -3
- package/dist/{chunk-tspf987k.js → chunk-mtdz4k32.js} +5 -5
- package/dist/{chunk-0tjg9eya.js → chunk-pxvd8w2v.js} +1 -1
- package/dist/{chunk-x8sewxzm.js → chunk-r5v7df8h.js} +106 -106
- package/dist/{chunk-9gg1w4aa.js → chunk-rz01craf.js} +434 -350
- package/dist/{chunk-pj3mer60.js → chunk-s00cj5sw.js} +4 -4
- package/dist/{chunk-aezq3fyy.js → chunk-t82w7459.js} +218 -69
- package/dist/{chunk-kq88aaa3.js → chunk-vxfajzpz.js} +16 -62
- package/dist/{chunk-qjqa338f.js → chunk-zgraq2y3.js} +111 -308
- 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-zgraq2y3.js";
|
|
198
205
|
|
|
199
206
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
200
207
|
var headUnsafe = (self) => {
|
|
@@ -372,7 +379,7 @@ var fromStringUnsafe = (input) => {
|
|
|
372
379
|
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
373
380
|
return make(value);
|
|
374
381
|
};
|
|
375
|
-
var
|
|
382
|
+
var fromInputUnsafe2 = (input) => {
|
|
376
383
|
switch (typeof input) {
|
|
377
384
|
case "bigint":
|
|
378
385
|
if (input < bigint0)
|
|
@@ -385,7 +392,7 @@ var fromInputUnsafe = (input) => {
|
|
|
385
392
|
}
|
|
386
393
|
return invalid(`unsupported input ${input}`);
|
|
387
394
|
};
|
|
388
|
-
var bytes = (value) => typeof value === "bigint" ?
|
|
395
|
+
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe2(value) : fromNumber(value);
|
|
389
396
|
|
|
390
397
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
391
398
|
var join = fiberJoin;
|
|
@@ -951,7 +958,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
951
958
|
const isUnlisted = (value) => value === "." || value === ".." || isRoot(value);
|
|
952
959
|
const probe = (parent, name, named) => {
|
|
953
960
|
const path = toFsPath(join2(parent, name));
|
|
954
|
-
return fs.stat(path).pipe(
|
|
961
|
+
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
962
|
name,
|
|
956
963
|
type
|
|
957
964
|
}));
|
|
@@ -1006,7 +1013,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1006
1013
|
return child(type === "Directory", false);
|
|
1007
1014
|
}
|
|
1008
1015
|
const path = toFsPath(relative);
|
|
1009
|
-
return fs.stat(path).pipe(
|
|
1016
|
+
return fs.stat(path).pipe(map8((info) => info.type === "Directory"), catchIf(isIgnorable, () => succeed6(false)), flatMap3((isDirectory) => {
|
|
1010
1017
|
const resolved = child(isDirectory, type === "SymbolicLink");
|
|
1011
1018
|
if (type === "SymbolicLink" || resolved?.next === undefined || result.globstar.size === 0) {
|
|
1012
1019
|
return succeed6(resolved);
|
|
@@ -1016,7 +1023,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1016
1023
|
};
|
|
1017
1024
|
let slots = DIRECTORY_CONCURRENCY;
|
|
1018
1025
|
let finishing = false;
|
|
1019
|
-
const failed =
|
|
1026
|
+
const failed = makeUnsafe5();
|
|
1020
1027
|
const fork = (walk) => walk.pipe(onError((cause) => sync2(() => {
|
|
1021
1028
|
if (!finishing) {
|
|
1022
1029
|
doneUnsafe(failed, failCause3(cause));
|
|
@@ -1032,7 +1039,7 @@ var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
|
1032
1039
|
const child = visit(entry, relative, states, excluded);
|
|
1033
1040
|
if (isEffect(child)) {
|
|
1034
1041
|
const index = children.push(undefined) - 1;
|
|
1035
|
-
pending.push(
|
|
1042
|
+
pending.push(map8(child, (child) => {
|
|
1036
1043
|
children[index] = child;
|
|
1037
1044
|
}));
|
|
1038
1045
|
} else {
|
|
@@ -1116,7 +1123,7 @@ var systemError = (options) => new PlatformError(new SystemError(options));
|
|
|
1116
1123
|
var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
1117
1124
|
|
|
1118
1125
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Latch.js
|
|
1119
|
-
var
|
|
1126
|
+
var makeUnsafe2 = makeLatchUnsafe;
|
|
1120
1127
|
var make3 = makeLatch;
|
|
1121
1128
|
|
|
1122
1129
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableRef.js
|
|
@@ -1131,7 +1138,7 @@ var MutableRefProto = {
|
|
|
1131
1138
|
};
|
|
1132
1139
|
}
|
|
1133
1140
|
};
|
|
1134
|
-
var
|
|
1141
|
+
var make7 = (value) => {
|
|
1135
1142
|
const ref = Object.create(MutableRefProto);
|
|
1136
1143
|
ref.current = value;
|
|
1137
1144
|
return ref;
|
|
@@ -1292,7 +1299,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
|
|
|
1292
1299
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1293
1300
|
var TypeId3 = "~effect/PubSub";
|
|
1294
1301
|
var SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
1295
|
-
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map,
|
|
1302
|
+
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
|
|
1296
1303
|
var unbounded = (options) => make5({
|
|
1297
1304
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
1298
1305
|
strategy: () => new DroppingStrategy
|
|
@@ -1311,7 +1318,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1311
1318
|
return false;
|
|
1312
1319
|
});
|
|
1313
1320
|
var subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
1314
|
-
const localScope =
|
|
1321
|
+
const localScope = get4(services, Scope);
|
|
1315
1322
|
const scope = forkUnsafe(self.scope);
|
|
1316
1323
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
1317
1324
|
return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -1355,7 +1362,7 @@ var pollForItem = (self) => callback3((resume) => {
|
|
|
1355
1362
|
}
|
|
1356
1363
|
return resume(succeed6(self.ended.current.value));
|
|
1357
1364
|
}
|
|
1358
|
-
const deferred =
|
|
1365
|
+
const deferred = makeUnsafe5();
|
|
1359
1366
|
let set = self.subscribers.get(self.subscription);
|
|
1360
1367
|
if (!set) {
|
|
1361
1368
|
set = new Set;
|
|
@@ -1387,7 +1394,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
1387
1394
|
subscribers.delete(subscription);
|
|
1388
1395
|
}
|
|
1389
1396
|
};
|
|
1390
|
-
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(),
|
|
1397
|
+
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
|
|
1391
1398
|
class UnboundedPubSub {
|
|
1392
1399
|
publisherHead = {
|
|
1393
1400
|
value: AbsentValue,
|
|
@@ -1804,7 +1811,7 @@ var QueueProto = {
|
|
|
1804
1811
|
};
|
|
1805
1812
|
}
|
|
1806
1813
|
};
|
|
1807
|
-
var
|
|
1814
|
+
var make8 = (options) => withFiber((fiber) => {
|
|
1808
1815
|
const self = Object.create(QueueProto);
|
|
1809
1816
|
self.dispatcher = fiber.currentDispatcher;
|
|
1810
1817
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
@@ -1819,14 +1826,14 @@ var make9 = (options) => withFiber((fiber) => {
|
|
|
1819
1826
|
};
|
|
1820
1827
|
return succeed2(self);
|
|
1821
1828
|
});
|
|
1822
|
-
var bounded = (capacity) =>
|
|
1829
|
+
var bounded = (capacity) => make8({
|
|
1823
1830
|
capacity
|
|
1824
1831
|
});
|
|
1825
|
-
var sliding = (capacity) =>
|
|
1832
|
+
var sliding = (capacity) => make8({
|
|
1826
1833
|
capacity,
|
|
1827
1834
|
strategy: "sliding"
|
|
1828
1835
|
});
|
|
1829
|
-
var unbounded2 = () =>
|
|
1836
|
+
var unbounded2 = () => make8();
|
|
1830
1837
|
var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
|
|
1831
1838
|
var offerUnsafe = (self, message) => {
|
|
1832
1839
|
if (self.state._tag !== "Open") {
|
|
@@ -2107,7 +2114,7 @@ var finalize = (self, exit) => {
|
|
|
2107
2114
|
};
|
|
2108
2115
|
|
|
2109
2116
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Semaphore.js
|
|
2110
|
-
var
|
|
2117
|
+
var makeUnsafe3 = (permits) => new SemaphoreImpl(permits);
|
|
2111
2118
|
var firstAvailableWaiter = (self) => {
|
|
2112
2119
|
for (const waiter of self.waiters) {
|
|
2113
2120
|
if (waiter.permits <= self.free)
|
|
@@ -2252,13 +2259,13 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
|
|
|
2252
2259
|
return onError(pull, onCause);
|
|
2253
2260
|
}));
|
|
2254
2261
|
var toTransform = (channel) => channel.transform;
|
|
2255
|
-
var asyncQueue = (scope, f, options) =>
|
|
2262
|
+
var asyncQueue = (scope, f, options) => make8({
|
|
2256
2263
|
capacity: options?.bufferSize,
|
|
2257
2264
|
strategy: options?.strategy
|
|
2258
2265
|
}).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
|
|
2259
2266
|
startImmediately: true
|
|
2260
2267
|
}))));
|
|
2261
|
-
var callbackArray = (f, options) => fromTransform((_, scope) =>
|
|
2268
|
+
var callbackArray = (f, options) => fromTransform((_, scope) => map8(asyncQueue(scope, f, options), takeAll3));
|
|
2262
2269
|
var suspend4 = (evaluate) => fromTransform((upstream, scope) => suspend3(() => toTransform(evaluate())(upstream, scope)));
|
|
2263
2270
|
var fromIterator = (iterator) => fromPull(sync2(() => {
|
|
2264
2271
|
const iter = iterator();
|
|
@@ -2284,7 +2291,7 @@ var fromEffect = (effect) => fromPull(sync2(() => {
|
|
|
2284
2291
|
var fromEffectDrain = (effect) => fromPull(flatMap3(effect, () => done()));
|
|
2285
2292
|
var fromQueueArray = (queue) => fromPull(succeed6(takeAll3(queue)));
|
|
2286
2293
|
var fromSubscriptionArray = (subscription) => fromPull(succeed6(onInterrupt(takeAll2(subscription), () => done())));
|
|
2287
|
-
var fromPubSubArray = (pubsub) => unwrap2(
|
|
2294
|
+
var fromPubSubArray = (pubsub) => unwrap2(map8(subscribe(pubsub), fromSubscriptionArray));
|
|
2288
2295
|
var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStreamToPullUnsafe({
|
|
2289
2296
|
scope,
|
|
2290
2297
|
readable: options.evaluate(),
|
|
@@ -2293,7 +2300,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
|
|
|
2293
2300
|
}));
|
|
2294
2301
|
var readableStreamToPullUnsafe = (options) => {
|
|
2295
2302
|
const reader = options.readable.getReader();
|
|
2296
|
-
const exit = options.exit ??
|
|
2303
|
+
const exit = options.exit ?? make7(undefined);
|
|
2297
2304
|
const pull = suspend3(() => {
|
|
2298
2305
|
if (exit.current)
|
|
2299
2306
|
return exit.current;
|
|
@@ -2314,9 +2321,9 @@ var readableStreamToPullUnsafe = (options) => {
|
|
|
2314
2321
|
});
|
|
2315
2322
|
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
2323
|
};
|
|
2317
|
-
var
|
|
2324
|
+
var map7 = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => sync2(() => {
|
|
2318
2325
|
let i = 0;
|
|
2319
|
-
return
|
|
2326
|
+
return map8(pull, (o) => f(o, i++));
|
|
2320
2327
|
})));
|
|
2321
2328
|
var mapDone = /* @__PURE__ */ dual(2, (self, f) => mapDoneEffect(self, (o) => succeed6(f(o))));
|
|
2322
2329
|
var mapDoneEffect = /* @__PURE__ */ dual(2, (self, f) => transformPull(self, (pull) => succeed6(catchDone(pull, (done2) => flatMap3(f(done2), done)))));
|
|
@@ -2324,7 +2331,7 @@ var concurrencyIsSequential = (concurrency) => concurrency === undefined || conc
|
|
|
2324
2331
|
var mapEffect = /* @__PURE__ */ dual((args) => isChannel(args[0]), (self, f, options) => concurrencyIsSequential(options?.concurrency) ? mapEffectSequential(self, f) : mapEffectConcurrent(self, f, options));
|
|
2325
2332
|
var mapEffectSequential = (self, f) => fromTransform((upstream, scope) => {
|
|
2326
2333
|
let i = 0;
|
|
2327
|
-
return
|
|
2334
|
+
return map8(toTransform(self)(upstream, scope), flatMap3((o) => f(o, i++)));
|
|
2328
2335
|
});
|
|
2329
2336
|
var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
2330
2337
|
let i = 0;
|
|
@@ -2335,7 +2342,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
2335
2342
|
const runFork = runForkWith(yield* context());
|
|
2336
2343
|
const trackFiber = runIn(forkedScope);
|
|
2337
2344
|
if (options.unordered) {
|
|
2338
|
-
const semaphore =
|
|
2345
|
+
const semaphore = makeUnsafe3(concurrencyN);
|
|
2339
2346
|
const release = constant(semaphore.release(1));
|
|
2340
2347
|
const handle = matchCauseEffect({
|
|
2341
2348
|
onFailure: (cause) => flatMap3(failCause(queue, cause), release),
|
|
@@ -2376,7 +2383,7 @@ var mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(
|
|
|
2376
2383
|
return take(queue);
|
|
2377
2384
|
}));
|
|
2378
2385
|
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) =>
|
|
2386
|
+
var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map8(toTransform(self)(upstream, scope), (pull) => {
|
|
2380
2387
|
let childPull;
|
|
2381
2388
|
let childScope;
|
|
2382
2389
|
const makePull = flatMap3(pull, (value) => {
|
|
@@ -2397,7 +2404,7 @@ var flatMapSequential = (self, f) => fromTransform((upstream, scope) => map7(toT
|
|
|
2397
2404
|
});
|
|
2398
2405
|
return suspend3(() => childPull ?? makePull);
|
|
2399
2406
|
}));
|
|
2400
|
-
var flatMapConcurrent = (self, f, options) => self.pipe(
|
|
2407
|
+
var flatMapConcurrent = (self, f, options) => self.pipe(map7(f), mergeAll(options));
|
|
2401
2408
|
var flatten2 = (channels) => flatMap(channels, identity);
|
|
2402
2409
|
var flattenArray = (self) => transformPull(self, (pull) => {
|
|
2403
2410
|
let array;
|
|
@@ -2437,7 +2444,7 @@ var filterArray = /* @__PURE__ */ dual(2, (self, predicate) => transformPull(sel
|
|
|
2437
2444
|
}))));
|
|
2438
2445
|
var catchCause3 = /* @__PURE__ */ dual(2, (self, f) => fromTransform((upstream, scope) => {
|
|
2439
2446
|
let forkedScope = forkUnsafe(scope);
|
|
2440
|
-
return
|
|
2447
|
+
return map8(toTransform(self)(upstream, forkedScope), (pull) => {
|
|
2441
2448
|
let currentPull = pull.pipe(catchCause2((cause) => {
|
|
2442
2449
|
if (isDoneCause(cause)) {
|
|
2443
2450
|
return failCause3(cause);
|
|
@@ -2460,7 +2467,7 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, {
|
|
|
2460
2467
|
switch: switch_ = false
|
|
2461
2468
|
}) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
2462
2469
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
2463
|
-
const semaphore = switch_ ? undefined :
|
|
2470
|
+
const semaphore = switch_ ? undefined : makeUnsafe3(concurrencyN);
|
|
2464
2471
|
const doneLatch = yield* make3(true);
|
|
2465
2472
|
const fibers = new Map;
|
|
2466
2473
|
const queue = yield* bounded(bufferSize);
|
|
@@ -2634,7 +2641,7 @@ var decodeText2 = (encoding, options) => fromTransform((upstream, _scope) => syn
|
|
|
2634
2641
|
const streamOptions = {
|
|
2635
2642
|
stream: true
|
|
2636
2643
|
};
|
|
2637
|
-
let pull = upstream.pipe(
|
|
2644
|
+
let pull = upstream.pipe(map8(map6((bytes) => decoder.decode(bytes, streamOptions))), catchDone((leftover) => {
|
|
2638
2645
|
pull = done(leftover);
|
|
2639
2646
|
const last = decoder.decode();
|
|
2640
2647
|
return last.length > 0 ? succeed6(of(last)) : pull;
|
|
@@ -2661,18 +2668,18 @@ var interruptWhen2 = /* @__PURE__ */ dual(2, (self, effect) => merge(self, fromP
|
|
|
2661
2668
|
var onExit2 = /* @__PURE__ */ dual(2, (self, finalizer) => fromTransformBracket((upstream, scope, forkedScope) => addFinalizerExit(forkedScope, finalizer).pipe(andThen2(toTransform(self)(upstream, scope)))));
|
|
2662
2669
|
var ensuring3 = /* @__PURE__ */ dual(2, (self, finalizer) => onExit2(self, (_) => finalizer));
|
|
2663
2670
|
var runWith = (self, f, onHalt) => suspend3(() => {
|
|
2664
|
-
const scope =
|
|
2671
|
+
const scope = makeUnsafe6();
|
|
2665
2672
|
const makePull = toTransform(self)(done(), scope);
|
|
2666
2673
|
return catchDone(flatMap3(makePull, f), onHalt ? onHalt : succeed6).pipe(onExit((exit) => close(scope, exit)));
|
|
2667
2674
|
});
|
|
2668
|
-
var provideContext3 = /* @__PURE__ */ dual(2, (self, context) => fromTransform((upstream, scope) =>
|
|
2675
|
+
var provideContext3 = /* @__PURE__ */ dual(2, (self, context) => fromTransform((upstream, scope) => map8(provideContext2(toTransform(self)(upstream, scope), context), provideContext2(context))));
|
|
2669
2676
|
var runDrain2 = (self) => runWith(self, (pull) => forever(pull, {
|
|
2670
2677
|
disableYield: true
|
|
2671
2678
|
}));
|
|
2672
2679
|
var runForEach2 = /* @__PURE__ */ dual(2, (self, f) => runWith(self, (pull) => forever(flatMap3(pull, f), {
|
|
2673
2680
|
disableYield: true
|
|
2674
2681
|
})));
|
|
2675
|
-
var mkUint8Array = (self) =>
|
|
2682
|
+
var mkUint8Array = (self) => map8(runFold2(self, () => ({
|
|
2676
2683
|
bytes: 0,
|
|
2677
2684
|
arrays: []
|
|
2678
2685
|
}), (acc, chunk) => {
|
|
@@ -2766,11 +2773,153 @@ var forEach2 = (f) => forEachArray(forEach((_) => f(_), {
|
|
|
2766
2773
|
var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f), forever({
|
|
2767
2774
|
disableYield: true
|
|
2768
2775
|
}), catchDone(() => endVoid)));
|
|
2769
|
-
var unwrap3 = (effect) => fromChannel(unwrap2(
|
|
2776
|
+
var unwrap3 = (effect) => fromChannel(unwrap2(map8(effect, toChannel)));
|
|
2777
|
+
|
|
2778
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
|
|
2779
|
+
var TypeId8 = "~effect/RcRef";
|
|
2780
|
+
var stateEmpty = {
|
|
2781
|
+
_tag: "Empty"
|
|
2782
|
+
};
|
|
2783
|
+
var stateClosed = {
|
|
2784
|
+
_tag: "Closed"
|
|
2785
|
+
};
|
|
2786
|
+
var variance2 = {
|
|
2787
|
+
_A: identity,
|
|
2788
|
+
_E: identity
|
|
2789
|
+
};
|
|
2790
|
+
|
|
2791
|
+
class RcRefImpl {
|
|
2792
|
+
[TypeId8] = variance2;
|
|
2793
|
+
pipe() {
|
|
2794
|
+
return pipeArguments(this, arguments);
|
|
2795
|
+
}
|
|
2796
|
+
state = stateEmpty;
|
|
2797
|
+
acquire;
|
|
2798
|
+
context;
|
|
2799
|
+
scope;
|
|
2800
|
+
idleTimeToLive;
|
|
2801
|
+
constructor(acquire, context, scope, idleTimeToLive) {
|
|
2802
|
+
this.acquire = acquire;
|
|
2803
|
+
this.context = context;
|
|
2804
|
+
this.scope = scope;
|
|
2805
|
+
this.idleTimeToLive = idleTimeToLive;
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
var make6 = (options) => withFiber2((fiber) => {
|
|
2809
|
+
const context = fiber.context;
|
|
2810
|
+
const scope = get4(context, Scope);
|
|
2811
|
+
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
2812
|
+
return as(addFinalizerExit(scope, () => {
|
|
2813
|
+
const state = ref.state;
|
|
2814
|
+
ref.state = stateClosed;
|
|
2815
|
+
if (state._tag === "Acquired")
|
|
2816
|
+
return close(state.scope, void_2);
|
|
2817
|
+
if (state._tag === "Acquiring")
|
|
2818
|
+
return interrupt(state.fiber);
|
|
2819
|
+
return void_3;
|
|
2820
|
+
}), ref);
|
|
2821
|
+
});
|
|
2822
|
+
var getState = (self, restore) => {
|
|
2823
|
+
switch (self.state._tag) {
|
|
2824
|
+
case "Closed": {
|
|
2825
|
+
return interrupt3;
|
|
2826
|
+
}
|
|
2827
|
+
case "Acquired": {
|
|
2828
|
+
const state = self.state;
|
|
2829
|
+
state.refCount++;
|
|
2830
|
+
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
2831
|
+
}
|
|
2832
|
+
case "Acquiring": {
|
|
2833
|
+
const state = self.state;
|
|
2834
|
+
state.awaiters++;
|
|
2835
|
+
return awaitAcquiring(self, state, restore);
|
|
2836
|
+
}
|
|
2837
|
+
case "Empty": {
|
|
2838
|
+
const acquiring = {
|
|
2839
|
+
_tag: "Acquiring",
|
|
2840
|
+
fiber: undefined,
|
|
2841
|
+
awaiters: 1,
|
|
2842
|
+
acquired: undefined
|
|
2843
|
+
};
|
|
2844
|
+
self.state = acquiring;
|
|
2845
|
+
const scope = makeUnsafe6();
|
|
2846
|
+
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
2847
|
+
if (self.state !== acquiring) {
|
|
2848
|
+
return interrupt3;
|
|
2849
|
+
}
|
|
2850
|
+
const state = {
|
|
2851
|
+
_tag: "Acquired",
|
|
2852
|
+
value,
|
|
2853
|
+
scope,
|
|
2854
|
+
fiber: undefined,
|
|
2855
|
+
refCount: acquiring.awaiters,
|
|
2856
|
+
invalidated: false
|
|
2857
|
+
};
|
|
2858
|
+
self.state = state;
|
|
2859
|
+
acquiring.acquired = state;
|
|
2860
|
+
return succeed6(state);
|
|
2861
|
+
}), onExit((exit) => {
|
|
2862
|
+
if (isSuccess2(exit))
|
|
2863
|
+
return void_3;
|
|
2864
|
+
if (self.state === acquiring)
|
|
2865
|
+
self.state = stateEmpty;
|
|
2866
|
+
return close(scope, exit);
|
|
2867
|
+
}));
|
|
2868
|
+
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
2869
|
+
return awaitAcquiring(self, acquiring, restore);
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
};
|
|
2873
|
+
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
2874
|
+
const acquired = acquiring.acquired;
|
|
2875
|
+
if (acquired !== undefined) {
|
|
2876
|
+
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
2877
|
+
}
|
|
2878
|
+
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
2879
|
+
return void_3;
|
|
2880
|
+
self.state = stateEmpty;
|
|
2881
|
+
return interrupt(acquiring.fiber);
|
|
2882
|
+
});
|
|
2883
|
+
var get2 = (self_) => {
|
|
2884
|
+
const self = self_;
|
|
2885
|
+
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
2886
|
+
};
|
|
2887
|
+
var release = (self, state) => {
|
|
2888
|
+
state.refCount--;
|
|
2889
|
+
if (state.refCount > 0) {
|
|
2890
|
+
return void_3;
|
|
2891
|
+
}
|
|
2892
|
+
const idleTimeToLive = self.idleTimeToLive;
|
|
2893
|
+
if (idleTimeToLive === undefined || state.invalidated) {
|
|
2894
|
+
if (self.state === state) {
|
|
2895
|
+
self.state = stateEmpty;
|
|
2896
|
+
}
|
|
2897
|
+
return close(state.scope, void_2);
|
|
2898
|
+
} else if (!isFinite(idleTimeToLive)) {
|
|
2899
|
+
return void_3;
|
|
2900
|
+
}
|
|
2901
|
+
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
2902
|
+
if (self.state === state && state.refCount === 0) {
|
|
2903
|
+
self.state = stateEmpty;
|
|
2904
|
+
return ignoreCause(close(state.scope, void_2), {
|
|
2905
|
+
log: "Unhandled",
|
|
2906
|
+
message: "Unhandled error in RcRef finalizer"
|
|
2907
|
+
});
|
|
2908
|
+
}
|
|
2909
|
+
return void_3;
|
|
2910
|
+
})).pipe(ensuring2(sync2(() => {
|
|
2911
|
+
state.fiber = undefined;
|
|
2912
|
+
})), runForkWith(self.context), runIn(self.scope));
|
|
2913
|
+
return void_3;
|
|
2914
|
+
};
|
|
2915
|
+
|
|
2916
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2917
|
+
var make9 = make6;
|
|
2918
|
+
var get3 = get2;
|
|
2770
2919
|
|
|
2771
2920
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
2772
|
-
var
|
|
2773
|
-
var isStream = (u) => hasProperty(u,
|
|
2921
|
+
var TypeId9 = "~effect/Stream";
|
|
2922
|
+
var isStream = (u) => hasProperty(u, TypeId9);
|
|
2774
2923
|
var fromChannel2 = fromChannel3;
|
|
2775
2924
|
var fromPull2 = (pull) => fromChannel2(fromPull(pull));
|
|
2776
2925
|
var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
@@ -2790,12 +2939,12 @@ var fromArray2 = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel2(succee
|
|
|
2790
2939
|
var fromQueue = (queue) => fromChannel2(fromQueueArray(queue));
|
|
2791
2940
|
var fromPubSub = (pubsub) => fromChannel2(fromPubSubArray(pubsub));
|
|
2792
2941
|
var fromReadableStream = (options) => fromChannel2(fromReadableStream2(options));
|
|
2793
|
-
var unwrap = (effect) => fromChannel2(unwrap2(
|
|
2942
|
+
var unwrap = (effect) => fromChannel2(unwrap2(map8(effect, toChannel2)));
|
|
2794
2943
|
var map2 = /* @__PURE__ */ dual(2, (self, f) => suspend(() => {
|
|
2795
2944
|
let i = 0;
|
|
2796
|
-
return fromChannel2(
|
|
2945
|
+
return fromChannel2(map7(self.channel, map6((o) => f(o, i++))));
|
|
2797
2946
|
}));
|
|
2798
|
-
var mapEffect2 = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => self.channel.pipe(flattenArray, mapEffect(f, options),
|
|
2947
|
+
var mapEffect2 = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => self.channel.pipe(flattenArray, mapEffect(f, options), map7(of), fromChannel2));
|
|
2799
2948
|
var tap = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, f, options) => mapEffect2(self, (a) => as(f(a), a), options));
|
|
2800
2949
|
var drainFork = /* @__PURE__ */ dual(2, (self, that) => mergeEffect2(self, runDrain(that)));
|
|
2801
2950
|
var concat = /* @__PURE__ */ dual(2, (self, that) => {
|
|
@@ -2846,7 +2995,7 @@ var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (up
|
|
|
2846
2995
|
done2 = fail4(error);
|
|
2847
2996
|
return done();
|
|
2848
2997
|
}));
|
|
2849
|
-
const pull =
|
|
2998
|
+
const pull = map8(suspend3(() => sink.transform(upstreamWithLeftover, scope)), ([value, leftover_]) => {
|
|
2850
2999
|
leftover = leftover_;
|
|
2851
3000
|
return of(value);
|
|
2852
3001
|
});
|
|
@@ -2861,7 +3010,7 @@ var splitLines = (self) => self.channel.pipe(pipeTo(splitLines2()), fromChannel2
|
|
|
2861
3010
|
var interruptWhen = /* @__PURE__ */ dual(2, (self, effect) => fromChannel2(interruptWhen2(self.channel, effect)));
|
|
2862
3011
|
var ensuring = /* @__PURE__ */ dual(2, (self, finalizer) => fromChannel2(ensuring3(self.channel, finalizer)));
|
|
2863
3012
|
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)),
|
|
3013
|
+
var run = /* @__PURE__ */ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap3((upstream) => runSink(sink, upstream, scope)), map8(([a]) => a))));
|
|
2865
3014
|
var runSink = (sink, upstream, scope) => restoreUpstreamFailure(sink.transform(upstreamFailureToDefect(upstream), scope));
|
|
2866
3015
|
var runCollect = (self) => runFold2(self.channel, () => [], (acc, chunk) => {
|
|
2867
3016
|
for (let i = 0;i < chunk.length; i++) {
|
|
@@ -2875,7 +3024,7 @@ var runFold = /* @__PURE__ */ dual(3, (self, initial, f) => runFold2(self.channe
|
|
|
2875
3024
|
}
|
|
2876
3025
|
return acc;
|
|
2877
3026
|
}));
|
|
2878
|
-
var runHead = (self) =>
|
|
3027
|
+
var runHead = (self) => map8(runHead2(self.channel), map4(getUnsafe2(0)));
|
|
2879
3028
|
var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel, (arr) => {
|
|
2880
3029
|
let i = 0;
|
|
2881
3030
|
return whileLoop({
|
|
@@ -2886,12 +3035,12 @@ var runForEach = /* @__PURE__ */ dual(2, (self, f) => runForEach2(self.channel,
|
|
|
2886
3035
|
}));
|
|
2887
3036
|
var runDrain = (self) => runDrain2(self.channel);
|
|
2888
3037
|
var mkString = (self) => runFold2(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
2889
|
-
var mkArrayBuffer = (self) =>
|
|
3038
|
+
var mkArrayBuffer = (self) => map8(mkUint8Array(self.channel), (bytes) => bytes.buffer);
|
|
2890
3039
|
var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, context, options) => {
|
|
2891
3040
|
let currentResolve = undefined;
|
|
2892
3041
|
let fiber = undefined;
|
|
2893
3042
|
let cancelled = false;
|
|
2894
|
-
const latch =
|
|
3043
|
+
const latch = makeUnsafe2(false);
|
|
2895
3044
|
const signal = options?.signal;
|
|
2896
3045
|
const onAbort = () => fiber.interruptUnsafe();
|
|
2897
3046
|
return new ReadableStream({
|
|
@@ -2937,14 +3086,14 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
2937
3086
|
}
|
|
2938
3087
|
}, options?.strategy);
|
|
2939
3088
|
});
|
|
2940
|
-
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) =>
|
|
3089
|
+
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map8(context(), (context) => toReadableStreamWith(self, context, options)));
|
|
2941
3090
|
|
|
2942
3091
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
2943
|
-
var
|
|
3092
|
+
var TypeId10 = "~effect/FileSystem";
|
|
2944
3093
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
2945
3094
|
var make11 = (impl) => FileSystem.of({
|
|
2946
3095
|
...impl,
|
|
2947
|
-
[
|
|
3096
|
+
[TypeId10]: TypeId10,
|
|
2948
3097
|
glob: make2(impl),
|
|
2949
3098
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
2950
3099
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
@@ -2960,11 +3109,11 @@ var make11 = (impl) => FileSystem.of({
|
|
|
2960
3109
|
const file = yield* impl.open(path, {
|
|
2961
3110
|
flag: "r"
|
|
2962
3111
|
});
|
|
2963
|
-
const offset = options?.offset === undefined ? undefined :
|
|
3112
|
+
const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
|
|
2964
3113
|
if (offset) {
|
|
2965
3114
|
yield* file.seek(offset, "start");
|
|
2966
3115
|
}
|
|
2967
|
-
const bytesToRead = options?.bytesToRead === undefined ? undefined :
|
|
3116
|
+
const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
|
|
2968
3117
|
let totalBytesRead = BigInt(0);
|
|
2969
3118
|
const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
|
|
2970
3119
|
const readChunk = file.readAlloc(chunkSize);
|
|
@@ -2984,7 +3133,7 @@ var make11 = (impl) => FileSystem.of({
|
|
|
2984
3133
|
sink: (path, options) => pipe(impl.open(path, {
|
|
2985
3134
|
...options,
|
|
2986
3135
|
flag: options?.flag ?? "w"
|
|
2987
|
-
}),
|
|
3136
|
+
}), map8((file) => forEach2((_) => file.writeAll(_))), unwrap3),
|
|
2988
3137
|
writeFileString: (path, data, options) => flatMap3(try_2({
|
|
2989
3138
|
try: () => new TextEncoder().encode(data),
|
|
2990
3139
|
catch: (cause) => badArgument({
|
|
@@ -3000,11 +3149,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3000
3149
|
}
|
|
3001
3150
|
|
|
3002
3151
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3003
|
-
var
|
|
3152
|
+
var TypeId11 = "~effect/Path";
|
|
3004
3153
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3005
3154
|
var make12 = (impl) => Path.of({
|
|
3006
3155
|
...impl,
|
|
3007
|
-
[
|
|
3156
|
+
[TypeId11]: TypeId11,
|
|
3008
3157
|
resolveWithin(root, input) {
|
|
3009
3158
|
if (impl.parse(input).root !== "")
|
|
3010
3159
|
return none();
|
|
@@ -3077,7 +3226,7 @@ function makeProvider(load, mapInput) {
|
|
|
3077
3226
|
function makeSource(get, transform) {
|
|
3078
3227
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3079
3228
|
}
|
|
3080
|
-
function
|
|
3229
|
+
function make13(get) {
|
|
3081
3230
|
return makeSource(get, identityPath);
|
|
3082
3231
|
}
|
|
3083
3232
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3086,7 +3235,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3086
3235
|
function fromEnvRecord(env, options) {
|
|
3087
3236
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3088
3237
|
const trie = buildEnvTrie(env);
|
|
3089
|
-
return
|
|
3238
|
+
return make13((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3090
3239
|
}
|
|
3091
3240
|
function fromEnv(options) {
|
|
3092
3241
|
const env = options?.env ?? {
|
|
@@ -3139,7 +3288,7 @@ function trieNodeAt(root, path) {
|
|
|
3139
3288
|
}
|
|
3140
3289
|
|
|
3141
3290
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
|
|
3142
|
-
var
|
|
3291
|
+
var TypeId12 = "~effect/Config";
|
|
3143
3292
|
class ConfigError {
|
|
3144
3293
|
_tag = "ConfigError";
|
|
3145
3294
|
name = "ConfigError";
|
|
@@ -3161,14 +3310,14 @@ var Proto2 = {
|
|
|
3161
3310
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
3162
3311
|
}
|
|
3163
3312
|
}),
|
|
3164
|
-
[
|
|
3313
|
+
[TypeId12]: TypeId12,
|
|
3165
3314
|
toJSON() {
|
|
3166
3315
|
return {
|
|
3167
3316
|
_id: "Config"
|
|
3168
3317
|
};
|
|
3169
3318
|
}
|
|
3170
3319
|
};
|
|
3171
|
-
function
|
|
3320
|
+
function make14(evaluator) {
|
|
3172
3321
|
const self = Object.create(Proto2);
|
|
3173
3322
|
self.evaluator = evaluator;
|
|
3174
3323
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3176,14 +3325,14 @@ function make7(evaluator) {
|
|
|
3176
3325
|
}
|
|
3177
3326
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3178
3327
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3179
|
-
return
|
|
3328
|
+
return make14((provider, pathPrefix) => map8(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3180
3329
|
});
|
|
3181
3330
|
function all(arg) {
|
|
3182
3331
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3183
|
-
return
|
|
3332
|
+
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
3333
|
}
|
|
3185
3334
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3186
|
-
return
|
|
3335
|
+
return make14((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3187
3336
|
});
|
|
3188
3337
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3189
3338
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3302,7 +3451,7 @@ function schema(codec, path) {
|
|
|
3302
3451
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3303
3452
|
const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
|
|
3304
3453
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3305
|
-
return
|
|
3454
|
+
return make14((provider, pathPrefix) => {
|
|
3306
3455
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3307
3456
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3308
3457
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3325,7 +3474,7 @@ var optionalEnv = (name) => gen(function* () {
|
|
|
3325
3474
|
}).pipe(orElseSucceed(() => {
|
|
3326
3475
|
return;
|
|
3327
3476
|
}));
|
|
3328
|
-
var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(
|
|
3477
|
+
var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(map8((configHome) => configHome ?? `${home}/.config`));
|
|
3329
3478
|
|
|
3330
3479
|
// packages/agent-runtime/src/temp-directory.ts
|
|
3331
3480
|
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 +3530,7 @@ var srtInheritedEnv2 = [
|
|
|
3381
3530
|
"LC_CTYPE",
|
|
3382
3531
|
"TZ"
|
|
3383
3532
|
];
|
|
3384
|
-
var inheritedEnvironment2 = (names) =>
|
|
3533
|
+
var inheritedEnvironment2 = (names) => map8(forEach(names, (name) => map8(optionalEnv(name), (value) => value === undefined ? [] : [[name, value]])), (entries) => Object.fromEntries(entries.flat()));
|
|
3385
3534
|
var shellName = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
3386
3535
|
var withOnlyEnvironment2 = (names, argv) => [
|
|
3387
3536
|
"sh",
|
|
@@ -3417,4 +3566,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3417
3566
|
...argv
|
|
3418
3567
|
];
|
|
3419
3568
|
|
|
3420
|
-
export { map, makeEquivalence, toNumber, bytes, join, interrupt, getCurrent,
|
|
3569
|
+
export { map, makeEquivalence, toNumber, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make7, unbounded, publishUnsafe, make8, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make9, get3, 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 };
|