@arcote.tech/arc-cli 0.7.28 → 0.7.30

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/index.js CHANGED
@@ -3445,7 +3445,7 @@ var init_log_update = __esm(() => {
3445
3445
  logUpdateStderr = createLogUpdate(process7.stderr);
3446
3446
  });
3447
3447
 
3448
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
3448
+ // ../../node_modules/.bun/is-fullwidth-code-point@4.0.0/node_modules/is-fullwidth-code-point/index.js
3449
3449
  function isFullwidthCodePoint2(codePoint) {
3450
3450
  if (!Number.isInteger(codePoint)) {
3451
3451
  return false;
@@ -3453,183 +3453,7 @@ function isFullwidthCodePoint2(codePoint) {
3453
3453
  return codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141);
3454
3454
  }
3455
3455
 
3456
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/slice-ansi/node_modules/ansi-styles/index.js
3457
- function assembleStyles2() {
3458
- const codes = new Map;
3459
- for (const [groupName, group] of Object.entries(styles2)) {
3460
- for (const [styleName, style] of Object.entries(group)) {
3461
- styles2[styleName] = {
3462
- open: `\x1B[${style[0]}m`,
3463
- close: `\x1B[${style[1]}m`
3464
- };
3465
- group[styleName] = styles2[styleName];
3466
- codes.set(style[0], style[1]);
3467
- }
3468
- Object.defineProperty(styles2, groupName, {
3469
- value: group,
3470
- enumerable: false
3471
- });
3472
- }
3473
- Object.defineProperty(styles2, "codes", {
3474
- value: codes,
3475
- enumerable: false
3476
- });
3477
- styles2.color.close = "\x1B[39m";
3478
- styles2.bgColor.close = "\x1B[49m";
3479
- styles2.color.ansi = wrapAnsi162();
3480
- styles2.color.ansi256 = wrapAnsi2562();
3481
- styles2.color.ansi16m = wrapAnsi16m2();
3482
- styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
3483
- styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
3484
- styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
3485
- Object.defineProperties(styles2, {
3486
- rgbToAnsi256: {
3487
- value(red2, green2, blue2) {
3488
- if (red2 === green2 && green2 === blue2) {
3489
- if (red2 < 8) {
3490
- return 16;
3491
- }
3492
- if (red2 > 248) {
3493
- return 231;
3494
- }
3495
- return Math.round((red2 - 8) / 247 * 24) + 232;
3496
- }
3497
- return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
3498
- },
3499
- enumerable: false
3500
- },
3501
- hexToRgb: {
3502
- value(hex) {
3503
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
3504
- if (!matches) {
3505
- return [0, 0, 0];
3506
- }
3507
- let [colorString] = matches;
3508
- if (colorString.length === 3) {
3509
- colorString = [...colorString].map((character) => character + character).join("");
3510
- }
3511
- const integer = Number.parseInt(colorString, 16);
3512
- return [
3513
- integer >> 16 & 255,
3514
- integer >> 8 & 255,
3515
- integer & 255
3516
- ];
3517
- },
3518
- enumerable: false
3519
- },
3520
- hexToAnsi256: {
3521
- value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
3522
- enumerable: false
3523
- },
3524
- ansi256ToAnsi: {
3525
- value(code) {
3526
- if (code < 8) {
3527
- return 30 + code;
3528
- }
3529
- if (code < 16) {
3530
- return 90 + (code - 8);
3531
- }
3532
- let red2;
3533
- let green2;
3534
- let blue2;
3535
- if (code >= 232) {
3536
- red2 = ((code - 232) * 10 + 8) / 255;
3537
- green2 = red2;
3538
- blue2 = red2;
3539
- } else {
3540
- code -= 16;
3541
- const remainder = code % 36;
3542
- red2 = Math.floor(code / 36) / 5;
3543
- green2 = Math.floor(remainder / 6) / 5;
3544
- blue2 = remainder % 6 / 5;
3545
- }
3546
- const value = Math.max(red2, green2, blue2) * 2;
3547
- if (value === 0) {
3548
- return 30;
3549
- }
3550
- let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
3551
- if (value === 2) {
3552
- result += 60;
3553
- }
3554
- return result;
3555
- },
3556
- enumerable: false
3557
- },
3558
- rgbToAnsi: {
3559
- value: (red2, green2, blue2) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red2, green2, blue2)),
3560
- enumerable: false
3561
- },
3562
- hexToAnsi: {
3563
- value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
3564
- enumerable: false
3565
- }
3566
- });
3567
- return styles2;
3568
- }
3569
- var ANSI_BACKGROUND_OFFSET2 = 10, wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m2 = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`, styles2, modifierNames2, foregroundColorNames2, backgroundColorNames2, colorNames2, ansiStyles2, ansi_styles_default2;
3570
- var init_ansi_styles2 = __esm(() => {
3571
- styles2 = {
3572
- modifier: {
3573
- reset: [0, 0],
3574
- bold: [1, 22],
3575
- dim: [2, 22],
3576
- italic: [3, 23],
3577
- underline: [4, 24],
3578
- overline: [53, 55],
3579
- inverse: [7, 27],
3580
- hidden: [8, 28],
3581
- strikethrough: [9, 29]
3582
- },
3583
- color: {
3584
- black: [30, 39],
3585
- red: [31, 39],
3586
- green: [32, 39],
3587
- yellow: [33, 39],
3588
- blue: [34, 39],
3589
- magenta: [35, 39],
3590
- cyan: [36, 39],
3591
- white: [37, 39],
3592
- blackBright: [90, 39],
3593
- gray: [90, 39],
3594
- grey: [90, 39],
3595
- redBright: [91, 39],
3596
- greenBright: [92, 39],
3597
- yellowBright: [93, 39],
3598
- blueBright: [94, 39],
3599
- magentaBright: [95, 39],
3600
- cyanBright: [96, 39],
3601
- whiteBright: [97, 39]
3602
- },
3603
- bgColor: {
3604
- bgBlack: [40, 49],
3605
- bgRed: [41, 49],
3606
- bgGreen: [42, 49],
3607
- bgYellow: [43, 49],
3608
- bgBlue: [44, 49],
3609
- bgMagenta: [45, 49],
3610
- bgCyan: [46, 49],
3611
- bgWhite: [47, 49],
3612
- bgBlackBright: [100, 49],
3613
- bgGray: [100, 49],
3614
- bgGrey: [100, 49],
3615
- bgRedBright: [101, 49],
3616
- bgGreenBright: [102, 49],
3617
- bgYellowBright: [103, 49],
3618
- bgBlueBright: [104, 49],
3619
- bgMagentaBright: [105, 49],
3620
- bgCyanBright: [106, 49],
3621
- bgWhiteBright: [107, 49]
3622
- }
3623
- };
3624
- modifierNames2 = Object.keys(styles2.modifier);
3625
- foregroundColorNames2 = Object.keys(styles2.color);
3626
- backgroundColorNames2 = Object.keys(styles2.bgColor);
3627
- colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
3628
- ansiStyles2 = assembleStyles2();
3629
- ansi_styles_default2 = ansiStyles2;
3630
- });
3631
-
3632
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/slice-ansi/index.js
3456
+ // ../../node_modules/.bun/slice-ansi@5.0.0/node_modules/slice-ansi/index.js
3633
3457
  function sliceAnsi2(string, begin, end) {
3634
3458
  const characters = [...string];
3635
3459
  const ansiCodes = [];
@@ -3681,7 +3505,7 @@ var astralRegex, ESCAPES3, wrapAnsi2 = (code) => `${ESCAPES3[0]}[${code}m`, chec
3681
3505
  if (ansiCode.includes(";")) {
3682
3506
  ansiCode = ansiCode.split(";")[0][0] + "0";
3683
3507
  }
3684
- const item = ansi_styles_default2.codes.get(Number.parseInt(ansiCode, 10));
3508
+ const item = ansi_styles_default.codes.get(Number.parseInt(ansiCode, 10));
3685
3509
  if (item) {
3686
3510
  const indexEscape = ansiCodes.indexOf(item.toString());
3687
3511
  if (indexEscape === -1) {
@@ -3699,14 +3523,14 @@ var astralRegex, ESCAPES3, wrapAnsi2 = (code) => `${ESCAPES3[0]}[${code}m`, chec
3699
3523
  if (isEscapes) {
3700
3524
  output = output.filter((element, index) => output.indexOf(element) === index);
3701
3525
  if (endAnsiCode !== undefined) {
3702
- const fistEscapeCode = wrapAnsi2(ansi_styles_default2.codes.get(Number.parseInt(endAnsiCode, 10)));
3526
+ const fistEscapeCode = wrapAnsi2(ansi_styles_default.codes.get(Number.parseInt(endAnsiCode, 10)));
3703
3527
  output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
3704
3528
  }
3705
3529
  }
3706
3530
  return output.join("");
3707
3531
  };
3708
3532
  var init_slice_ansi2 = __esm(() => {
3709
- init_ansi_styles2();
3533
+ init_ansi_styles();
3710
3534
  astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
3711
3535
  ESCAPES3 = [
3712
3536
  "\x1B",
@@ -3714,89 +3538,7 @@ var init_slice_ansi2 = __esm(() => {
3714
3538
  ];
3715
3539
  });
3716
3540
 
3717
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
3718
- function ansiRegex2({ onlyFirst = false } = {}) {
3719
- const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
3720
- const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
3721
- const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
3722
- const pattern = `${osc}|${csi}`;
3723
- return new RegExp(pattern, onlyFirst ? undefined : "g");
3724
- }
3725
-
3726
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/string-width/node_modules/strip-ansi/index.js
3727
- function stripAnsi2(string) {
3728
- if (typeof string !== "string") {
3729
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
3730
- }
3731
- if (!string.includes("\x1B") && !string.includes("\x9B")) {
3732
- return string;
3733
- }
3734
- return string.replace(regex2, "");
3735
- }
3736
- var regex2;
3737
- var init_strip_ansi2 = __esm(() => {
3738
- regex2 = ansiRegex2();
3739
- });
3740
-
3741
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/string-width/node_modules/emoji-regex/index.mjs
3742
- var emoji_regex_default2 = () => {
3743
- return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
3744
- };
3745
-
3746
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/node_modules/string-width/index.js
3747
- function stringWidth2(string, options = {}) {
3748
- if (typeof string !== "string" || string.length === 0) {
3749
- return 0;
3750
- }
3751
- const {
3752
- ambiguousIsNarrow = true,
3753
- countAnsiEscapeCodes = false
3754
- } = options;
3755
- if (!countAnsiEscapeCodes) {
3756
- string = stripAnsi2(string);
3757
- }
3758
- if (string.length === 0) {
3759
- return 0;
3760
- }
3761
- let width = 0;
3762
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
3763
- for (const { segment: character } of segmenter2.segment(string)) {
3764
- const codePoint = character.codePointAt(0);
3765
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
3766
- continue;
3767
- }
3768
- if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
3769
- continue;
3770
- }
3771
- if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
3772
- continue;
3773
- }
3774
- if (codePoint >= 55296 && codePoint <= 57343) {
3775
- continue;
3776
- }
3777
- if (codePoint >= 65024 && codePoint <= 65039) {
3778
- continue;
3779
- }
3780
- if (defaultIgnorableCodePointRegex2.test(character)) {
3781
- continue;
3782
- }
3783
- if (emoji_regex_default2().test(character)) {
3784
- width += 2;
3785
- continue;
3786
- }
3787
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
3788
- }
3789
- return width;
3790
- }
3791
- var segmenter2, defaultIgnorableCodePointRegex2;
3792
- var init_string_width2 = __esm(() => {
3793
- init_strip_ansi2();
3794
- init_get_east_asian_width();
3795
- segmenter2 = new Intl.Segmenter;
3796
- defaultIgnorableCodePointRegex2 = /^\p{Default_Ignorable_Code_Point}$/u;
3797
- });
3798
-
3799
- // ../../node_modules/.bun/listr2@8.3.3/node_modules/listr2/node_modules/cli-truncate/index.js
3541
+ // ../../node_modules/.bun/cli-truncate@4.0.0/node_modules/cli-truncate/index.js
3800
3542
  var exports_cli_truncate = {};
3801
3543
  __export(exports_cli_truncate, {
3802
3544
  default: () => cliTruncate
@@ -3833,7 +3575,7 @@ function cliTruncate(text, columns, options = {}) {
3833
3575
  if (columns === 1) {
3834
3576
  return truncationCharacter;
3835
3577
  }
3836
- const length = stringWidth2(text);
3578
+ const length = stringWidth(text);
3837
3579
  if (length <= columns) {
3838
3580
  return text;
3839
3581
  }
@@ -3845,7 +3587,7 @@ function cliTruncate(text, columns, options = {}) {
3845
3587
  if (space === true) {
3846
3588
  truncationCharacter += " ";
3847
3589
  }
3848
- return truncationCharacter + sliceAnsi2(text, length - columns + stringWidth2(truncationCharacter), length);
3590
+ return truncationCharacter + sliceAnsi2(text, length - columns + stringWidth(truncationCharacter), length);
3849
3591
  }
3850
3592
  if (position === "middle") {
3851
3593
  if (space === true) {
@@ -3857,7 +3599,7 @@ function cliTruncate(text, columns, options = {}) {
3857
3599
  const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
3858
3600
  return sliceAnsi2(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi2(text, spaceNearSecondBreakPoint, length).trim();
3859
3601
  }
3860
- return sliceAnsi2(text, 0, half) + truncationCharacter + sliceAnsi2(text, length - (columns - half) + stringWidth2(truncationCharacter), length);
3602
+ return sliceAnsi2(text, 0, half) + truncationCharacter + sliceAnsi2(text, length - (columns - half) + stringWidth(truncationCharacter), length);
3861
3603
  }
3862
3604
  if (position === "end") {
3863
3605
  if (preferTruncationOnSpace) {
@@ -3867,13 +3609,13 @@ function cliTruncate(text, columns, options = {}) {
3867
3609
  if (space === true) {
3868
3610
  truncationCharacter = ` ${truncationCharacter}`;
3869
3611
  }
3870
- return sliceAnsi2(text, 0, columns - stringWidth2(truncationCharacter)) + truncationCharacter;
3612
+ return sliceAnsi2(text, 0, columns - stringWidth(truncationCharacter)) + truncationCharacter;
3871
3613
  }
3872
3614
  throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
3873
3615
  }
3874
3616
  var init_cli_truncate = __esm(() => {
3875
3617
  init_slice_ansi2();
3876
- init_string_width2();
3618
+ init_string_width();
3877
3619
  });
3878
3620
 
3879
3621
  // ../../node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js
@@ -5637,17 +5379,17 @@ var require_picomatch = __commonJS((exports, module) => {
5637
5379
  }
5638
5380
  const opts = options || {};
5639
5381
  const posix2 = utils.isWindows(options);
5640
- const regex3 = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true);
5641
- const state = regex3.state;
5642
- delete regex3.state;
5382
+ const regex2 = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true);
5383
+ const state = regex2.state;
5384
+ delete regex2.state;
5643
5385
  let isIgnored = () => false;
5644
5386
  if (opts.ignore) {
5645
5387
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
5646
5388
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
5647
5389
  }
5648
5390
  const matcher = (input, returnObject = false) => {
5649
- const { isMatch, match: match2, output } = picomatch.test(input, regex3, options, { glob: glob2, posix: posix2 });
5650
- const result = { glob: glob2, state, regex: regex3, posix: posix2, input, output, match: match2, isMatch };
5391
+ const { isMatch, match: match2, output } = picomatch.test(input, regex2, options, { glob: glob2, posix: posix2 });
5392
+ const result = { glob: glob2, state, regex: regex2, posix: posix2, input, output, match: match2, isMatch };
5651
5393
  if (typeof opts.onResult === "function") {
5652
5394
  opts.onResult(result);
5653
5395
  }
@@ -5672,7 +5414,7 @@ var require_picomatch = __commonJS((exports, module) => {
5672
5414
  }
5673
5415
  return matcher;
5674
5416
  };
5675
- picomatch.test = (input, regex3, options, { glob: glob2, posix: posix2 } = {}) => {
5417
+ picomatch.test = (input, regex2, options, { glob: glob2, posix: posix2 } = {}) => {
5676
5418
  if (typeof input !== "string") {
5677
5419
  throw new TypeError("Expected input to be a string");
5678
5420
  }
@@ -5689,16 +5431,16 @@ var require_picomatch = __commonJS((exports, module) => {
5689
5431
  }
5690
5432
  if (match2 === false || opts.capture === true) {
5691
5433
  if (opts.matchBase === true || opts.basename === true) {
5692
- match2 = picomatch.matchBase(input, regex3, options, posix2);
5434
+ match2 = picomatch.matchBase(input, regex2, options, posix2);
5693
5435
  } else {
5694
- match2 = regex3.exec(output);
5436
+ match2 = regex2.exec(output);
5695
5437
  }
5696
5438
  }
5697
5439
  return { isMatch: Boolean(match2), match: match2, output };
5698
5440
  };
5699
5441
  picomatch.matchBase = (input, glob2, options, posix2 = utils.isWindows(options)) => {
5700
- const regex3 = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options);
5701
- return regex3.test(path4.basename(input));
5442
+ const regex2 = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options);
5443
+ return regex2.test(path4.basename(input));
5702
5444
  };
5703
5445
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
5704
5446
  picomatch.parse = (pattern, options) => {
@@ -5718,11 +5460,11 @@ var require_picomatch = __commonJS((exports, module) => {
5718
5460
  if (state && state.negated === true) {
5719
5461
  source = `^(?!${source}).*$`;
5720
5462
  }
5721
- const regex3 = picomatch.toRegex(source, options);
5463
+ const regex2 = picomatch.toRegex(source, options);
5722
5464
  if (returnState === true) {
5723
- regex3.state = state;
5465
+ regex2.state = state;
5724
5466
  }
5725
- return regex3;
5467
+ return regex2;
5726
5468
  };
5727
5469
  picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
5728
5470
  if (!input || typeof input !== "string") {
@@ -11147,6 +10889,11 @@ class ArcOptional {
11147
10889
  return false;
11148
10890
  return this.parent.validate(value);
11149
10891
  }
10892
+ coerce(value) {
10893
+ if (value == null)
10894
+ return;
10895
+ return this.parent.coerce(value);
10896
+ }
11150
10897
  toJsonSchema() {
11151
10898
  const parentSchema = this.parent.toJsonSchema?.() ?? {};
11152
10899
  return {
@@ -11193,6 +10940,9 @@ class ArcBranded {
11193
10940
  validate(value) {
11194
10941
  return this.parent.validate(value);
11195
10942
  }
10943
+ coerce(value) {
10944
+ return this.parent.coerce(value);
10945
+ }
11196
10946
  toJsonSchema() {
11197
10947
  return this.parent.toJsonSchema?.() ?? {};
11198
10948
  }
@@ -11217,6 +10967,11 @@ class ArcDefault {
11217
10967
  return false;
11218
10968
  return this.parent.validate(value);
11219
10969
  }
10970
+ coerce(value) {
10971
+ if (value === undefined || value === null)
10972
+ return;
10973
+ return this.parent.coerce(value);
10974
+ }
11220
10975
  parse(value) {
11221
10976
  if (value)
11222
10977
  return this.parent.parse(value);
@@ -11299,6 +11054,9 @@ class ArcAbstract {
11299
11054
  }
11300
11055
  return false;
11301
11056
  }
11057
+ coerce(value) {
11058
+ return this.validate(value) ? undefined : value;
11059
+ }
11302
11060
  pipeValidation(name, validator) {
11303
11061
  const newInstance = this.clone();
11304
11062
  newInstance.validations = [...this.validations, { name, validator }];
@@ -11652,6 +11410,34 @@ class ArcFunction {
11652
11410
  };
11653
11411
  }
11654
11412
  }
11413
+ function serializeParams(schema, params) {
11414
+ if (schema && typeof schema.serialize === "function") {
11415
+ return schema.serialize(params ?? {});
11416
+ }
11417
+ return params;
11418
+ }
11419
+ function deserializeParams(schema, params) {
11420
+ if (schema && typeof schema.deserialize === "function") {
11421
+ return schema.deserialize(params ?? {});
11422
+ }
11423
+ return params;
11424
+ }
11425
+ function deserializeResult(schemas, value) {
11426
+ const list = Array.isArray(schemas) ? schemas : undefined;
11427
+ if (!list || list.length !== 1)
11428
+ return value;
11429
+ const schema = list[0];
11430
+ if (!schema || typeof schema.deserialize !== "function")
11431
+ return value;
11432
+ if (value == null || typeof value !== "object" || Array.isArray(value)) {
11433
+ return value;
11434
+ }
11435
+ try {
11436
+ return schema.deserialize(value);
11437
+ } catch {
11438
+ return value;
11439
+ }
11440
+ }
11655
11441
 
11656
11442
  class AggregateBase {
11657
11443
  value;
@@ -15325,6 +15111,17 @@ var init_dist = __esm(() => {
15325
15111
  return { msg: "array is empty" };
15326
15112
  });
15327
15113
  }
15114
+ coerce(value) {
15115
+ if (!Array.isArray(value))
15116
+ return;
15117
+ const out = [];
15118
+ for (const item of value) {
15119
+ const coerced = this.parent.coerce(item);
15120
+ if (coerced !== undefined)
15121
+ out.push(coerced);
15122
+ }
15123
+ return this.validate(out) ? undefined : out;
15124
+ }
15328
15125
  parse(value) {
15329
15126
  return value.map((v3) => this.parent.parse(v3));
15330
15127
  }
@@ -15395,6 +15192,19 @@ var init_dist = __esm(() => {
15395
15192
  ]);
15396
15193
  this.rawShape = rawShape;
15397
15194
  }
15195
+ coerce(value) {
15196
+ if (value == null || typeof value !== "object" || Array.isArray(value)) {
15197
+ return;
15198
+ }
15199
+ const src2 = value;
15200
+ const out = {};
15201
+ for (const [key, element] of Object.entries(this.rawShape)) {
15202
+ const coerced = element.coerce(src2[key]);
15203
+ if (coerced !== undefined)
15204
+ out[key] = coerced;
15205
+ }
15206
+ return this.validate(out) ? undefined : out;
15207
+ }
15398
15208
  parse(value) {
15399
15209
  return Object.entries(this.rawShape).reduce((acc, [key, element]) => {
15400
15210
  acc[key] = element.parse(value[key]);
@@ -15652,20 +15462,20 @@ var init_dist = __esm(() => {
15652
15462
  }
15653
15463
  });
15654
15464
  }
15655
- regex(regex3) {
15465
+ regex(regex2) {
15656
15466
  return this.validation("regex", (value) => {
15657
- if (!regex3.test(value)) {
15467
+ if (!regex2.test(value)) {
15658
15468
  return {
15659
15469
  currentValue: value,
15660
- regex: regex3
15470
+ regex: regex2
15661
15471
  };
15662
15472
  }
15663
15473
  });
15664
15474
  }
15665
15475
  email() {
15666
- const regex3 = /^(?:(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+)*)|(?:"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f])*"))@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$|(?:\[(?:\d{1,3}\.){3}\d{1,3}\])$/;
15476
+ const regex2 = /^(?:(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+)*)|(?:"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f])*"))@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$|(?:\[(?:\d{1,3}\.){3}\d{1,3}\])$/;
15667
15477
  return this.validation("email", (value) => {
15668
- if (!regex3.test(value)) {
15478
+ if (!regex2.test(value)) {
15669
15479
  return {
15670
15480
  currentEmail: value
15671
15481
  };
@@ -15680,9 +15490,9 @@ var init_dist = __esm(() => {
15680
15490
  return schema;
15681
15491
  }
15682
15492
  url() {
15683
- const regex3 = /^(https?):\/\/(?![-0-9])(?!www\.[0-9])(?:[a-zA-Z0-9-]+(?::[a-zA-Z0-9-]+)?@)?(?:localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b|[a-zA-Z0-9-]+\.)?[a-zA-Z0-9-]+\.(?:[a-zA-Z]{2,}|[a-zA-Z]{2}\.[a-zA-Z]{2})(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$|^(https?):\/\/(localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$/;
15493
+ const regex2 = /^(https?):\/\/(?![-0-9])(?!www\.[0-9])(?:[a-zA-Z0-9-]+(?::[a-zA-Z0-9-]+)?@)?(?:localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b|[a-zA-Z0-9-]+\.)?[a-zA-Z0-9-]+\.(?:[a-zA-Z]{2,}|[a-zA-Z]{2}\.[a-zA-Z]{2})(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$|^(https?):\/\/(localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$/;
15684
15494
  return this.validation("url", (value) => {
15685
- if (!regex3.test(value)) {
15495
+ if (!regex2.test(value)) {
15686
15496
  return {
15687
15497
  currentUrl: value
15688
15498
  };
@@ -15741,12 +15551,35 @@ var init_dist = __esm(() => {
15741
15551
  types = ["context-element"];
15742
15552
  __contextId;
15743
15553
  __contextName;
15554
+ __contextPath;
15744
15555
  get id() {
15745
15556
  return this.name;
15746
15557
  }
15558
+ __declStack;
15747
15559
  constructor(name) {
15748
15560
  super();
15749
15561
  this.name = name;
15562
+ this.__declStack = new Error().stack;
15563
+ }
15564
+ getSourceLocation() {
15565
+ const stack = this.__declStack;
15566
+ if (!stack)
15567
+ return;
15568
+ for (const raw of stack.split(`
15569
+ `).slice(1)) {
15570
+ const m4 = raw.match(/\(?((?:file:\/\/)?[^()\s]+?):(\d+):(\d+)\)?$/);
15571
+ if (!m4)
15572
+ continue;
15573
+ let file = m4[1];
15574
+ if (file.startsWith("file://"))
15575
+ file = file.slice(7);
15576
+ const isCoreInternal = /packages\/core\/(src|dist)\//.test(file) && !/\.test\.tsx?$/.test(file);
15577
+ if (file.includes("node_modules") || isCoreInternal || file.includes("native:") || !file.includes("/")) {
15578
+ continue;
15579
+ }
15580
+ return { file, line: Number(m4[2]) };
15581
+ }
15582
+ return;
15750
15583
  }
15751
15584
  _seeds;
15752
15585
  getSeeds() {
@@ -16041,7 +15874,8 @@ var init_dist = __esm(() => {
16041
15874
  scope: adapters.scope.scopeName,
16042
15875
  token: adapters.scope.getToken()
16043
15876
  } : undefined;
16044
- return await adapters.commandWire.executeCommand(this.data.name, params, wireAuth);
15877
+ const wireResult = await adapters.commandWire.executeCommand(this.data.name, serializeParams(this.data.params, params), wireAuth);
15878
+ return deserializeResult(this.data.results, wireResult);
16045
15879
  };
16046
15880
  return Object.assign(executeFunc, { params: this.data.params });
16047
15881
  }
@@ -16049,10 +15883,11 @@ var init_dist = __esm(() => {
16049
15883
  if (!this.data.handler) {
16050
15884
  throw new Error(`Command "${this.data.name}" has no handler`);
16051
15885
  }
16052
- this.#fn.validateParams(params);
15886
+ const input = deserializeParams(this.data.params, params);
15887
+ this.#fn.validateParams(input);
16053
15888
  await this.#fn.authorize(adapters);
16054
15889
  const context2 = this.buildCommandContext(adapters);
16055
- return await this.data.handler(context2, params);
15890
+ return await this.data.handler(context2, input);
16056
15891
  }
16057
15892
  buildCommandContext(adapters) {
16058
15893
  const context2 = this.#fn.buildContext(adapters);
@@ -16617,7 +16452,7 @@ var init_dist = __esm(() => {
16617
16452
  this.reinitTablesExecuted = false;
16618
16453
  }
16619
16454
  };
16620
- dateValidator = typeValidatorBuilder("Date", (value) => value instanceof Date);
16455
+ dateValidator = typeValidatorBuilder("Date", (value) => value instanceof Date && !isNaN(value.getTime()));
16621
16456
  _te = new TextEncoder;
16622
16457
  _td = new TextDecoder;
16623
16458
  originCache = new Map;
@@ -18459,9 +18294,12 @@ class LocalEventPublisher3 {
18459
18294
  store: EVENT_TABLES2.events,
18460
18295
  changes: [{ type: "set", data: storedEvent }]
18461
18296
  });
18462
- if (event.payload && typeof event.payload === "object") {
18297
+ const tagFields = event.definition?.tagFields ?? [];
18298
+ if (tagFields.length > 0 && event.payload && typeof event.payload === "object") {
18299
+ const payload = event.payload;
18463
18300
  const tagChanges = [];
18464
- for (const [key, value] of Object.entries(event.payload)) {
18301
+ for (const key of tagFields) {
18302
+ const value = payload[key];
18465
18303
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
18466
18304
  tagChanges.push({
18467
18305
  type: "set",
@@ -18686,6 +18524,11 @@ class ArcOptional2 {
18686
18524
  return false;
18687
18525
  return this.parent.validate(value);
18688
18526
  }
18527
+ coerce(value) {
18528
+ if (value == null)
18529
+ return;
18530
+ return this.parent.coerce(value);
18531
+ }
18689
18532
  toJsonSchema() {
18690
18533
  const parentSchema = this.parent.toJsonSchema?.() ?? {};
18691
18534
  return {
@@ -18732,6 +18575,9 @@ class ArcBranded2 {
18732
18575
  validate(value) {
18733
18576
  return this.parent.validate(value);
18734
18577
  }
18578
+ coerce(value) {
18579
+ return this.parent.coerce(value);
18580
+ }
18735
18581
  toJsonSchema() {
18736
18582
  return this.parent.toJsonSchema?.() ?? {};
18737
18583
  }
@@ -18756,6 +18602,11 @@ class ArcDefault2 {
18756
18602
  return false;
18757
18603
  return this.parent.validate(value);
18758
18604
  }
18605
+ coerce(value) {
18606
+ if (value === undefined || value === null)
18607
+ return;
18608
+ return this.parent.coerce(value);
18609
+ }
18759
18610
  parse(value) {
18760
18611
  if (value)
18761
18612
  return this.parent.parse(value);
@@ -18838,6 +18689,9 @@ class ArcAbstract2 {
18838
18689
  }
18839
18690
  return false;
18840
18691
  }
18692
+ coerce(value) {
18693
+ return this.validate(value) ? undefined : value;
18694
+ }
18841
18695
  pipeValidation(name, validator) {
18842
18696
  const newInstance = this.clone();
18843
18697
  newInstance.validations = [...this.validations, { name, validator }];
@@ -18991,6 +18845,25 @@ class ScopedStore2 {
18991
18845
  }
18992
18846
  }
18993
18847
  }
18848
+ function collectFieldPaths2(errors, prefix = "") {
18849
+ if (!errors || typeof errors !== "object")
18850
+ return [];
18851
+ const schema = errors.schema;
18852
+ if (!schema || typeof schema !== "object")
18853
+ return [];
18854
+ const out = [];
18855
+ for (const [field, fieldError] of Object.entries(schema)) {
18856
+ if (!fieldError)
18857
+ continue;
18858
+ const path4 = prefix ? `${prefix}.${field}` : field;
18859
+ const nested = collectFieldPaths2(fieldError, path4);
18860
+ if (nested.length > 0)
18861
+ out.push(...nested);
18862
+ else
18863
+ out.push(path4);
18864
+ }
18865
+ return out;
18866
+ }
18994
18867
  function string2() {
18995
18868
  return new ArcString2;
18996
18869
  }
@@ -19172,6 +19045,34 @@ class ArcFunction2 {
19172
19045
  };
19173
19046
  }
19174
19047
  }
19048
+ function serializeParams2(schema, params) {
19049
+ if (schema && typeof schema.serialize === "function") {
19050
+ return schema.serialize(params ?? {});
19051
+ }
19052
+ return params;
19053
+ }
19054
+ function deserializeParams2(schema, params) {
19055
+ if (schema && typeof schema.deserialize === "function") {
19056
+ return schema.deserialize(params ?? {});
19057
+ }
19058
+ return params;
19059
+ }
19060
+ function deserializeResult2(schemas, value) {
19061
+ const list = Array.isArray(schemas) ? schemas : undefined;
19062
+ if (!list || list.length !== 1)
19063
+ return value;
19064
+ const schema = list[0];
19065
+ if (!schema || typeof schema.deserialize !== "function")
19066
+ return value;
19067
+ if (value == null || typeof value !== "object" || Array.isArray(value)) {
19068
+ return value;
19069
+ }
19070
+ try {
19071
+ return schema.deserialize(value);
19072
+ } catch {
19073
+ return value;
19074
+ }
19075
+ }
19175
19076
 
19176
19077
  class AggregateBase2 {
19177
19078
  value;
@@ -19308,16 +19209,57 @@ function resolveQueryChange2(currentResult, event3, options) {
19308
19209
  }
19309
19210
  const shouldBeInResult = checkItemMatchesWhere2(event3.item, options.where);
19310
19211
  if (isInCurrentResult && shouldBeInResult) {
19311
- const newResult = currentResult.toSpliced(index, 1, event3.item);
19312
- return applyOrderByAndLimit(newResult, options);
19212
+ if (!options.orderBy) {
19213
+ return applyLimit2(currentResult.toSpliced(index, 1, event3.item), options);
19214
+ }
19215
+ const cmp = compareByOrderBy2(options.orderBy);
19216
+ if (cmp(currentResult[index], event3.item) === 0) {
19217
+ return applyLimit2(currentResult.toSpliced(index, 1, event3.item), options);
19218
+ }
19219
+ const without = currentResult.toSpliced(index, 1);
19220
+ const at = upperBound2(without, event3.item, cmp);
19221
+ return applyLimit2(without.toSpliced(at, 0, event3.item), options);
19313
19222
  } else if (isInCurrentResult && !shouldBeInResult) {
19314
19223
  return currentResult.toSpliced(index, 1);
19315
19224
  } else if (!isInCurrentResult && shouldBeInResult) {
19316
- const newResult = [...currentResult, event3.item];
19317
- return applyOrderByAndLimit(newResult, options);
19225
+ if (!options.orderBy) {
19226
+ return applyLimit2([...currentResult, event3.item], options);
19227
+ }
19228
+ const cmp = compareByOrderBy2(options.orderBy);
19229
+ const at = upperBound2(currentResult, event3.item, cmp);
19230
+ return applyLimit2(currentResult.toSpliced(at, 0, event3.item), options);
19318
19231
  }
19319
19232
  return false;
19320
19233
  }
19234
+ function compareByOrderBy2(orderBy) {
19235
+ const entries = Object.entries(orderBy);
19236
+ return (a2, b4) => {
19237
+ for (const [key, direction] of entries) {
19238
+ const aVal = a2[key];
19239
+ const bVal = b4[key];
19240
+ if (aVal < bVal)
19241
+ return direction === "asc" ? -1 : 1;
19242
+ if (aVal > bVal)
19243
+ return direction === "asc" ? 1 : -1;
19244
+ }
19245
+ return 0;
19246
+ };
19247
+ }
19248
+ function upperBound2(arr, item, cmp) {
19249
+ let lo = 0;
19250
+ let hi = arr.length;
19251
+ while (lo < hi) {
19252
+ const mid = lo + hi >> 1;
19253
+ if (cmp(arr[mid], item) <= 0)
19254
+ lo = mid + 1;
19255
+ else
19256
+ hi = mid;
19257
+ }
19258
+ return lo;
19259
+ }
19260
+ function applyLimit2(result, options) {
19261
+ return options.limit !== undefined && result.length > options.limit ? result.slice(0, options.limit) : result;
19262
+ }
19321
19263
  function checkItemMatchesWhere2(item, where) {
19322
19264
  if (!where) {
19323
19265
  return true;
@@ -19353,26 +19295,6 @@ function checkItemMatchesWhere2(item, where) {
19353
19295
  });
19354
19296
  });
19355
19297
  }
19356
- function applyOrderByAndLimit(result, options) {
19357
- let sorted = result;
19358
- if (options.orderBy) {
19359
- sorted = [...result].sort((a2, b4) => {
19360
- for (const [key, direction] of Object.entries(options.orderBy)) {
19361
- const aVal = a2[key];
19362
- const bVal = b4[key];
19363
- if (aVal < bVal)
19364
- return direction === "asc" ? -1 : 1;
19365
- if (aVal > bVal)
19366
- return direction === "asc" ? 1 : -1;
19367
- }
19368
- return 0;
19369
- });
19370
- }
19371
- if (options.limit !== undefined) {
19372
- sorted = sorted.slice(0, options.limit);
19373
- }
19374
- return sorted;
19375
- }
19376
19298
 
19377
19299
  class ObservableDataStorage2 {
19378
19300
  source;
@@ -21200,6 +21122,17 @@ var init_dist2 = __esm(() => {
21200
21122
  return { msg: "array is empty" };
21201
21123
  });
21202
21124
  }
21125
+ coerce(value) {
21126
+ if (!Array.isArray(value))
21127
+ return;
21128
+ const out = [];
21129
+ for (const item of value) {
21130
+ const coerced = this.parent.coerce(item);
21131
+ if (coerced !== undefined)
21132
+ out.push(coerced);
21133
+ }
21134
+ return this.validate(out) ? undefined : out;
21135
+ }
21203
21136
  parse(value) {
21204
21137
  return value.map((v3) => this.parent.parse(v3));
21205
21138
  }
@@ -21270,6 +21203,19 @@ var init_dist2 = __esm(() => {
21270
21203
  ]);
21271
21204
  this.rawShape = rawShape;
21272
21205
  }
21206
+ coerce(value) {
21207
+ if (value == null || typeof value !== "object" || Array.isArray(value)) {
21208
+ return;
21209
+ }
21210
+ const src2 = value;
21211
+ const out = {};
21212
+ for (const [key, element] of Object.entries(this.rawShape)) {
21213
+ const coerced = element.coerce(src2[key]);
21214
+ if (coerced !== undefined)
21215
+ out[key] = coerced;
21216
+ }
21217
+ return this.validate(out) ? undefined : out;
21218
+ }
21273
21219
  parse(value) {
21274
21220
  return Object.entries(this.rawShape).reduce((acc, [key, element]) => {
21275
21221
  acc[key] = element.parse(value[key]);
@@ -21449,7 +21395,8 @@ var init_dist2 = __esm(() => {
21449
21395
  constructor(errors, message = "Invalid parameters") {
21450
21396
  super(message);
21451
21397
  this.name = "ArcValidationError";
21452
- this.fields = errors && typeof errors === "object" ? Object.keys(errors) : [];
21398
+ const paths = collectFieldPaths2(errors);
21399
+ this.fields = paths.length > 0 ? paths : errors && typeof errors === "object" ? Object.keys(errors) : [];
21453
21400
  }
21454
21401
  };
21455
21402
  ArcPrimitive2 = class ArcPrimitive2 extends ArcAbstract2 {
@@ -21526,20 +21473,20 @@ var init_dist2 = __esm(() => {
21526
21473
  }
21527
21474
  });
21528
21475
  }
21529
- regex(regex3) {
21476
+ regex(regex2) {
21530
21477
  return this.validation("regex", (value) => {
21531
- if (!regex3.test(value)) {
21478
+ if (!regex2.test(value)) {
21532
21479
  return {
21533
21480
  currentValue: value,
21534
- regex: regex3
21481
+ regex: regex2
21535
21482
  };
21536
21483
  }
21537
21484
  });
21538
21485
  }
21539
21486
  email() {
21540
- const regex3 = /^(?:(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+)*)|(?:"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f])*"))@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$|(?:\[(?:\d{1,3}\.){3}\d{1,3}\])$/;
21487
+ const regex2 = /^(?:(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+)*)|(?:"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f])*"))@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$|(?:\[(?:\d{1,3}\.){3}\d{1,3}\])$/;
21541
21488
  return this.validation("email", (value) => {
21542
- if (!regex3.test(value)) {
21489
+ if (!regex2.test(value)) {
21543
21490
  return {
21544
21491
  currentEmail: value
21545
21492
  };
@@ -21554,9 +21501,9 @@ var init_dist2 = __esm(() => {
21554
21501
  return schema;
21555
21502
  }
21556
21503
  url() {
21557
- const regex3 = /^(https?):\/\/(?![-0-9])(?!www\.[0-9])(?:[a-zA-Z0-9-]+(?::[a-zA-Z0-9-]+)?@)?(?:localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b|[a-zA-Z0-9-]+\.)?[a-zA-Z0-9-]+\.(?:[a-zA-Z]{2,}|[a-zA-Z]{2}\.[a-zA-Z]{2})(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$|^(https?):\/\/(localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$/;
21504
+ const regex2 = /^(https?):\/\/(?![-0-9])(?!www\.[0-9])(?:[a-zA-Z0-9-]+(?::[a-zA-Z0-9-]+)?@)?(?:localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b|[a-zA-Z0-9-]+\.)?[a-zA-Z0-9-]+\.(?:[a-zA-Z]{2,}|[a-zA-Z]{2}\.[a-zA-Z]{2})(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$|^(https?):\/\/(localhost|\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)(?::\d{1,5})?(?!\/\/)(?:\/[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(?!\/{2})(?:;[a-zA-Z0-9-._~:?#\[\]@!$&'()*+,;=]*)*(\?(?!=)[a-zA-Z0-9&=;]*)?(\#[a-zA-Z0-9-]*)?$/;
21558
21505
  return this.validation("url", (value) => {
21559
- if (!regex3.test(value)) {
21506
+ if (!regex2.test(value)) {
21560
21507
  return {
21561
21508
  currentUrl: value
21562
21509
  };
@@ -21615,12 +21562,35 @@ var init_dist2 = __esm(() => {
21615
21562
  types = ["context-element"];
21616
21563
  __contextId;
21617
21564
  __contextName;
21565
+ __contextPath;
21618
21566
  get id() {
21619
21567
  return this.name;
21620
21568
  }
21569
+ __declStack;
21621
21570
  constructor(name) {
21622
21571
  super();
21623
21572
  this.name = name;
21573
+ this.__declStack = new Error().stack;
21574
+ }
21575
+ getSourceLocation() {
21576
+ const stack = this.__declStack;
21577
+ if (!stack)
21578
+ return;
21579
+ for (const raw of stack.split(`
21580
+ `).slice(1)) {
21581
+ const m4 = raw.match(/\(?((?:file:\/\/)?[^()\s]+?):(\d+):(\d+)\)?$/);
21582
+ if (!m4)
21583
+ continue;
21584
+ let file = m4[1];
21585
+ if (file.startsWith("file://"))
21586
+ file = file.slice(7);
21587
+ const isCoreInternal = /packages\/core\/(src|dist)\//.test(file) && !/\.test\.tsx?$/.test(file);
21588
+ if (file.includes("node_modules") || isCoreInternal || file.includes("native:") || !file.includes("/")) {
21589
+ continue;
21590
+ }
21591
+ return { file, line: Number(m4[2]) };
21592
+ }
21593
+ return;
21624
21594
  }
21625
21595
  _seeds;
21626
21596
  getSeeds() {
@@ -21752,7 +21722,8 @@ var init_dist2 = __esm(() => {
21752
21722
  payload,
21753
21723
  id: this.eventId.generate(),
21754
21724
  createdAt: new Date,
21755
- authContext
21725
+ authContext,
21726
+ definition: this
21756
21727
  };
21757
21728
  await adapters.eventPublisher.publish(event);
21758
21729
  }
@@ -21805,8 +21776,8 @@ var init_dist2 = __esm(() => {
21805
21776
  const tagsSchema = new ArcObject2({
21806
21777
  _id: new ArcString2().primaryKey(),
21807
21778
  eventId: new ArcString2().index(),
21808
- tagKey: new ArcString2().index(),
21809
- tagValue: new ArcString2().index()
21779
+ tagKey: new ArcString2,
21780
+ tagValue: new ArcString2
21810
21781
  });
21811
21782
  const syncStatusSchema = new ArcObject2({
21812
21783
  _id: new ArcString2().primaryKey(),
@@ -21914,7 +21885,8 @@ var init_dist2 = __esm(() => {
21914
21885
  scope: adapters.scope.scopeName,
21915
21886
  token: adapters.scope.getToken()
21916
21887
  } : undefined;
21917
- return await adapters.commandWire.executeCommand(this.data.name, params, wireAuth);
21888
+ const wireResult = await adapters.commandWire.executeCommand(this.data.name, serializeParams2(this.data.params, params), wireAuth);
21889
+ return deserializeResult2(this.data.results, wireResult);
21918
21890
  };
21919
21891
  return Object.assign(executeFunc, { params: this.data.params });
21920
21892
  }
@@ -21922,10 +21894,11 @@ var init_dist2 = __esm(() => {
21922
21894
  if (!this.data.handler) {
21923
21895
  throw new Error(`Command "${this.data.name}" has no handler`);
21924
21896
  }
21925
- this.#fn.validateParams(params);
21897
+ const input = deserializeParams2(this.data.params, params);
21898
+ this.#fn.validateParams(input);
21926
21899
  await this.#fn.authorize(adapters);
21927
21900
  const context2 = this.buildCommandContext(adapters);
21928
- return await this.data.handler(context2, params);
21901
+ return await this.data.handler(context2, input);
21929
21902
  }
21930
21903
  buildCommandContext(adapters) {
21931
21904
  const context2 = this.#fn.buildContext(adapters);
@@ -22490,7 +22463,7 @@ var init_dist2 = __esm(() => {
22490
22463
  this.reinitTablesExecuted = false;
22491
22464
  }
22492
22465
  };
22493
- dateValidator2 = typeValidatorBuilder2("Date", (value) => value instanceof Date);
22466
+ dateValidator2 = typeValidatorBuilder2("Date", (value) => value instanceof Date && !isNaN(value.getTime()));
22494
22467
  _te2 = new TextEncoder;
22495
22468
  _td2 = new TextDecoder;
22496
22469
  SQLiteReadWriteTransaction = class SQLiteReadWriteTransaction extends SQLiteReadTransaction {
@@ -23088,7 +23061,7 @@ var {
23088
23061
  // ../../node_modules/.bun/find-up@7.0.0/node_modules/find-up/index.js
23089
23062
  import path2 from "path";
23090
23063
 
23091
- // ../../node_modules/.bun/find-up@7.0.0/node_modules/find-up/node_modules/locate-path/index.js
23064
+ // ../../node_modules/.bun/locate-path@7.2.0/node_modules/locate-path/index.js
23092
23065
  import process2 from "process";
23093
23066
  import path from "path";
23094
23067
  import fs, { promises as fsPromises } from "fs";
@@ -31801,7 +31774,8 @@ async function buildServerApp(rootDir, serverDir, packages, cache, noCache) {
31801
31774
  members: packages.map((p) => ({ name: p.name, src: pkgSourceHash(p) })).sort((a, b) => a.name.localeCompare(b.name)),
31802
31775
  contexts: contexts.map((p) => p.name).sort(),
31803
31776
  external: [...external].sort(),
31804
- defines: SERVER_DEFINES
31777
+ defines: SERVER_DEFINES,
31778
+ sourcemap: "linked"
31805
31779
  });
31806
31780
  const entryFileAbs = join8(serverDir, SERVER_ENTRY_FILE);
31807
31781
  const externalsFileAbs = join8(serverDir, SERVER_EXTERNALS_FILE);
@@ -31815,8 +31789,9 @@ async function buildServerApp(rootDir, serverDir, packages, cache, noCache) {
31815
31789
  }
31816
31790
  console.log(` building: ${unitId} (${contexts.length} server modules)`);
31817
31791
  for (const f of readdirSync4(serverDir)) {
31818
- if (f.endsWith(".js"))
31792
+ if (f.endsWith(".js") || f.endsWith(".js.map")) {
31819
31793
  rmSync2(join8(serverDir, f), { force: true });
31794
+ }
31820
31795
  }
31821
31796
  const tmpDir = join8(serverDir, "_entries");
31822
31797
  mkdirSync6(tmpDir, { recursive: true });
@@ -31834,6 +31809,7 @@ async function buildServerApp(rootDir, serverDir, packages, cache, noCache) {
31834
31809
  format: "esm",
31835
31810
  splitting: true,
31836
31811
  naming: "[name].[ext]",
31812
+ sourcemap: "linked",
31837
31813
  external,
31838
31814
  plugins: [
31839
31815
  jsxDevShimPlugin(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcote.tech/arc-cli",
3
- "version": "0.7.28",
3
+ "version": "0.7.30",
4
4
  "description": "CLI tool for Arc framework",
5
5
  "module": "index.ts",
6
6
  "main": "dist/index.js",
@@ -12,13 +12,13 @@
12
12
  "build": "bun build --target=bun ./src/index.ts --outdir=dist --external @arcote.tech/arc --external @arcote.tech/arc-ds --external @arcote.tech/arc-react --external @arcote.tech/platform --external @arcote.tech/arc-map --external '@opentelemetry/*' && chmod +x dist/index.js"
13
13
  },
14
14
  "dependencies": {
15
- "@arcote.tech/arc": "^0.7.28",
16
- "@arcote.tech/arc-ds": "^0.7.28",
17
- "@arcote.tech/arc-react": "^0.7.28",
18
- "@arcote.tech/arc-host": "^0.7.28",
19
- "@arcote.tech/arc-adapter-db-sqlite": "^0.7.28",
20
- "@arcote.tech/arc-adapter-db-postgres": "^0.7.28",
21
- "@arcote.tech/arc-otel": "^0.7.28",
15
+ "@arcote.tech/arc": "^0.7.30",
16
+ "@arcote.tech/arc-ds": "^0.7.30",
17
+ "@arcote.tech/arc-react": "^0.7.30",
18
+ "@arcote.tech/arc-host": "^0.7.30",
19
+ "@arcote.tech/arc-adapter-db-sqlite": "^0.7.30",
20
+ "@arcote.tech/arc-adapter-db-postgres": "^0.7.30",
21
+ "@arcote.tech/arc-otel": "^0.7.30",
22
22
  "@opentelemetry/api": "^1.9.0",
23
23
  "@opentelemetry/api-logs": "^0.57.0",
24
24
  "@opentelemetry/core": "^1.30.0",
@@ -31,8 +31,8 @@
31
31
  "@opentelemetry/sdk-trace-base": "^1.30.0",
32
32
  "@opentelemetry/sdk-trace-node": "^1.30.0",
33
33
  "@opentelemetry/semantic-conventions": "^1.27.0",
34
- "@arcote.tech/platform": "^0.7.28",
35
- "@arcote.tech/arc-map": "^0.7.28",
34
+ "@arcote.tech/platform": "^0.7.30",
35
+ "@arcote.tech/arc-map": "^0.7.30",
36
36
  "@clack/prompts": "^0.9.0",
37
37
  "commander": "^11.1.0",
38
38
  "chokidar": "^3.5.3",
@@ -632,6 +632,7 @@ export async function buildServerApp(
632
632
  contexts: contexts.map((p) => p.name).sort(),
633
633
  external: [...external].sort(),
634
634
  defines: SERVER_DEFINES,
635
+ sourcemap: "linked",
635
636
  });
636
637
 
637
638
  const entryFileAbs = join(serverDir, SERVER_ENTRY_FILE);
@@ -650,10 +651,12 @@ export async function buildServerApp(
650
651
 
651
652
  console.log(` building: ${unitId} (${contexts.length} server modules)`);
652
653
 
653
- // Wipe stale .js — old per-package flattened bundles AND previous chunks —
654
- // so a smaller rebuild never leaves orphaned content-addressed chunks behind.
654
+ // Wipe stale .js/.map — old per-package flattened bundles AND previous
655
+ // chunks — so a smaller rebuild never leaves orphaned artifacts behind.
655
656
  for (const f of readdirSync(serverDir)) {
656
- if (f.endsWith(".js")) rmSync(join(serverDir, f), { force: true });
657
+ if (f.endsWith(".js") || f.endsWith(".js.map")) {
658
+ rmSync(join(serverDir, f), { force: true });
659
+ }
657
660
  }
658
661
 
659
662
  // Entry side-effect-imports every context module so each registers via the
@@ -682,6 +685,9 @@ export async function buildServerApp(
682
685
  // in chunk-<hash>.js referenced by the entry.
683
686
  splitting: true,
684
687
  naming: "[name].[ext]",
688
+ // Linked source mapy: Bun mapuje stacki na oryginalne .ts natywnie —
689
+ // getSourceLocation() elementów wskazuje wtedy pliki źródłowe aplikacji.
690
+ sourcemap: "linked",
685
691
  external,
686
692
  plugins: [
687
693
  jsxDevShimPlugin(),