@kitman-sh/cli 0.13.8 → 0.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-q5w3v4k1.js → chunk-0tjg9eya.js} +1 -1
- package/dist/{chunk-zz589n7a.js → chunk-0wj65j5e.js} +12 -12
- package/dist/{chunk-7bytsxkf.js → chunk-1ht6jwzm.js} +13 -12
- package/dist/{chunk-5zth85pj.js → chunk-53qp6kcp.js} +2 -2
- package/dist/{chunk-gj1padza.js → chunk-69fcvx7d.js} +39 -39
- package/dist/{chunk-eg1n8wvf.js → chunk-6jtjcvnc.js} +44 -44
- package/dist/{chunk-vm2qy986.js → chunk-9gg1w4aa.js} +283 -375
- package/dist/{chunk-96svx416.js → chunk-a44ebqzx.js} +6 -6
- package/dist/{chunk-0h49y8gf.js → chunk-aezq3fyy.js} +74 -214
- package/dist/{chunk-gq7y5v3e.js → chunk-cw61zyh5.js} +1 -1
- package/dist/{chunk-5zhh41gb.js → chunk-ezv4p0zr.js} +4 -4
- package/dist/{chunk-gy9rf14f.js → chunk-fh58za51.js} +3 -3
- package/dist/{chunk-byeasm6x.js → chunk-hezxa6q5.js} +7 -7
- package/dist/{chunk-mtkstrh3.js → chunk-kq88aaa3.js} +4 -4
- package/dist/{chunk-cq2h8q9e.js → chunk-ksgt1tdc.js} +4 -4
- package/dist/{chunk-c4ccpwjy.js → chunk-pj3mer60.js} +4 -4
- package/dist/{chunk-zw3gf6r5.js → chunk-qjqa338f.js} +333 -94
- package/dist/{chunk-h1rmw7yk.js → chunk-qkjfx2ts.js} +14 -14
- package/dist/{chunk-08dyrk6y.js → chunk-rz18qefg.js} +10 -10
- package/dist/{chunk-gr17n0z3.js → chunk-s63fjc69.js} +25 -25
- package/dist/{chunk-cbpb2rww.js → chunk-tspf987k.js} +8 -8
- package/dist/{chunk-ff1r9vcq.js → chunk-v190zzc5.js} +1 -1
- package/dist/{chunk-a24jc5rx.js → chunk-wzr1n3zy.js} +7 -3
- package/dist/{chunk-z68rzf0f.js → chunk-x8sewxzm.js} +145 -145
- package/dist/{chunk-y1krmnbv.js → chunk-z5f7g1w1.js} +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -17,14 +17,9 @@ import {
|
|
|
17
17
|
isNullish,
|
|
18
18
|
hasProperty,
|
|
19
19
|
symbol,
|
|
20
|
-
hash,
|
|
21
|
-
combine,
|
|
22
|
-
number,
|
|
23
|
-
string,
|
|
24
20
|
structure,
|
|
25
21
|
array,
|
|
26
22
|
symbol2,
|
|
27
|
-
equals,
|
|
28
23
|
asEquivalence,
|
|
29
24
|
symbolRedactable,
|
|
30
25
|
redact,
|
|
@@ -38,7 +33,7 @@ import {
|
|
|
38
33
|
assignProperty,
|
|
39
34
|
PipeInspectableProto,
|
|
40
35
|
withFiber,
|
|
41
|
-
|
|
36
|
+
make13,
|
|
42
37
|
strictEqual,
|
|
43
38
|
Tuple,
|
|
44
39
|
Number2,
|
|
@@ -52,19 +47,20 @@ import {
|
|
|
52
47
|
fromNullishOr,
|
|
53
48
|
fromUndefinedOr,
|
|
54
49
|
getOrUndefined,
|
|
55
|
-
liftThrowable,
|
|
56
50
|
map4,
|
|
57
51
|
flatMap,
|
|
58
52
|
Service2,
|
|
59
|
-
|
|
53
|
+
makeUnsafe3,
|
|
60
54
|
empty3,
|
|
61
|
-
|
|
55
|
+
make14,
|
|
62
56
|
add,
|
|
63
57
|
getOrUndefined2,
|
|
64
58
|
getOrUndefinedUnsafe,
|
|
65
|
-
|
|
59
|
+
get3,
|
|
66
60
|
merge3,
|
|
67
61
|
Reference,
|
|
62
|
+
fromInputUnsafe,
|
|
63
|
+
isFinite,
|
|
68
64
|
millis,
|
|
69
65
|
seconds,
|
|
70
66
|
toMillis,
|
|
@@ -83,15 +79,14 @@ import {
|
|
|
83
79
|
TaggedError,
|
|
84
80
|
DisablePropagation,
|
|
85
81
|
sync,
|
|
86
|
-
map7,
|
|
87
|
-
ClockRef,
|
|
88
|
-
currentTimeMillis2,
|
|
89
82
|
ConsoleRef,
|
|
90
83
|
succeed3,
|
|
91
84
|
fail4,
|
|
85
|
+
void_2,
|
|
92
86
|
isSuccess2,
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
isFailure2,
|
|
88
|
+
makeUnsafe4,
|
|
89
|
+
make15,
|
|
95
90
|
_await,
|
|
96
91
|
fail5,
|
|
97
92
|
isDone,
|
|
@@ -99,8 +94,12 @@ import {
|
|
|
99
94
|
succeed4,
|
|
100
95
|
doneUnsafe,
|
|
101
96
|
TracerTimingEnabled,
|
|
97
|
+
Scope,
|
|
98
|
+
makeUnsafe5,
|
|
102
99
|
provide,
|
|
100
|
+
addFinalizerExit,
|
|
103
101
|
addFinalizer,
|
|
102
|
+
close,
|
|
104
103
|
succeed5,
|
|
105
104
|
effect,
|
|
106
105
|
effectContext,
|
|
@@ -113,8 +112,9 @@ import {
|
|
|
113
112
|
hasInterrupts2,
|
|
114
113
|
Done2,
|
|
115
114
|
done,
|
|
116
|
-
IllegalArgumentError,
|
|
117
115
|
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
|
+
map7,
|
|
144
144
|
as,
|
|
145
145
|
asVoid,
|
|
146
146
|
catch_,
|
|
@@ -152,6 +152,7 @@ import {
|
|
|
152
152
|
tapCause,
|
|
153
153
|
retry,
|
|
154
154
|
ignore,
|
|
155
|
+
ignoreCause,
|
|
155
156
|
orElseSucceed,
|
|
156
157
|
timeout,
|
|
157
158
|
timeoutOrElse,
|
|
@@ -163,6 +164,7 @@ import {
|
|
|
163
164
|
context,
|
|
164
165
|
contextWith,
|
|
165
166
|
provide3,
|
|
167
|
+
provideContext2,
|
|
166
168
|
serviceOption,
|
|
167
169
|
updateContext,
|
|
168
170
|
provideService,
|
|
@@ -173,6 +175,7 @@ import {
|
|
|
173
175
|
addFinalizer2,
|
|
174
176
|
ensuring2,
|
|
175
177
|
onError,
|
|
178
|
+
onExit,
|
|
176
179
|
cached,
|
|
177
180
|
interrupt3,
|
|
178
181
|
interruptible,
|
|
@@ -184,6 +187,7 @@ import {
|
|
|
184
187
|
withParentSpan,
|
|
185
188
|
forkScoped,
|
|
186
189
|
runFork,
|
|
190
|
+
runForkWith,
|
|
187
191
|
runPromise,
|
|
188
192
|
runPromiseWith,
|
|
189
193
|
runSync,
|
|
@@ -194,9 +198,16 @@ import {
|
|
|
194
198
|
logError,
|
|
195
199
|
effectify,
|
|
196
200
|
decode,
|
|
201
|
+
makeUnsafe6,
|
|
202
|
+
make16,
|
|
203
|
+
now,
|
|
204
|
+
nowUnsafe,
|
|
205
|
+
toDateUtc,
|
|
206
|
+
toEpochMillis,
|
|
207
|
+
formatIso,
|
|
197
208
|
defaultParseOptions,
|
|
198
209
|
omit,
|
|
199
|
-
|
|
210
|
+
map8,
|
|
200
211
|
declare,
|
|
201
212
|
decodeUnknownEffect2,
|
|
202
213
|
decodeEffect,
|
|
@@ -261,15 +272,20 @@ import {
|
|
|
261
272
|
decodeJsonStringOption,
|
|
262
273
|
encodeJsonStringSync,
|
|
263
274
|
encodePrettyJsonString
|
|
264
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-qjqa338f.js";
|
|
265
276
|
import {
|
|
266
277
|
map,
|
|
267
278
|
makeEquivalence,
|
|
279
|
+
toNumber,
|
|
268
280
|
bytes,
|
|
281
|
+
join,
|
|
282
|
+
interrupt,
|
|
283
|
+
getCurrent,
|
|
284
|
+
runIn,
|
|
269
285
|
BadArgument,
|
|
270
286
|
systemError,
|
|
271
287
|
badArgument,
|
|
272
|
-
|
|
288
|
+
makeUnsafe,
|
|
273
289
|
make8,
|
|
274
290
|
make9,
|
|
275
291
|
sliding,
|
|
@@ -281,19 +297,17 @@ import {
|
|
|
281
297
|
endUnsafe,
|
|
282
298
|
take,
|
|
283
299
|
poll,
|
|
284
|
-
|
|
300
|
+
makeUnsafe2,
|
|
285
301
|
fromTransform,
|
|
286
302
|
mapDone,
|
|
287
303
|
isSink,
|
|
288
304
|
fromChannel,
|
|
289
305
|
drain,
|
|
290
|
-
make10,
|
|
291
|
-
get3,
|
|
292
306
|
isStream,
|
|
293
307
|
fromChannel2,
|
|
294
308
|
callback,
|
|
295
309
|
empty2,
|
|
296
|
-
|
|
310
|
+
make10,
|
|
297
311
|
suspend,
|
|
298
312
|
fail2,
|
|
299
313
|
fromQueue,
|
|
@@ -319,16 +333,16 @@ import {
|
|
|
319
333
|
mkArrayBuffer,
|
|
320
334
|
toReadableStreamEffect,
|
|
321
335
|
FileSystem,
|
|
322
|
-
|
|
336
|
+
make11,
|
|
323
337
|
FileTypeId,
|
|
324
338
|
WatchBackend,
|
|
325
339
|
Path,
|
|
326
|
-
|
|
340
|
+
make12,
|
|
327
341
|
option,
|
|
328
342
|
String2,
|
|
329
343
|
optionalEnv,
|
|
330
344
|
harnessesUnsupportedInSrt2
|
|
331
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-aezq3fyy.js";
|
|
332
346
|
import {
|
|
333
347
|
isDateTime,
|
|
334
348
|
Numeric,
|
|
@@ -341,7 +355,7 @@ import {
|
|
|
341
355
|
SecretScope,
|
|
342
356
|
SecretHosts,
|
|
343
357
|
isSecretReference
|
|
344
|
-
} from "./chunk-
|
|
358
|
+
} from "./chunk-0tjg9eya.js";
|
|
345
359
|
import {
|
|
346
360
|
isRedacted,
|
|
347
361
|
make,
|
|
@@ -355,241 +369,11 @@ import {
|
|
|
355
369
|
make3,
|
|
356
370
|
parseFdName,
|
|
357
371
|
fdName
|
|
358
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-kq88aaa3.js";
|
|
359
373
|
|
|
360
374
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
361
375
|
var makeEquivalence3 = Tuple;
|
|
362
376
|
|
|
363
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
|
|
364
|
-
var Clock = ClockRef;
|
|
365
|
-
var currentTimeMillis = currentTimeMillis2;
|
|
366
|
-
|
|
367
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
|
|
368
|
-
var TypeId = "~effect/DateTime";
|
|
369
|
-
var TimeZoneTypeId = "~effect/DateTime/TimeZone";
|
|
370
|
-
var Proto = {
|
|
371
|
-
[TypeId]: TypeId,
|
|
372
|
-
pipe() {
|
|
373
|
-
return pipeArguments(this, arguments);
|
|
374
|
-
},
|
|
375
|
-
[NodeInspectSymbol]() {
|
|
376
|
-
return this.toString();
|
|
377
|
-
},
|
|
378
|
-
toJSON() {
|
|
379
|
-
return toDateUtc(this).toJSON();
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
var ProtoUtc = {
|
|
383
|
-
...Proto,
|
|
384
|
-
_tag: "Utc",
|
|
385
|
-
[symbol]() {
|
|
386
|
-
return number(this.epochMilliseconds);
|
|
387
|
-
},
|
|
388
|
-
[symbol2](that) {
|
|
389
|
-
return isDateTime2(that) && that._tag === "Utc" && this.epochMilliseconds === that.epochMilliseconds;
|
|
390
|
-
},
|
|
391
|
-
toString() {
|
|
392
|
-
return `DateTime.Utc(${toDateUtc(this).toJSON()})`;
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
var ProtoZoned = {
|
|
396
|
-
...Proto,
|
|
397
|
-
_tag: "Zoned",
|
|
398
|
-
[symbol]() {
|
|
399
|
-
return combine(number(this.epochMilliseconds))(hash(this.zone));
|
|
400
|
-
},
|
|
401
|
-
[symbol2](that) {
|
|
402
|
-
return isDateTime2(that) && that._tag === "Zoned" && this.epochMilliseconds === that.epochMilliseconds && equals(this.zone, that.zone);
|
|
403
|
-
},
|
|
404
|
-
toString() {
|
|
405
|
-
return `DateTime.Zoned(${formatIsoZoned(this)})`;
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
var ProtoTimeZone = {
|
|
409
|
-
[TimeZoneTypeId]: TimeZoneTypeId,
|
|
410
|
-
[NodeInspectSymbol]() {
|
|
411
|
-
return this.toString();
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
var ProtoTimeZoneNamed = {
|
|
415
|
-
...ProtoTimeZone,
|
|
416
|
-
_tag: "Named",
|
|
417
|
-
[symbol]() {
|
|
418
|
-
return string(`Named:${this.id}`);
|
|
419
|
-
},
|
|
420
|
-
[symbol2](that) {
|
|
421
|
-
return isTimeZone(that) && that._tag === "Named" && this.id === that.id;
|
|
422
|
-
},
|
|
423
|
-
toString() {
|
|
424
|
-
return `TimeZone.Named(${this.id})`;
|
|
425
|
-
},
|
|
426
|
-
toJSON() {
|
|
427
|
-
return {
|
|
428
|
-
_id: "TimeZone",
|
|
429
|
-
_tag: "Named",
|
|
430
|
-
id: this.id
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
var ProtoTimeZoneOffset = {
|
|
435
|
-
...ProtoTimeZone,
|
|
436
|
-
_tag: "Offset",
|
|
437
|
-
[symbol]() {
|
|
438
|
-
return string(`Offset:${this.offset}`);
|
|
439
|
-
},
|
|
440
|
-
[symbol2](that) {
|
|
441
|
-
return isTimeZone(that) && that._tag === "Offset" && this.offset === that.offset;
|
|
442
|
-
},
|
|
443
|
-
toString() {
|
|
444
|
-
return `TimeZone.Offset(${offsetToString(this.offset)})`;
|
|
445
|
-
},
|
|
446
|
-
toJSON() {
|
|
447
|
-
return {
|
|
448
|
-
_id: "TimeZone",
|
|
449
|
-
_tag: "Offset",
|
|
450
|
-
offset: this.offset
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
var cacheSlot = {
|
|
455
|
-
value: undefined,
|
|
456
|
-
enumerable: false,
|
|
457
|
-
writable: true
|
|
458
|
-
};
|
|
459
|
-
var sealedCaches = /* @__PURE__ */ new WeakMap;
|
|
460
|
-
var cacheAccessor = (key, slots) => ({
|
|
461
|
-
get() {
|
|
462
|
-
return Object.isExtensible(this) ? undefined : sealedCaches.get(this)?.[key];
|
|
463
|
-
},
|
|
464
|
-
set(value) {
|
|
465
|
-
if (Object.isExtensible(this)) {
|
|
466
|
-
for (const slot of slots) {
|
|
467
|
-
Object.defineProperty(this, slot, cacheSlot);
|
|
468
|
-
}
|
|
469
|
-
this[key] = value;
|
|
470
|
-
} else {
|
|
471
|
-
let caches = sealedCaches.get(this);
|
|
472
|
-
if (caches === undefined) {
|
|
473
|
-
caches = {};
|
|
474
|
-
sealedCaches.set(this, caches);
|
|
475
|
-
}
|
|
476
|
-
caches[key] = value;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
var zonedSlots = ["partsUtc", "adjustedEpochMilliseconds", "partsAdjusted"];
|
|
481
|
-
Object.defineProperty(ProtoUtc, "partsUtc", cacheAccessor("partsUtc", ["partsUtc"]));
|
|
482
|
-
Object.defineProperties(ProtoZoned, {
|
|
483
|
-
partsUtc: cacheAccessor("partsUtc", zonedSlots),
|
|
484
|
-
adjustedEpochMilliseconds: cacheAccessor("adjustedEpochMilliseconds", zonedSlots),
|
|
485
|
-
partsAdjusted: cacheAccessor("partsAdjusted", zonedSlots)
|
|
486
|
-
});
|
|
487
|
-
var isDateTime2 = (u) => hasProperty(u, TypeId);
|
|
488
|
-
var isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
|
|
489
|
-
var makeUtc = (epochMillis) => {
|
|
490
|
-
const self = Object.create(ProtoUtc);
|
|
491
|
-
self.epochMilliseconds = epochMillis;
|
|
492
|
-
return self;
|
|
493
|
-
};
|
|
494
|
-
var fromDateUnsafe = (date) => {
|
|
495
|
-
const epochMillis = date.getTime();
|
|
496
|
-
if (Number.isNaN(epochMillis)) {
|
|
497
|
-
throw new IllegalArgumentError("Invalid date");
|
|
498
|
-
}
|
|
499
|
-
return makeUtc(epochMillis);
|
|
500
|
-
};
|
|
501
|
-
var makeUnsafe6 = (input) => {
|
|
502
|
-
if (isDateTime2(input)) {
|
|
503
|
-
return input;
|
|
504
|
-
} else if (input instanceof Date) {
|
|
505
|
-
return fromDateUnsafe(input);
|
|
506
|
-
} else if (typeof input === "object") {
|
|
507
|
-
if ("epochMilliseconds" in input) {
|
|
508
|
-
return fromDateUnsafe(new Date(input.epochMilliseconds));
|
|
509
|
-
}
|
|
510
|
-
const date = new Date(0);
|
|
511
|
-
setPartsDate(date, input);
|
|
512
|
-
return fromDateUnsafe(date);
|
|
513
|
-
} else if (typeof input === "string" && !hasZone(input)) {
|
|
514
|
-
return fromDateUnsafe(new Date(input + "Z"));
|
|
515
|
-
}
|
|
516
|
-
return fromDateUnsafe(new Date(input));
|
|
517
|
-
};
|
|
518
|
-
var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
|
|
519
|
-
var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
|
|
520
|
-
var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
|
|
521
|
-
var make4 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
|
|
522
|
-
var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
|
|
523
|
-
var nowUnsafe = () => makeUtc(Date.now());
|
|
524
|
-
var toDateUtc = (self) => new Date(self.epochMilliseconds);
|
|
525
|
-
var toDate2 = (self) => {
|
|
526
|
-
if (self._tag === "Utc") {
|
|
527
|
-
return new Date(self.epochMilliseconds);
|
|
528
|
-
} else if (self.zone._tag === "Offset") {
|
|
529
|
-
return new Date(self.epochMilliseconds + self.zone.offset);
|
|
530
|
-
} else if (self.adjustedEpochMilliseconds !== undefined) {
|
|
531
|
-
return new Date(self.adjustedEpochMilliseconds);
|
|
532
|
-
}
|
|
533
|
-
let bc = false;
|
|
534
|
-
const parts = self.zone.format.formatToParts(self.epochMilliseconds).filter((_) => {
|
|
535
|
-
if (_.type === "era") {
|
|
536
|
-
bc = _.value === "BC";
|
|
537
|
-
return false;
|
|
538
|
-
}
|
|
539
|
-
return _.type !== "literal";
|
|
540
|
-
});
|
|
541
|
-
const year = Number(parts[2].value);
|
|
542
|
-
const date = new Date(0);
|
|
543
|
-
date.setUTCFullYear(bc ? 1 - year : year, Number(parts[0].value) - 1, Number(parts[1].value));
|
|
544
|
-
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);
|
|
545
|
-
self.adjustedEpochMilliseconds = date.getTime();
|
|
546
|
-
return date;
|
|
547
|
-
};
|
|
548
|
-
var zonedOffset = (self) => {
|
|
549
|
-
const date = toDate2(self);
|
|
550
|
-
return date.getTime() - toEpochMillis(self);
|
|
551
|
-
};
|
|
552
|
-
var offsetToString = (offset) => {
|
|
553
|
-
const abs = Math.abs(offset);
|
|
554
|
-
let hours = Math.floor(abs / (60 * 60 * 1000));
|
|
555
|
-
let minutes = Math.round(abs % (60 * 60 * 1000) / (60 * 1000));
|
|
556
|
-
if (minutes === 60) {
|
|
557
|
-
hours += 1;
|
|
558
|
-
minutes = 0;
|
|
559
|
-
}
|
|
560
|
-
return `${offset < 0 ? "-" : "+"}${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
|
|
561
|
-
};
|
|
562
|
-
var zonedOffsetIso = (self) => offsetToString(zonedOffset(self));
|
|
563
|
-
var toEpochMillis = (self) => self.epochMilliseconds;
|
|
564
|
-
var setPartsDate = (date, parts) => {
|
|
565
|
-
if (parts.year !== undefined || parts.month !== undefined || parts.day !== undefined) {
|
|
566
|
-
date.setUTCFullYear(parts.year ?? date.getUTCFullYear(), parts.month !== undefined ? parts.month - 1 : date.getUTCMonth(), parts.day ?? date.getUTCDate());
|
|
567
|
-
}
|
|
568
|
-
if (parts.weekDay !== undefined) {
|
|
569
|
-
const diff = parts.weekDay - date.getUTCDay();
|
|
570
|
-
date.setUTCDate(date.getUTCDate() + diff);
|
|
571
|
-
}
|
|
572
|
-
if (parts.hour !== undefined) {
|
|
573
|
-
date.setUTCHours(parts.hour);
|
|
574
|
-
}
|
|
575
|
-
if (parts.minute !== undefined) {
|
|
576
|
-
date.setUTCMinutes(parts.minute);
|
|
577
|
-
}
|
|
578
|
-
if (parts.second !== undefined) {
|
|
579
|
-
date.setUTCSeconds(parts.second);
|
|
580
|
-
}
|
|
581
|
-
if (parts.millisecond !== undefined) {
|
|
582
|
-
date.setUTCMilliseconds(parts.millisecond);
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
var constDayMillis = 24 * 60 * 60 * 1000;
|
|
586
|
-
var formatIso2 = (self) => toDateUtc(self).toISOString();
|
|
587
|
-
var formatIsoOffset = (self) => {
|
|
588
|
-
const date = toDate2(self);
|
|
589
|
-
return self._tag === "Utc" ? date.toISOString() : `${date.toISOString().slice(0, -1)}${zonedOffsetIso(self)}`;
|
|
590
|
-
};
|
|
591
|
-
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
592
|
-
|
|
593
377
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Metric.js
|
|
594
378
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
595
379
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
@@ -599,10 +383,10 @@ var MetricRegistryKey = "effect/Metric/MetricRegistry";
|
|
|
599
383
|
var MetricRegistry = /* @__PURE__ */ Reference(MetricRegistryKey, {
|
|
600
384
|
defaultValue: () => new Map
|
|
601
385
|
});
|
|
602
|
-
var
|
|
386
|
+
var TypeId = "~effect/Metric";
|
|
603
387
|
|
|
604
388
|
class Metric$ {
|
|
605
|
-
[
|
|
389
|
+
[TypeId] = TypeId;
|
|
606
390
|
#extraAttributes;
|
|
607
391
|
#mergedAttributes;
|
|
608
392
|
#key = "";
|
|
@@ -625,7 +409,7 @@ class Metric$ {
|
|
|
625
409
|
}
|
|
626
410
|
hook(context) {
|
|
627
411
|
const key = this.key(context);
|
|
628
|
-
const registry =
|
|
412
|
+
const registry = get3(context, MetricRegistry);
|
|
629
413
|
let metadata = registry.get(key);
|
|
630
414
|
if (isUndefined(metadata)) {
|
|
631
415
|
metadata = this.metadata(this.createHooks());
|
|
@@ -634,11 +418,11 @@ class Metric$ {
|
|
|
634
418
|
return metadata.hooks;
|
|
635
419
|
}
|
|
636
420
|
removeUnsafe(context) {
|
|
637
|
-
|
|
421
|
+
get3(context, MetricRegistry).delete(this.key(context));
|
|
638
422
|
}
|
|
639
423
|
registerUnsafe(context, hooks) {
|
|
640
424
|
const key = this.key(context);
|
|
641
|
-
const registry =
|
|
425
|
+
const registry = get3(context, MetricRegistry);
|
|
642
426
|
const metadata = this.metadata({
|
|
643
427
|
get: hooks.get,
|
|
644
428
|
update: constVoid,
|
|
@@ -654,7 +438,7 @@ class Metric$ {
|
|
|
654
438
|
};
|
|
655
439
|
}
|
|
656
440
|
key(context) {
|
|
657
|
-
const extraAttributes =
|
|
441
|
+
const extraAttributes = get3(context, CurrentMetricAttributes);
|
|
658
442
|
if (extraAttributes !== this.#extraAttributes) {
|
|
659
443
|
this.#extraAttributes = extraAttributes;
|
|
660
444
|
const merged = mergeAttributes(this.attributes, extraAttributes);
|
|
@@ -897,23 +681,147 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
|
|
|
897
681
|
// node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
|
|
898
682
|
var runMain = runMain2;
|
|
899
683
|
|
|
900
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/
|
|
901
|
-
var
|
|
902
|
-
var
|
|
903
|
-
|
|
904
|
-
|
|
684
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
|
|
685
|
+
var TypeId2 = "~effect/RcRef";
|
|
686
|
+
var stateEmpty = {
|
|
687
|
+
_tag: "Empty"
|
|
688
|
+
};
|
|
689
|
+
var stateClosed = {
|
|
690
|
+
_tag: "Closed"
|
|
691
|
+
};
|
|
692
|
+
var variance = {
|
|
693
|
+
_A: identity,
|
|
694
|
+
_E: identity
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
class RcRefImpl {
|
|
698
|
+
[TypeId2] = variance;
|
|
699
|
+
pipe() {
|
|
700
|
+
return pipeArguments(this, arguments);
|
|
701
|
+
}
|
|
702
|
+
state = stateEmpty;
|
|
703
|
+
acquire;
|
|
704
|
+
context;
|
|
705
|
+
scope;
|
|
706
|
+
idleTimeToLive;
|
|
707
|
+
constructor(acquire, context, scope, idleTimeToLive) {
|
|
708
|
+
this.acquire = acquire;
|
|
709
|
+
this.context = context;
|
|
710
|
+
this.scope = scope;
|
|
711
|
+
this.idleTimeToLive = idleTimeToLive;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
var make4 = (options) => withFiber2((fiber) => {
|
|
715
|
+
const context = fiber.context;
|
|
716
|
+
const scope = get3(context, Scope);
|
|
717
|
+
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
718
|
+
return as(addFinalizerExit(scope, () => {
|
|
719
|
+
const state = ref.state;
|
|
720
|
+
ref.state = stateClosed;
|
|
721
|
+
if (state._tag === "Acquired")
|
|
722
|
+
return close(state.scope, void_2);
|
|
723
|
+
if (state._tag === "Acquiring")
|
|
724
|
+
return interrupt(state.fiber);
|
|
725
|
+
return void_3;
|
|
726
|
+
}), ref);
|
|
727
|
+
});
|
|
728
|
+
var getState = (self, restore) => {
|
|
729
|
+
switch (self.state._tag) {
|
|
730
|
+
case "Closed": {
|
|
731
|
+
return interrupt3;
|
|
732
|
+
}
|
|
733
|
+
case "Acquired": {
|
|
734
|
+
const state = self.state;
|
|
735
|
+
state.refCount++;
|
|
736
|
+
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
737
|
+
}
|
|
738
|
+
case "Acquiring": {
|
|
739
|
+
const state = self.state;
|
|
740
|
+
state.awaiters++;
|
|
741
|
+
return awaitAcquiring(self, state, restore);
|
|
742
|
+
}
|
|
743
|
+
case "Empty": {
|
|
744
|
+
const acquiring = {
|
|
745
|
+
_tag: "Acquiring",
|
|
746
|
+
fiber: undefined,
|
|
747
|
+
awaiters: 1,
|
|
748
|
+
acquired: undefined
|
|
749
|
+
};
|
|
750
|
+
self.state = acquiring;
|
|
751
|
+
const scope = makeUnsafe5();
|
|
752
|
+
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
753
|
+
if (self.state !== acquiring) {
|
|
754
|
+
return interrupt3;
|
|
755
|
+
}
|
|
756
|
+
const state = {
|
|
757
|
+
_tag: "Acquired",
|
|
758
|
+
value,
|
|
759
|
+
scope,
|
|
760
|
+
fiber: undefined,
|
|
761
|
+
refCount: acquiring.awaiters,
|
|
762
|
+
invalidated: false
|
|
763
|
+
};
|
|
764
|
+
self.state = state;
|
|
765
|
+
acquiring.acquired = state;
|
|
766
|
+
return succeed6(state);
|
|
767
|
+
}), onExit((exit) => {
|
|
768
|
+
if (isSuccess2(exit))
|
|
769
|
+
return void_3;
|
|
770
|
+
if (self.state === acquiring)
|
|
771
|
+
self.state = stateEmpty;
|
|
772
|
+
return close(scope, exit);
|
|
773
|
+
}));
|
|
774
|
+
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
775
|
+
return awaitAcquiring(self, acquiring, restore);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
780
|
+
const acquired = acquiring.acquired;
|
|
781
|
+
if (acquired !== undefined) {
|
|
782
|
+
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
783
|
+
}
|
|
784
|
+
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
785
|
+
return void_3;
|
|
786
|
+
self.state = stateEmpty;
|
|
787
|
+
return interrupt(acquiring.fiber);
|
|
788
|
+
});
|
|
789
|
+
var get4 = (self_) => {
|
|
790
|
+
const self = self_;
|
|
791
|
+
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
792
|
+
};
|
|
793
|
+
var release = (self, state) => {
|
|
794
|
+
state.refCount--;
|
|
795
|
+
if (state.refCount > 0) {
|
|
796
|
+
return void_3;
|
|
905
797
|
}
|
|
906
|
-
|
|
798
|
+
const idleTimeToLive = self.idleTimeToLive;
|
|
799
|
+
if (idleTimeToLive === undefined || state.invalidated) {
|
|
800
|
+
if (self.state === state) {
|
|
801
|
+
self.state = stateEmpty;
|
|
802
|
+
}
|
|
803
|
+
return close(state.scope, void_2);
|
|
804
|
+
} else if (!isFinite(idleTimeToLive)) {
|
|
805
|
+
return void_3;
|
|
806
|
+
}
|
|
807
|
+
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
808
|
+
if (self.state === state && state.refCount === 0) {
|
|
809
|
+
self.state = stateEmpty;
|
|
810
|
+
return ignoreCause(close(state.scope, void_2), {
|
|
811
|
+
log: "Unhandled",
|
|
812
|
+
message: "Unhandled error in RcRef finalizer"
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
return void_3;
|
|
816
|
+
})).pipe(ensuring2(sync2(() => {
|
|
817
|
+
state.fiber = undefined;
|
|
818
|
+
})), runForkWith(self.context), runIn(self.scope));
|
|
819
|
+
return void_3;
|
|
907
820
|
};
|
|
908
821
|
|
|
909
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/
|
|
910
|
-
var makeUnsafe = makeUnsafe6;
|
|
822
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
911
823
|
var make18 = make4;
|
|
912
|
-
var
|
|
913
|
-
var nowUnsafe2 = nowUnsafe;
|
|
914
|
-
var toDateUtc2 = toDateUtc;
|
|
915
|
-
var toEpochMillis2 = toEpochMillis;
|
|
916
|
-
var formatIso = formatIso2;
|
|
824
|
+
var get5 = get4;
|
|
917
825
|
|
|
918
826
|
// node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
919
827
|
import * as NodeChildProcess from "child_process";
|
|
@@ -1029,8 +937,8 @@ var releaseWritable = (writable) => callback3((resume) => {
|
|
|
1029
937
|
});
|
|
1030
938
|
var pullIntoWritable = (options) => withFiber2((fiber) => {
|
|
1031
939
|
const dispatcher = fiber.currentDispatcher;
|
|
1032
|
-
const completion =
|
|
1033
|
-
const failure =
|
|
940
|
+
const completion = makeUnsafe4();
|
|
941
|
+
const failure = makeUnsafe4();
|
|
1034
942
|
const onError = (error) => doneUnsafe(failure, failSync(() => options.onError(error)));
|
|
1035
943
|
let errorEmitted = false;
|
|
1036
944
|
const onStreamError = (error) => {
|
|
@@ -1124,7 +1032,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
1124
1032
|
const chunkSize = options.chunkSize ?? 4096;
|
|
1125
1033
|
const closeOnDone = options.closeOnDone ?? true;
|
|
1126
1034
|
const exit = options.exit ?? make8(undefined);
|
|
1127
|
-
const latch = options.latch ??
|
|
1035
|
+
const latch = options.latch ?? makeUnsafe(false);
|
|
1128
1036
|
function onReadable() {
|
|
1129
1037
|
latch.openUnsafe();
|
|
1130
1038
|
}
|
|
@@ -1354,7 +1262,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1354
1262
|
});
|
|
1355
1263
|
}
|
|
1356
1264
|
if (stream) {
|
|
1357
|
-
return
|
|
1265
|
+
return map7(runInputStream(stream, sink, inputFailure), () => {
|
|
1358
1266
|
inputSinks.set(fd, sink);
|
|
1359
1267
|
});
|
|
1360
1268
|
}
|
|
@@ -1460,7 +1368,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1460
1368
|
};
|
|
1461
1369
|
};
|
|
1462
1370
|
const spawn2 = (command, spawnOptions) => callback3((resume) => {
|
|
1463
|
-
const deferred =
|
|
1371
|
+
const deferred = makeUnsafe4();
|
|
1464
1372
|
const handle = NodeChildProcess.spawn(command.command, command.args.map(unwrap2), spawnOptions);
|
|
1465
1373
|
handle.on("error", (error) => {
|
|
1466
1374
|
if (command.args.some(isRedacted)) {
|
|
@@ -1636,7 +1544,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1636
1544
|
}
|
|
1637
1545
|
return reref;
|
|
1638
1546
|
});
|
|
1639
|
-
const inputFailure =
|
|
1547
|
+
const inputFailure = makeUnsafe4();
|
|
1640
1548
|
const stdin = yield* setupChildStdin(cmd, childProcess, stdinConfig, inputFailure);
|
|
1641
1549
|
const {
|
|
1642
1550
|
all,
|
|
@@ -1647,7 +1555,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1647
1555
|
getInputFd,
|
|
1648
1556
|
getOutputFd
|
|
1649
1557
|
} = yield* setupAdditionalFds(cmd, childProcess, resolvedAdditionalFds, inputFailure);
|
|
1650
|
-
const isRunning =
|
|
1558
|
+
const isRunning = map7(isDone(exitSignal), (done) => !done);
|
|
1651
1559
|
const exitCode = flatMap3(raceFirst(_await(exitSignal), _await(inputFailure)), ([code, signal]) => {
|
|
1652
1560
|
if (isDoneUnsafe(inputFailure)) {
|
|
1653
1561
|
return _await(inputFailure);
|
|
@@ -1928,7 +1836,7 @@ var noFollowFlags = (method, flag) => suspend3(() => {
|
|
|
1928
1836
|
var openFactory = (method) => {
|
|
1929
1837
|
const nodeOpen = effectify(NFS.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
1930
1838
|
const nodeClose = effectify(NFS.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
1931
|
-
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))),
|
|
1839
|
+
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))), map7((fd) => makeFile(fd, options?.flag?.startsWith("a") ?? false)));
|
|
1932
1840
|
};
|
|
1933
1841
|
var open2 = /* @__PURE__ */ openFactory("open");
|
|
1934
1842
|
var negativePosition = (method) => badArgument({
|
|
@@ -1989,7 +1897,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
1989
1897
|
});
|
|
1990
1898
|
}
|
|
1991
1899
|
const position = this.position;
|
|
1992
|
-
return
|
|
1900
|
+
return map7(nodeRead(this.fd, {
|
|
1993
1901
|
buffer,
|
|
1994
1902
|
position
|
|
1995
1903
|
}), (bytesRead) => {
|
|
@@ -2010,7 +1918,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
2010
1918
|
}
|
|
2011
1919
|
const buffer = Buffer.allocUnsafeSlow(size);
|
|
2012
1920
|
const position = explicit ?? this.position;
|
|
2013
|
-
return
|
|
1921
|
+
return map7(nodeReadAlloc(this.fd, {
|
|
2014
1922
|
buffer,
|
|
2015
1923
|
position
|
|
2016
1924
|
}), (bytesRead) => {
|
|
@@ -2033,7 +1941,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
2033
1941
|
});
|
|
2034
1942
|
}
|
|
2035
1943
|
truncate(length) {
|
|
2036
|
-
return
|
|
1944
|
+
return map7(nodeTruncate(this.fd, length || undefined), () => {
|
|
2037
1945
|
if (!this.append) {
|
|
2038
1946
|
const len = BigInt(length ?? 0);
|
|
2039
1947
|
if (this.position > len) {
|
|
@@ -2045,7 +1953,7 @@ var makeFile = /* @__PURE__ */ (() => {
|
|
|
2045
1953
|
write(buffer) {
|
|
2046
1954
|
return suspend3(() => {
|
|
2047
1955
|
const position = this.position;
|
|
2048
|
-
return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) =>
|
|
1956
|
+
return flatMap3(this.append ? succeed6(undefined) : positionToNumber(position, "write"), (nodePosition) => map7(nodeWrite(this.fd, buffer, undefined, undefined, nodePosition), (bytesWritten) => {
|
|
2049
1957
|
if (!this.append) {
|
|
2050
1958
|
this.position = position + BigInt(bytesWritten);
|
|
2051
1959
|
}
|
|
@@ -2107,7 +2015,7 @@ var readDirectoryEntries = (path) => tryPromise({
|
|
|
2107
2015
|
withFileTypes: true
|
|
2108
2016
|
}),
|
|
2109
2017
|
catch: (err) => handleErrnoException("FileSystem", "readDirectoryEntries")(err, [path])
|
|
2110
|
-
}).pipe(
|
|
2018
|
+
}).pipe(map7((entries) => entries.map((entry) => ({
|
|
2111
2019
|
name: entry.name,
|
|
2112
2020
|
type: fileType(entry)
|
|
2113
2021
|
}))));
|
|
@@ -2222,7 +2130,7 @@ var watchNode = (path, info, options) => callback((queue) => acquireRelease(sync
|
|
|
2222
2130
|
});
|
|
2223
2131
|
return watcher;
|
|
2224
2132
|
}), (watcher) => sync2(() => watcher.close())).pipe(tap2(() => sync2(() => options?.onReady?.()))));
|
|
2225
|
-
var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(
|
|
2133
|
+
var watch2 = (backend, path, options) => all3([stat2(path), serviceOption(WatchBackend)]).pipe(map7(([stat, callerBackend]) => orElse(callerBackend, () => backend).pipe(flatMap((_) => _.register(path, stat, options)), getOrElse(() => watchNode(path, stat, options)))), unwrap);
|
|
2226
2134
|
var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
2227
2135
|
try {
|
|
2228
2136
|
NFS.writeFile(path, data, {
|
|
@@ -2240,7 +2148,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
|
2240
2148
|
resume(fail7(handleBadArgument("writeFile")(err)));
|
|
2241
2149
|
}
|
|
2242
2150
|
});
|
|
2243
|
-
var makeFileSystem = /* @__PURE__ */
|
|
2151
|
+
var makeFileSystem = /* @__PURE__ */ map7(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
|
|
2244
2152
|
access: access2,
|
|
2245
2153
|
chmod: chmod2,
|
|
2246
2154
|
chown: chown2,
|
|
@@ -2300,15 +2208,15 @@ var fileUrlOps = (windows) => ({
|
|
|
2300
2208
|
})
|
|
2301
2209
|
})
|
|
2302
2210
|
});
|
|
2303
|
-
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2211
|
+
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2304
2212
|
...NodePath.posix,
|
|
2305
2213
|
.../* @__PURE__ */ fileUrlOps(false)
|
|
2306
2214
|
}));
|
|
2307
|
-
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2215
|
+
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2308
2216
|
...NodePath.win32,
|
|
2309
2217
|
.../* @__PURE__ */ fileUrlOps(true)
|
|
2310
2218
|
}));
|
|
2311
|
-
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2219
|
+
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2312
2220
|
...NodePath,
|
|
2313
2221
|
.../* @__PURE__ */ fileUrlOps(undefined)
|
|
2314
2222
|
}));
|
|
@@ -2567,7 +2475,7 @@ var layerWebCrypto = /* @__PURE__ */ effect(SecureRandom, /* @__PURE__ */ WebCry
|
|
|
2567
2475
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Cookies.js
|
|
2568
2476
|
var TypeId4 = "~effect/http/Cookies";
|
|
2569
2477
|
var CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
2570
|
-
var
|
|
2478
|
+
var Proto = {
|
|
2571
2479
|
[TypeId4]: TypeId4,
|
|
2572
2480
|
...BaseProto,
|
|
2573
2481
|
toJSON() {
|
|
@@ -2581,7 +2489,7 @@ var Proto2 = {
|
|
|
2581
2489
|
}
|
|
2582
2490
|
};
|
|
2583
2491
|
var fromReadonlyRecord = (cookies) => {
|
|
2584
|
-
const self = Object.create(
|
|
2492
|
+
const self = Object.create(Proto);
|
|
2585
2493
|
self.cookies = cookies;
|
|
2586
2494
|
return self;
|
|
2587
2495
|
};
|
|
@@ -2748,13 +2656,13 @@ var tryDecodeURIComponent = (str) => {
|
|
|
2748
2656
|
|
|
2749
2657
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/Headers.js
|
|
2750
2658
|
var TypeId5 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
|
|
2751
|
-
var
|
|
2659
|
+
var Proto2 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
|
|
2752
2660
|
[TypeId5]: {
|
|
2753
2661
|
value: TypeId5
|
|
2754
2662
|
},
|
|
2755
2663
|
[symbolRedactable]: {
|
|
2756
2664
|
value(context) {
|
|
2757
|
-
return redact2(this,
|
|
2665
|
+
return redact2(this, get3(context, CurrentRedactedNames));
|
|
2758
2666
|
}
|
|
2759
2667
|
},
|
|
2760
2668
|
toJSON: {
|
|
@@ -2764,7 +2672,7 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
|
|
|
2764
2672
|
},
|
|
2765
2673
|
[symbol2]: {
|
|
2766
2674
|
value(that) {
|
|
2767
|
-
return
|
|
2675
|
+
return Equivalence(this, that);
|
|
2768
2676
|
}
|
|
2769
2677
|
},
|
|
2770
2678
|
[symbol]: {
|
|
@@ -2779,20 +2687,20 @@ var Proto3 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.crea
|
|
|
2779
2687
|
value: BaseProto[NodeInspectSymbol]
|
|
2780
2688
|
}
|
|
2781
2689
|
});
|
|
2782
|
-
var make22 = (input) => Object.assign(Object.create(
|
|
2783
|
-
var
|
|
2784
|
-
var empty = /* @__PURE__ */ Object.create(
|
|
2690
|
+
var make22 = (input) => Object.assign(Object.create(Proto2), input);
|
|
2691
|
+
var Equivalence = /* @__PURE__ */ makeEquivalence(/* @__PURE__ */ strictEqual());
|
|
2692
|
+
var empty = /* @__PURE__ */ Object.create(Proto2);
|
|
2785
2693
|
var fromInput = (input) => {
|
|
2786
2694
|
if (input === undefined) {
|
|
2787
2695
|
return empty;
|
|
2788
2696
|
} else if (Symbol.iterator in input) {
|
|
2789
|
-
const out = Object.create(
|
|
2697
|
+
const out = Object.create(Proto2);
|
|
2790
2698
|
for (const [k, v] of input) {
|
|
2791
2699
|
out[k.toLowerCase()] = v;
|
|
2792
2700
|
}
|
|
2793
2701
|
return out;
|
|
2794
2702
|
}
|
|
2795
|
-
const out = Object.create(
|
|
2703
|
+
const out = Object.create(Proto2);
|
|
2796
2704
|
for (const [k, v] of Object.entries(input)) {
|
|
2797
2705
|
if (Array.isArray(v)) {
|
|
2798
2706
|
out[k.toLowerCase()] = v.join(", ");
|
|
@@ -2802,7 +2710,7 @@ var fromInput = (input) => {
|
|
|
2802
2710
|
}
|
|
2803
2711
|
return out;
|
|
2804
2712
|
};
|
|
2805
|
-
var fromRecordUnsafe = (input) => Object.setPrototypeOf(input,
|
|
2713
|
+
var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto2);
|
|
2806
2714
|
var set = /* @__PURE__ */ dual(3, (self, key, value) => {
|
|
2807
2715
|
const out = make22(self);
|
|
2808
2716
|
out[key.toLowerCase()] = value;
|
|
@@ -2877,7 +2785,7 @@ var fromBody = (bytes) => new URLSearchParams(bodyDecoder.decode(bytes).replace(
|
|
|
2877
2785
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/UrlParams.js
|
|
2878
2786
|
var TypeId6 = "~effect/http/UrlParams";
|
|
2879
2787
|
var isUrlParams = (u) => hasProperty(u, TypeId6);
|
|
2880
|
-
var
|
|
2788
|
+
var Proto3 = {
|
|
2881
2789
|
...PipeInspectableProto,
|
|
2882
2790
|
[TypeId6]: TypeId6,
|
|
2883
2791
|
[Symbol.iterator]() {
|
|
@@ -2886,21 +2794,21 @@ var Proto4 = {
|
|
|
2886
2794
|
[symbolRedactable](context) {
|
|
2887
2795
|
return {
|
|
2888
2796
|
_id: "UrlParams",
|
|
2889
|
-
params: Object.fromEntries(redact3(this,
|
|
2797
|
+
params: Object.fromEntries(redact3(this, get3(context, CurrentRedactedNames2)))
|
|
2890
2798
|
};
|
|
2891
2799
|
},
|
|
2892
2800
|
toJSON() {
|
|
2893
2801
|
return redact(this);
|
|
2894
2802
|
},
|
|
2895
2803
|
[symbol2](that) {
|
|
2896
|
-
return
|
|
2804
|
+
return Equivalence2(this, that);
|
|
2897
2805
|
},
|
|
2898
2806
|
[symbol]() {
|
|
2899
2807
|
return array(this.params.flat());
|
|
2900
2808
|
}
|
|
2901
2809
|
};
|
|
2902
2810
|
var make23 = (params) => {
|
|
2903
|
-
const self = Object.create(
|
|
2811
|
+
const self = Object.create(Proto3);
|
|
2904
2812
|
self.params = params;
|
|
2905
2813
|
return self;
|
|
2906
2814
|
};
|
|
@@ -2942,7 +2850,7 @@ var fromInputNested = (input) => {
|
|
|
2942
2850
|
return out;
|
|
2943
2851
|
};
|
|
2944
2852
|
var coerce = (value) => isRedacted(value) ? value : String(value);
|
|
2945
|
-
var
|
|
2853
|
+
var Equivalence2 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
|
|
2946
2854
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
|
|
2947
2855
|
var empty4 = /* @__PURE__ */ make23([]);
|
|
2948
2856
|
var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
@@ -3012,7 +2920,7 @@ var decodeQueryKey = (key) => {
|
|
|
3012
2920
|
return key;
|
|
3013
2921
|
}
|
|
3014
2922
|
};
|
|
3015
|
-
var currentRedactedNames = () =>
|
|
2923
|
+
var currentRedactedNames = () => get3(globalThis[currentFiberTypeId]?.context ?? empty3(), CurrentRedactedNames2);
|
|
3016
2924
|
var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/CurrentRedactedNames", {
|
|
3017
2925
|
defaultValue: () => ["X-Amz-Signature", "X-Amz-Credential", "X-Amz-Security-Token", "AWSAccessKeyId", "Signature", "sig", "X-Goog-Signature"]
|
|
3018
2926
|
});
|
|
@@ -3048,7 +2956,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3048
2956
|
};
|
|
3049
2957
|
stdin.once("end", onStdinEnd);
|
|
3050
2958
|
yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
|
|
3051
|
-
const rlRef = yield*
|
|
2959
|
+
const rlRef = yield* make18({
|
|
3052
2960
|
acquire: acquireRelease(sync2(() => {
|
|
3053
2961
|
const rl = readline.createInterface({
|
|
3054
2962
|
input: stdin,
|
|
@@ -3087,7 +2995,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3087
2995
|
if (stdin.isTTY)
|
|
3088
2996
|
stdin.setRawMode(enabled);
|
|
3089
2997
|
});
|
|
3090
|
-
const rawModeRef = yield*
|
|
2998
|
+
const rawModeRef = yield* make18({
|
|
3091
2999
|
acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
|
|
3092
3000
|
idleTimeToLive: "10 millis"
|
|
3093
3001
|
});
|
|
@@ -3138,14 +3046,14 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3138
3046
|
if (inputEnded) {
|
|
3139
3047
|
handleEnd();
|
|
3140
3048
|
} else {
|
|
3141
|
-
yield*
|
|
3142
|
-
yield*
|
|
3049
|
+
yield* get5(rlRef);
|
|
3050
|
+
yield* get5(rawModeRef);
|
|
3143
3051
|
stdin.once("end", handleEnd);
|
|
3144
3052
|
}
|
|
3145
3053
|
return queue;
|
|
3146
3054
|
});
|
|
3147
3055
|
const readLine = suspend3(() => poll(lines).pipe(flatMap3(match({
|
|
3148
|
-
onNone: () => scoped(andThen2(
|
|
3056
|
+
onNone: () => scoped(andThen2(get5(rlRef), take(lines))),
|
|
3149
3057
|
onSome: succeed6
|
|
3150
3058
|
})), mapError2(() => new QuitError({}))));
|
|
3151
3059
|
const display = (prompt) => uninterruptible(callback3((resume) => {
|
|
@@ -3189,17 +3097,17 @@ var log = (...args) => consoleWith((console) => sync(() => {
|
|
|
3189
3097
|
|
|
3190
3098
|
// packages/core/src/time.ts
|
|
3191
3099
|
function toDate(input) {
|
|
3192
|
-
return
|
|
3100
|
+
return toDateUtc(makeUnsafe6(input));
|
|
3193
3101
|
}
|
|
3194
3102
|
function parseDate(input) {
|
|
3195
|
-
return getOrUndefined(map4(
|
|
3103
|
+
return getOrUndefined(map4(make16(input), toDateUtc));
|
|
3196
3104
|
}
|
|
3197
3105
|
function toIso(input) {
|
|
3198
|
-
return formatIso(
|
|
3106
|
+
return formatIso(makeUnsafe6(input));
|
|
3199
3107
|
}
|
|
3200
|
-
var currentDate =
|
|
3108
|
+
var currentDate = map7(now, toDateUtc);
|
|
3201
3109
|
function wallClockMillis() {
|
|
3202
|
-
return
|
|
3110
|
+
return toEpochMillis(nowUnsafe());
|
|
3203
3111
|
}
|
|
3204
3112
|
|
|
3205
3113
|
// packages/core/src/waiting-on.ts
|
|
@@ -6824,7 +6732,7 @@ var WorkUnitLease = Struct({
|
|
|
6824
6732
|
leaseExpiresAt: Timestamp,
|
|
6825
6733
|
lastHeartbeatAt: Timestamp
|
|
6826
6734
|
});
|
|
6827
|
-
var WorkUnitLeaseProjection = Struct(
|
|
6735
|
+
var WorkUnitLeaseProjection = Struct(map8(WorkUnitLease.fields, optionalKey));
|
|
6828
6736
|
var WorkUnitRepoBinding = Struct({
|
|
6829
6737
|
id: Id,
|
|
6830
6738
|
provider: RepoBindingProvider,
|
|
@@ -9662,7 +9570,7 @@ var TranscriptSearchResult = Struct({
|
|
|
9662
9570
|
});
|
|
9663
9571
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpBody.js
|
|
9664
9572
|
var TypeId8 = "~effect/http/HttpBody";
|
|
9665
|
-
class
|
|
9573
|
+
class Proto4 {
|
|
9666
9574
|
[TypeId8];
|
|
9667
9575
|
constructor() {
|
|
9668
9576
|
this[TypeId8] = TypeId8;
|
|
@@ -9677,7 +9585,7 @@ class Proto5 {
|
|
|
9677
9585
|
}
|
|
9678
9586
|
}
|
|
9679
9587
|
|
|
9680
|
-
class Empty extends
|
|
9588
|
+
class Empty extends Proto4 {
|
|
9681
9589
|
_tag = "Empty";
|
|
9682
9590
|
toJSON() {
|
|
9683
9591
|
return {
|
|
@@ -9688,7 +9596,7 @@ class Empty extends Proto5 {
|
|
|
9688
9596
|
}
|
|
9689
9597
|
var empty5 = /* @__PURE__ */ new Empty;
|
|
9690
9598
|
|
|
9691
|
-
class Raw extends
|
|
9599
|
+
class Raw extends Proto4 {
|
|
9692
9600
|
_tag = "Raw";
|
|
9693
9601
|
body;
|
|
9694
9602
|
contentType;
|
|
@@ -9711,7 +9619,7 @@ class Raw extends Proto5 {
|
|
|
9711
9619
|
}
|
|
9712
9620
|
var raw = (body, options) => new Raw(body, options?.contentType, options?.contentLength);
|
|
9713
9621
|
|
|
9714
|
-
class Uint8Array2 extends
|
|
9622
|
+
class Uint8Array2 extends Proto4 {
|
|
9715
9623
|
_tag = "Uint8Array";
|
|
9716
9624
|
contentType;
|
|
9717
9625
|
contentLength;
|
|
@@ -9938,7 +9846,7 @@ var baseUrl = () => {
|
|
|
9938
9846
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/http/HttpClientRequest.js
|
|
9939
9847
|
var TypeId10 = "~effect/http/HttpClientRequest";
|
|
9940
9848
|
var isHttpClientRequest = (u) => hasProperty(u, TypeId10);
|
|
9941
|
-
var
|
|
9849
|
+
var Proto5 = {
|
|
9942
9850
|
[TypeId10]: TypeId10,
|
|
9943
9851
|
...BaseProto,
|
|
9944
9852
|
toJSON() {
|
|
@@ -9957,7 +9865,7 @@ var Proto6 = {
|
|
|
9957
9865
|
}
|
|
9958
9866
|
};
|
|
9959
9867
|
function makeWith(method, url, urlParams, hash, headers, body) {
|
|
9960
|
-
const self = Object.create(
|
|
9868
|
+
const self = Object.create(Proto5);
|
|
9961
9869
|
self.method = method;
|
|
9962
9870
|
self.url = url;
|
|
9963
9871
|
self.urlParams = urlParams;
|
|
@@ -10144,7 +10052,7 @@ class WebHttpClientResponse extends Class {
|
|
|
10144
10052
|
}
|
|
10145
10053
|
textBody;
|
|
10146
10054
|
get text() {
|
|
10147
|
-
return this.textBody ??=
|
|
10055
|
+
return this.textBody ??= map7(this.arrayBuffer, (_) => new TextDecoder().decode(_));
|
|
10148
10056
|
}
|
|
10149
10057
|
get urlParamsBody() {
|
|
10150
10058
|
return flatMap3(this.arrayBuffer, (bytes) => try_2({
|
|
@@ -10255,7 +10163,7 @@ var get2 = /* @__PURE__ */ accessor("get");
|
|
|
10255
10163
|
var transform = /* @__PURE__ */ dual(2, (self, f) => makeWith2(flatMap3((request) => f(self.postprocess(succeed6(request)), request)), self.preprocess));
|
|
10256
10164
|
var transformResponse = /* @__PURE__ */ dual(2, (self, f) => makeWith2((request) => f(self.postprocess(request)), self.preprocess));
|
|
10257
10165
|
var makeWith2 = (postprocess, preprocess) => {
|
|
10258
|
-
const self = Object.create(
|
|
10166
|
+
const self = Object.create(Proto6);
|
|
10259
10167
|
self.preprocess = preprocess;
|
|
10260
10168
|
self.postprocess = postprocess;
|
|
10261
10169
|
self.execute = function(request) {
|
|
@@ -10263,7 +10171,7 @@ var makeWith2 = (postprocess, preprocess) => {
|
|
|
10263
10171
|
};
|
|
10264
10172
|
return self;
|
|
10265
10173
|
};
|
|
10266
|
-
var
|
|
10174
|
+
var Proto6 = {
|
|
10267
10175
|
[TypeId13]: TypeId13,
|
|
10268
10176
|
pipe() {
|
|
10269
10177
|
return pipeArguments(this, arguments);
|
|
@@ -10295,7 +10203,7 @@ var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFibe
|
|
|
10295
10203
|
if (tracerDisabled) {
|
|
10296
10204
|
const effect = f(request, url, controller.signal, fiber);
|
|
10297
10205
|
if (scopedController)
|
|
10298
|
-
return
|
|
10206
|
+
return map7(effect, (response) => trackResponse(response, controller, true));
|
|
10299
10207
|
return uninterruptibleMask2((restore) => matchCauseEffect(restore(effect), {
|
|
10300
10208
|
onSuccess(response) {
|
|
10301
10209
|
return succeed6(trackResponse(response, controller, false));
|
|
@@ -10366,7 +10274,7 @@ var TracerPropagationEnabled = /* @__PURE__ */ Reference("effect/http/HttpClient
|
|
|
10366
10274
|
var SpanNameGenerator = /* @__PURE__ */ Reference("effect/http/HttpClient/SpanNameGenerator", {
|
|
10367
10275
|
defaultValue: () => (request) => request.method
|
|
10368
10276
|
});
|
|
10369
|
-
var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) =>
|
|
10277
|
+
var layerMergedContext = (effect2) => effect(HttpClient)(contextWith((context) => map7(effect2, (client) => transformResponse(client, updateContext((input) => merge3(context, input))))));
|
|
10370
10278
|
var responseRegistry = /* @__PURE__ */ (() => {
|
|
10371
10279
|
if ("FinalizationRegistry" in globalThis && globalThis.FinalizationRegistry) {
|
|
10372
10280
|
const registry = /* @__PURE__ */ new FinalizationRegistry((controller) => {
|
|
@@ -10531,7 +10439,7 @@ var fetch2 = /* @__PURE__ */ make27((request, url, signal, fiber) => {
|
|
|
10531
10439
|
}
|
|
10532
10440
|
let uploadController;
|
|
10533
10441
|
const stopUpload = sync2(() => uploadController?.abort());
|
|
10534
|
-
const send = (body) =>
|
|
10442
|
+
const send = (body) => map7(tryPromise({
|
|
10535
10443
|
try: () => fetch2(url, {
|
|
10536
10444
|
...options,
|
|
10537
10445
|
method: request.method,
|
|
@@ -10702,14 +10610,14 @@ var layerWebSocketConstructorGlobal = /* @__PURE__ */ succeed5(WebSocketConstruc
|
|
|
10702
10610
|
}
|
|
10703
10611
|
return new globalThis.WebSocket(url, options);
|
|
10704
10612
|
});
|
|
10705
|
-
var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(
|
|
10613
|
+
var makeWebSocket = (url, options) => WebSocketConstructor.use((makeWs) => fromWebSocket(acquireRelease((typeof url === "string" ? succeed6(url) : url).pipe(map7((url) => makeWs(url, options?.headers === undefined ? options?.protocols : {
|
|
10706
10614
|
protocols: options.protocols,
|
|
10707
10615
|
headers: options.headers
|
|
10708
10616
|
}))), (ws) => sync2(() => ws.close(1000))), options));
|
|
10709
10617
|
var isPausable = (ws) => ("pause" in ws) && typeof ws.pause === "function";
|
|
10710
10618
|
var fromWebSocket = (acquire, options) => withFiber2((fiber) => {
|
|
10711
10619
|
let currentWS;
|
|
10712
|
-
const latch =
|
|
10620
|
+
const latch = makeUnsafe(false);
|
|
10713
10621
|
const acquireContext = fiber.context;
|
|
10714
10622
|
const reader = gen(function* () {
|
|
10715
10623
|
const scope = yield* scope2;
|
|
@@ -11337,7 +11245,7 @@ var effectMetrics = new Map(MetricDefinitions.map((definition) => {
|
|
|
11337
11245
|
var processTelemetryRegistry = new Map;
|
|
11338
11246
|
var processMetricRegistry = new Map;
|
|
11339
11247
|
var collectorTimeout = "10 seconds";
|
|
11340
|
-
var collectorHttpClient = effect(HttpClient)(
|
|
11248
|
+
var collectorHttpClient = effect(HttpClient)(map7(HttpClient, (client) => transform(client, (response, request) => timeoutOrElse(response, {
|
|
11341
11249
|
duration: collectorTimeout,
|
|
11342
11250
|
orElse: () => fail7(new HttpClientError({
|
|
11343
11251
|
reason: new TransportError({
|
|
@@ -13236,7 +13144,7 @@ class KitmanEffectClient {
|
|
|
13236
13144
|
return tryPromise({
|
|
13237
13145
|
try: () => this.fetchImpl(this.url(path), { ...init, headers, signal: abort.signal }),
|
|
13238
13146
|
catch: failed
|
|
13239
|
-
}).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(
|
|
13147
|
+
}).pipe(flatMap3((answer) => tryPromise({ try: () => answer.arrayBuffer(), catch: failed }).pipe(map7((body) => new Response(body.byteLength === 0 ? null : body, answer)))), onInterrupt(() => sync2(() => abort.abort())));
|
|
13240
13148
|
});
|
|
13241
13149
|
const response = yield* method !== "GET" ? send.pipe(retry({ schedule: unansweredGetRetry, times: 5, while: refusedConnection })) : sendAndRead.pipe(timeoutOrElse({
|
|
13242
13150
|
duration: getAnswerTimeout,
|
|
@@ -13298,8 +13206,8 @@ class KitmanEffectClient {
|
|
|
13298
13206
|
function errorResponseDetails(response) {
|
|
13299
13207
|
const contentType = response.headers.get("content-type") ?? "";
|
|
13300
13208
|
if (contentType.includes("application/json"))
|
|
13301
|
-
return tryPromise(() => response.json()).pipe(
|
|
13302
|
-
return tryPromise(() => response.text()).pipe(
|
|
13209
|
+
return tryPromise(() => response.json()).pipe(map7(parseErrorResponse), orElseSucceed(() => ({})));
|
|
13210
|
+
return tryPromise(() => response.text()).pipe(map7((text) => {
|
|
13303
13211
|
const message = sanitizeErrorDetail(text);
|
|
13304
13212
|
return message === undefined ? {} : { message };
|
|
13305
13213
|
}), orElseSucceed(() => ({})));
|
|
@@ -13595,13 +13503,13 @@ function resolveConfig(input) {
|
|
|
13595
13503
|
...userAgentPreferences === undefined ? undefined : { userAgentPreferences }
|
|
13596
13504
|
};
|
|
13597
13505
|
}
|
|
13598
|
-
var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option,
|
|
13599
|
-
var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option,
|
|
13600
|
-
var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option,
|
|
13601
|
-
var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option,
|
|
13602
|
-
var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option,
|
|
13603
|
-
var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option,
|
|
13604
|
-
var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option,
|
|
13506
|
+
var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map7(getOrUndefined));
|
|
13507
|
+
var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map7(getOrUndefined));
|
|
13508
|
+
var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map7(getOrUndefined));
|
|
13509
|
+
var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map7(getOrUndefined));
|
|
13510
|
+
var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map7((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
|
|
13511
|
+
var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map7((tools) => getOrUndefined(tools) === "output"));
|
|
13512
|
+
var mcpCredentialNameFromEnv = String2("KITMAN_MCP_CREDENTIAL_NAME").pipe(option, map7(getOrUndefined));
|
|
13605
13513
|
var kitmanConfigDir = gen(function* () {
|
|
13606
13514
|
const path = yield* Path;
|
|
13607
13515
|
const xdgConfigHome = yield* String2("XDG_CONFIG_HOME").pipe(option);
|
|
@@ -13619,7 +13527,7 @@ var userHarnessSyncPath = configFile("harness-sync.json");
|
|
|
13619
13527
|
var kitSetupCacheDir = configFile("kit-setups");
|
|
13620
13528
|
var bundleCacheDir = configFile("bundles");
|
|
13621
13529
|
var runnerReleaseChannelPath = (runnerId) => configFile(`runner-release-channels/${runnerId}`);
|
|
13622
|
-
var localConfigPath = Path.pipe(
|
|
13530
|
+
var localConfigPath = Path.pipe(map7((path) => path.resolve(".kitman/config.json")));
|
|
13623
13531
|
function readUserConfig(path) {
|
|
13624
13532
|
return gen(function* () {
|
|
13625
13533
|
const filePath = path ?? (yield* userConfigPath);
|
|
@@ -13747,7 +13655,7 @@ function sessionForApi(auth, apiUrl) {
|
|
|
13747
13655
|
return auth.sessions[normalizeApiUrl(apiUrl)];
|
|
13748
13656
|
}
|
|
13749
13657
|
function readAuthStore(path) {
|
|
13750
|
-
return readUserAuth(path).pipe(
|
|
13658
|
+
return readUserAuth(path).pipe(map7((auth) => isAuthStore(auth) ? normalizeAuthStore(auth) : { sessions: {} }), catchTag("SchemaError", () => succeed6({ sessions: {} })));
|
|
13751
13659
|
}
|
|
13752
13660
|
function writeAuthStore(auth, path) {
|
|
13753
13661
|
return writeUserAuth(auth, path);
|
|
@@ -13895,7 +13803,7 @@ function Stream(success, error) {
|
|
|
13895
13803
|
|
|
13896
13804
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/rpc/Rpc.js
|
|
13897
13805
|
var TypeId15 = "~effect/rpc/Rpc";
|
|
13898
|
-
var
|
|
13806
|
+
var Proto7 = {
|
|
13899
13807
|
[TypeId15]: TypeId15,
|
|
13900
13808
|
pipe() {
|
|
13901
13809
|
return pipeArguments(this, arguments);
|
|
@@ -13980,7 +13888,7 @@ var Proto8 = {
|
|
|
13980
13888
|
};
|
|
13981
13889
|
var makeProto = (options) => {
|
|
13982
13890
|
function Rpc() {}
|
|
13983
|
-
Object.setPrototypeOf(Rpc,
|
|
13891
|
+
Object.setPrototypeOf(Rpc, Proto7);
|
|
13984
13892
|
Object.assign(Rpc, options);
|
|
13985
13893
|
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
13986
13894
|
return Rpc;
|
|
@@ -14106,7 +14014,7 @@ var RpcGroupProto = {
|
|
|
14106
14014
|
}
|
|
14107
14015
|
return makeProto2({
|
|
14108
14016
|
requests,
|
|
14109
|
-
annotations:
|
|
14017
|
+
annotations: makeUnsafe3(annotations)
|
|
14110
14018
|
});
|
|
14111
14019
|
},
|
|
14112
14020
|
omit(...tags) {
|
|
@@ -14142,7 +14050,7 @@ var RpcGroupProto = {
|
|
|
14142
14050
|
context: services
|
|
14143
14051
|
});
|
|
14144
14052
|
});
|
|
14145
|
-
return
|
|
14053
|
+
return makeUnsafe3(contextMap);
|
|
14146
14054
|
});
|
|
14147
14055
|
},
|
|
14148
14056
|
prefix(prefix) {
|
|
@@ -14171,7 +14079,7 @@ var RpcGroupProto = {
|
|
|
14171
14079
|
handler,
|
|
14172
14080
|
context: services
|
|
14173
14081
|
});
|
|
14174
|
-
return
|
|
14082
|
+
return makeUnsafe3(contextMap);
|
|
14175
14083
|
}));
|
|
14176
14084
|
},
|
|
14177
14085
|
accessHandler(service) {
|
|
@@ -14196,7 +14104,7 @@ var RpcGroupProto = {
|
|
|
14196
14104
|
});
|
|
14197
14105
|
},
|
|
14198
14106
|
annotateRpcs(service, value) {
|
|
14199
|
-
return this.annotateRpcsMerge(
|
|
14107
|
+
return this.annotateRpcsMerge(make14(service, value));
|
|
14200
14108
|
},
|
|
14201
14109
|
annotateMerge(context) {
|
|
14202
14110
|
return makeProto2({
|
|
@@ -14880,7 +14788,7 @@ var ProgramRpcs = RunnerJournalRpcs.merge(RunnerCapabilityRpcs, RunnerRunFileRpc
|
|
|
14880
14788
|
var RunnerRpcs = RunnerReplicaRpcs.merge(RunnerJournalRpcs, RunnerCapabilityRpcs, RunnerRunFileRpcs);
|
|
14881
14789
|
|
|
14882
14790
|
// apps/cli/src/oauth.ts
|
|
14883
|
-
var
|
|
14791
|
+
var Scope2 = "openid profile email offline_access kitman:cli";
|
|
14884
14792
|
var CallbackPath = "/auth/callback";
|
|
14885
14793
|
|
|
14886
14794
|
class OAuthCallbackTimeout extends TaggedError("OAuthCallbackTimeout") {
|
|
@@ -14899,7 +14807,7 @@ function buildAuthorizeUrl(input) {
|
|
|
14899
14807
|
url.searchParams.set("response_type", "code");
|
|
14900
14808
|
url.searchParams.set("client_id", input.clientId);
|
|
14901
14809
|
url.searchParams.set("redirect_uri", input.redirectUri);
|
|
14902
|
-
url.searchParams.set("scope",
|
|
14810
|
+
url.searchParams.set("scope", Scope2);
|
|
14903
14811
|
url.searchParams.set("code_challenge", input.codeChallenge);
|
|
14904
14812
|
url.searchParams.set("code_challenge_method", "S256");
|
|
14905
14813
|
url.searchParams.set("state", input.state);
|
|
@@ -14959,7 +14867,7 @@ function toStoredSession(token, existingRefreshToken) {
|
|
|
14959
14867
|
}
|
|
14960
14868
|
function startLoopbackServer(input) {
|
|
14961
14869
|
return gen(function* () {
|
|
14962
|
-
const code = yield*
|
|
14870
|
+
const code = yield* make15();
|
|
14963
14871
|
const context2 = yield* context();
|
|
14964
14872
|
const runSyncExit = runSyncExitWith(context2);
|
|
14965
14873
|
const server = yield* acquireRelease(sync2(() => Bun.serve({
|
|
@@ -15068,7 +14976,7 @@ function createSdkClient(input) {
|
|
|
15068
14976
|
const runPromise = runPromiseWith(yield* context());
|
|
15069
14977
|
const fetchImpl = input.fetch ?? (yield* Fetch);
|
|
15070
14978
|
let session = input.session;
|
|
15071
|
-
const refreshPermit =
|
|
14979
|
+
const refreshPermit = makeUnsafe2(1);
|
|
15072
14980
|
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 })));
|
|
15073
14981
|
const authorizedFetch = (resource, init) => runPromise(gen(function* () {
|
|
15074
14982
|
if (session.refreshToken && shouldRefresh(yield* currentDate, session.expiresAt))
|
|
@@ -15088,7 +14996,7 @@ function createSdkClient(input) {
|
|
|
15088
14996
|
});
|
|
15089
14997
|
}
|
|
15090
14998
|
function refreshSession(input) {
|
|
15091
|
-
const storedSession = readAuthStore(input.authPath).pipe(
|
|
14999
|
+
const storedSession = readAuthStore(input.authPath).pipe(map7((auth) => sessionForApi(auth, input.apiUrl)));
|
|
15092
15000
|
return withAuthLock(input.authPath, gen(function* () {
|
|
15093
15001
|
const stored = yield* storedSession;
|
|
15094
15002
|
if (!stored)
|
|
@@ -15103,7 +15011,7 @@ function refreshSession(input) {
|
|
|
15103
15011
|
clientId: input.clientId ?? ClientId,
|
|
15104
15012
|
refreshToken: spentToken,
|
|
15105
15013
|
...input.fetch ? { fetch: input.fetch } : undefined
|
|
15106
|
-
}).pipe(
|
|
15014
|
+
}).pipe(map7((token) => toStoredSession(token, spentToken)));
|
|
15107
15015
|
const session = yield* refreshing.pipe(catch_((error) => storedSession.pipe(filterOrFail((current) => current !== undefined && current.refreshToken !== spentToken, () => error))));
|
|
15108
15016
|
const current = yield* storedSession;
|
|
15109
15017
|
if (current?.refreshToken !== spentToken)
|
|
@@ -15499,7 +15407,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15499
15407
|
let lastId = 0;
|
|
15500
15408
|
let lost = false;
|
|
15501
15409
|
const notifications = yield* unbounded2();
|
|
15502
|
-
const ended = yield*
|
|
15410
|
+
const ended = yield* make15();
|
|
15503
15411
|
const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
|
|
15504
15412
|
onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
|
|
15505
15413
|
onNone: () => void_3,
|
|
@@ -15526,7 +15434,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15526
15434
|
if (lost)
|
|
15527
15435
|
return yield* new HerdrCoreConnectionLost2({ method });
|
|
15528
15436
|
const id = ++lastId;
|
|
15529
|
-
const deferred = yield*
|
|
15437
|
+
const deferred = yield* make15();
|
|
15530
15438
|
pending.set(id, { method, deferred });
|
|
15531
15439
|
yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
|
|
15532
15440
|
return yield* _await(deferred);
|
|
@@ -15558,9 +15466,9 @@ var herdrCoreOver = (transport) => ({
|
|
|
15558
15466
|
...input.name === undefined ? undefined : { name: input.name },
|
|
15559
15467
|
no_parent: input.noParent === true
|
|
15560
15468
|
}),
|
|
15561
|
-
list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(
|
|
15469
|
+
list: (filter = {}) => request("terminal.list", Listed, { labels: filter.labels ?? {}, all: filter.all === true }).pipe(map7((listed) => listed.terminals)),
|
|
15562
15470
|
get: (terminal) => request("terminal.get", Terminal2, { terminal }),
|
|
15563
|
-
read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(
|
|
15471
|
+
read: (terminal) => request("terminal.read", Screen, { terminal }).pipe(map7((screen) => screen.text)),
|
|
15564
15472
|
interrupt: (terminal, options = {}) => request("terminal.interrupt", Interrupted, {
|
|
15565
15473
|
terminal,
|
|
15566
15474
|
...options.timeoutSeconds === undefined ? undefined : { timeout: options.timeoutSeconds }
|
|
@@ -15600,7 +15508,7 @@ var herdrCoreOver = (transport) => ({
|
|
|
15600
15508
|
return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
|
|
15601
15509
|
};
|
|
15602
15510
|
const snapshot = { type: "snapshot", terminals: subscribed.terminals };
|
|
15603
|
-
return concat(
|
|
15511
|
+
return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
|
|
15604
15512
|
}))
|
|
15605
15513
|
});
|
|
15606
15514
|
var spawnedTransport = (env) => gen(function* () {
|
|
@@ -15623,7 +15531,7 @@ var coreEnv = (options) => {
|
|
|
15623
15531
|
const env = Object.fromEntries(Object.entries(options.env ?? process.env).filter((entry) => entry[0] !== "HC_SESSION" && entry[1] !== undefined));
|
|
15624
15532
|
return options.session === undefined ? env : { ...env, HC_SESSION: options.session };
|
|
15625
15533
|
};
|
|
15626
|
-
var herdrCoreLayer2 = (options) => effect(HerdrCore2,
|
|
15534
|
+
var herdrCoreLayer2 = (options) => effect(HerdrCore2, map7(ChildProcessSpawner, (spawner) => herdrCoreOver(spawnedTransport(coreEnv(options)).pipe(provideService(ChildProcessSpawner, spawner)))));
|
|
15627
15535
|
var herdrCoreTransportLayer2 = (transport) => succeed5(HerdrCore2, herdrCoreOver(transport));
|
|
15628
15536
|
var UpdateRefused = Struct({
|
|
15629
15537
|
error: Struct({ message: String4, hint: optionalKey(String4) })
|
|
@@ -15646,13 +15554,13 @@ var updateHerdrCore2 = (options) => gen(function* () {
|
|
|
15646
15554
|
], { concurrency: 3 });
|
|
15647
15555
|
return { stdout, stderr, exitCode };
|
|
15648
15556
|
}).pipe(scoped, catchReason("PlatformError", "NotFound", () => fail7(new HerdrCoreMissing2)));
|
|
15649
|
-
const reason = yield* run(["update", "--json"]).pipe(
|
|
15557
|
+
const reason = yield* run(["update", "--json"]).pipe(map7(({ stdout, stderr, exitCode }) => exitCode === 0 ? undefined : refusalReason(stdout) ?? (stderr.trim() || `it exited with code ${exitCode}`)), catchTag("PlatformError", (error) => succeed6(error.message)), timeoutOrElse({
|
|
15650
15558
|
duration: options.timeout,
|
|
15651
15559
|
orElse: () => succeed6(`it did not finish within ${options.timeout}`)
|
|
15652
15560
|
}));
|
|
15653
15561
|
if (reason === undefined)
|
|
15654
15562
|
return;
|
|
15655
|
-
const version = yield* run(["--version"]).pipe(
|
|
15563
|
+
const version = yield* run(["--version"]).pipe(map7(({ stdout }) => stdout.trim() || "an unknown version"), timeout("10 seconds"), orElseSucceed(() => "an unknown version"));
|
|
15656
15564
|
return yield* new HerdrCoreUpdateFailed2({ version, reason: reason.slice(0, 400) });
|
|
15657
15565
|
});
|
|
15658
15566
|
|
|
@@ -15691,7 +15599,7 @@ var runProcess2 = (argv, options) => gen(function* () {
|
|
|
15691
15599
|
const spawner = yield* ChildProcessSpawner;
|
|
15692
15600
|
const [command, ...args] = argv;
|
|
15693
15601
|
const handle = yield* spawner.spawn(make3(command, args, {
|
|
15694
|
-
stdin: options.stdin === undefined ? "ignore" :
|
|
15602
|
+
stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
|
|
15695
15603
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15696
15604
|
env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
|
|
15697
15605
|
}));
|
|
@@ -15737,7 +15645,7 @@ var detectHarnesses2 = gen(function* () {
|
|
|
15737
15645
|
const home = (yield* optionalEnv("HOME")) ?? "/";
|
|
15738
15646
|
const searchPath = ((yield* optionalEnv("PATH")) ?? "").split(":").filter(Boolean);
|
|
15739
15647
|
const exists = (file) => fs.exists(file).pipe(orElseSucceed(() => false));
|
|
15740
|
-
const any = (items, test) =>
|
|
15648
|
+
const any = (items, test) => map7(findFirst(items, test), isSome);
|
|
15741
15649
|
const loginFound = (login) => gen(function* () {
|
|
15742
15650
|
const file = path.join(home, login.path);
|
|
15743
15651
|
if (!(yield* exists(file)))
|
|
@@ -15753,7 +15661,7 @@ var detectHarnesses2 = gen(function* () {
|
|
|
15753
15661
|
unavailable.push({ harness: harness.id, missing: [`\`${harness.id}\` is not installed`] });
|
|
15754
15662
|
continue;
|
|
15755
15663
|
}
|
|
15756
|
-
const loggedIn = (yield* any(harness.keys, (key) =>
|
|
15664
|
+
const loggedIn = (yield* any(harness.keys, (key) => map7(optionalEnv(key), Boolean))) || (yield* any(harness.logins, loginFound));
|
|
15757
15665
|
if (loggedIn)
|
|
15758
15666
|
harnesses.push(harness.id);
|
|
15759
15667
|
else
|
|
@@ -16123,4 +16031,4 @@ function checkServices(declaration) {
|
|
|
16123
16031
|
return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
|
|
16124
16032
|
}
|
|
16125
16033
|
|
|
16126
|
-
export {
|
|
16034
|
+
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, 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, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, 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, 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 };
|