@kitman-sh/cli 0.13.17 → 0.13.18
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-pbmadbfm.js → chunk-03hvwd6m.js} +14 -8
- package/dist/{chunk-ahvpwkyk.js → chunk-1cbnvby8.js} +2 -2
- package/dist/{chunk-4yca7e7x.js → chunk-39m1xtbk.js} +239 -100
- package/dist/{chunk-b5edh1jq.js → chunk-7m71m106.js} +32 -32
- package/dist/{chunk-8nzsyz74.js → chunk-827sgh31.js} +1 -1
- package/dist/{chunk-cbf0q15q.js → chunk-84xks8tn.js} +60 -14
- package/dist/{chunk-1cr225aq.js → chunk-940cc29s.js} +5 -5
- package/dist/{chunk-67xn3yer.js → chunk-a7ds2jqf.js} +10 -10
- package/dist/{chunk-80f0p6s7.js → chunk-bc8ytp0y.js} +308 -284
- package/dist/{chunk-syhs23yk.js → chunk-be2jf9m3.js} +10 -10
- package/dist/{chunk-efyrm6bv.js → chunk-dc0pcs3z.js} +1 -1
- package/dist/{chunk-643pxp2k.js → chunk-frjsv0ng.js} +4 -4
- package/dist/{chunk-g7ysb6ca.js → chunk-fv2v1sdc.js} +18 -18
- package/dist/{chunk-24h0y27w.js → chunk-gq7y5v3e.js} +1 -1
- package/dist/{chunk-0vv8cbye.js → chunk-gqy5shhk.js} +21 -21
- package/dist/{chunk-mmd7mjv0.js → chunk-gy9rf14f.js} +3 -3
- package/dist/{chunk-x20t7xy8.js → chunk-hakqpy8z.js} +26 -17
- package/dist/{chunk-pxvd8w2v.js → chunk-q5w3v4k1.js} +1 -1
- package/dist/{chunk-q4ra17vf.js → chunk-r1s1dcy0.js} +3 -3
- package/dist/{chunk-zcpnmgwb.js → chunk-rp4tn60z.js} +7 -7
- package/dist/{chunk-pvsg1ppc.js → chunk-vxc2cg5f.js} +9 -9
- package/dist/{chunk-ggmwpwhf.js → chunk-y1krmnbv.js} +2 -2
- package/dist/{chunk-pjq9bf3w.js → chunk-ynvzbgms.js} +4 -4
- package/dist/{chunk-gasqek3p.js → chunk-z1rve2hk.js} +6 -6
- package/dist/{chunk-zgraq2y3.js → chunk-zw3gf6r5.js} +28 -70
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
assignProperty,
|
|
39
39
|
PipeInspectableProto,
|
|
40
40
|
withFiber,
|
|
41
|
-
|
|
41
|
+
make14,
|
|
42
42
|
strictEqual,
|
|
43
43
|
Tuple,
|
|
44
44
|
Number2,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
Service2,
|
|
59
59
|
makeUnsafe4,
|
|
60
60
|
empty3,
|
|
61
|
-
|
|
61
|
+
make15,
|
|
62
62
|
add,
|
|
63
63
|
getOrUndefined2,
|
|
64
64
|
getOrUndefinedUnsafe,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
fail4,
|
|
92
92
|
isSuccess2,
|
|
93
93
|
makeUnsafe5,
|
|
94
|
-
|
|
94
|
+
make16,
|
|
95
95
|
_await,
|
|
96
96
|
fail5,
|
|
97
97
|
isDone,
|
|
@@ -194,9 +194,6 @@ import {
|
|
|
194
194
|
logError,
|
|
195
195
|
effectify,
|
|
196
196
|
decode,
|
|
197
|
-
isRedacted,
|
|
198
|
-
make16,
|
|
199
|
-
value,
|
|
200
197
|
defaultParseOptions,
|
|
201
198
|
omit,
|
|
202
199
|
map9,
|
|
@@ -265,17 +262,18 @@ import {
|
|
|
265
262
|
decodeJsonStringOption,
|
|
266
263
|
encodeJsonStringSync,
|
|
267
264
|
encodePrettyJsonString
|
|
268
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-zw3gf6r5.js";
|
|
269
266
|
import {
|
|
270
267
|
map,
|
|
271
268
|
makeEquivalence,
|
|
269
|
+
toNumber,
|
|
272
270
|
bytes,
|
|
273
271
|
BadArgument,
|
|
274
272
|
systemError,
|
|
275
273
|
badArgument,
|
|
276
274
|
makeUnsafe2,
|
|
277
|
-
make7,
|
|
278
275
|
make8,
|
|
276
|
+
make9,
|
|
279
277
|
sliding,
|
|
280
278
|
unbounded2,
|
|
281
279
|
offer,
|
|
@@ -291,13 +289,13 @@ import {
|
|
|
291
289
|
isSink,
|
|
292
290
|
fromChannel,
|
|
293
291
|
drain,
|
|
294
|
-
|
|
292
|
+
make10,
|
|
295
293
|
get3,
|
|
296
294
|
isStream,
|
|
297
295
|
fromChannel2,
|
|
298
296
|
callback,
|
|
299
297
|
empty2,
|
|
300
|
-
|
|
298
|
+
make11,
|
|
301
299
|
suspend,
|
|
302
300
|
fail2,
|
|
303
301
|
fromQueue,
|
|
@@ -323,16 +321,16 @@ import {
|
|
|
323
321
|
mkArrayBuffer,
|
|
324
322
|
toReadableStreamEffect,
|
|
325
323
|
FileSystem,
|
|
326
|
-
|
|
324
|
+
make12,
|
|
327
325
|
FileTypeId,
|
|
328
326
|
WatchBackend,
|
|
329
327
|
Path,
|
|
330
|
-
|
|
328
|
+
make13,
|
|
331
329
|
option,
|
|
332
330
|
String2,
|
|
333
331
|
optionalEnv,
|
|
334
332
|
harnessesUnsupportedInSrt2
|
|
335
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-hakqpy8z.js";
|
|
336
334
|
import {
|
|
337
335
|
isDateTime,
|
|
338
336
|
Numeric,
|
|
@@ -345,18 +343,21 @@ import {
|
|
|
345
343
|
SecretScope,
|
|
346
344
|
SecretHosts,
|
|
347
345
|
isSecretReference
|
|
348
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-q5w3v4k1.js";
|
|
349
347
|
import {
|
|
348
|
+
isRedacted,
|
|
349
|
+
make,
|
|
350
|
+
value,
|
|
350
351
|
ExitCode,
|
|
351
352
|
ProcessId,
|
|
352
353
|
makeHandle,
|
|
353
|
-
|
|
354
|
+
make2,
|
|
354
355
|
ChildProcessSpawner,
|
|
355
356
|
display,
|
|
356
|
-
|
|
357
|
+
make3,
|
|
357
358
|
parseFdName,
|
|
358
359
|
fdName
|
|
359
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-84xks8tn.js";
|
|
360
361
|
|
|
361
362
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
362
363
|
var makeEquivalence3 = Tuple;
|
|
@@ -519,7 +520,7 @@ var makeUnsafe6 = (input) => {
|
|
|
519
520
|
var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
|
|
520
521
|
var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
|
|
521
522
|
var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
|
|
522
|
-
var
|
|
523
|
+
var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
|
|
523
524
|
var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
|
|
524
525
|
var nowUnsafe = () => makeUtc(Date.now());
|
|
525
526
|
var toDateUtc = (self) => new Date(self.epochMilliseconds);
|
|
@@ -898,18 +899,9 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
|
|
|
898
899
|
// node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
|
|
899
900
|
var runMain = runMain2;
|
|
900
901
|
|
|
901
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
|
|
902
|
-
var BigInt2 = globalThis.BigInt;
|
|
903
|
-
var toNumber = (b) => {
|
|
904
|
-
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
905
|
-
return none();
|
|
906
|
-
}
|
|
907
|
-
return some(Number(b));
|
|
908
|
-
};
|
|
909
|
-
|
|
910
902
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
|
|
911
903
|
var makeUnsafe = makeUnsafe6;
|
|
912
|
-
var make18 =
|
|
904
|
+
var make18 = make4;
|
|
913
905
|
var now2 = now;
|
|
914
906
|
var nowUnsafe2 = nowUnsafe;
|
|
915
907
|
var toDateUtc2 = toDateUtc;
|
|
@@ -1124,7 +1116,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
1124
1116
|
const readable = options.readable;
|
|
1125
1117
|
const chunkSize = options.chunkSize ?? 4096;
|
|
1126
1118
|
const closeOnDone = options.closeOnDone ?? true;
|
|
1127
|
-
const exit = options.exit ??
|
|
1119
|
+
const exit = options.exit ?? make8(undefined);
|
|
1128
1120
|
const latch = options.latch ?? makeUnsafe2(false);
|
|
1129
1121
|
function onReadable() {
|
|
1130
1122
|
latch.openUnsafe();
|
|
@@ -1688,7 +1680,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1688
1680
|
const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
|
|
1689
1681
|
const toOption = options.to ?? "stdin";
|
|
1690
1682
|
if (toOption === "stdin") {
|
|
1691
|
-
handles.push(yield* spawnCommand(
|
|
1683
|
+
handles.push(yield* spawnCommand(make3(command.command, command.args, {
|
|
1692
1684
|
...command.options,
|
|
1693
1685
|
stdin: {
|
|
1694
1686
|
...stdinConfig,
|
|
@@ -1708,7 +1700,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1708
1700
|
type: "input",
|
|
1709
1701
|
stream: sourceStream
|
|
1710
1702
|
};
|
|
1711
|
-
handles.push(yield* spawnCommand(
|
|
1703
|
+
handles.push(yield* spawnCommand(make3(command.command, command.args, {
|
|
1712
1704
|
...command.options,
|
|
1713
1705
|
additionalFds: {
|
|
1714
1706
|
...existingFds,
|
|
@@ -1716,7 +1708,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1716
1708
|
}
|
|
1717
1709
|
})));
|
|
1718
1710
|
} else {
|
|
1719
|
-
handles.push(yield* spawnCommand(
|
|
1711
|
+
handles.push(yield* spawnCommand(make3(command.command, command.args, {
|
|
1720
1712
|
...command.options,
|
|
1721
1713
|
stdin: {
|
|
1722
1714
|
...stdinConfig,
|
|
@@ -1755,7 +1747,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1755
1747
|
}
|
|
1756
1748
|
}
|
|
1757
1749
|
});
|
|
1758
|
-
return
|
|
1750
|
+
return make2(spawnCommand);
|
|
1759
1751
|
});
|
|
1760
1752
|
var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
|
|
1761
1753
|
var flattenCommand = (command) => {
|
|
@@ -2241,7 +2233,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
|
2241
2233
|
resume(fail7(handleBadArgument("writeFile")(err)));
|
|
2242
2234
|
}
|
|
2243
2235
|
});
|
|
2244
|
-
var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) =>
|
|
2236
|
+
var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
|
|
2245
2237
|
access: access2,
|
|
2246
2238
|
chmod: chmod2,
|
|
2247
2239
|
chown: chown2,
|
|
@@ -2301,15 +2293,15 @@ var fileUrlOps = (windows) => ({
|
|
|
2301
2293
|
})
|
|
2302
2294
|
})
|
|
2303
2295
|
});
|
|
2304
|
-
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2296
|
+
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2305
2297
|
...NodePath.posix,
|
|
2306
2298
|
.../* @__PURE__ */ fileUrlOps(false)
|
|
2307
2299
|
}));
|
|
2308
|
-
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2300
|
+
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2309
2301
|
...NodePath.win32,
|
|
2310
2302
|
.../* @__PURE__ */ fileUrlOps(true)
|
|
2311
2303
|
}));
|
|
2312
|
-
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2304
|
+
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2313
2305
|
...NodePath,
|
|
2314
2306
|
.../* @__PURE__ */ fileUrlOps(undefined)
|
|
2315
2307
|
}));
|
|
@@ -2831,12 +2823,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
|
2831
2823
|
if (typeof key === "string") {
|
|
2832
2824
|
const k = key.toLowerCase();
|
|
2833
2825
|
if (k in self) {
|
|
2834
|
-
out[k] =
|
|
2826
|
+
out[k] = make(self[k]);
|
|
2835
2827
|
}
|
|
2836
2828
|
} else {
|
|
2837
2829
|
for (const name in self) {
|
|
2838
2830
|
if (name.search(key) !== -1) {
|
|
2839
|
-
out[name] =
|
|
2831
|
+
out[name] = make(self[name]);
|
|
2840
2832
|
}
|
|
2841
2833
|
}
|
|
2842
2834
|
}
|
|
@@ -2943,7 +2935,7 @@ var fromInputNested = (input) => {
|
|
|
2943
2935
|
return out;
|
|
2944
2936
|
};
|
|
2945
2937
|
var coerce = (value) => isRedacted(value) ? value : String(value);
|
|
2946
|
-
var Equivalence3 = /* @__PURE__ */
|
|
2938
|
+
var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
|
|
2947
2939
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
|
|
2948
2940
|
var empty4 = /* @__PURE__ */ make23([]);
|
|
2949
2941
|
var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
@@ -2962,7 +2954,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
|
2962
2954
|
var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
|
|
2963
2955
|
var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
2964
2956
|
const patterns = Array.isArray(key) ? key : [key];
|
|
2965
|
-
return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ?
|
|
2957
|
+
return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make(value) : value]);
|
|
2966
2958
|
});
|
|
2967
2959
|
var isRedactedName2 = isRedactedName;
|
|
2968
2960
|
var redactUrl = (url, redactedNames = currentRedactedNames()) => {
|
|
@@ -3038,7 +3030,7 @@ import * as readline from "readline";
|
|
|
3038
3030
|
var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
3039
3031
|
const stdin = process.stdin;
|
|
3040
3032
|
const stdout = process.stdout;
|
|
3041
|
-
const lines = yield*
|
|
3033
|
+
const lines = yield* make9();
|
|
3042
3034
|
let inputEnded = stdin.readableEnded;
|
|
3043
3035
|
let readlineActive = false;
|
|
3044
3036
|
const onStdinEnd = () => {
|
|
@@ -3049,7 +3041,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3049
3041
|
};
|
|
3050
3042
|
stdin.once("end", onStdinEnd);
|
|
3051
3043
|
yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
|
|
3052
|
-
const rlRef = yield*
|
|
3044
|
+
const rlRef = yield* make10({
|
|
3053
3045
|
acquire: acquireRelease(sync2(() => {
|
|
3054
3046
|
const rl = readline.createInterface({
|
|
3055
3047
|
input: stdin,
|
|
@@ -3088,7 +3080,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3088
3080
|
if (stdin.isTTY)
|
|
3089
3081
|
stdin.setRawMode(enabled);
|
|
3090
3082
|
});
|
|
3091
|
-
const rawModeRef = yield*
|
|
3083
|
+
const rawModeRef = yield* make10({
|
|
3092
3084
|
acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
|
|
3093
3085
|
idleTimeToLive: "10 millis"
|
|
3094
3086
|
});
|
|
@@ -3109,7 +3101,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3109
3101
|
return queue;
|
|
3110
3102
|
});
|
|
3111
3103
|
const readInput = gen(function* () {
|
|
3112
|
-
const queue = yield*
|
|
3104
|
+
const queue = yield* make9();
|
|
3113
3105
|
const handleKeypress = (s, k) => {
|
|
3114
3106
|
const userInput = {
|
|
3115
3107
|
input: fromUndefinedOr(s),
|
|
@@ -5638,6 +5630,188 @@ var TokenTotalCount = String4.check(isPattern(/^(?:0|[1-9][0-9]*)$/));
|
|
|
5638
5630
|
var TokenTotal = Struct({ input: TokenTotalCount, output: TokenTotalCount, cached: TokenTotalCount });
|
|
5639
5631
|
var tokenCountWords = (count) => BigInt(count).toLocaleString("en-US");
|
|
5640
5632
|
|
|
5633
|
+
// packages/core/src/test-report.ts
|
|
5634
|
+
var isTestReportName = (name) => /junit.*\.xml$/iu.test(name);
|
|
5635
|
+
var maxSkippedTests = 1e4;
|
|
5636
|
+
var maxRanDigests = 1e5;
|
|
5637
|
+
var TestId = String4.check(isMinLength(1), isMaxLength(1000));
|
|
5638
|
+
var maxFailedTests = 50;
|
|
5639
|
+
var maxFailedTestLength = 300;
|
|
5640
|
+
var FailedTests = ArraySchema(String4.check(isMinLength(1), isMaxLength(maxFailedTestLength))).check(isMaxLength(maxFailedTests));
|
|
5641
|
+
var EnvironmentFailure = Struct({
|
|
5642
|
+
failedTests: optionalKey(FailedTests),
|
|
5643
|
+
exitCode: optionalKey(Int),
|
|
5644
|
+
outputTail: optionalKey(String4.check(isMaxLength(8000))),
|
|
5645
|
+
retryFailedTests: optionalKey(FailedTests)
|
|
5646
|
+
});
|
|
5647
|
+
var CheckTests = Struct({
|
|
5648
|
+
reports: Int.check(isGreaterThanOrEqualTo(0)),
|
|
5649
|
+
passed: Int.check(isGreaterThanOrEqualTo(0)),
|
|
5650
|
+
failed: Int.check(isGreaterThanOrEqualTo(0)),
|
|
5651
|
+
skipped: Int.check(isGreaterThanOrEqualTo(0)),
|
|
5652
|
+
skippedTests: ArraySchema(TestId).check(isMaxLength(maxSkippedTests)),
|
|
5653
|
+
ranDigests: ArraySchema(String4.check(isMaxLength(16))).check(isMaxLength(maxRanDigests)),
|
|
5654
|
+
failedTests: optionalKey(FailedTests),
|
|
5655
|
+
environmentFailure: optionalKey(EnvironmentFailure),
|
|
5656
|
+
environmentJudged: optionalKey(Boolean2)
|
|
5657
|
+
});
|
|
5658
|
+
var entities = new Map([
|
|
5659
|
+
["amp", "&"],
|
|
5660
|
+
["lt", "<"],
|
|
5661
|
+
["gt", ">"],
|
|
5662
|
+
["quot", '"'],
|
|
5663
|
+
["apos", "'"]
|
|
5664
|
+
]);
|
|
5665
|
+
var codePoint = (whole, value) => value <= 1114111 ? String.fromCodePoint(value) : whole;
|
|
5666
|
+
var decoded = (text) => text.replaceAll(/&(#x[\da-f]+|#\d+|\w+);/giu, (whole, entity) => {
|
|
5667
|
+
if (entity.startsWith("#x") || entity.startsWith("#X"))
|
|
5668
|
+
return codePoint(whole, Number.parseInt(entity.slice(2), 16));
|
|
5669
|
+
if (entity.startsWith("#"))
|
|
5670
|
+
return codePoint(whole, Number(entity.slice(1)));
|
|
5671
|
+
return entities.get(entity) ?? whole;
|
|
5672
|
+
});
|
|
5673
|
+
var attribute = (attributes, name) => {
|
|
5674
|
+
const found = new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "u").exec(attributes);
|
|
5675
|
+
return found === null ? undefined : decoded(found[1] ?? found[2] ?? "");
|
|
5676
|
+
};
|
|
5677
|
+
var junitTestCases = (xml) => [...xml.matchAll(/<testcase\b([^>]*?)(?:\/>|>([\s\S]*?)<\/testcase>)/gu)].map(([, attributes = "", body = ""]) => {
|
|
5678
|
+
const id = [attribute(attributes, "file"), attribute(attributes, "classname"), attribute(attributes, "name")].filter((part) => part !== undefined && part !== "").join(" > ");
|
|
5679
|
+
return {
|
|
5680
|
+
id: id.slice(0, 1000) || "(unnamed test)",
|
|
5681
|
+
status: /<(?:failure|error)\b/u.test(body) ? "failed" : /<skipped\b/u.test(body) ? "skipped" : "passed"
|
|
5682
|
+
};
|
|
5683
|
+
});
|
|
5684
|
+
var fnv1a = (text, seed) => {
|
|
5685
|
+
let hash = seed;
|
|
5686
|
+
for (let index = 0;index < text.length; index++) {
|
|
5687
|
+
hash ^= text.charCodeAt(index);
|
|
5688
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
5689
|
+
}
|
|
5690
|
+
return hash.toString(16).padStart(8, "0");
|
|
5691
|
+
};
|
|
5692
|
+
var testDigest = (id) => `${fnv1a(id, 2166136261)}${fnv1a(id, 84696351)}`;
|
|
5693
|
+
var scriptPrefix = /^(?:[^|]{1,300} \| |\S+ [\w:.-]+: )/u;
|
|
5694
|
+
var failedTestLines = [
|
|
5695
|
+
/^\(fail\) (.+?)(?: \[[\d.]+ ?m?s\])?$/su,
|
|
5696
|
+
/^\u25CF (?=.+? \u203A .)(.+)$/su,
|
|
5697
|
+
/^FAILED (\S+?::(?:[^[]+?(?:\[.*?\])?|.+?))(?: - .*)?$/su,
|
|
5698
|
+
/^--- FAIL: (\S+)/u,
|
|
5699
|
+
/^test (.+) \.\.\. FAILED$/su,
|
|
5700
|
+
/^not ok \d+ (?:- )?(?!.*# (?:TODO|SKIP)\b)(.+)$/isu
|
|
5701
|
+
];
|
|
5702
|
+
var failedFileStart = String.raw`FAIL +(?:\|[^|]+\| *)?(?! )(?!\S*:\/\/)`;
|
|
5703
|
+
var afterPath = String.raw` > | \[ `;
|
|
5704
|
+
var failedFilePaths = [
|
|
5705
|
+
String.raw`\S*\.[A-Za-z]\w*(?=[\s:]|$)`,
|
|
5706
|
+
String.raw`(?=\S*[A-Za-z])(?=\S*\/)\S+(?=${afterPath}|$)`,
|
|
5707
|
+
String.raw`(?:(?!${afterPath}).)*\.[A-Za-z]\w*(?=${afterPath})`,
|
|
5708
|
+
String.raw`(?=\S*\/)(?:(?!${afterPath}).)*\.[A-Za-z]\w*$`,
|
|
5709
|
+
String.raw`(?=.*(?:\.(?:test|spec)\.|\b__tests__\/))(?:(?!${afterPath}).)*\.[cm]?[jt]sx?$`
|
|
5710
|
+
];
|
|
5711
|
+
var failedFileLine = new RegExp(`^${failedFileStart}((?:${failedFilePaths.join("|")}).*)$`, "su");
|
|
5712
|
+
var jestFileStats = /^((?:(?! > ).)*) \((?:[\d.]+ m?s(?:, \d+ MB heap size)?|\d+ MB heap size)\)$/su;
|
|
5713
|
+
var isPathOf = (file, path) => `/${file}`.endsWith(`/${path.replace(/^(?:\.\.\/)+/u, "")}`);
|
|
5714
|
+
var withoutRepeatedPath = (name) => (name.endsWith(" ]") ? [...name.matchAll(/ \[ /gu)] : []).map(({ index }) => name.slice(0, index)).find((path) => isPathOf(name.slice(path.length + 3, -2), path)) ?? name;
|
|
5715
|
+
var paddedLabels = /^FAIL {2}(?:\|[^|]+\| )?(?: \S+(?: \S+)* {2})+/u;
|
|
5716
|
+
var failedFileTest = (text) => {
|
|
5717
|
+
const name = failedFileLine.exec(text.replace(paddedLabels, "FAIL ").replace(jestFileStats, "$1"))?.[1];
|
|
5718
|
+
return name === undefined ? undefined : withoutRepeatedPath(name);
|
|
5719
|
+
};
|
|
5720
|
+
var maxLineLength = 1000;
|
|
5721
|
+
var ansiColours = /\u001B\[[\d;]*m/gu;
|
|
5722
|
+
var failedTestOfLine = (line) => {
|
|
5723
|
+
const printed = line.slice(0, maxLineLength).replaceAll(ansiColours, "");
|
|
5724
|
+
const unprefixed = printed.replace(scriptPrefix, "");
|
|
5725
|
+
return [printed, unprefixed, unprefixed.replace(scriptPrefix, "")].map((text) => text.trim()).flatMap((text) => [failedFileTest(text), ...failedTestLines.map((pattern) => pattern.exec(text)?.[1]?.trim())]).find((name) => name !== undefined && name !== "");
|
|
5726
|
+
};
|
|
5727
|
+
var namedTest = (name) => {
|
|
5728
|
+
const at = name.indexOf(" > ");
|
|
5729
|
+
return at === -1 ? { name, file: name, path: "" } : { name, file: name.slice(0, at), path: name.slice(at + 3) };
|
|
5730
|
+
};
|
|
5731
|
+
var reportedTest = (name) => {
|
|
5732
|
+
const test = namedTest(name);
|
|
5733
|
+
return test.path !== "" && isPathOf(test.file, test.path) ? namedTest(test.file) : test;
|
|
5734
|
+
};
|
|
5735
|
+
var byPath = (tests) => {
|
|
5736
|
+
const grouped = new Map;
|
|
5737
|
+
for (const test of tests) {
|
|
5738
|
+
const found = grouped.get(test.path);
|
|
5739
|
+
if (found === undefined)
|
|
5740
|
+
grouped.set(test.path, [test]);
|
|
5741
|
+
else
|
|
5742
|
+
found.push(test);
|
|
5743
|
+
}
|
|
5744
|
+
return grouped;
|
|
5745
|
+
};
|
|
5746
|
+
var holds = (tests, test) => (tests.get(test.path) ?? []).some(({ file }) => isPathOf(file, test.file) || isPathOf(test.file, file));
|
|
5747
|
+
var attempt = String.raw`(?:\d+ times in )?(?:initial run|\d+[a-z]{2} (?:retry(?: of \d+[a-z]{2} repeat)?|repeat))`;
|
|
5748
|
+
var vitestAttempts = new RegExp(String.raw` \(${attempt}(?:, ${attempt})*\)$`, "u");
|
|
5749
|
+
var vitestTimes = / \(\d+ times\)$/u;
|
|
5750
|
+
var printedTest = (reports) => (name) => {
|
|
5751
|
+
const whole = namedTest(name);
|
|
5752
|
+
const attempted = /[./]/u.test(whole.file) ? namedTest(name.replace(vitestAttempts, "")) : whole;
|
|
5753
|
+
return [whole, attempted, namedTest(name.replace(vitestTimes, ""))].find((test) => holds(reports, test)) ?? attempted;
|
|
5754
|
+
};
|
|
5755
|
+
var namesWithoutFile = ({ path }) => {
|
|
5756
|
+
const parts = path.split(" > ");
|
|
5757
|
+
return [path, [...parts.slice(0, -1).reverse(), ...parts.slice(-1)].join(" > ")];
|
|
5758
|
+
};
|
|
5759
|
+
var spaced = (name) => name.replaceAll(/ [>\u203A] /gu, " ");
|
|
5760
|
+
var reportedForms = ({ name, path }) => [name, path].map((text) => [text, namedTest(text)]).map(([text, test]) => test.file === test.path ? test.file : text).flatMap((text) => [spaced(text), text.replace(" > ", ".")]);
|
|
5761
|
+
var printedForm = (name) => {
|
|
5762
|
+
if (name.includes(" \u203A "))
|
|
5763
|
+
return spaced(name);
|
|
5764
|
+
const [, file, names, rest] = /^(\S+?)\.py::([^[]*)(.*)$/su.exec(name) ?? [];
|
|
5765
|
+
return file === undefined || names === undefined ? undefined : `${file.replaceAll("/", ".")}.${names.replaceAll("::", ".")}${rest ?? ""}`;
|
|
5766
|
+
};
|
|
5767
|
+
var unreportedPrints = (reported, printed) => {
|
|
5768
|
+
const reports = [...new Set(reported)].map(reportedTest);
|
|
5769
|
+
const reportsByPath = byPath(reports);
|
|
5770
|
+
const prints = [...new Set(printed)].map(printedTest(reportsByPath));
|
|
5771
|
+
const printsByPath = byPath(prints);
|
|
5772
|
+
const unprinted = reports.filter((test) => !holds(printsByPath, test));
|
|
5773
|
+
const namedWithoutFile = new Set(unprinted.flatMap(namesWithoutFile));
|
|
5774
|
+
const namedInForm = new Set(unprinted.flatMap(reportedForms));
|
|
5775
|
+
const unreported = prints.filter((test) => !holds(reportsByPath, test) && !namedWithoutFile.has(test.name) && !namedInForm.has(printedForm(test.name)));
|
|
5776
|
+
return { reports, unreported };
|
|
5777
|
+
};
|
|
5778
|
+
var printedNotReported = (reported, printed) => unreportedPrints(reported, printed).unreported.map((test) => test.name);
|
|
5779
|
+
var failedTestsOf = (reported, printed) => {
|
|
5780
|
+
const { reports, unreported } = unreportedPrints(reported, printed);
|
|
5781
|
+
const named = new Set;
|
|
5782
|
+
for (const { name } of [...reports, ...unreported]) {
|
|
5783
|
+
if (named.size === maxFailedTests)
|
|
5784
|
+
break;
|
|
5785
|
+
named.add(redactCredentials(name).slice(0, maxFailedTestLength));
|
|
5786
|
+
}
|
|
5787
|
+
return [...named];
|
|
5788
|
+
};
|
|
5789
|
+
var testOutcomes = (reports) => {
|
|
5790
|
+
const rank = { passed: 0, skipped: 1, failed: 2 };
|
|
5791
|
+
const tests = new Map;
|
|
5792
|
+
for (const found of reports.flatMap(junitTestCases)) {
|
|
5793
|
+
const before = tests.get(found.id);
|
|
5794
|
+
if (before === undefined || rank[found.status] > rank[before])
|
|
5795
|
+
tests.set(found.id, found.status);
|
|
5796
|
+
}
|
|
5797
|
+
return tests;
|
|
5798
|
+
};
|
|
5799
|
+
var checkTests = (reports, printed = []) => {
|
|
5800
|
+
const tests = testOutcomes(reports);
|
|
5801
|
+
const of = (status) => [...tests].flatMap(([id, is]) => is === status ? [id] : []);
|
|
5802
|
+
const skipped = of("skipped").sort();
|
|
5803
|
+
const failedTests = failedTestsOf(of("failed"), printed);
|
|
5804
|
+
return {
|
|
5805
|
+
reports: reports.length,
|
|
5806
|
+
passed: of("passed").length,
|
|
5807
|
+
failed: of("failed").length,
|
|
5808
|
+
skipped: skipped.length,
|
|
5809
|
+
skippedTests: skipped.slice(0, maxSkippedTests),
|
|
5810
|
+
ranDigests: [...of("passed"), ...of("failed")].map(testDigest).sort().slice(0, maxRanDigests),
|
|
5811
|
+
...failedTests.length === 0 ? undefined : { failedTests }
|
|
5812
|
+
};
|
|
5813
|
+
};
|
|
5814
|
+
|
|
5641
5815
|
// packages/core/src/loop.ts
|
|
5642
5816
|
var LoopStatuses = ["draft", "active", "disabled", "archived"];
|
|
5643
5817
|
var LoopStepImplementationKinds = [
|
|
@@ -6208,6 +6382,7 @@ var RunEvidence = Struct({
|
|
|
6208
6382
|
failedTests: optionalKey(ArraySchema(String4)),
|
|
6209
6383
|
skippedSinceBaseline: optionalKey(ArraySchema(String4)),
|
|
6210
6384
|
newNotRun: optionalKey(ArraySchema(String4)),
|
|
6385
|
+
environmentFailure: optionalKey(EnvironmentFailure),
|
|
6211
6386
|
recordedAt: Timestamp
|
|
6212
6387
|
});
|
|
6213
6388
|
var ApprovedVerification = Struct({
|
|
@@ -6777,170 +6952,6 @@ var RunActionSummary = Struct({
|
|
|
6777
6952
|
var RunActionList = Struct({ items: ArraySchema(RunActionSummary) });
|
|
6778
6953
|
var RunActionTaken = Struct({ action: String4, run: Run });
|
|
6779
6954
|
|
|
6780
|
-
// packages/core/src/test-report.ts
|
|
6781
|
-
var isTestReportName = (name) => /junit.*\.xml$/iu.test(name);
|
|
6782
|
-
var maxSkippedTests = 1e4;
|
|
6783
|
-
var maxRanDigests = 1e5;
|
|
6784
|
-
var TestId = String4.check(isMinLength(1), isMaxLength(1000));
|
|
6785
|
-
var maxFailedTests = 50;
|
|
6786
|
-
var maxFailedTestLength = 300;
|
|
6787
|
-
var CheckTests = Struct({
|
|
6788
|
-
reports: Int.check(isGreaterThanOrEqualTo(0)),
|
|
6789
|
-
passed: Int.check(isGreaterThanOrEqualTo(0)),
|
|
6790
|
-
failed: Int.check(isGreaterThanOrEqualTo(0)),
|
|
6791
|
-
skipped: Int.check(isGreaterThanOrEqualTo(0)),
|
|
6792
|
-
skippedTests: ArraySchema(TestId).check(isMaxLength(maxSkippedTests)),
|
|
6793
|
-
ranDigests: ArraySchema(String4.check(isMaxLength(16))).check(isMaxLength(maxRanDigests)),
|
|
6794
|
-
failedTests: optionalKey(ArraySchema(String4.check(isMinLength(1), isMaxLength(maxFailedTestLength))).check(isMaxLength(maxFailedTests)))
|
|
6795
|
-
});
|
|
6796
|
-
var entities = new Map([
|
|
6797
|
-
["amp", "&"],
|
|
6798
|
-
["lt", "<"],
|
|
6799
|
-
["gt", ">"],
|
|
6800
|
-
["quot", '"'],
|
|
6801
|
-
["apos", "'"]
|
|
6802
|
-
]);
|
|
6803
|
-
var codePoint = (whole, value) => value <= 1114111 ? String.fromCodePoint(value) : whole;
|
|
6804
|
-
var decoded = (text) => text.replaceAll(/&(#x[\da-f]+|#\d+|\w+);/giu, (whole, entity) => {
|
|
6805
|
-
if (entity.startsWith("#x") || entity.startsWith("#X"))
|
|
6806
|
-
return codePoint(whole, Number.parseInt(entity.slice(2), 16));
|
|
6807
|
-
if (entity.startsWith("#"))
|
|
6808
|
-
return codePoint(whole, Number(entity.slice(1)));
|
|
6809
|
-
return entities.get(entity) ?? whole;
|
|
6810
|
-
});
|
|
6811
|
-
var attribute = (attributes, name) => {
|
|
6812
|
-
const found = new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "u").exec(attributes);
|
|
6813
|
-
return found === null ? undefined : decoded(found[1] ?? found[2] ?? "");
|
|
6814
|
-
};
|
|
6815
|
-
var junitTestCases = (xml) => [...xml.matchAll(/<testcase\b([^>]*?)(?:\/>|>([\s\S]*?)<\/testcase>)/gu)].map(([, attributes = "", body = ""]) => {
|
|
6816
|
-
const id = [attribute(attributes, "file"), attribute(attributes, "classname"), attribute(attributes, "name")].filter((part) => part !== undefined && part !== "").join(" > ");
|
|
6817
|
-
return {
|
|
6818
|
-
id: id.slice(0, 1000) || "(unnamed test)",
|
|
6819
|
-
status: /<(?:failure|error)\b/u.test(body) ? "failed" : /<skipped\b/u.test(body) ? "skipped" : "passed"
|
|
6820
|
-
};
|
|
6821
|
-
});
|
|
6822
|
-
var fnv1a = (text, seed) => {
|
|
6823
|
-
let hash = seed;
|
|
6824
|
-
for (let index = 0;index < text.length; index++) {
|
|
6825
|
-
hash ^= text.charCodeAt(index);
|
|
6826
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
6827
|
-
}
|
|
6828
|
-
return hash.toString(16).padStart(8, "0");
|
|
6829
|
-
};
|
|
6830
|
-
var testDigest = (id) => `${fnv1a(id, 2166136261)}${fnv1a(id, 84696351)}`;
|
|
6831
|
-
var scriptPrefix = /^(?:[^|]{1,300} \| |\S+ [\w:.-]+: )/u;
|
|
6832
|
-
var failedTestLines = [
|
|
6833
|
-
/^\(fail\) (.+?)(?: \[[\d.]+ ?m?s\])?$/su,
|
|
6834
|
-
/^\u25CF (?=.+? \u203A .)(.+)$/su,
|
|
6835
|
-
/^FAILED (\S+?::(?:[^[]+?(?:\[.*?\])?|.+?))(?: - .*)?$/su,
|
|
6836
|
-
/^--- FAIL: (\S+)/u,
|
|
6837
|
-
/^test (.+) \.\.\. FAILED$/su,
|
|
6838
|
-
/^not ok \d+ (?:- )?(?!.*# (?:TODO|SKIP)\b)(.+)$/isu
|
|
6839
|
-
];
|
|
6840
|
-
var failedFileStart = String.raw`FAIL +(?:\|[^|]+\| *)?(?! )(?!\S*:\/\/)`;
|
|
6841
|
-
var afterPath = String.raw` > | \[ `;
|
|
6842
|
-
var failedFilePaths = [
|
|
6843
|
-
String.raw`\S*\.[A-Za-z]\w*(?=[\s:]|$)`,
|
|
6844
|
-
String.raw`(?=\S*[A-Za-z])(?=\S*\/)\S+(?=${afterPath}|$)`,
|
|
6845
|
-
String.raw`(?:(?!${afterPath}).)*\.[A-Za-z]\w*(?=${afterPath})`,
|
|
6846
|
-
String.raw`(?=\S*\/)(?:(?!${afterPath}).)*\.[A-Za-z]\w*$`,
|
|
6847
|
-
String.raw`(?=.*(?:\.(?:test|spec)\.|\b__tests__\/))(?:(?!${afterPath}).)*\.[cm]?[jt]sx?$`
|
|
6848
|
-
];
|
|
6849
|
-
var failedFileLine = new RegExp(`^${failedFileStart}((?:${failedFilePaths.join("|")}).*)$`, "su");
|
|
6850
|
-
var jestFileStats = /^((?:(?! > ).)*) \((?:[\d.]+ m?s(?:, \d+ MB heap size)?|\d+ MB heap size)\)$/su;
|
|
6851
|
-
var isPathOf = (file, path) => `/${file}`.endsWith(`/${path.replace(/^(?:\.\.\/)+/u, "")}`);
|
|
6852
|
-
var withoutRepeatedPath = (name) => (name.endsWith(" ]") ? [...name.matchAll(/ \[ /gu)] : []).map(({ index }) => name.slice(0, index)).find((path) => isPathOf(name.slice(path.length + 3, -2), path)) ?? name;
|
|
6853
|
-
var paddedLabels = /^FAIL {2}(?:\|[^|]+\| )?(?: \S+(?: \S+)* {2})+/u;
|
|
6854
|
-
var failedFileTest = (text) => {
|
|
6855
|
-
const name = failedFileLine.exec(text.replace(paddedLabels, "FAIL ").replace(jestFileStats, "$1"))?.[1];
|
|
6856
|
-
return name === undefined ? undefined : withoutRepeatedPath(name);
|
|
6857
|
-
};
|
|
6858
|
-
var maxLineLength = 1000;
|
|
6859
|
-
var ansiColours = /\u001B\[[\d;]*m/gu;
|
|
6860
|
-
var failedTestOfLine = (line) => {
|
|
6861
|
-
const printed = line.slice(0, maxLineLength).replaceAll(ansiColours, "");
|
|
6862
|
-
const unprefixed = printed.replace(scriptPrefix, "");
|
|
6863
|
-
return [printed, unprefixed, unprefixed.replace(scriptPrefix, "")].map((text) => text.trim()).flatMap((text) => [failedFileTest(text), ...failedTestLines.map((pattern) => pattern.exec(text)?.[1]?.trim())]).find((name) => name !== undefined && name !== "");
|
|
6864
|
-
};
|
|
6865
|
-
var namedTest = (name) => {
|
|
6866
|
-
const at = name.indexOf(" > ");
|
|
6867
|
-
return at === -1 ? { name, file: name, path: "" } : { name, file: name.slice(0, at), path: name.slice(at + 3) };
|
|
6868
|
-
};
|
|
6869
|
-
var reportedTest = (name) => {
|
|
6870
|
-
const test = namedTest(name);
|
|
6871
|
-
return test.path !== "" && isPathOf(test.file, test.path) ? namedTest(test.file) : test;
|
|
6872
|
-
};
|
|
6873
|
-
var byPath = (tests) => {
|
|
6874
|
-
const grouped = new Map;
|
|
6875
|
-
for (const test of tests) {
|
|
6876
|
-
const found = grouped.get(test.path);
|
|
6877
|
-
if (found === undefined)
|
|
6878
|
-
grouped.set(test.path, [test]);
|
|
6879
|
-
else
|
|
6880
|
-
found.push(test);
|
|
6881
|
-
}
|
|
6882
|
-
return grouped;
|
|
6883
|
-
};
|
|
6884
|
-
var holds = (tests, test) => (tests.get(test.path) ?? []).some(({ file }) => isPathOf(file, test.file) || isPathOf(test.file, file));
|
|
6885
|
-
var attempt = String.raw`(?:\d+ times in )?(?:initial run|\d+[a-z]{2} (?:retry(?: of \d+[a-z]{2} repeat)?|repeat))`;
|
|
6886
|
-
var vitestAttempts = new RegExp(String.raw` \(${attempt}(?:, ${attempt})*\)$`, "u");
|
|
6887
|
-
var vitestTimes = / \(\d+ times\)$/u;
|
|
6888
|
-
var printedTest = (reports) => (name) => {
|
|
6889
|
-
const whole = namedTest(name);
|
|
6890
|
-
const attempted = /[./]/u.test(whole.file) ? namedTest(name.replace(vitestAttempts, "")) : whole;
|
|
6891
|
-
return [whole, attempted, namedTest(name.replace(vitestTimes, ""))].find((test) => holds(reports, test)) ?? attempted;
|
|
6892
|
-
};
|
|
6893
|
-
var namesWithoutFile = ({ path }) => {
|
|
6894
|
-
const parts = path.split(" > ");
|
|
6895
|
-
return [path, [...parts.slice(0, -1).reverse(), ...parts.slice(-1)].join(" > ")];
|
|
6896
|
-
};
|
|
6897
|
-
var spaced = (name) => name.replaceAll(/ [>\u203A] /gu, " ");
|
|
6898
|
-
var reportedForms = ({ name, path }) => [name, path].map((text) => [text, namedTest(text)]).map(([text, test]) => test.file === test.path ? test.file : text).flatMap((text) => [spaced(text), text.replace(" > ", ".")]);
|
|
6899
|
-
var printedForm = (name) => {
|
|
6900
|
-
if (name.includes(" \u203A "))
|
|
6901
|
-
return spaced(name);
|
|
6902
|
-
const [, file, names, rest] = /^(\S+?)\.py::([^[]*)(.*)$/su.exec(name) ?? [];
|
|
6903
|
-
return file === undefined || names === undefined ? undefined : `${file.replaceAll("/", ".")}.${names.replaceAll("::", ".")}${rest ?? ""}`;
|
|
6904
|
-
};
|
|
6905
|
-
var failedTestsOf = (reported, printed) => {
|
|
6906
|
-
const reports = [...new Set(reported)].map(reportedTest);
|
|
6907
|
-
const reportsByPath = byPath(reports);
|
|
6908
|
-
const prints = [...new Set(printed)].map(printedTest(reportsByPath));
|
|
6909
|
-
const printsByPath = byPath(prints);
|
|
6910
|
-
const unprinted = reports.filter((test) => !holds(printsByPath, test));
|
|
6911
|
-
const namedWithoutFile = new Set(unprinted.flatMap(namesWithoutFile));
|
|
6912
|
-
const namedInForm = new Set(unprinted.flatMap(reportedForms));
|
|
6913
|
-
const unreported = prints.filter((test) => !holds(reportsByPath, test) && !namedWithoutFile.has(test.name) && !namedInForm.has(printedForm(test.name)));
|
|
6914
|
-
const named = new Set;
|
|
6915
|
-
for (const { name } of [...reports, ...unreported]) {
|
|
6916
|
-
if (named.size === maxFailedTests)
|
|
6917
|
-
break;
|
|
6918
|
-
named.add(redactCredentials(name).slice(0, maxFailedTestLength));
|
|
6919
|
-
}
|
|
6920
|
-
return [...named];
|
|
6921
|
-
};
|
|
6922
|
-
var checkTests = (reports, printed = []) => {
|
|
6923
|
-
const rank = { passed: 0, skipped: 1, failed: 2 };
|
|
6924
|
-
const tests = new Map;
|
|
6925
|
-
for (const found of reports.flatMap(junitTestCases)) {
|
|
6926
|
-
const before = tests.get(found.id);
|
|
6927
|
-
if (before === undefined || rank[found.status] > rank[before])
|
|
6928
|
-
tests.set(found.id, found.status);
|
|
6929
|
-
}
|
|
6930
|
-
const of = (status) => [...tests].flatMap(([id, is]) => is === status ? [id] : []);
|
|
6931
|
-
const skipped = of("skipped").sort();
|
|
6932
|
-
const failedTests = failedTestsOf(of("failed"), printed);
|
|
6933
|
-
return {
|
|
6934
|
-
reports: reports.length,
|
|
6935
|
-
passed: of("passed").length,
|
|
6936
|
-
failed: of("failed").length,
|
|
6937
|
-
skipped: skipped.length,
|
|
6938
|
-
skippedTests: skipped.slice(0, maxSkippedTests),
|
|
6939
|
-
ranDigests: [...of("passed"), ...of("failed")].map(testDigest).sort().slice(0, maxRanDigests),
|
|
6940
|
-
...failedTests.length === 0 ? undefined : { failedTests }
|
|
6941
|
-
};
|
|
6942
|
-
};
|
|
6943
|
-
|
|
6944
6955
|
// packages/core/src/work-unit.ts
|
|
6945
6956
|
var WorkUnitLease = Struct({
|
|
6946
6957
|
leaseOwnerId: Id,
|
|
@@ -10104,14 +10115,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
|
|
|
10104
10115
|
return self;
|
|
10105
10116
|
}
|
|
10106
10117
|
var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
|
|
10107
|
-
var
|
|
10118
|
+
var make5 = (method) => (url, options) => modify(empty6, {
|
|
10108
10119
|
method,
|
|
10109
10120
|
url,
|
|
10110
10121
|
...options ?? undefined
|
|
10111
10122
|
});
|
|
10112
|
-
var get = /* @__PURE__ */
|
|
10113
|
-
var post = /* @__PURE__ */
|
|
10114
|
-
var put = /* @__PURE__ */
|
|
10123
|
+
var get = /* @__PURE__ */ make5("GET");
|
|
10124
|
+
var post = /* @__PURE__ */ make5("POST");
|
|
10125
|
+
var put = /* @__PURE__ */ make5("PUT");
|
|
10115
10126
|
var modify = /* @__PURE__ */ dual(2, (self, options) => {
|
|
10116
10127
|
let result = self;
|
|
10117
10128
|
if (options.method) {
|
|
@@ -10412,7 +10423,7 @@ var Proto7 = {
|
|
|
10412
10423
|
};
|
|
10413
10424
|
},
|
|
10414
10425
|
.../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
|
|
10415
|
-
return this.execute(
|
|
10426
|
+
return this.execute(make5(fullMethod)(url, options));
|
|
10416
10427
|
}]))
|
|
10417
10428
|
};
|
|
10418
10429
|
var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
|
|
@@ -14136,7 +14147,7 @@ var makeProto = (options) => {
|
|
|
14136
14147
|
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
14137
14148
|
return Rpc;
|
|
14138
14149
|
};
|
|
14139
|
-
var
|
|
14150
|
+
var make6 = (tag, options) => {
|
|
14140
14151
|
const successSchema = options?.success ?? Void;
|
|
14141
14152
|
const errorSchema = options?.error ?? Never;
|
|
14142
14153
|
const defectSchema = options?.defect ?? Defect();
|
|
@@ -14347,7 +14358,7 @@ var RpcGroupProto = {
|
|
|
14347
14358
|
});
|
|
14348
14359
|
},
|
|
14349
14360
|
annotateRpcs(service, value) {
|
|
14350
|
-
return this.annotateRpcsMerge(
|
|
14361
|
+
return this.annotateRpcsMerge(make15(service, value));
|
|
14351
14362
|
},
|
|
14352
14363
|
annotateMerge(context) {
|
|
14353
14364
|
return makeProto2({
|
|
@@ -14370,7 +14381,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
14370
14381
|
requests: options.requests,
|
|
14371
14382
|
annotations: options.annotations
|
|
14372
14383
|
});
|
|
14373
|
-
var
|
|
14384
|
+
var make7 = (...rpcs) => makeProto2({
|
|
14374
14385
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
14375
14386
|
annotations: empty3()
|
|
14376
14387
|
});
|
|
@@ -14476,96 +14487,101 @@ var ProgramOutcome = Union([
|
|
|
14476
14487
|
Struct({ status: Literal("failed"), failureSummary: String4 })
|
|
14477
14488
|
]);
|
|
14478
14489
|
|
|
14479
|
-
class RunnerReplicaRpcs extends make6(
|
|
14490
|
+
class RunnerReplicaRpcs extends make7(make6("Claim", {
|
|
14480
14491
|
payload: WorkUnitClaimInput,
|
|
14481
14492
|
success: WorkUnitClaimResult,
|
|
14482
14493
|
error: RunnerRpcError
|
|
14483
|
-
}),
|
|
14494
|
+
}), make6("Heartbeat", {
|
|
14484
14495
|
payload: WorkUnitHeartbeatInput,
|
|
14485
14496
|
success: WorkUnitHeartbeatResult,
|
|
14486
14497
|
error: RunnerRpcError
|
|
14487
|
-
}),
|
|
14498
|
+
}), make6("Complete", {
|
|
14488
14499
|
payload: WorkUnitCompletion,
|
|
14489
14500
|
error: RunnerRpcError
|
|
14490
|
-
}),
|
|
14501
|
+
}), make6("Release", {
|
|
14491
14502
|
payload: WorkUnitReleaseInput,
|
|
14492
14503
|
error: RunnerRpcError
|
|
14493
|
-
}),
|
|
14504
|
+
}), make6("Signals", {
|
|
14494
14505
|
payload: { runnerReplicaId: String4 },
|
|
14495
14506
|
success: RunnerSignal,
|
|
14496
14507
|
error: RunnerRpcError,
|
|
14497
14508
|
stream: true
|
|
14498
|
-
}),
|
|
14509
|
+
}), make6("ReportSteer", {
|
|
14499
14510
|
payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
|
|
14500
14511
|
success: Void,
|
|
14501
14512
|
error: RunnerRpcError
|
|
14502
|
-
}),
|
|
14513
|
+
}), make6("AppendTranscript", {
|
|
14503
14514
|
payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
|
|
14504
14515
|
success: Void,
|
|
14505
14516
|
error: RunnerRpcError
|
|
14506
|
-
}),
|
|
14517
|
+
}), make6("CreateCheckpointFile", {
|
|
14507
14518
|
payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
|
|
14508
14519
|
success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
|
|
14509
14520
|
error: Union([RunnerRpcError, RunFileRefused])
|
|
14510
|
-
}),
|
|
14521
|
+
}), make6("CheckpointFileParts", {
|
|
14511
14522
|
payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
|
|
14512
14523
|
success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
|
|
14513
14524
|
error: RunnerRpcError
|
|
14514
|
-
}),
|
|
14525
|
+
}), make6("CompleteCheckpointFile", {
|
|
14515
14526
|
payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
|
|
14516
14527
|
success: RunFileRecord,
|
|
14517
14528
|
error: RunnerRpcError
|
|
14518
|
-
}),
|
|
14529
|
+
}), make6("SaveCheckpoint", {
|
|
14519
14530
|
payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
|
|
14520
14531
|
success: Void,
|
|
14521
14532
|
error: RunnerRpcError
|
|
14522
|
-
}),
|
|
14533
|
+
}), make6("ResumeCheckpoint", {
|
|
14523
14534
|
payload: { lease: ProgramLease },
|
|
14524
14535
|
success: UndefinedOr(ResumedCheckpoint),
|
|
14525
14536
|
error: RunnerRpcError
|
|
14526
|
-
}),
|
|
14537
|
+
}), make6("SettledCheckpoints", {
|
|
14527
14538
|
success: ArraySchema(Struct({
|
|
14528
14539
|
stepAttemptId: String4,
|
|
14529
14540
|
ref: optionalKey(String4),
|
|
14530
14541
|
repoBinding: optionalKey(WorkUnitRepoBinding)
|
|
14531
14542
|
})),
|
|
14532
14543
|
error: RunnerRpcError
|
|
14533
|
-
}),
|
|
14544
|
+
}), make6("ForgetCheckpoints", {
|
|
14534
14545
|
payload: { stepAttemptIds: ArraySchema(String4) },
|
|
14535
14546
|
success: Void,
|
|
14536
14547
|
error: RunnerRpcError
|
|
14537
|
-
}),
|
|
14548
|
+
}), make6("GitCredential", {
|
|
14538
14549
|
payload: { repoBindingId: String4 },
|
|
14539
14550
|
success: UndefinedOr(Struct({ username: String4, password: String4 })),
|
|
14540
14551
|
error: RunnerRpcError
|
|
14541
|
-
}),
|
|
14552
|
+
}), make6("Bundle", {
|
|
14542
14553
|
payload: { digest: String4 },
|
|
14543
14554
|
success: Struct({ bundle: String4 }),
|
|
14544
14555
|
error: RunnerRpcError
|
|
14545
|
-
}),
|
|
14556
|
+
}), make6("SettledRuns", {
|
|
14546
14557
|
payload: { runIds: ArraySchema(String4) },
|
|
14547
14558
|
success: ArraySchema(String4),
|
|
14548
14559
|
error: RunnerRpcError
|
|
14549
|
-
}),
|
|
14560
|
+
}), make6("KnownEvidence", {
|
|
14550
14561
|
payload: { lease: ProgramLease, trees: ArraySchema(String4) },
|
|
14551
|
-
success: ArraySchema(Struct({
|
|
14562
|
+
success: ArraySchema(Struct({
|
|
14563
|
+
tree: String4,
|
|
14564
|
+
name: String4,
|
|
14565
|
+
command: String4,
|
|
14566
|
+
unjudgedFailure: optionalKey(Boolean2)
|
|
14567
|
+
})),
|
|
14552
14568
|
error: RunnerRpcError
|
|
14553
14569
|
})).middleware(RunnerAuthentication) {
|
|
14554
14570
|
}
|
|
14555
14571
|
|
|
14556
|
-
class RunnerJournalRpcs extends make6(
|
|
14572
|
+
class RunnerJournalRpcs extends make7(make6("RecordActivity", {
|
|
14557
14573
|
payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
|
|
14558
14574
|
error: RunnerRpcError
|
|
14559
|
-
}),
|
|
14575
|
+
}), make6("DeferredDone", {
|
|
14560
14576
|
payload: { lease: ProgramLease, name: String4, exit: Json },
|
|
14561
14577
|
error: RunnerRpcError
|
|
14562
|
-
}),
|
|
14578
|
+
}), make6("ScheduleClock", {
|
|
14563
14579
|
payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
|
|
14564
14580
|
error: RunnerRpcError
|
|
14565
|
-
}),
|
|
14581
|
+
}), make6("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make6("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
|
|
14566
14582
|
}
|
|
14567
14583
|
|
|
14568
|
-
class RunnerCapabilityRpcs extends make6(
|
|
14584
|
+
class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
14569
14585
|
payload: {
|
|
14570
14586
|
lease: ProgramLease,
|
|
14571
14587
|
step: String4,
|
|
@@ -14585,7 +14601,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14585
14601
|
},
|
|
14586
14602
|
success: Struct({ questionId: String4 }),
|
|
14587
14603
|
error: RunnerRpcError
|
|
14588
|
-
}),
|
|
14604
|
+
}), make6("StartAgentStep", {
|
|
14589
14605
|
payload: {
|
|
14590
14606
|
lease: ProgramLease,
|
|
14591
14607
|
step: String4,
|
|
@@ -14601,7 +14617,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14601
14617
|
},
|
|
14602
14618
|
success: Struct({ stepAttemptId: String4 }),
|
|
14603
14619
|
error: RunnerRpcError
|
|
14604
|
-
}),
|
|
14620
|
+
}), make6("StartVerification", {
|
|
14605
14621
|
payload: {
|
|
14606
14622
|
lease: ProgramLease,
|
|
14607
14623
|
step: String4,
|
|
@@ -14622,7 +14638,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14622
14638
|
},
|
|
14623
14639
|
success: Struct({ verificationId: String4 }),
|
|
14624
14640
|
error: RunnerRpcError
|
|
14625
|
-
}),
|
|
14641
|
+
}), make6("AwaitEvent", {
|
|
14626
14642
|
payload: {
|
|
14627
14643
|
lease: ProgramLease,
|
|
14628
14644
|
step: String4,
|
|
@@ -14638,7 +14654,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14638
14654
|
})))
|
|
14639
14655
|
},
|
|
14640
14656
|
error: RunnerRpcError
|
|
14641
|
-
}),
|
|
14657
|
+
}), make6("ClaimResource", {
|
|
14642
14658
|
payload: {
|
|
14643
14659
|
lease: ProgramLease,
|
|
14644
14660
|
step: String4,
|
|
@@ -14647,7 +14663,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14647
14663
|
action: Literals(["claim", "take_over", "let_go"])
|
|
14648
14664
|
},
|
|
14649
14665
|
error: RunnerRpcError
|
|
14650
|
-
}),
|
|
14666
|
+
}), make6("AdmitChild", {
|
|
14651
14667
|
payload: {
|
|
14652
14668
|
lease: ProgramLease,
|
|
14653
14669
|
step: String4,
|
|
@@ -14658,7 +14674,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14658
14674
|
},
|
|
14659
14675
|
success: Struct({ runId: String4 }),
|
|
14660
14676
|
error: RunnerRpcError
|
|
14661
|
-
}),
|
|
14677
|
+
}), make6("StoreArtifact", {
|
|
14662
14678
|
payload: {
|
|
14663
14679
|
lease: ProgramLease,
|
|
14664
14680
|
step: String4,
|
|
@@ -14670,7 +14686,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14670
14686
|
},
|
|
14671
14687
|
success: Struct({ artifactId: String4 }),
|
|
14672
14688
|
error: RunnerRpcError
|
|
14673
|
-
}),
|
|
14689
|
+
}), make6("RecordNote", {
|
|
14674
14690
|
payload: {
|
|
14675
14691
|
lease: ProgramLease,
|
|
14676
14692
|
step: String4,
|
|
@@ -14679,7 +14695,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14679
14695
|
kind: optional(Literals(["note", "blocker"]))
|
|
14680
14696
|
},
|
|
14681
14697
|
error: RunnerRpcError
|
|
14682
|
-
}),
|
|
14698
|
+
}), make6("PerformHostEffect", {
|
|
14683
14699
|
payload: {
|
|
14684
14700
|
lease: ProgramLease,
|
|
14685
14701
|
step: String4,
|
|
@@ -14708,7 +14724,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14708
14724
|
},
|
|
14709
14725
|
success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
|
|
14710
14726
|
error: RunnerRpcError
|
|
14711
|
-
}),
|
|
14727
|
+
}), make6("AlertTask", {
|
|
14712
14728
|
payload: {
|
|
14713
14729
|
lease: ProgramLease,
|
|
14714
14730
|
step: String4,
|
|
@@ -14725,7 +14741,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14725
14741
|
joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
|
|
14726
14742
|
}),
|
|
14727
14743
|
error: RunnerRpcError
|
|
14728
|
-
}),
|
|
14744
|
+
}), make6("ReadTranscripts", {
|
|
14729
14745
|
payload: {
|
|
14730
14746
|
lease: ProgramLease,
|
|
14731
14747
|
step: String4,
|
|
@@ -14760,7 +14776,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14760
14776
|
})))
|
|
14761
14777
|
}),
|
|
14762
14778
|
error: RunnerRpcError
|
|
14763
|
-
}),
|
|
14779
|
+
}), make6("PipelineStatus", {
|
|
14764
14780
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
|
|
14765
14781
|
success: Struct({
|
|
14766
14782
|
head: String4,
|
|
@@ -14794,11 +14810,11 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14794
14810
|
}))
|
|
14795
14811
|
}),
|
|
14796
14812
|
error: RunnerRpcError
|
|
14797
|
-
}),
|
|
14813
|
+
}), make6("ReportPipeline", {
|
|
14798
14814
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
|
|
14799
14815
|
success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
|
|
14800
14816
|
error: RunnerRpcError
|
|
14801
|
-
}),
|
|
14817
|
+
}), make6("ReviewThreads", {
|
|
14802
14818
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
|
|
14803
14819
|
success: Struct({
|
|
14804
14820
|
threads: ArraySchema(Struct({
|
|
@@ -14810,7 +14826,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14810
14826
|
}))
|
|
14811
14827
|
}),
|
|
14812
14828
|
error: RunnerRpcError
|
|
14813
|
-
}),
|
|
14829
|
+
}), make6("OpenChangeRequests", {
|
|
14814
14830
|
payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
|
|
14815
14831
|
success: Struct({
|
|
14816
14832
|
changeRequests: ArraySchema(Struct({
|
|
@@ -14824,7 +14840,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14824
14840
|
}))
|
|
14825
14841
|
}),
|
|
14826
14842
|
error: RunnerRpcError
|
|
14827
|
-
}),
|
|
14843
|
+
}), make6("OwnChangeRequests", {
|
|
14828
14844
|
payload: { lease: ProgramLease, step: String4 },
|
|
14829
14845
|
success: Struct({
|
|
14830
14846
|
changeRequests: ArraySchema(Struct({
|
|
@@ -14837,7 +14853,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14837
14853
|
}))
|
|
14838
14854
|
}),
|
|
14839
14855
|
error: RunnerRpcError
|
|
14840
|
-
}),
|
|
14856
|
+
}), make6("Propose", {
|
|
14841
14857
|
payload: {
|
|
14842
14858
|
lease: ProgramLease,
|
|
14843
14859
|
step: String4,
|
|
@@ -14866,7 +14882,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14866
14882
|
task: optionalKey(Struct({ id: String4, active: Boolean2 }))
|
|
14867
14883
|
}),
|
|
14868
14884
|
error: RunnerRpcError
|
|
14869
|
-
}),
|
|
14885
|
+
}), make6("ReadProject", {
|
|
14870
14886
|
payload: { lease: ProgramLease, step: String4, projectId: String4 },
|
|
14871
14887
|
success: Struct({
|
|
14872
14888
|
project: Struct({ id: String4, name: String4 }),
|
|
@@ -14889,7 +14905,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14889
14905
|
taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
|
|
14890
14906
|
}),
|
|
14891
14907
|
error: RunnerRpcError
|
|
14892
|
-
}),
|
|
14908
|
+
}), make6("DraftUpdate", {
|
|
14893
14909
|
payload: {
|
|
14894
14910
|
lease: ProgramLease,
|
|
14895
14911
|
step: String4,
|
|
@@ -14904,7 +14920,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14904
14920
|
},
|
|
14905
14921
|
success: Struct({ id: String4 }),
|
|
14906
14922
|
error: RunnerRpcError
|
|
14907
|
-
}),
|
|
14923
|
+
}), make6("CreatePlanTasks", {
|
|
14908
14924
|
payload: {
|
|
14909
14925
|
lease: ProgramLease,
|
|
14910
14926
|
projectId: optionalKey(String4),
|
|
@@ -14925,15 +14941,15 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14925
14941
|
},
|
|
14926
14942
|
success: ArraySchema(Struct({ key: String4, taskId: String4 })),
|
|
14927
14943
|
error: RunnerRpcError
|
|
14928
|
-
}),
|
|
14944
|
+
}), make6("IntegrationBranch", {
|
|
14929
14945
|
payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
|
|
14930
14946
|
success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
|
|
14931
14947
|
error: RunnerRpcError
|
|
14932
|
-
}),
|
|
14948
|
+
}), make6("DeliveryBase", {
|
|
14933
14949
|
payload: { lease: ProgramLease },
|
|
14934
14950
|
success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
|
|
14935
14951
|
error: RunnerRpcError
|
|
14936
|
-
}),
|
|
14952
|
+
}), make6("MergeChangeRequest", {
|
|
14937
14953
|
payload: {
|
|
14938
14954
|
lease: ProgramLease,
|
|
14939
14955
|
step: String4,
|
|
@@ -14951,7 +14967,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14951
14967
|
Struct({ status: Literal("moved"), head: String4 })
|
|
14952
14968
|
]),
|
|
14953
14969
|
error: RunnerRpcError
|
|
14954
|
-
}),
|
|
14970
|
+
}), make6("ApproveChangeRequest", {
|
|
14955
14971
|
payload: {
|
|
14956
14972
|
lease: ProgramLease,
|
|
14957
14973
|
step: String4,
|
|
@@ -14967,7 +14983,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14967
14983
|
Struct({ approved: Literal(false), reason: String4 })
|
|
14968
14984
|
]),
|
|
14969
14985
|
error: RunnerRpcError
|
|
14970
|
-
}),
|
|
14986
|
+
}), make6("CloseChangeRequest", {
|
|
14971
14987
|
payload: {
|
|
14972
14988
|
lease: ProgramLease,
|
|
14973
14989
|
step: String4,
|
|
@@ -14977,7 +14993,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14977
14993
|
},
|
|
14978
14994
|
success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
|
|
14979
14995
|
error: RunnerRpcError
|
|
14980
|
-
}),
|
|
14996
|
+
}), make6("RerunPipeline", {
|
|
14981
14997
|
payload: {
|
|
14982
14998
|
lease: ProgramLease,
|
|
14983
14999
|
step: String4,
|
|
@@ -14987,7 +15003,7 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14987
15003
|
},
|
|
14988
15004
|
success: Struct({ head: String4, pipelines: Int }),
|
|
14989
15005
|
error: RunnerRpcError
|
|
14990
|
-
}),
|
|
15006
|
+
}), make6("PublishRelease", {
|
|
14991
15007
|
payload: {
|
|
14992
15008
|
lease: ProgramLease,
|
|
14993
15009
|
step: String4,
|
|
@@ -14999,14 +15015,14 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
|
14999
15015
|
},
|
|
15000
15016
|
success: Struct({ tag: String4, revision: String4, url: String4 }),
|
|
15001
15017
|
error: RunnerRpcError
|
|
15002
|
-
}),
|
|
15018
|
+
}), make6("ProgramSecrets", {
|
|
15003
15019
|
payload: { lease: ProgramLease },
|
|
15004
15020
|
success: Record(String4, String4),
|
|
15005
15021
|
error: RunnerRpcError
|
|
15006
15022
|
})).middleware(RunnerAuthentication) {
|
|
15007
15023
|
}
|
|
15008
15024
|
|
|
15009
|
-
class RunnerRunFileRpcs extends make6(
|
|
15025
|
+
class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
|
|
15010
15026
|
payload: {
|
|
15011
15027
|
lease: ProgramLease,
|
|
15012
15028
|
step: String4,
|
|
@@ -15018,11 +15034,11 @@ class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
|
|
|
15018
15034
|
},
|
|
15019
15035
|
success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
|
|
15020
15036
|
error: Union([RunnerRpcError, RunFileRefused])
|
|
15021
|
-
}),
|
|
15037
|
+
}), make6("RunFileParts", {
|
|
15022
15038
|
payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
|
|
15023
15039
|
success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
|
|
15024
15040
|
error: RunnerRpcError
|
|
15025
|
-
}),
|
|
15041
|
+
}), make6("CompleteRunFile", {
|
|
15026
15042
|
payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
|
|
15027
15043
|
success: RunFileRecord,
|
|
15028
15044
|
error: RunnerRpcError
|
|
@@ -15111,7 +15127,7 @@ function toStoredSession(token, existingRefreshToken) {
|
|
|
15111
15127
|
}
|
|
15112
15128
|
function startLoopbackServer(input) {
|
|
15113
15129
|
return gen(function* () {
|
|
15114
|
-
const code = yield*
|
|
15130
|
+
const code = yield* make16();
|
|
15115
15131
|
const context2 = yield* context();
|
|
15116
15132
|
const runSyncExit = runSyncExitWith(context2);
|
|
15117
15133
|
const server = yield* acquireRelease(sync2(() => Bun.serve({
|
|
@@ -15659,7 +15675,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15659
15675
|
let lastId = 0;
|
|
15660
15676
|
let lost = false;
|
|
15661
15677
|
const notifications = yield* unbounded2();
|
|
15662
|
-
const ended = yield*
|
|
15678
|
+
const ended = yield* make16();
|
|
15663
15679
|
const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
|
|
15664
15680
|
onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
|
|
15665
15681
|
onNone: () => void_3,
|
|
@@ -15686,7 +15702,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15686
15702
|
if (lost)
|
|
15687
15703
|
return yield* new HerdrCoreConnectionLost2({ method });
|
|
15688
15704
|
const id = ++lastId;
|
|
15689
|
-
const deferred = yield*
|
|
15705
|
+
const deferred = yield* make16();
|
|
15690
15706
|
pending.set(id, { method, deferred });
|
|
15691
15707
|
yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
|
|
15692
15708
|
return yield* _await(deferred);
|
|
@@ -15760,14 +15776,14 @@ var herdrCoreOver = (transport) => ({
|
|
|
15760
15776
|
return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
|
|
15761
15777
|
};
|
|
15762
15778
|
const snapshot = { type: "snapshot", terminals: subscribed.terminals };
|
|
15763
|
-
return concat(
|
|
15779
|
+
return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
|
|
15764
15780
|
}))
|
|
15765
15781
|
});
|
|
15766
15782
|
var spawnedTransport = (env) => gen(function* () {
|
|
15767
15783
|
const spawner = yield* ChildProcessSpawner;
|
|
15768
15784
|
const input = yield* unbounded2();
|
|
15769
15785
|
const encoder = new TextEncoder;
|
|
15770
|
-
const handle = yield* spawner.spawn(
|
|
15786
|
+
const handle = yield* spawner.spawn(make3("herdr-core", ["connect"], {
|
|
15771
15787
|
extendEnv: false,
|
|
15772
15788
|
env,
|
|
15773
15789
|
stdin: fromQueue(input),
|
|
@@ -15798,7 +15814,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
|
|
|
15798
15814
|
const spawner = yield* ChildProcessSpawner;
|
|
15799
15815
|
const env = coreEnv(options);
|
|
15800
15816
|
const run = (args) => gen(function* () {
|
|
15801
|
-
const handle = yield* spawner.spawn(
|
|
15817
|
+
const handle = yield* spawner.spawn(make3("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
|
|
15802
15818
|
const [stdout, stderr, exitCode] = yield* all3([
|
|
15803
15819
|
mkString(decodeText(handle.stdout)),
|
|
15804
15820
|
mkString(decodeText(handle.stderr)),
|
|
@@ -15824,7 +15840,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
|
|
|
15824
15840
|
}
|
|
15825
15841
|
var runCommand2 = (command, args, options = {}) => gen(function* () {
|
|
15826
15842
|
const spawner = yield* ChildProcessSpawner;
|
|
15827
|
-
const handle = yield* spawner.spawn(
|
|
15843
|
+
const handle = yield* spawner.spawn(make3(command, args, {
|
|
15828
15844
|
stdin: "ignore",
|
|
15829
15845
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15830
15846
|
...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
|
|
@@ -15850,8 +15866,8 @@ var shellOutputTailChars2 = 64 * 1024;
|
|
|
15850
15866
|
var runProcess2 = (argv, options) => gen(function* () {
|
|
15851
15867
|
const spawner = yield* ChildProcessSpawner;
|
|
15852
15868
|
const [command, ...args] = argv;
|
|
15853
|
-
const handle = yield* spawner.spawn(
|
|
15854
|
-
stdin: options.stdin === undefined ? "ignore" :
|
|
15869
|
+
const handle = yield* spawner.spawn(make3(command, args, {
|
|
15870
|
+
stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
|
|
15855
15871
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15856
15872
|
env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
|
|
15857
15873
|
}));
|
|
@@ -16275,12 +16291,20 @@ function installCommand(rootFiles) {
|
|
|
16275
16291
|
return has("package.json") ? "npm install" : undefined;
|
|
16276
16292
|
}
|
|
16277
16293
|
var checkServicesFile = ".kitman/checks.json";
|
|
16278
|
-
var CheckServices = Struct({
|
|
16294
|
+
var CheckServices = Struct({
|
|
16295
|
+
services: ArraySchema(Literal("postgres")),
|
|
16296
|
+
checks: optionalKey(ArraySchema(String4))
|
|
16297
|
+
});
|
|
16298
|
+
var decodeCheckServices = (declaration) => getOrUndefined(decodeOption(fromJsonString(CheckServices))(declaration));
|
|
16279
16299
|
function checkServices(declaration) {
|
|
16280
16300
|
if (declaration === undefined)
|
|
16281
16301
|
return [];
|
|
16282
|
-
const decoded =
|
|
16283
|
-
return
|
|
16302
|
+
const decoded = decodeCheckServices(declaration);
|
|
16303
|
+
return decoded === undefined ? undefined : [...new Set(decoded.services)];
|
|
16304
|
+
}
|
|
16305
|
+
function serviceChecks(declaration) {
|
|
16306
|
+
const decoded = declaration === undefined ? undefined : decodeCheckServices(declaration);
|
|
16307
|
+
return decoded === undefined || decoded.services.length === 0 ? [] : [...new Set(decoded.checks ?? [])];
|
|
16284
16308
|
}
|
|
16285
16309
|
|
|
16286
|
-
export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, tokenCountWords, reportedModelName, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils,
|
|
16310
|
+
export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, tokenCountWords, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, reportedModelName, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices, serviceChecks };
|