bdy 1.25.38-dev-pr → 1.25.39-dev

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.
Files changed (107) hide show
  1. package/distTs/package.json +1 -2
  2. package/distTs/src/api/client.js +17 -191
  3. package/distTs/src/cliError.js +0 -5
  4. package/distTs/src/cliIndex.js +0 -3
  5. package/distTs/src/command/artifact/version/create.js +28 -1
  6. package/distTs/src/command/artifact/version/get.js +1 -0
  7. package/distTs/src/command/artifact/version/list.js +2 -1
  8. package/distTs/src/command/login.js +1 -1
  9. package/distTs/src/input.js +15 -0
  10. package/distTs/src/output/pipeline.js +56 -54
  11. package/distTs/src/output.js +22 -72
  12. package/distTs/src/texts.js +37 -472
  13. package/distTs/src/tunnel/output/interactive/tunnel.js +10 -14
  14. package/distTs/src/tunnel/output/noninteractive/tunnel.js +1 -3
  15. package/distTs/src/utils.js +12 -133
  16. package/package.json +1 -2
  17. package/distTs/src/autocomplete.js +0 -90
  18. package/distTs/src/command/artifact/downloadDir.js +0 -110
  19. package/distTs/src/command/autocomplete/install.js +0 -16
  20. package/distTs/src/command/autocomplete/uninstall.js +0 -16
  21. package/distTs/src/command/autocomplete.js +0 -14
  22. package/distTs/src/command/environment/resolve.js +0 -39
  23. package/distTs/src/command/package/create.js +0 -64
  24. package/distTs/src/command/package/delete.js +0 -38
  25. package/distTs/src/command/package/docker/login.js +0 -26
  26. package/distTs/src/command/package/docker.js +0 -11
  27. package/distTs/src/command/package/download.js +0 -138
  28. package/distTs/src/command/package/get.js +0 -36
  29. package/distTs/src/command/package/list.js +0 -31
  30. package/distTs/src/command/package/publish.js +0 -241
  31. package/distTs/src/command/package/version/delete.js +0 -39
  32. package/distTs/src/command/package/version/get.js +0 -45
  33. package/distTs/src/command/package/version/list.js +0 -47
  34. package/distTs/src/command/package/version.js +0 -16
  35. package/distTs/src/command/package.js +0 -26
  36. package/distTs/src/command/pipeline/run/apply.js +0 -62
  37. package/distTs/src/command/pr/comment/add.js +0 -66
  38. package/distTs/src/command/pr/comment/list.js +0 -169
  39. package/distTs/src/command/pr/comment/status.js +0 -48
  40. package/distTs/src/command/pr/comment.js +0 -19
  41. package/distTs/src/command/pr/create.js +0 -43
  42. package/distTs/src/command/pr/diff.js +0 -227
  43. package/distTs/src/command/pr/file/list.js +0 -124
  44. package/distTs/src/command/pr/file/mark.js +0 -45
  45. package/distTs/src/command/pr/file.js +0 -16
  46. package/distTs/src/command/pr/get.js +0 -29
  47. package/distTs/src/command/pr/list.js +0 -79
  48. package/distTs/src/command/pr/merge.js +0 -66
  49. package/distTs/src/command/pr/review/request.js +0 -29
  50. package/distTs/src/command/pr/review/start.js +0 -29
  51. package/distTs/src/command/pr/review/verdict.js +0 -81
  52. package/distTs/src/command/pr/review.js +0 -18
  53. package/distTs/src/command/pr/shared.js +0 -595
  54. package/distTs/src/command/pr/state.js +0 -38
  55. package/distTs/src/command/pr/summary.js +0 -316
  56. package/distTs/src/command/pr/update.js +0 -54
  57. package/distTs/src/command/pr/updateBranch.js +0 -22
  58. package/distTs/src/command/pr/versions.js +0 -42
  59. package/distTs/src/command/pr.js +0 -39
  60. package/distTs/src/command/scrape/validation.js +0 -154
  61. package/distTs/src/command/scrape.js +0 -144
  62. package/distTs/src/command/suiteLink.js +0 -14
  63. package/distTs/src/command/tests/visual/result/download.js +0 -31
  64. package/distTs/src/command/tests/visual/result/get.js +0 -68
  65. package/distTs/src/command/tests/visual/result/list.js +0 -49
  66. package/distTs/src/command/tests/visual/result.js +0 -23
  67. package/distTs/src/command/tests/visual/session/get.js +0 -70
  68. package/distTs/src/command/tests/visual/session/list.js +0 -69
  69. package/distTs/src/command/tests/visual/session/open.js +0 -22
  70. package/distTs/src/command/tests/visual/session/reviewUrl.js +0 -37
  71. package/distTs/src/command/tests/visual/session/update.js +0 -26
  72. package/distTs/src/command/tests/visual/shared/context.js +0 -144
  73. package/distTs/src/command/tests/visual/shared/diffRegions.js +0 -172
  74. package/distTs/src/command/tests/visual/shared/format.js +0 -21
  75. package/distTs/src/command/tests/visual/shared/lookup.js +0 -107
  76. package/distTs/src/command/tests/visual/shared/options.js +0 -90
  77. package/distTs/src/command/tests/visual/shared/review.js +0 -146
  78. package/distTs/src/command/tests/visual/shared/reviewUrl.js +0 -62
  79. package/distTs/src/command/tests/visual/shared/session.js +0 -217
  80. package/distTs/src/command/tests/visual/snapshot/get.js +0 -46
  81. package/distTs/src/command/tests/visual/snapshot/list.js +0 -68
  82. package/distTs/src/command/tests/visual/snapshot/open.js +0 -26
  83. package/distTs/src/command/tests/visual/snapshot/reviewUrl.js +0 -48
  84. package/distTs/src/command/tests/visual/snapshot.js +0 -28
  85. package/distTs/src/command/tests/visual/suite/create.js +0 -38
  86. package/distTs/src/command/tests/visual/suite/delete.js +0 -29
  87. package/distTs/src/command/tests/visual/suite/get.js +0 -43
  88. package/distTs/src/command/tests/visual/suite/list.js +0 -35
  89. package/distTs/src/command/tests/visual/suite/open.js +0 -20
  90. package/distTs/src/command/tests/visual/suite/update.js +0 -47
  91. package/distTs/src/command/tests/visual/suite.js +0 -30
  92. package/distTs/src/command/ut/upload.js +0 -86
  93. package/distTs/src/command/ut.js +0 -12
  94. package/distTs/src/command/vt/close.js +0 -27
  95. package/distTs/src/command/vt/compare/validation.js +0 -46
  96. package/distTs/src/command/vt/compare.js +0 -100
  97. package/distTs/src/command/vt/exec.js +0 -82
  98. package/distTs/src/command/vt/installBrowser.js +0 -20
  99. package/distTs/src/command/vt/shared/validation.js +0 -145
  100. package/distTs/src/command/vt/storybook.js +0 -138
  101. package/distTs/src/command/vt.js +0 -20
  102. package/distTs/src/command/yaml/agents.js +0 -88
  103. package/distTs/src/command/yaml/init.js +0 -110
  104. package/distTs/src/main.js +0 -190
  105. package/distTs/src/types/options.js +0 -2
  106. package/distTs/src/types/scrape.js +0 -2
  107. package/distTs/src/types/visualTests.js +0 -2
