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