@getpochi/cli 0.5.27 → 0.5.29
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/cli.js +1532 -1215
- package/package.json +4 -2
package/dist/cli.js
CHANGED
|
@@ -393,766 +393,6 @@ var require_runExclusive = __commonJS((exports) => {
|
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
|
|
396
|
-
// ../../node_modules/node-machine-id/dist/index.js
|
|
397
|
-
var require_dist = __commonJS((exports, module) => {
|
|
398
|
-
(function(t2, n2) {
|
|
399
|
-
typeof exports == "object" && typeof module == "object" ? module.exports = n2(__require("child_process"), __require("crypto")) : typeof define == "function" && define.amd ? define(["child_process", "crypto"], n2) : typeof exports == "object" ? exports["electron-machine-id"] = n2(__require("child_process"), __require("crypto")) : t2["electron-machine-id"] = n2(t2.child_process, t2.crypto);
|
|
400
|
-
})(exports, function(t2, n2) {
|
|
401
|
-
return function(t3) {
|
|
402
|
-
function n3(e2) {
|
|
403
|
-
if (r2[e2])
|
|
404
|
-
return r2[e2].exports;
|
|
405
|
-
var o = r2[e2] = { exports: {}, id: e2, loaded: false };
|
|
406
|
-
return t3[e2].call(o.exports, o, o.exports, n3), o.loaded = true, o.exports;
|
|
407
|
-
}
|
|
408
|
-
var r2 = {};
|
|
409
|
-
return n3.m = t3, n3.c = r2, n3.p = "", n3(0);
|
|
410
|
-
}([function(t3, n3, r2) {
|
|
411
|
-
t3.exports = r2(34);
|
|
412
|
-
}, function(t3, n3, r2) {
|
|
413
|
-
var e2 = r2(29)("wks"), o = r2(33), i2 = r2(2).Symbol, c2 = typeof i2 == "function", u2 = t3.exports = function(t4) {
|
|
414
|
-
return e2[t4] || (e2[t4] = c2 && i2[t4] || (c2 ? i2 : o)("Symbol." + t4));
|
|
415
|
-
};
|
|
416
|
-
u2.store = e2;
|
|
417
|
-
}, function(t3, n3) {
|
|
418
|
-
var r2 = t3.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")();
|
|
419
|
-
typeof __g == "number" && (__g = r2);
|
|
420
|
-
}, function(t3, n3, r2) {
|
|
421
|
-
var e2 = r2(9);
|
|
422
|
-
t3.exports = function(t4) {
|
|
423
|
-
if (!e2(t4))
|
|
424
|
-
throw TypeError(t4 + " is not an object!");
|
|
425
|
-
return t4;
|
|
426
|
-
};
|
|
427
|
-
}, function(t3, n3, r2) {
|
|
428
|
-
t3.exports = !r2(24)(function() {
|
|
429
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
430
|
-
return 7;
|
|
431
|
-
} }).a != 7;
|
|
432
|
-
});
|
|
433
|
-
}, function(t3, n3, r2) {
|
|
434
|
-
var e2 = r2(12), o = r2(17);
|
|
435
|
-
t3.exports = r2(4) ? function(t4, n4, r3) {
|
|
436
|
-
return e2.f(t4, n4, o(1, r3));
|
|
437
|
-
} : function(t4, n4, r3) {
|
|
438
|
-
return t4[n4] = r3, t4;
|
|
439
|
-
};
|
|
440
|
-
}, function(t3, n3) {
|
|
441
|
-
var r2 = t3.exports = { version: "2.4.0" };
|
|
442
|
-
typeof __e == "number" && (__e = r2);
|
|
443
|
-
}, function(t3, n3, r2) {
|
|
444
|
-
var e2 = r2(14);
|
|
445
|
-
t3.exports = function(t4, n4, r3) {
|
|
446
|
-
if (e2(t4), n4 === undefined)
|
|
447
|
-
return t4;
|
|
448
|
-
switch (r3) {
|
|
449
|
-
case 1:
|
|
450
|
-
return function(r4) {
|
|
451
|
-
return t4.call(n4, r4);
|
|
452
|
-
};
|
|
453
|
-
case 2:
|
|
454
|
-
return function(r4, e3) {
|
|
455
|
-
return t4.call(n4, r4, e3);
|
|
456
|
-
};
|
|
457
|
-
case 3:
|
|
458
|
-
return function(r4, e3, o) {
|
|
459
|
-
return t4.call(n4, r4, e3, o);
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
return function() {
|
|
463
|
-
return t4.apply(n4, arguments);
|
|
464
|
-
};
|
|
465
|
-
};
|
|
466
|
-
}, function(t3, n3) {
|
|
467
|
-
var r2 = {}.hasOwnProperty;
|
|
468
|
-
t3.exports = function(t4, n4) {
|
|
469
|
-
return r2.call(t4, n4);
|
|
470
|
-
};
|
|
471
|
-
}, function(t3, n3) {
|
|
472
|
-
t3.exports = function(t4) {
|
|
473
|
-
return typeof t4 == "object" ? t4 !== null : typeof t4 == "function";
|
|
474
|
-
};
|
|
475
|
-
}, function(t3, n3) {
|
|
476
|
-
t3.exports = {};
|
|
477
|
-
}, function(t3, n3) {
|
|
478
|
-
var r2 = {}.toString;
|
|
479
|
-
t3.exports = function(t4) {
|
|
480
|
-
return r2.call(t4).slice(8, -1);
|
|
481
|
-
};
|
|
482
|
-
}, function(t3, n3, r2) {
|
|
483
|
-
var e2 = r2(3), o = r2(26), i2 = r2(32), c2 = Object.defineProperty;
|
|
484
|
-
n3.f = r2(4) ? Object.defineProperty : function(t4, n4, r3) {
|
|
485
|
-
if (e2(t4), n4 = i2(n4, true), e2(r3), o)
|
|
486
|
-
try {
|
|
487
|
-
return c2(t4, n4, r3);
|
|
488
|
-
} catch (t5) {}
|
|
489
|
-
if ("get" in r3 || "set" in r3)
|
|
490
|
-
throw TypeError("Accessors not supported!");
|
|
491
|
-
return "value" in r3 && (t4[n4] = r3.value), t4;
|
|
492
|
-
};
|
|
493
|
-
}, function(t3, n3, r2) {
|
|
494
|
-
var e2 = r2(42), o = r2(15);
|
|
495
|
-
t3.exports = function(t4) {
|
|
496
|
-
return e2(o(t4));
|
|
497
|
-
};
|
|
498
|
-
}, function(t3, n3) {
|
|
499
|
-
t3.exports = function(t4) {
|
|
500
|
-
if (typeof t4 != "function")
|
|
501
|
-
throw TypeError(t4 + " is not a function!");
|
|
502
|
-
return t4;
|
|
503
|
-
};
|
|
504
|
-
}, function(t3, n3) {
|
|
505
|
-
t3.exports = function(t4) {
|
|
506
|
-
if (t4 == undefined)
|
|
507
|
-
throw TypeError("Can't call method on " + t4);
|
|
508
|
-
return t4;
|
|
509
|
-
};
|
|
510
|
-
}, function(t3, n3, r2) {
|
|
511
|
-
var e2 = r2(9), o = r2(2).document, i2 = e2(o) && e2(o.createElement);
|
|
512
|
-
t3.exports = function(t4) {
|
|
513
|
-
return i2 ? o.createElement(t4) : {};
|
|
514
|
-
};
|
|
515
|
-
}, function(t3, n3) {
|
|
516
|
-
t3.exports = function(t4, n4) {
|
|
517
|
-
return { enumerable: !(1 & t4), configurable: !(2 & t4), writable: !(4 & t4), value: n4 };
|
|
518
|
-
};
|
|
519
|
-
}, function(t3, n3, r2) {
|
|
520
|
-
var e2 = r2(12).f, o = r2(8), i2 = r2(1)("toStringTag");
|
|
521
|
-
t3.exports = function(t4, n4, r3) {
|
|
522
|
-
t4 && !o(t4 = r3 ? t4 : t4.prototype, i2) && e2(t4, i2, { configurable: true, value: n4 });
|
|
523
|
-
};
|
|
524
|
-
}, function(t3, n3, r2) {
|
|
525
|
-
var e2 = r2(29)("keys"), o = r2(33);
|
|
526
|
-
t3.exports = function(t4) {
|
|
527
|
-
return e2[t4] || (e2[t4] = o(t4));
|
|
528
|
-
};
|
|
529
|
-
}, function(t3, n3) {
|
|
530
|
-
var { ceil: r2, floor: e2 } = Math;
|
|
531
|
-
t3.exports = function(t4) {
|
|
532
|
-
return isNaN(t4 = +t4) ? 0 : (t4 > 0 ? e2 : r2)(t4);
|
|
533
|
-
};
|
|
534
|
-
}, function(t3, n3, r2) {
|
|
535
|
-
var e2 = r2(11), o = r2(1)("toStringTag"), i2 = e2(function() {
|
|
536
|
-
return arguments;
|
|
537
|
-
}()) == "Arguments", c2 = function(t4, n4) {
|
|
538
|
-
try {
|
|
539
|
-
return t4[n4];
|
|
540
|
-
} catch (t5) {}
|
|
541
|
-
};
|
|
542
|
-
t3.exports = function(t4) {
|
|
543
|
-
var n4, r3, u2;
|
|
544
|
-
return t4 === undefined ? "Undefined" : t4 === null ? "Null" : typeof (r3 = c2(n4 = Object(t4), o)) == "string" ? r3 : i2 ? e2(n4) : (u2 = e2(n4)) == "Object" && typeof n4.callee == "function" ? "Arguments" : u2;
|
|
545
|
-
};
|
|
546
|
-
}, function(t3, n3) {
|
|
547
|
-
t3.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
|
|
548
|
-
}, function(t3, n3, r2) {
|
|
549
|
-
var e2 = r2(2), o = r2(6), i2 = r2(7), c2 = r2(5), u2 = "prototype", s2 = function(t4, n4, r3) {
|
|
550
|
-
var f2, a2, p2, l2 = t4 & s2.F, v2 = t4 & s2.G, h = t4 & s2.S, d2 = t4 & s2.P, y2 = t4 & s2.B, _2 = t4 & s2.W, x = v2 ? o : o[n4] || (o[n4] = {}), m = x[u2], w = v2 ? e2 : h ? e2[n4] : (e2[n4] || {})[u2];
|
|
551
|
-
v2 && (r3 = n4);
|
|
552
|
-
for (f2 in r3)
|
|
553
|
-
a2 = !l2 && w && w[f2] !== undefined, a2 && f2 in x || (p2 = a2 ? w[f2] : r3[f2], x[f2] = v2 && typeof w[f2] != "function" ? r3[f2] : y2 && a2 ? i2(p2, e2) : _2 && w[f2] == p2 ? function(t5) {
|
|
554
|
-
var n5 = function(n6, r4, e3) {
|
|
555
|
-
if (this instanceof t5) {
|
|
556
|
-
switch (arguments.length) {
|
|
557
|
-
case 0:
|
|
558
|
-
return new t5;
|
|
559
|
-
case 1:
|
|
560
|
-
return new t5(n6);
|
|
561
|
-
case 2:
|
|
562
|
-
return new t5(n6, r4);
|
|
563
|
-
}
|
|
564
|
-
return new t5(n6, r4, e3);
|
|
565
|
-
}
|
|
566
|
-
return t5.apply(this, arguments);
|
|
567
|
-
};
|
|
568
|
-
return n5[u2] = t5[u2], n5;
|
|
569
|
-
}(p2) : d2 && typeof p2 == "function" ? i2(Function.call, p2) : p2, d2 && ((x.virtual || (x.virtual = {}))[f2] = p2, t4 & s2.R && m && !m[f2] && c2(m, f2, p2)));
|
|
570
|
-
};
|
|
571
|
-
s2.F = 1, s2.G = 2, s2.S = 4, s2.P = 8, s2.B = 16, s2.W = 32, s2.U = 64, s2.R = 128, t3.exports = s2;
|
|
572
|
-
}, function(t3, n3) {
|
|
573
|
-
t3.exports = function(t4) {
|
|
574
|
-
try {
|
|
575
|
-
return !!t4();
|
|
576
|
-
} catch (t5) {
|
|
577
|
-
return true;
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
}, function(t3, n3, r2) {
|
|
581
|
-
t3.exports = r2(2).document && document.documentElement;
|
|
582
|
-
}, function(t3, n3, r2) {
|
|
583
|
-
t3.exports = !r2(4) && !r2(24)(function() {
|
|
584
|
-
return Object.defineProperty(r2(16)("div"), "a", { get: function() {
|
|
585
|
-
return 7;
|
|
586
|
-
} }).a != 7;
|
|
587
|
-
});
|
|
588
|
-
}, function(t3, n3, r2) {
|
|
589
|
-
var e2 = r2(28), o = r2(23), i2 = r2(57), c2 = r2(5), u2 = r2(8), s2 = r2(10), f2 = r2(45), a2 = r2(18), p2 = r2(52), l2 = r2(1)("iterator"), v2 = !([].keys && ("next" in [].keys())), h = "@@iterator", d2 = "keys", y2 = "values", _2 = function() {
|
|
590
|
-
return this;
|
|
591
|
-
};
|
|
592
|
-
t3.exports = function(t4, n4, r3, x, m, w, g2) {
|
|
593
|
-
f2(r3, n4, x);
|
|
594
|
-
var b2, O, j, S = function(t5) {
|
|
595
|
-
if (!v2 && t5 in T)
|
|
596
|
-
return T[t5];
|
|
597
|
-
switch (t5) {
|
|
598
|
-
case d2:
|
|
599
|
-
return function() {
|
|
600
|
-
return new r3(this, t5);
|
|
601
|
-
};
|
|
602
|
-
case y2:
|
|
603
|
-
return function() {
|
|
604
|
-
return new r3(this, t5);
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
return function() {
|
|
608
|
-
return new r3(this, t5);
|
|
609
|
-
};
|
|
610
|
-
}, E2 = n4 + " Iterator", P = m == y2, M = false, T = t4.prototype, A = T[l2] || T[h] || m && T[m], k = A || S(m), C = m ? P ? S("entries") : k : undefined, I = n4 == "Array" ? T.entries || A : A;
|
|
611
|
-
if (I && (j = p2(I.call(new t4)), j !== Object.prototype && (a2(j, E2, true), e2 || u2(j, l2) || c2(j, l2, _2))), P && A && A.name !== y2 && (M = true, k = function() {
|
|
612
|
-
return A.call(this);
|
|
613
|
-
}), e2 && !g2 || !v2 && !M && T[l2] || c2(T, l2, k), s2[n4] = k, s2[E2] = _2, m)
|
|
614
|
-
if (b2 = { values: P ? k : S(y2), keys: w ? k : S(d2), entries: C }, g2)
|
|
615
|
-
for (O in b2)
|
|
616
|
-
O in T || i2(T, O, b2[O]);
|
|
617
|
-
else
|
|
618
|
-
o(o.P + o.F * (v2 || M), n4, b2);
|
|
619
|
-
return b2;
|
|
620
|
-
};
|
|
621
|
-
}, function(t3, n3) {
|
|
622
|
-
t3.exports = true;
|
|
623
|
-
}, function(t3, n3, r2) {
|
|
624
|
-
var e2 = r2(2), o = "__core-js_shared__", i2 = e2[o] || (e2[o] = {});
|
|
625
|
-
t3.exports = function(t4) {
|
|
626
|
-
return i2[t4] || (i2[t4] = {});
|
|
627
|
-
};
|
|
628
|
-
}, function(t3, n3, r2) {
|
|
629
|
-
var e2, o, i2, c2 = r2(7), u2 = r2(41), s2 = r2(25), f2 = r2(16), a2 = r2(2), p2 = a2.process, l2 = a2.setImmediate, v2 = a2.clearImmediate, h = a2.MessageChannel, d2 = 0, y2 = {}, _2 = "onreadystatechange", x = function() {
|
|
630
|
-
var t4 = +this;
|
|
631
|
-
if (y2.hasOwnProperty(t4)) {
|
|
632
|
-
var n4 = y2[t4];
|
|
633
|
-
delete y2[t4], n4();
|
|
634
|
-
}
|
|
635
|
-
}, m = function(t4) {
|
|
636
|
-
x.call(t4.data);
|
|
637
|
-
};
|
|
638
|
-
l2 && v2 || (l2 = function(t4) {
|
|
639
|
-
for (var n4 = [], r3 = 1;arguments.length > r3; )
|
|
640
|
-
n4.push(arguments[r3++]);
|
|
641
|
-
return y2[++d2] = function() {
|
|
642
|
-
u2(typeof t4 == "function" ? t4 : Function(t4), n4);
|
|
643
|
-
}, e2(d2), d2;
|
|
644
|
-
}, v2 = function(t4) {
|
|
645
|
-
delete y2[t4];
|
|
646
|
-
}, r2(11)(p2) == "process" ? e2 = function(t4) {
|
|
647
|
-
p2.nextTick(c2(x, t4, 1));
|
|
648
|
-
} : h ? (o = new h, i2 = o.port2, o.port1.onmessage = m, e2 = c2(i2.postMessage, i2, 1)) : a2.addEventListener && typeof postMessage == "function" && !a2.importScripts ? (e2 = function(t4) {
|
|
649
|
-
a2.postMessage(t4 + "", "*");
|
|
650
|
-
}, a2.addEventListener("message", m, false)) : e2 = (_2 in f2("script")) ? function(t4) {
|
|
651
|
-
s2.appendChild(f2("script"))[_2] = function() {
|
|
652
|
-
s2.removeChild(this), x.call(t4);
|
|
653
|
-
};
|
|
654
|
-
} : function(t4) {
|
|
655
|
-
setTimeout(c2(x, t4, 1), 0);
|
|
656
|
-
}), t3.exports = { set: l2, clear: v2 };
|
|
657
|
-
}, function(t3, n3, r2) {
|
|
658
|
-
var e2 = r2(20), o = Math.min;
|
|
659
|
-
t3.exports = function(t4) {
|
|
660
|
-
return t4 > 0 ? o(e2(t4), 9007199254740991) : 0;
|
|
661
|
-
};
|
|
662
|
-
}, function(t3, n3, r2) {
|
|
663
|
-
var e2 = r2(9);
|
|
664
|
-
t3.exports = function(t4, n4) {
|
|
665
|
-
if (!e2(t4))
|
|
666
|
-
return t4;
|
|
667
|
-
var r3, o;
|
|
668
|
-
if (n4 && typeof (r3 = t4.toString) == "function" && !e2(o = r3.call(t4)))
|
|
669
|
-
return o;
|
|
670
|
-
if (typeof (r3 = t4.valueOf) == "function" && !e2(o = r3.call(t4)))
|
|
671
|
-
return o;
|
|
672
|
-
if (!n4 && typeof (r3 = t4.toString) == "function" && !e2(o = r3.call(t4)))
|
|
673
|
-
return o;
|
|
674
|
-
throw TypeError("Can't convert object to primitive value");
|
|
675
|
-
};
|
|
676
|
-
}, function(t3, n3) {
|
|
677
|
-
var r2 = 0, e2 = Math.random();
|
|
678
|
-
t3.exports = function(t4) {
|
|
679
|
-
return "Symbol(".concat(t4 === undefined ? "" : t4, ")_", (++r2 + e2).toString(36));
|
|
680
|
-
};
|
|
681
|
-
}, function(t3, n3, r2) {
|
|
682
|
-
function e2(t4) {
|
|
683
|
-
return t4 && t4.__esModule ? t4 : { default: t4 };
|
|
684
|
-
}
|
|
685
|
-
function o() {
|
|
686
|
-
return process.platform !== "win32" ? "" : process.arch === "ia32" && process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432") ? "mixed" : "native";
|
|
687
|
-
}
|
|
688
|
-
function i2(t4) {
|
|
689
|
-
return (0, l2.createHash)("sha256").update(t4).digest("hex");
|
|
690
|
-
}
|
|
691
|
-
function c2(t4) {
|
|
692
|
-
switch (h) {
|
|
693
|
-
case "darwin":
|
|
694
|
-
return t4.split("IOPlatformUUID")[1].split(`
|
|
695
|
-
`)[0].replace(/\=|\s+|\"/gi, "").toLowerCase();
|
|
696
|
-
case "win32":
|
|
697
|
-
return t4.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
698
|
-
case "linux":
|
|
699
|
-
return t4.toString().replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
700
|
-
case "freebsd":
|
|
701
|
-
return t4.toString().replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
702
|
-
default:
|
|
703
|
-
throw new Error("Unsupported platform: " + process.platform);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
function u2(t4) {
|
|
707
|
-
var n4 = c2((0, p2.execSync)(y2[h]).toString());
|
|
708
|
-
return t4 ? n4 : i2(n4);
|
|
709
|
-
}
|
|
710
|
-
function s2(t4) {
|
|
711
|
-
return new a2.default(function(n4, r3) {
|
|
712
|
-
return (0, p2.exec)(y2[h], {}, function(e3, o2, u3) {
|
|
713
|
-
if (e3)
|
|
714
|
-
return r3(new Error("Error while obtaining machine id: " + e3.stack));
|
|
715
|
-
var s3 = c2(o2.toString());
|
|
716
|
-
return n4(t4 ? s3 : i2(s3));
|
|
717
|
-
});
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
Object.defineProperty(n3, "__esModule", { value: true });
|
|
721
|
-
var f2 = r2(35), a2 = e2(f2);
|
|
722
|
-
n3.machineIdSync = u2, n3.machineId = s2;
|
|
723
|
-
var p2 = r2(70), l2 = r2(71), v2 = process, h = v2.platform, d2 = { native: "%windir%\\System32", mixed: "%windir%\\sysnative\\cmd.exe /c %windir%\\System32" }, y2 = { darwin: "ioreg -rd1 -c IOPlatformExpertDevice", win32: d2[o()] + "\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid", linux: "( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :", freebsd: "kenv -q smbios.system.uuid || sysctl -n kern.hostuuid" };
|
|
724
|
-
}, function(t3, n3, r2) {
|
|
725
|
-
t3.exports = { default: r2(36), __esModule: true };
|
|
726
|
-
}, function(t3, n3, r2) {
|
|
727
|
-
r2(66), r2(68), r2(69), r2(67), t3.exports = r2(6).Promise;
|
|
728
|
-
}, function(t3, n3) {
|
|
729
|
-
t3.exports = function() {};
|
|
730
|
-
}, function(t3, n3) {
|
|
731
|
-
t3.exports = function(t4, n4, r2, e2) {
|
|
732
|
-
if (!(t4 instanceof n4) || e2 !== undefined && e2 in t4)
|
|
733
|
-
throw TypeError(r2 + ": incorrect invocation!");
|
|
734
|
-
return t4;
|
|
735
|
-
};
|
|
736
|
-
}, function(t3, n3, r2) {
|
|
737
|
-
var e2 = r2(13), o = r2(31), i2 = r2(62);
|
|
738
|
-
t3.exports = function(t4) {
|
|
739
|
-
return function(n4, r3, c2) {
|
|
740
|
-
var u2, s2 = e2(n4), f2 = o(s2.length), a2 = i2(c2, f2);
|
|
741
|
-
if (t4 && r3 != r3) {
|
|
742
|
-
for (;f2 > a2; )
|
|
743
|
-
if (u2 = s2[a2++], u2 != u2)
|
|
744
|
-
return true;
|
|
745
|
-
} else
|
|
746
|
-
for (;f2 > a2; a2++)
|
|
747
|
-
if ((t4 || (a2 in s2)) && s2[a2] === r3)
|
|
748
|
-
return t4 || a2 || 0;
|
|
749
|
-
return !t4 && -1;
|
|
750
|
-
};
|
|
751
|
-
};
|
|
752
|
-
}, function(t3, n3, r2) {
|
|
753
|
-
var e2 = r2(7), o = r2(44), i2 = r2(43), c2 = r2(3), u2 = r2(31), s2 = r2(64), f2 = {}, a2 = {}, n3 = t3.exports = function(t4, n4, r3, p2, l2) {
|
|
754
|
-
var v2, h, d2, y2, _2 = l2 ? function() {
|
|
755
|
-
return t4;
|
|
756
|
-
} : s2(t4), x = e2(r3, p2, n4 ? 2 : 1), m = 0;
|
|
757
|
-
if (typeof _2 != "function")
|
|
758
|
-
throw TypeError(t4 + " is not iterable!");
|
|
759
|
-
if (i2(_2)) {
|
|
760
|
-
for (v2 = u2(t4.length);v2 > m; m++)
|
|
761
|
-
if (y2 = n4 ? x(c2(h = t4[m])[0], h[1]) : x(t4[m]), y2 === f2 || y2 === a2)
|
|
762
|
-
return y2;
|
|
763
|
-
} else
|
|
764
|
-
for (d2 = _2.call(t4);!(h = d2.next()).done; )
|
|
765
|
-
if (y2 = o(d2, x, h.value, n4), y2 === f2 || y2 === a2)
|
|
766
|
-
return y2;
|
|
767
|
-
};
|
|
768
|
-
n3.BREAK = f2, n3.RETURN = a2;
|
|
769
|
-
}, function(t3, n3) {
|
|
770
|
-
t3.exports = function(t4, n4, r2) {
|
|
771
|
-
var e2 = r2 === undefined;
|
|
772
|
-
switch (n4.length) {
|
|
773
|
-
case 0:
|
|
774
|
-
return e2 ? t4() : t4.call(r2);
|
|
775
|
-
case 1:
|
|
776
|
-
return e2 ? t4(n4[0]) : t4.call(r2, n4[0]);
|
|
777
|
-
case 2:
|
|
778
|
-
return e2 ? t4(n4[0], n4[1]) : t4.call(r2, n4[0], n4[1]);
|
|
779
|
-
case 3:
|
|
780
|
-
return e2 ? t4(n4[0], n4[1], n4[2]) : t4.call(r2, n4[0], n4[1], n4[2]);
|
|
781
|
-
case 4:
|
|
782
|
-
return e2 ? t4(n4[0], n4[1], n4[2], n4[3]) : t4.call(r2, n4[0], n4[1], n4[2], n4[3]);
|
|
783
|
-
}
|
|
784
|
-
return t4.apply(r2, n4);
|
|
785
|
-
};
|
|
786
|
-
}, function(t3, n3, r2) {
|
|
787
|
-
var e2 = r2(11);
|
|
788
|
-
t3.exports = Object("z").propertyIsEnumerable(0) ? Object : function(t4) {
|
|
789
|
-
return e2(t4) == "String" ? t4.split("") : Object(t4);
|
|
790
|
-
};
|
|
791
|
-
}, function(t3, n3, r2) {
|
|
792
|
-
var e2 = r2(10), o = r2(1)("iterator"), i2 = Array.prototype;
|
|
793
|
-
t3.exports = function(t4) {
|
|
794
|
-
return t4 !== undefined && (e2.Array === t4 || i2[o] === t4);
|
|
795
|
-
};
|
|
796
|
-
}, function(t3, n3, r2) {
|
|
797
|
-
var e2 = r2(3);
|
|
798
|
-
t3.exports = function(t4, n4, r3, o) {
|
|
799
|
-
try {
|
|
800
|
-
return o ? n4(e2(r3)[0], r3[1]) : n4(r3);
|
|
801
|
-
} catch (n5) {
|
|
802
|
-
var i2 = t4.return;
|
|
803
|
-
throw i2 !== undefined && e2(i2.call(t4)), n5;
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
}, function(t3, n3, r2) {
|
|
807
|
-
var e2 = r2(49), o = r2(17), i2 = r2(18), c2 = {};
|
|
808
|
-
r2(5)(c2, r2(1)("iterator"), function() {
|
|
809
|
-
return this;
|
|
810
|
-
}), t3.exports = function(t4, n4, r3) {
|
|
811
|
-
t4.prototype = e2(c2, { next: o(1, r3) }), i2(t4, n4 + " Iterator");
|
|
812
|
-
};
|
|
813
|
-
}, function(t3, n3, r2) {
|
|
814
|
-
var e2 = r2(1)("iterator"), o = false;
|
|
815
|
-
try {
|
|
816
|
-
var i2 = [7][e2]();
|
|
817
|
-
i2.return = function() {
|
|
818
|
-
o = true;
|
|
819
|
-
}, Array.from(i2, function() {
|
|
820
|
-
throw 2;
|
|
821
|
-
});
|
|
822
|
-
} catch (t4) {}
|
|
823
|
-
t3.exports = function(t4, n4) {
|
|
824
|
-
if (!n4 && !o)
|
|
825
|
-
return false;
|
|
826
|
-
var r3 = false;
|
|
827
|
-
try {
|
|
828
|
-
var i3 = [7], c2 = i3[e2]();
|
|
829
|
-
c2.next = function() {
|
|
830
|
-
return { done: r3 = true };
|
|
831
|
-
}, i3[e2] = function() {
|
|
832
|
-
return c2;
|
|
833
|
-
}, t4(i3);
|
|
834
|
-
} catch (t5) {}
|
|
835
|
-
return r3;
|
|
836
|
-
};
|
|
837
|
-
}, function(t3, n3) {
|
|
838
|
-
t3.exports = function(t4, n4) {
|
|
839
|
-
return { value: n4, done: !!t4 };
|
|
840
|
-
};
|
|
841
|
-
}, function(t3, n3, r2) {
|
|
842
|
-
var e2 = r2(2), o = r2(30).set, i2 = e2.MutationObserver || e2.WebKitMutationObserver, c2 = e2.process, u2 = e2.Promise, s2 = r2(11)(c2) == "process";
|
|
843
|
-
t3.exports = function() {
|
|
844
|
-
var t4, n4, r3, f2 = function() {
|
|
845
|
-
var e3, o2;
|
|
846
|
-
for (s2 && (e3 = c2.domain) && e3.exit();t4; ) {
|
|
847
|
-
o2 = t4.fn, t4 = t4.next;
|
|
848
|
-
try {
|
|
849
|
-
o2();
|
|
850
|
-
} catch (e4) {
|
|
851
|
-
throw t4 ? r3() : n4 = undefined, e4;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
n4 = undefined, e3 && e3.enter();
|
|
855
|
-
};
|
|
856
|
-
if (s2)
|
|
857
|
-
r3 = function() {
|
|
858
|
-
c2.nextTick(f2);
|
|
859
|
-
};
|
|
860
|
-
else if (i2) {
|
|
861
|
-
var a2 = true, p2 = document.createTextNode("");
|
|
862
|
-
new i2(f2).observe(p2, { characterData: true }), r3 = function() {
|
|
863
|
-
p2.data = a2 = !a2;
|
|
864
|
-
};
|
|
865
|
-
} else if (u2 && u2.resolve) {
|
|
866
|
-
var l2 = u2.resolve();
|
|
867
|
-
r3 = function() {
|
|
868
|
-
l2.then(f2);
|
|
869
|
-
};
|
|
870
|
-
} else
|
|
871
|
-
r3 = function() {
|
|
872
|
-
o.call(e2, f2);
|
|
873
|
-
};
|
|
874
|
-
return function(e3) {
|
|
875
|
-
var o2 = { fn: e3, next: undefined };
|
|
876
|
-
n4 && (n4.next = o2), t4 || (t4 = o2, r3()), n4 = o2;
|
|
877
|
-
};
|
|
878
|
-
};
|
|
879
|
-
}, function(t3, n3, r2) {
|
|
880
|
-
var e2 = r2(3), o = r2(50), i2 = r2(22), c2 = r2(19)("IE_PROTO"), u2 = function() {}, s2 = "prototype", f2 = function() {
|
|
881
|
-
var t4, n4 = r2(16)("iframe"), e3 = i2.length, o2 = ">";
|
|
882
|
-
for (n4.style.display = "none", r2(25).appendChild(n4), n4.src = "javascript:", t4 = n4.contentWindow.document, t4.open(), t4.write("<script>document.F=Object</script" + o2), t4.close(), f2 = t4.F;e3--; )
|
|
883
|
-
delete f2[s2][i2[e3]];
|
|
884
|
-
return f2();
|
|
885
|
-
};
|
|
886
|
-
t3.exports = Object.create || function(t4, n4) {
|
|
887
|
-
var r3;
|
|
888
|
-
return t4 !== null ? (u2[s2] = e2(t4), r3 = new u2, u2[s2] = null, r3[c2] = t4) : r3 = f2(), n4 === undefined ? r3 : o(r3, n4);
|
|
889
|
-
};
|
|
890
|
-
}, function(t3, n3, r2) {
|
|
891
|
-
var e2 = r2(12), o = r2(3), i2 = r2(54);
|
|
892
|
-
t3.exports = r2(4) ? Object.defineProperties : function(t4, n4) {
|
|
893
|
-
o(t4);
|
|
894
|
-
for (var r3, c2 = i2(n4), u2 = c2.length, s2 = 0;u2 > s2; )
|
|
895
|
-
e2.f(t4, r3 = c2[s2++], n4[r3]);
|
|
896
|
-
return t4;
|
|
897
|
-
};
|
|
898
|
-
}, function(t3, n3, r2) {
|
|
899
|
-
var e2 = r2(55), o = r2(17), i2 = r2(13), c2 = r2(32), u2 = r2(8), s2 = r2(26), f2 = Object.getOwnPropertyDescriptor;
|
|
900
|
-
n3.f = r2(4) ? f2 : function(t4, n4) {
|
|
901
|
-
if (t4 = i2(t4), n4 = c2(n4, true), s2)
|
|
902
|
-
try {
|
|
903
|
-
return f2(t4, n4);
|
|
904
|
-
} catch (t5) {}
|
|
905
|
-
if (u2(t4, n4))
|
|
906
|
-
return o(!e2.f.call(t4, n4), t4[n4]);
|
|
907
|
-
};
|
|
908
|
-
}, function(t3, n3, r2) {
|
|
909
|
-
var e2 = r2(8), o = r2(63), i2 = r2(19)("IE_PROTO"), c2 = Object.prototype;
|
|
910
|
-
t3.exports = Object.getPrototypeOf || function(t4) {
|
|
911
|
-
return t4 = o(t4), e2(t4, i2) ? t4[i2] : typeof t4.constructor == "function" && t4 instanceof t4.constructor ? t4.constructor.prototype : t4 instanceof Object ? c2 : null;
|
|
912
|
-
};
|
|
913
|
-
}, function(t3, n3, r2) {
|
|
914
|
-
var e2 = r2(8), o = r2(13), i2 = r2(39)(false), c2 = r2(19)("IE_PROTO");
|
|
915
|
-
t3.exports = function(t4, n4) {
|
|
916
|
-
var r3, u2 = o(t4), s2 = 0, f2 = [];
|
|
917
|
-
for (r3 in u2)
|
|
918
|
-
r3 != c2 && e2(u2, r3) && f2.push(r3);
|
|
919
|
-
for (;n4.length > s2; )
|
|
920
|
-
e2(u2, r3 = n4[s2++]) && (~i2(f2, r3) || f2.push(r3));
|
|
921
|
-
return f2;
|
|
922
|
-
};
|
|
923
|
-
}, function(t3, n3, r2) {
|
|
924
|
-
var e2 = r2(53), o = r2(22);
|
|
925
|
-
t3.exports = Object.keys || function(t4) {
|
|
926
|
-
return e2(t4, o);
|
|
927
|
-
};
|
|
928
|
-
}, function(t3, n3) {
|
|
929
|
-
n3.f = {}.propertyIsEnumerable;
|
|
930
|
-
}, function(t3, n3, r2) {
|
|
931
|
-
var e2 = r2(5);
|
|
932
|
-
t3.exports = function(t4, n4, r3) {
|
|
933
|
-
for (var o in n4)
|
|
934
|
-
r3 && t4[o] ? t4[o] = n4[o] : e2(t4, o, n4[o]);
|
|
935
|
-
return t4;
|
|
936
|
-
};
|
|
937
|
-
}, function(t3, n3, r2) {
|
|
938
|
-
t3.exports = r2(5);
|
|
939
|
-
}, function(t3, n3, r2) {
|
|
940
|
-
var e2 = r2(9), o = r2(3), i2 = function(t4, n4) {
|
|
941
|
-
if (o(t4), !e2(n4) && n4 !== null)
|
|
942
|
-
throw TypeError(n4 + ": can't set as prototype!");
|
|
943
|
-
};
|
|
944
|
-
t3.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? function(t4, n4, e3) {
|
|
945
|
-
try {
|
|
946
|
-
e3 = r2(7)(Function.call, r2(51).f(Object.prototype, "__proto__").set, 2), e3(t4, []), n4 = !(t4 instanceof Array);
|
|
947
|
-
} catch (t5) {
|
|
948
|
-
n4 = true;
|
|
949
|
-
}
|
|
950
|
-
return function(t5, r3) {
|
|
951
|
-
return i2(t5, r3), n4 ? t5.__proto__ = r3 : e3(t5, r3), t5;
|
|
952
|
-
};
|
|
953
|
-
}({}, false) : undefined), check: i2 };
|
|
954
|
-
}, function(t3, n3, r2) {
|
|
955
|
-
var e2 = r2(2), o = r2(6), i2 = r2(12), c2 = r2(4), u2 = r2(1)("species");
|
|
956
|
-
t3.exports = function(t4) {
|
|
957
|
-
var n4 = typeof o[t4] == "function" ? o[t4] : e2[t4];
|
|
958
|
-
c2 && n4 && !n4[u2] && i2.f(n4, u2, { configurable: true, get: function() {
|
|
959
|
-
return this;
|
|
960
|
-
} });
|
|
961
|
-
};
|
|
962
|
-
}, function(t3, n3, r2) {
|
|
963
|
-
var e2 = r2(3), o = r2(14), i2 = r2(1)("species");
|
|
964
|
-
t3.exports = function(t4, n4) {
|
|
965
|
-
var r3, c2 = e2(t4).constructor;
|
|
966
|
-
return c2 === undefined || (r3 = e2(c2)[i2]) == undefined ? n4 : o(r3);
|
|
967
|
-
};
|
|
968
|
-
}, function(t3, n3, r2) {
|
|
969
|
-
var e2 = r2(20), o = r2(15);
|
|
970
|
-
t3.exports = function(t4) {
|
|
971
|
-
return function(n4, r3) {
|
|
972
|
-
var i2, c2, u2 = String(o(n4)), s2 = e2(r3), f2 = u2.length;
|
|
973
|
-
return s2 < 0 || s2 >= f2 ? t4 ? "" : undefined : (i2 = u2.charCodeAt(s2), i2 < 55296 || i2 > 56319 || s2 + 1 === f2 || (c2 = u2.charCodeAt(s2 + 1)) < 56320 || c2 > 57343 ? t4 ? u2.charAt(s2) : i2 : t4 ? u2.slice(s2, s2 + 2) : (i2 - 55296 << 10) + (c2 - 56320) + 65536);
|
|
974
|
-
};
|
|
975
|
-
};
|
|
976
|
-
}, function(t3, n3, r2) {
|
|
977
|
-
var e2 = r2(20), o = Math.max, i2 = Math.min;
|
|
978
|
-
t3.exports = function(t4, n4) {
|
|
979
|
-
return t4 = e2(t4), t4 < 0 ? o(t4 + n4, 0) : i2(t4, n4);
|
|
980
|
-
};
|
|
981
|
-
}, function(t3, n3, r2) {
|
|
982
|
-
var e2 = r2(15);
|
|
983
|
-
t3.exports = function(t4) {
|
|
984
|
-
return Object(e2(t4));
|
|
985
|
-
};
|
|
986
|
-
}, function(t3, n3, r2) {
|
|
987
|
-
var e2 = r2(21), o = r2(1)("iterator"), i2 = r2(10);
|
|
988
|
-
t3.exports = r2(6).getIteratorMethod = function(t4) {
|
|
989
|
-
if (t4 != null)
|
|
990
|
-
return t4[o] || t4["@@iterator"] || i2[e2(t4)];
|
|
991
|
-
};
|
|
992
|
-
}, function(t3, n3, r2) {
|
|
993
|
-
var e2 = r2(37), o = r2(47), i2 = r2(10), c2 = r2(13);
|
|
994
|
-
t3.exports = r2(27)(Array, "Array", function(t4, n4) {
|
|
995
|
-
this._t = c2(t4), this._i = 0, this._k = n4;
|
|
996
|
-
}, function() {
|
|
997
|
-
var t4 = this._t, n4 = this._k, r3 = this._i++;
|
|
998
|
-
return !t4 || r3 >= t4.length ? (this._t = undefined, o(1)) : n4 == "keys" ? o(0, r3) : n4 == "values" ? o(0, t4[r3]) : o(0, [r3, t4[r3]]);
|
|
999
|
-
}, "values"), i2.Arguments = i2.Array, e2("keys"), e2("values"), e2("entries");
|
|
1000
|
-
}, function(t3, n3) {}, function(t3, n3, r2) {
|
|
1001
|
-
var e2, o, i2, c2 = r2(28), u2 = r2(2), s2 = r2(7), f2 = r2(21), a2 = r2(23), p2 = r2(9), l2 = (r2(3), r2(14)), v2 = r2(38), h = r2(40), d2 = (r2(58).set, r2(60)), y2 = r2(30).set, _2 = r2(48)(), x = "Promise", m = u2.TypeError, w = u2.process, g2 = u2[x], w = u2.process, b2 = f2(w) == "process", O = function() {}, j = !!function() {
|
|
1002
|
-
try {
|
|
1003
|
-
var t4 = g2.resolve(1), n4 = (t4.constructor = {})[r2(1)("species")] = function(t5) {
|
|
1004
|
-
t5(O, O);
|
|
1005
|
-
};
|
|
1006
|
-
return (b2 || typeof PromiseRejectionEvent == "function") && t4.then(O) instanceof n4;
|
|
1007
|
-
} catch (t5) {}
|
|
1008
|
-
}(), S = function(t4, n4) {
|
|
1009
|
-
return t4 === n4 || t4 === g2 && n4 === i2;
|
|
1010
|
-
}, E2 = function(t4) {
|
|
1011
|
-
var n4;
|
|
1012
|
-
return !(!p2(t4) || typeof (n4 = t4.then) != "function") && n4;
|
|
1013
|
-
}, P = function(t4) {
|
|
1014
|
-
return S(g2, t4) ? new M(t4) : new o(t4);
|
|
1015
|
-
}, M = o = function(t4) {
|
|
1016
|
-
var n4, r3;
|
|
1017
|
-
this.promise = new t4(function(t5, e3) {
|
|
1018
|
-
if (n4 !== undefined || r3 !== undefined)
|
|
1019
|
-
throw m("Bad Promise constructor");
|
|
1020
|
-
n4 = t5, r3 = e3;
|
|
1021
|
-
}), this.resolve = l2(n4), this.reject = l2(r3);
|
|
1022
|
-
}, T = function(t4) {
|
|
1023
|
-
try {
|
|
1024
|
-
t4();
|
|
1025
|
-
} catch (t5) {
|
|
1026
|
-
return { error: t5 };
|
|
1027
|
-
}
|
|
1028
|
-
}, A = function(t4, n4) {
|
|
1029
|
-
if (!t4._n) {
|
|
1030
|
-
t4._n = true;
|
|
1031
|
-
var r3 = t4._c;
|
|
1032
|
-
_2(function() {
|
|
1033
|
-
for (var e3 = t4._v, o2 = t4._s == 1, i3 = 0, c3 = function(n5) {
|
|
1034
|
-
var r4, i4, c4 = o2 ? n5.ok : n5.fail, u3 = n5.resolve, s3 = n5.reject, f3 = n5.domain;
|
|
1035
|
-
try {
|
|
1036
|
-
c4 ? (o2 || (t4._h == 2 && I(t4), t4._h = 1), c4 === true ? r4 = e3 : (f3 && f3.enter(), r4 = c4(e3), f3 && f3.exit()), r4 === n5.promise ? s3(m("Promise-chain cycle")) : (i4 = E2(r4)) ? i4.call(r4, u3, s3) : u3(r4)) : s3(e3);
|
|
1037
|
-
} catch (t5) {
|
|
1038
|
-
s3(t5);
|
|
1039
|
-
}
|
|
1040
|
-
};r3.length > i3; )
|
|
1041
|
-
c3(r3[i3++]);
|
|
1042
|
-
t4._c = [], t4._n = false, n4 && !t4._h && k(t4);
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
}, k = function(t4) {
|
|
1046
|
-
y2.call(u2, function() {
|
|
1047
|
-
var n4, r3, e3, o2 = t4._v;
|
|
1048
|
-
if (C(t4) && (n4 = T(function() {
|
|
1049
|
-
b2 ? w.emit("unhandledRejection", o2, t4) : (r3 = u2.onunhandledrejection) ? r3({ promise: t4, reason: o2 }) : (e3 = u2.console) && e3.error && e3.error("Unhandled promise rejection", o2);
|
|
1050
|
-
}), t4._h = b2 || C(t4) ? 2 : 1), t4._a = undefined, n4)
|
|
1051
|
-
throw n4.error;
|
|
1052
|
-
});
|
|
1053
|
-
}, C = function(t4) {
|
|
1054
|
-
if (t4._h == 1)
|
|
1055
|
-
return false;
|
|
1056
|
-
for (var n4, r3 = t4._a || t4._c, e3 = 0;r3.length > e3; )
|
|
1057
|
-
if (n4 = r3[e3++], n4.fail || !C(n4.promise))
|
|
1058
|
-
return false;
|
|
1059
|
-
return true;
|
|
1060
|
-
}, I = function(t4) {
|
|
1061
|
-
y2.call(u2, function() {
|
|
1062
|
-
var n4;
|
|
1063
|
-
b2 ? w.emit("rejectionHandled", t4) : (n4 = u2.onrejectionhandled) && n4({ promise: t4, reason: t4._v });
|
|
1064
|
-
});
|
|
1065
|
-
}, R = function(t4) {
|
|
1066
|
-
var n4 = this;
|
|
1067
|
-
n4._d || (n4._d = true, n4 = n4._w || n4, n4._v = t4, n4._s = 2, n4._a || (n4._a = n4._c.slice()), A(n4, true));
|
|
1068
|
-
}, F = function(t4) {
|
|
1069
|
-
var n4, r3 = this;
|
|
1070
|
-
if (!r3._d) {
|
|
1071
|
-
r3._d = true, r3 = r3._w || r3;
|
|
1072
|
-
try {
|
|
1073
|
-
if (r3 === t4)
|
|
1074
|
-
throw m("Promise can't be resolved itself");
|
|
1075
|
-
(n4 = E2(t4)) ? _2(function() {
|
|
1076
|
-
var e3 = { _w: r3, _d: false };
|
|
1077
|
-
try {
|
|
1078
|
-
n4.call(t4, s2(F, e3, 1), s2(R, e3, 1));
|
|
1079
|
-
} catch (t5) {
|
|
1080
|
-
R.call(e3, t5);
|
|
1081
|
-
}
|
|
1082
|
-
}) : (r3._v = t4, r3._s = 1, A(r3, false));
|
|
1083
|
-
} catch (t5) {
|
|
1084
|
-
R.call({ _w: r3, _d: false }, t5);
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
|
-
j || (g2 = function(t4) {
|
|
1089
|
-
v2(this, g2, x, "_h"), l2(t4), e2.call(this);
|
|
1090
|
-
try {
|
|
1091
|
-
t4(s2(F, this, 1), s2(R, this, 1));
|
|
1092
|
-
} catch (t5) {
|
|
1093
|
-
R.call(this, t5);
|
|
1094
|
-
}
|
|
1095
|
-
}, e2 = function(t4) {
|
|
1096
|
-
this._c = [], this._a = undefined, this._s = 0, this._d = false, this._v = undefined, this._h = 0, this._n = false;
|
|
1097
|
-
}, e2.prototype = r2(56)(g2.prototype, { then: function(t4, n4) {
|
|
1098
|
-
var r3 = P(d2(this, g2));
|
|
1099
|
-
return r3.ok = typeof t4 != "function" || t4, r3.fail = typeof n4 == "function" && n4, r3.domain = b2 ? w.domain : undefined, this._c.push(r3), this._a && this._a.push(r3), this._s && A(this, false), r3.promise;
|
|
1100
|
-
}, catch: function(t4) {
|
|
1101
|
-
return this.then(undefined, t4);
|
|
1102
|
-
} }), M = function() {
|
|
1103
|
-
var t4 = new e2;
|
|
1104
|
-
this.promise = t4, this.resolve = s2(F, t4, 1), this.reject = s2(R, t4, 1);
|
|
1105
|
-
}), a2(a2.G + a2.W + a2.F * !j, { Promise: g2 }), r2(18)(g2, x), r2(59)(x), i2 = r2(6)[x], a2(a2.S + a2.F * !j, x, { reject: function(t4) {
|
|
1106
|
-
var n4 = P(this), r3 = n4.reject;
|
|
1107
|
-
return r3(t4), n4.promise;
|
|
1108
|
-
} }), a2(a2.S + a2.F * (c2 || !j), x, { resolve: function(t4) {
|
|
1109
|
-
if (t4 instanceof g2 && S(t4.constructor, this))
|
|
1110
|
-
return t4;
|
|
1111
|
-
var n4 = P(this), r3 = n4.resolve;
|
|
1112
|
-
return r3(t4), n4.promise;
|
|
1113
|
-
} }), a2(a2.S + a2.F * !(j && r2(46)(function(t4) {
|
|
1114
|
-
g2.all(t4).catch(O);
|
|
1115
|
-
})), x, { all: function(t4) {
|
|
1116
|
-
var n4 = this, r3 = P(n4), e3 = r3.resolve, o2 = r3.reject, i3 = T(function() {
|
|
1117
|
-
var r4 = [], i4 = 0, c3 = 1;
|
|
1118
|
-
h(t4, false, function(t5) {
|
|
1119
|
-
var u3 = i4++, s3 = false;
|
|
1120
|
-
r4.push(undefined), c3++, n4.resolve(t5).then(function(t6) {
|
|
1121
|
-
s3 || (s3 = true, r4[u3] = t6, --c3 || e3(r4));
|
|
1122
|
-
}, o2);
|
|
1123
|
-
}), --c3 || e3(r4);
|
|
1124
|
-
});
|
|
1125
|
-
return i3 && o2(i3.error), r3.promise;
|
|
1126
|
-
}, race: function(t4) {
|
|
1127
|
-
var n4 = this, r3 = P(n4), e3 = r3.reject, o2 = T(function() {
|
|
1128
|
-
h(t4, false, function(t5) {
|
|
1129
|
-
n4.resolve(t5).then(r3.resolve, e3);
|
|
1130
|
-
});
|
|
1131
|
-
});
|
|
1132
|
-
return o2 && e3(o2.error), r3.promise;
|
|
1133
|
-
} });
|
|
1134
|
-
}, function(t3, n3, r2) {
|
|
1135
|
-
var e2 = r2(61)(true);
|
|
1136
|
-
r2(27)(String, "String", function(t4) {
|
|
1137
|
-
this._t = String(t4), this._i = 0;
|
|
1138
|
-
}, function() {
|
|
1139
|
-
var t4, n4 = this._t, r3 = this._i;
|
|
1140
|
-
return r3 >= n4.length ? { value: undefined, done: true } : (t4 = e2(n4, r3), this._i += t4.length, { value: t4, done: false });
|
|
1141
|
-
});
|
|
1142
|
-
}, function(t3, n3, r2) {
|
|
1143
|
-
r2(65);
|
|
1144
|
-
for (var e2 = r2(2), o = r2(5), i2 = r2(10), c2 = r2(1)("toStringTag"), u2 = ["NodeList", "DOMTokenList", "MediaList", "StyleSheetList", "CSSRuleList"], s2 = 0;s2 < 5; s2++) {
|
|
1145
|
-
var f2 = u2[s2], a2 = e2[f2], p2 = a2 && a2.prototype;
|
|
1146
|
-
p2 && !p2[c2] && o(p2, c2, f2), i2[f2] = i2.Array;
|
|
1147
|
-
}
|
|
1148
|
-
}, function(t3, n3) {
|
|
1149
|
-
t3.exports = __require("child_process");
|
|
1150
|
-
}, function(t3, n3) {
|
|
1151
|
-
t3.exports = __require("crypto");
|
|
1152
|
-
}]);
|
|
1153
|
-
});
|
|
1154
|
-
});
|
|
1155
|
-
|
|
1156
396
|
// ../../node_modules/silver-fleece/dist/silver-fleece.umd.js
|
|
1157
397
|
var require_silver_fleece_umd = __commonJS((exports, module) => {
|
|
1158
398
|
(function(global2, factory) {
|
|
@@ -16404,7 +15644,7 @@ var require_public_api = __commonJS((exports) => {
|
|
|
16404
15644
|
});
|
|
16405
15645
|
|
|
16406
15646
|
// ../../node_modules/yaml/dist/index.js
|
|
16407
|
-
var
|
|
15647
|
+
var require_dist = __commonJS((exports) => {
|
|
16408
15648
|
var composer = require_composer();
|
|
16409
15649
|
var Document = require_Document();
|
|
16410
15650
|
var Schema = require_Schema();
|
|
@@ -30265,8 +29505,8 @@ var init_fiberRuntime = __esm(() => {
|
|
|
30265
29505
|
const clockService = get10(this.getFiberRef(currentServices), clockTag);
|
|
30266
29506
|
const date6 = new Date(clockService.unsafeCurrentTimeMillis());
|
|
30267
29507
|
withRedactableContext(contextMap, () => {
|
|
30268
|
-
for (const
|
|
30269
|
-
|
|
29508
|
+
for (const logger14 of loggers) {
|
|
29509
|
+
logger14.log({
|
|
30270
29510
|
fiberId: this.id(),
|
|
30271
29511
|
logLevel,
|
|
30272
29512
|
message,
|
|
@@ -35625,7 +34865,7 @@ var init_FiberRef = __esm(() => {
|
|
|
35625
34865
|
});
|
|
35626
34866
|
|
|
35627
34867
|
// ../../node_modules/effect/dist/esm/internal/layer/circular.js
|
|
35628
|
-
var minimumLogLevel = (level) => scopedDiscard(fiberRefLocallyScoped(currentMinimumLogLevel, level)), withMinimumLogLevel, addLogger = (
|
|
34868
|
+
var minimumLogLevel = (level) => scopedDiscard(fiberRefLocallyScoped(currentMinimumLogLevel, level)), withMinimumLogLevel, addLogger = (logger14) => scopedDiscard(fiberRefLocallyScopedWith(currentLoggers, add2(logger14))), addLoggerEffect = (effect) => unwrapEffect(map17(effect, addLogger)), addLoggerScoped = (effect) => unwrapScoped(map17(effect, addLogger)), removeLogger = (logger14) => scopedDiscard(fiberRefLocallyScopedWith(currentLoggers, remove6(logger14))), replaceLogger, replaceLoggerEffect, replaceLoggerScoped, setConfigProvider = (configProvider) => scopedDiscard(withConfigProviderScoped(configProvider)), parentSpan = (span2) => succeedContext(make11(spanTag, span2)), span2 = (name17, options) => {
|
|
35629
34869
|
options = addSpanStackTrace(options);
|
|
35630
34870
|
return scoped2(spanTag, options?.onEnd ? tap2(makeSpanScoped(name17, options), (span3) => addFinalizer((exit4) => options.onEnd(span3, exit4))) : makeSpanScoped(name17, options));
|
|
35631
34871
|
}, setTracer = (tracer3) => scopedDiscard(withTracerScoped(tracer3));
|
|
@@ -64716,7 +63956,7 @@ var init_httpApp = __esm(() => {
|
|
|
64716
63956
|
});
|
|
64717
63957
|
|
|
64718
63958
|
// ../../node_modules/@effect/platform/dist/esm/internal/httpMiddleware.js
|
|
64719
|
-
var make86 = (middleware) => middleware, loggerDisabled, withLoggerDisabled = (self2) => zipRight7(set10(loggerDisabled, true), self2), currentTracerDisabledWhen2, withTracerDisabledWhen2, withTracerDisabledWhenEffect, withTracerDisabledForUrls, SpanNameGenerator2, withSpanNameGenerator2,
|
|
63959
|
+
var make86 = (middleware) => middleware, loggerDisabled, withLoggerDisabled = (self2) => zipRight7(set10(loggerDisabled, true), self2), currentTracerDisabledWhen2, withTracerDisabledWhen2, withTracerDisabledWhenEffect, withTracerDisabledForUrls, SpanNameGenerator2, withSpanNameGenerator2, logger14, tracer3, xForwardedHeaders, searchParamsParser = (httpApp) => withFiberRuntime2((fiber) => {
|
|
64720
63960
|
const context10 = fiber.currentContext;
|
|
64721
63961
|
const request2 = unsafeGet5(context10, HttpServerRequest);
|
|
64722
63962
|
const params = searchParamsFromURL2(new URL(request2.originalUrl));
|
|
@@ -64831,7 +64071,7 @@ var init_httpMiddleware = __esm(() => {
|
|
|
64831
64071
|
defaultValue: () => (request2) => `http.server ${request2.method}`
|
|
64832
64072
|
});
|
|
64833
64073
|
withSpanNameGenerator2 = /* @__PURE__ */ dual(2, (self2, f2) => provide3(self2, succeed12(SpanNameGenerator2, f2)));
|
|
64834
|
-
|
|
64074
|
+
logger14 = /* @__PURE__ */ make86((httpApp) => {
|
|
64835
64075
|
let counter6 = 0;
|
|
64836
64076
|
return withFiberRuntime2((fiber) => {
|
|
64837
64077
|
const request2 = unsafeGet5(fiber.currentContext, HttpServerRequest);
|
|
@@ -65844,16 +65084,16 @@ __export(exports_HttpMiddleware, {
|
|
|
65844
65084
|
searchParamsParser: () => searchParamsParser2,
|
|
65845
65085
|
make: () => make89,
|
|
65846
65086
|
loggerDisabled: () => loggerDisabled2,
|
|
65847
|
-
logger: () =>
|
|
65087
|
+
logger: () => logger15,
|
|
65848
65088
|
currentTracerDisabledWhen: () => currentTracerDisabledWhen3,
|
|
65849
65089
|
cors: () => cors2,
|
|
65850
65090
|
SpanNameGenerator: () => SpanNameGenerator3
|
|
65851
65091
|
});
|
|
65852
|
-
var make89,
|
|
65092
|
+
var make89, logger15, loggerDisabled2, withLoggerDisabled2, currentTracerDisabledWhen3, withTracerDisabledWhen3, withTracerDisabledWhenEffect2, withTracerDisabledForUrls2, xForwardedHeaders2, searchParamsParser2, cors2, SpanNameGenerator3, withSpanNameGenerator3;
|
|
65853
65093
|
var init_HttpMiddleware = __esm(() => {
|
|
65854
65094
|
init_httpMiddleware();
|
|
65855
65095
|
make89 = make86;
|
|
65856
|
-
|
|
65096
|
+
logger15 = logger14;
|
|
65857
65097
|
loggerDisabled2 = loggerDisabled;
|
|
65858
65098
|
withLoggerDisabled2 = withLoggerDisabled;
|
|
65859
65099
|
currentTracerDisabledWhen3 = currentTracerDisabledWhen2;
|
|
@@ -79251,13 +78491,13 @@ var init_Snowflake = __esm(() => {
|
|
|
79251
78491
|
constBigInt12 = /* @__PURE__ */ BigInt(12);
|
|
79252
78492
|
constBigInt22 = /* @__PURE__ */ BigInt(22);
|
|
79253
78493
|
makeGenerator = /* @__PURE__ */ gen4(function* () {
|
|
79254
|
-
let
|
|
78494
|
+
let machineId = Math.floor(Math.random() * 1024);
|
|
79255
78495
|
const clock3 = yield* clock2;
|
|
79256
78496
|
let sequence = 0;
|
|
79257
78497
|
let sequenceAt = Math.floor(clock3.unsafeCurrentTimeMillis());
|
|
79258
78498
|
return identity({
|
|
79259
78499
|
setMachineId: (newMachineId) => sync6(() => {
|
|
79260
|
-
|
|
78500
|
+
machineId = newMachineId;
|
|
79261
78501
|
}),
|
|
79262
78502
|
unsafeNext() {
|
|
79263
78503
|
let now3 = Math.floor(clock3.unsafeCurrentTimeMillis());
|
|
@@ -79271,7 +78511,7 @@ var init_Snowflake = __esm(() => {
|
|
|
79271
78511
|
sequence = 0;
|
|
79272
78512
|
}
|
|
79273
78513
|
return make113({
|
|
79274
|
-
machineId
|
|
78514
|
+
machineId,
|
|
79275
78515
|
sequence: sequence++,
|
|
79276
78516
|
timestamp: sequenceAt
|
|
79277
78517
|
});
|
|
@@ -81655,7 +80895,7 @@ var MachineId, make118 = (shardId) => MachineId.make(shardId);
|
|
|
81655
80895
|
var init_MachineId = __esm(() => {
|
|
81656
80896
|
init_Schema();
|
|
81657
80897
|
MachineId = /* @__PURE__ */ Int.pipe(/* @__PURE__ */ brand("MachineId"), /* @__PURE__ */ annotations2({
|
|
81658
|
-
pretty: () => (
|
|
80898
|
+
pretty: () => (machineId) => `MachineId(${machineId})`
|
|
81659
80899
|
}));
|
|
81660
80900
|
});
|
|
81661
80901
|
|
|
@@ -81857,12 +81097,12 @@ var init_ShardManager = __esm(() => {
|
|
|
81857
81097
|
});
|
|
81858
81098
|
}
|
|
81859
81099
|
const getAssignments = sync6(() => state2.assignments);
|
|
81860
|
-
let
|
|
81100
|
+
let machineId = 0;
|
|
81861
81101
|
const register5 = fnUntraced2(function* (runner) {
|
|
81862
81102
|
yield* logInfo2(`Registering runner ${Runner.pretty(runner)}`);
|
|
81863
81103
|
const current2 = get17(state2.allRunners, runner.address).pipe(filter4((r3) => r3.runner.version === runner.version));
|
|
81864
81104
|
if (isSome2(current2)) {
|
|
81865
|
-
return make118(++
|
|
81105
|
+
return make118(++machineId);
|
|
81866
81106
|
}
|
|
81867
81107
|
state2.addRunner(runner, clock3.unsafeCurrentTimeMillis());
|
|
81868
81108
|
updateRunnerMetrics();
|
|
@@ -81871,7 +81111,7 @@ var init_ShardManager = __esm(() => {
|
|
|
81871
81111
|
}));
|
|
81872
81112
|
yield* forkIn2(persistRunners, scope5);
|
|
81873
81113
|
yield* forkIn2(rebalance, scope5);
|
|
81874
|
-
return make118(++
|
|
81114
|
+
return make118(++machineId);
|
|
81875
81115
|
});
|
|
81876
81116
|
const unregister = fnUntraced2(function* (address) {
|
|
81877
81117
|
if (!has6(state2.allRunners, address))
|
|
@@ -82576,8 +81816,8 @@ var init_Sharding = __esm(() => {
|
|
|
82576
81816
|
yield* gen4(function* () {
|
|
82577
81817
|
yield* logDebug2("Registering with shard manager");
|
|
82578
81818
|
if (isSome2(config5.runnerAddress)) {
|
|
82579
|
-
const
|
|
82580
|
-
yield* snowflakeGen.setMachineId(
|
|
81819
|
+
const machineId = yield* shardManager.register(config5.runnerAddress.value, config5.shardGroups);
|
|
81820
|
+
yield* snowflakeGen.setMachineId(machineId);
|
|
82581
81821
|
}
|
|
82582
81822
|
yield* stopShardManagerTimeout;
|
|
82583
81823
|
yield* logDebug2("Subscribing to sharding events");
|
|
@@ -84453,9 +83693,9 @@ import * as Http from "node:http";
|
|
|
84453
83693
|
import * as Https from "node:https";
|
|
84454
83694
|
import { Readable as Readable2 } from "node:stream";
|
|
84455
83695
|
import { pipeline as pipeline2 } from "node:stream/promises";
|
|
84456
|
-
var HttpAgentTypeId, HttpAgent, makeAgent = (options4) => map26(all9([acquireRelease2(sync6(() => new Http.Agent(options4)), (agent) => sync6(() => agent.destroy())), acquireRelease2(sync6(() => new Https.Agent(options4)), (agent) => sync6(() => agent.destroy()))]), ([
|
|
83696
|
+
var HttpAgentTypeId, HttpAgent, makeAgent = (options4) => map26(all9([acquireRelease2(sync6(() => new Http.Agent(options4)), (agent) => sync6(() => agent.destroy())), acquireRelease2(sync6(() => new Https.Agent(options4)), (agent) => sync6(() => agent.destroy()))]), ([http3, https]) => ({
|
|
84457
83697
|
[HttpAgentTypeId]: HttpAgentTypeId,
|
|
84458
|
-
http:
|
|
83698
|
+
http: http3,
|
|
84459
83699
|
https
|
|
84460
83700
|
})), makeAgentLayer = (options4) => scoped4(HttpAgent, makeAgent(options4)), agentLayer, fromAgent = (agent) => make74((request4, url3, signal2) => {
|
|
84461
83701
|
const nodeRequest = url3.protocol === "https:" ? Https.request(url3, {
|
|
@@ -90892,11 +90132,11 @@ var require_client_h2 = __commonJS((exports, module) => {
|
|
|
90892
90132
|
var { channels } = require_diagnostics();
|
|
90893
90133
|
var kOpenStreams = Symbol("open streams");
|
|
90894
90134
|
var extractBody;
|
|
90895
|
-
var
|
|
90135
|
+
var http22;
|
|
90896
90136
|
try {
|
|
90897
|
-
|
|
90137
|
+
http22 = __require("node:http2");
|
|
90898
90138
|
} catch {
|
|
90899
|
-
|
|
90139
|
+
http22 = { constants: {} };
|
|
90900
90140
|
}
|
|
90901
90141
|
var {
|
|
90902
90142
|
constants: {
|
|
@@ -90908,7 +90148,7 @@ var require_client_h2 = __commonJS((exports, module) => {
|
|
|
90908
90148
|
HTTP2_HEADER_EXPECT,
|
|
90909
90149
|
HTTP2_HEADER_STATUS
|
|
90910
90150
|
}
|
|
90911
|
-
} =
|
|
90151
|
+
} = http22;
|
|
90912
90152
|
function parseH2Headers(headers) {
|
|
90913
90153
|
const result2 = [];
|
|
90914
90154
|
for (const [name17, value9] of Object.entries(headers)) {
|
|
@@ -90924,7 +90164,7 @@ var require_client_h2 = __commonJS((exports, module) => {
|
|
|
90924
90164
|
}
|
|
90925
90165
|
async function connectH2(client, socket) {
|
|
90926
90166
|
client[kSocket] = socket;
|
|
90927
|
-
const session =
|
|
90167
|
+
const session = http22.connect(client[kUrl], {
|
|
90928
90168
|
createConnection: () => socket,
|
|
90929
90169
|
peerMaxConcurrentStreams: client[kMaxConcurrentStreams],
|
|
90930
90170
|
settings: {
|
|
@@ -91389,7 +90629,7 @@ var require_client_h2 = __commonJS((exports, module) => {
|
|
|
91389
90629
|
var require_client = __commonJS((exports, module) => {
|
|
91390
90630
|
var assert5 = __require("node:assert");
|
|
91391
90631
|
var net = __require("node:net");
|
|
91392
|
-
var
|
|
90632
|
+
var http3 = __require("node:http");
|
|
91393
90633
|
var util4 = require_util();
|
|
91394
90634
|
var { ClientStats } = require_stats();
|
|
91395
90635
|
var { channels } = require_diagnostics();
|
|
@@ -91444,7 +90684,7 @@ var require_client = __commonJS((exports, module) => {
|
|
|
91444
90684
|
var connectH1 = require_client_h1();
|
|
91445
90685
|
var connectH2 = require_client_h2();
|
|
91446
90686
|
var kClosedResolve = Symbol("kClosedResolve");
|
|
91447
|
-
var getDefaultNodeMaxHeaderSize =
|
|
90687
|
+
var getDefaultNodeMaxHeaderSize = http3 && http3.maxHeaderSize && Number.isInteger(http3.maxHeaderSize) && http3.maxHeaderSize > 0 ? () => http3.maxHeaderSize : () => {
|
|
91448
90688
|
throw new InvalidArgumentError5("http module not available or http.maxHeaderSize invalid");
|
|
91449
90689
|
};
|
|
91450
90690
|
var noop4 = () => {};
|
|
@@ -106016,7 +105256,7 @@ var require_extension = __commonJS((exports, module) => {
|
|
|
106016
105256
|
var require_websocket2 = __commonJS((exports, module) => {
|
|
106017
105257
|
var EventEmitter = __require("events");
|
|
106018
105258
|
var https = __require("https");
|
|
106019
|
-
var
|
|
105259
|
+
var http3 = __require("http");
|
|
106020
105260
|
var net = __require("net");
|
|
106021
105261
|
var tls = __require("tls");
|
|
106022
105262
|
var { randomBytes: randomBytes3, createHash: createHash3 } = __require("crypto");
|
|
@@ -106429,7 +105669,7 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
106429
105669
|
}
|
|
106430
105670
|
const defaultPort = isSecure ? 443 : 80;
|
|
106431
105671
|
const key2 = randomBytes3(16).toString("base64");
|
|
106432
|
-
const request4 = isSecure ? https.request :
|
|
105672
|
+
const request4 = isSecure ? https.request : http3.request;
|
|
106433
105673
|
const protocolSet = new Set;
|
|
106434
105674
|
let perMessageDeflate;
|
|
106435
105675
|
opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
|
@@ -106922,7 +106162,7 @@ var require_subprotocol = __commonJS((exports, module) => {
|
|
|
106922
106162
|
// ../../node_modules/@effect/platform-node/node_modules/ws/lib/websocket-server.js
|
|
106923
106163
|
var require_websocket_server = __commonJS((exports, module) => {
|
|
106924
106164
|
var EventEmitter = __require("events");
|
|
106925
|
-
var
|
|
106165
|
+
var http3 = __require("http");
|
|
106926
106166
|
var { Duplex: Duplex2 } = __require("stream");
|
|
106927
106167
|
var { createHash: createHash3 } = __require("crypto");
|
|
106928
106168
|
var extension2 = require_extension();
|
|
@@ -106960,8 +106200,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
106960
106200
|
throw new TypeError('One and only one of the "port", "server", or "noServer" options ' + "must be specified");
|
|
106961
106201
|
}
|
|
106962
106202
|
if (options4.port != null) {
|
|
106963
|
-
this._server =
|
|
106964
|
-
const body =
|
|
106203
|
+
this._server = http3.createServer((req, res) => {
|
|
106204
|
+
const body = http3.STATUS_CODES[426];
|
|
106965
106205
|
res.writeHead(426, {
|
|
106966
106206
|
"Content-Length": body.length,
|
|
106967
106207
|
"Content-Type": "text/plain"
|
|
@@ -107195,7 +106435,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
107195
106435
|
this.destroy();
|
|
107196
106436
|
}
|
|
107197
106437
|
function abortHandshake(socket, code2, message, headers) {
|
|
107198
|
-
message = message ||
|
|
106438
|
+
message = message || http3.STATUS_CODES[code2];
|
|
107199
106439
|
headers = {
|
|
107200
106440
|
Connection: "close",
|
|
107201
106441
|
"Content-Type": "text/html",
|
|
@@ -107203,7 +106443,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
107203
106443
|
...headers
|
|
107204
106444
|
};
|
|
107205
106445
|
socket.once("finish", socket.destroy);
|
|
107206
|
-
socket.end(`HTTP/1.1 ${code2} ${
|
|
106446
|
+
socket.end(`HTTP/1.1 ${code2} ${http3.STATUS_CODES[code2]}\r
|
|
107207
106447
|
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join(`\r
|
|
107208
106448
|
`) + `\r
|
|
107209
106449
|
\r
|
|
@@ -108614,7 +107854,7 @@ __export(exports_NodeClusterRunnerHttp, {
|
|
|
108614
107854
|
layerHttpServer: () => layerHttpServer,
|
|
108615
107855
|
layer: () => layer37
|
|
108616
107856
|
});
|
|
108617
|
-
import { createServer as
|
|
107857
|
+
import { createServer as createServer4 } from "node:http";
|
|
108618
107858
|
var layer37 = (options4) => {
|
|
108619
107859
|
const layer38 = options4.clientOnly ? options4.transport === "http" ? provide3(layerHttpClientOnly, layerUndici) : provide3(layerWebsocketClientOnly, layerWebSocketConstructor) : options4.transport === "http" ? provide3(layerHttp, [layerHttpServer, layerUndici]) : provide3(layerWebsocket, [layerHttpServer, layerWebSocketConstructor]);
|
|
108620
107860
|
return layer38.pipe(provideMerge2(options4?.storage === "sql" ? layer17 : layerNoop3), provide3(options4?.storage === "sql" ? options4.clientOnly ? empty34 : layer18 : layerNoop4), provide3(layerFromEnv(options4?.shardingConfig)), provide3(options4?.serialization === "ndjson" ? layerNdjson : layerMsgPack));
|
|
@@ -108639,7 +107879,7 @@ var init_NodeClusterRunnerHttp = __esm(() => {
|
|
|
108639
107879
|
if (isNone2(listenAddress)) {
|
|
108640
107880
|
return yield* dieMessage2("NodeClusterHttpRunner.layerHttpServer: ShardingConfig.podAddress is None");
|
|
108641
107881
|
}
|
|
108642
|
-
return layer36(
|
|
107882
|
+
return layer36(createServer4, listenAddress.value);
|
|
108643
107883
|
}).pipe(unwrapEffect2);
|
|
108644
107884
|
});
|
|
108645
107885
|
|
|
@@ -110319,7 +109559,7 @@ var require_extension2 = __commonJS((exports, module) => {
|
|
|
110319
109559
|
var require_websocket3 = __commonJS((exports, module) => {
|
|
110320
109560
|
var EventEmitter = __require("events");
|
|
110321
109561
|
var https = __require("https");
|
|
110322
|
-
var
|
|
109562
|
+
var http3 = __require("http");
|
|
110323
109563
|
var net = __require("net");
|
|
110324
109564
|
var tls = __require("tls");
|
|
110325
109565
|
var { randomBytes: randomBytes4, createHash: createHash3 } = __require("crypto");
|
|
@@ -110732,7 +109972,7 @@ var require_websocket3 = __commonJS((exports, module) => {
|
|
|
110732
109972
|
}
|
|
110733
109973
|
const defaultPort = isSecure ? 443 : 80;
|
|
110734
109974
|
const key2 = randomBytes4(16).toString("base64");
|
|
110735
|
-
const request4 = isSecure ? https.request :
|
|
109975
|
+
const request4 = isSecure ? https.request : http3.request;
|
|
110736
109976
|
const protocolSet = new Set;
|
|
110737
109977
|
let perMessageDeflate;
|
|
110738
109978
|
opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
|
@@ -111225,7 +110465,7 @@ var require_subprotocol2 = __commonJS((exports, module) => {
|
|
|
111225
110465
|
// ../../node_modules/@effect/platform-node-shared/node_modules/ws/lib/websocket-server.js
|
|
111226
110466
|
var require_websocket_server2 = __commonJS((exports, module) => {
|
|
111227
110467
|
var EventEmitter = __require("events");
|
|
111228
|
-
var
|
|
110468
|
+
var http3 = __require("http");
|
|
111229
110469
|
var { Duplex: Duplex2 } = __require("stream");
|
|
111230
110470
|
var { createHash: createHash3 } = __require("crypto");
|
|
111231
110471
|
var extension2 = require_extension2();
|
|
@@ -111263,8 +110503,8 @@ var require_websocket_server2 = __commonJS((exports, module) => {
|
|
|
111263
110503
|
throw new TypeError('One and only one of the "port", "server", or "noServer" options ' + "must be specified");
|
|
111264
110504
|
}
|
|
111265
110505
|
if (options4.port != null) {
|
|
111266
|
-
this._server =
|
|
111267
|
-
const body =
|
|
110506
|
+
this._server = http3.createServer((req, res) => {
|
|
110507
|
+
const body = http3.STATUS_CODES[426];
|
|
111268
110508
|
res.writeHead(426, {
|
|
111269
110509
|
"Content-Length": body.length,
|
|
111270
110510
|
"Content-Type": "text/plain"
|
|
@@ -111498,7 +110738,7 @@ var require_websocket_server2 = __commonJS((exports, module) => {
|
|
|
111498
110738
|
this.destroy();
|
|
111499
110739
|
}
|
|
111500
110740
|
function abortHandshake(socket, code2, message, headers) {
|
|
111501
|
-
message = message ||
|
|
110741
|
+
message = message || http3.STATUS_CODES[code2];
|
|
111502
110742
|
headers = {
|
|
111503
110743
|
Connection: "close",
|
|
111504
110744
|
"Content-Type": "text/html",
|
|
@@ -111506,7 +110746,7 @@ var require_websocket_server2 = __commonJS((exports, module) => {
|
|
|
111506
110746
|
...headers
|
|
111507
110747
|
};
|
|
111508
110748
|
socket.once("finish", socket.destroy);
|
|
111509
|
-
socket.end(`HTTP/1.1 ${code2} ${
|
|
110749
|
+
socket.end(`HTTP/1.1 ${code2} ${http3.STATUS_CODES[code2]}\r
|
|
111510
110750
|
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join(`\r
|
|
111511
110751
|
`) + `\r
|
|
111512
110752
|
\r
|
|
@@ -111738,7 +110978,7 @@ __export(exports_NodeClusterShardManagerHttp, {
|
|
|
111738
110978
|
layerHttpServer: () => layerHttpServer2,
|
|
111739
110979
|
layer: () => layer41
|
|
111740
110980
|
});
|
|
111741
|
-
import { createServer as
|
|
110981
|
+
import { createServer as createServer6 } from "node:http";
|
|
111742
110982
|
var layerHttpServer2, layer41 = (options4) => {
|
|
111743
110983
|
const layer42 = options4.transport === "http" ? layerHttp2.pipe(provide3([layerRunnerHealthHttp, layerHttpServer2]), provide3(layerUndici)) : layerWebsocket2.pipe(provide3([layerRunnerHealthWebsocket, layerHttpServer2]), provide3(layerWebSocketConstructor));
|
|
111744
110984
|
return layer42.pipe(provide3(options4?.storage === "sql" ? layer18 : layerNoop4), provide3([layerFromEnv(options4.shardingConfig), layerConfigFromEnv(options4?.config), options4?.serialization === "ndjson" ? layerNdjson : layerMsgPack]));
|
|
@@ -111757,7 +110997,7 @@ var init_NodeClusterShardManagerHttp = __esm(() => {
|
|
|
111757
110997
|
init_NodeSocket2();
|
|
111758
110998
|
layerHttpServer2 = /* @__PURE__ */ gen4(function* () {
|
|
111759
110999
|
const config5 = yield* ShardingConfig;
|
|
111760
|
-
return layer36(
|
|
111000
|
+
return layer36(createServer6, config5.shardManagerAddress);
|
|
111761
111001
|
}).pipe(unwrapEffect2);
|
|
111762
111002
|
});
|
|
111763
111003
|
|
|
@@ -112309,7 +111549,7 @@ var init_ChildProcessWorker = __esm(() => {
|
|
|
112309
111549
|
});
|
|
112310
111550
|
|
|
112311
111551
|
// ../../node_modules/@livestore/utils/dist/node/mod.js
|
|
112312
|
-
import * as
|
|
111552
|
+
import * as http3 from "node:http";
|
|
112313
111553
|
var getFreePort, OtelLiveDummy;
|
|
112314
111554
|
var init_mod11 = __esm(() => {
|
|
112315
111555
|
init_esm5();
|
|
@@ -112320,7 +111560,7 @@ var init_mod11 = __esm(() => {
|
|
|
112320
111560
|
init_ChildProcessRunner();
|
|
112321
111561
|
init_ChildProcessWorker();
|
|
112322
111562
|
getFreePort = exports_Effect.async((cb, signal2) => {
|
|
112323
|
-
const server =
|
|
111563
|
+
const server = http3.createServer();
|
|
112324
111564
|
signal2.addEventListener("abort", () => {
|
|
112325
111565
|
server.close();
|
|
112326
111566
|
});
|
|
@@ -180811,24 +180051,24 @@ function createLogger(level = "info", options4 = {}) {
|
|
|
180811
180051
|
}
|
|
180812
180052
|
}
|
|
180813
180053
|
const warnedMessages = /* @__PURE__ */ new Set;
|
|
180814
|
-
const
|
|
180054
|
+
const logger16 = {
|
|
180815
180055
|
hasWarned: false,
|
|
180816
180056
|
info(msg, opts) {
|
|
180817
180057
|
output2("info", msg, opts);
|
|
180818
180058
|
},
|
|
180819
180059
|
warn(msg, opts) {
|
|
180820
|
-
|
|
180060
|
+
logger16.hasWarned = true;
|
|
180821
180061
|
output2("warn", msg, opts);
|
|
180822
180062
|
},
|
|
180823
180063
|
warnOnce(msg, opts) {
|
|
180824
180064
|
if (warnedMessages.has(msg))
|
|
180825
180065
|
return;
|
|
180826
|
-
|
|
180066
|
+
logger16.hasWarned = true;
|
|
180827
180067
|
output2("warn", msg, opts);
|
|
180828
180068
|
warnedMessages.add(msg);
|
|
180829
180069
|
},
|
|
180830
180070
|
error(msg, opts) {
|
|
180831
|
-
|
|
180071
|
+
logger16.hasWarned = true;
|
|
180832
180072
|
output2("error", msg, opts);
|
|
180833
180073
|
},
|
|
180834
180074
|
clearScreen(type3) {
|
|
@@ -180839,7 +180079,7 @@ function createLogger(level = "info", options4 = {}) {
|
|
|
180839
180079
|
return loggedErrors.has(error42);
|
|
180840
180080
|
}
|
|
180841
180081
|
};
|
|
180842
|
-
return
|
|
180082
|
+
return logger16;
|
|
180843
180083
|
}
|
|
180844
180084
|
function printServerUrls(urls, optionsHost, info2) {
|
|
180845
180085
|
const colorUrl = (url3) => import_picocolors.default.cyan(url3.replace(/:(\d+)\//, (_7, port2) => `:${import_picocolors.default.bold(port2)}/`));
|
|
@@ -188456,8 +187696,8 @@ var SOURCEMAPPING_URL = "sourceMa", isWindows, windowsSlashRE, postfixRE, AsyncF
|
|
|
188456
187696
|
customListenersMap = /* @__PURE__ */ new Map;
|
|
188457
187697
|
ctxToListenersMap = /* @__PURE__ */ new Map;
|
|
188458
187698
|
currentFirstInvalidatedBy;
|
|
188459
|
-
constructor(
|
|
188460
|
-
this.logger =
|
|
187699
|
+
constructor(logger16, transport, importUpdatedModule) {
|
|
187700
|
+
this.logger = logger16, this.transport = transport, this.importUpdatedModule = importUpdatedModule;
|
|
188461
187701
|
}
|
|
188462
187702
|
async notifyListeners(event, data) {
|
|
188463
187703
|
let cbs = this.customListenersMap.get(event);
|
|
@@ -200985,11 +200225,11 @@ Did you specify these with the most recent transformation maps first?`);
|
|
|
200985
200225
|
}
|
|
200986
200226
|
if (flattenedConfigs.some(({ config: { options: { ignore: ignore7, only } } }) => shouldIgnore(context15, ignore7, only, dirname7)))
|
|
200987
200227
|
return null;
|
|
200988
|
-
const chain = emptyChain(),
|
|
200228
|
+
const chain = emptyChain(), logger16 = createLogger2(input2, context15, baseLogger);
|
|
200989
200229
|
for (const { config: config5, index: index3, envName } of flattenedConfigs) {
|
|
200990
200230
|
if (!(yield* mergeExtendsChain(chain, config5.options, dirname7, context15, files, baseLogger)))
|
|
200991
200231
|
return null;
|
|
200992
|
-
|
|
200232
|
+
logger16(config5, index3, envName), yield* mergeChainOpts(chain, config5);
|
|
200993
200233
|
}
|
|
200994
200234
|
return chain;
|
|
200995
200235
|
};
|
|
@@ -251396,13 +250636,13 @@ function getNamesFromAssets(consumedFiles) {
|
|
|
251396
250636
|
names.sort((a11, b10) => a11.length - b10.length || (a11 > b10 ? 1 : a11 === b10 ? 0 : -1));
|
|
251397
250637
|
return { names, originalFileNames };
|
|
251398
250638
|
}
|
|
251399
|
-
function getLogHandler(level, code2,
|
|
250639
|
+
function getLogHandler(level, code2, logger16, pluginName, logLevel2) {
|
|
251400
250640
|
if (logLevelPriority[level] < logLevelPriority[logLevel2]) {
|
|
251401
250641
|
return doNothing;
|
|
251402
250642
|
}
|
|
251403
250643
|
return (log7, pos) => {
|
|
251404
250644
|
if (pos != null) {
|
|
251405
|
-
|
|
250645
|
+
logger16(LOGLEVEL_WARN, logInvalidLogPosition(pluginName));
|
|
251406
250646
|
}
|
|
251407
250647
|
log7 = normalizeLog(log7);
|
|
251408
250648
|
if (log7.code && !log7.pluginCode) {
|
|
@@ -251410,7 +250650,7 @@ function getLogHandler(level, code2, logger14, pluginName, logLevel2) {
|
|
|
251410
250650
|
}
|
|
251411
250651
|
log7.code = code2;
|
|
251412
250652
|
log7.plugin = pluginName;
|
|
251413
|
-
|
|
250653
|
+
logger16(level, log7);
|
|
251414
250654
|
};
|
|
251415
250655
|
}
|
|
251416
250656
|
function getPluginContext(plugin, pluginCache, graph, options4, fileEmitter, existingPluginNames) {
|
|
@@ -252059,7 +251299,7 @@ async function initWasm() {}
|
|
|
252059
251299
|
function getLogger2(plugins, onLog, watchMode, logLevel2) {
|
|
252060
251300
|
plugins = getSortedValidatedPlugins("onLog", plugins);
|
|
252061
251301
|
const minimalPriority = logLevelPriority[logLevel2];
|
|
252062
|
-
const
|
|
251302
|
+
const logger16 = (level, log7, skipped = EMPTY_SET) => {
|
|
252063
251303
|
augmentLogMessage(log7);
|
|
252064
251304
|
const logPriority = logLevelPriority[level];
|
|
252065
251305
|
if (logPriority < minimalPriority) {
|
|
@@ -252073,7 +251313,7 @@ function getLogger2(plugins, onLog, watchMode, logLevel2) {
|
|
|
252073
251313
|
if (logLevelPriority[level2] < minimalPriority) {
|
|
252074
251314
|
return doNothing;
|
|
252075
251315
|
}
|
|
252076
|
-
return (log8) =>
|
|
251316
|
+
return (log8) => logger16(level2, normalizeLog(log8), new Set(skipped).add(plugin));
|
|
252077
251317
|
};
|
|
252078
251318
|
const handler2 = "handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog;
|
|
252079
251319
|
if (handler2.call({
|
|
@@ -252088,7 +251328,7 @@ function getLogger2(plugins, onLog, watchMode, logLevel2) {
|
|
|
252088
251328
|
}
|
|
252089
251329
|
onLog(level, log7);
|
|
252090
251330
|
};
|
|
252091
|
-
return
|
|
251331
|
+
return logger16;
|
|
252092
251332
|
}
|
|
252093
251333
|
async function normalizeInputOptions(config5, watchMode) {
|
|
252094
251334
|
const unsetOptions = new Set;
|
|
@@ -252293,16 +251533,16 @@ async function getInputOptions(initialInputOptions, watchMode) {
|
|
|
252293
251533
|
async function getProcessedInputOptions(inputOptions, watchMode) {
|
|
252294
251534
|
const plugins = getSortedValidatedPlugins("options", await normalizePluginOption(inputOptions.plugins));
|
|
252295
251535
|
const logLevel2 = inputOptions.logLevel || LOGLEVEL_INFO;
|
|
252296
|
-
const
|
|
251536
|
+
const logger16 = getLogger2(plugins, getOnLog(inputOptions, logLevel2), watchMode, logLevel2);
|
|
252297
251537
|
for (const plugin of plugins) {
|
|
252298
251538
|
const { name: name17, options: options4 } = plugin;
|
|
252299
251539
|
const handler2 = "handler" in options4 ? options4.handler : options4;
|
|
252300
251540
|
const processedOptions = await handler2.call({
|
|
252301
|
-
debug: getLogHandler(LOGLEVEL_DEBUG, "PLUGIN_LOG",
|
|
251541
|
+
debug: getLogHandler(LOGLEVEL_DEBUG, "PLUGIN_LOG", logger16, name17, logLevel2),
|
|
252302
251542
|
error: (error_) => error42(logPluginError(normalizeLog(error_), name17, { hook: "onLog" })),
|
|
252303
|
-
info: getLogHandler(LOGLEVEL_INFO, "PLUGIN_LOG",
|
|
251543
|
+
info: getLogHandler(LOGLEVEL_INFO, "PLUGIN_LOG", logger16, name17, logLevel2),
|
|
252304
251544
|
meta: { rollupVersion: version4, watchMode },
|
|
252305
|
-
warn: getLogHandler(LOGLEVEL_WARN, "PLUGIN_WARNING",
|
|
251545
|
+
warn: getLogHandler(LOGLEVEL_WARN, "PLUGIN_WARNING", logger16, name17, logLevel2)
|
|
252306
251546
|
}, inputOptions);
|
|
252307
251547
|
if (processedOptions) {
|
|
252308
251548
|
inputOptions = processedOptions;
|
|
@@ -264221,7 +263461,7 @@ var exports_dep_DCVhRpiz = {};
|
|
|
264221
263461
|
__export(exports_dep_DCVhRpiz, {
|
|
264222
263462
|
default: () => dep_DCVhRpiz_default
|
|
264223
263463
|
});
|
|
264224
|
-
var require_fs, require_unquote, require_replaceValueSymbols, require_replaceSymbols, require_extractICSS, require_createICSSRules, require_src$4, require_Parser, require_saveJSON, require_lodash, require_localsConvention, require_FileSystemLoader, require_topologicalSort, require_src$3, require_wasm_hash, require_xxhash64, require_BatchedHash, require_md4, require_BulkUpdateDecorator, require_getHashDigest, require_interpolateName, require_generic_names, require_unesc, require_getProp, require_ensureObject, require_stripComments, require_util7, require_node$1, require_types2, require_container, require_root, require_selector, require_cssesc, require_className, require_comment, require_id, require_namespace, require_tag, require_string2, require_pseudo, require_node3, require_attribute, require_universal, require_combinator, require_nesting, require_sortAscending, require_tokenTypes, require_tokenize, require_parser2, require_processor, require_constructors, require_guards, require_selectors,
|
|
263464
|
+
var require_fs, require_unquote, require_replaceValueSymbols, require_replaceSymbols, require_extractICSS, require_createICSSRules, require_src$4, require_Parser, require_saveJSON, require_lodash, require_localsConvention, require_FileSystemLoader, require_topologicalSort, require_src$3, require_wasm_hash, require_xxhash64, require_BatchedHash, require_md4, require_BulkUpdateDecorator, require_getHashDigest, require_interpolateName, require_generic_names, require_unesc, require_getProp, require_ensureObject, require_stripComments, require_util7, require_node$1, require_types2, require_container, require_root, require_selector, require_cssesc, require_className, require_comment, require_id, require_namespace, require_tag, require_string2, require_pseudo, require_node3, require_attribute, require_universal, require_combinator, require_nesting, require_sortAscending, require_tokenTypes, require_tokenize, require_parser2, require_processor, require_constructors, require_guards, require_selectors, require_dist2, require_src$2, require_src$1, require_string_hash, require_src4, require_scoping, require_pluginFactory, require_build, dep_DCVhRpiz_default;
|
|
264225
263465
|
var init_dep_DCVhRpiz = __esm(() => {
|
|
264226
263466
|
init_dep_lCKrEJQm();
|
|
264227
263467
|
init_dep_BuoK8Wda();
|
|
@@ -268692,7 +267932,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
268692
267932
|
exports[key2] = _guards[key2];
|
|
268693
267933
|
});
|
|
268694
267934
|
} });
|
|
268695
|
-
|
|
267935
|
+
require_dist2 = /* @__PURE__ */ __commonJS2({ "../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/index.js": (exports, module) => {
|
|
268696
267936
|
exports.__esModule = true;
|
|
268697
267937
|
exports["default"] = undefined;
|
|
268698
267938
|
var _processor = _interopRequireDefault$2(require_processor());
|
|
@@ -268742,7 +267982,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
268742
267982
|
module.exports = exports.default;
|
|
268743
267983
|
} });
|
|
268744
267984
|
require_src$2 = /* @__PURE__ */ __commonJS2({ "../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js": (exports, module) => {
|
|
268745
|
-
const selectorParser$1 =
|
|
267985
|
+
const selectorParser$1 = require_dist2();
|
|
268746
267986
|
const valueParser = require_lib2();
|
|
268747
267987
|
const { extractICSS } = require_src$4();
|
|
268748
267988
|
const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
|
|
@@ -269192,7 +268432,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
269192
268432
|
module.exports.postcss = true;
|
|
269193
268433
|
} });
|
|
269194
268434
|
require_src$1 = /* @__PURE__ */ __commonJS2({ "../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.6/node_modules/postcss-modules-scope/src/index.js": (exports, module) => {
|
|
269195
|
-
const selectorParser =
|
|
268435
|
+
const selectorParser = require_dist2();
|
|
269196
268436
|
const hasOwnProperty3 = Object.prototype.hasOwnProperty;
|
|
269197
268437
|
function isNestedRule(rule) {
|
|
269198
268438
|
if (!rule.parent || rule.parent.type === "root")
|
|
@@ -275469,7 +274709,7 @@ import assert5 from "node:assert";
|
|
|
275469
274709
|
import process$13 from "node:process";
|
|
275470
274710
|
import v82 from "node:v8";
|
|
275471
274711
|
import { EventEmitter } from "node:events";
|
|
275472
|
-
import { STATUS_CODES, createServer as
|
|
274712
|
+
import { STATUS_CODES, createServer as createServer11, get as get34 } from "node:http";
|
|
275473
274713
|
import { createServer as createServer$1, get as get$1 } from "node:https";
|
|
275474
274714
|
import * as qs2 from "node:querystring";
|
|
275475
274715
|
function wrapId(id5) {
|
|
@@ -280487,7 +279727,7 @@ async function computeSourceRoute(map$1, file5) {
|
|
|
280487
279727
|
} catch {}
|
|
280488
279728
|
return sourceRoot;
|
|
280489
279729
|
}
|
|
280490
|
-
async function injectSourcesContent(map$1, file5,
|
|
279730
|
+
async function injectSourcesContent(map$1, file5, logger16) {
|
|
280491
279731
|
let sourceRootPromise;
|
|
280492
279732
|
const missingSources = [];
|
|
280493
279733
|
const sourcesContent = map$1.sourcesContent || [];
|
|
@@ -280510,7 +279750,7 @@ async function injectSourcesContent(map$1, file5, logger14) {
|
|
|
280510
279750
|
await Promise.all(sourcesContentPromises);
|
|
280511
279751
|
map$1.sourcesContent = sourcesContent;
|
|
280512
279752
|
if (missingSources.length) {
|
|
280513
|
-
|
|
279753
|
+
logger16.warnOnce(`Sourcemap for "${file5}" points to missing source files`);
|
|
280514
279754
|
debug$16?.(`Missing sources:
|
|
280515
279755
|
` + missingSources.join(`
|
|
280516
279756
|
`));
|
|
@@ -280534,7 +279774,7 @@ function getCodeWithSourcemap(type3, code2, map$1) {
|
|
|
280534
279774
|
/*# sourceMappingURL=${genSourceMapUrl(map$1)} */`;
|
|
280535
279775
|
return code2;
|
|
280536
279776
|
}
|
|
280537
|
-
function applySourcemapIgnoreList(map$1, sourcemapPath, sourcemapIgnoreList,
|
|
279777
|
+
function applySourcemapIgnoreList(map$1, sourcemapPath, sourcemapIgnoreList, logger16) {
|
|
280538
279778
|
let { x_google_ignoreList } = map$1;
|
|
280539
279779
|
if (x_google_ignoreList === undefined)
|
|
280540
279780
|
x_google_ignoreList = [];
|
|
@@ -280543,8 +279783,8 @@ function applySourcemapIgnoreList(map$1, sourcemapPath, sourcemapIgnoreList, log
|
|
|
280543
279783
|
if (!sourcePath)
|
|
280544
279784
|
continue;
|
|
280545
279785
|
const ignoreList = sourcemapIgnoreList(path16.isAbsolute(sourcePath) ? sourcePath : path16.resolve(path16.dirname(sourcemapPath), sourcePath), sourcemapPath);
|
|
280546
|
-
if (
|
|
280547
|
-
|
|
279786
|
+
if (logger16 && typeof ignoreList !== "boolean")
|
|
279787
|
+
logger16.warn("sourcemapIgnoreList function must return a boolean.");
|
|
280548
279788
|
if (ignoreList && !x_google_ignoreList.includes(sourcesIndex))
|
|
280549
279789
|
x_google_ignoreList.push(sourcesIndex);
|
|
280550
279790
|
}
|
|
@@ -281218,7 +280458,7 @@ function err$1(e$1, pos) {
|
|
|
281218
280458
|
error$1.pos = pos;
|
|
281219
280459
|
return error$1;
|
|
281220
280460
|
}
|
|
281221
|
-
function parseGlobOptions(rawOpts, optsStartIndex,
|
|
280461
|
+
function parseGlobOptions(rawOpts, optsStartIndex, logger16) {
|
|
281222
280462
|
let opts = {};
|
|
281223
280463
|
try {
|
|
281224
280464
|
opts = evalValue(rawOpts);
|
|
@@ -281253,9 +280493,9 @@ function parseGlobOptions(rawOpts, optsStartIndex, logger14) {
|
|
|
281253
280493
|
}
|
|
281254
280494
|
opts.query = stringifyQuery(opts.query);
|
|
281255
280495
|
}
|
|
281256
|
-
if (opts.as &&
|
|
280496
|
+
if (opts.as && logger16) {
|
|
281257
280497
|
const importSuggestion = forceDefaultAs.includes(opts.as) ? `, import: 'default'` : "";
|
|
281258
|
-
|
|
280498
|
+
logger16.warn(import_picocolors$28.default.yellow(`The glob option "as" has been deprecated in favour of "query". Please update \`as: '${opts.as}'\` to \`query: '?${opts.as}'${importSuggestion}\`.`));
|
|
281259
280499
|
}
|
|
281260
280500
|
if (opts.as && forceDefaultAs.includes(opts.as)) {
|
|
281261
280501
|
if (opts.import && opts.import !== "default" && opts.import !== "*")
|
|
@@ -281270,7 +280510,7 @@ function parseGlobOptions(rawOpts, optsStartIndex, logger14) {
|
|
|
281270
280510
|
opts.query = `?${opts.query}`;
|
|
281271
280511
|
return opts;
|
|
281272
280512
|
}
|
|
281273
|
-
async function parseImportGlob(code2, importer, root3, resolveId2,
|
|
280513
|
+
async function parseImportGlob(code2, importer, root3, resolveId2, logger16) {
|
|
281274
280514
|
let cleanCode;
|
|
281275
280515
|
try {
|
|
281276
280516
|
cleanCode = stripLiteral(code2);
|
|
@@ -281323,7 +280563,7 @@ async function parseImportGlob(code2, importer, root3, resolveId2, logger14) {
|
|
|
281323
280563
|
if (arg2) {
|
|
281324
280564
|
if (arg2.type !== "ObjectExpression")
|
|
281325
280565
|
throw err$2(`Expected the second argument to be an object literal, but got "${arg2.type}"`);
|
|
281326
|
-
options$1 = parseGlobOptions(code2.slice(start4 + arg2.start, start4 + arg2.end), start4 + arg2.start,
|
|
280566
|
+
options$1 = parseGlobOptions(code2.slice(start4 + arg2.start, start4 + arg2.end), start4 + arg2.start, logger16);
|
|
281327
280567
|
}
|
|
281328
280568
|
const globsResolved = await Promise.all(globs.map((glob$1) => toAbsoluteGlob(glob$1, root3, importer, resolveId2, options$1.base)));
|
|
281329
280569
|
const isRelative$1 = globs.every((i$1) => ".!".includes(i$1[0]));
|
|
@@ -281366,12 +280606,12 @@ function findCorrespondingCloseParenthesisPosition(cleanCode, openPos) {
|
|
|
281366
280606
|
}
|
|
281367
280607
|
return -1;
|
|
281368
280608
|
}
|
|
281369
|
-
async function transformGlobImport(code2, id5, root3, resolveId2, restoreQueryExtension = false,
|
|
280609
|
+
async function transformGlobImport(code2, id5, root3, resolveId2, restoreQueryExtension = false, logger16) {
|
|
281370
280610
|
id5 = slash2(id5);
|
|
281371
280611
|
root3 = slash2(root3);
|
|
281372
280612
|
const isVirtual = isVirtualModule(id5);
|
|
281373
280613
|
const dir2 = isVirtual ? undefined : dirname$2(id5);
|
|
281374
|
-
const matches$2 = await parseImportGlob(code2, isVirtual ? undefined : id5, root3, resolveId2,
|
|
280614
|
+
const matches$2 = await parseImportGlob(code2, isVirtual ? undefined : id5, root3, resolveId2, logger16);
|
|
281375
280615
|
const matchedFiles = /* @__PURE__ */ new Set;
|
|
281376
280616
|
if (!matches$2.length)
|
|
281377
280617
|
return null;
|
|
@@ -282382,13 +281622,13 @@ async function prepareEsbuildOptimizerRun(environment2, depsInfo, processingCach
|
|
|
282382
281622
|
};
|
|
282383
281623
|
}
|
|
282384
281624
|
async function addManuallyIncludedOptimizeDeps(environment2, deps) {
|
|
282385
|
-
const { logger:
|
|
281625
|
+
const { logger: logger16 } = environment2;
|
|
282386
281626
|
const { optimizeDeps: optimizeDeps$1 } = environment2.config;
|
|
282387
281627
|
const optimizeDepsInclude = optimizeDeps$1.include ?? [];
|
|
282388
281628
|
if (optimizeDepsInclude.length) {
|
|
282389
281629
|
const unableToOptimize = (id5, msg) => {
|
|
282390
281630
|
if (optimizeDepsInclude.includes(id5))
|
|
282391
|
-
|
|
281631
|
+
logger16.warn(`${msg}: ${import_picocolors$26.default.cyan(id5)}, present in ${environment2.name} 'optimizeDeps.include'`);
|
|
282392
281632
|
};
|
|
282393
281633
|
const includes2 = [...optimizeDepsInclude];
|
|
282394
281634
|
for (let i$1 = 0;i$1 < includes2.length; i$1++) {
|
|
@@ -283556,7 +282796,7 @@ async function readFileIfExists(value$1) {
|
|
|
283556
282796
|
return value$1;
|
|
283557
282797
|
}
|
|
283558
282798
|
async function httpServerStart(httpServer, serverOptions) {
|
|
283559
|
-
let { port: port2, strictPort, host, logger:
|
|
282799
|
+
let { port: port2, strictPort, host, logger: logger16 } = serverOptions;
|
|
283560
282800
|
return new Promise((resolve$4, reject3) => {
|
|
283561
282801
|
const onError$1 = (e$1) => {
|
|
283562
282802
|
if (e$1.code === "EADDRINUSE")
|
|
@@ -283564,7 +282804,7 @@ async function httpServerStart(httpServer, serverOptions) {
|
|
|
283564
282804
|
httpServer.removeListener("error", onError$1);
|
|
283565
282805
|
reject3(/* @__PURE__ */ new Error(`Port ${port2} is already in use`));
|
|
283566
282806
|
} else {
|
|
283567
|
-
|
|
282807
|
+
logger16.info(`Port ${port2} is in use, trying another one...`);
|
|
283568
282808
|
httpServer.listen(++port2, host);
|
|
283569
282809
|
}
|
|
283570
282810
|
else {
|
|
@@ -283579,12 +282819,12 @@ async function httpServerStart(httpServer, serverOptions) {
|
|
|
283579
282819
|
});
|
|
283580
282820
|
});
|
|
283581
282821
|
}
|
|
283582
|
-
function setClientErrorHandler(server,
|
|
282822
|
+
function setClientErrorHandler(server, logger16) {
|
|
283583
282823
|
server.on("clientError", (err$2, socket) => {
|
|
283584
282824
|
let msg = "400 Bad Request";
|
|
283585
282825
|
if (err$2.code === "HPE_HEADER_OVERFLOW") {
|
|
283586
282826
|
msg = "431 Request Header Fields Too Large";
|
|
283587
|
-
|
|
282827
|
+
logger16.warn(import_picocolors$21.default.yellow("Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."));
|
|
283588
282828
|
}
|
|
283589
282829
|
if (err$2.code === "ECONNRESET" || !socket.writable)
|
|
283590
282830
|
return;
|
|
@@ -284265,16 +283505,16 @@ function detectPlatformBinary({ [platform4]: platformBinary }, { wsl }) {
|
|
|
284265
283505
|
throw new Error(`${platform4} is not supported`);
|
|
284266
283506
|
return detectArchBinary(platformBinary);
|
|
284267
283507
|
}
|
|
284268
|
-
function openBrowser(url$3, opt,
|
|
283508
|
+
function openBrowser(url$3, opt, logger16) {
|
|
284269
283509
|
const browser2 = typeof opt === "string" ? opt : process.env.BROWSER || "";
|
|
284270
283510
|
if (browser2.toLowerCase().endsWith(".js"))
|
|
284271
|
-
executeNodeScript(browser2, url$3,
|
|
283511
|
+
executeNodeScript(browser2, url$3, logger16);
|
|
284272
283512
|
else if (browser2.toLowerCase() !== "none") {
|
|
284273
283513
|
const browserArgs = process.env.BROWSER_ARGS ? process.env.BROWSER_ARGS.split(" ") : [];
|
|
284274
|
-
startBrowserProcess(browser2, browserArgs, url$3,
|
|
283514
|
+
startBrowserProcess(browser2, browserArgs, url$3, logger16);
|
|
284275
283515
|
}
|
|
284276
283516
|
}
|
|
284277
|
-
function executeNodeScript(scriptPath, url$3,
|
|
283517
|
+
function executeNodeScript(scriptPath, url$3, logger16) {
|
|
284278
283518
|
const extraArgs = process.argv.slice(2);
|
|
284279
283519
|
const child = (0, import_cross_spawn.default)(process.execPath, [
|
|
284280
283520
|
scriptPath,
|
|
@@ -284283,13 +283523,13 @@ function executeNodeScript(scriptPath, url$3, logger14) {
|
|
|
284283
283523
|
], { stdio: "inherit" });
|
|
284284
283524
|
child.on("close", (code2) => {
|
|
284285
283525
|
if (code2 !== 0)
|
|
284286
|
-
|
|
283526
|
+
logger16.error(import_picocolors$19.default.red(`
|
|
284287
283527
|
The script specified as BROWSER environment variable failed.
|
|
284288
283528
|
|
|
284289
283529
|
${import_picocolors$19.default.cyan(scriptPath)} exited with code ${code2}.`), { error: null });
|
|
284290
283530
|
});
|
|
284291
283531
|
}
|
|
284292
|
-
async function startBrowserProcess(browser2, browserArgs, url$3,
|
|
283532
|
+
async function startBrowserProcess(browser2, browserArgs, url$3, logger16) {
|
|
284293
283533
|
const preferredOSXBrowser = browser2 === "google chrome" ? "Google Chrome" : browser2;
|
|
284294
283534
|
const shouldTryOpenChromeWithJXA = process.platform === "darwin" && (!preferredOSXBrowser || supportedChromiumBrowsers.includes(preferredOSXBrowser));
|
|
284295
283535
|
if (shouldTryOpenChromeWithJXA)
|
|
@@ -284313,7 +283553,7 @@ async function startBrowserProcess(browser2, browserArgs, url$3, logger14) {
|
|
|
284313
283553
|
subprocess.on("error", reject3);
|
|
284314
283554
|
}).catch(reject3);
|
|
284315
283555
|
}).catch((err$2) => {
|
|
284316
|
-
|
|
283556
|
+
logger16.error(err$2.stack || err$2.message);
|
|
284317
283557
|
});
|
|
284318
283558
|
return true;
|
|
284319
283559
|
} catch {
|
|
@@ -284374,12 +283614,12 @@ function getResolvedOutDirs(root3, outDir, outputOptions) {
|
|
|
284374
283614
|
return new Set([resolvedOutDir]);
|
|
284375
283615
|
return new Set(arraify(outputOptions).map(({ dir: dir2 }) => dir2 ? path16.resolve(root3, dir2) : resolvedOutDir));
|
|
284376
283616
|
}
|
|
284377
|
-
function resolveEmptyOutDir(emptyOutDir, root3, outDirs,
|
|
283617
|
+
function resolveEmptyOutDir(emptyOutDir, root3, outDirs, logger16) {
|
|
284378
283618
|
if (emptyOutDir != null)
|
|
284379
283619
|
return emptyOutDir;
|
|
284380
283620
|
for (const outDir of outDirs)
|
|
284381
283621
|
if (!normalizePath5(outDir).startsWith(withTrailingSlash(root3))) {
|
|
284382
|
-
|
|
283622
|
+
logger16?.warn(import_picocolors$17.default.yellow(`
|
|
284383
283623
|
${import_picocolors$17.default.bold(`(!)`)} outDir ${import_picocolors$17.default.white(import_picocolors$17.default.dim(outDir))} is not inside project root and will not be emptied.
|
|
284384
283624
|
Use --emptyOutDir to override.
|
|
284385
283625
|
`));
|
|
@@ -284571,7 +283811,7 @@ function createWebSocketServer(server, config$2, httpsOptions) {
|
|
|
284571
283811
|
if (httpsOptions)
|
|
284572
283812
|
wsHttpServer = createServer$1(httpsOptions, route2);
|
|
284573
283813
|
else
|
|
284574
|
-
wsHttpServer =
|
|
283814
|
+
wsHttpServer = createServer11(route2);
|
|
284575
283815
|
wsHttpServer.on("upgrade", (req$4, socket, head13) => {
|
|
284576
283816
|
const protocol = req$4.headers["sec-websocket-protocol"];
|
|
284577
283817
|
if (protocol === "vite-ping" && server && !server.listening) {
|
|
@@ -285344,7 +284584,7 @@ async function getCachedTransformResult(environment2, url$3, module$1, timestamp
|
|
|
285344
284584
|
}
|
|
285345
284585
|
}
|
|
285346
284586
|
async function loadAndTransform(environment2, id5, url$3, options$1, timestamp, mod2, resolved) {
|
|
285347
|
-
const { config: config$2, pluginContainer, logger:
|
|
284587
|
+
const { config: config$2, pluginContainer, logger: logger16 } = environment2;
|
|
285348
284588
|
const prettyUrl = debugLoad || debugTransform ? prettifyUrl(url$3, config$2.root) : "";
|
|
285349
284589
|
const moduleGraph = environment2.moduleGraph;
|
|
285350
284590
|
if (options$1.allowId && !options$1.allowId(id5)) {
|
|
@@ -285378,7 +284618,7 @@ async function loadAndTransform(environment2, id5, url$3, options$1, timestamp,
|
|
|
285378
284618
|
map$1 = extracted.map;
|
|
285379
284619
|
}
|
|
285380
284620
|
} catch (e$1) {
|
|
285381
|
-
|
|
284621
|
+
logger16.warn(`Failed to load source map for ${file5}.
|
|
285382
284622
|
${e$1}`, { timestamp: true });
|
|
285383
284623
|
}
|
|
285384
284624
|
} else {
|
|
@@ -285423,9 +284663,9 @@ ${e$1}`, { timestamp: true });
|
|
|
285423
284663
|
normalizedMap = null;
|
|
285424
284664
|
if (normalizedMap && "version" in normalizedMap && mod2.file) {
|
|
285425
284665
|
if (normalizedMap.mappings)
|
|
285426
|
-
await injectSourcesContent(normalizedMap, mod2.file,
|
|
284666
|
+
await injectSourcesContent(normalizedMap, mod2.file, logger16);
|
|
285427
284667
|
const sourcemapPath = `${mod2.file}.map`;
|
|
285428
|
-
applySourcemapIgnoreList(normalizedMap, sourcemapPath, config$2.server.sourcemapIgnoreList,
|
|
284668
|
+
applySourcemapIgnoreList(normalizedMap, sourcemapPath, config$2.server.sourcemapIgnoreList, logger16);
|
|
285429
284669
|
if (path16.isAbsolute(mod2.file)) {
|
|
285430
284670
|
let modDirname;
|
|
285431
284671
|
for (let sourcesIndex = 0;sourcesIndex < normalizedMap.sources.length; ++sourcesIndex) {
|
|
@@ -286281,11 +285521,11 @@ function resolveHtmlTransforms(plugins$1) {
|
|
|
286281
285521
|
function headTagInsertCheck(tags3, ctx) {
|
|
286282
285522
|
if (!tags3.length)
|
|
286283
285523
|
return;
|
|
286284
|
-
const { logger:
|
|
285524
|
+
const { logger: logger16 } = ctx.server?.config || {};
|
|
286285
285525
|
const disallowedTags = tags3.filter((tagDescriptor) => !elementsAllowedInHead.has(tagDescriptor.tag));
|
|
286286
285526
|
if (disallowedTags.length) {
|
|
286287
285527
|
const dedupedTags = unique(disallowedTags.map((tagDescriptor) => `<${tagDescriptor.tag}>`));
|
|
286288
|
-
|
|
285528
|
+
logger16?.warn(import_picocolors$13.default.yellow(import_picocolors$13.default.bold(`[${dedupedTags.join(",")}] can not be used inside the <head> Element, please check the 'injectTo' value`)));
|
|
286289
285529
|
}
|
|
286290
285530
|
}
|
|
286291
285531
|
async function applyHtmlTransforms(html4, hooks, pluginContext, ctx) {
|
|
@@ -287291,7 +286531,7 @@ function createServerCloseFn(server) {
|
|
|
287291
286531
|
function resolvedAllowDir(root3, dir2) {
|
|
287292
286532
|
return normalizePath5(path16.resolve(root3, dir2));
|
|
287293
286533
|
}
|
|
287294
|
-
function resolveServerOptions(root3, raw4,
|
|
286534
|
+
function resolveServerOptions(root3, raw4, logger16) {
|
|
287295
286535
|
const _server = mergeWithDefaults({
|
|
287296
286536
|
...serverConfigDefaults,
|
|
287297
286537
|
host: undefined,
|
|
@@ -287313,7 +286553,7 @@ function resolveServerOptions(root3, raw4, logger14) {
|
|
|
287313
286553
|
const yarnCacheDir = execSync2(`yarn config get ${enableGlobalCache ? "globalFolder" : "cacheFolder"}`, { cwd: cwd2 }).toString().trim();
|
|
287314
286554
|
allowDirs.push(yarnCacheDir);
|
|
287315
286555
|
} catch (e$1) {
|
|
287316
|
-
|
|
286556
|
+
logger16.warn(`Get yarn cache dir error: ${e$1.message}`, { timestamp: true });
|
|
287317
286557
|
}
|
|
287318
286558
|
}
|
|
287319
286559
|
allowDirs = allowDirs.map((i$1) => resolvedAllowDir(root3, i$1));
|
|
@@ -287323,7 +286563,7 @@ function resolveServerOptions(root3, raw4, logger14) {
|
|
|
287323
286563
|
server.fs.allow = allowDirs;
|
|
287324
286564
|
if (server.origin?.endsWith("/")) {
|
|
287325
286565
|
server.origin = server.origin.slice(0, -1);
|
|
287326
|
-
|
|
286566
|
+
logger16.warn(import_picocolors$11.default.yellow(`${import_picocolors$11.default.bold("(!)")} server.origin should not end with "/". Using "${server.origin}" instead.`));
|
|
287327
286567
|
}
|
|
287328
286568
|
if (process.env.__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS && Array.isArray(server.allowedHosts)) {
|
|
287329
286569
|
const additionalHost = process.env.__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS;
|
|
@@ -287358,12 +286598,12 @@ async function restartServer(server) {
|
|
|
287358
286598
|
server.middlewares = middlewares;
|
|
287359
286599
|
newServer._setInternalServer(server);
|
|
287360
286600
|
}
|
|
287361
|
-
const { logger:
|
|
286601
|
+
const { logger: logger16, server: { port: port2, middlewareMode } } = server.config;
|
|
287362
286602
|
if (!middlewareMode)
|
|
287363
286603
|
await server.listen(port2, true);
|
|
287364
286604
|
else
|
|
287365
286605
|
await Promise.all(Object.values(server.environments).map((e$1) => e$1.listen(server)));
|
|
287366
|
-
|
|
286606
|
+
logger16.info("server restarted.", { timestamp: true });
|
|
287367
286607
|
if (shortcutsOptions) {
|
|
287368
286608
|
shortcutsOptions.print = false;
|
|
287369
286609
|
bindCLIShortcuts(server, shortcutsOptions);
|
|
@@ -287377,9 +286617,9 @@ async function restartServerWithUrls(server) {
|
|
|
287377
286617
|
const { port: prevPort, host: prevHost } = server.config.server;
|
|
287378
286618
|
const prevUrls = server.resolvedUrls;
|
|
287379
286619
|
await server.restart();
|
|
287380
|
-
const { logger:
|
|
286620
|
+
const { logger: logger16, server: { port: port2, host } } = server.config;
|
|
287381
286621
|
if ((port2 ?? DEFAULT_DEV_PORT) !== (prevPort ?? DEFAULT_DEV_PORT) || host !== prevHost || diffDnsOrderChange(prevUrls, server.resolvedUrls)) {
|
|
287382
|
-
|
|
286622
|
+
logger16.info("");
|
|
287383
286623
|
server.printUrls();
|
|
287384
286624
|
}
|
|
287385
286625
|
}
|
|
@@ -290314,7 +289554,7 @@ async function transformSugarSS(environment2, id5, code2) {
|
|
|
290314
289554
|
const result2 = await runPostCSS(id5, code2, [], { parser: loadSss(config$2.root) }, undefined, environment2.logger, devSourcemap);
|
|
290315
289555
|
return result2;
|
|
290316
289556
|
}
|
|
290317
|
-
async function runPostCSS(id5, code2, plugins$1, options$1, deps,
|
|
289557
|
+
async function runPostCSS(id5, code2, plugins$1, options$1, deps, logger16, enableSourcemap) {
|
|
290318
289558
|
let postcssResult;
|
|
290319
289559
|
try {
|
|
290320
289560
|
const source = removeDirectQuery(id5);
|
|
@@ -290353,7 +289593,7 @@ ${generateCodeFrame(code2, {
|
|
|
290353
289593
|
line: warning2.endLine,
|
|
290354
289594
|
column: warning2.endColumn - 1
|
|
290355
289595
|
} : undefined)}`;
|
|
290356
|
-
|
|
289596
|
+
logger16.warn(import_picocolors$6.default.yellow(msg));
|
|
290357
289597
|
}
|
|
290358
289598
|
} catch (e$1) {
|
|
290359
289599
|
e$1.message = `[postcss] ${e$1.message}`;
|
|
@@ -291459,12 +290699,12 @@ function areSeparateFolders(a11, b10) {
|
|
|
291459
290699
|
const nb = normalizePath5(b10);
|
|
291460
290700
|
return na2 !== nb && !na2.startsWith(withTrailingSlash(nb)) && !nb.startsWith(withTrailingSlash(na2));
|
|
291461
290701
|
}
|
|
291462
|
-
function resolveBuildEnvironmentOptions(raw4,
|
|
290702
|
+
function resolveBuildEnvironmentOptions(raw4, logger16, consumer) {
|
|
291463
290703
|
const deprecatedPolyfillModulePreload = raw4.polyfillModulePreload;
|
|
291464
290704
|
const { polyfillModulePreload, ...rest } = raw4;
|
|
291465
290705
|
raw4 = rest;
|
|
291466
290706
|
if (deprecatedPolyfillModulePreload !== undefined)
|
|
291467
|
-
|
|
290707
|
+
logger16.warn("polyfillModulePreload is deprecated. Use modulePreload.polyfill instead.");
|
|
291468
290708
|
if (deprecatedPolyfillModulePreload === false && raw4.modulePreload === undefined)
|
|
291469
290709
|
raw4.modulePreload = { polyfill: false };
|
|
291470
290710
|
const merged = mergeWithDefaults({
|
|
@@ -291526,7 +290766,7 @@ function resolveConfigToBuild(inlineConfig = {}, patchConfig, patchPlugins) {
|
|
|
291526
290766
|
function resolveRollupOptions(environment2) {
|
|
291527
290767
|
const { root: root3, packageCache, build: options$1 } = environment2.config;
|
|
291528
290768
|
const libOptions = options$1.lib;
|
|
291529
|
-
const { logger:
|
|
290769
|
+
const { logger: logger16 } = environment2;
|
|
291530
290770
|
const ssr = environment2.config.consumer === "server";
|
|
291531
290771
|
const resolve$4 = (p13) => path16.resolve(root3, p13);
|
|
291532
290772
|
const input2 = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$4(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$4) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file5]) => [alias$2, resolve$4(file5)]))) : typeof options$1.ssr === "string" ? resolve$4(options$1.ssr) : options$1.rollupOptions.input || resolve$4("index.html");
|
|
@@ -291554,11 +290794,11 @@ function resolveRollupOptions(environment2) {
|
|
|
291554
290794
|
const isSsrTargetWebworkerEnvironment = environment2.name === "ssr" && environment2.getTopLevelConfig().ssr?.target === "webworker";
|
|
291555
290795
|
const buildOutputOptions = (output2 = {}) => {
|
|
291556
290796
|
if (output2.output)
|
|
291557
|
-
|
|
290797
|
+
logger16.warn(`You've set "rollupOptions.output.output" in your config. This is deprecated and will override all Vite.js default output options. Please use "rollupOptions.output" instead.`);
|
|
291558
290798
|
if (output2.file)
|
|
291559
290799
|
throw new Error('Vite does not support "rollupOptions.output.file". Please use "rollupOptions.output.dir" and "rollupOptions.output.entryFileNames" instead.');
|
|
291560
290800
|
if (output2.sourcemap)
|
|
291561
|
-
|
|
290801
|
+
logger16.warnOnce(import_picocolors$4.default.yellow('Vite does not support "rollupOptions.output.sourcemap". Please use "build.sourcemap" instead.'));
|
|
291562
290802
|
const format$3 = output2.format || "es";
|
|
291563
290803
|
const jsExt = ssr && !isSsrTargetWebworkerEnvironment || libOptions ? resolveOutputJsExtension(format$3, findNearestPackageData(root3, packageCache)?.data.type) : "js";
|
|
291564
290804
|
return {
|
|
@@ -291576,7 +290816,7 @@ function resolveRollupOptions(environment2) {
|
|
|
291576
290816
|
...output2
|
|
291577
290817
|
};
|
|
291578
290818
|
};
|
|
291579
|
-
const outputs = resolveBuildOutputs(options$1.rollupOptions.output, libOptions,
|
|
290819
|
+
const outputs = resolveBuildOutputs(options$1.rollupOptions.output, libOptions, logger16);
|
|
291580
290820
|
if (Array.isArray(outputs))
|
|
291581
290821
|
rollupOptions.output = outputs.map(buildOutputOptions);
|
|
291582
290822
|
else
|
|
@@ -291584,19 +290824,19 @@ function resolveRollupOptions(environment2) {
|
|
|
291584
290824
|
return rollupOptions;
|
|
291585
290825
|
}
|
|
291586
290826
|
async function buildEnvironment(environment2) {
|
|
291587
|
-
const { logger:
|
|
290827
|
+
const { logger: logger16, config: config$2 } = environment2;
|
|
291588
290828
|
const { root: root3, build: options$1 } = config$2;
|
|
291589
290829
|
const ssr = config$2.consumer === "server";
|
|
291590
|
-
|
|
290830
|
+
logger16.info(import_picocolors$4.default.cyan(`vite v${VERSION} ${import_picocolors$4.default.green(`building ${ssr ? `SSR bundle ` : ``}for ${environment2.config.mode}...`)}`));
|
|
291591
290831
|
let bundle;
|
|
291592
290832
|
let startTime;
|
|
291593
290833
|
try {
|
|
291594
290834
|
const rollupOptions = resolveRollupOptions(environment2);
|
|
291595
290835
|
if (options$1.watch) {
|
|
291596
|
-
|
|
290836
|
+
logger16.info(import_picocolors$4.default.cyan(`
|
|
291597
290837
|
watching for file changes...`));
|
|
291598
290838
|
const resolvedOutDirs = getResolvedOutDirs(root3, options$1.outDir, options$1.rollupOptions.output);
|
|
291599
|
-
const emptyOutDir = resolveEmptyOutDir(options$1.emptyOutDir, root3, resolvedOutDirs,
|
|
290839
|
+
const emptyOutDir = resolveEmptyOutDir(options$1.emptyOutDir, root3, resolvedOutDirs, logger16);
|
|
291600
290840
|
const resolvedChokidarOptions = resolveChokidarOptions({
|
|
291601
290841
|
...(rollupOptions.watch || {}).chokidar,
|
|
291602
290842
|
...options$1.watch.chokidar
|
|
@@ -291612,16 +290852,16 @@ watching for file changes...`));
|
|
|
291612
290852
|
});
|
|
291613
290853
|
watcher.on("event", (event) => {
|
|
291614
290854
|
if (event.code === "BUNDLE_START")
|
|
291615
|
-
|
|
290855
|
+
logger16.info(import_picocolors$4.default.cyan(`
|
|
291616
290856
|
build started...`));
|
|
291617
290857
|
else if (event.code === "BUNDLE_END") {
|
|
291618
290858
|
event.result.close();
|
|
291619
|
-
|
|
290859
|
+
logger16.info(import_picocolors$4.default.cyan(`built in ${event.duration}ms.`));
|
|
291620
290860
|
} else if (event.code === "ERROR") {
|
|
291621
290861
|
const e$1 = event.error;
|
|
291622
290862
|
enhanceRollupError(e$1);
|
|
291623
290863
|
clearLine();
|
|
291624
|
-
|
|
290864
|
+
logger16.error(e$1.message, { error: e$1 });
|
|
291625
290865
|
}
|
|
291626
290866
|
});
|
|
291627
290867
|
return watcher;
|
|
@@ -291632,13 +290872,13 @@ build started...`));
|
|
|
291632
290872
|
const res = [];
|
|
291633
290873
|
for (const output2 of arraify(rollupOptions.output))
|
|
291634
290874
|
res.push(await bundle[options$1.write ? "write" : "generate"](output2));
|
|
291635
|
-
|
|
290875
|
+
logger16.info(`${import_picocolors$4.default.green(`✓ built in ${displayTime(Date.now() - startTime)}`)}`);
|
|
291636
290876
|
return Array.isArray(rollupOptions.output) ? res : res[0];
|
|
291637
290877
|
} catch (e$1) {
|
|
291638
290878
|
enhanceRollupError(e$1);
|
|
291639
290879
|
clearLine();
|
|
291640
290880
|
if (startTime) {
|
|
291641
|
-
|
|
290881
|
+
logger16.error(`${import_picocolors$4.default.red("✗")} Build failed in ${displayTime(Date.now() - startTime)}`);
|
|
291642
290882
|
startTime = undefined;
|
|
291643
290883
|
}
|
|
291644
290884
|
throw e$1;
|
|
@@ -291698,7 +290938,7 @@ function resolveLibFilename(libOptions, format$3, entryName, root3, extension$1,
|
|
|
291698
290938
|
return `${name17}.${extension$1}`;
|
|
291699
290939
|
return `${name17}.${format$3}.${extension$1}`;
|
|
291700
290940
|
}
|
|
291701
|
-
function resolveBuildOutputs(outputs, libOptions,
|
|
290941
|
+
function resolveBuildOutputs(outputs, libOptions, logger16) {
|
|
291702
290942
|
if (libOptions) {
|
|
291703
290943
|
const libHasMultipleEntries = typeof libOptions.entry !== "string" && Object.values(libOptions.entry).length > 1;
|
|
291704
290944
|
const libFormats = libOptions.formats || (libHasMultipleEntries ? ["es", "cjs"] : ["es", "umd"]);
|
|
@@ -291715,7 +290955,7 @@ function resolveBuildOutputs(outputs, libOptions, logger14) {
|
|
|
291715
290955
|
}));
|
|
291716
290956
|
}
|
|
291717
290957
|
if (libOptions.formats)
|
|
291718
|
-
|
|
290958
|
+
logger16.warn(import_picocolors$4.default.yellow('"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.'));
|
|
291719
290959
|
outputs.forEach((output2) => {
|
|
291720
290960
|
if ((output2.format === "umd" || output2.format === "iife") && !output2.name)
|
|
291721
290961
|
throw new Error('Entries in "build.rollupOptions.output" must specify "name" when the format is "umd" or "iife".');
|
|
@@ -292133,7 +291373,7 @@ ${MODULE_RUNNER_SOURCEMAPPING_SOURCE}
|
|
|
292133
291373
|
return result2;
|
|
292134
291374
|
}
|
|
292135
291375
|
function createDepsOptimizer(environment2) {
|
|
292136
|
-
const { logger:
|
|
291376
|
+
const { logger: logger16 } = environment2;
|
|
292137
291377
|
const sessionTimestamp = Date.now().toString();
|
|
292138
291378
|
let debounceProcessingHandle;
|
|
292139
291379
|
let closed = false;
|
|
@@ -292156,14 +291396,14 @@ function createDepsOptimizer(environment2) {
|
|
|
292156
291396
|
let newDepsToLogHandle;
|
|
292157
291397
|
const logNewlyDiscoveredDeps = () => {
|
|
292158
291398
|
if (newDepsToLog.length) {
|
|
292159
|
-
|
|
291399
|
+
logger16.info(import_picocolors$3.default.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), { timestamp: true });
|
|
292160
291400
|
newDepsToLog = [];
|
|
292161
291401
|
}
|
|
292162
291402
|
};
|
|
292163
291403
|
let discoveredDepsWhileScanning = [];
|
|
292164
291404
|
const logDiscoveredDepsWhileScanning = () => {
|
|
292165
291405
|
if (discoveredDepsWhileScanning.length) {
|
|
292166
|
-
|
|
291406
|
+
logger16.info(import_picocolors$3.default.green(`✨ discovered while scanning: ${depsLogString(discoveredDepsWhileScanning)}`), { timestamp: true });
|
|
292167
291407
|
discoveredDepsWhileScanning = [];
|
|
292168
291408
|
}
|
|
292169
291409
|
};
|
|
@@ -292243,7 +291483,7 @@ function createDepsOptimizer(environment2) {
|
|
|
292243
291483
|
runOptimizer(result2);
|
|
292244
291484
|
});
|
|
292245
291485
|
} catch (e$1) {
|
|
292246
|
-
|
|
291486
|
+
logger16.error(e$1.stack || e$1.message);
|
|
292247
291487
|
} finally {
|
|
292248
291488
|
resolve$4();
|
|
292249
291489
|
depsOptimizer.scanProcessing = undefined;
|
|
@@ -292340,7 +291580,7 @@ function createDepsOptimizer(environment2) {
|
|
|
292340
291580
|
logNewlyDiscoveredDeps();
|
|
292341
291581
|
if (warnAboutMissedDependencies) {
|
|
292342
291582
|
logDiscoveredDepsWhileScanning();
|
|
292343
|
-
|
|
291583
|
+
logger16.info(import_picocolors$3.default.magenta(`❗ add these dependencies to optimizeDeps.include to speed up cold start`), { timestamp: true });
|
|
292344
291584
|
warnAboutMissedDependencies = false;
|
|
292345
291585
|
}
|
|
292346
291586
|
}, 2 * debounceMs);
|
|
@@ -292358,17 +291598,17 @@ function createDepsOptimizer(environment2) {
|
|
|
292358
291598
|
logNewlyDiscoveredDeps();
|
|
292359
291599
|
if (warnAboutMissedDependencies) {
|
|
292360
291600
|
logDiscoveredDepsWhileScanning();
|
|
292361
|
-
|
|
291601
|
+
logger16.info(import_picocolors$3.default.magenta(`❗ add these dependencies to optimizeDeps.include to avoid a full page reload during cold start`), { timestamp: true });
|
|
292362
291602
|
warnAboutMissedDependencies = false;
|
|
292363
291603
|
}
|
|
292364
291604
|
}
|
|
292365
|
-
|
|
291605
|
+
logger16.info(import_picocolors$3.default.green(`✨ optimized dependencies changed. reloading`), { timestamp: true });
|
|
292366
291606
|
if (needsInteropMismatch.length > 0)
|
|
292367
|
-
|
|
291607
|
+
logger16.warn(`Mixed ESM and CJS detected in ${import_picocolors$3.default.yellow(needsInteropMismatch.join(", "))}, add ${needsInteropMismatch.length === 1 ? "it" : "them"} to optimizeDeps.needsInterop to speed up cold start`, { timestamp: true });
|
|
292368
291608
|
fullReload();
|
|
292369
291609
|
}
|
|
292370
291610
|
} catch (e$1) {
|
|
292371
|
-
|
|
291611
|
+
logger16.error(import_picocolors$3.default.red(`error while updating dependencies:
|
|
292372
291612
|
${e$1.stack}`), {
|
|
292373
291613
|
timestamp: true,
|
|
292374
291614
|
error: e$1
|
|
@@ -292728,7 +291968,7 @@ function resolveDevEnvironmentOptions(dev, environmentName, consumer, preTransfo
|
|
|
292728
291968
|
sourcemapIgnoreList: resolved.sourcemapIgnoreList === false ? () => false : resolved.sourcemapIgnoreList
|
|
292729
291969
|
};
|
|
292730
291970
|
}
|
|
292731
|
-
function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOptimizeDeps,
|
|
291971
|
+
function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOptimizeDeps, logger16, environmentName, isSsrTargetWebworkerSet, preTransformRequests) {
|
|
292732
291972
|
const isClientEnvironment = environmentName === "client";
|
|
292733
291973
|
const consumer = options$1.consumer ?? (isClientEnvironment ? "client" : "server");
|
|
292734
291974
|
const isSsrTargetWebworkerEnvironment = isSsrTargetWebworkerSet && environmentName === "ssr";
|
|
@@ -292737,10 +291977,10 @@ function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOp
|
|
|
292737
291977
|
if (typeof processEnvDefine === "object") {
|
|
292738
291978
|
const pathKey$1 = Object.entries(processEnvDefine).find(([key2, value$1]) => key2.toLowerCase() === "path" && !!value$1)?.[0];
|
|
292739
291979
|
if (pathKey$1)
|
|
292740
|
-
|
|
291980
|
+
logger16.warnOnce(import_picocolors2.default.yellow(`The \`define\` option contains an object with ${JSON.stringify(pathKey$1)} for "process.env" key. It looks like you may have passed the entire \`process.env\` object to \`define\`, which can unintentionally expose all environment variables. This poses a security risk and is discouraged.`));
|
|
292741
291981
|
}
|
|
292742
291982
|
}
|
|
292743
|
-
const resolve$4 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks,
|
|
291983
|
+
const resolve$4 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks, logger16, consumer, isSsrTargetWebworkerEnvironment);
|
|
292744
291984
|
return {
|
|
292745
291985
|
define: options$1.define,
|
|
292746
291986
|
resolve: resolve$4,
|
|
@@ -292748,7 +291988,7 @@ function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOp
|
|
|
292748
291988
|
consumer,
|
|
292749
291989
|
optimizeDeps: resolveDepOptimizationOptions(options$1.optimizeDeps, resolve$4.preserveSymlinks, forceOptimizeDeps, consumer),
|
|
292750
291990
|
dev: resolveDevEnvironmentOptions(options$1.dev, environmentName, consumer, preTransformRequests),
|
|
292751
|
-
build: resolveBuildEnvironmentOptions(options$1.build ?? {},
|
|
291991
|
+
build: resolveBuildEnvironmentOptions(options$1.build ?? {}, logger16, consumer),
|
|
292752
291992
|
plugins: undefined
|
|
292753
291993
|
};
|
|
292754
291994
|
}
|
|
@@ -292764,7 +292004,7 @@ function getDefaultEnvironmentOptions(config$2) {
|
|
|
292764
292004
|
build: config$2.build
|
|
292765
292005
|
};
|
|
292766
292006
|
}
|
|
292767
|
-
function checkBadCharactersInPath(name17, path$13,
|
|
292007
|
+
function checkBadCharactersInPath(name17, path$13, logger16) {
|
|
292768
292008
|
const badChars = [];
|
|
292769
292009
|
if (path$13.includes("#"))
|
|
292770
292010
|
badChars.push("#");
|
|
@@ -292775,10 +292015,10 @@ function checkBadCharactersInPath(name17, path$13, logger14) {
|
|
|
292775
292015
|
if (badChars.length > 0) {
|
|
292776
292016
|
const charString = badChars.map((c10) => `"${c10}"`).join(" and ");
|
|
292777
292017
|
const inflectedChars = badChars.length > 1 ? "characters" : "character";
|
|
292778
|
-
|
|
292018
|
+
logger16.warn(import_picocolors2.default.yellow(`${name17} contains the ${charString} ${inflectedChars} (${import_picocolors2.default.cyan(path$13)}), which may not work when running Vite. Consider renaming the directory / file to remove the characters.`));
|
|
292779
292019
|
}
|
|
292780
292020
|
}
|
|
292781
|
-
function resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks,
|
|
292021
|
+
function resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger16, consumer, isSsrTargetWebworkerEnvironment) {
|
|
292782
292022
|
const resolvedResolve = mergeWithDefaults({
|
|
292783
292023
|
...configDefaults.resolve,
|
|
292784
292024
|
mainFields: consumer === undefined || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
|
|
@@ -292788,15 +292028,15 @@ function resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks,
|
|
|
292788
292028
|
resolvedResolve.preserveSymlinks = preserveSymlinks;
|
|
292789
292029
|
resolvedResolve.alias = alias$2;
|
|
292790
292030
|
if (resolve$4?.browserField === false && resolvedResolve.mainFields.includes("browser"))
|
|
292791
|
-
|
|
292031
|
+
logger16.warn(import_picocolors2.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour."));
|
|
292792
292032
|
return resolvedResolve;
|
|
292793
292033
|
}
|
|
292794
|
-
function resolveResolveOptions(resolve$4,
|
|
292034
|
+
function resolveResolveOptions(resolve$4, logger16) {
|
|
292795
292035
|
const alias$2 = normalizeAlias(mergeAlias(clientAlias, resolve$4?.alias || configDefaults.resolve.alias));
|
|
292796
292036
|
const preserveSymlinks = resolve$4?.preserveSymlinks ?? configDefaults.resolve.preserveSymlinks;
|
|
292797
292037
|
if (alias$2.some((a11) => a11.find === "/"))
|
|
292798
|
-
|
|
292799
|
-
return resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks,
|
|
292038
|
+
logger16.warn(import_picocolors2.default.yellow("`resolve.alias` contains an alias that maps `/`. This is not recommended as it can cause unexpected behavior when resolving paths."));
|
|
292039
|
+
return resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger16, undefined);
|
|
292800
292040
|
}
|
|
292801
292041
|
function resolveDepOptimizationOptions(optimizeDeps$1, preserveSymlinks, forceOptimizeDeps, consumer) {
|
|
292802
292042
|
return mergeWithDefaults({
|
|
@@ -292868,12 +292108,12 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
292868
292108
|
client: {},
|
|
292869
292109
|
...config$2.environments
|
|
292870
292110
|
};
|
|
292871
|
-
const
|
|
292111
|
+
const logger16 = createLogger(config$2.logLevel, {
|
|
292872
292112
|
allowClearScreen: config$2.clearScreen,
|
|
292873
292113
|
customLogger: config$2.customLogger
|
|
292874
292114
|
});
|
|
292875
292115
|
const resolvedRoot = normalizePath5(config$2.root ? path16.resolve(config$2.root) : process.cwd());
|
|
292876
|
-
checkBadCharactersInPath("The project root", resolvedRoot,
|
|
292116
|
+
checkBadCharactersInPath("The project root", resolvedRoot, logger16);
|
|
292877
292117
|
const configEnvironmentsClient = config$2.environments.client;
|
|
292878
292118
|
configEnvironmentsClient.dev ??= {};
|
|
292879
292119
|
const deprecatedSsrOptimizeDepsConfig = config$2.ssr?.optimizeDeps ?? {};
|
|
@@ -292923,17 +292163,17 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
292923
292163
|
};
|
|
292924
292164
|
for (const name17 of Object.keys(config$2.environments))
|
|
292925
292165
|
config$2.environments[name17] = mergeConfig(name17 === "client" ? defaultClientEnvironmentOptions : defaultNonClientEnvironmentOptions, config$2.environments[name17]);
|
|
292926
|
-
await runConfigEnvironmentHook(config$2.environments, userPlugins,
|
|
292166
|
+
await runConfigEnvironmentHook(config$2.environments, userPlugins, logger16, configEnv, config$2.ssr?.target === "webworker");
|
|
292927
292167
|
config$2.resolve ??= {};
|
|
292928
292168
|
config$2.resolve.conditions = config$2.environments.client.resolve?.conditions;
|
|
292929
292169
|
config$2.resolve.mainFields = config$2.environments.client.resolve?.mainFields;
|
|
292930
|
-
const resolvedDefaultResolve = resolveResolveOptions(config$2.resolve,
|
|
292170
|
+
const resolvedDefaultResolve = resolveResolveOptions(config$2.resolve, logger16);
|
|
292931
292171
|
const resolvedEnvironments = {};
|
|
292932
292172
|
for (const environmentName of Object.keys(config$2.environments))
|
|
292933
|
-
resolvedEnvironments[environmentName] = resolveEnvironmentOptions(config$2.environments[environmentName], resolvedDefaultResolve.alias, resolvedDefaultResolve.preserveSymlinks, inlineConfig.forceOptimizeDeps,
|
|
292173
|
+
resolvedEnvironments[environmentName] = resolveEnvironmentOptions(config$2.environments[environmentName], resolvedDefaultResolve.alias, resolvedDefaultResolve.preserveSymlinks, inlineConfig.forceOptimizeDeps, logger16, environmentName, config$2.ssr?.target === "webworker", config$2.server?.preTransformRequests);
|
|
292934
292174
|
const backwardCompatibleOptimizeDeps = resolvedEnvironments.client.optimizeDeps;
|
|
292935
292175
|
const resolvedDevEnvironmentOptions = resolveDevEnvironmentOptions(config$2.dev, undefined, undefined);
|
|
292936
|
-
const resolvedBuildOptions = resolveBuildEnvironmentOptions(config$2.build ?? {},
|
|
292176
|
+
const resolvedBuildOptions = resolveBuildEnvironmentOptions(config$2.build ?? {}, logger16, undefined);
|
|
292937
292177
|
const patchedConfigSsr = {
|
|
292938
292178
|
...config$2.ssr,
|
|
292939
292179
|
external: resolvedEnvironments.ssr?.resolve.external,
|
|
@@ -292955,27 +292195,27 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
292955
292195
|
if (userNodeEnv === "development")
|
|
292956
292196
|
process.env.NODE_ENV = "development";
|
|
292957
292197
|
else
|
|
292958
|
-
|
|
292198
|
+
logger16.warn(`NODE_ENV=${userNodeEnv} is not supported in the .env file. Only NODE_ENV=development is supported to create a development build of your project. If you need to set process.env.NODE_ENV, you can set it in the Vite config instead.`);
|
|
292959
292199
|
const isProduction = false;
|
|
292960
292200
|
const relativeBaseShortcut = config$2.base === "" || config$2.base === "./";
|
|
292961
|
-
const resolvedBase = relativeBaseShortcut ? !isBuild || config$2.build?.ssr ? "/" : "./" : resolveBaseUrl(config$2.base, isBuild,
|
|
292201
|
+
const resolvedBase = relativeBaseShortcut ? !isBuild || config$2.build?.ssr ? "/" : "./" : resolveBaseUrl(config$2.base, isBuild, logger16);
|
|
292962
292202
|
const pkgDir = findNearestPackageData(resolvedRoot, packageCache)?.dir;
|
|
292963
292203
|
const cacheDir = normalizePath5(config$2.cacheDir ? path16.resolve(resolvedRoot, config$2.cacheDir) : pkgDir ? path16.join(pkgDir, `node_modules/.vite`) : path16.join(resolvedRoot, `.vite`));
|
|
292964
292204
|
const assetsFilter = config$2.assetsInclude && (!Array.isArray(config$2.assetsInclude) || config$2.assetsInclude.length) ? createFilter3(config$2.assetsInclude) : () => false;
|
|
292965
292205
|
const { publicDir } = config$2;
|
|
292966
292206
|
const resolvedPublicDir = publicDir !== false && publicDir !== "" ? normalizePath5(path16.resolve(resolvedRoot, typeof publicDir === "string" ? publicDir : configDefaults.publicDir)) : "";
|
|
292967
|
-
const server = resolveServerOptions(resolvedRoot, config$2.server,
|
|
292207
|
+
const server = resolveServerOptions(resolvedRoot, config$2.server, logger16);
|
|
292968
292208
|
const builder = resolveBuilderOptions(config$2.builder);
|
|
292969
292209
|
const BASE_URL = resolvedBase;
|
|
292970
292210
|
const resolvedConfigContext = new BasicMinimalPluginContext({
|
|
292971
292211
|
...basePluginContextMeta,
|
|
292972
292212
|
watchMode: command === "serve" && !isPreview || command === "build" && !!resolvedBuildOptions.watch
|
|
292973
|
-
},
|
|
292213
|
+
}, logger16);
|
|
292974
292214
|
let resolved;
|
|
292975
292215
|
let createUserWorkerPlugins = config$2.worker?.plugins;
|
|
292976
292216
|
if (Array.isArray(createUserWorkerPlugins)) {
|
|
292977
292217
|
createUserWorkerPlugins = () => config$2.worker?.plugins;
|
|
292978
|
-
|
|
292218
|
+
logger16.warn(import_picocolors2.default.yellow(`worker.plugins is now a function that returns an array of plugins. Please update your Vite config accordingly.
|
|
292979
292219
|
`));
|
|
292980
292220
|
}
|
|
292981
292221
|
const createWorkerPlugins = async function(bundleChain) {
|
|
@@ -293055,7 +292295,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
293055
292295
|
assetsInclude(file5) {
|
|
293056
292296
|
return DEFAULT_ASSETS_RE.test(file5) || assetsFilter(file5);
|
|
293057
292297
|
},
|
|
293058
|
-
logger:
|
|
292298
|
+
logger: logger16,
|
|
293059
292299
|
packageCache,
|
|
293060
292300
|
worker: resolvedWorkerOptions,
|
|
293061
292301
|
appType: config$2.appType ?? "spa",
|
|
@@ -293146,14 +292386,14 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
|
|
|
293146
292386
|
`));
|
|
293147
292387
|
return resolved;
|
|
293148
292388
|
}
|
|
293149
|
-
function resolveBaseUrl(base2 = configDefaults.base, isBuild,
|
|
292389
|
+
function resolveBaseUrl(base2 = configDefaults.base, isBuild, logger16) {
|
|
293150
292390
|
if (base2[0] === ".") {
|
|
293151
|
-
|
|
292391
|
+
logger16.warn(import_picocolors2.default.yellow(import_picocolors2.default.bold(`(!) invalid "base" option: "${base2}". The value can only be an absolute URL, "./", or an empty string.`)));
|
|
293152
292392
|
return "/";
|
|
293153
292393
|
}
|
|
293154
292394
|
const isExternal$1 = isExternalUrl(base2);
|
|
293155
292395
|
if (!isExternal$1 && base2[0] !== "/")
|
|
293156
|
-
|
|
292396
|
+
logger16.warn(import_picocolors2.default.yellow(import_picocolors2.default.bold(`(!) "base" option should start with a slash.`)));
|
|
293157
292397
|
if (!isBuild || !isExternal$1) {
|
|
293158
292398
|
base2 = new URL(base2, "http://vite.dev").pathname;
|
|
293159
292399
|
if (base2[0] !== "/")
|
|
@@ -293220,9 +292460,9 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
|
|
|
293220
292460
|
dependencies
|
|
293221
292461
|
};
|
|
293222
292462
|
} catch (e$1) {
|
|
293223
|
-
const
|
|
293224
|
-
checkBadCharactersInPath("The config path", resolvedPath,
|
|
293225
|
-
|
|
292463
|
+
const logger16 = createLogger(logLevel2, { customLogger });
|
|
292464
|
+
checkBadCharactersInPath("The config path", resolvedPath, logger16);
|
|
292465
|
+
logger16.error(import_picocolors2.default.red(`failed to load config from ${resolvedPath}`), { error: e$1 });
|
|
293226
292466
|
throw e$1;
|
|
293227
292467
|
}
|
|
293228
292468
|
}
|
|
@@ -293399,8 +292639,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
|
|
|
293399
292639
|
}
|
|
293400
292640
|
return conf;
|
|
293401
292641
|
}
|
|
293402
|
-
async function runConfigEnvironmentHook(environments, plugins$1,
|
|
293403
|
-
const context15 = new BasicMinimalPluginContext(basePluginContextMeta,
|
|
292642
|
+
async function runConfigEnvironmentHook(environments, plugins$1, logger16, configEnv, isSsrTargetWebworkerSet) {
|
|
292643
|
+
const context15 = new BasicMinimalPluginContext(basePluginContextMeta, logger16);
|
|
293404
292644
|
const environmentNames = Object.keys(environments);
|
|
293405
292645
|
for (const p13 of getSortedPluginsByHook("configEnvironment", plugins$1)) {
|
|
293406
292646
|
const hook = p13.configEnvironment;
|
|
@@ -298983,7 +298223,7 @@ Error: ${importError.map((error$1) => error$1.message).join(`
|
|
|
298983
298223
|
async function yamlLoader(_8, content3) {
|
|
298984
298224
|
if (!yaml2)
|
|
298985
298225
|
try {
|
|
298986
|
-
yaml2 = await Promise.resolve().then(() => __toESM(
|
|
298226
|
+
yaml2 = await Promise.resolve().then(() => __toESM(require_dist(), 1));
|
|
298987
298227
|
} catch (e$1) {
|
|
298988
298228
|
throw new Error(`'yaml' is required for the YAML configuration files. Make sure it is installed
|
|
298989
298229
|
Error: ${e$1.message}`);
|
|
@@ -309854,7 +309094,7 @@ Error: ${e$1.message}`);
|
|
|
309854
309094
|
};
|
|
309855
309095
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
309856
309096
|
exports.ProxyServer = undefined;
|
|
309857
|
-
const
|
|
309097
|
+
const http4 = __importStar(__require2("node:http"));
|
|
309858
309098
|
const https = __importStar(__require2("node:https"));
|
|
309859
309099
|
const web_incoming_1 = require_web_incoming();
|
|
309860
309100
|
const ws_incoming_1$1 = require_ws_incoming();
|
|
@@ -309923,7 +309163,7 @@ Error: ${e$1.message}`);
|
|
|
309923
309163
|
const requestListener = (req$4, res) => {
|
|
309924
309164
|
this.web(req$4, res);
|
|
309925
309165
|
};
|
|
309926
|
-
this._server = this.options.ssl ? https.createServer(this.options.ssl, requestListener) :
|
|
309166
|
+
this._server = this.options.ssl ? https.createServer(this.options.ssl, requestListener) : http4.createServer(requestListener);
|
|
309927
309167
|
if (this.options.ws)
|
|
309928
309168
|
this._server.on("upgrade", (req$4, socket, head13) => {
|
|
309929
309169
|
this.ws(req$4, socket, head13);
|
|
@@ -311080,7 +310320,7 @@ var exports_devtools_server = {};
|
|
|
311080
310320
|
__export(exports_devtools_server, {
|
|
311081
310321
|
startDevtoolsServer: () => startDevtoolsServer
|
|
311082
310322
|
});
|
|
311083
|
-
import
|
|
310323
|
+
import http4 from "node:http";
|
|
311084
310324
|
import path18 from "node:path";
|
|
311085
310325
|
var startDevtoolsServer = ({ schemaPath, clientSessionInfo, port: port2, host }) => exports_Effect2.gen(function* () {
|
|
311086
310326
|
const viteMiddleware = yield* makeViteMiddleware({
|
|
@@ -311137,7 +310377,7 @@ var startDevtoolsServer = ({ schemaPath, clientSessionInfo, port: port2, host })
|
|
|
311137
310377
|
return exports_HttpServer.serve(handler2, exports_HttpMiddleware.logger);
|
|
311138
310378
|
}).pipe(exports_Effect2.withSpan("@livestore/adapter-node:startDevtoolsServer", {
|
|
311139
310379
|
attributes: { clientSessionInfo, port: port2, host, schemaPath }
|
|
311140
|
-
}), exports_HttpMiddleware.withLoggerDisabled, exports_Layer.unwrapScoped, exports_Layer.provide(exports_esm3.NodeHttpServer.layer(() =>
|
|
310380
|
+
}), exports_HttpMiddleware.withLoggerDisabled, exports_Layer.unwrapScoped, exports_Layer.provide(exports_esm3.NodeHttpServer.layer(() => http4.createServer(), { port: port2, host })), exports_Layer.launch, exports_Effect2.orDie);
|
|
311141
310381
|
var init_devtools_server = __esm(() => {
|
|
311142
310382
|
init_mod();
|
|
311143
310383
|
init_effect();
|
|
@@ -311146,6 +310386,766 @@ var init_devtools_server = __esm(() => {
|
|
|
311146
310386
|
init_vite_dev_server();
|
|
311147
310387
|
});
|
|
311148
310388
|
|
|
310389
|
+
// ../../node_modules/node-machine-id/dist/index.js
|
|
310390
|
+
var require_dist3 = __commonJS((exports, module) => {
|
|
310391
|
+
(function(t8, n11) {
|
|
310392
|
+
typeof exports == "object" && typeof module == "object" ? module.exports = n11(__require("child_process"), __require("crypto")) : typeof define == "function" && define.amd ? define(["child_process", "crypto"], n11) : typeof exports == "object" ? exports["electron-machine-id"] = n11(__require("child_process"), __require("crypto")) : t8["electron-machine-id"] = n11(t8.child_process, t8.crypto);
|
|
310393
|
+
})(exports, function(t8, n11) {
|
|
310394
|
+
return function(t10) {
|
|
310395
|
+
function n12(e11) {
|
|
310396
|
+
if (r10[e11])
|
|
310397
|
+
return r10[e11].exports;
|
|
310398
|
+
var o11 = r10[e11] = { exports: {}, id: e11, loaded: false };
|
|
310399
|
+
return t10[e11].call(o11.exports, o11, o11.exports, n12), o11.loaded = true, o11.exports;
|
|
310400
|
+
}
|
|
310401
|
+
var r10 = {};
|
|
310402
|
+
return n12.m = t10, n12.c = r10, n12.p = "", n12(0);
|
|
310403
|
+
}([function(t10, n12, r10) {
|
|
310404
|
+
t10.exports = r10(34);
|
|
310405
|
+
}, function(t10, n12, r10) {
|
|
310406
|
+
var e11 = r10(29)("wks"), o11 = r10(33), i10 = r10(2).Symbol, c10 = typeof i10 == "function", u11 = t10.exports = function(t11) {
|
|
310407
|
+
return e11[t11] || (e11[t11] = c10 && i10[t11] || (c10 ? i10 : o11)("Symbol." + t11));
|
|
310408
|
+
};
|
|
310409
|
+
u11.store = e11;
|
|
310410
|
+
}, function(t10, n12) {
|
|
310411
|
+
var r10 = t10.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")();
|
|
310412
|
+
typeof __g == "number" && (__g = r10);
|
|
310413
|
+
}, function(t10, n12, r10) {
|
|
310414
|
+
var e11 = r10(9);
|
|
310415
|
+
t10.exports = function(t11) {
|
|
310416
|
+
if (!e11(t11))
|
|
310417
|
+
throw TypeError(t11 + " is not an object!");
|
|
310418
|
+
return t11;
|
|
310419
|
+
};
|
|
310420
|
+
}, function(t10, n12, r10) {
|
|
310421
|
+
t10.exports = !r10(24)(function() {
|
|
310422
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
310423
|
+
return 7;
|
|
310424
|
+
} }).a != 7;
|
|
310425
|
+
});
|
|
310426
|
+
}, function(t10, n12, r10) {
|
|
310427
|
+
var e11 = r10(12), o11 = r10(17);
|
|
310428
|
+
t10.exports = r10(4) ? function(t11, n13, r11) {
|
|
310429
|
+
return e11.f(t11, n13, o11(1, r11));
|
|
310430
|
+
} : function(t11, n13, r11) {
|
|
310431
|
+
return t11[n13] = r11, t11;
|
|
310432
|
+
};
|
|
310433
|
+
}, function(t10, n12) {
|
|
310434
|
+
var r10 = t10.exports = { version: "2.4.0" };
|
|
310435
|
+
typeof __e == "number" && (__e = r10);
|
|
310436
|
+
}, function(t10, n12, r10) {
|
|
310437
|
+
var e11 = r10(14);
|
|
310438
|
+
t10.exports = function(t11, n13, r11) {
|
|
310439
|
+
if (e11(t11), n13 === undefined)
|
|
310440
|
+
return t11;
|
|
310441
|
+
switch (r11) {
|
|
310442
|
+
case 1:
|
|
310443
|
+
return function(r12) {
|
|
310444
|
+
return t11.call(n13, r12);
|
|
310445
|
+
};
|
|
310446
|
+
case 2:
|
|
310447
|
+
return function(r12, e12) {
|
|
310448
|
+
return t11.call(n13, r12, e12);
|
|
310449
|
+
};
|
|
310450
|
+
case 3:
|
|
310451
|
+
return function(r12, e12, o11) {
|
|
310452
|
+
return t11.call(n13, r12, e12, o11);
|
|
310453
|
+
};
|
|
310454
|
+
}
|
|
310455
|
+
return function() {
|
|
310456
|
+
return t11.apply(n13, arguments);
|
|
310457
|
+
};
|
|
310458
|
+
};
|
|
310459
|
+
}, function(t10, n12) {
|
|
310460
|
+
var r10 = {}.hasOwnProperty;
|
|
310461
|
+
t10.exports = function(t11, n13) {
|
|
310462
|
+
return r10.call(t11, n13);
|
|
310463
|
+
};
|
|
310464
|
+
}, function(t10, n12) {
|
|
310465
|
+
t10.exports = function(t11) {
|
|
310466
|
+
return typeof t11 == "object" ? t11 !== null : typeof t11 == "function";
|
|
310467
|
+
};
|
|
310468
|
+
}, function(t10, n12) {
|
|
310469
|
+
t10.exports = {};
|
|
310470
|
+
}, function(t10, n12) {
|
|
310471
|
+
var r10 = {}.toString;
|
|
310472
|
+
t10.exports = function(t11) {
|
|
310473
|
+
return r10.call(t11).slice(8, -1);
|
|
310474
|
+
};
|
|
310475
|
+
}, function(t10, n12, r10) {
|
|
310476
|
+
var e11 = r10(3), o11 = r10(26), i10 = r10(32), c10 = Object.defineProperty;
|
|
310477
|
+
n12.f = r10(4) ? Object.defineProperty : function(t11, n13, r11) {
|
|
310478
|
+
if (e11(t11), n13 = i10(n13, true), e11(r11), o11)
|
|
310479
|
+
try {
|
|
310480
|
+
return c10(t11, n13, r11);
|
|
310481
|
+
} catch (t12) {}
|
|
310482
|
+
if ("get" in r11 || "set" in r11)
|
|
310483
|
+
throw TypeError("Accessors not supported!");
|
|
310484
|
+
return "value" in r11 && (t11[n13] = r11.value), t11;
|
|
310485
|
+
};
|
|
310486
|
+
}, function(t10, n12, r10) {
|
|
310487
|
+
var e11 = r10(42), o11 = r10(15);
|
|
310488
|
+
t10.exports = function(t11) {
|
|
310489
|
+
return e11(o11(t11));
|
|
310490
|
+
};
|
|
310491
|
+
}, function(t10, n12) {
|
|
310492
|
+
t10.exports = function(t11) {
|
|
310493
|
+
if (typeof t11 != "function")
|
|
310494
|
+
throw TypeError(t11 + " is not a function!");
|
|
310495
|
+
return t11;
|
|
310496
|
+
};
|
|
310497
|
+
}, function(t10, n12) {
|
|
310498
|
+
t10.exports = function(t11) {
|
|
310499
|
+
if (t11 == undefined)
|
|
310500
|
+
throw TypeError("Can't call method on " + t11);
|
|
310501
|
+
return t11;
|
|
310502
|
+
};
|
|
310503
|
+
}, function(t10, n12, r10) {
|
|
310504
|
+
var e11 = r10(9), o11 = r10(2).document, i10 = e11(o11) && e11(o11.createElement);
|
|
310505
|
+
t10.exports = function(t11) {
|
|
310506
|
+
return i10 ? o11.createElement(t11) : {};
|
|
310507
|
+
};
|
|
310508
|
+
}, function(t10, n12) {
|
|
310509
|
+
t10.exports = function(t11, n13) {
|
|
310510
|
+
return { enumerable: !(1 & t11), configurable: !(2 & t11), writable: !(4 & t11), value: n13 };
|
|
310511
|
+
};
|
|
310512
|
+
}, function(t10, n12, r10) {
|
|
310513
|
+
var e11 = r10(12).f, o11 = r10(8), i10 = r10(1)("toStringTag");
|
|
310514
|
+
t10.exports = function(t11, n13, r11) {
|
|
310515
|
+
t11 && !o11(t11 = r11 ? t11 : t11.prototype, i10) && e11(t11, i10, { configurable: true, value: n13 });
|
|
310516
|
+
};
|
|
310517
|
+
}, function(t10, n12, r10) {
|
|
310518
|
+
var e11 = r10(29)("keys"), o11 = r10(33);
|
|
310519
|
+
t10.exports = function(t11) {
|
|
310520
|
+
return e11[t11] || (e11[t11] = o11(t11));
|
|
310521
|
+
};
|
|
310522
|
+
}, function(t10, n12) {
|
|
310523
|
+
var { ceil: r10, floor: e11 } = Math;
|
|
310524
|
+
t10.exports = function(t11) {
|
|
310525
|
+
return isNaN(t11 = +t11) ? 0 : (t11 > 0 ? e11 : r10)(t11);
|
|
310526
|
+
};
|
|
310527
|
+
}, function(t10, n12, r10) {
|
|
310528
|
+
var e11 = r10(11), o11 = r10(1)("toStringTag"), i10 = e11(function() {
|
|
310529
|
+
return arguments;
|
|
310530
|
+
}()) == "Arguments", c10 = function(t11, n13) {
|
|
310531
|
+
try {
|
|
310532
|
+
return t11[n13];
|
|
310533
|
+
} catch (t12) {}
|
|
310534
|
+
};
|
|
310535
|
+
t10.exports = function(t11) {
|
|
310536
|
+
var n13, r11, u11;
|
|
310537
|
+
return t11 === undefined ? "Undefined" : t11 === null ? "Null" : typeof (r11 = c10(n13 = Object(t11), o11)) == "string" ? r11 : i10 ? e11(n13) : (u11 = e11(n13)) == "Object" && typeof n13.callee == "function" ? "Arguments" : u11;
|
|
310538
|
+
};
|
|
310539
|
+
}, function(t10, n12) {
|
|
310540
|
+
t10.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
|
|
310541
|
+
}, function(t10, n12, r10) {
|
|
310542
|
+
var e11 = r10(2), o11 = r10(6), i10 = r10(7), c10 = r10(5), u11 = "prototype", s11 = function(t11, n13, r11) {
|
|
310543
|
+
var f11, a11, p13, l10 = t11 & s11.F, v12 = t11 & s11.G, h10 = t11 & s11.S, d11 = t11 & s11.P, y11 = t11 & s11.B, _8 = t11 & s11.W, x11 = v12 ? o11 : o11[n13] || (o11[n13] = {}), m13 = x11[u11], w10 = v12 ? e11 : h10 ? e11[n13] : (e11[n13] || {})[u11];
|
|
310544
|
+
v12 && (r11 = n13);
|
|
310545
|
+
for (f11 in r11)
|
|
310546
|
+
a11 = !l10 && w10 && w10[f11] !== undefined, a11 && f11 in x11 || (p13 = a11 ? w10[f11] : r11[f11], x11[f11] = v12 && typeof w10[f11] != "function" ? r11[f11] : y11 && a11 ? i10(p13, e11) : _8 && w10[f11] == p13 ? function(t12) {
|
|
310547
|
+
var n14 = function(n15, r12, e12) {
|
|
310548
|
+
if (this instanceof t12) {
|
|
310549
|
+
switch (arguments.length) {
|
|
310550
|
+
case 0:
|
|
310551
|
+
return new t12;
|
|
310552
|
+
case 1:
|
|
310553
|
+
return new t12(n15);
|
|
310554
|
+
case 2:
|
|
310555
|
+
return new t12(n15, r12);
|
|
310556
|
+
}
|
|
310557
|
+
return new t12(n15, r12, e12);
|
|
310558
|
+
}
|
|
310559
|
+
return t12.apply(this, arguments);
|
|
310560
|
+
};
|
|
310561
|
+
return n14[u11] = t12[u11], n14;
|
|
310562
|
+
}(p13) : d11 && typeof p13 == "function" ? i10(Function.call, p13) : p13, d11 && ((x11.virtual || (x11.virtual = {}))[f11] = p13, t11 & s11.R && m13 && !m13[f11] && c10(m13, f11, p13)));
|
|
310563
|
+
};
|
|
310564
|
+
s11.F = 1, s11.G = 2, s11.S = 4, s11.P = 8, s11.B = 16, s11.W = 32, s11.U = 64, s11.R = 128, t10.exports = s11;
|
|
310565
|
+
}, function(t10, n12) {
|
|
310566
|
+
t10.exports = function(t11) {
|
|
310567
|
+
try {
|
|
310568
|
+
return !!t11();
|
|
310569
|
+
} catch (t12) {
|
|
310570
|
+
return true;
|
|
310571
|
+
}
|
|
310572
|
+
};
|
|
310573
|
+
}, function(t10, n12, r10) {
|
|
310574
|
+
t10.exports = r10(2).document && document.documentElement;
|
|
310575
|
+
}, function(t10, n12, r10) {
|
|
310576
|
+
t10.exports = !r10(4) && !r10(24)(function() {
|
|
310577
|
+
return Object.defineProperty(r10(16)("div"), "a", { get: function() {
|
|
310578
|
+
return 7;
|
|
310579
|
+
} }).a != 7;
|
|
310580
|
+
});
|
|
310581
|
+
}, function(t10, n12, r10) {
|
|
310582
|
+
var e11 = r10(28), o11 = r10(23), i10 = r10(57), c10 = r10(5), u11 = r10(8), s11 = r10(10), f11 = r10(45), a11 = r10(18), p13 = r10(52), l10 = r10(1)("iterator"), v12 = !([].keys && ("next" in [].keys())), h10 = "@@iterator", d11 = "keys", y11 = "values", _8 = function() {
|
|
310583
|
+
return this;
|
|
310584
|
+
};
|
|
310585
|
+
t10.exports = function(t11, n13, r11, x11, m13, w10, g10) {
|
|
310586
|
+
f11(r11, n13, x11);
|
|
310587
|
+
var b10, O11, j5, S5 = function(t12) {
|
|
310588
|
+
if (!v12 && t12 in T7)
|
|
310589
|
+
return T7[t12];
|
|
310590
|
+
switch (t12) {
|
|
310591
|
+
case d11:
|
|
310592
|
+
return function() {
|
|
310593
|
+
return new r11(this, t12);
|
|
310594
|
+
};
|
|
310595
|
+
case y11:
|
|
310596
|
+
return function() {
|
|
310597
|
+
return new r11(this, t12);
|
|
310598
|
+
};
|
|
310599
|
+
}
|
|
310600
|
+
return function() {
|
|
310601
|
+
return new r11(this, t12);
|
|
310602
|
+
};
|
|
310603
|
+
}, E11 = n13 + " Iterator", P = m13 == y11, M11 = false, T7 = t11.prototype, A11 = T7[l10] || T7[h10] || m13 && T7[m13], k11 = A11 || S5(m13), C11 = m13 ? P ? S5("entries") : k11 : undefined, I7 = n13 == "Array" ? T7.entries || A11 : A11;
|
|
310604
|
+
if (I7 && (j5 = p13(I7.call(new t11)), j5 !== Object.prototype && (a11(j5, E11, true), e11 || u11(j5, l10) || c10(j5, l10, _8))), P && A11 && A11.name !== y11 && (M11 = true, k11 = function() {
|
|
310605
|
+
return A11.call(this);
|
|
310606
|
+
}), e11 && !g10 || !v12 && !M11 && T7[l10] || c10(T7, l10, k11), s11[n13] = k11, s11[E11] = _8, m13)
|
|
310607
|
+
if (b10 = { values: P ? k11 : S5(y11), keys: w10 ? k11 : S5(d11), entries: C11 }, g10)
|
|
310608
|
+
for (O11 in b10)
|
|
310609
|
+
O11 in T7 || i10(T7, O11, b10[O11]);
|
|
310610
|
+
else
|
|
310611
|
+
o11(o11.P + o11.F * (v12 || M11), n13, b10);
|
|
310612
|
+
return b10;
|
|
310613
|
+
};
|
|
310614
|
+
}, function(t10, n12) {
|
|
310615
|
+
t10.exports = true;
|
|
310616
|
+
}, function(t10, n12, r10) {
|
|
310617
|
+
var e11 = r10(2), o11 = "__core-js_shared__", i10 = e11[o11] || (e11[o11] = {});
|
|
310618
|
+
t10.exports = function(t11) {
|
|
310619
|
+
return i10[t11] || (i10[t11] = {});
|
|
310620
|
+
};
|
|
310621
|
+
}, function(t10, n12, r10) {
|
|
310622
|
+
var e11, o11, i10, c10 = r10(7), u11 = r10(41), s11 = r10(25), f11 = r10(16), a11 = r10(2), p13 = a11.process, l10 = a11.setImmediate, v12 = a11.clearImmediate, h10 = a11.MessageChannel, d11 = 0, y11 = {}, _8 = "onreadystatechange", x11 = function() {
|
|
310623
|
+
var t11 = +this;
|
|
310624
|
+
if (y11.hasOwnProperty(t11)) {
|
|
310625
|
+
var n13 = y11[t11];
|
|
310626
|
+
delete y11[t11], n13();
|
|
310627
|
+
}
|
|
310628
|
+
}, m13 = function(t11) {
|
|
310629
|
+
x11.call(t11.data);
|
|
310630
|
+
};
|
|
310631
|
+
l10 && v12 || (l10 = function(t11) {
|
|
310632
|
+
for (var n13 = [], r11 = 1;arguments.length > r11; )
|
|
310633
|
+
n13.push(arguments[r11++]);
|
|
310634
|
+
return y11[++d11] = function() {
|
|
310635
|
+
u11(typeof t11 == "function" ? t11 : Function(t11), n13);
|
|
310636
|
+
}, e11(d11), d11;
|
|
310637
|
+
}, v12 = function(t11) {
|
|
310638
|
+
delete y11[t11];
|
|
310639
|
+
}, r10(11)(p13) == "process" ? e11 = function(t11) {
|
|
310640
|
+
p13.nextTick(c10(x11, t11, 1));
|
|
310641
|
+
} : h10 ? (o11 = new h10, i10 = o11.port2, o11.port1.onmessage = m13, e11 = c10(i10.postMessage, i10, 1)) : a11.addEventListener && typeof postMessage == "function" && !a11.importScripts ? (e11 = function(t11) {
|
|
310642
|
+
a11.postMessage(t11 + "", "*");
|
|
310643
|
+
}, a11.addEventListener("message", m13, false)) : e11 = (_8 in f11("script")) ? function(t11) {
|
|
310644
|
+
s11.appendChild(f11("script"))[_8] = function() {
|
|
310645
|
+
s11.removeChild(this), x11.call(t11);
|
|
310646
|
+
};
|
|
310647
|
+
} : function(t11) {
|
|
310648
|
+
setTimeout(c10(x11, t11, 1), 0);
|
|
310649
|
+
}), t10.exports = { set: l10, clear: v12 };
|
|
310650
|
+
}, function(t10, n12, r10) {
|
|
310651
|
+
var e11 = r10(20), o11 = Math.min;
|
|
310652
|
+
t10.exports = function(t11) {
|
|
310653
|
+
return t11 > 0 ? o11(e11(t11), 9007199254740991) : 0;
|
|
310654
|
+
};
|
|
310655
|
+
}, function(t10, n12, r10) {
|
|
310656
|
+
var e11 = r10(9);
|
|
310657
|
+
t10.exports = function(t11, n13) {
|
|
310658
|
+
if (!e11(t11))
|
|
310659
|
+
return t11;
|
|
310660
|
+
var r11, o11;
|
|
310661
|
+
if (n13 && typeof (r11 = t11.toString) == "function" && !e11(o11 = r11.call(t11)))
|
|
310662
|
+
return o11;
|
|
310663
|
+
if (typeof (r11 = t11.valueOf) == "function" && !e11(o11 = r11.call(t11)))
|
|
310664
|
+
return o11;
|
|
310665
|
+
if (!n13 && typeof (r11 = t11.toString) == "function" && !e11(o11 = r11.call(t11)))
|
|
310666
|
+
return o11;
|
|
310667
|
+
throw TypeError("Can't convert object to primitive value");
|
|
310668
|
+
};
|
|
310669
|
+
}, function(t10, n12) {
|
|
310670
|
+
var r10 = 0, e11 = Math.random();
|
|
310671
|
+
t10.exports = function(t11) {
|
|
310672
|
+
return "Symbol(".concat(t11 === undefined ? "" : t11, ")_", (++r10 + e11).toString(36));
|
|
310673
|
+
};
|
|
310674
|
+
}, function(t10, n12, r10) {
|
|
310675
|
+
function e11(t11) {
|
|
310676
|
+
return t11 && t11.__esModule ? t11 : { default: t11 };
|
|
310677
|
+
}
|
|
310678
|
+
function o11() {
|
|
310679
|
+
return process.platform !== "win32" ? "" : process.arch === "ia32" && process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432") ? "mixed" : "native";
|
|
310680
|
+
}
|
|
310681
|
+
function i10(t11) {
|
|
310682
|
+
return (0, l10.createHash)("sha256").update(t11).digest("hex");
|
|
310683
|
+
}
|
|
310684
|
+
function c10(t11) {
|
|
310685
|
+
switch (h10) {
|
|
310686
|
+
case "darwin":
|
|
310687
|
+
return t11.split("IOPlatformUUID")[1].split(`
|
|
310688
|
+
`)[0].replace(/\=|\s+|\"/gi, "").toLowerCase();
|
|
310689
|
+
case "win32":
|
|
310690
|
+
return t11.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
310691
|
+
case "linux":
|
|
310692
|
+
return t11.toString().replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
310693
|
+
case "freebsd":
|
|
310694
|
+
return t11.toString().replace(/\r+|\n+|\s+/gi, "").toLowerCase();
|
|
310695
|
+
default:
|
|
310696
|
+
throw new Error("Unsupported platform: " + process.platform);
|
|
310697
|
+
}
|
|
310698
|
+
}
|
|
310699
|
+
function u11(t11) {
|
|
310700
|
+
var n13 = c10((0, p13.execSync)(y11[h10]).toString());
|
|
310701
|
+
return t11 ? n13 : i10(n13);
|
|
310702
|
+
}
|
|
310703
|
+
function s11(t11) {
|
|
310704
|
+
return new a11.default(function(n13, r11) {
|
|
310705
|
+
return (0, p13.exec)(y11[h10], {}, function(e12, o14, u12) {
|
|
310706
|
+
if (e12)
|
|
310707
|
+
return r11(new Error("Error while obtaining machine id: " + e12.stack));
|
|
310708
|
+
var s13 = c10(o14.toString());
|
|
310709
|
+
return n13(t11 ? s13 : i10(s13));
|
|
310710
|
+
});
|
|
310711
|
+
});
|
|
310712
|
+
}
|
|
310713
|
+
Object.defineProperty(n12, "__esModule", { value: true });
|
|
310714
|
+
var f11 = r10(35), a11 = e11(f11);
|
|
310715
|
+
n12.machineIdSync = u11, n12.machineId = s11;
|
|
310716
|
+
var p13 = r10(70), l10 = r10(71), v12 = process, h10 = v12.platform, d11 = { native: "%windir%\\System32", mixed: "%windir%\\sysnative\\cmd.exe /c %windir%\\System32" }, y11 = { darwin: "ioreg -rd1 -c IOPlatformExpertDevice", win32: d11[o11()] + "\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid", linux: "( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :", freebsd: "kenv -q smbios.system.uuid || sysctl -n kern.hostuuid" };
|
|
310717
|
+
}, function(t10, n12, r10) {
|
|
310718
|
+
t10.exports = { default: r10(36), __esModule: true };
|
|
310719
|
+
}, function(t10, n12, r10) {
|
|
310720
|
+
r10(66), r10(68), r10(69), r10(67), t10.exports = r10(6).Promise;
|
|
310721
|
+
}, function(t10, n12) {
|
|
310722
|
+
t10.exports = function() {};
|
|
310723
|
+
}, function(t10, n12) {
|
|
310724
|
+
t10.exports = function(t11, n13, r10, e11) {
|
|
310725
|
+
if (!(t11 instanceof n13) || e11 !== undefined && e11 in t11)
|
|
310726
|
+
throw TypeError(r10 + ": incorrect invocation!");
|
|
310727
|
+
return t11;
|
|
310728
|
+
};
|
|
310729
|
+
}, function(t10, n12, r10) {
|
|
310730
|
+
var e11 = r10(13), o11 = r10(31), i10 = r10(62);
|
|
310731
|
+
t10.exports = function(t11) {
|
|
310732
|
+
return function(n13, r11, c10) {
|
|
310733
|
+
var u11, s11 = e11(n13), f11 = o11(s11.length), a11 = i10(c10, f11);
|
|
310734
|
+
if (t11 && r11 != r11) {
|
|
310735
|
+
for (;f11 > a11; )
|
|
310736
|
+
if (u11 = s11[a11++], u11 != u11)
|
|
310737
|
+
return true;
|
|
310738
|
+
} else
|
|
310739
|
+
for (;f11 > a11; a11++)
|
|
310740
|
+
if ((t11 || (a11 in s11)) && s11[a11] === r11)
|
|
310741
|
+
return t11 || a11 || 0;
|
|
310742
|
+
return !t11 && -1;
|
|
310743
|
+
};
|
|
310744
|
+
};
|
|
310745
|
+
}, function(t10, n12, r10) {
|
|
310746
|
+
var e11 = r10(7), o11 = r10(44), i10 = r10(43), c10 = r10(3), u11 = r10(31), s11 = r10(64), f11 = {}, a11 = {}, n12 = t10.exports = function(t11, n13, r11, p13, l10) {
|
|
310747
|
+
var v12, h10, d11, y11, _8 = l10 ? function() {
|
|
310748
|
+
return t11;
|
|
310749
|
+
} : s11(t11), x11 = e11(r11, p13, n13 ? 2 : 1), m13 = 0;
|
|
310750
|
+
if (typeof _8 != "function")
|
|
310751
|
+
throw TypeError(t11 + " is not iterable!");
|
|
310752
|
+
if (i10(_8)) {
|
|
310753
|
+
for (v12 = u11(t11.length);v12 > m13; m13++)
|
|
310754
|
+
if (y11 = n13 ? x11(c10(h10 = t11[m13])[0], h10[1]) : x11(t11[m13]), y11 === f11 || y11 === a11)
|
|
310755
|
+
return y11;
|
|
310756
|
+
} else
|
|
310757
|
+
for (d11 = _8.call(t11);!(h10 = d11.next()).done; )
|
|
310758
|
+
if (y11 = o11(d11, x11, h10.value, n13), y11 === f11 || y11 === a11)
|
|
310759
|
+
return y11;
|
|
310760
|
+
};
|
|
310761
|
+
n12.BREAK = f11, n12.RETURN = a11;
|
|
310762
|
+
}, function(t10, n12) {
|
|
310763
|
+
t10.exports = function(t11, n13, r10) {
|
|
310764
|
+
var e11 = r10 === undefined;
|
|
310765
|
+
switch (n13.length) {
|
|
310766
|
+
case 0:
|
|
310767
|
+
return e11 ? t11() : t11.call(r10);
|
|
310768
|
+
case 1:
|
|
310769
|
+
return e11 ? t11(n13[0]) : t11.call(r10, n13[0]);
|
|
310770
|
+
case 2:
|
|
310771
|
+
return e11 ? t11(n13[0], n13[1]) : t11.call(r10, n13[0], n13[1]);
|
|
310772
|
+
case 3:
|
|
310773
|
+
return e11 ? t11(n13[0], n13[1], n13[2]) : t11.call(r10, n13[0], n13[1], n13[2]);
|
|
310774
|
+
case 4:
|
|
310775
|
+
return e11 ? t11(n13[0], n13[1], n13[2], n13[3]) : t11.call(r10, n13[0], n13[1], n13[2], n13[3]);
|
|
310776
|
+
}
|
|
310777
|
+
return t11.apply(r10, n13);
|
|
310778
|
+
};
|
|
310779
|
+
}, function(t10, n12, r10) {
|
|
310780
|
+
var e11 = r10(11);
|
|
310781
|
+
t10.exports = Object("z").propertyIsEnumerable(0) ? Object : function(t11) {
|
|
310782
|
+
return e11(t11) == "String" ? t11.split("") : Object(t11);
|
|
310783
|
+
};
|
|
310784
|
+
}, function(t10, n12, r10) {
|
|
310785
|
+
var e11 = r10(10), o11 = r10(1)("iterator"), i10 = Array.prototype;
|
|
310786
|
+
t10.exports = function(t11) {
|
|
310787
|
+
return t11 !== undefined && (e11.Array === t11 || i10[o11] === t11);
|
|
310788
|
+
};
|
|
310789
|
+
}, function(t10, n12, r10) {
|
|
310790
|
+
var e11 = r10(3);
|
|
310791
|
+
t10.exports = function(t11, n13, r11, o11) {
|
|
310792
|
+
try {
|
|
310793
|
+
return o11 ? n13(e11(r11)[0], r11[1]) : n13(r11);
|
|
310794
|
+
} catch (n14) {
|
|
310795
|
+
var i10 = t11.return;
|
|
310796
|
+
throw i10 !== undefined && e11(i10.call(t11)), n14;
|
|
310797
|
+
}
|
|
310798
|
+
};
|
|
310799
|
+
}, function(t10, n12, r10) {
|
|
310800
|
+
var e11 = r10(49), o11 = r10(17), i10 = r10(18), c10 = {};
|
|
310801
|
+
r10(5)(c10, r10(1)("iterator"), function() {
|
|
310802
|
+
return this;
|
|
310803
|
+
}), t10.exports = function(t11, n13, r11) {
|
|
310804
|
+
t11.prototype = e11(c10, { next: o11(1, r11) }), i10(t11, n13 + " Iterator");
|
|
310805
|
+
};
|
|
310806
|
+
}, function(t10, n12, r10) {
|
|
310807
|
+
var e11 = r10(1)("iterator"), o11 = false;
|
|
310808
|
+
try {
|
|
310809
|
+
var i10 = [7][e11]();
|
|
310810
|
+
i10.return = function() {
|
|
310811
|
+
o11 = true;
|
|
310812
|
+
}, Array.from(i10, function() {
|
|
310813
|
+
throw 2;
|
|
310814
|
+
});
|
|
310815
|
+
} catch (t11) {}
|
|
310816
|
+
t10.exports = function(t11, n13) {
|
|
310817
|
+
if (!n13 && !o11)
|
|
310818
|
+
return false;
|
|
310819
|
+
var r11 = false;
|
|
310820
|
+
try {
|
|
310821
|
+
var i11 = [7], c10 = i11[e11]();
|
|
310822
|
+
c10.next = function() {
|
|
310823
|
+
return { done: r11 = true };
|
|
310824
|
+
}, i11[e11] = function() {
|
|
310825
|
+
return c10;
|
|
310826
|
+
}, t11(i11);
|
|
310827
|
+
} catch (t12) {}
|
|
310828
|
+
return r11;
|
|
310829
|
+
};
|
|
310830
|
+
}, function(t10, n12) {
|
|
310831
|
+
t10.exports = function(t11, n13) {
|
|
310832
|
+
return { value: n13, done: !!t11 };
|
|
310833
|
+
};
|
|
310834
|
+
}, function(t10, n12, r10) {
|
|
310835
|
+
var e11 = r10(2), o11 = r10(30).set, i10 = e11.MutationObserver || e11.WebKitMutationObserver, c10 = e11.process, u11 = e11.Promise, s11 = r10(11)(c10) == "process";
|
|
310836
|
+
t10.exports = function() {
|
|
310837
|
+
var t11, n13, r11, f11 = function() {
|
|
310838
|
+
var e12, o14;
|
|
310839
|
+
for (s11 && (e12 = c10.domain) && e12.exit();t11; ) {
|
|
310840
|
+
o14 = t11.fn, t11 = t11.next;
|
|
310841
|
+
try {
|
|
310842
|
+
o14();
|
|
310843
|
+
} catch (e13) {
|
|
310844
|
+
throw t11 ? r11() : n13 = undefined, e13;
|
|
310845
|
+
}
|
|
310846
|
+
}
|
|
310847
|
+
n13 = undefined, e12 && e12.enter();
|
|
310848
|
+
};
|
|
310849
|
+
if (s11)
|
|
310850
|
+
r11 = function() {
|
|
310851
|
+
c10.nextTick(f11);
|
|
310852
|
+
};
|
|
310853
|
+
else if (i10) {
|
|
310854
|
+
var a11 = true, p13 = document.createTextNode("");
|
|
310855
|
+
new i10(f11).observe(p13, { characterData: true }), r11 = function() {
|
|
310856
|
+
p13.data = a11 = !a11;
|
|
310857
|
+
};
|
|
310858
|
+
} else if (u11 && u11.resolve) {
|
|
310859
|
+
var l10 = u11.resolve();
|
|
310860
|
+
r11 = function() {
|
|
310861
|
+
l10.then(f11);
|
|
310862
|
+
};
|
|
310863
|
+
} else
|
|
310864
|
+
r11 = function() {
|
|
310865
|
+
o11.call(e11, f11);
|
|
310866
|
+
};
|
|
310867
|
+
return function(e12) {
|
|
310868
|
+
var o14 = { fn: e12, next: undefined };
|
|
310869
|
+
n13 && (n13.next = o14), t11 || (t11 = o14, r11()), n13 = o14;
|
|
310870
|
+
};
|
|
310871
|
+
};
|
|
310872
|
+
}, function(t10, n12, r10) {
|
|
310873
|
+
var e11 = r10(3), o11 = r10(50), i10 = r10(22), c10 = r10(19)("IE_PROTO"), u11 = function() {}, s11 = "prototype", f11 = function() {
|
|
310874
|
+
var t11, n13 = r10(16)("iframe"), e12 = i10.length, o14 = ">";
|
|
310875
|
+
for (n13.style.display = "none", r10(25).appendChild(n13), n13.src = "javascript:", t11 = n13.contentWindow.document, t11.open(), t11.write("<script>document.F=Object</script" + o14), t11.close(), f11 = t11.F;e12--; )
|
|
310876
|
+
delete f11[s11][i10[e12]];
|
|
310877
|
+
return f11();
|
|
310878
|
+
};
|
|
310879
|
+
t10.exports = Object.create || function(t11, n13) {
|
|
310880
|
+
var r11;
|
|
310881
|
+
return t11 !== null ? (u11[s11] = e11(t11), r11 = new u11, u11[s11] = null, r11[c10] = t11) : r11 = f11(), n13 === undefined ? r11 : o11(r11, n13);
|
|
310882
|
+
};
|
|
310883
|
+
}, function(t10, n12, r10) {
|
|
310884
|
+
var e11 = r10(12), o11 = r10(3), i10 = r10(54);
|
|
310885
|
+
t10.exports = r10(4) ? Object.defineProperties : function(t11, n13) {
|
|
310886
|
+
o11(t11);
|
|
310887
|
+
for (var r11, c10 = i10(n13), u11 = c10.length, s11 = 0;u11 > s11; )
|
|
310888
|
+
e11.f(t11, r11 = c10[s11++], n13[r11]);
|
|
310889
|
+
return t11;
|
|
310890
|
+
};
|
|
310891
|
+
}, function(t10, n12, r10) {
|
|
310892
|
+
var e11 = r10(55), o11 = r10(17), i10 = r10(13), c10 = r10(32), u11 = r10(8), s11 = r10(26), f11 = Object.getOwnPropertyDescriptor;
|
|
310893
|
+
n12.f = r10(4) ? f11 : function(t11, n13) {
|
|
310894
|
+
if (t11 = i10(t11), n13 = c10(n13, true), s11)
|
|
310895
|
+
try {
|
|
310896
|
+
return f11(t11, n13);
|
|
310897
|
+
} catch (t12) {}
|
|
310898
|
+
if (u11(t11, n13))
|
|
310899
|
+
return o11(!e11.f.call(t11, n13), t11[n13]);
|
|
310900
|
+
};
|
|
310901
|
+
}, function(t10, n12, r10) {
|
|
310902
|
+
var e11 = r10(8), o11 = r10(63), i10 = r10(19)("IE_PROTO"), c10 = Object.prototype;
|
|
310903
|
+
t10.exports = Object.getPrototypeOf || function(t11) {
|
|
310904
|
+
return t11 = o11(t11), e11(t11, i10) ? t11[i10] : typeof t11.constructor == "function" && t11 instanceof t11.constructor ? t11.constructor.prototype : t11 instanceof Object ? c10 : null;
|
|
310905
|
+
};
|
|
310906
|
+
}, function(t10, n12, r10) {
|
|
310907
|
+
var e11 = r10(8), o11 = r10(13), i10 = r10(39)(false), c10 = r10(19)("IE_PROTO");
|
|
310908
|
+
t10.exports = function(t11, n13) {
|
|
310909
|
+
var r11, u11 = o11(t11), s11 = 0, f11 = [];
|
|
310910
|
+
for (r11 in u11)
|
|
310911
|
+
r11 != c10 && e11(u11, r11) && f11.push(r11);
|
|
310912
|
+
for (;n13.length > s11; )
|
|
310913
|
+
e11(u11, r11 = n13[s11++]) && (~i10(f11, r11) || f11.push(r11));
|
|
310914
|
+
return f11;
|
|
310915
|
+
};
|
|
310916
|
+
}, function(t10, n12, r10) {
|
|
310917
|
+
var e11 = r10(53), o11 = r10(22);
|
|
310918
|
+
t10.exports = Object.keys || function(t11) {
|
|
310919
|
+
return e11(t11, o11);
|
|
310920
|
+
};
|
|
310921
|
+
}, function(t10, n12) {
|
|
310922
|
+
n12.f = {}.propertyIsEnumerable;
|
|
310923
|
+
}, function(t10, n12, r10) {
|
|
310924
|
+
var e11 = r10(5);
|
|
310925
|
+
t10.exports = function(t11, n13, r11) {
|
|
310926
|
+
for (var o11 in n13)
|
|
310927
|
+
r11 && t11[o11] ? t11[o11] = n13[o11] : e11(t11, o11, n13[o11]);
|
|
310928
|
+
return t11;
|
|
310929
|
+
};
|
|
310930
|
+
}, function(t10, n12, r10) {
|
|
310931
|
+
t10.exports = r10(5);
|
|
310932
|
+
}, function(t10, n12, r10) {
|
|
310933
|
+
var e11 = r10(9), o11 = r10(3), i10 = function(t11, n13) {
|
|
310934
|
+
if (o11(t11), !e11(n13) && n13 !== null)
|
|
310935
|
+
throw TypeError(n13 + ": can't set as prototype!");
|
|
310936
|
+
};
|
|
310937
|
+
t10.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? function(t11, n13, e12) {
|
|
310938
|
+
try {
|
|
310939
|
+
e12 = r10(7)(Function.call, r10(51).f(Object.prototype, "__proto__").set, 2), e12(t11, []), n13 = !(t11 instanceof Array);
|
|
310940
|
+
} catch (t12) {
|
|
310941
|
+
n13 = true;
|
|
310942
|
+
}
|
|
310943
|
+
return function(t12, r11) {
|
|
310944
|
+
return i10(t12, r11), n13 ? t12.__proto__ = r11 : e12(t12, r11), t12;
|
|
310945
|
+
};
|
|
310946
|
+
}({}, false) : undefined), check: i10 };
|
|
310947
|
+
}, function(t10, n12, r10) {
|
|
310948
|
+
var e11 = r10(2), o11 = r10(6), i10 = r10(12), c10 = r10(4), u11 = r10(1)("species");
|
|
310949
|
+
t10.exports = function(t11) {
|
|
310950
|
+
var n13 = typeof o11[t11] == "function" ? o11[t11] : e11[t11];
|
|
310951
|
+
c10 && n13 && !n13[u11] && i10.f(n13, u11, { configurable: true, get: function() {
|
|
310952
|
+
return this;
|
|
310953
|
+
} });
|
|
310954
|
+
};
|
|
310955
|
+
}, function(t10, n12, r10) {
|
|
310956
|
+
var e11 = r10(3), o11 = r10(14), i10 = r10(1)("species");
|
|
310957
|
+
t10.exports = function(t11, n13) {
|
|
310958
|
+
var r11, c10 = e11(t11).constructor;
|
|
310959
|
+
return c10 === undefined || (r11 = e11(c10)[i10]) == undefined ? n13 : o11(r11);
|
|
310960
|
+
};
|
|
310961
|
+
}, function(t10, n12, r10) {
|
|
310962
|
+
var e11 = r10(20), o11 = r10(15);
|
|
310963
|
+
t10.exports = function(t11) {
|
|
310964
|
+
return function(n13, r11) {
|
|
310965
|
+
var i10, c10, u11 = String(o11(n13)), s11 = e11(r11), f11 = u11.length;
|
|
310966
|
+
return s11 < 0 || s11 >= f11 ? t11 ? "" : undefined : (i10 = u11.charCodeAt(s11), i10 < 55296 || i10 > 56319 || s11 + 1 === f11 || (c10 = u11.charCodeAt(s11 + 1)) < 56320 || c10 > 57343 ? t11 ? u11.charAt(s11) : i10 : t11 ? u11.slice(s11, s11 + 2) : (i10 - 55296 << 10) + (c10 - 56320) + 65536);
|
|
310967
|
+
};
|
|
310968
|
+
};
|
|
310969
|
+
}, function(t10, n12, r10) {
|
|
310970
|
+
var e11 = r10(20), o11 = Math.max, i10 = Math.min;
|
|
310971
|
+
t10.exports = function(t11, n13) {
|
|
310972
|
+
return t11 = e11(t11), t11 < 0 ? o11(t11 + n13, 0) : i10(t11, n13);
|
|
310973
|
+
};
|
|
310974
|
+
}, function(t10, n12, r10) {
|
|
310975
|
+
var e11 = r10(15);
|
|
310976
|
+
t10.exports = function(t11) {
|
|
310977
|
+
return Object(e11(t11));
|
|
310978
|
+
};
|
|
310979
|
+
}, function(t10, n12, r10) {
|
|
310980
|
+
var e11 = r10(21), o11 = r10(1)("iterator"), i10 = r10(10);
|
|
310981
|
+
t10.exports = r10(6).getIteratorMethod = function(t11) {
|
|
310982
|
+
if (t11 != null)
|
|
310983
|
+
return t11[o11] || t11["@@iterator"] || i10[e11(t11)];
|
|
310984
|
+
};
|
|
310985
|
+
}, function(t10, n12, r10) {
|
|
310986
|
+
var e11 = r10(37), o11 = r10(47), i10 = r10(10), c10 = r10(13);
|
|
310987
|
+
t10.exports = r10(27)(Array, "Array", function(t11, n13) {
|
|
310988
|
+
this._t = c10(t11), this._i = 0, this._k = n13;
|
|
310989
|
+
}, function() {
|
|
310990
|
+
var t11 = this._t, n13 = this._k, r11 = this._i++;
|
|
310991
|
+
return !t11 || r11 >= t11.length ? (this._t = undefined, o11(1)) : n13 == "keys" ? o11(0, r11) : n13 == "values" ? o11(0, t11[r11]) : o11(0, [r11, t11[r11]]);
|
|
310992
|
+
}, "values"), i10.Arguments = i10.Array, e11("keys"), e11("values"), e11("entries");
|
|
310993
|
+
}, function(t10, n12) {}, function(t10, n12, r10) {
|
|
310994
|
+
var e11, o11, i10, c10 = r10(28), u11 = r10(2), s11 = r10(7), f11 = r10(21), a11 = r10(23), p13 = r10(9), l10 = (r10(3), r10(14)), v12 = r10(38), h10 = r10(40), d11 = (r10(58).set, r10(60)), y11 = r10(30).set, _8 = r10(48)(), x11 = "Promise", m13 = u11.TypeError, w10 = u11.process, g10 = u11[x11], w10 = u11.process, b10 = f11(w10) == "process", O11 = function() {}, j5 = !!function() {
|
|
310995
|
+
try {
|
|
310996
|
+
var t11 = g10.resolve(1), n13 = (t11.constructor = {})[r10(1)("species")] = function(t12) {
|
|
310997
|
+
t12(O11, O11);
|
|
310998
|
+
};
|
|
310999
|
+
return (b10 || typeof PromiseRejectionEvent == "function") && t11.then(O11) instanceof n13;
|
|
311000
|
+
} catch (t12) {}
|
|
311001
|
+
}(), S5 = function(t11, n13) {
|
|
311002
|
+
return t11 === n13 || t11 === g10 && n13 === i10;
|
|
311003
|
+
}, E11 = function(t11) {
|
|
311004
|
+
var n13;
|
|
311005
|
+
return !(!p13(t11) || typeof (n13 = t11.then) != "function") && n13;
|
|
311006
|
+
}, P = function(t11) {
|
|
311007
|
+
return S5(g10, t11) ? new M11(t11) : new o11(t11);
|
|
311008
|
+
}, M11 = o11 = function(t11) {
|
|
311009
|
+
var n13, r11;
|
|
311010
|
+
this.promise = new t11(function(t12, e12) {
|
|
311011
|
+
if (n13 !== undefined || r11 !== undefined)
|
|
311012
|
+
throw m13("Bad Promise constructor");
|
|
311013
|
+
n13 = t12, r11 = e12;
|
|
311014
|
+
}), this.resolve = l10(n13), this.reject = l10(r11);
|
|
311015
|
+
}, T7 = function(t11) {
|
|
311016
|
+
try {
|
|
311017
|
+
t11();
|
|
311018
|
+
} catch (t12) {
|
|
311019
|
+
return { error: t12 };
|
|
311020
|
+
}
|
|
311021
|
+
}, A11 = function(t11, n13) {
|
|
311022
|
+
if (!t11._n) {
|
|
311023
|
+
t11._n = true;
|
|
311024
|
+
var r11 = t11._c;
|
|
311025
|
+
_8(function() {
|
|
311026
|
+
for (var e12 = t11._v, o14 = t11._s == 1, i11 = 0, c11 = function(n14) {
|
|
311027
|
+
var r12, i12, c12 = o14 ? n14.ok : n14.fail, u12 = n14.resolve, s13 = n14.reject, f12 = n14.domain;
|
|
311028
|
+
try {
|
|
311029
|
+
c12 ? (o14 || (t11._h == 2 && I7(t11), t11._h = 1), c12 === true ? r12 = e12 : (f12 && f12.enter(), r12 = c12(e12), f12 && f12.exit()), r12 === n14.promise ? s13(m13("Promise-chain cycle")) : (i12 = E11(r12)) ? i12.call(r12, u12, s13) : u12(r12)) : s13(e12);
|
|
311030
|
+
} catch (t12) {
|
|
311031
|
+
s13(t12);
|
|
311032
|
+
}
|
|
311033
|
+
};r11.length > i11; )
|
|
311034
|
+
c11(r11[i11++]);
|
|
311035
|
+
t11._c = [], t11._n = false, n13 && !t11._h && k11(t11);
|
|
311036
|
+
});
|
|
311037
|
+
}
|
|
311038
|
+
}, k11 = function(t11) {
|
|
311039
|
+
y11.call(u11, function() {
|
|
311040
|
+
var n13, r11, e12, o14 = t11._v;
|
|
311041
|
+
if (C11(t11) && (n13 = T7(function() {
|
|
311042
|
+
b10 ? w10.emit("unhandledRejection", o14, t11) : (r11 = u11.onunhandledrejection) ? r11({ promise: t11, reason: o14 }) : (e12 = u11.console) && e12.error && e12.error("Unhandled promise rejection", o14);
|
|
311043
|
+
}), t11._h = b10 || C11(t11) ? 2 : 1), t11._a = undefined, n13)
|
|
311044
|
+
throw n13.error;
|
|
311045
|
+
});
|
|
311046
|
+
}, C11 = function(t11) {
|
|
311047
|
+
if (t11._h == 1)
|
|
311048
|
+
return false;
|
|
311049
|
+
for (var n13, r11 = t11._a || t11._c, e12 = 0;r11.length > e12; )
|
|
311050
|
+
if (n13 = r11[e12++], n13.fail || !C11(n13.promise))
|
|
311051
|
+
return false;
|
|
311052
|
+
return true;
|
|
311053
|
+
}, I7 = function(t11) {
|
|
311054
|
+
y11.call(u11, function() {
|
|
311055
|
+
var n13;
|
|
311056
|
+
b10 ? w10.emit("rejectionHandled", t11) : (n13 = u11.onrejectionhandled) && n13({ promise: t11, reason: t11._v });
|
|
311057
|
+
});
|
|
311058
|
+
}, R10 = function(t11) {
|
|
311059
|
+
var n13 = this;
|
|
311060
|
+
n13._d || (n13._d = true, n13 = n13._w || n13, n13._v = t11, n13._s = 2, n13._a || (n13._a = n13._c.slice()), A11(n13, true));
|
|
311061
|
+
}, F10 = function(t11) {
|
|
311062
|
+
var n13, r11 = this;
|
|
311063
|
+
if (!r11._d) {
|
|
311064
|
+
r11._d = true, r11 = r11._w || r11;
|
|
311065
|
+
try {
|
|
311066
|
+
if (r11 === t11)
|
|
311067
|
+
throw m13("Promise can't be resolved itself");
|
|
311068
|
+
(n13 = E11(t11)) ? _8(function() {
|
|
311069
|
+
var e12 = { _w: r11, _d: false };
|
|
311070
|
+
try {
|
|
311071
|
+
n13.call(t11, s11(F10, e12, 1), s11(R10, e12, 1));
|
|
311072
|
+
} catch (t12) {
|
|
311073
|
+
R10.call(e12, t12);
|
|
311074
|
+
}
|
|
311075
|
+
}) : (r11._v = t11, r11._s = 1, A11(r11, false));
|
|
311076
|
+
} catch (t12) {
|
|
311077
|
+
R10.call({ _w: r11, _d: false }, t12);
|
|
311078
|
+
}
|
|
311079
|
+
}
|
|
311080
|
+
};
|
|
311081
|
+
j5 || (g10 = function(t11) {
|
|
311082
|
+
v12(this, g10, x11, "_h"), l10(t11), e11.call(this);
|
|
311083
|
+
try {
|
|
311084
|
+
t11(s11(F10, this, 1), s11(R10, this, 1));
|
|
311085
|
+
} catch (t12) {
|
|
311086
|
+
R10.call(this, t12);
|
|
311087
|
+
}
|
|
311088
|
+
}, e11 = function(t11) {
|
|
311089
|
+
this._c = [], this._a = undefined, this._s = 0, this._d = false, this._v = undefined, this._h = 0, this._n = false;
|
|
311090
|
+
}, e11.prototype = r10(56)(g10.prototype, { then: function(t11, n13) {
|
|
311091
|
+
var r11 = P(d11(this, g10));
|
|
311092
|
+
return r11.ok = typeof t11 != "function" || t11, r11.fail = typeof n13 == "function" && n13, r11.domain = b10 ? w10.domain : undefined, this._c.push(r11), this._a && this._a.push(r11), this._s && A11(this, false), r11.promise;
|
|
311093
|
+
}, catch: function(t11) {
|
|
311094
|
+
return this.then(undefined, t11);
|
|
311095
|
+
} }), M11 = function() {
|
|
311096
|
+
var t11 = new e11;
|
|
311097
|
+
this.promise = t11, this.resolve = s11(F10, t11, 1), this.reject = s11(R10, t11, 1);
|
|
311098
|
+
}), a11(a11.G + a11.W + a11.F * !j5, { Promise: g10 }), r10(18)(g10, x11), r10(59)(x11), i10 = r10(6)[x11], a11(a11.S + a11.F * !j5, x11, { reject: function(t11) {
|
|
311099
|
+
var n13 = P(this), r11 = n13.reject;
|
|
311100
|
+
return r11(t11), n13.promise;
|
|
311101
|
+
} }), a11(a11.S + a11.F * (c10 || !j5), x11, { resolve: function(t11) {
|
|
311102
|
+
if (t11 instanceof g10 && S5(t11.constructor, this))
|
|
311103
|
+
return t11;
|
|
311104
|
+
var n13 = P(this), r11 = n13.resolve;
|
|
311105
|
+
return r11(t11), n13.promise;
|
|
311106
|
+
} }), a11(a11.S + a11.F * !(j5 && r10(46)(function(t11) {
|
|
311107
|
+
g10.all(t11).catch(O11);
|
|
311108
|
+
})), x11, { all: function(t11) {
|
|
311109
|
+
var n13 = this, r11 = P(n13), e12 = r11.resolve, o14 = r11.reject, i11 = T7(function() {
|
|
311110
|
+
var r12 = [], i12 = 0, c11 = 1;
|
|
311111
|
+
h10(t11, false, function(t12) {
|
|
311112
|
+
var u12 = i12++, s13 = false;
|
|
311113
|
+
r12.push(undefined), c11++, n13.resolve(t12).then(function(t13) {
|
|
311114
|
+
s13 || (s13 = true, r12[u12] = t13, --c11 || e12(r12));
|
|
311115
|
+
}, o14);
|
|
311116
|
+
}), --c11 || e12(r12);
|
|
311117
|
+
});
|
|
311118
|
+
return i11 && o14(i11.error), r11.promise;
|
|
311119
|
+
}, race: function(t11) {
|
|
311120
|
+
var n13 = this, r11 = P(n13), e12 = r11.reject, o14 = T7(function() {
|
|
311121
|
+
h10(t11, false, function(t12) {
|
|
311122
|
+
n13.resolve(t12).then(r11.resolve, e12);
|
|
311123
|
+
});
|
|
311124
|
+
});
|
|
311125
|
+
return o14 && e12(o14.error), r11.promise;
|
|
311126
|
+
} });
|
|
311127
|
+
}, function(t10, n12, r10) {
|
|
311128
|
+
var e11 = r10(61)(true);
|
|
311129
|
+
r10(27)(String, "String", function(t11) {
|
|
311130
|
+
this._t = String(t11), this._i = 0;
|
|
311131
|
+
}, function() {
|
|
311132
|
+
var t11, n13 = this._t, r11 = this._i;
|
|
311133
|
+
return r11 >= n13.length ? { value: undefined, done: true } : (t11 = e11(n13, r11), this._i += t11.length, { value: t11, done: false });
|
|
311134
|
+
});
|
|
311135
|
+
}, function(t10, n12, r10) {
|
|
311136
|
+
r10(65);
|
|
311137
|
+
for (var e11 = r10(2), o11 = r10(5), i10 = r10(10), c10 = r10(1)("toStringTag"), u11 = ["NodeList", "DOMTokenList", "MediaList", "StyleSheetList", "CSSRuleList"], s11 = 0;s11 < 5; s11++) {
|
|
311138
|
+
var f11 = u11[s11], a11 = e11[f11], p13 = a11 && a11.prototype;
|
|
311139
|
+
p13 && !p13[c10] && o11(p13, c10, f11), i10[f11] = i10.Array;
|
|
311140
|
+
}
|
|
311141
|
+
}, function(t10, n12) {
|
|
311142
|
+
t10.exports = __require("child_process");
|
|
311143
|
+
}, function(t10, n12) {
|
|
311144
|
+
t10.exports = __require("crypto");
|
|
311145
|
+
}]);
|
|
311146
|
+
});
|
|
311147
|
+
});
|
|
311148
|
+
|
|
311149
311149
|
// ../../node_modules/eventemitter3/index.js
|
|
311150
311150
|
var require_eventemitter3 = __commonJS((exports, module) => {
|
|
311151
311151
|
var has15 = Object.prototype.hasOwnProperty;
|
|
@@ -328068,103 +328068,6 @@ function E(i2) {
|
|
|
328068
328068
|
return t2.d.bind(t2);
|
|
328069
328069
|
}
|
|
328070
328070
|
|
|
328071
|
-
// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
328072
|
-
var encoder = new TextEncoder;
|
|
328073
|
-
var decoder = new TextDecoder;
|
|
328074
|
-
var MAX_INT32 = 2 ** 32;
|
|
328075
|
-
|
|
328076
|
-
// ../../node_modules/jose/dist/webapi/lib/base64.js
|
|
328077
|
-
function decodeBase64(encoded) {
|
|
328078
|
-
if (Uint8Array.fromBase64) {
|
|
328079
|
-
return Uint8Array.fromBase64(encoded);
|
|
328080
|
-
}
|
|
328081
|
-
const binary = atob(encoded);
|
|
328082
|
-
const bytes = new Uint8Array(binary.length);
|
|
328083
|
-
for (let i2 = 0;i2 < binary.length; i2++) {
|
|
328084
|
-
bytes[i2] = binary.charCodeAt(i2);
|
|
328085
|
-
}
|
|
328086
|
-
return bytes;
|
|
328087
|
-
}
|
|
328088
|
-
|
|
328089
|
-
// ../../node_modules/jose/dist/webapi/util/base64url.js
|
|
328090
|
-
function decode(input) {
|
|
328091
|
-
if (Uint8Array.fromBase64) {
|
|
328092
|
-
return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), {
|
|
328093
|
-
alphabet: "base64url"
|
|
328094
|
-
});
|
|
328095
|
-
}
|
|
328096
|
-
let encoded = input;
|
|
328097
|
-
if (encoded instanceof Uint8Array) {
|
|
328098
|
-
encoded = decoder.decode(encoded);
|
|
328099
|
-
}
|
|
328100
|
-
encoded = encoded.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
328101
|
-
try {
|
|
328102
|
-
return decodeBase64(encoded);
|
|
328103
|
-
} catch {
|
|
328104
|
-
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
328105
|
-
}
|
|
328106
|
-
}
|
|
328107
|
-
|
|
328108
|
-
// ../../node_modules/jose/dist/webapi/util/errors.js
|
|
328109
|
-
class JOSEError extends Error {
|
|
328110
|
-
static code = "ERR_JOSE_GENERIC";
|
|
328111
|
-
code = "ERR_JOSE_GENERIC";
|
|
328112
|
-
constructor(message, options) {
|
|
328113
|
-
super(message, options);
|
|
328114
|
-
this.name = this.constructor.name;
|
|
328115
|
-
Error.captureStackTrace?.(this, this.constructor);
|
|
328116
|
-
}
|
|
328117
|
-
}
|
|
328118
|
-
class JWTInvalid extends JOSEError {
|
|
328119
|
-
static code = "ERR_JWT_INVALID";
|
|
328120
|
-
code = "ERR_JWT_INVALID";
|
|
328121
|
-
}
|
|
328122
|
-
|
|
328123
|
-
// ../../node_modules/jose/dist/webapi/lib/is_object.js
|
|
328124
|
-
function isObjectLike(value2) {
|
|
328125
|
-
return typeof value2 === "object" && value2 !== null;
|
|
328126
|
-
}
|
|
328127
|
-
var is_object_default = (input) => {
|
|
328128
|
-
if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") {
|
|
328129
|
-
return false;
|
|
328130
|
-
}
|
|
328131
|
-
if (Object.getPrototypeOf(input) === null) {
|
|
328132
|
-
return true;
|
|
328133
|
-
}
|
|
328134
|
-
let proto = input;
|
|
328135
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
328136
|
-
proto = Object.getPrototypeOf(proto);
|
|
328137
|
-
}
|
|
328138
|
-
return Object.getPrototypeOf(input) === proto;
|
|
328139
|
-
};
|
|
328140
|
-
|
|
328141
|
-
// ../../node_modules/jose/dist/webapi/util/decode_jwt.js
|
|
328142
|
-
function decodeJwt(jwt2) {
|
|
328143
|
-
if (typeof jwt2 !== "string")
|
|
328144
|
-
throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
328145
|
-
const { 1: payload, length } = jwt2.split(".");
|
|
328146
|
-
if (length === 5)
|
|
328147
|
-
throw new JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");
|
|
328148
|
-
if (length !== 3)
|
|
328149
|
-
throw new JWTInvalid("Invalid JWT");
|
|
328150
|
-
if (!payload)
|
|
328151
|
-
throw new JWTInvalid("JWTs must contain a payload");
|
|
328152
|
-
let decoded;
|
|
328153
|
-
try {
|
|
328154
|
-
decoded = decode(payload);
|
|
328155
|
-
} catch {
|
|
328156
|
-
throw new JWTInvalid("Failed to base64url decode the payload");
|
|
328157
|
-
}
|
|
328158
|
-
let result2;
|
|
328159
|
-
try {
|
|
328160
|
-
result2 = JSON.parse(decoder.decode(decoded));
|
|
328161
|
-
} catch {
|
|
328162
|
-
throw new JWTInvalid("Failed to parse the decoded payload as JSON");
|
|
328163
|
-
}
|
|
328164
|
-
if (!is_object_default(result2))
|
|
328165
|
-
throw new JWTInvalid("Invalid JWT Claims Set");
|
|
328166
|
-
return result2;
|
|
328167
|
-
}
|
|
328168
328071
|
// ../../node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
328169
328072
|
function createScanner(text, ignoreTrivia = false) {
|
|
328170
328073
|
const len = text.length;
|
|
@@ -329240,9 +329143,6 @@ function applyEdits(text, edits) {
|
|
|
329240
329143
|
return text;
|
|
329241
329144
|
}
|
|
329242
329145
|
|
|
329243
|
-
// ../common/src/configuration/config-manager.ts
|
|
329244
|
-
var import_node_machine_id = __toESM(require_dist(), 1);
|
|
329245
|
-
|
|
329246
329146
|
// ../../node_modules/remeda/dist/chunk-D6FCK2GA.js
|
|
329247
329147
|
function u2(o, n2, a2) {
|
|
329248
329148
|
let t2 = (r2) => o(r2, ...n2);
|
|
@@ -345125,55 +345025,6 @@ var WebsiteTaskCreateEvent = exports_external2.object({
|
|
|
345125
345025
|
githubTemplateUrl: exports_external2.string().optional()
|
|
345126
345026
|
})
|
|
345127
345027
|
});
|
|
345128
|
-
// ../../node_modules/base58-js/base58_chars.js
|
|
345129
|
-
var base58_chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
345130
|
-
var base58_chars_default = base58_chars;
|
|
345131
|
-
|
|
345132
|
-
// ../../node_modules/base58-js/create_base58_map.js
|
|
345133
|
-
var create_base58_map = () => {
|
|
345134
|
-
const base58M = Array(256).fill(-1);
|
|
345135
|
-
for (let i3 = 0;i3 < base58_chars_default.length; ++i3)
|
|
345136
|
-
base58M[base58_chars_default.charCodeAt(i3)] = i3;
|
|
345137
|
-
return base58M;
|
|
345138
|
-
};
|
|
345139
|
-
var create_base58_map_default = create_base58_map;
|
|
345140
|
-
|
|
345141
|
-
// ../../node_modules/base58-js/binary_to_base58.js
|
|
345142
|
-
var base58Map = create_base58_map_default();
|
|
345143
|
-
function binary_to_base58(uint8array) {
|
|
345144
|
-
const result2 = [];
|
|
345145
|
-
for (const byte of uint8array) {
|
|
345146
|
-
let carry = byte;
|
|
345147
|
-
for (let j = 0;j < result2.length; ++j) {
|
|
345148
|
-
const x = (base58Map[result2[j]] << 8) + carry;
|
|
345149
|
-
result2[j] = base58_chars_default.charCodeAt(x % 58);
|
|
345150
|
-
carry = x / 58 | 0;
|
|
345151
|
-
}
|
|
345152
|
-
while (carry) {
|
|
345153
|
-
result2.push(base58_chars_default.charCodeAt(carry % 58));
|
|
345154
|
-
carry = carry / 58 | 0;
|
|
345155
|
-
}
|
|
345156
|
-
}
|
|
345157
|
-
for (const byte of uint8array)
|
|
345158
|
-
if (byte)
|
|
345159
|
-
break;
|
|
345160
|
-
else
|
|
345161
|
-
result2.push(49);
|
|
345162
|
-
result2.reverse();
|
|
345163
|
-
return String.fromCharCode(...result2);
|
|
345164
|
-
}
|
|
345165
|
-
var binary_to_base58_default = binary_to_base58;
|
|
345166
|
-
// ../common/src/store-id-utils.ts
|
|
345167
|
-
var StoreId = v4_default.object({
|
|
345168
|
-
sub: v4_default.string(),
|
|
345169
|
-
machineId: v4_default.string(),
|
|
345170
|
-
cwd: v4_default.string()
|
|
345171
|
-
});
|
|
345172
|
-
function encodeStoreId(storeId) {
|
|
345173
|
-
const encoded = new TextEncoder().encode(JSON.stringify(storeId));
|
|
345174
|
-
return binary_to_base58_default(encoded);
|
|
345175
|
-
}
|
|
345176
|
-
|
|
345177
345028
|
// ../common/src/vscode-webui-bridge/index.ts
|
|
345178
345029
|
var isPochiDev = process.env.POCHI_LOCAL_SERVER === "true";
|
|
345179
345030
|
var isSyncDev = process.env.POCHI_LOCAL_SYNC_SERVER === "true";
|
|
@@ -345385,29 +345236,17 @@ class PochiConfigManager {
|
|
|
345385
345236
|
get config() {
|
|
345386
345237
|
return this.cfg;
|
|
345387
345238
|
}
|
|
345388
|
-
getStoreId = async (cwd) => {
|
|
345389
|
-
const { credentials } = this.cfg.value?.vendors?.pochi || {};
|
|
345390
|
-
const { jwt: jwt2 = null } = credentials || {};
|
|
345391
|
-
const sub = (jwt2 ? decodeJwt(jwt2).sub : undefined) ?? "anonymous";
|
|
345392
|
-
return encodeStoreId({ sub, machineId: await import_node_machine_id.machineId(), cwd });
|
|
345393
|
-
};
|
|
345394
345239
|
}
|
|
345395
|
-
var {
|
|
345396
|
-
config: config2,
|
|
345397
|
-
updateConfig,
|
|
345398
|
-
getVendorConfig,
|
|
345399
|
-
updateVendorConfig,
|
|
345400
|
-
getStoreId
|
|
345401
|
-
} = new PochiConfigManager;
|
|
345240
|
+
var { config: config2, updateConfig, getVendorConfig, updateVendorConfig } = new PochiConfigManager;
|
|
345402
345241
|
// ../common/src/vendor/base.ts
|
|
345403
345242
|
class VendorBase {
|
|
345404
345243
|
vendorId;
|
|
345405
345244
|
constructor(vendorId) {
|
|
345406
345245
|
this.vendorId = vendorId;
|
|
345407
|
-
this.getCredentials = this.getCredentials.bind(this);
|
|
345408
|
-
this.getUserInfo = this.getUserInfo.bind(this);
|
|
345246
|
+
this.getCredentials = runExclusive.buildMethod(this.getCredentials).bind(this);
|
|
345247
|
+
this.getUserInfo = runExclusive.buildMethod(this.getUserInfo).bind(this);
|
|
345409
345248
|
}
|
|
345410
|
-
getCredentials =
|
|
345249
|
+
getCredentials = async () => {
|
|
345411
345250
|
const { credentials } = this.getVendorConfig();
|
|
345412
345251
|
const newCredentials = await this.renewCredentials(credentials);
|
|
345413
345252
|
if (credentials !== newCredentials) {
|
|
@@ -345416,8 +345255,8 @@ class VendorBase {
|
|
|
345416
345255
|
});
|
|
345417
345256
|
}
|
|
345418
345257
|
return newCredentials;
|
|
345419
|
-
}
|
|
345420
|
-
getUserInfo =
|
|
345258
|
+
};
|
|
345259
|
+
getUserInfo = async () => {
|
|
345421
345260
|
const { user } = this.getVendorConfig();
|
|
345422
345261
|
if (user)
|
|
345423
345262
|
return user;
|
|
@@ -345428,7 +345267,7 @@ class VendorBase {
|
|
|
345428
345267
|
credentials
|
|
345429
345268
|
});
|
|
345430
345269
|
return newUser;
|
|
345431
|
-
}
|
|
345270
|
+
};
|
|
345432
345271
|
logout() {
|
|
345433
345272
|
return updateVendorConfig(this.vendorId, null);
|
|
345434
345273
|
}
|
|
@@ -347121,6 +346960,103 @@ var hc = (baseUrl, options) => createProxy(function proxyCallback(opts) {
|
|
|
347121
346960
|
return req;
|
|
347122
346961
|
}, []);
|
|
347123
346962
|
|
|
346963
|
+
// ../../node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
346964
|
+
var encoder = new TextEncoder;
|
|
346965
|
+
var decoder = new TextDecoder;
|
|
346966
|
+
var MAX_INT32 = 2 ** 32;
|
|
346967
|
+
|
|
346968
|
+
// ../../node_modules/jose/dist/webapi/lib/base64.js
|
|
346969
|
+
function decodeBase64(encoded) {
|
|
346970
|
+
if (Uint8Array.fromBase64) {
|
|
346971
|
+
return Uint8Array.fromBase64(encoded);
|
|
346972
|
+
}
|
|
346973
|
+
const binary = atob(encoded);
|
|
346974
|
+
const bytes = new Uint8Array(binary.length);
|
|
346975
|
+
for (let i3 = 0;i3 < binary.length; i3++) {
|
|
346976
|
+
bytes[i3] = binary.charCodeAt(i3);
|
|
346977
|
+
}
|
|
346978
|
+
return bytes;
|
|
346979
|
+
}
|
|
346980
|
+
|
|
346981
|
+
// ../../node_modules/jose/dist/webapi/util/base64url.js
|
|
346982
|
+
function decode(input) {
|
|
346983
|
+
if (Uint8Array.fromBase64) {
|
|
346984
|
+
return Uint8Array.fromBase64(typeof input === "string" ? input : decoder.decode(input), {
|
|
346985
|
+
alphabet: "base64url"
|
|
346986
|
+
});
|
|
346987
|
+
}
|
|
346988
|
+
let encoded = input;
|
|
346989
|
+
if (encoded instanceof Uint8Array) {
|
|
346990
|
+
encoded = decoder.decode(encoded);
|
|
346991
|
+
}
|
|
346992
|
+
encoded = encoded.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
346993
|
+
try {
|
|
346994
|
+
return decodeBase64(encoded);
|
|
346995
|
+
} catch {
|
|
346996
|
+
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
346997
|
+
}
|
|
346998
|
+
}
|
|
346999
|
+
|
|
347000
|
+
// ../../node_modules/jose/dist/webapi/util/errors.js
|
|
347001
|
+
class JOSEError extends Error {
|
|
347002
|
+
static code = "ERR_JOSE_GENERIC";
|
|
347003
|
+
code = "ERR_JOSE_GENERIC";
|
|
347004
|
+
constructor(message, options) {
|
|
347005
|
+
super(message, options);
|
|
347006
|
+
this.name = this.constructor.name;
|
|
347007
|
+
Error.captureStackTrace?.(this, this.constructor);
|
|
347008
|
+
}
|
|
347009
|
+
}
|
|
347010
|
+
class JWTInvalid extends JOSEError {
|
|
347011
|
+
static code = "ERR_JWT_INVALID";
|
|
347012
|
+
code = "ERR_JWT_INVALID";
|
|
347013
|
+
}
|
|
347014
|
+
|
|
347015
|
+
// ../../node_modules/jose/dist/webapi/lib/is_object.js
|
|
347016
|
+
function isObjectLike(value2) {
|
|
347017
|
+
return typeof value2 === "object" && value2 !== null;
|
|
347018
|
+
}
|
|
347019
|
+
var is_object_default = (input) => {
|
|
347020
|
+
if (!isObjectLike(input) || Object.prototype.toString.call(input) !== "[object Object]") {
|
|
347021
|
+
return false;
|
|
347022
|
+
}
|
|
347023
|
+
if (Object.getPrototypeOf(input) === null) {
|
|
347024
|
+
return true;
|
|
347025
|
+
}
|
|
347026
|
+
let proto = input;
|
|
347027
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
347028
|
+
proto = Object.getPrototypeOf(proto);
|
|
347029
|
+
}
|
|
347030
|
+
return Object.getPrototypeOf(input) === proto;
|
|
347031
|
+
};
|
|
347032
|
+
|
|
347033
|
+
// ../../node_modules/jose/dist/webapi/util/decode_jwt.js
|
|
347034
|
+
function decodeJwt(jwt2) {
|
|
347035
|
+
if (typeof jwt2 !== "string")
|
|
347036
|
+
throw new JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
347037
|
+
const { 1: payload, length } = jwt2.split(".");
|
|
347038
|
+
if (length === 5)
|
|
347039
|
+
throw new JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");
|
|
347040
|
+
if (length !== 3)
|
|
347041
|
+
throw new JWTInvalid("Invalid JWT");
|
|
347042
|
+
if (!payload)
|
|
347043
|
+
throw new JWTInvalid("JWTs must contain a payload");
|
|
347044
|
+
let decoded;
|
|
347045
|
+
try {
|
|
347046
|
+
decoded = decode(payload);
|
|
347047
|
+
} catch {
|
|
347048
|
+
throw new JWTInvalid("Failed to base64url decode the payload");
|
|
347049
|
+
}
|
|
347050
|
+
let result2;
|
|
347051
|
+
try {
|
|
347052
|
+
result2 = JSON.parse(decoder.decode(decoded));
|
|
347053
|
+
} catch {
|
|
347054
|
+
throw new JWTInvalid("Failed to parse the decoded payload as JSON");
|
|
347055
|
+
}
|
|
347056
|
+
if (!is_object_default(result2))
|
|
347057
|
+
throw new JWTInvalid("Invalid JWT Claims Set");
|
|
347058
|
+
return result2;
|
|
347059
|
+
}
|
|
347124
347060
|
// ../vendor-pochi/src/credentials.ts
|
|
347125
347061
|
function getPochiCredentials() {
|
|
347126
347062
|
return config2.value.vendors?.pochi?.credentials;
|
|
@@ -347555,17 +347491,222 @@ class GeminiCli extends VendorBase {
|
|
|
347555
347491
|
// ../vendor-gemini-cli/src/node.ts
|
|
347556
347492
|
registerVendor(new GeminiCli);
|
|
347557
347493
|
|
|
347558
|
-
// ../vendor-claude-code/src/
|
|
347559
|
-
import * as
|
|
347560
|
-
import { stdin as input, stdout as output } from "node:process";
|
|
347561
|
-
import * as readline from "node:readline/promises";
|
|
347494
|
+
// ../vendor-claude-code/src/proxy.ts
|
|
347495
|
+
import * as http2 from "node:http";
|
|
347562
347496
|
|
|
347563
347497
|
// ../vendor-claude-code/src/types.ts
|
|
347564
347498
|
var VendorId4 = "claude-code";
|
|
347565
347499
|
var ClientId = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
347566
347500
|
|
|
347501
|
+
// ../vendor-claude-code/src/proxy.ts
|
|
347502
|
+
var logger4 = getLogger(`${VendorId4}-proxy`);
|
|
347503
|
+
var proxyInstance = null;
|
|
347504
|
+
async function startProxyServer(config3) {
|
|
347505
|
+
if (proxyInstance) {
|
|
347506
|
+
logger4.info("Proxy server already running on port", proxyInstance.port);
|
|
347507
|
+
return proxyInstance;
|
|
347508
|
+
}
|
|
347509
|
+
const port = config3.port || 54321;
|
|
347510
|
+
const host = config3.host || "127.0.0.1";
|
|
347511
|
+
return new Promise((resolve2, reject) => {
|
|
347512
|
+
const server = http2.createServer(async (req, res) => {
|
|
347513
|
+
try {
|
|
347514
|
+
await handleProxyRequest(req, res, config3);
|
|
347515
|
+
} catch (error40) {
|
|
347516
|
+
logger4.error("Proxy request failed:", error40);
|
|
347517
|
+
res.statusCode = 500;
|
|
347518
|
+
res.end(JSON.stringify({ error: "Proxy request failed" }));
|
|
347519
|
+
}
|
|
347520
|
+
});
|
|
347521
|
+
server.on("error", (error40) => {
|
|
347522
|
+
if (error40.code === "EADDRINUSE") {
|
|
347523
|
+
logger4.info(`Port ${port} is busy, trying ${port + 1}`);
|
|
347524
|
+
server.close();
|
|
347525
|
+
config3.port = port + 1;
|
|
347526
|
+
startProxyServer(config3).then(resolve2).catch(reject);
|
|
347527
|
+
} else {
|
|
347528
|
+
reject(error40);
|
|
347529
|
+
}
|
|
347530
|
+
});
|
|
347531
|
+
server.listen(port, host, () => {
|
|
347532
|
+
const address = server.address();
|
|
347533
|
+
const actualPort = typeof address === "object" && address ? address.port : port;
|
|
347534
|
+
const url2 = `http://${host}:${actualPort}`;
|
|
347535
|
+
logger4.info(`Claude Code proxy server started at ${url2}`);
|
|
347536
|
+
proxyInstance = {
|
|
347537
|
+
server,
|
|
347538
|
+
port: actualPort,
|
|
347539
|
+
url: url2
|
|
347540
|
+
};
|
|
347541
|
+
resolve2(proxyInstance);
|
|
347542
|
+
});
|
|
347543
|
+
});
|
|
347544
|
+
}
|
|
347545
|
+
function stopProxyServer() {
|
|
347546
|
+
if (proxyInstance) {
|
|
347547
|
+
proxyInstance.server.close();
|
|
347548
|
+
logger4.info("Claude Code proxy server stopped");
|
|
347549
|
+
proxyInstance = null;
|
|
347550
|
+
}
|
|
347551
|
+
}
|
|
347552
|
+
function getProxyUrl() {
|
|
347553
|
+
return proxyInstance?.url || null;
|
|
347554
|
+
}
|
|
347555
|
+
async function handleProxyRequest(req, res, config3) {
|
|
347556
|
+
setCorsHeaders(res);
|
|
347557
|
+
if (req.method === "OPTIONS") {
|
|
347558
|
+
res.statusCode = 204;
|
|
347559
|
+
res.end();
|
|
347560
|
+
return;
|
|
347561
|
+
}
|
|
347562
|
+
const credentials = await config3.getCredentials();
|
|
347563
|
+
if (!credentials) {
|
|
347564
|
+
res.statusCode = 401;
|
|
347565
|
+
res.end(JSON.stringify({ error: "No authentication credentials" }));
|
|
347566
|
+
return;
|
|
347567
|
+
}
|
|
347568
|
+
const targetUrl = new URL(req.url || "/", "https://api.anthropic.com");
|
|
347569
|
+
const headers = {};
|
|
347570
|
+
const excludeHeaders = new Set([
|
|
347571
|
+
"x-api-key",
|
|
347572
|
+
"origin",
|
|
347573
|
+
"referer",
|
|
347574
|
+
"sec-fetch-site",
|
|
347575
|
+
"sec-fetch-mode",
|
|
347576
|
+
"sec-fetch-dest",
|
|
347577
|
+
"sec-ch-ua",
|
|
347578
|
+
"sec-ch-ua-mobile",
|
|
347579
|
+
"sec-ch-ua-platform",
|
|
347580
|
+
"anthropic-dangerous-direct-browser-access"
|
|
347581
|
+
]);
|
|
347582
|
+
for (const [key, value2] of Object.entries(req.headers)) {
|
|
347583
|
+
if (!excludeHeaders.has(key.toLowerCase()) && typeof value2 === "string") {
|
|
347584
|
+
headers[key] = value2;
|
|
347585
|
+
}
|
|
347586
|
+
}
|
|
347587
|
+
headers.host = "api.anthropic.com";
|
|
347588
|
+
headers.authorization = `Bearer ${credentials.accessToken}`;
|
|
347589
|
+
headers["anthropic-beta"] = "oauth-2025-04-20,claude-code-20250219,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14";
|
|
347590
|
+
headers["anthropic-version"] = "2023-06-01";
|
|
347591
|
+
const body = await collectRequestBody(req);
|
|
347592
|
+
logger4.debug(`Proxying ${req.method} request to ${targetUrl.toString()}`);
|
|
347593
|
+
try {
|
|
347594
|
+
const response = await fetch(targetUrl.toString(), {
|
|
347595
|
+
method: req.method,
|
|
347596
|
+
headers,
|
|
347597
|
+
body: body || undefined
|
|
347598
|
+
});
|
|
347599
|
+
res.statusCode = response.status;
|
|
347600
|
+
const responseHeaders = {};
|
|
347601
|
+
response.headers.forEach((value2, key) => {
|
|
347602
|
+
if (!["content-encoding", "content-length", "transfer-encoding"].includes(key.toLowerCase())) {
|
|
347603
|
+
responseHeaders[key] = value2;
|
|
347604
|
+
}
|
|
347605
|
+
});
|
|
347606
|
+
setCorsHeaders(res, responseHeaders);
|
|
347607
|
+
if (response.headers.get("content-type")?.includes("text/event-stream")) {
|
|
347608
|
+
res.setHeader("content-type", "text/event-stream");
|
|
347609
|
+
res.setHeader("cache-control", "no-cache");
|
|
347610
|
+
res.setHeader("connection", "keep-alive");
|
|
347611
|
+
const reader = response.body?.getReader();
|
|
347612
|
+
if (reader) {
|
|
347613
|
+
const decoder2 = new TextDecoder;
|
|
347614
|
+
try {
|
|
347615
|
+
while (true) {
|
|
347616
|
+
const { done, value: value2 } = await reader.read();
|
|
347617
|
+
if (done)
|
|
347618
|
+
break;
|
|
347619
|
+
const chunk = decoder2.decode(value2, { stream: true });
|
|
347620
|
+
res.write(chunk);
|
|
347621
|
+
}
|
|
347622
|
+
} finally {
|
|
347623
|
+
reader.releaseLock();
|
|
347624
|
+
}
|
|
347625
|
+
}
|
|
347626
|
+
res.end();
|
|
347627
|
+
} else {
|
|
347628
|
+
const responseBody = await response.text();
|
|
347629
|
+
res.end(responseBody);
|
|
347630
|
+
}
|
|
347631
|
+
} catch (error40) {
|
|
347632
|
+
logger4.error("Failed to proxy request:", error40);
|
|
347633
|
+
res.statusCode = 502;
|
|
347634
|
+
res.end(JSON.stringify({ error: "Failed to proxy request" }));
|
|
347635
|
+
}
|
|
347636
|
+
}
|
|
347637
|
+
function setCorsHeaders(res, additionalHeaders) {
|
|
347638
|
+
const headers = {
|
|
347639
|
+
"Access-Control-Allow-Origin": "*",
|
|
347640
|
+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS, PATCH",
|
|
347641
|
+
"Access-Control-Allow-Headers": "Content-Type, Authorization, anthropic-version, anthropic-beta, x-api-key",
|
|
347642
|
+
"Access-Control-Max-Age": "86400",
|
|
347643
|
+
...additionalHeaders
|
|
347644
|
+
};
|
|
347645
|
+
for (const [key, value2] of Object.entries(headers)) {
|
|
347646
|
+
res.setHeader(key, value2);
|
|
347647
|
+
}
|
|
347648
|
+
}
|
|
347649
|
+
async function collectRequestBody(req) {
|
|
347650
|
+
return new Promise((resolve2) => {
|
|
347651
|
+
const chunks = [];
|
|
347652
|
+
req.on("data", (chunk) => {
|
|
347653
|
+
chunks.push(chunk);
|
|
347654
|
+
});
|
|
347655
|
+
req.on("end", () => {
|
|
347656
|
+
if (chunks.length === 0) {
|
|
347657
|
+
resolve2(null);
|
|
347658
|
+
} else {
|
|
347659
|
+
resolve2(Buffer.concat(chunks).toString());
|
|
347660
|
+
}
|
|
347661
|
+
});
|
|
347662
|
+
req.on("error", () => {
|
|
347663
|
+
resolve2(null);
|
|
347664
|
+
});
|
|
347665
|
+
});
|
|
347666
|
+
}
|
|
347667
|
+
var proxyStarted = false;
|
|
347668
|
+
async function initializeProxy() {
|
|
347669
|
+
if (proxyStarted) {
|
|
347670
|
+
const existingUrl = getProxyUrl();
|
|
347671
|
+
if (existingUrl) {
|
|
347672
|
+
logger4.info("Proxy already running at", existingUrl);
|
|
347673
|
+
return existingUrl;
|
|
347674
|
+
}
|
|
347675
|
+
}
|
|
347676
|
+
try {
|
|
347677
|
+
const proxy = await startProxyServer({
|
|
347678
|
+
port: 54321,
|
|
347679
|
+
getCredentials: async () => {
|
|
347680
|
+
const vendor2 = getVendor("claude-code");
|
|
347681
|
+
const creds = await vendor2.getCredentials();
|
|
347682
|
+
return creds;
|
|
347683
|
+
}
|
|
347684
|
+
});
|
|
347685
|
+
proxyStarted = true;
|
|
347686
|
+
process.env.CLAUDE_CODE_PROXY_URL = proxy.url;
|
|
347687
|
+
logger4.info(`Claude Code proxy auto-started at ${proxy.url}`);
|
|
347688
|
+
const cleanup = () => {
|
|
347689
|
+
if (proxyStarted) {
|
|
347690
|
+
stopProxyServer();
|
|
347691
|
+
proxyStarted = false;
|
|
347692
|
+
logger4.info("Claude Code proxy stopped");
|
|
347693
|
+
}
|
|
347694
|
+
};
|
|
347695
|
+
process.on("exit", cleanup);
|
|
347696
|
+
process.on("SIGINT", cleanup);
|
|
347697
|
+
process.on("SIGTERM", cleanup);
|
|
347698
|
+
return proxy.url;
|
|
347699
|
+
} catch (error40) {
|
|
347700
|
+
logger4.error("Failed to auto-start Claude Code proxy:", error40);
|
|
347701
|
+
throw error40;
|
|
347702
|
+
}
|
|
347703
|
+
}
|
|
347704
|
+
|
|
347567
347705
|
// ../vendor-claude-code/src/auth.ts
|
|
347568
|
-
|
|
347706
|
+
import * as crypto3 from "node:crypto";
|
|
347707
|
+
import { stdin as input, stdout as output } from "node:process";
|
|
347708
|
+
import * as readline from "node:readline/promises";
|
|
347709
|
+
var logger5 = getLogger(VendorId4);
|
|
347569
347710
|
async function startOAuthFlow2() {
|
|
347570
347711
|
const pkce = generatePKCEParams2();
|
|
347571
347712
|
const redirectUri = "https://console.anthropic.com/oauth/code/callback";
|
|
@@ -347618,10 +347759,10 @@ async function exchangeCodeForTokens2(code, verifier, redirectUri) {
|
|
|
347618
347759
|
code_verifier: verifier
|
|
347619
347760
|
})
|
|
347620
347761
|
});
|
|
347621
|
-
|
|
347762
|
+
logger5.debug("Token exchange response status:", response.ok);
|
|
347622
347763
|
if (!response.ok) {
|
|
347623
347764
|
const errorText = await response.text();
|
|
347624
|
-
|
|
347765
|
+
logger5.error("Token exchange failed:", errorText);
|
|
347625
347766
|
throw new Error(`Token exchange failed: ${response.status} ${response.statusText}`);
|
|
347626
347767
|
}
|
|
347627
347768
|
const tokenData = await response.json();
|
|
@@ -347647,7 +347788,7 @@ async function renewCredentials2(credentials) {
|
|
|
347647
347788
|
client_id: ClientId
|
|
347648
347789
|
})
|
|
347649
347790
|
});
|
|
347650
|
-
|
|
347791
|
+
logger5.debug("Token refresh response status:", response.ok);
|
|
347651
347792
|
if (!response.ok) {
|
|
347652
347793
|
throw new Error(`Token refresh failed: ${response.status} ${response.statusText}`);
|
|
347653
347794
|
}
|
|
@@ -347658,7 +347799,7 @@ async function renewCredentials2(credentials) {
|
|
|
347658
347799
|
expiresAt: Date.now() + tokenData.expires_in * 1000
|
|
347659
347800
|
};
|
|
347660
347801
|
} catch (error40) {
|
|
347661
|
-
|
|
347802
|
+
logger5.error("Failed to refresh Claude Code token:", error40);
|
|
347662
347803
|
return;
|
|
347663
347804
|
}
|
|
347664
347805
|
}
|
|
@@ -347676,9 +347817,33 @@ function generatePKCEParams2() {
|
|
|
347676
347817
|
|
|
347677
347818
|
// ../vendor-claude-code/src/vendor.ts
|
|
347678
347819
|
class ClaudeCode extends VendorBase {
|
|
347820
|
+
proxyStarted = false;
|
|
347679
347821
|
constructor() {
|
|
347680
347822
|
super(VendorId4);
|
|
347681
347823
|
}
|
|
347824
|
+
async initializeProxy(getCredentials, port) {
|
|
347825
|
+
if (this.proxyStarted) {
|
|
347826
|
+
const url2 = getProxyUrl();
|
|
347827
|
+
if (url2) {
|
|
347828
|
+
return url2;
|
|
347829
|
+
}
|
|
347830
|
+
}
|
|
347831
|
+
const proxy = await startProxyServer({
|
|
347832
|
+
port,
|
|
347833
|
+
getCredentials
|
|
347834
|
+
});
|
|
347835
|
+
this.proxyStarted = true;
|
|
347836
|
+
return proxy.url;
|
|
347837
|
+
}
|
|
347838
|
+
stopProxy() {
|
|
347839
|
+
if (this.proxyStarted) {
|
|
347840
|
+
stopProxyServer();
|
|
347841
|
+
this.proxyStarted = false;
|
|
347842
|
+
}
|
|
347843
|
+
}
|
|
347844
|
+
getProxyUrl() {
|
|
347845
|
+
return getProxyUrl();
|
|
347846
|
+
}
|
|
347682
347847
|
authenticate() {
|
|
347683
347848
|
return startOAuthFlow2();
|
|
347684
347849
|
}
|
|
@@ -347703,7 +347868,27 @@ class ClaudeCode extends VendorBase {
|
|
|
347703
347868
|
}
|
|
347704
347869
|
|
|
347705
347870
|
// ../vendor-claude-code/src/node.ts
|
|
347871
|
+
var logger6 = getLogger(`${VendorId4}-node`);
|
|
347872
|
+
var isVSCodeEnvironment2 = () => {
|
|
347873
|
+
if (typeof process !== "undefined") {
|
|
347874
|
+
if (process.env.VSCODE_PID) {
|
|
347875
|
+
return true;
|
|
347876
|
+
}
|
|
347877
|
+
if (process.env.VSCODE_SERVER_PORT) {
|
|
347878
|
+
return true;
|
|
347879
|
+
}
|
|
347880
|
+
if (process.env.VSCODE_CWD) {
|
|
347881
|
+
return true;
|
|
347882
|
+
}
|
|
347883
|
+
}
|
|
347884
|
+
return false;
|
|
347885
|
+
};
|
|
347706
347886
|
registerVendor(new ClaudeCode);
|
|
347887
|
+
if (isVSCodeEnvironment2()) {
|
|
347888
|
+
initializeProxy().catch((error40) => {
|
|
347889
|
+
logger6.error("Proxy initialization error:", error40);
|
|
347890
|
+
});
|
|
347891
|
+
}
|
|
347707
347892
|
|
|
347708
347893
|
// ../common/src/vendor/edge.ts
|
|
347709
347894
|
var { register: register2, get: get2 } = createRegistry();
|
|
@@ -351718,13 +351903,22 @@ function createAnthropic(options = {}) {
|
|
|
351718
351903
|
var anthropic = createAnthropic();
|
|
351719
351904
|
|
|
351720
351905
|
// ../vendor-claude-code/src/model.ts
|
|
351721
|
-
|
|
351722
|
-
|
|
351723
|
-
|
|
351724
|
-
|
|
351725
|
-
|
|
351906
|
+
var ClaudeCodeSystemPrompt = "You are Claude Code, Anthropic's official CLI for Claude.";
|
|
351907
|
+
var AnthropicHeaders = {
|
|
351908
|
+
beta: "oauth-2025-04-20,claude-code-20250219,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14",
|
|
351909
|
+
version: "2023-06-01"
|
|
351910
|
+
};
|
|
351911
|
+
function addAnthropicHeaders(headers, credentials) {
|
|
351912
|
+
if (credentials) {
|
|
351913
|
+
headers.set("authorization", `Bearer ${credentials.accessToken}`);
|
|
351914
|
+
}
|
|
351915
|
+
headers.set("anthropic-beta", AnthropicHeaders.beta);
|
|
351916
|
+
headers.set("anthropic-version", AnthropicHeaders.version);
|
|
351917
|
+
headers.delete("x-api-key");
|
|
351918
|
+
}
|
|
351919
|
+
function createClaudeCodeModelBase(modelId, baseURL, customFetch) {
|
|
351726
351920
|
const anthropic2 = createAnthropic({
|
|
351727
|
-
baseURL
|
|
351921
|
+
baseURL,
|
|
351728
351922
|
apiKey: "oauth-token",
|
|
351729
351923
|
fetch: customFetch
|
|
351730
351924
|
});
|
|
@@ -351737,7 +351931,7 @@ function createClaudeCodeModel({
|
|
|
351737
351931
|
params.prompt = [
|
|
351738
351932
|
{
|
|
351739
351933
|
role: "system",
|
|
351740
|
-
content:
|
|
351934
|
+
content: ClaudeCodeSystemPrompt
|
|
351741
351935
|
},
|
|
351742
351936
|
...params.prompt
|
|
351743
351937
|
];
|
|
@@ -351753,20 +351947,55 @@ function createPatchedFetch2(getCredentials) {
|
|
|
351753
351947
|
return async (input2, init) => {
|
|
351754
351948
|
const credentials = await getCredentials();
|
|
351755
351949
|
const headers = new Headers(init?.headers);
|
|
351756
|
-
headers
|
|
351757
|
-
|
|
351758
|
-
headers.set("anthropic-version", "2023-06-01");
|
|
351759
|
-
headers.delete("x-api-key");
|
|
351760
|
-
const patchedInit = {
|
|
351761
|
-
...init,
|
|
351762
|
-
headers
|
|
351763
|
-
};
|
|
351764
|
-
return fetch(input2, patchedInit);
|
|
351950
|
+
addAnthropicHeaders(headers, credentials);
|
|
351951
|
+
return fetch(input2, { ...init, headers });
|
|
351765
351952
|
};
|
|
351766
351953
|
}
|
|
351954
|
+
function createProxyFetch(getCredentials, proxyUrl) {
|
|
351955
|
+
return async (input2, init) => {
|
|
351956
|
+
const url2 = convertToProxyUrl(input2, proxyUrl);
|
|
351957
|
+
const credentials = await getCredentials();
|
|
351958
|
+
const headers = new Headers(init?.headers);
|
|
351959
|
+
addAnthropicHeaders(headers, credentials);
|
|
351960
|
+
headers.delete("origin");
|
|
351961
|
+
headers.delete("referer");
|
|
351962
|
+
return fetch(url2, { ...init, headers });
|
|
351963
|
+
};
|
|
351964
|
+
}
|
|
351965
|
+
function convertToProxyUrl(input2, proxyUrl) {
|
|
351966
|
+
if (typeof input2 === "string") {
|
|
351967
|
+
if (input2.startsWith("https://api.anthropic.com")) {
|
|
351968
|
+
return input2.replace("https://api.anthropic.com", proxyUrl);
|
|
351969
|
+
}
|
|
351970
|
+
if (input2.startsWith("/")) {
|
|
351971
|
+
return `${proxyUrl}${input2}`;
|
|
351972
|
+
}
|
|
351973
|
+
return input2;
|
|
351974
|
+
}
|
|
351975
|
+
if (input2 instanceof URL) {
|
|
351976
|
+
return input2.toString().replace("https://api.anthropic.com", proxyUrl);
|
|
351977
|
+
}
|
|
351978
|
+
return input2.url.replace("https://api.anthropic.com", proxyUrl);
|
|
351979
|
+
}
|
|
351980
|
+
function createClaudeCodeModel({
|
|
351981
|
+
modelId,
|
|
351982
|
+
getCredentials
|
|
351983
|
+
}) {
|
|
351984
|
+
const customFetch = createPatchedFetch2(getCredentials);
|
|
351985
|
+
return createClaudeCodeModelBase(modelId, "https://api.anthropic.com/v1", customFetch);
|
|
351986
|
+
}
|
|
351987
|
+
function createEdgeClaudeCodeModel({
|
|
351988
|
+
modelId,
|
|
351989
|
+
getCredentials
|
|
351990
|
+
}) {
|
|
351991
|
+
const PROXY_URL = process.env.CLAUDE_CODE_PROXY_URL || "http://localhost:54321";
|
|
351992
|
+
const customFetch = createProxyFetch(getCredentials, PROXY_URL);
|
|
351993
|
+
return createClaudeCodeModelBase(modelId, `${PROXY_URL}/v1`, customFetch);
|
|
351994
|
+
}
|
|
351767
351995
|
|
|
351768
351996
|
// ../vendor-claude-code/src/edge.ts
|
|
351769
|
-
|
|
351997
|
+
var modelCreator = "window" in globalThis ? createEdgeClaudeCodeModel : createClaudeCodeModel;
|
|
351998
|
+
registerModel(VendorId4, modelCreator);
|
|
351770
351999
|
|
|
351771
352000
|
// ../../node_modules/@commander-js/extra-typings/esm.mjs
|
|
351772
352001
|
var import__4 = __toESM(require_extra_typings(), 1);
|
|
@@ -351791,8 +352020,8 @@ var getVendors2 = getAll2;
|
|
|
351791
352020
|
// ../common/src/vendor/edge.ts
|
|
351792
352021
|
var { register: register4, get: get4 } = createRegistry();
|
|
351793
352022
|
function createModel(vendorId, opts) {
|
|
351794
|
-
const
|
|
351795
|
-
return
|
|
352023
|
+
const modelCreator2 = get4(vendorId);
|
|
352024
|
+
return modelCreator2(opts);
|
|
351796
352025
|
}
|
|
351797
352026
|
|
|
351798
352027
|
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
@@ -352296,7 +352525,7 @@ var {
|
|
|
352296
352525
|
// package.json
|
|
352297
352526
|
var package_default = {
|
|
352298
352527
|
name: "@getpochi/cli",
|
|
352299
|
-
version: "0.5.
|
|
352528
|
+
version: "0.5.29",
|
|
352300
352529
|
type: "module",
|
|
352301
352530
|
bin: {
|
|
352302
352531
|
pochi: "src/cli.ts"
|
|
@@ -352329,6 +352558,8 @@ var package_default = {
|
|
|
352329
352558
|
ai: "catalog:",
|
|
352330
352559
|
chalk: "^5.3.0",
|
|
352331
352560
|
commander: "^14.0.0",
|
|
352561
|
+
jose: "catalog:",
|
|
352562
|
+
"node-machine-id": "catalog:",
|
|
352332
352563
|
listr2: "^9.0.3",
|
|
352333
352564
|
ora: "^8.2.0",
|
|
352334
352565
|
semver: "^7.6.3",
|
|
@@ -353773,9 +354004,9 @@ var MaxTerminalOutputSize = 30000;
|
|
|
353773
354004
|
|
|
353774
354005
|
// ../common/src/tool-utils/ripgrep.ts
|
|
353775
354006
|
var execAsync = promisify(exec2);
|
|
353776
|
-
var
|
|
354007
|
+
var logger7 = getLogger("RipgrepUtils");
|
|
353777
354008
|
async function searchFilesWithRipgrep(path3, regex, rgPath, workspacePath, filePattern, abortSignal) {
|
|
353778
|
-
|
|
354009
|
+
logger7.debug("searchFiles", path3, regex, filePattern);
|
|
353779
354010
|
const matches = [];
|
|
353780
354011
|
let command = `"${rgPath.replace(/"/g, "\\\"")}" --json --case-sensitive --binary --sortr modified `;
|
|
353781
354012
|
if (filePattern) {
|
|
@@ -353783,14 +354014,14 @@ async function searchFilesWithRipgrep(path3, regex, rgPath, workspacePath, fileP
|
|
|
353783
354014
|
}
|
|
353784
354015
|
const absPath = resolve3(workspacePath, path3.replace(/'/g, "'\\''"));
|
|
353785
354016
|
command += `'${regex.replace(/'/g, "'\\''")}' '${absPath}'`;
|
|
353786
|
-
|
|
354017
|
+
logger7.debug("command", command);
|
|
353787
354018
|
try {
|
|
353788
354019
|
const { stdout, stderr } = await execAsync(command, {
|
|
353789
354020
|
maxBuffer: 1024 * 1024 * 10,
|
|
353790
354021
|
signal: abortSignal
|
|
353791
354022
|
});
|
|
353792
354023
|
if (stderr) {
|
|
353793
|
-
|
|
354024
|
+
logger7.warn("rg command stderr: ", stderr.slice(0, 1000));
|
|
353794
354025
|
}
|
|
353795
354026
|
const outputLines = stdout.trim().split(`
|
|
353796
354027
|
`);
|
|
@@ -353806,25 +354037,25 @@ async function searchFilesWithRipgrep(path3, regex, rgPath, workspacePath, fileP
|
|
|
353806
354037
|
});
|
|
353807
354038
|
}
|
|
353808
354039
|
} catch (parseError) {
|
|
353809
|
-
|
|
354040
|
+
logger7.error(`Failed to parse rg JSON output line: ${line}`, parseError);
|
|
353810
354041
|
}
|
|
353811
354042
|
}
|
|
353812
354043
|
} catch (error40) {
|
|
353813
354044
|
if (!error40) {
|
|
353814
|
-
|
|
354045
|
+
logger7.error("rg command error: ", error40);
|
|
353815
354046
|
throw error40;
|
|
353816
354047
|
}
|
|
353817
354048
|
if (error40.code && error40.code > 1) {
|
|
353818
354049
|
throw new Error(`rg command failed with code ${error40.code}: ${error40.stderr || error40.message}`);
|
|
353819
354050
|
}
|
|
353820
354051
|
if (!error40.code && error40.stderr) {
|
|
353821
|
-
|
|
354052
|
+
logger7.warn(`rg command stderr (exit code 0): ${error40.stderr}`);
|
|
353822
354053
|
} else if (error40.code === 1 && !error40.stdout && !error40.stderr) {} else if (error40.code === 1 && error40.stdout) {
|
|
353823
354054
|
if (error40.stderr) {
|
|
353824
|
-
|
|
354055
|
+
logger7.warn(`rg command stderr (exit code 1): ${error40.stderr}`);
|
|
353825
354056
|
}
|
|
353826
354057
|
} else {
|
|
353827
|
-
|
|
354058
|
+
logger7.error("Error executing rg command: ", error40);
|
|
353828
354059
|
throw error40;
|
|
353829
354060
|
}
|
|
353830
354061
|
}
|
|
@@ -353837,7 +354068,7 @@ async function searchFilesWithRipgrep(path3, regex, rgPath, workspacePath, fileP
|
|
|
353837
354068
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
353838
354069
|
import * as fs3 from "node:fs/promises";
|
|
353839
354070
|
import * as path3 from "node:path";
|
|
353840
|
-
var
|
|
354071
|
+
var logger8 = getLogger("ignoreWalk");
|
|
353841
354072
|
var MaxScanItems = 1e4;
|
|
353842
354073
|
async function attemptLoadIgnoreFromPath(directoryPath) {
|
|
353843
354074
|
try {
|
|
@@ -353883,9 +354114,9 @@ async function ignoreWalk({
|
|
|
353883
354114
|
const scannedFileResults = [];
|
|
353884
354115
|
const processedDirs = new Set;
|
|
353885
354116
|
const queue = [{ uri: dir, ignore: import_ignore.default().add(".git") }];
|
|
353886
|
-
|
|
354117
|
+
logger8.trace(`Starting traversal from ${dir} with limit ${MaxScanItems}, recursive: ${recursive}`);
|
|
353887
354118
|
if (abortSignal?.aborted) {
|
|
353888
|
-
|
|
354119
|
+
logger8.debug("Traversal aborted before starting.");
|
|
353889
354120
|
return [];
|
|
353890
354121
|
}
|
|
353891
354122
|
let fileScannedCount = 0;
|
|
@@ -353904,23 +354135,23 @@ async function ignoreWalk({
|
|
|
353904
354135
|
const entries = await fs3.readdir(currentFsPath, { withFileTypes: true });
|
|
353905
354136
|
for (const entry of entries) {
|
|
353906
354137
|
if (abortSignal?.aborted) {
|
|
353907
|
-
|
|
354138
|
+
logger8.debug("Traversal aborted during directory processing.");
|
|
353908
354139
|
break;
|
|
353909
354140
|
}
|
|
353910
354141
|
const maxItemsReached = await processDirectoryEntry(entry, currentFsPath, dir, directoryIg, recursive, processedDirs, queue, scannedFileResults);
|
|
353911
354142
|
fileScannedCount++;
|
|
353912
354143
|
if (maxItemsReached || fileScannedCount >= MaxScanItems) {
|
|
353913
|
-
|
|
354144
|
+
logger8.debug(`MaxScanItems (${MaxScanItems}) reached or exceeded. Halting traversal.`);
|
|
353914
354145
|
queue.length = 0;
|
|
353915
354146
|
break;
|
|
353916
354147
|
}
|
|
353917
354148
|
}
|
|
353918
354149
|
} catch (error40) {
|
|
353919
354150
|
const message = error40 instanceof Error ? error40.message : String(error40);
|
|
353920
|
-
|
|
354151
|
+
logger8.warn(`Error reading directory ${currentFsPath}: ${message}`);
|
|
353921
354152
|
}
|
|
353922
354153
|
}
|
|
353923
|
-
|
|
354154
|
+
logger8.trace(`Completed traversal. Found ${scannedFileResults.length} items. Processed approximately ${fileScannedCount} entries.`);
|
|
353924
354155
|
return scannedFileResults;
|
|
353925
354156
|
}
|
|
353926
354157
|
// ../common/src/tool-utils/fs.ts
|
|
@@ -354024,10 +354255,10 @@ async function isFileExists(filePath) {
|
|
|
354024
354255
|
}
|
|
354025
354256
|
// ../common/src/tool-utils/list-files.ts
|
|
354026
354257
|
import path5 from "node:path";
|
|
354027
|
-
var
|
|
354258
|
+
var logger9 = getLogger("listFiles");
|
|
354028
354259
|
async function listFiles2(options) {
|
|
354029
354260
|
const { cwd, path: dirPath, recursive, abortSignal } = options;
|
|
354030
|
-
|
|
354261
|
+
logger9.debug("handling listFile with dirPath", dirPath, "and recursive", recursive);
|
|
354031
354262
|
const dir = resolvePath(dirPath, cwd);
|
|
354032
354263
|
if (!path5.isAbsolute(dirPath)) {
|
|
354033
354264
|
validateRelativePath(dirPath);
|
|
@@ -354044,7 +354275,7 @@ async function listFiles2(options) {
|
|
|
354044
354275
|
return { files, isTruncated };
|
|
354045
354276
|
} catch (error40) {
|
|
354046
354277
|
const errorMessage = error40 instanceof Error ? error40.message : String(error40);
|
|
354047
|
-
|
|
354278
|
+
logger9.error("Error listing files:", errorMessage);
|
|
354048
354279
|
throw new Error(`Failed to list files: ${errorMessage}`);
|
|
354049
354280
|
}
|
|
354050
354281
|
}
|
|
@@ -354055,7 +354286,7 @@ async function listWorkspaceFiles(options) {
|
|
|
354055
354286
|
abortSignal,
|
|
354056
354287
|
maxItems = MaxListFileItems
|
|
354057
354288
|
} = options;
|
|
354058
|
-
|
|
354289
|
+
logger9.debug("Listing workspace files from", cwd, "with maxItems", maxItems);
|
|
354059
354290
|
try {
|
|
354060
354291
|
const results = await ignoreWalk({
|
|
354061
354292
|
dir: cwd,
|
|
@@ -354068,16 +354299,16 @@ async function listWorkspaceFiles(options) {
|
|
|
354068
354299
|
});
|
|
354069
354300
|
return { files, isTruncated };
|
|
354070
354301
|
} catch (error40) {
|
|
354071
|
-
|
|
354302
|
+
logger9.warn("Failed to list workspace files:", error40);
|
|
354072
354303
|
return { files: [], isTruncated: false };
|
|
354073
354304
|
}
|
|
354074
354305
|
}
|
|
354075
354306
|
// ../common/src/tool-utils/glob-files.ts
|
|
354076
354307
|
import * as path6 from "node:path";
|
|
354077
|
-
var
|
|
354308
|
+
var logger10 = getLogger("globFiles");
|
|
354078
354309
|
async function globFiles2(options) {
|
|
354079
354310
|
const { cwd, path: searchPath, globPattern, abortSignal } = options;
|
|
354080
|
-
|
|
354311
|
+
logger10.debug("handling globFiles with searchPath:", searchPath, "and pattern", globPattern);
|
|
354081
354312
|
const dir = resolvePath(searchPath, cwd);
|
|
354082
354313
|
if (!path6.isAbsolute(searchPath)) {
|
|
354083
354314
|
validateRelativePath(searchPath);
|
|
@@ -354103,8 +354334,8 @@ async function globFiles2(options) {
|
|
|
354103
354334
|
const errorMessage = error40 instanceof Error ? error40.message : String(error40);
|
|
354104
354335
|
throw new Error(`Failed to glob files: ${errorMessage}`);
|
|
354105
354336
|
}
|
|
354106
|
-
|
|
354107
|
-
|
|
354337
|
+
logger10.debug(`Found ${files.length} files matching pattern ${globPattern}`);
|
|
354338
|
+
logger10.trace("Files found in globFiles:", files);
|
|
354108
354339
|
return { files, isTruncated };
|
|
354109
354340
|
}
|
|
354110
354341
|
// ../common/src/tool-utils/system-info.ts
|
|
@@ -354200,7 +354431,7 @@ function parseGitOriginUrl(originUrl) {
|
|
|
354200
354431
|
}
|
|
354201
354432
|
|
|
354202
354433
|
// ../common/src/tool-utils/git-status.ts
|
|
354203
|
-
var
|
|
354434
|
+
var logger11 = getLogger("GitStatus");
|
|
354204
354435
|
|
|
354205
354436
|
class GitStatusReader {
|
|
354206
354437
|
execPromise = promisify2(exec3);
|
|
@@ -354307,16 +354538,16 @@ class GitStatusReader {
|
|
|
354307
354538
|
}
|
|
354308
354539
|
async readGitStatus() {
|
|
354309
354540
|
if (!this.cwd) {
|
|
354310
|
-
|
|
354541
|
+
logger11.warn("No Git repository path specified");
|
|
354311
354542
|
return;
|
|
354312
354543
|
}
|
|
354313
354544
|
try {
|
|
354314
|
-
|
|
354545
|
+
logger11.trace("Reading Git status for repository", {
|
|
354315
354546
|
path: this.cwd
|
|
354316
354547
|
});
|
|
354317
354548
|
return await this.readGitStatusImpl();
|
|
354318
354549
|
} catch (error40) {
|
|
354319
|
-
|
|
354550
|
+
logger11.error("Error reading Git status", error40);
|
|
354320
354551
|
return;
|
|
354321
354552
|
}
|
|
354322
354553
|
}
|
|
@@ -363916,7 +364147,7 @@ function remarkFrontmatter(options) {
|
|
|
363916
364147
|
toMarkdownExtensions.push(frontmatterToMarkdown(settings));
|
|
363917
364148
|
}
|
|
363918
364149
|
// ../../node_modules/vfile-matter/lib/index.js
|
|
363919
|
-
var import_yaml = __toESM(
|
|
364150
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
363920
364151
|
var regex = /^---(?:\r?\n|\r)(?:([\s\S]*?)(?:\r?\n|\r))?---(?:\r?\n|\r|$)/;
|
|
363921
364152
|
var emptyOptions3 = {};
|
|
363922
364153
|
var emptyYamlOptions = {};
|
|
@@ -363955,7 +364186,7 @@ async function parseAgentFile(content3) {
|
|
|
363955
364186
|
}
|
|
363956
364187
|
}
|
|
363957
364188
|
// src/lib/load-agents.ts
|
|
363958
|
-
var
|
|
364189
|
+
var logger12 = getLogger("CustomAgentManager");
|
|
363959
364190
|
async function readAgentsFromDir(dir) {
|
|
363960
364191
|
const agents = [];
|
|
363961
364192
|
try {
|
|
@@ -363973,12 +364204,12 @@ async function readAgentsFromDir(dir) {
|
|
|
363973
364204
|
agents.push({ ...agent, filePath });
|
|
363974
364205
|
}
|
|
363975
364206
|
} catch (error40) {
|
|
363976
|
-
|
|
364207
|
+
logger12.debug(`Could not read agent file ${filePath}:`, error40);
|
|
363977
364208
|
}
|
|
363978
364209
|
}
|
|
363979
364210
|
}
|
|
363980
364211
|
} catch (error40) {
|
|
363981
|
-
|
|
364212
|
+
logger12.debug(`Could not read agents from directory ${dir}:`, error40);
|
|
363982
364213
|
}
|
|
363983
364214
|
return agents;
|
|
363984
364215
|
}
|
|
@@ -363991,16 +364222,16 @@ async function loadAgents(workingDirectory) {
|
|
|
363991
364222
|
}
|
|
363992
364223
|
const systemAgentsDir = path8.join(os6.homedir(), ".pochi", "agents");
|
|
363993
364224
|
allAgents.push(...await readAgentsFromDir(systemAgentsDir));
|
|
363994
|
-
|
|
364225
|
+
logger12.debug(`Loaded ${allAgents.length} custom agents`);
|
|
363995
364226
|
return allAgents;
|
|
363996
364227
|
} catch (error40) {
|
|
363997
|
-
|
|
364228
|
+
logger12.error("Failed to load custom agents", error40);
|
|
363998
364229
|
return [];
|
|
363999
364230
|
}
|
|
364000
364231
|
}
|
|
364001
364232
|
|
|
364002
364233
|
// src/lib/store-utils.ts
|
|
364003
|
-
var
|
|
364234
|
+
var logger13 = getLogger("Shutdown");
|
|
364004
364235
|
async function shutdownStoreAndExit(store) {
|
|
364005
364236
|
try {
|
|
364006
364237
|
await Promise.race([
|
|
@@ -364011,7 +364242,7 @@ async function shutdownStoreAndExit(store) {
|
|
|
364011
364242
|
]);
|
|
364012
364243
|
process.exit(0);
|
|
364013
364244
|
} catch (error40) {
|
|
364014
|
-
|
|
364245
|
+
logger13.warn("Store shutdown failed", error40);
|
|
364015
364246
|
process.exit(1);
|
|
364016
364247
|
}
|
|
364017
364248
|
}
|
|
@@ -364063,6 +364294,56 @@ async function replaceWorkflowReferences(prompt, cwd) {
|
|
|
364063
364294
|
import os9 from "node:os";
|
|
364064
364295
|
import path20 from "node:path";
|
|
364065
364296
|
|
|
364297
|
+
// ../../node_modules/base58-js/base58_chars.js
|
|
364298
|
+
var base58_chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
364299
|
+
var base58_chars_default = base58_chars;
|
|
364300
|
+
|
|
364301
|
+
// ../../node_modules/base58-js/create_base58_map.js
|
|
364302
|
+
var create_base58_map = () => {
|
|
364303
|
+
const base58M = Array(256).fill(-1);
|
|
364304
|
+
for (let i3 = 0;i3 < base58_chars_default.length; ++i3)
|
|
364305
|
+
base58M[base58_chars_default.charCodeAt(i3)] = i3;
|
|
364306
|
+
return base58M;
|
|
364307
|
+
};
|
|
364308
|
+
var create_base58_map_default = create_base58_map;
|
|
364309
|
+
|
|
364310
|
+
// ../../node_modules/base58-js/binary_to_base58.js
|
|
364311
|
+
var base58Map = create_base58_map_default();
|
|
364312
|
+
function binary_to_base58(uint8array) {
|
|
364313
|
+
const result2 = [];
|
|
364314
|
+
for (const byte of uint8array) {
|
|
364315
|
+
let carry = byte;
|
|
364316
|
+
for (let j = 0;j < result2.length; ++j) {
|
|
364317
|
+
const x = (base58Map[result2[j]] << 8) + carry;
|
|
364318
|
+
result2[j] = base58_chars_default.charCodeAt(x % 58);
|
|
364319
|
+
carry = x / 58 | 0;
|
|
364320
|
+
}
|
|
364321
|
+
while (carry) {
|
|
364322
|
+
result2.push(base58_chars_default.charCodeAt(carry % 58));
|
|
364323
|
+
carry = carry / 58 | 0;
|
|
364324
|
+
}
|
|
364325
|
+
}
|
|
364326
|
+
for (const byte of uint8array)
|
|
364327
|
+
if (byte)
|
|
364328
|
+
break;
|
|
364329
|
+
else
|
|
364330
|
+
result2.push(49);
|
|
364331
|
+
result2.reverse();
|
|
364332
|
+
return String.fromCharCode(...result2);
|
|
364333
|
+
}
|
|
364334
|
+
var binary_to_base58_default = binary_to_base58;
|
|
364335
|
+
// ../common/src/store-id-utils.ts
|
|
364336
|
+
var StoreId = v4_default.object({
|
|
364337
|
+
sub: v4_default.string(),
|
|
364338
|
+
machineId: v4_default.string(),
|
|
364339
|
+
cwd: v4_default.string(),
|
|
364340
|
+
date: v4_default.string().describe("Local date in MM/DD/YYYY format")
|
|
364341
|
+
});
|
|
364342
|
+
function encodeStoreId(storeId) {
|
|
364343
|
+
const encoded = new TextEncoder().encode(JSON.stringify(storeId));
|
|
364344
|
+
return binary_to_base58_default(encoded);
|
|
364345
|
+
}
|
|
364346
|
+
|
|
364066
364347
|
// ../livekit/src/livestore/index.ts
|
|
364067
364348
|
var exports_livestore = {};
|
|
364068
364349
|
__export(exports_livestore, {
|
|
@@ -365827,6 +366108,7 @@ var tables = {
|
|
|
365827
366108
|
columns: {
|
|
365828
366109
|
id: exports_mod4.SQLite.text({ primaryKey: true }),
|
|
365829
366110
|
shareId: exports_mod4.SQLite.text({ nullable: true }),
|
|
366111
|
+
isPublicShared: exports_mod4.SQLite.boolean({ default: false }),
|
|
365830
366112
|
title: exports_mod4.SQLite.text({ nullable: true }),
|
|
365831
366113
|
parentId: exports_mod4.SQLite.text({ nullable: true }),
|
|
365832
366114
|
status: exports_mod4.SQLite.text({
|
|
@@ -365931,6 +366213,14 @@ var events = {
|
|
|
365931
366213
|
title: exports_Schema2.String,
|
|
365932
366214
|
updatedAt: exports_Schema2.Date
|
|
365933
366215
|
})
|
|
366216
|
+
}),
|
|
366217
|
+
updateIsPublicShared: exports_events.synced({
|
|
366218
|
+
name: "v1.UpdateIsPublicShared",
|
|
366219
|
+
schema: exports_Schema2.Struct({
|
|
366220
|
+
id: exports_Schema2.String,
|
|
366221
|
+
isPublicShared: exports_Schema2.Boolean,
|
|
366222
|
+
updatedAt: exports_Schema2.Date
|
|
366223
|
+
})
|
|
365934
366224
|
})
|
|
365935
366225
|
};
|
|
365936
366226
|
var materializers2 = exports_mod4.SQLite.materializers(events, {
|
|
@@ -365996,7 +366286,8 @@ var materializers2 = exports_mod4.SQLite.materializers(events, {
|
|
|
365996
366286
|
] : []
|
|
365997
366287
|
],
|
|
365998
366288
|
"v1.UpdateShareId": ({ id: id4, shareId, updatedAt }) => tables.tasks.update({ shareId, updatedAt }).where({ id: id4, shareId: null }),
|
|
365999
|
-
"v1.UpdateTitle": ({ id: id4, title, updatedAt }) => tables.tasks.update({ title, updatedAt }).where({ id: id4 })
|
|
366289
|
+
"v1.UpdateTitle": ({ id: id4, title, updatedAt }) => tables.tasks.update({ title, updatedAt }).where({ id: id4 }),
|
|
366290
|
+
"v1.UpdateIsPublicShared": ({ id: id4, isPublicShared, updatedAt }) => tables.tasks.update({ isPublicShared, updatedAt }).where({ id: id4 })
|
|
366000
366291
|
});
|
|
366001
366292
|
var state = exports_mod4.SQLite.makeState({ tables, materializers: materializers2 });
|
|
366002
366293
|
var schema6 = makeSchema({ events, state });
|
|
@@ -366005,6 +366296,7 @@ var exports_queries = {};
|
|
|
366005
366296
|
__export(exports_queries, {
|
|
366006
366297
|
tasks$: () => tasks$,
|
|
366007
366298
|
makeTaskQuery: () => makeTaskQuery,
|
|
366299
|
+
makeSubTaskQuery: () => makeSubTaskQuery,
|
|
366008
366300
|
makeMessagesQuery: () => makeMessagesQuery
|
|
366009
366301
|
});
|
|
366010
366302
|
var makeTaskQuery = (taskId) => queryDb(() => tables.tasks.where("id", "=", taskId).first({ behaviour: "undefined" }), {
|
|
@@ -366021,6 +366313,10 @@ var tasks$ = queryDb({
|
|
|
366021
366313
|
}, {
|
|
366022
366314
|
label: "tasks"
|
|
366023
366315
|
});
|
|
366316
|
+
var makeSubTaskQuery = (taskId) => queryDb(() => tables.tasks.where("parentId", "=", taskId), {
|
|
366317
|
+
label: "subTasks",
|
|
366318
|
+
deps: [taskId]
|
|
366319
|
+
});
|
|
366024
366320
|
// ../../node_modules/@livestore/adapter-node/dist/client-session/adapter.js
|
|
366025
366321
|
init_dist2();
|
|
366026
366322
|
import { hostname as hostname3 } from "node:os";
|
|
@@ -373794,9 +374090,10 @@ var makeWsSync = (options4) => ({ storeId, payload }) => exports_Effect2.gen(fun
|
|
|
373794
374090
|
});
|
|
373795
374091
|
|
|
373796
374092
|
// src/livekit/store.ts
|
|
374093
|
+
var import_node_machine_id = __toESM(require_dist3(), 1);
|
|
373797
374094
|
async function createStore3(cwd2) {
|
|
373798
|
-
const storeId = await getStoreId(cwd2);
|
|
373799
374095
|
const { jwt: jwt2 = null } = await getPochiCredentials2() || {};
|
|
374096
|
+
const storeId = await getStoreId(jwt2, cwd2);
|
|
373800
374097
|
const adapter4 = makeAdapter({
|
|
373801
374098
|
storage: {
|
|
373802
374099
|
type: "fs",
|
|
@@ -373826,6 +374123,11 @@ async function getPochiCredentials2() {
|
|
|
373826
374123
|
const credentials = await pochi.getCredentials().catch(() => null);
|
|
373827
374124
|
return credentials;
|
|
373828
374125
|
}
|
|
374126
|
+
async function getStoreId(jwt2, cwd2) {
|
|
374127
|
+
const sub = (jwt2 ? decodeJwt(jwt2).sub : undefined) ?? "anonymous";
|
|
374128
|
+
const date8 = new Date().toLocaleDateString("en-US");
|
|
374129
|
+
return encodeStoreId({ sub, machineId: await import_node_machine_id.machineId(), cwd: cwd2, date: date8 });
|
|
374130
|
+
}
|
|
373829
374131
|
|
|
373830
374132
|
// src/mcp/list.ts
|
|
373831
374133
|
function registerMcpListCommand(parentCommand) {
|
|
@@ -387418,9 +387720,10 @@ init_effect();
|
|
|
387418
387720
|
// src/livekit/store.ts
|
|
387419
387721
|
import os10 from "node:os";
|
|
387420
387722
|
import path21 from "node:path";
|
|
387723
|
+
var import_node_machine_id2 = __toESM(require_dist3(), 1);
|
|
387421
387724
|
async function createStore4(cwd2) {
|
|
387422
|
-
const storeId = await getStoreId(cwd2);
|
|
387423
387725
|
const { jwt: jwt2 = null } = await getPochiCredentials3() || {};
|
|
387726
|
+
const storeId = await getStoreId2(jwt2, cwd2);
|
|
387424
387727
|
const adapter4 = makeAdapter({
|
|
387425
387728
|
storage: {
|
|
387426
387729
|
type: "fs",
|
|
@@ -387450,6 +387753,11 @@ async function getPochiCredentials3() {
|
|
|
387450
387753
|
const credentials = await pochi.getCredentials().catch(() => null);
|
|
387451
387754
|
return credentials;
|
|
387452
387755
|
}
|
|
387756
|
+
async function getStoreId2(jwt2, cwd2) {
|
|
387757
|
+
const sub = (jwt2 ? decodeJwt(jwt2).sub : undefined) ?? "anonymous";
|
|
387758
|
+
const date8 = new Date().toLocaleDateString("en-US");
|
|
387759
|
+
return encodeStoreId({ sub, machineId: await import_node_machine_id2.machineId(), cwd: cwd2, date: date8 });
|
|
387760
|
+
}
|
|
387453
387761
|
// src/livekit/chat.node.ts
|
|
387454
387762
|
class NodeChatState {
|
|
387455
387763
|
signal = {
|
|
@@ -387512,7 +387820,7 @@ class Chat extends AbstractChat {
|
|
|
387512
387820
|
}
|
|
387513
387821
|
}
|
|
387514
387822
|
// src/lib/store-utils.ts
|
|
387515
|
-
var
|
|
387823
|
+
var logger16 = getLogger("Shutdown");
|
|
387516
387824
|
async function shutdownStoreAndExit2(store) {
|
|
387517
387825
|
try {
|
|
387518
387826
|
await Promise.race([
|
|
@@ -387523,7 +387831,7 @@ async function shutdownStoreAndExit2(store) {
|
|
|
387523
387831
|
]);
|
|
387524
387832
|
process.exit(0);
|
|
387525
387833
|
} catch (error44) {
|
|
387526
|
-
|
|
387834
|
+
logger16.warn("Store shutdown failed", error44);
|
|
387527
387835
|
process.exit(1);
|
|
387528
387836
|
}
|
|
387529
387837
|
}
|
|
@@ -387744,12 +388052,12 @@ function toTaskError(error44) {
|
|
|
387744
388052
|
}
|
|
387745
388053
|
|
|
387746
388054
|
// ../livekit/src/chat/llm/generate-task-title.ts
|
|
387747
|
-
var
|
|
388055
|
+
var logger17 = getLogger("generateTaskTitle");
|
|
387748
388056
|
async function generateTaskTitle(options4) {
|
|
387749
388057
|
const { title } = options4;
|
|
387750
388058
|
const newTitle = await generateTaskTitleImpl(options4);
|
|
387751
388059
|
if (newTitle !== undefined) {
|
|
387752
|
-
|
|
388060
|
+
logger17.debug(`Generating task title, old: ${title}, new: ${newTitle}`);
|
|
387753
388061
|
}
|
|
387754
388062
|
return newTitle;
|
|
387755
388063
|
}
|
|
@@ -387776,7 +388084,7 @@ async function generateTaskTitleImpl({
|
|
|
387776
388084
|
return title2;
|
|
387777
388085
|
}
|
|
387778
388086
|
} catch (err2) {
|
|
387779
|
-
|
|
388087
|
+
logger17.warn("Failed to generate title", err2);
|
|
387780
388088
|
}
|
|
387781
388089
|
}
|
|
387782
388090
|
if (title === null) {
|
|
@@ -387822,7 +388130,7 @@ async function generateTitle2(model3, inputMessages, abortSignal) {
|
|
|
387822
388130
|
}
|
|
387823
388131
|
|
|
387824
388132
|
// ../livekit/src/chat/background-job/manager.ts
|
|
387825
|
-
var
|
|
388133
|
+
var logger18 = getLogger("BackgroundJobManager");
|
|
387826
388134
|
|
|
387827
388135
|
class BackgroundJobManager {
|
|
387828
388136
|
jobs = Promise.resolve();
|
|
@@ -387836,7 +388144,7 @@ class BackgroundJobManager {
|
|
|
387836
388144
|
}
|
|
387837
388145
|
this.pendingJobs.delete(nextJob.id);
|
|
387838
388146
|
return nextJob.process().catch((error44) => {
|
|
387839
|
-
|
|
388147
|
+
logger18.error(`Failed to process job for task ${nextJob.id}`, error44);
|
|
387840
388148
|
});
|
|
387841
388149
|
});
|
|
387842
388150
|
job.waitUntil?.(this.jobs);
|
|
@@ -387845,7 +388153,7 @@ class BackgroundJobManager {
|
|
|
387845
388153
|
var backgroundJobManager = new BackgroundJobManager;
|
|
387846
388154
|
|
|
387847
388155
|
// ../livekit/src/chat/background-job/generate-title.ts
|
|
387848
|
-
var
|
|
388156
|
+
var logger19 = getLogger("GenerateTitleManager");
|
|
387849
388157
|
function scheduleGenerateTitleJob(job) {
|
|
387850
388158
|
backgroundJobManager.push({
|
|
387851
388159
|
id: `generate-title-${job.taskId}`,
|
|
@@ -387861,7 +388169,7 @@ async function process15({
|
|
|
387861
388169
|
}) {
|
|
387862
388170
|
const task = store.query(makeTaskQuery(taskId));
|
|
387863
388171
|
if (!task) {
|
|
387864
|
-
|
|
388172
|
+
logger19.warn(`Task not found for title generation: ${taskId}`);
|
|
387865
388173
|
return;
|
|
387866
388174
|
}
|
|
387867
388175
|
const newTitle = await generateTaskTitle({
|
|
@@ -387878,7 +388186,7 @@ async function process15({
|
|
|
387878
388186
|
}
|
|
387879
388187
|
}
|
|
387880
388188
|
// ../livekit/src/chat/llm/repair-tool-call.ts
|
|
387881
|
-
var
|
|
388189
|
+
var logger20 = getLogger("RepairToolCall");
|
|
387882
388190
|
var makeRepairToolCall = (model3) => async ({ toolCall, inputSchema, error: error44 }) => {
|
|
387883
388191
|
if (NoSuchToolError.isInstance(error44)) {
|
|
387884
388192
|
return null;
|
|
@@ -387922,11 +388230,11 @@ var makeRepairToolCall = (model3) => async ({ toolCall, inputSchema, error: erro
|
|
|
387922
388230
|
maxRetries: 0
|
|
387923
388231
|
});
|
|
387924
388232
|
const input2 = await result2.text;
|
|
387925
|
-
|
|
388233
|
+
logger20.debug("Repairing tool call:", toolCall.toolName, input2);
|
|
387926
388234
|
return { ...toolCall, input: input2 };
|
|
387927
388235
|
};
|
|
387928
388236
|
// ../livekit/src/chat/llm/compact-task.ts
|
|
387929
|
-
var
|
|
388237
|
+
var logger21 = getLogger("compactTask");
|
|
387930
388238
|
async function compactTask({
|
|
387931
388239
|
model: model3,
|
|
387932
388240
|
messages: messages2,
|
|
@@ -387948,7 +388256,7 @@ async function compactTask({
|
|
|
387948
388256
|
}
|
|
387949
388257
|
return text12;
|
|
387950
388258
|
} catch (err2) {
|
|
387951
|
-
|
|
388259
|
+
logger21.warn("Failed to create summary", err2);
|
|
387952
388260
|
}
|
|
387953
388261
|
}
|
|
387954
388262
|
async function createSummary(model3, abortSignal, inputMessages) {
|
|
@@ -389870,7 +390178,7 @@ function createOpenAICompatible(options4) {
|
|
|
389870
390178
|
}
|
|
389871
390179
|
|
|
389872
390180
|
// ../livekit/src/chat/models/openai.ts
|
|
389873
|
-
var
|
|
390181
|
+
var logger22 = getLogger("openai");
|
|
389874
390182
|
var OpenAIRequestParamsSchema = exports_external.object({
|
|
389875
390183
|
max_tokens: exports_external.number().positive().optional(),
|
|
389876
390184
|
max_completion_tokens: exports_external.number().positive().optional()
|
|
@@ -389919,7 +390227,7 @@ function overrideMaxOutputToken(body3) {
|
|
|
389919
390227
|
const json9 = JSON.parse(body3);
|
|
389920
390228
|
const result2 = OpenAIRequestParamsSchema.safeParse(json9);
|
|
389921
390229
|
if (!result2.success) {
|
|
389922
|
-
|
|
390230
|
+
logger22.error("OpenAI request body validation failed:", result2.error);
|
|
389923
390231
|
return;
|
|
389924
390232
|
}
|
|
389925
390233
|
const parsed = result2.data;
|
|
@@ -389928,7 +390236,7 @@ function overrideMaxOutputToken(body3) {
|
|
|
389928
390236
|
}
|
|
389929
390237
|
return JSON.stringify(parsed);
|
|
389930
390238
|
} catch (error44) {
|
|
389931
|
-
|
|
390239
|
+
logger22.error("Failed to parse OpenAI request body:", error44);
|
|
389932
390240
|
}
|
|
389933
390241
|
return;
|
|
389934
390242
|
}
|
|
@@ -390078,7 +390386,7 @@ function estimateTotalTokens(messages2) {
|
|
|
390078
390386
|
}
|
|
390079
390387
|
|
|
390080
390388
|
// ../livekit/src/chat/live-chat-kit.ts
|
|
390081
|
-
var
|
|
390389
|
+
var logger23 = getLogger("LiveChatKit");
|
|
390082
390390
|
|
|
390083
390391
|
class LiveChatKit {
|
|
390084
390392
|
taskId;
|
|
@@ -390134,7 +390442,7 @@ class LiveChatKit {
|
|
|
390134
390442
|
inline: true
|
|
390135
390443
|
});
|
|
390136
390444
|
} catch (err2) {
|
|
390137
|
-
|
|
390445
|
+
logger23.error("Failed to compact task", err2);
|
|
390138
390446
|
throw err2;
|
|
390139
390447
|
}
|
|
390140
390448
|
}
|
|
@@ -390200,6 +390508,13 @@ class LiveChatKit {
|
|
|
390200
390508
|
const countTask = this.store.query(tables.tasks.where("id", "=", this.taskId).count());
|
|
390201
390509
|
return countTask > 0;
|
|
390202
390510
|
}
|
|
390511
|
+
updateIsPublicShared = (isPublicShared) => {
|
|
390512
|
+
this.store.commit(events.updateIsPublicShared({
|
|
390513
|
+
id: this.taskId,
|
|
390514
|
+
isPublicShared,
|
|
390515
|
+
updatedAt: new Date
|
|
390516
|
+
}));
|
|
390517
|
+
};
|
|
390203
390518
|
onStart = async ({
|
|
390204
390519
|
messages: messages2,
|
|
390205
390520
|
environment: environment2,
|
|
@@ -390254,7 +390569,7 @@ class LiveChatKit {
|
|
|
390254
390569
|
}));
|
|
390255
390570
|
};
|
|
390256
390571
|
onError = (error44) => {
|
|
390257
|
-
|
|
390572
|
+
logger23.error("onError", error44);
|
|
390258
390573
|
const lastMessage = this.chat.messages.at(-1) || null;
|
|
390259
390574
|
this.store.commit(events.chatStreamFailed({
|
|
390260
390575
|
id: this.taskId,
|
|
@@ -390347,7 +390662,7 @@ import * as nodePath from "node:path";
|
|
|
390347
390662
|
|
|
390348
390663
|
// ../common/src/diff-utils.ts
|
|
390349
390664
|
var import_fast_levenshtein = __toESM(require_levenshtein(), 1);
|
|
390350
|
-
var
|
|
390665
|
+
var logger24 = getLogger("diffUtils");
|
|
390351
390666
|
function normalize6(content3) {
|
|
390352
390667
|
return content3.replace(/\r\n/g, `
|
|
390353
390668
|
`).trimEnd();
|
|
@@ -390360,7 +390675,7 @@ class DiffError extends Error {
|
|
|
390360
390675
|
}
|
|
390361
390676
|
}
|
|
390362
390677
|
async function parseDiffAndApply(fileContent, searchContent, replaceContent, expectedReplacements = 1) {
|
|
390363
|
-
|
|
390678
|
+
logger24.trace(`Applying diff with expectedReplacements: ${expectedReplacements}`);
|
|
390364
390679
|
const isCRLF = fileContent.includes(`\r
|
|
390365
390680
|
`);
|
|
390366
390681
|
const normalizedFileContent = normalize6(fileContent);
|
|
@@ -390377,11 +390692,11 @@ async function parseDiffAndApply(fileContent, searchContent, replaceContent, exp
|
|
|
390377
390692
|
const matches2 = searchContentExact(normalizedFileContent, normalizedSearchContent);
|
|
390378
390693
|
if (matches2.length < expectedReplacements) {
|
|
390379
390694
|
matches2.push(...searchContentWithLineTrimmed(normalizedFileContent, normalizedSearchContent));
|
|
390380
|
-
|
|
390695
|
+
logger24.trace(`Found ${matches2.length} matches after line trimming search strategy`);
|
|
390381
390696
|
}
|
|
390382
390697
|
if (matches2.length < expectedReplacements) {
|
|
390383
390698
|
matches2.push(...searchContentByBlockAnchor(normalizedFileContent, normalizedSearchContent));
|
|
390384
|
-
|
|
390699
|
+
logger24.trace(`Found ${matches2.length} matches after block anchor search strategy`);
|
|
390385
390700
|
}
|
|
390386
390701
|
if (matches2.length === 0) {
|
|
390387
390702
|
throw new DiffError("Search content does not match the file content. Try to reread the file for the latest content.");
|
|
@@ -390390,7 +390705,7 @@ async function parseDiffAndApply(fileContent, searchContent, replaceContent, exp
|
|
|
390390
390705
|
throw new DiffError(`Expected ${expectedReplacements} occurrences but found ${matches2.length}. Please verify the search content and expectedReplacements parameter.`);
|
|
390391
390706
|
}
|
|
390392
390707
|
const result2 = replaceMatches(normalizedFileContent, matches2, replaceContent);
|
|
390393
|
-
|
|
390708
|
+
logger24.trace("Successfully applied diff");
|
|
390394
390709
|
if (isCRLF) {
|
|
390395
390710
|
return result2.replace(/\n/g, `\r
|
|
390396
390711
|
`);
|
|
@@ -390744,11 +391059,11 @@ var readFile13 = (context15) => async ({ path: path24, startLine, endLine }) =>
|
|
|
390744
391059
|
|
|
390745
391060
|
// src/tools/search-files.ts
|
|
390746
391061
|
import * as fs14 from "node:fs";
|
|
390747
|
-
var
|
|
391062
|
+
var logger25 = getLogger("searchFiles");
|
|
390748
391063
|
var searchFiles2 = (context15) => async ({ path: path24, regex: regex3, filePattern }, { abortSignal }) => {
|
|
390749
391064
|
const rgPath = context15.rg;
|
|
390750
391065
|
if (!rgPath || !fs14.existsSync(rgPath)) {
|
|
390751
|
-
|
|
391066
|
+
logger25.error("Ripgrep not found at path", rgPath);
|
|
390752
391067
|
throw new Error(`Ripgrep not found at path: ${rgPath}`);
|
|
390753
391068
|
}
|
|
390754
391069
|
return await searchFilesWithRipgrep(path24, regex3, rgPath, context15.cwd, filePattern, abortSignal);
|
|
@@ -390819,7 +391134,7 @@ function toErrorString(e11) {
|
|
|
390819
391134
|
}
|
|
390820
391135
|
|
|
390821
391136
|
// src/task-runner.ts
|
|
390822
|
-
var
|
|
391137
|
+
var logger26 = getLogger("TaskRunner");
|
|
390823
391138
|
|
|
390824
391139
|
class TaskRunner {
|
|
390825
391140
|
toolCallOptions;
|
|
@@ -390884,9 +391199,9 @@ class TaskRunner {
|
|
|
390884
391199
|
return this.chatKit.task?.shareId;
|
|
390885
391200
|
}
|
|
390886
391201
|
async run() {
|
|
390887
|
-
|
|
391202
|
+
logger26.debug("Starting TaskRunner...");
|
|
390888
391203
|
try {
|
|
390889
|
-
|
|
391204
|
+
logger26.trace("Start step loop.");
|
|
390890
391205
|
this.stepCount.reset();
|
|
390891
391206
|
while (true) {
|
|
390892
391207
|
const stepResult = await this.step();
|
|
@@ -390901,7 +391216,7 @@ class TaskRunner {
|
|
|
390901
391216
|
}
|
|
390902
391217
|
} catch (e11) {
|
|
390903
391218
|
const error44 = toError2(e11);
|
|
390904
|
-
|
|
391219
|
+
logger26.trace("Failed:", error44);
|
|
390905
391220
|
}
|
|
390906
391221
|
}
|
|
390907
391222
|
async step() {
|
|
@@ -390939,24 +391254,24 @@ class TaskRunner {
|
|
|
390939
391254
|
throw new Error("Task is not loaded");
|
|
390940
391255
|
}
|
|
390941
391256
|
if ((task.status === "completed" || task.status === "pending-input") && isResultMessage(message)) {
|
|
390942
|
-
|
|
391257
|
+
logger26.trace("Task is completed or pending input, no more steps to process.");
|
|
390943
391258
|
return "finished";
|
|
390944
391259
|
}
|
|
390945
391260
|
if (task.status === "failed") {
|
|
390946
391261
|
if (task.error?.kind === "APICallError" && !task.error.isRetryable) {
|
|
390947
391262
|
return "finished";
|
|
390948
391263
|
}
|
|
390949
|
-
|
|
391264
|
+
logger26.error("Task is failed, trying to resend last message to resume it.", task.error);
|
|
390950
391265
|
return "retry";
|
|
390951
391266
|
}
|
|
390952
391267
|
if (message.role !== "assistant") {
|
|
390953
|
-
|
|
391268
|
+
logger26.trace("Last message is not a assistant message, resending it to resume the task.");
|
|
390954
391269
|
return "retry";
|
|
390955
391270
|
}
|
|
390956
391271
|
if (isAssistantMessageWithEmptyParts(message) || isAssistantMessageWithPartialToolCalls(message) || isAssistantMessageWithOutputError(message) || lastAssistantMessageIsCompleteWithToolCalls({
|
|
390957
391272
|
messages: this.chat.messages
|
|
390958
391273
|
})) {
|
|
390959
|
-
|
|
391274
|
+
logger26.trace("Last message is assistant with empty parts or partial/completed tool calls, resending it to resume the task.");
|
|
390960
391275
|
const processed = prepareLastMessageForRetry(message);
|
|
390961
391276
|
if (processed) {
|
|
390962
391277
|
this.chat.appendOrReplaceMessage(processed);
|
|
@@ -390964,28 +391279,28 @@ class TaskRunner {
|
|
|
390964
391279
|
return "retry";
|
|
390965
391280
|
}
|
|
390966
391281
|
if (isAssistantMessageWithNoToolCalls(message)) {
|
|
390967
|
-
|
|
391282
|
+
logger26.trace("Last message is assistant with no tool calls, sending a new user reminder.");
|
|
390968
391283
|
const message2 = createUserMessage(prompts.createSystemReminder("You should use tool calls to answer the question, for example, use attemptCompletion if the job is done, or use askFollowupQuestions to clarify the request."));
|
|
390969
391284
|
this.chat.appendOrReplaceMessage(message2);
|
|
390970
391285
|
return "next";
|
|
390971
391286
|
}
|
|
390972
391287
|
}
|
|
390973
391288
|
async processToolCalls(message) {
|
|
390974
|
-
|
|
391289
|
+
logger26.trace("Processing tool calls in the last message.");
|
|
390975
391290
|
for (const toolCall of message.parts.filter(isToolUIPart)) {
|
|
390976
391291
|
if (toolCall.state !== "input-available")
|
|
390977
391292
|
continue;
|
|
390978
391293
|
const toolName = getToolName(toolCall);
|
|
390979
|
-
|
|
391294
|
+
logger26.trace(`Found tool call: ${toolName} with args: ${JSON.stringify(toolCall.input)}`);
|
|
390980
391295
|
const toolResult = await executeToolCall(toolCall, this.toolCallOptions);
|
|
390981
391296
|
this.chatKit.chat.addToolResult({
|
|
390982
391297
|
tool: toolName,
|
|
390983
391298
|
toolCallId: toolCall.toolCallId,
|
|
390984
391299
|
output: toolResult
|
|
390985
391300
|
});
|
|
390986
|
-
|
|
391301
|
+
logger26.trace(`Tool call result: ${JSON.stringify(toolResult)}`);
|
|
390987
391302
|
}
|
|
390988
|
-
|
|
391303
|
+
logger26.trace("All tool calls processed in the last message.");
|
|
390989
391304
|
return "next";
|
|
390990
391305
|
}
|
|
390991
391306
|
}
|
|
@@ -391210,7 +391525,7 @@ async function downloadAndInstall(program5, release2) {
|
|
|
391210
391525
|
// package.json
|
|
391211
391526
|
var package_default2 = {
|
|
391212
391527
|
name: "@getpochi/cli",
|
|
391213
|
-
version: "0.5.
|
|
391528
|
+
version: "0.5.29",
|
|
391214
391529
|
type: "module",
|
|
391215
391530
|
bin: {
|
|
391216
391531
|
pochi: "src/cli.ts"
|
|
@@ -391243,6 +391558,8 @@ var package_default2 = {
|
|
|
391243
391558
|
ai: "catalog:",
|
|
391244
391559
|
chalk: "^5.3.0",
|
|
391245
391560
|
commander: "^14.0.0",
|
|
391561
|
+
jose: "catalog:",
|
|
391562
|
+
"node-machine-id": "catalog:",
|
|
391246
391563
|
listr2: "^9.0.3",
|
|
391247
391564
|
ora: "^8.2.0",
|
|
391248
391565
|
semver: "^7.6.3",
|
|
@@ -391324,8 +391641,8 @@ function registerUpgradeCommand(program5) {
|
|
|
391324
391641
|
});
|
|
391325
391642
|
}
|
|
391326
391643
|
// src/cli.ts
|
|
391327
|
-
var
|
|
391328
|
-
|
|
391644
|
+
var logger27 = getLogger("Pochi");
|
|
391645
|
+
logger27.debug(`pochi v${package_default.version}`);
|
|
391329
391646
|
var parsePositiveInt = (input2) => {
|
|
391330
391647
|
if (!input2) {
|
|
391331
391648
|
return program5.error("The value for this option must be a positive integer.");
|