@rushstack/package-extractor 0.13.4 → 0.13.6

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/CHANGELOG.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "@rushstack/package-extractor",
3
3
  "entries": [
4
+ {
5
+ "version": "0.13.6",
6
+ "tag": "@rushstack/package-extractor_v0.13.6",
7
+ "date": "Mon, 08 Jun 2026 15:15:50 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `1.3.19`"
12
+ },
13
+ {
14
+ "comment": "Updating dependency \"@rushstack/heft\" to `1.2.18`"
15
+ },
16
+ {
17
+ "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.12.19`"
18
+ }
19
+ ]
20
+ }
21
+ },
22
+ {
23
+ "version": "0.13.5",
24
+ "tag": "@rushstack/package-extractor_v0.13.5",
25
+ "date": "Mon, 20 Apr 2026 23:31:13 GMT",
26
+ "comments": {
27
+ "dependency": [
28
+ {
29
+ "comment": "Updating dependency \"@rushstack/terminal\" to `0.24.0`"
30
+ },
31
+ {
32
+ "comment": "Updating dependency \"@rushstack/ts-command-line\" to `5.3.9`"
33
+ },
34
+ {
35
+ "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `1.3.18`"
36
+ },
37
+ {
38
+ "comment": "Updating dependency \"@rushstack/heft\" to `1.2.17`"
39
+ },
40
+ {
41
+ "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.12.18`"
42
+ }
43
+ ]
44
+ }
45
+ },
4
46
  {
5
47
  "version": "0.13.4",
6
48
  "tag": "@rushstack/package-extractor_v0.13.4",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Change Log - @rushstack/package-extractor
2
2
 
3
- This log was last generated on Mon, 20 Apr 2026 15:15:24 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 08 Jun 2026 15:15:50 GMT and should not be manually modified.
4
+
5
+ ## 0.13.6
6
+ Mon, 08 Jun 2026 15:15:50 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 0.13.5
11
+ Mon, 20 Apr 2026 23:31:13 GMT
12
+
13
+ _Version update only_
4
14
 
5
15
  ## 0.13.4
6
16
  Mon, 20 Apr 2026 15:15:24 GMT
@@ -63277,18 +63277,27 @@ class PrintUtilities {
63277
63277
  }
63278
63278
  return wrappedLines;
63279
63279
  }
