@dosu/cli 0.67.0-beta.4 → 0.67.0-beta.5
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/bin/dosu.js +23 -11
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -450,7 +450,7 @@ function isNpxInvocation(channel = INSTALL_CHANNEL, env = process.env) {
|
|
|
450
450
|
function getVersionString() {
|
|
451
451
|
return `v${VERSION}`;
|
|
452
452
|
}
|
|
453
|
-
var VERSION = "0.67.0-beta.
|
|
453
|
+
var VERSION = "0.67.0-beta.5", INSTALL_CHANNEL = "npm";
|
|
454
454
|
|
|
455
455
|
// src/debug/logger.ts
|
|
456
456
|
import {
|
|
@@ -16193,6 +16193,9 @@ var init_ask = __esm(() => {
|
|
|
16193
16193
|
});
|
|
16194
16194
|
|
|
16195
16195
|
// src/tui/layout.ts
|
|
16196
|
+
function activeLayoutMargin() {
|
|
16197
|
+
return activeMargin;
|
|
16198
|
+
}
|
|
16196
16199
|
function contentWidth(columns = process.stdout.columns ?? 80) {
|
|
16197
16200
|
return Math.min(columns, CONTENT_WIDTH);
|
|
16198
16201
|
}
|
|
@@ -16300,6 +16303,7 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
16300
16303
|
if (margin === 0)
|
|
16301
16304
|
return () => {};
|
|
16302
16305
|
active = true;
|
|
16306
|
+
activeMargin = margin;
|
|
16303
16307
|
const pad = " ".repeat(margin);
|
|
16304
16308
|
const original = stream.write;
|
|
16305
16309
|
const state = { atLineStart: true };
|
|
@@ -16312,9 +16316,10 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
16312
16316
|
return () => {
|
|
16313
16317
|
stream.write = original;
|
|
16314
16318
|
active = false;
|
|
16319
|
+
activeMargin = 0;
|
|
16315
16320
|
};
|
|
16316
16321
|
}
|
|
16317
|
-
var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, ANSI_PATTERN2, TAB_CELL_PAD = 2;
|
|
16322
|
+
var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, activeMargin = 0, ANSI_PATTERN2, TAB_CELL_PAD = 2;
|
|
16318
16323
|
var init_layout = __esm(() => {
|
|
16319
16324
|
init_styles();
|
|
16320
16325
|
import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
@@ -16606,15 +16611,18 @@ function runInteractive(controller, io = {}) {
|
|
|
16606
16611
|
output.write(`${ESC4}[${frameLines}A${ESC4}[0J`);
|
|
16607
16612
|
frameLines = 0;
|
|
16608
16613
|
};
|
|
16614
|
+
const rowsFor = (line) => {
|
|
16615
|
+
const columns = output.columns || 80;
|
|
16616
|
+
return Math.max(1, Math.ceil((activeLayoutMargin() + visibleWidth(line)) / columns));
|
|
16617
|
+
};
|
|
16609
16618
|
const draw = () => {
|
|
16610
|
-
const
|
|
16611
|
-
`)).map((line) => `${brand(BAR)} ${line}`)
|
|
16612
|
-
`);
|
|
16619
|
+
const lines = controller.render().flatMap((line) => line.split(`
|
|
16620
|
+
`)).map((line) => `${brand(BAR)} ${line}`);
|
|
16613
16621
|
erase();
|
|
16614
|
-
output.write(`${
|
|
16622
|
+
output.write(`${lines.join(`
|
|
16623
|
+
`)}
|
|
16615
16624
|
`);
|
|
16616
|
-
frameLines =
|
|
16617
|
-
`).length;
|
|
16625
|
+
frameLines = lines.reduce((total, line) => total + rowsFor(line), 0);
|
|
16618
16626
|
};
|
|
16619
16627
|
output.write(HIDE_CURSOR2);
|
|
16620
16628
|
draw();
|
|
@@ -16724,7 +16732,11 @@ function multiselect2(opts, io = {}) {
|
|
|
16724
16732
|
let top = 0;
|
|
16725
16733
|
let error;
|
|
16726
16734
|
const picked = new Set(opts.initialValues ?? []);
|
|
16727
|
-
const
|
|
16735
|
+
const suffixWidth = Math.max(0, ...opts.options.map((option) => {
|
|
16736
|
+
const texts = opts.statusFor ? [opts.statusFor(option.value, true), opts.statusFor(option.value, false)] : [option.hint];
|
|
16737
|
+
return Math.max(0, ...texts.map((text) => text ? visibleWidth(text) + 3 : 0));
|
|
16738
|
+
}));
|
|
16739
|
+
const maxLabel = Math.max(16, contentWidth(output.columns || 80) - 8 - suffixWidth);
|
|
16728
16740
|
const clipLabel = (text) => text.length <= maxLabel ? text : `…${text.slice(text.length - maxLabel + 1)}`;
|
|
16729
16741
|
const labelWidth = Math.max(...opts.options.map((o) => clipLabel(optionLabel(o)).length));
|
|
16730
16742
|
const pickedValues = () => opts.options.filter((option) => picked.has(option.value)).map((option) => option.value);
|
|
@@ -22223,7 +22235,7 @@ var init_backlog = __esm(() => {
|
|
|
22223
22235
|
});
|
|
22224
22236
|
|
|
22225
22237
|
// src/telemetry/debug-id.ts
|
|
22226
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
22238
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "cc966720-b10b-7059-6475-6e2164756e21";
|
|
22227
22239
|
|
|
22228
22240
|
// src/telemetry/telemetry.ts
|
|
22229
22241
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -34691,4 +34703,4 @@ main().catch((err) => {
|
|
|
34691
34703
|
process.exit(1);
|
|
34692
34704
|
});
|
|
34693
34705
|
|
|
34694
|
-
//# debugId=
|
|
34706
|
+
//# debugId=cc966720-b10b-7059-6475-6e2164756e21
|