@@ -98,61 +98,61 @@ class Output {
98
98
  return chalk_1.default.hex('#00C9FF')(text);
99
99
  }
100
100
  static getTermKitCyanColor(text) {
101
- return `^C${this.escapeTermKit(text)}^:`;
101
+ return `^C${text}^:`;
102
102
  }
103
103
  static getBlueColor(text) {
104
104
  return chalk_1.default.hex('#1A86FD')(text);
105
105
  }
106
106
  static getTermKitBlueColor(text) {
107
- return `^B${this.escapeTermKit(text)}^:`;
107
+ return `^B${text}^:`;
108
108
  }
109
109
  static getPurpleColor(text) {
110
110
  return chalk_1.default.hex('#A06BC4')(text);
111
111
  }
112
112
  static getTermKitPurpleColor(text) {
113
- return `^M${this.escapeTermKit(text)}^:`;
113
+ return `^M${text}^:`;
114
114
  }
115
115
  static getMutedColor(text) {
116
116
  return chalk_1.default.hex('#8B8D98')(text);
117
117
  }
118
118
  static getTermKitMutedColor(text) {
119
- return `^w${this.escapeTermKit(text)}^:`;
119
+ return `^w${text}^:`;
120
120
  }
121
121
  static getDimColor(text) {
122
122
  return chalk_1.default.hex('#4A4A4A')(text);
123
123
  }