63280
- /**
63281
- * Displays a message in the console wrapped in a box UI.
63282
- *
63283
- * @param message - The message to display.
63284
- * @param terminal - The terminal to write the message to.
63285
- * @param boxWidth - The width of the box, defaults to half of the console width.
63286
- */
63287
- static printMessageInBox(message, terminal, boxWidth) {
63288
- if (!boxWidth) {
63280
+ static printMessageInBox(message, terminal, optionsOrBoxWidth) {
63281
+ let options;
63282
+ if (typeof optionsOrBoxWidth === 'number') {
63283
+ options = {
63284
+ boxWidth: optionsOrBoxWidth
63285
+ };
63286
+ }
63287
+ else {
63288
+ options = optionsOrBoxWidth !== null && optionsOrBoxWidth !== void 0 ? optionsOrBoxWidth : {};
63289
+ }
63290
+ const { borderColor, messageColor, boxWidth: optionsBoxWidth } = options !== null && options !== void 0 ? options : {};
63291
+ let boxWidth;
63292
+ if (!optionsBoxWidth) {
63289
63293
  const consoleWidth = PrintUtilities.getConsoleWidth() || exports.DEFAULT_CONSOLE_WIDTH;
63290
63294
  boxWidth = Math.floor(consoleWidth / 2);
63291
63295
  }
63296
+ else {
63297
+ boxWidth = optionsBoxWidth;
63298
+ }
63299
+ const styleBorder = (s) => { var _a; return (_a = borderColor === null || borderColor === void 0 ? void 0 : borderColor(s)) !== null && _a !== void 0 ? _a : s; };
63300
+ const styleMessage = (s) => { var _a; return (_a = messageColor === null || messageColor === void 0 ? void 0 : messageColor(s)) !== null && _a !== void 0 ? _a : s; };
63292
63301
  const maxLineLength = boxWidth - 10;
63293
63302
  const wrappedMessageLines = PrintUtilities.wrapWordsToLines(message, maxLineLength);
63294
63303
  let longestLineLength = 0;
@@ -63303,25 +63312,26 @@ class PrintUtilities {
63303
63312
  // ═════════════
63304
63313
  // Message
63305
63314
  // ═════════════
63306
- const headerAndFooter = ` ${'═'.repeat(boxWidth)}`;
63315
+ const headerAndFooter = ` ${styleBorder('═'.repeat(boxWidth))}`;
63307
63316
  terminal.writeLine(headerAndFooter);
63308
63317
  for (const line of wrappedMessageLines) {
63309
- terminal.writeLine(` ${line}`);
63318
+ terminal.writeLine(` ${styleMessage(line)}`);
63310
63319
  }
63311
63320
  terminal.writeLine(headerAndFooter);
63312
63321
  }
63313
63322
  else {
63323
+ const verticalBorder = styleBorder('║');
63314
63324
  // ╔═══════════╗
63315
63325
  // ║ Message ║
63316
63326
  // ╚═══════════╝
63317
- terminal.writeLine(` ╔${'═'.repeat(boxWidth - 2)}╗`);
63327
+ terminal.writeLine(` ${styleBorder(`╔${'═'.repeat(boxWidth - 2)}╗`)}`);
63318
63328
  for (const trimmedLine of trimmedLines) {
63319
63329
  const padding = boxWidth - trimmedLine.length - 2;
63320
63330
  const leftPadding = Math.floor(padding / 2);
63321
63331
  const rightPadding = padding - leftPadding;
63322
- terminal.writeLine(` ║${' '.repeat(leftPadding)}${trimmedLine}${' '.repeat(rightPadding)}║`);
63332
+ terminal.writeLine(` ${verticalBorder}${' '.repeat(leftPadding)}${styleMessage(trimmedLine)}${' '.repeat(rightPadding)}${verticalBorder}`);
63323
63333
  }
63324
- terminal.writeLine(` ╚${'═'.repeat(boxWidth - 2)}╝`);
63334
+ terminal.writeLine(` ${styleBorder(`╚${'═'.repeat(boxWidth - 2)}╝`)}`);
63325
63335
  }
63326
63336
  }
63327
63337
  }
@@ -64370,9 +64380,6 @@ const DEFAULT_CHARS = {
64370
64380
  /**
64371
64381
  * Renders text data as a fixed-column table suitable for terminal output.
64372
64382
  *
64373
- * Designed as a drop-in replacement for the `cli-table` and `cli-table3` npm packages,
64374
- * with correct handling of ANSI escape sequences when calculating column widths.
64375
- *
64376
64383
  * @example
64377
64384
  * ```typescript
64378
64385
  * const table = new TerminalTable({ head: ['Name', 'Version'] });
@@ -64385,13 +64392,15 @@ const DEFAULT_CHARS = {
64385
64392
  */
64386
64393
  class TerminalTable {
64387
64394
  constructor(options = {}) {
64388
- const { head, colWidths, borderless, borderCharacters } = options;
64395
+ const { head, colWidths, borderless, borderCharacters, borderColor, headingColor } = options;
64389
64396
  this._head = head !== null && head !== void 0 ? head : [];
64390
64397
  this._specifiedColWidths = colWidths !== null && colWidths !== void 0 ? colWidths : [];
64391
64398
  this._borderCharacters = {
64392
64399
  ...(borderless ? BORDERLESS_CHARS : DEFAULT_CHARS),
64393
64400
  ...borderCharacters
64394
64401
  };
64402
+ this._borderColor = borderColor;
64403
+ this._headingColor = headingColor;
64395
64404
  this._rows = [];
64396
64405
  }
64397
64406
  /**
@@ -64403,7 +64412,7 @@ class TerminalTable {
64403
64412
  }
64404
64413
  }
64405
64414
  getLines() {
64406
- const { _head: head, _rows: rows, _specifiedColWidths: specifiedColWidths, _borderCharacters: { top: topSeparator, topCenter: topCenterSeparator, topLeft: topLeftSeparator, topRight: topRightSeparator, bottom: bottomSeparator, bottomCenter: bottomCenterSeparator, bottomLeft: bottomLeftSeparator, bottomRight: bottomRightSeparator, left: leftSeparator, leftCenter: leftCenterSeparator, horizontalCenter: horizontalCenterSeparator, centerCenter: centerCenterSeparator, right: rightSeparator, rightCenter: rightCenterSeparator, verticalCenter: verticalCenterSeparator } } = this;
64415
+ const { _head: head, _rows: rows, _specifiedColWidths: specifiedColWidths, _borderColor: borderColor, _headingColor: headingColor, _borderCharacters: { top: topSeparator, topCenter: topCenterSeparator, topLeft: topLeftSeparator, topRight: topRightSeparator, bottom: bottomSeparator, bottomCenter: bottomCenterSeparator, bottomLeft: bottomLeftSeparator, bottomRight: bottomRightSeparator, left: leftSeparator, leftCenter: leftCenterSeparator, horizontalCenter: horizontalCenterSeparator, centerCenter: centerCenterSeparator, right: rightSeparator, rightCenter: rightCenterSeparator, verticalCenter: verticalCenterSeparator } } = this;
64407
64416
  const allRows = [head, ...rows];
64408
64417
  const columnCount = Math.max(0, ...allRows.map((r) => r.length));
64409
64418
  if (columnCount === 0) {
@@ -64430,43 +64439,51 @@ class TerminalTable {
64430
64439
  columnWidths.push(maxContent + 2);
64431
64440
  }
64432
64441
  }
64433
- // Renders a horizontal separator line. Returns undefined if the result would be empty.
64434
- const renderSeparator = (leftChar, fillChar, midChar, rightChar) => {
64442
+ // Builds a styled horizontal separator line; returns undefined if fillChar is empty (suppressed).
64443
+ const buildSepLine = (leftChar, fillChar, midChar, rightChar) => {
64444
+ if (fillChar.length === 0) {
64445
+ return undefined;
64446
+ }
64435
64447
  const line = leftChar + columnWidths.map((w) => fillChar.repeat(w)).join(midChar) + rightChar;
64436
- return line.length > 0 ? line : undefined;
64448
+ return borderColor ? borderColor(line) : line;
64437
64449
  };
64438
- // Renders a single data row.
64439
- const renderRow = (row) => {
64450
+ // Pre-compute all separator lines (borderColor applied once per line, not per character).
64451
+ const topLine = buildSepLine(topLeftSeparator, topSeparator, topCenterSeparator, topRightSeparator);
64452
+ const centerLine = buildSepLine(leftCenterSeparator, horizontalCenterSeparator, centerCenterSeparator, rightCenterSeparator);
64453
+ const bottomLine = buildSepLine(bottomLeftSeparator, bottomSeparator, bottomCenterSeparator, bottomRightSeparator);
64454
+ // Pre-colorize vertical border chars used in data rows.
64455
+ const styledLeft = borderColor && leftSeparator ? borderColor(leftSeparator) : leftSeparator;
64456
+ const styledMid = borderColor && verticalCenterSeparator ? borderColor(verticalCenterSeparator) : verticalCenterSeparator;
64457
+ const styledRight = borderColor && rightSeparator ? borderColor(rightSeparator) : rightSeparator;
64458
+ // Renders a single data row. If contentColor is provided, it is applied to each cell's text.
64459
+ const renderRow = (row, contentColor) => {
64440
64460
  const cells = [];
64441
64461
  for (let col = 0; col < columnCount; col++) {
64442
64462
  const content = col < row.length ? row[col] : '';
64443
64463
  const visualWidth = AnsiEscape_1.AnsiEscape.removeCodes(content).length;
64444
64464
  // 1 char of left-padding; right-padding fills the remainder of the column width.
64445
64465
  const padRight = Math.max(columnWidths[col] - 1 - visualWidth, 0);
64446
- cells.push(' ' + content + ' '.repeat(padRight));
64466
+ const styledContent = content && contentColor ? contentColor(content) : content;
64467
+ cells.push(' ' + styledContent + ' '.repeat(padRight));
64447
64468
  }
64448
- return leftSeparator + cells.join(verticalCenterSeparator) + rightSeparator;
64469
+ return styledLeft + cells.join(styledMid) + styledRight;
64449
64470
  };
64450
64471
  const lines = [];
64451
- // Top border
64452
- const topLine = renderSeparator(topLeftSeparator, topSeparator, topCenterSeparator, topRightSeparator);
64453
64472
  if (topLine !== undefined) {
64454
64473
  lines.push(topLine);
64455
64474
  }
64456
- // Header row + separator
64457
64475
  if (head.length > 0) {
64458
- lines.push(renderRow(head));
64459
- const headerSep = renderSeparator(leftCenterSeparator, horizontalCenterSeparator, centerCenterSeparator, rightCenterSeparator);
64460
- if (headerSep !== undefined) {
64461
- lines.push(headerSep);
64476
+ lines.push(renderRow(head, headingColor));
64477
+ if (centerLine !== undefined) {
64478
+ lines.push(centerLine);
64462
64479
  }
64463
64480
  }
64464
- // Data rows (no separator between them)
64465
- for (const row of this._rows) {
64466
- lines.push(renderRow(row));
64481
+ for (let i = 0; i < this._rows.length; i++) {
64482
+ lines.push(renderRow(this._rows[i]));
64483
+ if (i < this._rows.length - 1 && centerLine !== undefined) {
64484
+ lines.push(centerLine);
64485
+ }
64467
64486
  }
64468
- // Bottom border
64469
- const bottomLine = renderSeparator(bottomLeftSeparator, bottomSeparator, bottomCenterSeparator, bottomRightSeparator);
64470
64487
  if (bottomLine !== undefined) {
64471
64488
  lines.push(bottomLine);
64472
64489
  }
@@ -64479,6 +64496,14 @@ class TerminalTable {
64479
64496
  const lines = this.getLines();
64480
64497
  return lines.join('\n');
64481
64498
  }
64499
+ /**
64500
+ * Writes the rendered table to the provided terminal, one line at a time.
64501
+ */
64502
+ printToTerminal(terminal) {
64503
+ for (const line of this.getLines()) {
64504
+ terminal.writeLine(line);
64505
+ }
64506
+ }
64482
64507
  }
64483
64508
  exports.TerminalTable = TerminalTable;
64484
64509
  //# sourceMappingURL=TerminalTable.js.map