@kitman-sh/cli 0.13.10 → 0.13.12
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-813vn8sn.js → chunk-02ye1s9f.js} +18 -18
- package/dist/{chunk-4crf5vhd.js → chunk-1bkrxc3v.js} +2 -2
- package/dist/{chunk-hkg8s472.js → chunk-2xh5p0na.js} +11 -10
- package/dist/{chunk-r5v7df8h.js → chunk-36s51mp6.js} +78 -69
- package/dist/{chunk-vxfajzpz.js → chunk-3z9yz32f.js} +60 -14
- package/dist/{chunk-6x4wkf0x.js → chunk-4m923rz8.js} +3 -3
- package/dist/{chunk-kk32jckf.js → chunk-4t6nrgxw.js} +4 -4
- package/dist/{chunk-jkddgvev.js → chunk-8cxh8j07.js} +145 -55
- package/dist/{chunk-zgraq2y3.js → chunk-8pbnfqaz.js} +59 -101
- package/dist/{chunk-s00cj5sw.js → chunk-8t1vygmr.js} +4 -4
- package/dist/{chunk-kj1zjrs9.js → chunk-95w14qxp.js} +6 -6
- package/dist/{chunk-2dwqak36.js → chunk-9d03t0pn.js} +10 -10
- package/dist/{chunk-ggmwpwhf.js → chunk-eahqsd8h.js} +2 -2
- package/dist/{chunk-24h0y27w.js → chunk-fwja3qb1.js} +1 -1
- package/dist/{chunk-pxvd8w2v.js → chunk-mcw7wvtx.js} +1 -6
- package/dist/{chunk-bkecckjn.js → chunk-n1aqwdc2.js} +10 -10
- package/dist/{chunk-j34gensq.js → chunk-n734b61f.js} +1 -1
- package/dist/{chunk-mtdz4k32.js → chunk-nge8fq10.js} +9 -9
- package/dist/{chunk-0nh3w4vn.js → chunk-npjpmb0w.js} +9 -9
- package/dist/{chunk-t82w7459.js → chunk-szt25e0z.js} +61 -195
- package/dist/{chunk-rz01craf.js → chunk-ths93svq.js} +463 -195
- package/dist/{chunk-6n3m0t02.js → chunk-x5nv63jj.js} +3 -3
- package/dist/{chunk-mmd7mjv0.js → chunk-yab3j170.js} +3 -3
- package/dist/{chunk-d4pxty7x.js → chunk-z74fnmqb.js} +20 -20
- package/dist/{chunk-c60xk73g.js → chunk-zb5pnthp.js} +66 -33
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -6,10 +6,7 @@ import {
|
|
|
6
6
|
gen,
|
|
7
7
|
flatMap3,
|
|
8
8
|
provideContext2
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
runForEach
|
|
12
|
-
} from "./chunk-t82w7459.js";
|
|
9
|
+
} from "./chunk-8pbnfqaz.js";
|
|
13
10
|
import {
|
|
14
11
|
WebSocketConstructor,
|
|
15
12
|
layerWebSocketConstructorGlobal,
|
|
@@ -19,13 +16,16 @@ import {
|
|
|
19
16
|
RunnerReplicaRpcs,
|
|
20
17
|
RunnerRunFileRpcs,
|
|
21
18
|
ProgramRpcs
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ths93svq.js";
|
|
20
|
+
import {
|
|
21
|
+
runForEach
|
|
22
|
+
} from "./chunk-szt25e0z.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
|
-
|
|
25
|
+
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-z74fnmqb.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -46,7 +46,7 @@ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => with
|
|
|
46
46
|
var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
|
|
47
47
|
var makeRunnerRpcClient2 = (options) => gen(function* () {
|
|
48
48
|
const protocol = yield* build(options.protocol);
|
|
49
|
-
const client = yield*
|
|
49
|
+
const client = yield* make4(RunnerProcessRpcs).pipe(provideContext2(protocol));
|
|
50
50
|
const authorized = authorizer(options);
|
|
51
51
|
return {
|
|
52
52
|
claim: (input) => authorized(client.Claim(input)),
|
|
@@ -74,7 +74,7 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
|
|
|
74
74
|
});
|
|
75
75
|
var makeProgramRpcClient2 = (options) => gen(function* () {
|
|
76
76
|
const protocol = yield* build(options.protocol);
|
|
77
|
-
const client = yield*
|
|
77
|
+
const client = yield* make4(ProgramRpcs).pipe(provideContext2(protocol));
|
|
78
78
|
const authorized = authorizer(options);
|
|
79
79
|
return {
|
|
80
80
|
recordActivity: (input) => authorized(client.RecordActivity(input)),
|
|
@@ -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,
|
|
@@ -79,12 +76,13 @@ import {
|
|
|
79
76
|
fiberRunIn,
|
|
80
77
|
makeLatchUnsafe,
|
|
81
78
|
makeLatch,
|
|
79
|
+
ClockRef,
|
|
80
|
+
currentTimeMillis2,
|
|
82
81
|
succeed3,
|
|
83
82
|
failCause2,
|
|
84
83
|
fail4,
|
|
85
84
|
interrupt2,
|
|
86
85
|
void_2,
|
|
87
|
-
isSuccess2,
|
|
88
86
|
isFailure2,
|
|
89
87
|
asVoidAll,
|
|
90
88
|
makeUnsafe5,
|
|
@@ -156,14 +154,12 @@ import {
|
|
|
156
154
|
tapError2,
|
|
157
155
|
ignoreCause,
|
|
158
156
|
orElseSucceed,
|
|
159
|
-
sleep,
|
|
160
157
|
raceFirst,
|
|
161
158
|
when,
|
|
162
159
|
matchCauseEffect,
|
|
163
160
|
context,
|
|
164
161
|
contextWith,
|
|
165
162
|
provideContext2,
|
|
166
|
-
scope2,
|
|
167
163
|
scoped,
|
|
168
164
|
scopedWith,
|
|
169
165
|
acquireRelease,
|
|
@@ -174,7 +170,6 @@ import {
|
|
|
174
170
|
interrupt3,
|
|
175
171
|
onInterrupt,
|
|
176
172
|
uninterruptible,
|
|
177
|
-
uninterruptibleMask2,
|
|
178
173
|
forever,
|
|
179
174
|
forkChild,
|
|
180
175
|
forkIn,
|
|
@@ -197,11 +192,11 @@ import {
|
|
|
197
192
|
toEncoded,
|
|
198
193
|
decodeUnknownEffect,
|
|
199
194
|
SchemaError,
|
|
200
|
-
|
|
195
|
+
make16,
|
|
201
196
|
String4,
|
|
202
197
|
toCodecStringTree,
|
|
203
198
|
encodeUnknownJsonStringSync
|
|
204
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-8pbnfqaz.js";
|
|
205
200
|
|
|
206
201
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
207
202
|
var headUnsafe = (self) => {
|
|
@@ -250,14 +245,9 @@ var makeEquivalence = (equivalence) => {
|
|
|
250
245
|
return (self, that) => is(self, that) && is(that, self);
|
|
251
246
|
};
|
|
252
247
|
|
|
253
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/
|
|
254
|
-
var
|
|
255
|
-
var
|
|
256
|
-
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
257
|
-
return none();
|
|
258
|
-
}
|
|
259
|
-
return some(Number(b));
|
|
260
|
-
};
|
|
248
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
|
|
249
|
+
var Clock = ClockRef;
|
|
250
|
+
var currentTimeMillis = currentTimeMillis2;
|
|
261
251
|
|
|
262
252
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
|
|
263
253
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
@@ -379,7 +369,7 @@ var fromStringUnsafe = (input) => {
|
|
|
379
369
|
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
380
370
|
return make(value);
|
|
381
371
|
};
|
|
382
|
-
var
|
|
372
|
+
var fromInputUnsafe = (input) => {
|
|
383
373
|
switch (typeof input) {
|
|
384
374
|
case "bigint":
|
|
385
375
|
if (input < bigint0)
|
|
@@ -392,7 +382,7 @@ var fromInputUnsafe2 = (input) => {
|
|
|
392
382
|
}
|
|
393
383
|
return invalid(`unsupported input ${input}`);
|
|
394
384
|
};
|
|
395
|
-
var bytes = (value) => typeof value === "bigint" ?
|
|
385
|
+
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
|
|
396
386
|
|
|
397
387
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
398
388
|
var join = fiberJoin;
|
|
@@ -1138,7 +1128,7 @@ var MutableRefProto = {
|
|
|
1138
1128
|
};
|
|
1139
1129
|
}
|
|
1140
1130
|
};
|
|
1141
|
-
var
|
|
1131
|
+
var make8 = (value) => {
|
|
1142
1132
|
const ref = Object.create(MutableRefProto);
|
|
1143
1133
|
ref.current = value;
|
|
1144
1134
|
return ref;
|
|
@@ -1251,7 +1241,7 @@ var takeN = (self, n) => {
|
|
|
1251
1241
|
return array;
|
|
1252
1242
|
};
|
|
1253
1243
|
var takeAll = (self) => takeN(self, self.length);
|
|
1254
|
-
var
|
|
1244
|
+
var take3 = (self) => {
|
|
1255
1245
|
if (!self.head)
|
|
1256
1246
|
return Empty;
|
|
1257
1247
|
const message = self.head.array[self.head.offset];
|
|
@@ -1299,7 +1289,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
|
|
|
1299
1289
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1300
1290
|
var TypeId3 = "~effect/PubSub";
|
|
1301
1291
|
var SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
1302
|
-
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false),
|
|
1292
|
+
var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
|
|
1303
1293
|
var unbounded = (options) => make5({
|
|
1304
1294
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
1305
1295
|
strategy: () => new DroppingStrategy
|
|
@@ -1318,7 +1308,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1318
1308
|
return false;
|
|
1319
1309
|
});
|
|
1320
1310
|
var subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
1321
|
-
const localScope =
|
|
1311
|
+
const localScope = get3(services, Scope);
|
|
1322
1312
|
const scope = forkUnsafe(self.scope);
|
|
1323
1313
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
1324
1314
|
return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -1394,7 +1384,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
1394
1384
|
subscribers.delete(subscription);
|
|
1395
1385
|
}
|
|
1396
1386
|
};
|
|
1397
|
-
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false),
|
|
1387
|
+
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
|
|
1398
1388
|
class UnboundedPubSub {
|
|
1399
1389
|
publisherHead = {
|
|
1400
1390
|
value: AbsentValue,
|
|
@@ -1635,7 +1625,7 @@ class DroppingStrategy {
|
|
|
1635
1625
|
var strategyCompletePollersUnsafe = (strategy, pubsub, subscribers, subscription, pollers) => {
|
|
1636
1626
|
let keepPolling = true;
|
|
1637
1627
|
while (keepPolling && !subscription.isEmpty()) {
|
|
1638
|
-
const poller =
|
|
1628
|
+
const poller = take3(pollers);
|
|
1639
1629
|
if (poller === Empty) {
|
|
1640
1630
|
removeSubscribers(subscribers, subscription, pollers);
|
|
1641
1631
|
if (pollers.length === 0) {
|
|
@@ -1811,7 +1801,7 @@ var QueueProto = {
|
|
|
1811
1801
|
};
|
|
1812
1802
|
}
|
|
1813
1803
|
};
|
|
1814
|
-
var
|
|
1804
|
+
var make9 = (options) => withFiber((fiber) => {
|
|
1815
1805
|
const self = Object.create(QueueProto);
|
|
1816
1806
|
self.dispatcher = fiber.currentDispatcher;
|
|
1817
1807
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
@@ -1826,21 +1816,21 @@ var make8 = (options) => withFiber((fiber) => {
|
|
|
1826
1816
|
};
|
|
1827
1817
|
return succeed2(self);
|
|
1828
1818
|
});
|
|
1829
|
-
var bounded = (capacity) =>
|
|
1819
|
+
var bounded = (capacity) => make9({
|
|
1830
1820
|
capacity
|
|
1831
1821
|
});
|
|
1832
|
-
var sliding = (capacity) =>
|
|
1822
|
+
var sliding = (capacity) => make9({
|
|
1833
1823
|
capacity,
|
|
1834
1824
|
strategy: "sliding"
|
|
1835
1825
|
});
|
|
1836
|
-
var unbounded2 = () =>
|
|
1826
|
+
var unbounded2 = () => make9();
|
|
1837
1827
|
var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
|
|
1838
1828
|
var offerUnsafe = (self, message) => {
|
|
1839
1829
|
if (self.state._tag !== "Open") {
|
|
1840
1830
|
return false;
|
|
1841
1831
|
} else if (self.messages.length >= self.capacity) {
|
|
1842
1832
|
if (self.strategy === "sliding") {
|
|
1843
|
-
|
|
1833
|
+
take3(self.messages);
|
|
1844
1834
|
append(self.messages, message);
|
|
1845
1835
|
return true;
|
|
1846
1836
|
} else if (self.capacity <= 0 && self.state.takers.size > 0) {
|
|
@@ -1951,7 +1941,7 @@ var takeUnsafe = (self) => {
|
|
|
1951
1941
|
return self.state.exit;
|
|
1952
1942
|
}
|
|
1953
1943
|
if (self.messages.length > 0) {
|
|
1954
|
-
const message =
|
|
1944
|
+
const message = take3(self.messages);
|
|
1955
1945
|
releaseCapacity(self);
|
|
1956
1946
|
return exitSucceed(message);
|
|
1957
1947
|
} else if (self.capacity <= 0 && self.state.offers.size > 0) {
|
|
@@ -2259,7 +2249,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
|
|
|
2259
2249
|
return onError(pull, onCause);
|
|
2260
2250
|
}));
|
|
2261
2251
|
var toTransform = (channel) => channel.transform;
|
|
2262
|
-
var asyncQueue = (scope, f, options) =>
|
|
2252
|
+
var asyncQueue = (scope, f, options) => make9({
|
|
2263
2253
|
capacity: options?.bufferSize,
|
|
2264
2254
|
strategy: options?.strategy
|
|
2265
2255
|
}).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
|
|
@@ -2300,7 +2290,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
|
|
|
2300
2290
|
}));
|
|
2301
2291
|
var readableStreamToPullUnsafe = (options) => {
|
|
2302
2292
|
const reader = options.readable.getReader();
|
|
2303
|
-
const exit = options.exit ??
|
|
2293
|
+
const exit = options.exit ?? make8(undefined);
|
|
2304
2294
|
const pull = suspend3(() => {
|
|
2305
2295
|
if (exit.current)
|
|
2306
2296
|
return exit.current;
|
|
@@ -2775,151 +2765,9 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
|
|
|
2775
2765
|
}), catchDone(() => endVoid)));
|
|
2776
2766
|
var unwrap3 = (effect) => fromChannel(unwrap2(map8(effect, toChannel)));
|
|
2777
2767
|
|
|
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;
|
|
2919
|
-
|
|
2920
2768
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
2921
|
-
var
|
|
2922
|
-
var isStream = (u) => hasProperty(u,
|
|
2769
|
+
var TypeId8 = "~effect/Stream";
|
|
2770
|
+
var isStream = (u) => hasProperty(u, TypeId8);
|
|
2923
2771
|
var fromChannel2 = fromChannel3;
|
|
2924
2772
|
var fromPull2 = (pull) => fromChannel2(fromPull(pull));
|
|
2925
2773
|
var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
@@ -2981,6 +2829,24 @@ var filter = /* @__PURE__ */ dual(2, (self, predicate) => fromChannel2(filterArr
|
|
|
2981
2829
|
var catchCause = /* @__PURE__ */ dual(2, (self, f) => self.channel.pipe(catchCause3((cause) => f(cause).channel), fromChannel2));
|
|
2982
2830
|
var tapError = /* @__PURE__ */ dual(2, (self, f) => self.channel.pipe(tapError3(f), fromChannel2));
|
|
2983
2831
|
var mapError = /* @__PURE__ */ dual(2, (self, f) => fromChannel2(mapError3(self.channel, f)));
|
|
2832
|
+
var take2 = /* @__PURE__ */ dual(2, (self, n) => {
|
|
2833
|
+
const count = normalize(n);
|
|
2834
|
+
return count === 0 ? empty2 : takeUntil(self, (_, i) => i === count - 1);
|
|
2835
|
+
});
|
|
2836
|
+
var takeUntil = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, predicate, options) => transformPull2(self, (pull, _scope) => sync2(() => {
|
|
2837
|
+
let i = 0;
|
|
2838
|
+
let done2 = false;
|
|
2839
|
+
const pump = flatMap3(suspend3(() => done2 ? done() : pull), (chunk) => {
|
|
2840
|
+
const index = chunk.findIndex((a) => predicate(a, i++));
|
|
2841
|
+
if (index >= 0) {
|
|
2842
|
+
done2 = true;
|
|
2843
|
+
const arr = chunk.slice(0, options?.excludeLast ? index : index + 1);
|
|
2844
|
+
return isReadonlyArrayNonEmpty(arr) ? succeed6(arr) : done();
|
|
2845
|
+
}
|
|
2846
|
+
return succeed6(chunk);
|
|
2847
|
+
});
|
|
2848
|
+
return pump;
|
|
2849
|
+
})));
|
|
2984
2850
|
var transduce = /* @__PURE__ */ dual(2, (self, sink) => transformPull2(self, (upstream, scope) => sync2(() => {
|
|
2985
2851
|
let done2;
|
|
2986
2852
|
let leftover;
|
|
@@ -3089,11 +2955,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
3089
2955
|
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map8(context(), (context) => toReadableStreamWith(self, context, options)));
|
|
3090
2956
|
|
|
3091
2957
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
3092
|
-
var
|
|
2958
|
+
var TypeId9 = "~effect/FileSystem";
|
|
3093
2959
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
3094
2960
|
var make11 = (impl) => FileSystem.of({
|
|
3095
2961
|
...impl,
|
|
3096
|
-
[
|
|
2962
|
+
[TypeId9]: TypeId9,
|
|
3097
2963
|
glob: make2(impl),
|
|
3098
2964
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
3099
2965
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
@@ -3109,11 +2975,11 @@ var make11 = (impl) => FileSystem.of({
|
|
|
3109
2975
|
const file = yield* impl.open(path, {
|
|
3110
2976
|
flag: "r"
|
|
3111
2977
|
});
|
|
3112
|
-
const offset = options?.offset === undefined ? undefined :
|
|
2978
|
+
const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
|
|
3113
2979
|
if (offset) {
|
|
3114
2980
|
yield* file.seek(offset, "start");
|
|
3115
2981
|
}
|
|
3116
|
-
const bytesToRead = options?.bytesToRead === undefined ? undefined :
|
|
2982
|
+
const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
|
|
3117
2983
|
let totalBytesRead = BigInt(0);
|
|
3118
2984
|
const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
|
|
3119
2985
|
const readChunk = file.readAlloc(chunkSize);
|
|
@@ -3149,11 +3015,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3149
3015
|
}
|
|
3150
3016
|
|
|
3151
3017
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3152
|
-
var
|
|
3018
|
+
var TypeId10 = "~effect/Path";
|
|
3153
3019
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3154
3020
|
var make12 = (impl) => Path.of({
|
|
3155
3021
|
...impl,
|
|
3156
|
-
[
|
|
3022
|
+
[TypeId10]: TypeId10,
|
|
3157
3023
|
resolveWithin(root, input) {
|
|
3158
3024
|
if (impl.parse(input).root !== "")
|
|
3159
3025
|
return none();
|
|
@@ -3226,7 +3092,7 @@ function makeProvider(load, mapInput) {
|
|
|
3226
3092
|
function makeSource(get, transform) {
|
|
3227
3093
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3228
3094
|
}
|
|
3229
|
-
function
|
|
3095
|
+
function make6(get) {
|
|
3230
3096
|
return makeSource(get, identityPath);
|
|
3231
3097
|
}
|
|
3232
3098
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3235,7 +3101,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3235
3101
|
function fromEnvRecord(env, options) {
|
|
3236
3102
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3237
3103
|
const trie = buildEnvTrie(env);
|
|
3238
|
-
return
|
|
3104
|
+
return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3239
3105
|
}
|
|
3240
3106
|
function fromEnv(options) {
|
|
3241
3107
|
const env = options?.env ?? {
|
|
@@ -3288,7 +3154,7 @@ function trieNodeAt(root, path) {
|
|
|
3288
3154
|
}
|
|
3289
3155
|
|
|
3290
3156
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
|
|
3291
|
-
var
|
|
3157
|
+
var TypeId11 = "~effect/Config";
|
|
3292
3158
|
class ConfigError {
|
|
3293
3159
|
_tag = "ConfigError";
|
|
3294
3160
|
name = "ConfigError";
|
|
@@ -3310,14 +3176,14 @@ var Proto2 = {
|
|
|
3310
3176
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
3311
3177
|
}
|
|
3312
3178
|
}),
|
|
3313
|
-
[
|
|
3179
|
+
[TypeId11]: TypeId11,
|
|
3314
3180
|
toJSON() {
|
|
3315
3181
|
return {
|
|
3316
3182
|
_id: "Config"
|
|
3317
3183
|
};
|
|
3318
3184
|
}
|
|
3319
3185
|
};
|
|
3320
|
-
function
|
|
3186
|
+
function make7(evaluator) {
|
|
3321
3187
|
const self = Object.create(Proto2);
|
|
3322
3188
|
self.evaluator = evaluator;
|
|
3323
3189
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3325,14 +3191,14 @@ function make14(evaluator) {
|
|
|
3325
3191
|
}
|
|
3326
3192
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3327
3193
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3328
|
-
return
|
|
3194
|
+
return make7((provider, pathPrefix) => map8(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3329
3195
|
});
|
|
3330
3196
|
function all(arg) {
|
|
3331
3197
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3332
|
-
return
|
|
3198
|
+
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
3199
|
}
|
|
3334
3200
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3335
|
-
return
|
|
3201
|
+
return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3336
3202
|
});
|
|
3337
3203
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3338
3204
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3449,9 +3315,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
|
3449
3315
|
function schema(codec, path) {
|
|
3450
3316
|
const codecStringTree = toCodecStringTree(codec);
|
|
3451
3317
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3452
|
-
const decodeCursor = decodeUnknownEffect(
|
|
3318
|
+
const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
|
|
3453
3319
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3454
|
-
return
|
|
3320
|
+
return make7((provider, pathPrefix) => {
|
|
3455
3321
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3456
3322
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3457
3323
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3566,4 +3432,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3566
3432
|
...argv
|
|
3567
3433
|
];
|
|
3568
3434
|
|
|
3569
|
-
export { map, makeEquivalence,
|
|
3435
|
+
export { map, makeEquivalence, Clock, currentTimeMillis, bytes, join, interrupt, getCurrent, runIn, 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, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, 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 };
|