124
124
  static getTermKitDimColor(text) {
125
- return `^K${this.escapeTermKit(text)}^:`;
125
+ return `^K${text}^:`;
126
126
  }
127
127
  static getArgColor(text) {
128
128
  return chalk_1.default.hex('#5A8AB5')(text);
129
129
  }
130
130
  static getTermKitArgColor(text) {
131
- return `^B${this.escapeTermKit(text)}^:`;
131
+ return `^B${text}^:`;
132
132
  }
133
133
  static getLabelColor(text) {
134
134
  return chalk_1.default.hex('#D1D5DB')(text);
135
135
  }
136
136
  static getTermKitLabelColor(text) {
137
- return `^W${this.escapeTermKit(text)}^:`;
137
+ return `^W${text}^:`;
138
138
  }
139
139
  static getGreenColor(text) {
140
140
  return chalk_1.default.greenBright(text);
141
141
  }
142
142
  static getTermKitGreenColor(text) {
143
- return `^G${this.escapeTermKit(text)}^:`;
143
+ return `^G${text}^:`;
144
144
  }
145
145
  static getYellowColor(text) {
146
146
  return chalk_1.default.yellow(text);
147
147
  }
148
148
  static getTermKitYellowColor(text) {
149
- return `^Y${this.escapeTermKit(text)}^:`;
149
+ return `^Y${text}^:`;
150
150
  }
151
151
  static getRedColor(text) {
152
152
  return chalk_1.default.redBright(text);
153
153
  }
154
154
  static getTermKitRedColor(text) {
155
- return `^R${this.escapeTermKit(text)}^:`;
155
+ return `^R${text}^:`;
156
156
  }
