@kitman-sh/cli 0.49.0 → 0.50.1
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-4vxbxjf8.js → chunk-5tgpa02q.js} +1 -1
- package/dist/{chunk-6ne389p2.js → chunk-72ht3484.js} +10 -10
- package/dist/{chunk-6btp5qcy.js → chunk-7y1w0dhd.js} +13 -11
- package/dist/{chunk-zr1kvjzj.js → chunk-8r9k7pqk.js} +9 -3
- package/dist/{chunk-ceh3fcex.js → chunk-9jz94mb7.js} +1 -1
- package/dist/{chunk-5t7qvmkj.js → chunk-9vdy85kg.js} +21 -21
- package/dist/{chunk-kaqwjb64.js → chunk-ag79vvjy.js} +4 -4
- package/dist/{chunk-04wqa07j.js → chunk-apv9h5tz.js} +1 -1
- package/dist/{chunk-wr2yqtwt.js → chunk-bk28dr40.js} +20 -20
- package/dist/{chunk-vtzn8zqj.js → chunk-brbym443.js} +2 -2
- package/dist/{chunk-cv7xg2ps.js → chunk-ecweehc6.js} +103 -81
- package/dist/{chunk-59hspz5e.js → chunk-g3c1vesf.js} +1 -1
- package/dist/{chunk-nsw1wykj.js → chunk-h3wes7wf.js} +10 -10
- package/dist/{chunk-xajmb07d.js → chunk-hyaq30ne.js} +21 -170
- package/dist/{chunk-9ykh05hz.js → chunk-k1fdsn2c.js} +1 -1
- package/dist/{chunk-dh7ewhqd.js → chunk-k5cqc0cs.js} +6 -4
- package/dist/{chunk-e2dszepq.js → chunk-mtrhqr16.js} +3 -3
- package/dist/{chunk-n3jpxd14.js → chunk-n00cpb86.js} +2 -2
- package/dist/{chunk-k462v2v7.js → chunk-n381rqax.js} +157 -13
- package/dist/{chunk-0n9f624b.js → chunk-q8m2ygyt.js} +4 -4
- package/dist/{chunk-5pjbxhxy.js → chunk-qfwhsqej.js} +3 -3
- package/dist/{chunk-8qvgey5g.js → chunk-rr0rem5d.js} +6 -6
- package/dist/{chunk-c3m48dge.js → chunk-s6z4sdkw.js} +4 -4
- package/dist/{chunk-qvvph24z.js → chunk-s8ws5fqj.js} +18 -11
- package/dist/{chunk-0hb5d4rz.js → chunk-v96hm634.js} +9 -9
- package/dist/{chunk-cps0774f.js → chunk-watq46xe.js} +19 -11
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -186,58 +186,7 @@ import {
|
|
|
186
186
|
decodeJsonStringSync,
|
|
187
187
|
encodeUnknownJsonStringSync,
|
|
188
188
|
storable
|
|
189
|
-
} from "./chunk-
|
|
190
|
-
import {
|
|
191
|
-
empty2,
|
|
192
|
-
currentTimeMillis,
|
|
193
|
-
join,
|
|
194
|
-
interrupt,
|
|
195
|
-
interruptAll,
|
|
196
|
-
unbounded,
|
|
197
|
-
publishUnsafe,
|
|
198
|
-
unbounded2,
|
|
199
|
-
offer,
|
|
200
|
-
makeUnsafe3,
|
|
201
|
-
make10,
|
|
202
|
-
fromQueue,
|
|
203
|
-
fromPubSub,
|
|
204
|
-
map2,
|
|
205
|
-
filter,
|
|
206
|
-
take2,
|
|
207
|
-
mapAccum,
|
|
208
|
-
decodeText,
|
|
209
|
-
encodeText,
|
|
210
|
-
splitLines,
|
|
211
|
-
run,
|
|
212
|
-
runCollect,
|
|
213
|
-
runFold,
|
|
214
|
-
runHead,
|
|
215
|
-
runForEach,
|
|
216
|
-
FileSystem,
|
|
217
|
-
Path,
|
|
218
|
-
embeddedFile,
|
|
219
|
-
extractEmbeddedFile,
|
|
220
|
-
withDefault,
|
|
221
|
-
String2,
|
|
222
|
-
optionalEnv,
|
|
223
|
-
operatorConfigHome,
|
|
224
|
-
tempDirectoryScoped,
|
|
225
|
-
harnessesUnsupportedInSrt2,
|
|
226
|
-
harnessesUnsupportedInDocker2,
|
|
227
|
-
compiled2,
|
|
228
|
-
pinnedSrtCommand2,
|
|
229
|
-
pinnedSrtStepCommand2,
|
|
230
|
-
runSrtCli2,
|
|
231
|
-
kitmanCacheDirectory2,
|
|
232
|
-
srtSettings2,
|
|
233
|
-
srtCacheEnvironment2,
|
|
234
|
-
srtInheritedEnv2,
|
|
235
|
-
inheritedEnvironment2,
|
|
236
|
-
withOnlyEnvironment2,
|
|
237
|
-
writeSrtSettings2,
|
|
238
|
-
srtStepArgv2,
|
|
239
|
-
srtArgv2
|
|
240
|
-
} from "./chunk-xajmb07d.js";
|
|
189
|
+
} from "./chunk-n381rqax.js";
|
|
241
190
|
import {
|
|
242
191
|
SecureRandom,
|
|
243
192
|
layerWebCrypto,
|
|
@@ -276,6 +225,7 @@ import {
|
|
|
276
225
|
commitMessageMax,
|
|
277
226
|
commandTimeoutMillisDefault,
|
|
278
227
|
commandTextLimit,
|
|
228
|
+
programCrashOutputChars,
|
|
279
229
|
catchUpPathLimit,
|
|
280
230
|
verificationCap,
|
|
281
231
|
createId,
|
|
@@ -327,7 +277,59 @@ import {
|
|
|
327
277
|
checkServicesFile,
|
|
328
278
|
checkServices,
|
|
329
279
|
serviceChecks
|
|
330
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-s8ws5fqj.js";
|
|
281
|
+
import {
|
|
282
|
+
empty2,
|
|
283
|
+
join,
|
|
284
|
+
interrupt,
|
|
285
|
+
interruptAll,
|
|
286
|
+
unbounded,
|
|
287
|
+
publishUnsafe,
|
|
288
|
+
unbounded2,
|
|
289
|
+
offer,
|
|
290
|
+
makeUnsafe3,
|
|
291
|
+
make10,
|
|
292
|
+
fromQueue,
|
|
293
|
+
fromPubSub,
|
|
294
|
+
map2,
|
|
295
|
+
tap,
|
|
296
|
+
merge2,
|
|
297
|
+
filter,
|
|
298
|
+
take2,
|
|
299
|
+
mapAccum,
|
|
300
|
+
decodeText,
|
|
301
|
+
encodeText,
|
|
302
|
+
splitLines,
|
|
303
|
+
run,
|
|
304
|
+
runCollect,
|
|
305
|
+
runFold,
|
|
306
|
+
runHead,
|
|
307
|
+
runForEach,
|
|
308
|
+
FileSystem,
|
|
309
|
+
Path,
|
|
310
|
+
embeddedFile,
|
|
311
|
+
extractEmbeddedFile,
|
|
312
|
+
withDefault,
|
|
313
|
+
String2,
|
|
314
|
+
optionalEnv,
|
|
315
|
+
operatorConfigHome,
|
|
316
|
+
tempDirectoryScoped,
|
|
317
|
+
harnessesUnsupportedInSrt2,
|
|
318
|
+
harnessesUnsupportedInDocker2,
|
|
319
|
+
compiled2,
|
|
320
|
+
pinnedSrtCommand2,
|
|
321
|
+
pinnedSrtStepCommand2,
|
|
322
|
+
runSrtCli2,
|
|
323
|
+
kitmanCacheDirectory2,
|
|
324
|
+
srtSettings2,
|
|
325
|
+
srtCacheEnvironment2,
|
|
326
|
+
srtInheritedEnv2,
|
|
327
|
+
inheritedEnvironment2,
|
|
328
|
+
withOnlyEnvironment2,
|
|
329
|
+
writeSrtSettings2,
|
|
330
|
+
srtStepArgv2,
|
|
331
|
+
srtArgv2
|
|
332
|
+
} from "./chunk-hyaq30ne.js";
|
|
331
333
|
import {
|
|
332
334
|
writeAgentEnvironmentConfigFile2,
|
|
333
335
|
readManifestSkillPaths2,
|
|
@@ -343,8 +345,13 @@ import {
|
|
|
343
345
|
applyAgentEnvironmentMaterialization2,
|
|
344
346
|
isPathWithin2,
|
|
345
347
|
skillIdentity2
|
|
346
|
-
} from "./chunk-
|
|
347
|
-
import"./chunk-
|
|
348
|
+
} from "./chunk-v96hm634.js";
|
|
349
|
+
import"./chunk-mtrhqr16.js";
|
|
350
|
+
import {
|
|
351
|
+
currentTimeMillis,
|
|
352
|
+
ChildProcessSpawner,
|
|
353
|
+
make2
|
|
354
|
+
} from "./chunk-8r9k7pqk.js";
|
|
348
355
|
import {
|
|
349
356
|
egressAllowed,
|
|
350
357
|
writeSecretRegistry,
|
|
@@ -354,7 +361,7 @@ import {
|
|
|
354
361
|
secretFilter2,
|
|
355
362
|
opaqueTunnelRefusal2,
|
|
356
363
|
isOpaqueConnectReason2
|
|
357
|
-
} from "./chunk-
|
|
364
|
+
} from "./chunk-n00cpb86.js";
|
|
358
365
|
import {
|
|
359
366
|
sliceBytes2,
|
|
360
367
|
maxLineBytes2,
|
|
@@ -364,29 +371,25 @@ import {
|
|
|
364
371
|
lookAtOpencode2,
|
|
365
372
|
readOpencode2,
|
|
366
373
|
databaseStamp2
|
|
367
|
-
} from "./chunk-
|
|
374
|
+
} from "./chunk-72ht3484.js";
|
|
368
375
|
import {
|
|
369
376
|
uploadRunFile,
|
|
370
377
|
programLease,
|
|
371
378
|
rpcRunFiles,
|
|
372
379
|
programHostsEnv,
|
|
373
380
|
undeclaredHostsEnv
|
|
374
|
-
} from "./chunk-
|
|
375
|
-
import"./chunk-
|
|
381
|
+
} from "./chunk-watq46xe.js";
|
|
382
|
+
import"./chunk-q8m2ygyt.js";
|
|
376
383
|
import {
|
|
377
384
|
nextInt
|
|
378
|
-
} from "./chunk-
|
|
379
|
-
import"./chunk-
|
|
380
|
-
import
|
|
381
|
-
ChildProcessSpawner,
|
|
382
|
-
make2
|
|
383
|
-
} from "./chunk-zr1kvjzj.js";
|
|
384
|
-
import"./chunk-dh7ewhqd.js";
|
|
385
|
+
} from "./chunk-apv9h5tz.js";
|
|
386
|
+
import"./chunk-k1fdsn2c.js";
|
|
387
|
+
import"./chunk-k5cqc0cs.js";
|
|
385
388
|
import {
|
|
386
389
|
Id,
|
|
387
390
|
secretReference,
|
|
388
391
|
secretPlaceholder
|
|
389
|
-
} from "./chunk-
|
|
392
|
+
} from "./chunk-5tgpa02q.js";
|
|
390
393
|
|
|
391
394
|
// packages/core/src/sync-kit.ts
|
|
392
395
|
import { createHash } from "crypto";
|
|
@@ -9117,9 +9120,16 @@ var kitmanBundles = (input) => gen(function* () {
|
|
|
9117
9120
|
};
|
|
9118
9121
|
});
|
|
9119
9122
|
// packages/agent-runtime/src/program-process.ts
|
|
9123
|
+
import { stripVTControlCharacters } from "util";
|
|
9120
9124
|
var inheritedEnv = ["PATH", "HOME", "TMPDIR", "LANG", "LC_ALL", "TZ"];
|
|
9121
9125
|
var containerEnv = new Set(["LANG", "LC_ALL", "TZ"]);
|
|
9122
9126
|
var failed2 = (failureSummary) => ({ status: "failed", failureSummary });
|
|
9127
|
+
var keepEnd = (kept, text) => kept.text.length + text.length <= programCrashOutputChars ? { text: kept.text + text, cut: kept.cut } : { text: (kept.text + text).slice(-programCrashOutputChars), cut: true };
|
|
9128
|
+
var crash = (reason, output) => {
|
|
9129
|
+
const written = stripVTControlCharacters(output.text).trim();
|
|
9130
|
+
return written.length === 0 ? { reason } : { reason, output: written, outputCut: output.cut };
|
|
9131
|
+
};
|
|
9132
|
+
var forwardTo = (sink) => (chunk) => callback3((resume) => void sink.write(chunk, () => resume(void_3)));
|
|
9123
9133
|
var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
9124
9134
|
const { sandbox } = input;
|
|
9125
9135
|
if (sandbox !== undefined && sandbox.backend === undefined)
|
|
@@ -9143,17 +9153,20 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
|
9143
9153
|
...hosts === undefined ? undefined : { [programHostsEnv]: hosts.join(",") },
|
|
9144
9154
|
[undeclaredHostsEnv]: sandbox === undefined ? "warn" : "fail"
|
|
9145
9155
|
};
|
|
9146
|
-
const
|
|
9156
|
+
const { ended, output } = sandbox === undefined ? yield* gen(function* () {
|
|
9147
9157
|
const spawner = yield* ChildProcessSpawner;
|
|
9148
9158
|
const handle = yield* spawner.spawn(make2(input.bun ?? process.execPath, [file], {
|
|
9149
9159
|
stdin: make10(new TextEncoder().encode(stdin)),
|
|
9150
|
-
stdout: "
|
|
9151
|
-
stderr: "
|
|
9160
|
+
stdout: "pipe",
|
|
9161
|
+
stderr: "pipe",
|
|
9152
9162
|
extendEnv: false,
|
|
9153
9163
|
env: { ...Object.fromEntries(inherited), ...programEnv },
|
|
9154
9164
|
forceKillAfter: "5 seconds"
|
|
9155
9165
|
}));
|
|
9156
|
-
|
|
9166
|
+
const output = runFold(merge2(decodeText(tap(handle.stdout, forwardTo(process.stdout))), decodeText(tap(handle.stderr, forwardTo(process.stderr)))), () => ({ text: "", cut: false }), keepEnd);
|
|
9167
|
+
const exited = handle.exitCode.pipe(map9((code) => ({ code: Number(code) })), catch_((error) => succeed6({ stopped: error.cause instanceof Error ? error.cause.message : error.message })));
|
|
9168
|
+
const [written, ended] = yield* all3([output, exited], { concurrency: 2 });
|
|
9169
|
+
return { ended, output: written };
|
|
9157
9170
|
}) : yield* gen(function* () {
|
|
9158
9171
|
const tmp = yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-program-" });
|
|
9159
9172
|
const policy = {
|
|
@@ -9198,15 +9211,23 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
|
9198
9211
|
});
|
|
9199
9212
|
if (ran.exitCode !== 0)
|
|
9200
9213
|
yield* logWarning("runner_program_output", ran.output);
|
|
9201
|
-
|
|
9214
|
+
const kept = ran.output.slice(-programCrashOutputChars);
|
|
9215
|
+
return {
|
|
9216
|
+
ended: { code: ran.exitCode },
|
|
9217
|
+
output: {
|
|
9218
|
+
text: kept,
|
|
9219
|
+
cut: kept.length < ran.output.length || ran.output.length >= shellOutputTailChars2
|
|
9220
|
+
}
|
|
9221
|
+
};
|
|
9202
9222
|
});
|
|
9203
|
-
if (
|
|
9223
|
+
if ("code" in ended && ended.code === 0)
|
|
9204
9224
|
return { status: "settled" };
|
|
9205
|
-
yield* logWarning("runner_program_exited_unsettled", { workUnitId: work.id,
|
|
9206
|
-
|
|
9225
|
+
yield* logWarning("runner_program_exited_unsettled", { workUnitId: work.id, ...ended });
|
|
9226
|
+
const reason = "code" in ended ? `it exited with code ${ended.code}` : `it stopped before it exited: ${ended.stopped}`.slice(0, 500);
|
|
9227
|
+
return { status: "deferred", crashed: crash(reason, output) };
|
|
9207
9228
|
}).pipe(scoped, catch_((error) => as(logWarning("runner_program_not_started", error.message), {
|
|
9208
9229
|
status: "deferred",
|
|
9209
|
-
crashed: `it did not start: ${error.message}`.slice(0, 500)
|
|
9230
|
+
crashed: { reason: `it did not start: ${error.message}`.slice(0, 500) }
|
|
9210
9231
|
})));
|
|
9211
9232
|
// packages/agent-runtime/src/deploy-script.ts
|
|
9212
9233
|
var deployScript = ".kitman/deploy";
|
|
@@ -9914,15 +9935,16 @@ var runCheck = (worktree, check, run, keeper, services, postgres) => gen(functio
|
|
|
9914
9935
|
const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-files-" });
|
|
9915
9936
|
const output = path.join(yield* tempDirectoryScoped(fs, { prefix: "kitman-check-output-" }), "output");
|
|
9916
9937
|
const sink = yield* fs.open(output, { flag: "w" });
|
|
9917
|
-
const
|
|
9918
|
-
const
|
|
9938
|
+
const cwd = path.join(worktree, check.workingDirectory ?? ".");
|
|
9939
|
+
const isDirectory = yield* fs.stat(cwd).pipe(map9((info) => info.type === "Directory"), orElseSucceed(() => false));
|
|
9940
|
+
const ran = isDirectory ? yield* run({
|
|
9919
9941
|
command: check.command,
|
|
9920
|
-
cwd
|
|
9942
|
+
cwd,
|
|
9921
9943
|
filesDir,
|
|
9922
9944
|
...postgres === undefined ? undefined : { postgres },
|
|
9923
|
-
...
|
|
9945
|
+
...check.pipeline === true ? { docker: yield* pipelineDaemon(services, check.name) } : undefined,
|
|
9924
9946
|
onOutput: (chunk) => sink.writeAll(chunk)
|
|
9925
|
-
});
|
|
9947
|
+
}) : { exitCode: 127, output: `No directory ${check.workingDirectory ?? "."} in this checkout` };
|
|
9926
9948
|
const durationMs = (yield* currentTimeMillis) - startedAt;
|
|
9927
9949
|
const printed = ran.exitCode === 0 ? [] : yield* printedFailures(output);
|
|
9928
9950
|
const failedInParallel = ran.exitCode === 0 ? [] : yield* parallelFailures(output);
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSystem,
|
|
4
|
-
Path
|
|
5
|
-
} from "./chunk-xajmb07d.js";
|
|
6
2
|
import {
|
|
7
3
|
isObject,
|
|
8
4
|
isUint8Array,
|
|
@@ -17,13 +13,17 @@ import {
|
|
|
17
13
|
isJsonObject,
|
|
18
14
|
decodeJsonString,
|
|
19
15
|
encodePrettyJsonString
|
|
20
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-n381rqax.js";
|
|
17
|
+
import {
|
|
18
|
+
FileSystem,
|
|
19
|
+
Path
|
|
20
|
+
} from "./chunk-hyaq30ne.js";
|
|
21
21
|
import {
|
|
22
22
|
tomlTableHeader2,
|
|
23
23
|
tomlKeyPath2,
|
|
24
24
|
kitmanSkillEntry,
|
|
25
25
|
isPathWithin2
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-v96hm634.js";
|
|
27
27
|
import {
|
|
28
28
|
instructionsStart,
|
|
29
29
|
instructionsEnd,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
antigravityPlugins,
|
|
32
32
|
materializeKitSetup,
|
|
33
33
|
tomlInline
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-s8ws5fqj.js";
|
|
35
|
+
import"./chunk-8r9k7pqk.js";
|
|
36
|
+
import"./chunk-mtrhqr16.js";
|
|
37
|
+
import"./chunk-5tgpa02q.js";
|
|
38
38
|
|
|
39
39
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
40
40
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -82,8 +82,6 @@ import {
|
|
|
82
82
|
fiberRunIn,
|
|
83
83
|
makeLatchUnsafe,
|
|
84
84
|
makeLatch,
|
|
85
|
-
ClockRef,
|
|
86
|
-
currentTimeMillis2,
|
|
87
85
|
succeed3,
|
|
88
86
|
failCause2,
|
|
89
87
|
fail4,
|
|
@@ -191,6 +189,7 @@ import {
|
|
|
191
189
|
mapEager,
|
|
192
190
|
flatMapEager,
|
|
193
191
|
catchEager,
|
|
192
|
+
fromInputUnsafe2,
|
|
194
193
|
Pointer,
|
|
195
194
|
passthrough,
|
|
196
195
|
transformEffect,
|
|
@@ -206,7 +205,7 @@ import {
|
|
|
206
205
|
String4,
|
|
207
206
|
toCodecStringTree,
|
|
208
207
|
encodeUnknownJsonStringSync
|
|
209
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-n381rqax.js";
|
|
210
209
|
|
|
211
210
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
212
211
|
var headUnsafe = (self) => {
|
|
@@ -256,154 +255,6 @@ var makeEquivalence = (equivalence) => {
|
|
|
256
255
|
return (self, that) => is(self, that) && is(that, self);
|
|
257
256
|
};
|
|
258
257
|
|
|
259
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
|
|
260
|
-
var Clock = ClockRef;
|
|
261
|
-
var currentTimeMillis = currentTimeMillis2;
|
|
262
|
-
|
|
263
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
|
|
264
|
-
var BigInt2 = globalThis.BigInt;
|
|
265
|
-
var toNumber = (b) => {
|
|
266
|
-
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
267
|
-
return none();
|
|
268
|
-
}
|
|
269
|
-
return some(Number(b));
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
|
|
273
|
-
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
274
|
-
var bigint1 = /* @__PURE__ */ BigInt(1);
|
|
275
|
-
var decimalBase = /* @__PURE__ */ BigInt(1000);
|
|
276
|
-
var binaryBase = /* @__PURE__ */ BigInt(1024);
|
|
277
|
-
var decimalUnits = [{
|
|
278
|
-
symbol: "B",
|
|
279
|
-
factor: bigint1,
|
|
280
|
-
names: ["B", "byte", "bytes"]
|
|
281
|
-
}, {
|
|
282
|
-
symbol: "kB",
|
|
283
|
-
factor: decimalBase,
|
|
284
|
-
names: ["kB", "kilobyte", "kilobytes"]
|
|
285
|
-
}, {
|
|
286
|
-
symbol: "MB",
|
|
287
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(2),
|
|
288
|
-
names: ["MB", "megabyte", "megabytes"]
|
|
289
|
-
}, {
|
|
290
|
-
symbol: "GB",
|
|
291
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(3),
|
|
292
|
-
names: ["GB", "gigabyte", "gigabytes"]
|
|
293
|
-
}, {
|
|
294
|
-
symbol: "TB",
|
|
295
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(4),
|
|
296
|
-
names: ["TB", "terabyte", "terabytes"]
|
|
297
|
-
}, {
|
|
298
|
-
symbol: "PB",
|
|
299
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(5),
|
|
300
|
-
names: ["PB", "petabyte", "petabytes"]
|
|
301
|
-
}, {
|
|
302
|
-
symbol: "EB",
|
|
303
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(6),
|
|
304
|
-
names: ["EB", "exabyte", "exabytes"]
|
|
305
|
-
}, {
|
|
306
|
-
symbol: "ZB",
|
|
307
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(7),
|
|
308
|
-
names: ["ZB", "zettabyte", "zettabytes"]
|
|
309
|
-
}, {
|
|
310
|
-
symbol: "YB",
|
|
311
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(8),
|
|
312
|
-
names: ["YB", "yottabyte", "yottabytes"]
|
|
313
|
-
}, {
|
|
314
|
-
symbol: "RB",
|
|
315
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(9),
|
|
316
|
-
names: ["RB", "ronnabyte", "ronnabytes"]
|
|
317
|
-
}, {
|
|
318
|
-
symbol: "QB",
|
|
319
|
-
factor: decimalBase ** /* @__PURE__ */ BigInt(10),
|
|
320
|
-
names: ["QB", "quettabyte", "quettabytes"]
|
|
321
|
-
}];
|
|
322
|
-
var binaryUnits = [decimalUnits[0], {
|
|
323
|
-
symbol: "KiB",
|
|
324
|
-
factor: binaryBase,
|
|
325
|
-
names: ["KiB", "kibibyte", "kibibytes"]
|
|
326
|
-
}, {
|
|
327
|
-
symbol: "MiB",
|
|
328
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(2),
|
|
329
|
-
names: ["MiB", "mebibyte", "mebibytes"]
|
|
330
|
-
}, {
|
|
331
|
-
symbol: "GiB",
|
|
332
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(3),
|
|
333
|
-
names: ["GiB", "gibibyte", "gibibytes"]
|
|
334
|
-
}, {
|
|
335
|
-
symbol: "TiB",
|
|
336
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(4),
|
|
337
|
-
names: ["TiB", "tebibyte", "tebibytes"]
|
|
338
|
-
}, {
|
|
339
|
-
symbol: "PiB",
|
|
340
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(5),
|
|
341
|
-
names: ["PiB", "pebibyte", "pebibytes"]
|
|
342
|
-
}, {
|
|
343
|
-
symbol: "EiB",
|
|
344
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(6),
|
|
345
|
-
names: ["EiB", "exbibyte", "exbibytes"]
|
|
346
|
-
}, {
|
|
347
|
-
symbol: "ZiB",
|
|
348
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(7),
|
|
349
|
-
names: ["ZiB", "zebibyte", "zebibytes"]
|
|
350
|
-
}, {
|
|
351
|
-
symbol: "YiB",
|
|
352
|
-
factor: binaryBase ** /* @__PURE__ */ BigInt(8),
|
|
353
|
-
names: ["YiB", "yobibyte", "yobibytes"]
|
|
354
|
-
}];
|
|
355
|
-
var allUnits = [...decimalUnits, .../* @__PURE__ */ binaryUnits.slice(1)];
|
|
356
|
-
var unitsByName = /* @__PURE__ */ new Map(/* @__PURE__ */ allUnits.flatMap((unit) => unit.names.map((name) => [name, unit])));
|
|
357
|
-
var make = (value) => value;
|
|
358
|
-
var invalid = (message) => {
|
|
359
|
-
throw new Error(`Invalid ByteSize: ${message}`);
|
|
360
|
-
};
|
|
361
|
-
var fromNumber = (input) => {
|
|
362
|
-
if (!Number.isSafeInteger(input) || input < 0) {
|
|
363
|
-
return invalid(`expected a non-negative safe integer, received ${input}`);
|
|
364
|
-
}
|
|
365
|
-
return make(BigInt(input));
|
|
366
|
-
};
|
|
367
|
-
var maxSafeInteger = /* @__PURE__ */ BigInt(Number.MAX_SAFE_INTEGER);
|
|
368
|
-
var scaleDecimal = (quantity, factor) => {
|
|
369
|
-
const match = /^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(quantity);
|
|
370
|
-
if (match === null)
|
|
371
|
-
return;
|
|
372
|
-
const fraction = match[2] ?? "";
|
|
373
|
-
const numerator = BigInt(match[1] + fraction) * factor;
|
|
374
|
-
const shift = Number(match[3] ?? 0) - fraction.length;
|
|
375
|
-
if (shift >= 0)
|
|
376
|
-
return numerator * BigInt(10) ** BigInt(shift);
|
|
377
|
-
const scale = BigInt(10) ** BigInt(-shift);
|
|
378
|
-
return numerator % scale === bigint0 ? numerator / scale : undefined;
|
|
379
|
-
};
|
|
380
|
-
var fromStringUnsafe = (input) => {
|
|
381
|
-
const match = /^\s*(\d+(?:\.\d+)?)\s*([A-Za-z]+)\s*$/.exec(input);
|
|
382
|
-
if (match === null)
|
|
383
|
-
return invalid(`unsupported syntax ${JSON.stringify(input)}`);
|
|
384
|
-
const unit = unitsByName.get(match[2]);
|
|
385
|
-
if (unit === undefined)
|
|
386
|
-
return invalid(`unsupported unit ${JSON.stringify(match[2])}`);
|
|
387
|
-
const value = scaleDecimal(match[1], unit.factor);
|
|
388
|
-
if (value === undefined)
|
|
389
|
-
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
390
|
-
return make(value);
|
|
391
|
-
};
|
|
392
|
-
var fromInputUnsafe2 = (input) => {
|
|
393
|
-
switch (typeof input) {
|
|
394
|
-
case "bigint":
|
|
395
|
-
if (input < bigint0)
|
|
396
|
-
return invalid(`expected a non-negative bigint, received ${input}`);
|
|
397
|
-
return make(input);
|
|
398
|
-
case "number":
|
|
399
|
-
return fromNumber(input);
|
|
400
|
-
case "string":
|
|
401
|
-
return fromStringUnsafe(input);
|
|
402
|
-
}
|
|
403
|
-
return invalid(`unsupported input ${input}`);
|
|
404
|
-
};
|
|
405
|
-
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe2(value) : fromNumber(value);
|
|
406
|
-
|
|
407
258
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
408
259
|
var join = fiberJoin;
|
|
409
260
|
var interrupt = fiberInterrupt;
|
|
@@ -957,7 +808,7 @@ var isIgnorable = (error) => isMissing(error) || error.reason._tag === "Permissi
|
|
|
957
808
|
var isNotLink = (error) => isIgnorable(error) || error.reason._tag === "Unknown";
|
|
958
809
|
var DIRECTORY_CONCURRENCY = 16;
|
|
959
810
|
var byName = /* @__PURE__ */ mapInput(String3, (entry) => entry.name);
|
|
960
|
-
var
|
|
811
|
+
var make = (fs) => (pattern, options) => walk(fs, compile([pattern], options?.dot ?? false), options);
|
|
961
812
|
var walk = /* @__PURE__ */ fnUntraced(function* (fs, compiled, options) {
|
|
962
813
|
if (compiled.initial.size === 0) {
|
|
963
814
|
return [];
|
|
@@ -1135,7 +986,7 @@ var badArgument = (options) => new PlatformError(new BadArgument(options));
|
|
|
1135
986
|
|
|
1136
987
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Latch.js
|
|
1137
988
|
var makeUnsafe2 = makeLatchUnsafe;
|
|
1138
|
-
var
|
|
989
|
+
var make2 = makeLatch;
|
|
1139
990
|
|
|
1140
991
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableRef.js
|
|
1141
992
|
var TypeId2 = "~effect/MutableRef";
|
|
@@ -1161,7 +1012,7 @@ var set = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1161
1012
|
|
|
1162
1013
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/MutableList.js
|
|
1163
1014
|
var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
|
|
1164
|
-
var
|
|
1015
|
+
var make3 = () => ({
|
|
1165
1016
|
head: undefined,
|
|
1166
1017
|
tail: undefined,
|
|
1167
1018
|
length: 0
|
|
@@ -1310,8 +1161,8 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
|
|
|
1310
1161
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1311
1162
|
var TypeId3 = "~effect/PubSub";
|
|
1312
1163
|
var SubscriptionTypeId = "~effect/PubSub/Subscription";
|
|
1313
|
-
var
|
|
1314
|
-
var unbounded = (options) =>
|
|
1164
|
+
var make4 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
|
|
1165
|
+
var unbounded = (options) => make4({
|
|
1315
1166
|
atomicPubSub: () => makeAtomicUnbounded(options),
|
|
1316
1167
|
strategy: () => new DroppingStrategy
|
|
1317
1168
|
});
|
|
@@ -1405,7 +1256,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
|
|
|
1405
1256
|
subscribers.delete(subscription);
|
|
1406
1257
|
}
|
|
1407
1258
|
};
|
|
1408
|
-
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(),
|
|
1259
|
+
var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make3(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
|
|
1409
1260
|
class UnboundedPubSub {
|
|
1410
1261
|
publisherHead = {
|
|
1411
1262
|
value: AbsentValue,
|
|
@@ -1827,7 +1678,7 @@ var make8 = (options) => withFiber((fiber) => {
|
|
|
1827
1678
|
self.dispatcher = fiber.currentDispatcher;
|
|
1828
1679
|
self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
|
|
1829
1680
|
self.strategy = options?.strategy ?? "suspend";
|
|
1830
|
-
self.messages =
|
|
1681
|
+
self.messages = make3();
|
|
1831
1682
|
self.scheduleRunning = false;
|
|
1832
1683
|
self.state = {
|
|
1833
1684
|
_tag: "Open",
|
|
@@ -2519,7 +2370,7 @@ var mergeAll = /* @__PURE__ */ dual(2, (channels, {
|
|
|
2519
2370
|
}) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
2520
2371
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
2521
2372
|
const semaphore = switch_ ? undefined : makeUnsafe3(concurrencyN);
|
|
2522
|
-
const doneLatch = yield*
|
|
2373
|
+
const doneLatch = yield* make2(true);
|
|
2523
2374
|
const fibers = new Map;
|
|
2524
2375
|
const queue = yield* bounded(bufferSize);
|
|
2525
2376
|
yield* addFinalizer(forkedScope, shutdown(queue));
|
|
@@ -2863,7 +2714,7 @@ class RcRefImpl {
|
|
|
2863
2714
|
this.idleTimeToLive = idleTimeToLive;
|
|
2864
2715
|
}
|
|
2865
2716
|
}
|
|
2866
|
-
var
|
|
2717
|
+
var make5 = (options) => withFiber2((fiber) => {
|
|
2867
2718
|
const context = fiber.context;
|
|
2868
2719
|
const scope = get4(context, Scope);
|
|
2869
2720
|
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
@@ -2972,7 +2823,7 @@ var release = (self, state) => {
|
|
|
2972
2823
|
};
|
|
2973
2824
|
|
|
2974
2825
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2975
|
-
var make9 =
|
|
2826
|
+
var make9 = make5;
|
|
2976
2827
|
var get3 = get2;
|
|
2977
2828
|
|
|
2978
2829
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
@@ -3188,7 +3039,7 @@ var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
|
3188
3039
|
var make11 = (impl) => FileSystem.of({
|
|
3189
3040
|
...impl,
|
|
3190
3041
|
[TypeId10]: TypeId10,
|
|
3191
|
-
glob:
|
|
3042
|
+
glob: make(impl),
|
|
3192
3043
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
3193
3044
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
3194
3045
|
try: () => new TextDecoder(encoding).decode(_),
|
|
@@ -3320,7 +3171,7 @@ function makeProvider(load, mapInput) {
|
|
|
3320
3171
|
function makeSource(get, transform) {
|
|
3321
3172
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3322
3173
|
}
|
|
3323
|
-
function
|
|
3174
|
+
function make6(get) {
|
|
3324
3175
|
return makeSource(get, identityPath);
|
|
3325
3176
|
}
|
|
3326
3177
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3329,7 +3180,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3329
3180
|
function fromEnvRecord(env, options) {
|
|
3330
3181
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3331
3182
|
const trie = buildEnvTrie(env);
|
|
3332
|
-
return
|
|
3183
|
+
return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3333
3184
|
}
|
|
3334
3185
|
function fromEnv(options) {
|
|
3335
3186
|
const env = options?.env ?? {
|
|
@@ -3411,7 +3262,7 @@ var Proto2 = {
|
|
|
3411
3262
|
};
|
|
3412
3263
|
}
|
|
3413
3264
|
};
|
|
3414
|
-
function
|
|
3265
|
+
function make13(evaluator) {
|
|
3415
3266
|
const self = Object.create(Proto2);
|
|
3416
3267
|
self.evaluator = evaluator;
|
|
3417
3268
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3419,14 +3270,14 @@ function make14(evaluator) {
|
|
|
3419
3270
|
}
|
|
3420
3271
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3421
3272
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3422
|
-
return
|
|
3273
|
+
return make13((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3423
3274
|
});
|
|
3424
3275
|
function all(arg) {
|
|
3425
3276
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3426
|
-
return
|
|
3277
|
+
return make13((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));
|
|
3427
3278
|
}
|
|
3428
3279
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3429
|
-
return
|
|
3280
|
+
return make13((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3430
3281
|
});
|
|
3431
3282
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3432
3283
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3545,7 +3396,7 @@ function schema(codec, path) {
|
|
|
3545
3396
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3546
3397
|
const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
|
|
3547
3398
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3548
|
-
return
|
|
3399
|
+
return make13((provider, pathPrefix) => {
|
|
3549
3400
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3550
3401
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3551
3402
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3675,4 +3526,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3675
3526
|
...argv
|
|
3676
3527
|
];
|
|
3677
3528
|
|
|
3678
|
-
export { empty2, map, makeEquivalence,
|
|
3529
|
+
export { empty2, map, makeEquivalence, join, interrupt, interruptAll, 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, empty3, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, toPull, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, harnessesUnsupportedInDocker2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
|