@kitman-sh/cli 0.10.98 → 0.10.99
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-g1xmj2nb.js → chunk-0a10kdrd.js} +4 -4
- package/dist/{chunk-aba9zdpb.js → chunk-0hjtwtms.js} +59 -34
- package/dist/{chunk-7c3pgktm.js → chunk-0tsc91qr.js} +8 -8
- package/dist/{chunk-sy8d7bfa.js → chunk-2fs34341.js} +111 -105
- package/dist/{chunk-797w5qe6.js → chunk-3ka78n56.js} +7 -7
- package/dist/{chunk-p83y21hp.js → chunk-3r7ahnwy.js} +4 -4
- package/dist/{chunk-6dc0x5cg.js → chunk-3v70x040.js} +8 -8
- package/dist/{chunk-fd39ch4n.js → chunk-4sswz0mn.js} +8 -8
- package/dist/{chunk-95mkdtzk.js → chunk-56e202xk.js} +6 -6
- package/dist/{chunk-j8vq6sk1.js → chunk-6vmpa1nw.js} +19 -19
- package/dist/{chunk-7ya2q09c.js → chunk-a244myqw.js} +1 -1
- package/dist/{chunk-gfqm22x7.js → chunk-abf4m4b2.js} +5 -5
- package/dist/{chunk-07p2dcq3.js → chunk-ampzxrqe.js} +94 -333
- package/dist/{chunk-d1sqb8rt.js → chunk-bk3dpjxq.js} +1 -1
- package/dist/{chunk-qrxkpwzy.js → chunk-et6qa95h.js} +1 -1
- package/dist/{chunk-cgjyv52e.js → chunk-fv6kgtze.js} +2 -2
- package/dist/{chunk-xwhybbj2.js → chunk-g3r5xp0t.js} +2 -2
- package/dist/{chunk-3bjekzn7.js → chunk-k0shg2fb.js} +485 -333
- package/dist/{chunk-nym2zmz3.js → chunk-rdv42ygn.js} +4 -4
- package/dist/{chunk-bqg9gy2e.js → chunk-rp224rm4.js} +7 -7
- package/dist/{chunk-s90hj0mb.js → chunk-rrj434w6.js} +361 -133
- package/dist/{chunk-n8c1wh6t.js → chunk-t7ncjd6s.js} +6 -6
- package/dist/{chunk-s5p94z8x.js → chunk-vjcn82g3.js} +214 -65
- package/dist/{chunk-c6h3fhtb.js → chunk-z2f9enrp.js} +24 -24
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -17,9 +17,14 @@ import {
|
|
|
17
17
|
isNullish,
|
|
18
18
|
hasProperty,
|
|
19
19
|
symbol,
|
|
20
|
+
hash,
|
|
21
|
+
combine,
|
|
22
|
+
number,
|
|
23
|
+
string,
|
|
20
24
|
structure,
|
|
21
25
|
array,
|
|
22
26
|
symbol2,
|
|
27
|
+
equals,
|
|
23
28
|
asEquivalence,
|
|
24
29
|
symbolRedactable,
|
|
25
30
|
redact,
|
|
@@ -33,7 +38,7 @@ import {
|
|
|
33
38
|
assignProperty,
|
|
34
39
|
PipeInspectableProto,
|
|
35
40
|
withFiber,
|
|
36
|
-
|
|
41
|
+
make14,
|
|
37
42
|
strictEqual,
|
|
38
43
|
Tuple,
|
|
39
44
|
Number2,
|
|
@@ -47,20 +52,19 @@ import {
|
|
|
47
52
|
fromNullishOr,
|
|
48
53
|
fromUndefinedOr,
|
|
49
54
|
getOrUndefined,
|
|
55
|
+
liftThrowable,
|
|
50
56
|
map4,
|
|
51
57
|
flatMap,
|
|
52
58
|
Service2,
|
|
53
|
-
|
|
59
|
+
makeUnsafe4,
|
|
54
60
|
empty3,
|
|
55
|
-
|
|
61
|
+
make15,
|
|
56
62
|
add,
|
|
57
63
|
getOrUndefined2,
|
|
58
64
|
getOrUndefinedUnsafe,
|
|
59
|
-
|
|
65
|
+
get4,
|
|
60
66
|
merge3,
|
|
61
67
|
Reference,
|
|
62
|
-
fromInputUnsafe,
|
|
63
|
-
isFinite,
|
|
64
68
|
millis,
|
|
65
69
|
seconds,
|
|
66
70
|
toMillis,
|
|
@@ -79,14 +83,15 @@ import {
|
|
|
79
83
|
TaggedError,
|
|
80
84
|
DisablePropagation,
|
|
81
85
|
sync,
|
|
86
|
+
map7,
|
|
87
|
+
ClockRef,
|
|
88
|
+
currentTimeMillis2,
|
|
82
89
|
ConsoleRef,
|
|
83
90
|
succeed3,
|
|
84
91
|
fail4,
|
|
85
|
-
void_2,
|
|
86
92
|
isSuccess2,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
make15,
|
|
93
|
+
makeUnsafe5,
|
|
94
|
+
make16,
|
|
90
95
|
_await,
|
|
91
96
|
fail5,
|
|
92
97
|
isDone,
|
|
@@ -94,12 +99,8 @@ import {
|
|
|
94
99
|
succeed4,
|
|
95
100
|
doneUnsafe,
|
|
96
101
|
TracerTimingEnabled,
|
|
97
|
-
Scope,
|
|
98
|
-
makeUnsafe5,
|
|
99
102
|
provide,
|
|
100
|
-
addFinalizerExit,
|
|
101
103
|
addFinalizer,
|
|
102
|
-
close,
|
|
103
104
|
succeed5,
|
|
104
105
|
effect,
|
|
105
106
|
effectContext,
|
|
@@ -112,9 +113,8 @@ import {
|
|
|
112
113
|
hasInterrupts2,
|
|
113
114
|
Done2,
|
|
114
115
|
done,
|
|
116
|
+
IllegalArgumentError,
|
|
115
117
|
UnknownError,
|
|
116
|
-
Clock,
|
|
117
|
-
currentTimeMillis,
|
|
118
118
|
catchDone,
|
|
119
119
|
isDoneCause,
|
|
120
120
|
exponential,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
flatMap3,
|
|
141
141
|
andThen2,
|
|
142
142
|
tap2,
|
|
143
|
-
|
|
143
|
+
map8,
|
|
144
144
|
as,
|
|
145
145
|
asVoid,
|
|
146
146
|
catch_,
|
|
@@ -152,7 +152,6 @@ import {
|
|
|
152
152
|
tapCause,
|
|
153
153
|
retry,
|
|
154
154
|
ignore,
|
|
155
|
-
ignoreCause,
|
|
156
155
|
orElseSucceed,
|
|
157
156
|
timeout,
|
|
158
157
|
timeoutOrElse,
|
|
@@ -164,7 +163,6 @@ import {
|
|
|
164
163
|
context,
|
|
165
164
|
contextWith,
|
|
166
165
|
provide3,
|
|
167
|
-
provideContext2,
|
|
168
166
|
serviceOption,
|
|
169
167
|
updateContext,
|
|
170
168
|
provideService,
|
|
@@ -175,7 +173,6 @@ import {
|
|
|
175
173
|
addFinalizer2,
|
|
176
174
|
ensuring2,
|
|
177
175
|
onError,
|
|
178
|
-
onExit,
|
|
179
176
|
cached,
|
|
180
177
|
interrupt3,
|
|
181
178
|
interruptible,
|
|
@@ -187,7 +184,6 @@ import {
|
|
|
187
184
|
withParentSpan,
|
|
188
185
|
forkScoped,
|
|
189
186
|
runFork,
|
|
190
|
-
runForkWith,
|
|
191
187
|
runPromise,
|
|
192
188
|
runPromiseWith,
|
|
193
189
|
runSync,
|
|
@@ -198,16 +194,9 @@ import {
|
|
|
198
194
|
logError,
|
|
199
195
|
effectify,
|
|
200
196
|
decode,
|
|
201
|
-
makeUnsafe6,
|
|
202
|
-
make16,
|
|
203
|
-
now,
|
|
204
|
-
nowUnsafe,
|
|
205
|
-
toDateUtc,
|
|
206
|
-
toEpochMillis,
|
|
207
|
-
formatIso,
|
|
208
197
|
defaultParseOptions,
|
|
209
198
|
omit,
|
|
210
|
-
|
|
199
|
+
map9,
|
|
211
200
|
declare,
|
|
212
201
|
decodeUnknownEffect2,
|
|
213
202
|
decodeEffect,
|
|
@@ -260,46 +249,15 @@ import {
|
|
|
260
249
|
decodeJsonStringOption,
|
|
261
250
|
encodeJsonStringSync,
|
|
262
251
|
encodePrettyJsonString
|
|
263
|
-
} from "./chunk-
|
|
264
|
-
import {
|
|
265
|
-
isDateTime,
|
|
266
|
-
Numeric,
|
|
267
|
-
isWholeNumber,
|
|
268
|
-
guard,
|
|
269
|
-
Id,
|
|
270
|
-
Timestamp,
|
|
271
|
-
ActorType,
|
|
272
|
-
SecretName,
|
|
273
|
-
SecretScope,
|
|
274
|
-
SecretHosts,
|
|
275
|
-
isSecretReference
|
|
276
|
-
} from "./chunk-qrxkpwzy.js";
|
|
277
|
-
import {
|
|
278
|
-
toJsonValue,
|
|
279
|
-
isOneOf,
|
|
280
|
-
isBigInt,
|
|
281
|
-
isBoolean,
|
|
282
|
-
isFunction,
|
|
283
|
-
isNumber,
|
|
284
|
-
isObject,
|
|
285
|
-
isJsonObject,
|
|
286
|
-
isString,
|
|
287
|
-
isSymbol,
|
|
288
|
-
isUndefined,
|
|
289
|
-
kindOf
|
|
290
|
-
} from "./chunk-d1sqb8rt.js";
|
|
252
|
+
} from "./chunk-ampzxrqe.js";
|
|
291
253
|
import {
|
|
292
254
|
map,
|
|
293
255
|
makeEquivalence,
|
|
294
256
|
bytes,
|
|
295
|
-
join,
|
|
296
|
-
interrupt,
|
|
297
|
-
getCurrent,
|
|
298
|
-
runIn,
|
|
299
257
|
BadArgument,
|
|
300
258
|
systemError,
|
|
301
259
|
badArgument,
|
|
302
|
-
|
|
260
|
+
makeUnsafe2,
|
|
303
261
|
make8,
|
|
304
262
|
make9,
|
|
305
263
|
sliding,
|
|
@@ -311,17 +269,19 @@ import {
|
|
|
311
269
|
endUnsafe,
|
|
312
270
|
take,
|
|
313
271
|
poll,
|
|
314
|
-
|
|
272
|
+
makeUnsafe3,
|
|
315
273
|
fromTransform,
|
|
316
274
|
mapDone,
|
|
317
275
|
isSink,
|
|
318
276
|
fromChannel,
|
|
319
277
|
drain,
|
|
278
|
+
make10,
|
|
279
|
+
get3,
|
|
320
280
|
isStream,
|
|
321
281
|
fromChannel2,
|
|
322
282
|
callback,
|
|
323
283
|
empty2,
|
|
324
|
-
|
|
284
|
+
make11,
|
|
325
285
|
suspend,
|
|
326
286
|
fail2,
|
|
327
287
|
fromQueue,
|
|
@@ -347,16 +307,43 @@ import {
|
|
|
347
307
|
mkArrayBuffer,
|
|
348
308
|
toReadableStreamEffect,
|
|
349
309
|
FileSystem,
|
|
350
|
-
|
|
310
|
+
make12,
|
|
351
311
|
FileTypeId,
|
|
352
312
|
WatchBackend,
|
|
353
313
|
Path,
|
|
354
|
-
|
|
314
|
+
make13,
|
|
355
315
|
option,
|
|
356
316
|
String2,
|
|
357
317
|
optionalEnv,
|
|
358
318
|
harnessesUnsupportedInSrt2
|
|
359
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-vjcn82g3.js";
|
|
320
|
+
import {
|
|
321
|
+
isDateTime,
|
|
322
|
+
Numeric,
|
|
323
|
+
isWholeNumber,
|
|
324
|
+
guard,
|
|
325
|
+
Id,
|
|
326
|
+
Timestamp,
|
|
327
|
+
ActorType,
|
|
328
|
+
SecretName,
|
|
329
|
+
SecretScope,
|
|
330
|
+
SecretHosts,
|
|
331
|
+
isSecretReference
|
|
332
|
+
} from "./chunk-et6qa95h.js";
|
|
333
|
+
import {
|
|
334
|
+
toJsonValue,
|
|
335
|
+
isOneOf,
|
|
336
|
+
isBigInt,
|
|
337
|
+
isBoolean,
|
|
338
|
+
isFunction,
|
|
339
|
+
isNumber,
|
|
340
|
+
isObject,
|
|
341
|
+
isJsonObject,
|
|
342
|
+
isString,
|
|
343
|
+
isSymbol,
|
|
344
|
+
isUndefined,
|
|
345
|
+
kindOf
|
|
346
|
+
} from "./chunk-bk3dpjxq.js";
|
|
360
347
|
import {
|
|
361
348
|
isRedacted,
|
|
362
349
|
make,
|
|
@@ -370,11 +357,241 @@ import {
|
|
|
370
357
|
make3,
|
|
371
358
|
parseFdName,
|
|
372
359
|
fdName
|
|
373
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-3r7ahnwy.js";
|
|
374
361
|
|
|
375
362
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
376
363
|
var makeEquivalence3 = Tuple;
|
|
377
364
|
|
|
365
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
|
|
366
|
+
var Clock = ClockRef;
|
|
367
|
+
var currentTimeMillis = currentTimeMillis2;
|
|
368
|
+
|
|
369
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
|
|
370
|
+
var TypeId = "~effect/DateTime";
|
|
371
|
+
var TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
372
|
+
var Proto = {
|
|
373
|
+
[TypeId]: TypeId,
|
|
374
|
+
pipe() {
|
|
375
|
+
return pipeArguments(this, arguments);
|
|
376
|
+
},
|
|
377
|
+
[NodeInspectSymbol]() {
|
|
378
|
+
return this.toString();
|
|
379
|
+
},
|
|
380
|
+
toJSON() {
|
|
381
|
+
return toDateUtc(this).toJSON();
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
var ProtoUtc = {
|
|
385
|
+
...Proto,
|
|
386
|
+
_tag: "Utc",
|
|
387
|
+
[symbol]() {
|
|
388
|
+
return number(this.epochMilliseconds);
|
|
389
|
+
},
|
|
390
|
+
[symbol2](that) {
|
|
391
|
+
return isDateTime2(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
|
|
392
|
+
},
|
|
393
|
+
toString() {
|
|
394
|
+
return `DateTime.Utc(${toDateUtc(this).toJSON()})`;
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
var ProtoZoned = {
|
|
398
|
+
...Proto,
|
|
399
|
+
_tag: "Zoned",
|
|
400
|
+
[symbol]() {
|
|
401
|
+
return combine(number(this.epochMilliseconds))(hash(this.zone));
|
|
402
|
+
},
|
|
403
|
+
[symbol2](that) {
|
|
404
|
+
return isDateTime2(that) && that._tag === "Zoned" && this.epochMilliseconds === that.epochMilliseconds && equals(this.zone, that.zone);
|
|
405
|
+
},
|
|
406
|
+
toString() {
|
|
407
|
+
return `DateTime.Zoned(${formatIsoZoned(this)})`;
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
var ProtoTimeZone = {
|
|
411
|
+
[TimeZoneTypeId]: TimeZoneTypeId,
|
|
412
|
+
[NodeInspectSymbol]() {
|
|
413
|
+
return this.toString();
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
var ProtoTimeZoneNamed = {
|
|
417
|
+
...ProtoTimeZone,
|
|
418
|
+
_tag: "Named",
|
|
419
|
+
[symbol]() {
|
|
420
|
+
return string(`Named:${this.id}`);
|
|
421
|
+
},
|
|
422
|
+
[symbol2](that) {
|
|
423
|
+
return isTimeZone(that) && that._tag === "Named" && this.id === that.id;
|
|
424
|
+
},
|
|
425
|
+
toString() {
|
|
426
|
+
return `TimeZone.Named(${this.id})`;
|
|
427
|
+
},
|
|
428
|
+
toJSON() {
|
|
429
|
+
return {
|
|
430
|
+
_id: "TimeZone",
|
|
431
|
+
_tag: "Named",
|
|
432
|
+
id: this.id
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
var ProtoTimeZoneOffset = {
|
|
437
|
+
...ProtoTimeZone,
|
|
438
|
+
_tag: "Offset",
|
|
439
|
+
[symbol]() {
|
|
440
|
+
return string(`Offset:${this.offset}`);
|
|
441
|
+
},
|
|
442
|
+
[symbol2](that) {
|
|
443
|
+
return isTimeZone(that) && that._tag === "Offset" && this.offset === that.offset;
|
|
444
|
+
},
|
|
445
|
+
toString() {
|
|
446
|
+
return `TimeZone.Offset(${offsetToString(this.offset)})`;
|
|
447
|
+
},
|
|
448
|
+
toJSON() {
|
|
449
|
+
return {
|
|
450
|
+
_id: "TimeZone",
|
|
451
|
+
_tag: "Offset",
|
|
452
|
+
offset: this.offset
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
var cacheSlot = {
|
|
457
|
+
value: undefined,
|
|
458
|
+
enumerable: false,
|
|
459
|
+
writable: true
|
|
460
|
+
};
|
|
461
|
+
var sealedCaches = /* @__PURE__ */ new WeakMap;
|
|
462
|
+
var cacheAccessor = (key, slots) => ({
|
|
463
|
+
get() {
|
|
464
|
+
return Object.isExtensible(this) ? undefined : sealedCaches.get(this)?.[key];
|
|
465
|
+
},
|
|
466
|
+
set(value) {
|
|
467
|
+
if (Object.isExtensible(this)) {
|
|
468
|
+
for (const slot of slots) {
|
|
469
|
+
Object.defineProperty(this, slot, cacheSlot);
|
|
470
|
+
}
|
|
471
|
+
this[key] = value;
|
|
472
|
+
} else {
|
|
473
|
+
let caches = sealedCaches.get(this);
|
|
474
|
+
if (caches === undefined) {
|
|
475
|
+
caches = {};
|
|
476
|
+
sealedCaches.set(this, caches);
|
|
477
|
+
}
|
|
478
|
+
caches[key] = value;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
var zonedSlots = ["partsUtc", "adjustedEpochMilliseconds", "partsAdjusted"];
|
|
483
|
+
Object.defineProperty(ProtoUtc, "partsUtc", cacheAccessor("partsUtc", ["partsUtc"]));
|
|
484
|
+
Object.defineProperties(ProtoZoned, {
|
|
485
|
+
partsUtc: cacheAccessor("partsUtc", zonedSlots),
|
|
486
|
+
adjustedEpochMilliseconds: cacheAccessor("adjustedEpochMilliseconds", zonedSlots),
|
|
487
|
+
partsAdjusted: cacheAccessor("partsAdjusted", zonedSlots)
|
|
488
|
+
});
|
|
489
|
+
var isDateTime2 = (u) => hasProperty(u, TypeId);
|
|
490
|
+
var isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
|
|
491
|
+
var makeUtc = (epochMillis) => {
|
|
492
|
+
const self = Object.create(ProtoUtc);
|
|
493
|
+
self.epochMilliseconds = epochMillis;
|
|
494
|
+
return self;
|
|
495
|
+
};
|
|
496
|
+
var fromDateUnsafe = (date) => {
|
|
497
|
+
const epochMillis = date.getTime();
|
|
498
|
+
if (Number.isNaN(epochMillis)) {
|
|
499
|
+
throw new IllegalArgumentError("Invalid date");
|
|
500
|
+
}
|
|
501
|
+
return makeUtc(epochMillis);
|
|
502
|
+
};
|
|
503
|
+
var makeUnsafe6 = (input) => {
|
|
504
|
+
if (isDateTime2(input)) {
|
|
505
|
+
return input;
|
|
506
|
+
} else if (input instanceof Date) {
|
|
507
|
+
return fromDateUnsafe(input);
|
|
508
|
+
} else if (typeof input === "object") {
|
|
509
|
+
if ("epochMilliseconds" in input) {
|
|
510
|
+
return fromDateUnsafe(new Date(input.epochMilliseconds));
|
|
511
|
+
}
|
|
512
|
+
const date = new Date(0);
|
|
513
|
+
setPartsDate(date, input);
|
|
514
|
+
return fromDateUnsafe(date);
|
|
515
|
+
} else if (typeof input === "string" && !hasZone(input)) {
|
|
516
|
+
return fromDateUnsafe(new Date(input + "Z"));
|
|
517
|
+
}
|
|
518
|
+
return fromDateUnsafe(new Date(input));
|
|
519
|
+
};
|
|
520
|
+
var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
|
|
521
|
+
var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
|
|
522
|
+
var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
|
|
523
|
+
var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
|
|
524
|
+
var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
|
|
525
|
+
var nowUnsafe = () => makeUtc(Date.now());
|
|
526
|
+
var toDateUtc = (self) => new Date(self.epochMilliseconds);
|
|
527
|
+
var toDate2 = (self) => {
|
|
528
|
+
if (self._tag === "Utc") {
|
|
529
|
+
return new Date(self.epochMilliseconds);
|
|
530
|
+
} else if (self.zone._tag === "Offset") {
|
|
531
|
+
return new Date(self.epochMilliseconds + self.zone.offset);
|
|
532
|
+
} else if (self.adjustedEpochMilliseconds !== undefined) {
|
|
533
|
+
return new Date(self.adjustedEpochMilliseconds);
|
|
534
|
+
}
|
|
535
|
+
let bc = false;
|
|
536
|
+
const parts = self.zone.format.formatToParts(self.epochMilliseconds).filter((_) => {
|
|
537
|
+
if (_.type === "era") {
|
|
538
|
+
bc = _.value === "BC";
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
return _.type !== "literal";
|
|
542
|
+
});
|
|
543
|
+
const year = Number(parts[2].value);
|
|
544
|
+
const date = new Date(0);
|
|
545
|
+
date.setUTCFullYear(bc ? 1 - year : year, Number(parts[0].value) - 1, Number(parts[1].value));
|
|
546
|
+
date.setUTCHours(Number(parts[3].value), Number(parts[4].value), Number(parts[5].value), parts[6]?.type === "fractionalSecond" ? Number(parts[6].value) : (self.epochMilliseconds % 1000 + 1000) % 1000);
|
|
547
|
+
self.adjustedEpochMilliseconds = date.getTime();
|
|
548
|
+
return date;
|
|
549
|
+
};
|
|
550
|
+
var zonedOffset = (self) => {
|
|
551
|
+
const date = toDate2(self);
|
|
552
|
+
return date.getTime() - toEpochMillis(self);
|
|
553
|
+
};
|
|
554
|
+
var offsetToString = (offset) => {
|
|
555
|
+
const abs = Math.abs(offset);
|
|
556
|
+
let hours = Math.floor(abs / (60 * 60 * 1000));
|
|
557
|
+
let minutes = Math.round(abs % (60 * 60 * 1000) / (60 * 1000));
|
|
558
|
+
if (minutes === 60) {
|
|
559
|
+
hours += 1;
|
|
560
|
+
minutes = 0;
|
|
561
|
+
}
|
|
562
|
+
return `${offset < 0 ? "-" : "+"}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
|
|
563
|
+
};
|
|
564
|
+
var zonedOffsetIso = (self) => offsetToString(zonedOffset(self));
|
|
565
|
+
var toEpochMillis = (self) => self.epochMilliseconds;
|
|
566
|
+
var setPartsDate = (date, parts) => {
|
|
567
|
+
if (parts.year !== undefined || parts.month !== undefined || parts.day !== undefined) {
|
|
568
|
+
date.setUTCFullYear(parts.year ?? date.getUTCFullYear(), parts.month !== undefined ? parts.month - 1 : date.getUTCMonth(), parts.day ?? date.getUTCDate());
|
|
569
|
+
}
|
|
570
|
+
if (parts.weekDay !== undefined) {
|
|
571
|
+
const diff = parts.weekDay - date.getUTCDay();
|
|
572
|
+
date.setUTCDate(date.getUTCDate() + diff);
|
|
573
|
+
}
|
|
574
|
+
if (parts.hour !== undefined) {
|
|
575
|
+
date.setUTCHours(parts.hour);
|
|
576
|
+
}
|
|
577
|
+
if (parts.minute !== undefined) {
|
|
578
|
+
date.setUTCMinutes(parts.minute);
|
|
579
|
+
}
|
|
580
|
+
if (parts.second !== undefined) {
|
|
581
|
+
date.setUTCSeconds(parts.second);
|
|
582
|
+
}
|
|
583
|
+
if (parts.millisecond !== undefined) {
|
|
584
|
+
date.setUTCMilliseconds(parts.millisecond);
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
var constDayMillis = 24 * 60 * 60 * 1000;
|
|
588
|
+
var formatIso2 = (self) => toDateUtc(self).toISOString();
|
|
589
|
+
var formatIsoOffset = (self) => {
|
|
590
|
+
const date = toDate2(self);
|
|
591
|
+
return self._tag === "Utc" ? date.toISOString() : `${date.toISOString().slice(0, -1)}${zonedOffsetIso(self)}`;
|
|
592
|
+
};
|
|
593
|
+
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
594
|
+
|
|
378
595
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Metric.js
|
|
379
596
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
380
597
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
@@ -384,10 +601,10 @@ var MetricRegistryKey = "effect/Metric/MetricRegistry";
|
|
|
384
601
|
var MetricRegistry = /* @__PURE__ */ Reference(MetricRegistryKey, {
|
|
385
602
|
defaultValue: () => new Map
|
|
386
603
|
});
|
|
387
|
-
var
|
|
604
|
+
var TypeId2 = "~effect/Metric";
|
|
388
605
|
|
|
389
606
|
class Metric$ {
|
|
390
|
-
[
|
|
607
|
+
[TypeId2] = TypeId2;
|
|
391
608
|
#extraAttributes;
|
|
392
609
|
#mergedAttributes;
|
|
393
610
|
#key = "";
|
|
@@ -410,7 +627,7 @@ class Metric$ {
|
|
|
410
627
|
}
|
|
411
628
|
hook(context) {
|
|
412
629
|
const key = this.key(context);
|
|
413
|
-
const registry =
|
|
630
|
+
const registry = get4(context, MetricRegistry);
|
|
414
631
|
let metadata = registry.get(key);
|
|
415
632
|
if (isUndefined2(metadata)) {
|
|
416
633
|
metadata = this.metadata(this.createHooks());
|
|
@@ -419,11 +636,11 @@ class Metric$ {
|
|
|
419
636
|
return metadata.hooks;
|
|
420
637
|
}
|
|
421
638
|
removeUnsafe(context) {
|
|
422
|
-
|
|
639
|
+
get4(context, MetricRegistry).delete(this.key(context));
|
|
423
640
|
}
|
|
424
641
|
registerUnsafe(context, hooks) {
|
|
425
642
|
const key = this.key(context);
|
|
426
|
-
const registry =
|
|
643
|
+
const registry = get4(context, MetricRegistry);
|
|
427
644
|
const metadata = this.metadata({
|
|
428
645
|
get: hooks.get,
|
|
429
646
|
update: constVoid,
|
|
@@ -439,7 +656,7 @@ class Metric$ {
|
|
|
439
656
|
};
|
|
440
657
|
}
|
|
441
658
|
key(context) {
|
|
442
|
-
const extraAttributes =
|
|
659
|
+
const extraAttributes = get4(context, CurrentMetricAttributes);
|
|
443
660
|
if (extraAttributes !== this.#extraAttributes) {
|
|
444
661
|
this.#extraAttributes = extraAttributes;
|
|
445
662
|
const merged = mergeAttributes(this.attributes, extraAttributes);
|
|
@@ -691,147 +908,14 @@ var toNumber = (b) => {
|
|
|
691
908
|
return some(Number(b));
|
|
692
909
|
};
|
|
693
910
|
|
|
694
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/
|
|
695
|
-
var
|
|
696
|
-
var stateEmpty = {
|
|
697
|
-
_tag: "Empty"
|
|
698
|
-
};
|
|
699
|
-
var stateClosed = {
|
|
700
|
-
_tag: "Closed"
|
|
701
|
-
};
|
|
702
|
-
var variance = {
|
|
703
|
-
_A: identity,
|
|
704
|
-
_E: identity
|
|
705
|
-
};
|
|
706
|
-
|
|
707
|
-
class RcRefImpl {
|
|
708
|
-
[TypeId2] = variance;
|
|
709
|
-
pipe() {
|
|
710
|
-
return pipeArguments(this, arguments);
|
|
711
|
-
}
|
|
712
|
-
state = stateEmpty;
|
|
713
|
-
acquire;
|
|
714
|
-
context;
|
|
715
|
-
scope;
|
|
716
|
-
idleTimeToLive;
|
|
717
|
-
constructor(acquire, context, scope, idleTimeToLive) {
|
|
718
|
-
this.acquire = acquire;
|
|
719
|
-
this.context = context;
|
|
720
|
-
this.scope = scope;
|
|
721
|
-
this.idleTimeToLive = idleTimeToLive;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
var make4 = (options) => withFiber2((fiber) => {
|
|
725
|
-
const context = fiber.context;
|
|
726
|
-
const scope = get3(context, Scope);
|
|
727
|
-
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
728
|
-
return as(addFinalizerExit(scope, () => {
|
|
729
|
-
const state = ref.state;
|
|
730
|
-
ref.state = stateClosed;
|
|
731
|
-
if (state._tag === "Acquired")
|
|
732
|
-
return close(state.scope, void_2);
|
|
733
|
-
if (state._tag === "Acquiring")
|
|
734
|
-
return interrupt(state.fiber);
|
|
735
|
-
return void_3;
|
|
736
|
-
}), ref);
|
|
737
|
-
});
|
|
738
|
-
var getState = (self, restore) => {
|
|
739
|
-
switch (self.state._tag) {
|
|
740
|
-
case "Closed": {
|
|
741
|
-
return interrupt3;
|
|
742
|
-
}
|
|
743
|
-
case "Acquired": {
|
|
744
|
-
const state = self.state;
|
|
745
|
-
state.refCount++;
|
|
746
|
-
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
747
|
-
}
|
|
748
|
-
case "Acquiring": {
|
|
749
|
-
const state = self.state;
|
|
750
|
-
state.awaiters++;
|
|
751
|
-
return awaitAcquiring(self, state, restore);
|
|
752
|
-
}
|
|
753
|
-
case "Empty": {
|
|
754
|
-
const acquiring = {
|
|
755
|
-
_tag: "Acquiring",
|
|
756
|
-
fiber: undefined,
|
|
757
|
-
awaiters: 1,
|
|
758
|
-
acquired: undefined
|
|
759
|
-
};
|
|
760
|
-
self.state = acquiring;
|
|
761
|
-
const scope = makeUnsafe5();
|
|
762
|
-
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
763
|
-
if (self.state !== acquiring) {
|
|
764
|
-
return interrupt3;
|
|
765
|
-
}
|
|
766
|
-
const state = {
|
|
767
|
-
_tag: "Acquired",
|
|
768
|
-
value,
|
|
769
|
-
scope,
|
|
770
|
-
fiber: undefined,
|
|
771
|
-
refCount: acquiring.awaiters,
|
|
772
|
-
invalidated: false
|
|
773
|
-
};
|
|
774
|
-
self.state = state;
|
|
775
|
-
acquiring.acquired = state;
|
|
776
|
-
return succeed6(state);
|
|
777
|
-
}), onExit((exit) => {
|
|
778
|
-
if (isSuccess2(exit))
|
|
779
|
-
return void_3;
|
|
780
|
-
if (self.state === acquiring)
|
|
781
|
-
self.state = stateEmpty;
|
|
782
|
-
return close(scope, exit);
|
|
783
|
-
}));
|
|
784
|
-
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
785
|
-
return awaitAcquiring(self, acquiring, restore);
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
};
|
|
789
|
-
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
790
|
-
const acquired = acquiring.acquired;
|
|
791
|
-
if (acquired !== undefined) {
|
|
792
|
-
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
793
|
-
}
|
|
794
|
-
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
795
|
-
return void_3;
|
|
796
|
-
self.state = stateEmpty;
|
|
797
|
-
return interrupt(acquiring.fiber);
|
|
798
|
-
});
|
|
799
|
-
var get4 = (self_) => {
|
|
800
|
-
const self = self_;
|
|
801
|
-
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
802
|
-
};
|
|
803
|
-
var release = (self, state) => {
|
|
804
|
-
state.refCount--;
|
|
805
|
-
if (state.refCount > 0) {
|
|
806
|
-
return void_3;
|
|
807
|
-
}
|
|
808
|
-
const idleTimeToLive = self.idleTimeToLive;
|
|
809
|
-
if (idleTimeToLive === undefined || state.invalidated) {
|
|
810
|
-
if (self.state === state) {
|
|
811
|
-
self.state = stateEmpty;
|
|
812
|
-
}
|
|
813
|
-
return close(state.scope, void_2);
|
|
814
|
-
} else if (!isFinite(idleTimeToLive)) {
|
|
815
|
-
return void_3;
|
|
816
|
-
}
|
|
817
|
-
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
818
|
-
if (self.state === state && state.refCount === 0) {
|
|
819
|
-
self.state = stateEmpty;
|
|
820
|
-
return ignoreCause(close(state.scope, void_2), {
|
|
821
|
-
log: "Unhandled",
|
|
822
|
-
message: "Unhandled error in RcRef finalizer"
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
return void_3;
|
|
826
|
-
})).pipe(ensuring2(sync2(() => {
|
|
827
|
-
state.fiber = undefined;
|
|
828
|
-
})), runForkWith(self.context), runIn(self.scope));
|
|
829
|
-
return void_3;
|
|
830
|
-
};
|
|
831
|
-
|
|
832
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
911
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
|
|
912
|
+
var makeUnsafe = makeUnsafe6;
|
|
833
913
|
var make18 = make4;
|
|
834
|
-
var
|
|
914
|
+
var now2 = now;
|
|
915
|
+
var nowUnsafe2 = nowUnsafe;
|
|
916
|
+
var toDateUtc2 = toDateUtc;
|
|
917
|
+
var toEpochMillis2 = toEpochMillis;
|
|
918
|
+
var formatIso = formatIso2;
|
|
835
919
|
|
|
836
920
|
// node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
837
921
|
import * as NodeChildProcess from "child_process";
|
|
@@ -947,8 +1031,8 @@ var releaseWritable = (writable) => callback3((resume) => {
|
|
|
947
1031
|
});
|
|
948
1032
|
var pullIntoWritable = (options) => withFiber2((fiber) => {
|
|
949
1033
|
const dispatcher = fiber.currentDispatcher;
|
|
950
|
-
const completion =
|
|
951
|
-
const failure =
|
|
1034
|
+
const completion = makeUnsafe5();
|
|
1035
|
+
const failure = makeUnsafe5();
|
|
952
1036
|
const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
|
|
953
1037
|
let errorEmitted = false;
|
|
954
1038
|
const onStreamError = (error) => {
|
|
@@ -1042,7 +1126,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
1042
1126
|
const chunkSize = options.chunkSize ?? 4096;
|
|
1043
1127
|
const closeOnDone = options.closeOnDone ?? true;
|
|
1044
1128
|
const exit = options.exit ?? make8(undefined);
|
|
1045
|
-
const latch = options.latch ??
|
|
1129
|
+
const latch = options.latch ?? makeUnsafe2(false);
|
|
1046
1130
|
function onReadable() {
|
|
1047
1131
|
latch.openUnsafe();
|
|
1048
1132
|
}
|
|
@@ -1272,7 +1356,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1272
1356
|
});
|
|
1273
1357
|
}
|
|
1274
1358
|
if (stream) {
|
|
1275
|
-
return
|
|
1359
|
+
return map8(runInputStream(stream, sink, inputFailure), () => {
|
|
1276
1360
|
inputSinks.set(fd, sink);
|
|
1277
1361
|
});
|
|
1278
1362
|
}
|
|
@@ -1378,7 +1462,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1378
1462
|
};
|
|
1379
1463
|
};
|
|
1380
1464
|
const spawn2 = (command, spawnOptions) => callback3((resume) => {
|
|
1381
|
-
const deferred =
|
|
1465
|
+
const deferred = makeUnsafe5();
|
|
1382
1466
|
const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
|
|
1383
1467
|
handle.on("error", (error) => {
|
|
1384
1468
|
if (command.args.some(isRedacted)) {
|
|
@@ -1554,7 +1638,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1554
1638
|
}
|
|
1555
1639
|
return reref;
|
|
1556
1640
|
});
|
|
1557
|
-
const inputFailure =
|
|
1641
|
+
const inputFailure = makeUnsafe5();
|
|
1558
1642
|
const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
|
|
1559
1643
|
const {
|
|
1560
1644
|
all,
|
|
@@ -1565,7 +1649,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1565
1649
|
getInputFd,
|
|
1566
1650
|
getOutputFd
|
|
1567
1651
|
} = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
|
|
1568
|
-
const isRunning =
|
|
1652
|
+
const isRunning = map8(isDone(exitSignal), (done) => !done);
|
|
1569
1653
|
const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
|
|
1570
1654
|
if (isDoneUnsafe(inputFailure)) {
|
|
1571
1655
|
return _await(inputFailure);
|
|
@@ -1846,7 +1930,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
|
|
|
1846
1930
|
var openFactory = (method) => {
|
|
1847
1931
|
const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
1848
1932
|
const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
1849
|
-
return (path, options) => pipe(acquireRelease(options?.noFollow === true ? flatMap3(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => orDie(nodeClose(fd))),
|
|
1933
|
+
return (path, options) => pipe(acquireRelease(options?.noFollow === true ? flatMap3(noFollowFlags(method, options.flag ?? "r"), (flags) => nodeOpen(path, flags, options.mode)) : nodeOpen(path, options?.flag ?? "r", options?.mode), (fd) => orDie(nodeClose(fd))), map8((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
|
|
1850
1934
|
};
|
|
1851
1935
|
var open2 = /* @__PURE__ */ openFactory("open");
|
|
1852
1936
|
var negativePosition = (method) => badArgument({
|
|
@@ -1907,7 +1991,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
1907
1991
|
});
|
|
1908
1992
|
}
|
|
1909
1993
|
const position = this.position;
|
|
1910
|
-
return
|
|
1994
|
+
return map8(nodeRead(this.fd, {
|
|
1911
1995
|
buffer,
|
|
1912
1996
|
position
|
|
1913
1997
|
}), (bytesRead) => {
|
|
@@ -1928,7 +2012,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
1928
2012
|
}
|
|
1929
2013
|
const buffer = Buffer.allocUnsafeSlow(size);
|
|
1930
2014
|
const position = explicit ?? this.position;
|
|
1931
|
-
return
|
|
2015
|
+
return map8(nodeReadAlloc(this.fd, {
|
|
1932
2016
|
buffer,
|
|
1933
2017
|
position
|
|
1934
2018
|
}), (bytesRead) => {
|
|
@@ -1951,7 +2035,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
1951
2035
|
});
|
|
1952
2036
|
}
|
|
1953
2037
|
truncate(length) {
|
|
1954
|
-
return
|
|
2038
|
+
return map8(nodeTruncate(this.fd, length || undefined), () => {
|
|
1955
2039
|
if (!this.append) {
|
|
1956
2040
|
const len = BigInt(length ?? 0);
|
|
1957
2041
|
if (this.position > len) {
|
|
@@ -1963,7 +2047,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
1963
2047
|
write(buffer) {
|
|
1964
2048
|
return suspend3(() => {
|
|
1965
2049
|
const position = this.position;
|
|
1966
|
-
return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) =>
|
|
2050
|
+
return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map8(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
|
|
1967
2051
|
if (!this.append) {
|
|
1968
2052
|
this.position = position + BigInt(bytesWritten);
|
|
1969
2053
|
}
|
|
@@ -2025,7 +2109,7 @@ var readDirectoryEntries = (path) => tryPromise({
|
|
|
2025
2109
|
withFileTypes: true
|
|
2026
2110
|
}),
|
|
2027
2111
|
catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
|
|
2028
|
-
}).pipe(
|
|
2112
|
+
}).pipe(map8((entries) => entries.map((entry) => ({
|
|
2029
2113
|
name: entry.name,
|
|
2030
2114
|
type: fileType(entry)
|
|
2031
2115
|
}))));
|
|
@@ -2140,7 +2224,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
|
|
|
2140
2224
|
});
|
|
2141
2225
|
return watcher;
|
|
2142
2226
|
}), (watcher) => sync2(() => watcher.close())).pipe(tap2(() => sync2(() => options?.onReady?.()))));
|
|
2143
|
-
var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(
|
|
2227
|
+
var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(map8(([stat, callerBackend]) => orElse(callerBackend, () => backend).pipe(flatMap((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, stat, options)))), unwrap);
|
|
2144
2228
|
var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
2145
2229
|
try {
|
|
2146
2230
|
NFS.writeFile(path, data, {
|
|
@@ -2158,7 +2242,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
|
2158
2242
|
resume(fail7(handleBadArgument("writeFile")(err)));
|
|
2159
2243
|
}
|
|
2160
2244
|
});
|
|
2161
|
-
var makeFileSystem = /* @__PURE__ */
|
|
2245
|
+
var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make12({
|
|
2162
2246
|
access: access2,
|
|
2163
2247
|
chmod: chmod2,
|
|
2164
2248
|
chown: chown2,
|
|
@@ -2218,15 +2302,15 @@ var fileUrlOps = (windows) => ({
|
|
|
2218
2302
|
})
|
|
2219
2303
|
})
|
|
2220
2304
|
});
|
|
2221
|
-
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2305
|
+
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2222
2306
|
...NodePath.posix,
|
|
2223
2307
|
.../* @__PURE__ */ fileUrlOps(false)
|
|
2224
2308
|
}));
|
|
2225
|
-
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2309
|
+
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2226
2310
|
...NodePath.win32,
|
|
2227
2311
|
.../* @__PURE__ */ fileUrlOps(true)
|
|
2228
2312
|
}));
|
|
2229
|
-
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2313
|
+
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make13({
|
|
2230
2314
|
...NodePath,
|
|
2231
2315
|
.../* @__PURE__ */ fileUrlOps(undefined)
|
|
2232
2316
|
}));
|
|
@@ -2485,7 +2569,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
|
|
|
2485
2569
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
|
|
2486
2570
|
var TypeId4 = "~effect/http/Cookies";
|
|
2487
2571
|
var CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
2488
|
-
var
|
|
2572
|
+
var Proto2 = {
|
|
2489
2573
|
[TypeId4]: TypeId4,
|
|
2490
2574
|
...BaseProto,
|
|
2491
2575
|
toJSON() {
|
|
@@ -2499,7 +2583,7 @@ var Proto = {
|
|
|
2499
2583
|
}
|
|
2500
2584
|
};
|
|
2501
2585
|
var fromReadonlyRecord = (cookies) => {
|
|
2502
|
-
const self = Object.create(
|
|
2586
|
+
const self = Object.create(Proto2);
|
|
2503
2587
|
self.cookies = cookies;
|
|
2504
2588
|
return self;
|
|
2505
2589
|
};
|
|
@@ -2666,13 +2750,13 @@ var tryDecodeURIComponent = (str) => {
|
|
|
2666
2750
|
|
|
2667
2751
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
|
|
2668
2752
|
var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
2669
|
-
var
|
|
2753
|
+
var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
|
|
2670
2754
|
[TypeId5]: {
|
|
2671
2755
|
value: TypeId5
|
|
2672
2756
|
},
|
|
2673
2757
|
[symbolRedactable]: {
|
|
2674
2758
|
value(context) {
|
|
2675
|
-
return redact2(this,
|
|
2759
|
+
return redact2(this, get4(context, CurrentRedactedNames));
|
|
2676
2760
|
}
|
|
2677
2761
|
},
|
|
2678
2762
|
toJSON: {
|
|
@@ -2682,7 +2766,7 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
|
|
|
2682
2766
|
},
|
|
2683
2767
|
[symbol2]: {
|
|
2684
2768
|
value(that) {
|
|
2685
|
-
return
|
|
2769
|
+
return Equivalence2(this, that);
|
|
2686
2770
|
}
|
|
2687
2771
|
},
|
|
2688
2772
|
[symbol]: {
|
|
@@ -2697,20 +2781,20 @@ var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
|
|
|
2697
2781
|
value: BaseProto[NodeInspectSymbol]
|
|
2698
2782
|
}
|
|
2699
2783
|
});
|
|
2700
|
-
var make22 = (input) => Object.assign(Object.create(
|
|
2701
|
-
var
|
|
2702
|
-
var empty = /* @__PURE__ */ Object.create(
|
|
2784
|
+
var make22 = (input) => Object.assign(Object.create(Proto3), input);
|
|
2785
|
+
var Equivalence2 = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
|
|
2786
|
+
var empty = /* @__PURE__ */ Object.create(Proto3);
|
|
2703
2787
|
var fromInput = (input) => {
|
|
2704
2788
|
if (input === undefined) {
|
|
2705
2789
|
return empty;
|
|
2706
2790
|
} else if (Symbol.iterator in input) {
|
|
2707
|
-
const out = Object.create(
|
|
2791
|
+
const out = Object.create(Proto3);
|
|
2708
2792
|
for (const [k, v] of input) {
|
|
2709
2793
|
out[k.toLowerCase()] = v;
|
|
2710
2794
|
}
|
|
2711
2795
|
return out;
|
|
2712
2796
|
}
|
|
2713
|
-
const out = Object.create(
|
|
2797
|
+
const out = Object.create(Proto3);
|
|
2714
2798
|
for (const [k, v] of Object.entries(input)) {
|
|
2715
2799
|
if (Array.isArray(v)) {
|
|
2716
2800
|
out[k.toLowerCase()] = v.join(", ");
|
|
@@ -2720,7 +2804,7 @@ var fromInput = (input) => {
|
|
|
2720
2804
|
}
|
|
2721
2805
|
return out;
|
|
2722
2806
|
};
|
|
2723
|
-
var fromRecordUnsafe = (input) => Object.setPrototypeOf(input,
|
|
2807
|
+
var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto3);
|
|
2724
2808
|
var set = /* @__PURE__ */ dual(3, (self, key, value) => {
|
|
2725
2809
|
const out = make22(self);
|
|
2726
2810
|
out[key.toLowerCase()] = value;
|
|
@@ -2795,7 +2879,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
|
|
|
2795
2879
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
|
|
2796
2880
|
var TypeId6 = "~effect/http/UrlParams";
|
|
2797
2881
|
var isUrlParams = (u) => hasProperty(u, TypeId6);
|
|
2798
|
-
var
|
|
2882
|
+
var Proto4 = {
|
|
2799
2883
|
...PipeInspectableProto,
|
|
2800
2884
|
[TypeId6]: TypeId6,
|
|
2801
2885
|
[Symbol.iterator]() {
|
|
@@ -2804,21 +2888,21 @@ var Proto3 = {
|
|
|
2804
2888
|
[symbolRedactable](context) {
|
|
2805
2889
|
return {
|
|
2806
2890
|
_id: "UrlParams",
|
|
2807
|
-
params: Object.fromEntries(redact3(this,
|
|
2891
|
+
params: Object.fromEntries(redact3(this, get4(context, CurrentRedactedNames2)))
|
|
2808
2892
|
};
|
|
2809
2893
|
},
|
|
2810
2894
|
toJSON() {
|
|
2811
2895
|
return redact(this);
|
|
2812
2896
|
},
|
|
2813
2897
|
[symbol2](that) {
|
|
2814
|
-
return
|
|
2898
|
+
return Equivalence3(this, that);
|
|
2815
2899
|
},
|
|
2816
2900
|
[symbol]() {
|
|
2817
2901
|
return array(this.params.flat());
|
|
2818
2902
|
}
|
|
2819
2903
|
};
|
|
2820
2904
|
var make23 = (params) => {
|
|
2821
|
-
const self = Object.create(
|
|
2905
|
+
const self = Object.create(Proto4);
|
|
2822
2906
|
self.params = params;
|
|
2823
2907
|
return self;
|
|
2824
2908
|
};
|
|
@@ -2860,7 +2944,7 @@ var fromInputNested = (input) => {
|
|
|
2860
2944
|
return out;
|
|
2861
2945
|
};
|
|
2862
2946
|
var coerce = (value) => isRedacted(value) ? value : String(value);
|
|
2863
|
-
var
|
|
2947
|
+
var Equivalence3 = /* @__PURE__ */ make14((a, b) => arrayEquivalence(a.params, b.params));
|
|
2864
2948
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
|
|
2865
2949
|
var empty4 = /* @__PURE__ */ make23([]);
|
|
2866
2950
|
var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
@@ -2930,7 +3014,7 @@ var decodeQueryKey = (key) => {
|
|
|
2930
3014
|
return key;
|
|
2931
3015
|
}
|
|
2932
3016
|
};
|
|
2933
|
-
var currentRedactedNames = () =>
|
|
3017
|
+
var currentRedactedNames = () => get4(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
|
|
2934
3018
|
var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
|
|
2935
3019
|
defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
|
|
2936
3020
|
});
|
|
@@ -2966,7 +3050,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
2966
3050
|
};
|
|
2967
3051
|
stdin.once("end", onStdinEnd);
|
|
2968
3052
|
yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
|
|
2969
|
-
const rlRef = yield*
|
|
3053
|
+
const rlRef = yield* make10({
|
|
2970
3054
|
acquire: acquireRelease(sync2(() => {
|
|
2971
3055
|
const rl = readline.createInterface({
|
|
2972
3056
|
input: stdin,
|
|
@@ -3005,7 +3089,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3005
3089
|
if (stdin.isTTY)
|
|
3006
3090
|
stdin.setRawMode(enabled);
|
|
3007
3091
|
});
|
|
3008
|
-
const rawModeRef = yield*
|
|
3092
|
+
const rawModeRef = yield* make10({
|
|
3009
3093
|
acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
|
|
3010
3094
|
idleTimeToLive: "10 millis"
|
|
3011
3095
|
});
|
|
@@ -3056,14 +3140,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3056
3140
|
if (inputEnded) {
|
|
3057
3141
|
handleEnd();
|
|
3058
3142
|
} else {
|
|
3059
|
-
yield*
|
|
3060
|
-
yield*
|
|
3143
|
+
yield* get3(rlRef);
|
|
3144
|
+
yield* get3(rawModeRef);
|
|
3061
3145
|
stdin.once("end", handleEnd);
|
|
3062
3146
|
}
|
|
3063
3147
|
return queue;
|
|
3064
3148
|
});
|
|
3065
3149
|
const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
|
|
3066
|
-
onNone: () => scoped(andThen2(
|
|
3150
|
+
onNone: () => scoped(andThen2(get3(rlRef), take(lines))),
|
|
3067
3151
|
onSome: succeed6
|
|
3068
3152
|
})), mapError2(() => new QuitError({}))));
|
|
3069
3153
|
const display = (prompt) => uninterruptible(callback3((resume) => {
|
|
@@ -3107,17 +3191,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
|
|
|
3107
3191
|
|
|
3108
3192
|
// packages/core/src/time.ts
|
|
3109
3193
|
function toDate(input) {
|
|
3110
|
-
return
|
|
3194
|
+
return toDateUtc2(makeUnsafe(input));
|
|
3111
3195
|
}
|
|
3112
3196
|
function parseDate(input) {
|
|
3113
|
-
return getOrUndefined(map4(
|
|
3197
|
+
return getOrUndefined(map4(make18(input), toDateUtc2));
|
|
3114
3198
|
}
|
|
3115
3199
|
function toIso(input) {
|
|
3116
|
-
return formatIso(
|
|
3200
|
+
return formatIso(makeUnsafe(input));
|
|
3117
3201
|
}
|
|
3118
|
-
var currentDate =
|
|
3202
|
+
var currentDate = map8(now2, toDateUtc2);
|
|
3119
3203
|
function wallClockMillis() {
|
|
3120
|
-
return
|
|
3204
|
+
return toEpochMillis2(nowUnsafe2());
|
|
3121
3205
|
}
|
|
3122
3206
|
|
|
3123
3207
|
// packages/core/src/waiting-on.ts
|
|
@@ -4549,6 +4633,25 @@ function normalizedSecretKey(key) {
|
|
|
4549
4633
|
return key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[-\s]+/g, "_").toLowerCase();
|
|
4550
4634
|
}
|
|
4551
4635
|
|
|
4636
|
+
// packages/core/src/network-host.ts
|
|
4637
|
+
var label = "[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?";
|
|
4638
|
+
var port = "(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])";
|
|
4639
|
+
var NetworkHost = String4.check(isMaxLength(260), isPattern(new RegExp(`^(?:localhost|${label}(?:\\.${label})+|\\*\\.${label}\\.${label}(?:\\.${label})*)(?::${port})?$`, "u")));
|
|
4640
|
+
var NetworkHostScope = Union([Struct({ teamId: Id }), Struct({ repoBindingId: Id })]);
|
|
4641
|
+
var NetworkHostSummary = Struct({
|
|
4642
|
+
host: NetworkHost,
|
|
4643
|
+
teamId: optionalKey(Id),
|
|
4644
|
+
repoBindingId: optionalKey(Id),
|
|
4645
|
+
addedByActorType: ActorType,
|
|
4646
|
+
addedByActorId: String4,
|
|
4647
|
+
addedAt: Timestamp
|
|
4648
|
+
});
|
|
4649
|
+
var NetworkHostList = Struct({ items: ArraySchema(NetworkHostSummary) });
|
|
4650
|
+
var NetworkHostQuery = Struct({
|
|
4651
|
+
teamId: optionalKey(Id),
|
|
4652
|
+
repoBindingId: optionalKey(Id)
|
|
4653
|
+
});
|
|
4654
|
+
|
|
4552
4655
|
// packages/core/src/task-key.ts
|
|
4553
4656
|
var TaskKeyPattern = /^[A-Z][A-Z0-9]{1,11}-[1-9][0-9]*$/;
|
|
4554
4657
|
var TaskKey = String4.check(isPattern(new RegExp(TaskKeyPattern.source, "u")));
|
|
@@ -6485,25 +6588,6 @@ var RunActionSummary = Struct({
|
|
|
6485
6588
|
var RunActionList = Struct({ items: ArraySchema(RunActionSummary) });
|
|
6486
6589
|
var RunActionTaken = Struct({ action: String4, run: Run });
|
|
6487
6590
|
|
|
6488
|
-
// packages/core/src/network-host.ts
|
|
6489
|
-
var label = "[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?";
|
|
6490
|
-
var port = "(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])";
|
|
6491
|
-
var NetworkHost = String4.check(isMaxLength(260), isPattern(new RegExp(`^(?:localhost|${label}(?:\\.${label})+|\\*\\.${label}\\.${label}(?:\\.${label})*)(?::${port})?$`, "u")));
|
|
6492
|
-
var NetworkHostScope = Union([Struct({ teamId: Id }), Struct({ repoBindingId: Id })]);
|
|
6493
|
-
var NetworkHostSummary = Struct({
|
|
6494
|
-
host: NetworkHost,
|
|
6495
|
-
teamId: optionalKey(Id),
|
|
6496
|
-
repoBindingId: optionalKey(Id),
|
|
6497
|
-
addedByActorType: ActorType,
|
|
6498
|
-
addedByActorId: String4,
|
|
6499
|
-
addedAt: Timestamp
|
|
6500
|
-
});
|
|
6501
|
-
var NetworkHostList = Struct({ items: ArraySchema(NetworkHostSummary) });
|
|
6502
|
-
var NetworkHostQuery = Struct({
|
|
6503
|
-
teamId: optionalKey(Id),
|
|
6504
|
-
repoBindingId: optionalKey(Id)
|
|
6505
|
-
});
|
|
6506
|
-
|
|
6507
6591
|
// packages/core/src/test-report.ts
|
|
6508
6592
|
var isTestReportName = (name) => /junit.*\.xml$/iu.test(name);
|
|
6509
6593
|
var maxSkippedTests = 1e4;
|
|
@@ -6583,7 +6667,7 @@ var WorkUnitLease = Struct({
|
|
|
6583
6667
|
leaseExpiresAt: Timestamp,
|
|
6584
6668
|
lastHeartbeatAt: Timestamp
|
|
6585
6669
|
});
|
|
6586
|
-
var WorkUnitLeaseProjection = Struct(
|
|
6670
|
+
var WorkUnitLeaseProjection = Struct(map9(WorkUnitLease.fields, optionalKey));
|
|
6587
6671
|
var WorkUnitRepoBinding = Struct({
|
|
6588
6672
|
id: Id,
|
|
6589
6673
|
provider: RepoBindingProvider,
|
|
@@ -6851,7 +6935,8 @@ var RunnerProblemCodes = [
|
|
|
6851
6935
|
"herdr_core_missing",
|
|
6852
6936
|
"update_failed",
|
|
6853
6937
|
"processes_unreaped",
|
|
6854
|
-
"processes_uncontained"
|
|
6938
|
+
"processes_uncontained",
|
|
6939
|
+
"full_access_refused"
|
|
6855
6940
|
];
|
|
6856
6941
|
var RunnerProblemText = String4.check(isMinLength(1), isMaxLength(500));
|
|
6857
6942
|
var RunnerProblemReport = Struct({
|
|
@@ -7094,6 +7179,57 @@ var RunnerCapabilities = Struct({
|
|
|
7094
7179
|
measure: optionalKey(Boolean2),
|
|
7095
7180
|
resolve: optionalKey(Boolean2)
|
|
7096
7181
|
});
|
|
7182
|
+
var MaxRunnerConcurrency = 4;
|
|
7183
|
+
var PinnedImage = String4.check(isMaxLength(500), isPattern(new RegExp("^[^\\s@]+@sha256:[a-f0-9]{64}$", "u")));
|
|
7184
|
+
var RunnerSettings = Struct({
|
|
7185
|
+
concurrency: Int.check(isGreaterThanOrEqualTo(1), isLessThanOrEqualTo(MaxRunnerConcurrency)),
|
|
7186
|
+
sandbox: RunnerExecutionBackend,
|
|
7187
|
+
dockerImage: NullOr(PinnedImage),
|
|
7188
|
+
checkHosts: ArraySchema(NetworkHost).check(isMaxLength(50)),
|
|
7189
|
+
checkDockerImage: NullOr(PinnedImage),
|
|
7190
|
+
checkRegistryImage: NullOr(PinnedImage)
|
|
7191
|
+
});
|
|
7192
|
+
var RunnerSettingNames = [
|
|
7193
|
+
"concurrency",
|
|
7194
|
+
"sandbox",
|
|
7195
|
+
"dockerImage",
|
|
7196
|
+
"checkHosts",
|
|
7197
|
+
"checkDockerImage",
|
|
7198
|
+
"checkRegistryImage"
|
|
7199
|
+
];
|
|
7200
|
+
var RunnerSettingsUpdate = Struct({
|
|
7201
|
+
concurrency: optionalKey(RunnerSettings.fields.concurrency),
|
|
7202
|
+
sandbox: optionalKey(RunnerSettings.fields.sandbox),
|
|
7203
|
+
dockerImage: optionalKey(RunnerSettings.fields.dockerImage),
|
|
7204
|
+
checkHosts: optionalKey(RunnerSettings.fields.checkHosts),
|
|
7205
|
+
checkDockerImage: optionalKey(RunnerSettings.fields.checkDockerImage),
|
|
7206
|
+
checkRegistryImage: optionalKey(RunnerSettings.fields.checkRegistryImage)
|
|
7207
|
+
});
|
|
7208
|
+
var RunnerAppliedSettings = Struct({
|
|
7209
|
+
...RunnerSettings.fields,
|
|
7210
|
+
fullAccessAllowed: Boolean2
|
|
7211
|
+
});
|
|
7212
|
+
var defaultRunnerSettings = (personal) => ({
|
|
7213
|
+
concurrency: 1,
|
|
7214
|
+
sandbox: personal ? "srt" : "docker",
|
|
7215
|
+
dockerImage: null,
|
|
7216
|
+
checkHosts: [],
|
|
7217
|
+
checkDockerImage: null,
|
|
7218
|
+
checkRegistryImage: null
|
|
7219
|
+
});
|
|
7220
|
+
var RunnerSettingValue = Union([Finite, String4, ArraySchema(String4), Null]);
|
|
7221
|
+
var RunnerSettingChange = Struct({
|
|
7222
|
+
id: Id,
|
|
7223
|
+
setting: Literals(RunnerSettingNames),
|
|
7224
|
+
from: RunnerSettingValue,
|
|
7225
|
+
to: RunnerSettingValue,
|
|
7226
|
+
actorType: ActorType,
|
|
7227
|
+
actorId: String4,
|
|
7228
|
+
source: Literals(["person", "environment"]),
|
|
7229
|
+
changedAt: Timestamp
|
|
7230
|
+
});
|
|
7231
|
+
var RunnerSettingsHistory = Struct({ items: ArraySchema(RunnerSettingChange) });
|
|
7232
|
+
var shownRunnerSetting = (value) => Array.isArray(value) ? value.length === 0 ? "none" : value.join(",") : value === null ? "none" : String(value);
|
|
7097
7233
|
var Runner = Struct({
|
|
7098
7234
|
id: Id,
|
|
7099
7235
|
workspaceId: Id,
|
|
@@ -7112,6 +7248,8 @@ var Runner = Struct({
|
|
|
7112
7248
|
latestVersion: optionalKey(RunnerVersion),
|
|
7113
7249
|
container: Boolean2,
|
|
7114
7250
|
automaticUpdates: Boolean2,
|
|
7251
|
+
settings: optionalKey(RunnerSettings),
|
|
7252
|
+
appliedSettings: optionalKey(RunnerAppliedSettings),
|
|
7115
7253
|
lastHeartbeatAt: optionalKey(Timestamp),
|
|
7116
7254
|
createdByUserId: optionalKey(Id),
|
|
7117
7255
|
createdAt: Timestamp,
|
|
@@ -7257,7 +7395,9 @@ var RunnerHeartbeatInput = Struct({
|
|
|
7257
7395
|
container: optionalKey(Boolean2),
|
|
7258
7396
|
problems: optionalKey(ArraySchema(RunnerProblemReport).check(isMaxLength(RunnerProblemCodes.length))),
|
|
7259
7397
|
capabilities: optionalKey(RunnerCapabilities),
|
|
7260
|
-
labels: optionalKey(ArraySchema(String4.check(isMinLength(1))).check(isMaxLength(50)))
|
|
7398
|
+
labels: optionalKey(ArraySchema(String4.check(isMinLength(1))).check(isMaxLength(50))),
|
|
7399
|
+
environmentSettings: optionalKey(RunnerSettingsUpdate),
|
|
7400
|
+
appliedSettings: optionalKey(RunnerAppliedSettings)
|
|
7261
7401
|
});
|
|
7262
7402
|
var RunnerCapabilitiesUpdate = Struct({
|
|
7263
7403
|
capabilities: RunnerCapabilities,
|
|
@@ -9316,7 +9456,7 @@ var TranscriptSearchResult = Struct({
|
|
|
9316
9456
|
});
|
|
9317
9457
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
|
|
9318
9458
|
var TypeId8 = "~effect/http/HttpBody";
|
|
9319
|
-
class
|
|
9459
|
+
class Proto5 {
|
|
9320
9460
|
[TypeId8];
|
|
9321
9461
|
constructor() {
|
|
9322
9462
|
this[TypeId8] = TypeId8;
|
|
@@ -9331,7 +9471,7 @@ class Proto4 {
|
|
|
9331
9471
|
}
|
|
9332
9472
|
}
|
|
9333
9473
|
|
|
9334
|
-
class Empty extends
|
|
9474
|
+
class Empty extends Proto5 {
|
|
9335
9475
|
_tag = "Empty";
|
|
9336
9476
|
toJSON() {
|
|
9337
9477
|
return {
|
|
@@ -9342,7 +9482,7 @@ class Empty extends Proto4 {
|
|
|
9342
9482
|
}
|
|
9343
9483
|
var empty5 = /* @__PURE__ */ new Empty;
|
|
9344
9484
|
|
|
9345
|
-
class Raw extends
|
|
9485
|
+
class Raw extends Proto5 {
|
|
9346
9486
|
_tag = "Raw";
|
|
9347
9487
|
body;
|
|
9348
9488
|
contentType;
|
|
@@ -9365,7 +9505,7 @@ class Raw extends Proto4 {
|
|
|
9365
9505
|
}
|
|
9366
9506
|
var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
|
|
9367
9507
|
|
|
9368
|
-
class Uint8Array2 extends
|
|
9508
|
+
class Uint8Array2 extends Proto5 {
|
|
9369
9509
|
_tag = "Uint8Array";
|
|
9370
9510
|
contentType;
|
|
9371
9511
|
contentLength;
|
|
@@ -9592,7 +9732,7 @@ var baseUrl = () => {
|
|
|
9592
9732
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
|
|
9593
9733
|
var TypeId10 = "~effect/http/HttpClientRequest";
|
|
9594
9734
|
var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
|
|
9595
|
-
var
|
|
9735
|
+
var Proto6 = {
|
|
9596
9736
|
[TypeId10]: TypeId10,
|
|
9597
9737
|
...BaseProto,
|
|
9598
9738
|
toJSON() {
|
|
@@ -9611,7 +9751,7 @@ var Proto5 = {
|
|
|
9611
9751
|
}
|
|
9612
9752
|
};
|
|
9613
9753
|
function makeWith(method, url, urlParams, hash, headers, body) {
|
|
9614
|
-
const self = Object.create(
|
|
9754
|
+
const self = Object.create(Proto6);
|
|
9615
9755
|
self.method = method;
|
|
9616
9756
|
self.url = url;
|
|
9617
9757
|
self.urlParams = urlParams;
|
|
@@ -9798,7 +9938,7 @@ class WebHttpClientResponse extends Class {
|
|
|
9798
9938
|
}
|
|
9799
9939
|
textBody;
|
|
9800
9940
|
get text() {
|
|
9801
|
-
return this.textBody ??=
|
|
9941
|
+
return this.textBody ??= map8(this.arrayBuffer, (_) => new TextDecoder().decode(_));
|
|
9802
9942
|
}
|
|
9803
9943
|
get urlParamsBody() {
|
|
9804
9944
|
return flatMap3(this.arrayBuffer, (bytes) => try_2({
|
|
@@ -9909,7 +10049,7 @@ var get2 = /* @__PURE__ */ accessor("get");
|
|
|
9909
10049
|
var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
|
|
9910
10050
|
var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
|
|
9911
10051
|
var makeWith2 = (postprocess, preprocess) => {
|
|
9912
|
-
const self = Object.create(
|
|
10052
|
+
const self = Object.create(Proto7);
|
|
9913
10053
|
self.preprocess = preprocess;
|
|
9914
10054
|
self.postprocess = postprocess;
|
|
9915
10055
|
self.execute = function(request) {
|
|
@@ -9917,7 +10057,7 @@ var makeWith2 = (postprocess, preprocess) => {
|
|
|
9917
10057
|
};
|
|
9918
10058
|
return self;
|
|
9919
10059
|
};
|
|
9920
|
-
var
|
|
10060
|
+
var Proto7 = {
|
|
9921
10061
|
[TypeId13]: TypeId13,
|
|
9922
10062
|
pipe() {
|
|
9923
10063
|
return pipeArguments(this, arguments);
|
|
@@ -9949,7 +10089,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
|
|
|
9949
10089
|
if (tracerDisabled) {
|
|
9950
10090
|
const effect = f(request, url, controller.signal, fiber);
|
|
9951
10091
|
if (scopedController)
|
|
9952
|
-
return
|
|
10092
|
+
return map8(effect, (response) => trackResponse(response, controller, true));
|
|
9953
10093
|
return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
|
|
9954
10094
|
onSuccess(response) {
|
|
9955
10095
|
return succeed6(trackResponse(response, controller, false));
|
|
@@ -10020,7 +10160,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
|
|
|
10020
10160
|
var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
|
|
10021
10161
|
defaultValue: () => (request) => request.method
|
|
10022
10162
|
});
|
|
10023
|
-
var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) =>
|
|
10163
|
+
var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map8(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
|
|
10024
10164
|
var responseRegistry = /* @__PURE__ */ (() => {
|
|
10025
10165
|
if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
|
|
10026
10166
|
const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
|
|
@@ -10185,7 +10325,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
|
|
|
10185
10325
|
}
|
|
10186
10326
|
let uploadController;
|
|
10187
10327
|
const stopUpload = sync2(() => uploadController?.abort());
|
|
10188
|
-
const send = (body) =>
|
|
10328
|
+
const send = (body) => map8(tryPromise({
|
|
10189
10329
|
try: () => fetch2(url, {
|
|
10190
10330
|
...options,
|
|
10191
10331
|
method: request.method,
|
|
@@ -10356,14 +10496,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
|
|
|
10356
10496
|
}
|
|
10357
10497
|
return new globalThis.WebSocket(url, options);
|
|
10358
10498
|
});
|
|
10359
|
-
var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(
|
|
10499
|
+
var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(map8((url) => makeWs(url, options?.headers === undefined ? options?.protocols : {
|
|
10360
10500
|
protocols: options.protocols,
|
|
10361
10501
|
headers: options.headers
|
|
10362
10502
|
}))), (ws) => sync2(() => ws.close(1000))), options));
|
|
10363
10503
|
var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
|
|
10364
10504
|
var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
|
|
10365
10505
|
let currentWS;
|
|
10366
|
-
const latch =
|
|
10506
|
+
const latch = makeUnsafe2(false);
|
|
10367
10507
|
const acquireContext = fiber.context;
|
|
10368
10508
|
const reader = gen(function* () {
|
|
10369
10509
|
const scope = yield* scope2;
|
|
@@ -10991,7 +11131,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
|
|
|
10991
11131
|
var processTelemetryRegistry = new Map;
|
|
10992
11132
|
var processMetricRegistry = new Map;
|
|
10993
11133
|
var collectorTimeout = "10 seconds";
|
|
10994
|
-
var collectorHttpClient = effect(HttpClient)(
|
|
11134
|
+
var collectorHttpClient = effect(HttpClient)(map8(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
|
|
10995
11135
|
duration: collectorTimeout,
|
|
10996
11136
|
orElse: () => fail7(new HttpClientError({
|
|
10997
11137
|
reason: new TransportError({
|
|
@@ -12405,6 +12545,18 @@ class KitmanEffectClient {
|
|
|
12405
12545
|
removeRunner(runnerId) {
|
|
12406
12546
|
return this.request("removeRunner", `/runners/${segment(runnerId)}`, { method: "DELETE", headers: this.headers() });
|
|
12407
12547
|
}
|
|
12548
|
+
updateRunnerSettings(runnerId, input) {
|
|
12549
|
+
return this.request("updateRunnerSettings", `/runners/${segment(runnerId)}/settings`, {
|
|
12550
|
+
method: "PATCH",
|
|
12551
|
+
headers: this.headers(true),
|
|
12552
|
+
body: JSON.stringify(input)
|
|
12553
|
+
});
|
|
12554
|
+
}
|
|
12555
|
+
listRunnerSettingsHistory(runnerId) {
|
|
12556
|
+
return this.request("listRunnerSettingsHistory", `/runners/${segment(runnerId)}/settings/history`, {
|
|
12557
|
+
headers: this.headers()
|
|
12558
|
+
});
|
|
12559
|
+
}
|
|
12408
12560
|
setRunnerDefaultHarness(runnerId, input) {
|
|
12409
12561
|
return this.request("setRunnerDefaultHarness", `/runners/${segment(runnerId)}/default-harness`, {
|
|
12410
12562
|
method: "PUT",
|
|
@@ -12788,7 +12940,7 @@ class KitmanEffectClient {
|
|
|
12788
12940
|
return tryPromise({
|
|
12789
12941
|
try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
|
|
12790
12942
|
catch: failed
|
|
12791
|
-
}).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(
|
|
12943
|
+
}).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map8((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
|
|
12792
12944
|
});
|
|
12793
12945
|
const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
|
|
12794
12946
|
duration: getAnswerTimeout,
|
|
@@ -12850,8 +13002,8 @@ class KitmanEffectClient {
|
|
|
12850
13002
|
function errorResponseDetails(response) {
|
|
12851
13003
|
const contentType = response.headers.get("content-type") ?? "";
|
|
12852
13004
|
if (contentType.includes("application/json"))
|
|
12853
|
-
return tryPromise(() => response.json()).pipe(
|
|
12854
|
-
return tryPromise(() => response.text()).pipe(
|
|
13005
|
+
return tryPromise(() => response.json()).pipe(map8(parseErrorResponse), orElseSucceed(() => ({})));
|
|
13006
|
+
return tryPromise(() => response.text()).pipe(map8((text) => {
|
|
12855
13007
|
const message = sanitizeErrorDetail(text);
|
|
12856
13008
|
return message === undefined ? {} : { message };
|
|
12857
13009
|
}), orElseSucceed(() => ({})));
|
|
@@ -13147,13 +13299,13 @@ function resolveConfig(input) {
|
|
|
13147
13299
|
...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
|
|
13148
13300
|
};
|
|
13149
13301
|
}
|
|
13150
|
-
var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option,
|
|
13151
|
-
var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option,
|
|
13152
|
-
var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option,
|
|
13153
|
-
var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option,
|
|
13154
|
-
var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option,
|
|
13155
|
-
var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option,
|
|
13156
|
-
var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option,
|
|
13302
|
+
var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map8(getOrUndefined));
|
|
13303
|
+
var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map8(getOrUndefined));
|
|
13304
|
+
var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map8(getOrUndefined));
|
|
13305
|
+
var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map8(getOrUndefined));
|
|
13306
|
+
var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map8((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
|
|
13307
|
+
var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map8((tools) => getOrUndefined(tools) === "output"));
|
|
13308
|
+
var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map8(getOrUndefined));
|
|
13157
13309
|
var kitmanConfigDir = gen(function* () {
|
|
13158
13310
|
const path = yield* Path;
|
|
13159
13311
|
const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
|
|
@@ -13170,7 +13322,7 @@ var userAuthPath = configFile("auth.json");
|
|
|
13170
13322
|
var userHarnessSyncPath = configFile("harness-sync.json");
|
|
13171
13323
|
var kitSetupCacheDir = configFile("kit-setups");
|
|
13172
13324
|
var bundleCacheDir = configFile("bundles");
|
|
13173
|
-
var localConfigPath = Path.pipe(
|
|
13325
|
+
var localConfigPath = Path.pipe(map8((path) => path.resolve(".kitman/config.json")));
|
|
13174
13326
|
function readUserConfig(path) {
|
|
13175
13327
|
return gen(function* () {
|
|
13176
13328
|
const filePath = path ?? (yield* userConfigPath);
|
|
@@ -13298,7 +13450,7 @@ function sessionForApi(auth, apiUrl) {
|
|
|
13298
13450
|
return auth.sessions[normalizeApiUrl(apiUrl)];
|
|
13299
13451
|
}
|
|
13300
13452
|
function readAuthStore(path) {
|
|
13301
|
-
return readUserAuth(path).pipe(
|
|
13453
|
+
return readUserAuth(path).pipe(map8((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
|
|
13302
13454
|
}
|
|
13303
13455
|
function writeAuthStore(auth, path) {
|
|
13304
13456
|
return writeUserAuth(auth, path);
|
|
@@ -13446,7 +13598,7 @@ function Stream(success, error) {
|
|
|
13446
13598
|
|
|
13447
13599
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
|
|
13448
13600
|
var TypeId15 = "~effect/rpc/Rpc";
|
|
13449
|
-
var
|
|
13601
|
+
var Proto8 = {
|
|
13450
13602
|
[TypeId15]: TypeId15,
|
|
13451
13603
|
pipe() {
|
|
13452
13604
|
return pipeArguments(this, arguments);
|
|
@@ -13531,7 +13683,7 @@ var Proto7 = {
|
|
|
13531
13683
|
};
|
|
13532
13684
|
var makeProto = (options) => {
|
|
13533
13685
|
function Rpc() {}
|
|
13534
|
-
Object.setPrototypeOf(Rpc,
|
|
13686
|
+
Object.setPrototypeOf(Rpc, Proto8);
|
|
13535
13687
|
Object.assign(Rpc, options);
|
|
13536
13688
|
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
13537
13689
|
return Rpc;
|
|
@@ -13657,7 +13809,7 @@ var RpcGroupProto = {
|
|
|
13657
13809
|
}
|
|
13658
13810
|
return makeProto2({
|
|
13659
13811
|
requests,
|
|
13660
|
-
annotations:
|
|
13812
|
+
annotations: makeUnsafe4(annotations)
|
|
13661
13813
|
});
|
|
13662
13814
|
},
|
|
13663
13815
|
omit(...tags) {
|
|
@@ -13693,7 +13845,7 @@ var RpcGroupProto = {
|
|
|
13693
13845
|
context: services
|
|
13694
13846
|
});
|
|
13695
13847
|
});
|
|
13696
|
-
return
|
|
13848
|
+
return makeUnsafe4(contextMap);
|
|
13697
13849
|
});
|
|
13698
13850
|
},
|
|
13699
13851
|
prefix(prefix) {
|
|
@@ -13722,7 +13874,7 @@ var RpcGroupProto = {
|
|
|
13722
13874
|
handler,
|
|
13723
13875
|
context: services
|
|
13724
13876
|
});
|
|
13725
|
-
return
|
|
13877
|
+
return makeUnsafe4(contextMap);
|
|
13726
13878
|
}));
|
|
13727
13879
|
},
|
|
13728
13880
|
accessHandler(service) {
|
|
@@ -13747,7 +13899,7 @@ var RpcGroupProto = {
|
|
|
13747
13899
|
});
|
|
13748
13900
|
},
|
|
13749
13901
|
annotateRpcs(service, value) {
|
|
13750
|
-
return this.annotateRpcsMerge(
|
|
13902
|
+
return this.annotateRpcsMerge(make15(service, value));
|
|
13751
13903
|
},
|
|
13752
13904
|
annotateMerge(context) {
|
|
13753
13905
|
return makeProto2({
|
|
@@ -14402,7 +14554,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
|
|
|
14402
14554
|
var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
|
|
14403
14555
|
|
|
14404
14556
|
// apps/cli/src/oauth.ts
|
|
14405
|
-
var
|
|
14557
|
+
var Scope = "openid profile email offline_access kitman:cli";
|
|
14406
14558
|
var CallbackPath = "/auth/callback";
|
|
14407
14559
|
|
|
14408
14560
|
class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
|
|
@@ -14421,7 +14573,7 @@ function buildAuthorizeUrl(input) {
|
|
|
14421
14573
|
url.searchParams.set("response_type", "code");
|
|
14422
14574
|
url.searchParams.set("client_id", input.clientId);
|
|
14423
14575
|
url.searchParams.set("redirect_uri", input.redirectUri);
|
|
14424
|
-
url.searchParams.set("scope",
|
|
14576
|
+
url.searchParams.set("scope", Scope);
|
|
14425
14577
|
url.searchParams.set("code_challenge", input.codeChallenge);
|
|
14426
14578
|
url.searchParams.set("code_challenge_method", "S256");
|
|
14427
14579
|
url.searchParams.set("state", input.state);
|
|
@@ -14481,7 +14633,7 @@ function toStoredSession(token, existingRefreshToken) {
|
|
|
14481
14633
|
}
|
|
14482
14634
|
function startLoopbackServer(input) {
|
|
14483
14635
|
return gen(function* () {
|
|
14484
|
-
const code = yield*
|
|
14636
|
+
const code = yield* make16();
|
|
14485
14637
|
const context2 = yield* context();
|
|
14486
14638
|
const runSyncExit = runSyncExitWith(context2);
|
|
14487
14639
|
const server = yield* acquireRelease(sync2(() => Bun.serve({
|
|
@@ -14590,7 +14742,7 @@ function createSdkClient(input) {
|
|
|
14590
14742
|
const runPromise = runPromiseWith(yield* context());
|
|
14591
14743
|
const fetchImpl = input.fetch ?? (yield* Fetch);
|
|
14592
14744
|
let session = input.session;
|
|
14593
|
-
const refreshPermit =
|
|
14745
|
+
const refreshPermit = makeUnsafe3(1);
|
|
14594
14746
|
const refreshFrom = (stale) => refreshPermit.withPermits(1)(suspend3(() => session === stale ? tap2(refreshSession({ ...input, fetch: fetchImpl, session: stale }), (next) => sync2(() => session = next)) : succeed6(session))).pipe(mapError2((error) => new KitmanClientError({ operation: "refreshSession", message: error.message, status: 401 })));
|
|
14595
14747
|
const authorizedFetch = (resource, init) => runPromise(gen(function* () {
|
|
14596
14748
|
if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
|
|
@@ -14610,7 +14762,7 @@ function createSdkClient(input) {
|
|
|
14610
14762
|
});
|
|
14611
14763
|
}
|
|
14612
14764
|
function refreshSession(input) {
|
|
14613
|
-
const storedSession = readAuthStore(input.authPath).pipe(
|
|
14765
|
+
const storedSession = readAuthStore(input.authPath).pipe(map8((auth) => sessionForApi(auth, input.apiUrl)));
|
|
14614
14766
|
return withAuthLock(input.authPath, gen(function* () {
|
|
14615
14767
|
const stored = yield* storedSession;
|
|
14616
14768
|
if (!stored)
|
|
@@ -14625,7 +14777,7 @@ function refreshSession(input) {
|
|
|
14625
14777
|
clientId: input.clientId ?? ClientId,
|
|
14626
14778
|
refreshToken: spentToken,
|
|
14627
14779
|
...input.fetch ? { fetch: input.fetch } : undefined
|
|
14628
|
-
}).pipe(
|
|
14780
|
+
}).pipe(map8((token) => toStoredSession(token, spentToken)));
|
|
14629
14781
|
const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
|
|
14630
14782
|
const current = yield* storedSession;
|
|
14631
14783
|
if (current?.refreshToken !== spentToken)
|
|
@@ -15021,7 +15173,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15021
15173
|
let lastId = 0;
|
|
15022
15174
|
let lost = false;
|
|
15023
15175
|
const notifications = yield* unbounded2();
|
|
15024
|
-
const ended = yield*
|
|
15176
|
+
const ended = yield* make16();
|
|
15025
15177
|
const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
|
|
15026
15178
|
onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
|
|
15027
15179
|
onNone: () => void_3,
|
|
@@ -15048,7 +15200,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15048
15200
|
if (lost)
|
|
15049
15201
|
return yield* new HerdrCoreConnectionLost2({ method });
|
|
15050
15202
|
const id = ++lastId;
|
|
15051
|
-
const deferred = yield*
|
|
15203
|
+
const deferred = yield* make16();
|
|
15052
15204
|
pending.set(id, { method, deferred });
|
|
15053
15205
|
yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
|
|
15054
15206
|
return yield* _await(deferred);
|
|
@@ -15080,9 +15232,9 @@ var herdrCoreOver = (transport) => ({
|
|
|
15080
15232
|
...input.name === undefined ? undefined : { name: input.name },
|
|
15081
15233
|
no_parent: input.noParent === true
|
|
15082
15234
|
}),
|
|
15083
|
-
list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(
|
|
15235
|
+
list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map8((listed) => listed.terminals)),
|
|
15084
15236
|
get: (terminal) => request("terminal.get", Terminal2, { terminal }),
|
|
15085
|
-
read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(
|
|
15237
|
+
read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map8((screen) => screen.text)),
|
|
15086
15238
|
interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
|
|
15087
15239
|
terminal,
|
|
15088
15240
|
...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
|
|
@@ -15122,7 +15274,7 @@ var herdrCoreOver = (transport) => ({
|
|
|
15122
15274
|
return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
|
|
15123
15275
|
};
|
|
15124
15276
|
const snapshot = { type: "snapshot", terminals: subscribed.terminals };
|
|
15125
|
-
return concat(
|
|
15277
|
+
return concat(make11(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
|
|
15126
15278
|
}))
|
|
15127
15279
|
});
|
|
15128
15280
|
var spawnedTransport = (env) => gen(function* () {
|
|
@@ -15145,7 +15297,7 @@ var coreEnv = (options) => {
|
|
|
15145
15297
|
const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
|
|
15146
15298
|
return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
|
|
15147
15299
|
};
|
|
15148
|
-
var herdrCoreLayer2 = (options) => effect(HerdrCore2,
|
|
15300
|
+
var herdrCoreLayer2 = (options) => effect(HerdrCore2, map8(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
|
|
15149
15301
|
var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
|
|
15150
15302
|
var UpdateRefused = Struct({
|
|
15151
15303
|
error: Struct({ message: String4, hint: optionalKey(String4) })
|
|
@@ -15168,13 +15320,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
|
|
|
15168
15320
|
], { concurrency: 3 });
|
|
15169
15321
|
return { stdout, stderr, exitCode };
|
|
15170
15322
|
}).pipe(scoped, catchReason("PlatformError", "NotFound", () => fail7(new HerdrCoreMissing2)));
|
|
15171
|
-
const reason = yield* run(["update", "--json"]).pipe(
|
|
15323
|
+
const reason = yield* run(["update", "--json"]).pipe(map8(({ stdout, stderr, exitCode }) => exitCode === 0 ? undefined : refusalReason(stdout) ?? (stderr.trim() || `it exited with code ${exitCode}`)), catchTag("PlatformError", (error) => succeed6(error.message)), timeoutOrElse({
|
|
15172
15324
|
duration: options.timeout,
|
|
15173
15325
|
orElse: () => succeed6(`it did not finish within ${options.timeout}`)
|
|
15174
15326
|
}));
|
|
15175
15327
|
if (reason === undefined)
|
|
15176
15328
|
return;
|
|
15177
|
-
const version = yield* run(["--version"]).pipe(
|
|
15329
|
+
const version = yield* run(["--version"]).pipe(map8(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
|
|
15178
15330
|
return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
|
|
15179
15331
|
});
|
|
15180
15332
|
|
|
@@ -15213,7 +15365,7 @@ var runProcess2 = (argv, options) => gen(function* () {
|
|
|
15213
15365
|
const spawner = yield* ChildProcessSpawner;
|
|
15214
15366
|
const [command, ...args] = argv;
|
|
15215
15367
|
const handle = yield* spawner.spawn(make3(command, args, {
|
|
15216
|
-
stdin: options.stdin === undefined ? "ignore" :
|
|
15368
|
+
stdin: options.stdin === undefined ? "ignore" : make11(new TextEncoder().encode(options.stdin)),
|
|
15217
15369
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15218
15370
|
env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
|
|
15219
15371
|
}));
|
|
@@ -15259,7 +15411,7 @@ var detectHarnesses2 = gen(function* () {
|
|
|
15259
15411
|
const home = (yield* optionalEnv("HOME")) ?? "/";
|
|
15260
15412
|
const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
|
|
15261
15413
|
const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
|
|
15262
|
-
const any = (items, test) =>
|
|
15414
|
+
const any = (items, test) => map8(findFirst(items, test), isSome);
|
|
15263
15415
|
const loginFound = (login) => gen(function* () {
|
|
15264
15416
|
const file = path.join(home, login.path);
|
|
15265
15417
|
if (!(yield* exists(file)))
|
|
@@ -15275,7 +15427,7 @@ var detectHarnesses2 = gen(function* () {
|
|
|
15275
15427
|
unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
|
|
15276
15428
|
continue;
|
|
15277
15429
|
}
|
|
15278
|
-
const loggedIn = (yield* any(harness.keys, (key) =>
|
|
15430
|
+
const loggedIn = (yield* any(harness.keys, (key) => map8(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
|
|
15279
15431
|
if (loggedIn)
|
|
15280
15432
|
harnesses.push(harness.id);
|
|
15281
15433
|
else
|
|
@@ -15538,7 +15690,7 @@ var launchableHarnesses = (input) => {
|
|
|
15538
15690
|
...input.harnesses.unavailable,
|
|
15539
15691
|
...refused.map((harness) => ({
|
|
15540
15692
|
harness,
|
|
15541
|
-
missing: [`${harness} cannot run in srt yet; set
|
|
15693
|
+
missing: [`${harness} cannot run in srt yet; set the Runner's sandbox to docker or host to offer it`]
|
|
15542
15694
|
}))
|
|
15543
15695
|
]
|
|
15544
15696
|
};
|
|
@@ -15636,4 +15788,4 @@ function checkServices(declaration) {
|
|
|
15636
15788
|
return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
|
|
15637
15789
|
}
|
|
15638
15790
|
|
|
15639
|
-
export { WebCrypto, SecureRandom, layerWebCrypto, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, defaultRunnerCapabilities, 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, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, 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 };
|
|
15791
|
+
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, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, 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, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, 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 };
|