@getmonoceros/workbench 1.37.1 → 1.37.2

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/bin.js CHANGED
@@ -1184,6 +1184,7 @@ function makePalette(isTty2) {
1184
1184
  cyan: (s) => wrap(s, ANSI_CYAN2),
1185
1185
  green: (s) => wrap(s, ANSI_GREEN),
1186
1186
  yellow: (s) => wrap(s, ANSI_YELLOW),
1187
+ red: (s) => wrap(s, ANSI_RED),
1187
1188
  dim: (s) => wrap(s, ANSI_GREY2),
1188
1189
  sectionLine: (label) => wrap(`\u25B8 ${label}`, ANSI_BOLD2, ANSI_UNDERLINE2)
1189
1190
  };
@@ -1191,7 +1192,7 @@ function makePalette(isTty2) {
1191
1192
  function colorsFor(stream) {
1192
1193
  return makePalette(stream.isTTY ?? false);
1193
1194
  }
1194
- var ESC, ANSI_BOLD2, ANSI_UNDERLINE2, ANSI_CYAN2, ANSI_GREEN, ANSI_YELLOW, ANSI_GREY2, ANSI_RESET2, ANSI_RE2, stderrPalette, bold2, underline2, cyan2, green, yellow, dim, sectionLine;
1195
+ var ESC, ANSI_BOLD2, ANSI_UNDERLINE2, ANSI_CYAN2, ANSI_GREEN, ANSI_YELLOW, ANSI_RED, ANSI_GREY2, ANSI_RESET2, ANSI_RE2, stderrPalette, bold2, underline2, cyan2, green, yellow, red, dim, sectionLine;
1195
1196
  var init_format = __esm({
1196
1197
  "src/util/format.ts"() {
1197
1198
  "use strict";
@@ -1201,6 +1202,7 @@ var init_format = __esm({
1201
1202
  ANSI_CYAN2 = `${ESC}36m`;
1202
1203
  ANSI_GREEN = `${ESC}32m`;
1203
1204
  ANSI_YELLOW = `${ESC}33m`;
1205
+ ANSI_RED = `${ESC}31m`;
1204
1206
  ANSI_GREY2 = `${ESC}90m`;
1205
1207
  ANSI_RESET2 = `${ESC}0m`;
1206
1208
  ANSI_RE2 = /\x1b\[[0-9;]*m/g;
@@ -1210,6 +1212,7 @@ var init_format = __esm({
1210
1212
  cyan2 = stderrPalette.cyan;
1211
1213
  green = stderrPalette.green;
1212
1214
  yellow = stderrPalette.yellow;
1215
+ red = stderrPalette.red;
1213
1216
  dim = stderrPalette.dim;
1214
1217
  sectionLine = stderrPalette.sectionLine;
1215
1218
  }
@@ -7530,6 +7533,12 @@ var init_apply_log = __esm({
7530
7533
 
7531
7534
  // src/apply/apply-progress.ts
7532
7535
  import { Writable as Writable3 } from "stream";
7536
+ function isNoiseTailLine(line) {
7537
+ const t = line.trim();
7538
+ return /^at\s/.test(t) || // JS stack frame
7539
+ t.startsWith('{"outcome":') || // devcontainer-cli result blob
7540
+ /^Error: Command failed: \/bin\/sh -c/.test(t);
7541
+ }
7533
7542
  function createApplyProgress(opts) {
7534
7543
  const out = opts.out;
7535
7544
  const now = opts.now ?? (() => Date.now());
@@ -7601,17 +7610,19 @@ function createApplyProgress(opts) {
7601
7610
  const line = lineBuf.slice(0, nl);
7602
7611
  lineBuf = lineBuf.slice(nl + 1);
7603
7612
  if (line.length === 0) continue;
7604
- tail.push(line);
7605
- if (tail.length > TAIL_LINES) tail.shift();
7606
7613
  for (const trig of PHASE_TRIGGERS) {
7607
7614
  const m = line.match(trig.pattern);
7608
7615
  if (m) {
7609
- setPhase(
7610
- typeof trig.label === "function" ? trig.label(m) : trig.label
7611
- );
7616
+ const label = typeof trig.label === "function" ? trig.label(m) : trig.label;
7617
+ if (label !== phase) tail.length = 0;
7618
+ setPhase(label);
7612
7619
  break;
7613
7620
  }
7614
7621
  }
7622
+ if (!isNoiseTailLine(line)) {
7623
+ tail.push(line);
7624
+ if (tail.length > TAIL_LINES) tail.shift();
7625
+ }
7615
7626
  }
7616
7627
  cb();
7617
7628
  }
@@ -8445,7 +8456,7 @@ Fix the value in the env file (or the yml).`
8445
8456
  } else {
8446
8457
  const { tailLines } = progress.fail();
8447
8458
  progressOut.write(`
8448
- \u2718 apply failed (exit ${exitCode})
8459
+ ${red(`\u2718 apply failed (exit ${exitCode})`)}
8449
8460
 
8450
8461
  `);
8451
8462
  for (const line of tailLines) {
@@ -8842,7 +8853,7 @@ var CLI_VERSION;
8842
8853
  var init_version = __esm({
8843
8854
  "src/version.ts"() {
8844
8855
  "use strict";
8845
- CLI_VERSION = true ? "1.37.1" : "dev";
8856
+ CLI_VERSION = true ? "1.37.2" : "dev";
8846
8857
  }
8847
8858
  });
8848
8859