157
157
  static getInquirerTheme() {
158
158
  return {
@@ -191,7 +191,7 @@ class Output {
191
191
  this.clearUndici();
192
192
  this.clearTerminal();
193
193
  if (msg)
194
- process.stdout.write(`${msg}\n`);
194
+ getTerminal()(`${msg}\n`);
195
195
  process.exit(0);
196
196
  }
197
197
  static exitCode(code) {
@@ -200,29 +200,17 @@ class Output {
200
200
  process.exit(code);
201
201
  }
202
202
  static newline() {
203
- process.stdout.write('\n');
203
+ getTerminal()('\n');
204
204
  this.inlineOutput = false;
205
205
  }
206
206
  static muted(txt, newLine = true) {
207
207
  this.normal(this.getMutedColor(txt), newLine);
208
208
  }
209
- // Plain text, colored with chalk (the get*Color helpers). Written as is:
210
- // terminal-kit would read ^x as markup and % as printf formatting, and so
211
- // drop characters from user content and code (a ^ with the character after
212
- // it, e.g. [^/]+ shown as []+).
213
209
  static normal(txt, newLine = true) {
214
- process.stdout.write(newLine ? `${txt}\n` : txt);
215
- this.inlineOutput = !newLine;
216
- }
217
- // Text with terminal-kit markup, built with the getTermKit*Color helpers
218
- // (they escape what they color). markupOnly: ^ markup without printf
219
- // formatting, the same as ScreenBuffer.put, so one escaped string renders
220
- // the same in both.
221
- static markup(txt, newLine = true) {
222
210
  let msg = txt;
223
211
  if (newLine)
224
212
  msg += '\n';
225
- getTerminal().markupOnly(msg);
213
+ getTerminal()(msg);
226
214
  this.inlineOutput = !newLine;
227
215
  }
228
216
  static progress(quiet, output = this.normal.bind(this)) {
@@ -251,11 +239,13 @@ class Output {
251
239
  return this.data(`No examples for ${command}.`);
252
240
  this.data(`EXAMPLES:\n${examples.map((example) => ` ### ${example.description}\n ${example.command}`).join('\n')}`);
253
241
  }
254
- // Payload inside terminal-kit markup renders verbatim: ^^ is a literal ^.
255
- // % needs nothing, neither markup() nor ScreenBuffer.put printf-formats.
256
- // The getTermKit*Color helpers call it on their text.
242
+ // For payload embedded in terminal-kit markup (e.g. a dimmed log line):
243
+ // neutralizes the ^-markup and %-formatting the payload would otherwise
244
+ // trigger, so it renders verbatim while the surrounding markup still
245
+ // works. Only for strings printed via terminal() - ScreenBuffer.put does
246
+ // not printf-format, so there %% would render double.
257
247
  static escapeTermKit(txt) {
258
- return txt.replace(/\^/g, '^^');
248
+ return txt.replace(/[%^]/g, '$&$&');
259
249
  }
260
250
  static writeStderr(txt) {
261
251
  process.stderr.write(`${txt}\n`);
@@ -389,7 +379,7 @@ class Output {
389
379
  if (!this.s && this.isTTY()) {
390
380
  this.s = await getTerminal().spinner();
391
381
  if (txt)
392
- process.stdout.write(` ${txt}`);
382
+ getTerminal()(` ${txt}`);
393
383
  }
394
384
  }
395
385
  static agentTunnels(tunnels) {
@@ -413,7 +403,7 @@ class Output {
413
403
  }
414
404
  static newCliVersion(version) {
415
405
  getTerminal().gray(`New version available (${version}). Run `);
416
- process.stdout.write(' bdy version ');
406
+ getTerminal()(' bdy version ');
417
407
  getTerminal().gray(`for details.\n\n`);
418
408
  }
419
409
  static newCliDockerVersion(version) {
@@ -453,45 +443,7 @@ class Output {
453
443
  const table = [...Object.entries(data)];
454
444
  this.table(table, false);
455
445
  }
456
- /**
457
- * terminal-kit's ANSI parser knows only the 16 basic colors: in `38;5;145`
458
- * (256 colors) it takes the 5 for blink, and `38;2;r;g;b` (truecolor) turns
459
- * into dim. This rewrites both to the nearest basic foreground color.
460
- */
461
- static toBasicAnsi(text) {
462
- const basic = (r, g, b) => {
463
- const max = Math.max(r, g, b);
464
- const min = Math.min(r, g, b);
465
- // greys: dark grey (90) or white (37)
466
- if (max - min < 40)
467
- return max < 180 ? 90 : 37;
468
- const bright = max > 200;
469
- // a channel counts when it is close to the strongest one
470
- const code = (r > max * 0.7 ? 1 : 0) + (g > max * 0.7 ? 2 : 0) + (b > max * 0.7 ? 4 : 0);
471
- return (bright ? 90 : 30) + code;
472
- };
473
- const fromIndex = (n) => {
474
- if (n < 8)
475
- return 30 + n;
476
- if (n < 16)
477
- return 90 + n - 8;
478
- if (n >= 232) {
479
- const v = 8 + (n - 232) * 10;
480
- return basic(v, v, v);
481
- }
482
- const c = n - 16;
483
- const level = (x) => (x === 0 ? 0 : 55 + x * 40);
484
- return basic(level(Math.floor(c / 36)), level(Math.floor(c / 6) % 6), level(c % 6));
485
- };
486
- const esc = String.fromCharCode(27);
487
- return text
488
- .replace(new RegExp(`${esc}\\[38;5;(\\d+)m`, 'g'), (_, n) => `${esc}[${fromIndex(Number(n))}m`)
489
- .replace(new RegExp(`${esc}\\[38;2;(\\d+);(\\d+);(\\d+)m`, 'g'), (_, r, g, b) => `${esc}[${basic(Number(r), Number(g), Number(b))}m`);
490
- }
491
- /** `ansi`: cells may carry chalk colors (widths are measured without the escape codes). */
492
- static table(data, firstRowBlue = true, ansi = false) {
493
- if (ansi)
494
- data = data.map((row) => row.map((cell) => this.toBasicAnsi(cell)));
446
+ static table(data, firstRowBlue = true) {
495
447
  // apply padding
496
448
  for (let i = 0; i < data.length; i += 1) {
497
449
  for (let j = 0; j < data[i].length; j += 1) {
@@ -513,8 +465,6 @@ class Output {
513
465
  };
514
466
  if (firstRowBlue)
515
467
  opts.firstRowTextAttr = { color: 'blue' };
516
- if (ansi)
517
- opts.contentHasMarkup = 'ansi';
518
468
  getTerminal().table(data, opts);
519
469
  }
520
470
  static configTunnels(tunnels) {