@dosu/cli 0.67.0-beta.4 → 0.67.0-beta.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/bin/dosu.js +27 -13
- 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.6", INSTALL_CHANNEL = "npm";
|
|
454
454
|
|
|
455
455
|
// src/debug/logger.ts
|
|
456
456
|
import {
|
|
@@ -3470,6 +3470,7 @@ function redactSecrets2(text) {
|
|
|
3470
3470
|
if (kvAssignmentNearby(lower)) {
|
|
3471
3471
|
const kvRepl = (m) => `${m[1]}${m[2]}${m[3]}[redacted:credential]${closingQuote(m[3], m[5])}`;
|
|
3472
3472
|
s = replaceSubmatch(s, genericKVRE, "credential", counts, kvRepl);
|
|
3473
|
+
s = replaceSubmatch(s, refreshTokenKVRE, "credential", counts, kvRepl);
|
|
3473
3474
|
s = replaceSubmatch(s, envKeyRE, "credential", counts, kvRepl);
|
|
3474
3475
|
s = replaceSubmatch(s, genericKVIntlRE, "credential", counts, kvRepl);
|
|
3475
3476
|
}
|
|
@@ -3610,17 +3611,18 @@ function redactEntropy(s, counts) {
|
|
|
3610
3611
|
return s;
|
|
3611
3612
|
return out + s.slice(last);
|
|
3612
3613
|
}
|
|
3613
|
-
var REDACTION_MARKER = "[redacted:", awsAccessKeyRE, awsSecretRE, genericKVRE, envKeyRE, genericKVIntlRE, bearerRE, quotedSecretRE, pemPrivateRE, providerRE, jwtRE, connURLRE, kvHints, providerHints, entropyMinBits = 4.5, entropyMinAssign = 20, entropyMinStandalone = 28, stopWords;
|
|
3614
|
+
var REDACTION_MARKER = "[redacted:", awsAccessKeyRE, awsSecretRE, genericKVRE, refreshTokenKVRE, envKeyRE, genericKVIntlRE, bearerRE, quotedSecretRE, pemPrivateRE, providerRE, jwtRE, connURLRE, kvHints, providerHints, entropyMinBits = 4.5, entropyMinAssign = 20, entropyMinStandalone = 28, stopWords;
|
|
3614
3615
|
var init_redact = __esm(() => {
|
|
3615
3616
|
awsAccessKeyRE = /A(?:KIA|SIA)[0-9A-Z]{16}/g;
|
|
3616
3617
|
awsSecretRE = /\b(aws[_-]?secret[_-]?access[_-]?key)(\\*['"]?\s*[:=]\s*)(\\*['"]?)([A-Za-z0-9/+=_-]{32,})(\\*['"]?)/gi;
|
|
3617
3618
|
genericKVRE = /\b([\w.-]{0,64}?(?:api[_-]?key|secret|token|passwd|password|authorization))(\\*['"]?\s*[:=]\s*)(\\*['"]?)([A-Za-z0-9/+=._-]{16,})(\\*['"]?)/gi;
|
|
3619
|
+
refreshTokenKVRE = /\b([\w.-]{0,64}?refresh[_-]?token)(\\*['"]?\s*[:=]\s*)(\\*['"]?)([A-Za-z0-9/+=._-]{8,})(\\*['"]?)/gi;
|
|
3618
3620
|
envKeyRE = /\b([A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*_KEY)(\\*['"]?\s*[:=]\s*)(\\*['"]?)([A-Za-z0-9/+=._-]{16,})(\\*['"]?)/g;
|
|
3619
3621
|
genericKVIntlRE = /(парол[ьяею]|токен[ауы]?|секрет[ауы]?|ключ[аеиуом]?|contraseña|senha|passwort|密码|密碼|パスワード|비밀번호)(\\*['"]?\s*[:=]\s*)(\\*['"]?)([A-Za-z0-9/+=._-]{16,})(\\*['"]?)/gi;
|
|
3620
3622
|
bearerRE = /\b(Bearer|Basic)(\s+)([A-Za-z0-9._~+/=-]{16,})/gi;
|
|
3621
3623
|
quotedSecretRE = /\b(password|passwd|pwd|secret|token|api[_-]?key)(\s+(?:is\s+|was\s+|for\s+)?)(\\*["'`])([^"'`\n]{6,80})(\\*["'`])/gi;
|
|
3622
3624
|
pemPrivateRE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY[A-Z0-9 ]*-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY[A-Z0-9 ]*-----/g;
|
|
3623
|
-
providerRE = /\b(gh[opsur]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|glpat-[A-Za-z0-9_-]{20,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{16,}|sk_user_[A-Za-z0-
|
|
3625
|
+
providerRE = /\b(gh[opsur]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|glpat-[A-Za-z0-9_-]{20,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{16,}|sk_user_[A-Za-z0-9_-]{8,}|sk-[A-Za-z0-9_-]*[A-Za-z0-9]{20,}|gsk_[A-Za-z0-9]{20,}|xai-[A-Za-z0-9]{20,}|hf_[A-Za-z0-9]{20,}|npm_[A-Za-z0-9]{30,}|xox[bpcs]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{30,})\b/g;
|
|
3624
3626
|
jwtRE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{4,}\b/g;
|
|
3625
3627
|
connURLRE = /\b([A-Za-z][A-Za-z0-9+.-]*:\/\/)([^\s/@:]*):([^\s]+)@([^\s]+)/g;
|
|
3626
3628
|
kvHints = [
|
|
@@ -16193,6 +16195,9 @@ var init_ask = __esm(() => {
|
|
|
16193
16195
|
});
|
|
16194
16196
|
|
|
16195
16197
|
// src/tui/layout.ts
|
|
16198
|
+
function activeLayoutMargin() {
|
|
16199
|
+
return activeMargin;
|
|
16200
|
+
}
|
|
16196
16201
|
function contentWidth(columns = process.stdout.columns ?? 80) {
|
|
16197
16202
|
return Math.min(columns, CONTENT_WIDTH);
|
|
16198
16203
|
}
|
|
@@ -16300,6 +16305,7 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
16300
16305
|
if (margin === 0)
|
|
16301
16306
|
return () => {};
|
|
16302
16307
|
active = true;
|
|
16308
|
+
activeMargin = margin;
|
|
16303
16309
|
const pad = " ".repeat(margin);
|
|
16304
16310
|
const original = stream.write;
|
|
16305
16311
|
const state = { atLineStart: true };
|
|
@@ -16312,9 +16318,10 @@ function installCenteredLayout(stream = process.stdout) {
|
|
|
16312
16318
|
return () => {
|
|
16313
16319
|
stream.write = original;
|
|
16314
16320
|
active = false;
|
|
16321
|
+
activeMargin = 0;
|
|
16315
16322
|
};
|
|
16316
16323
|
}
|
|
16317
|
-
var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, ANSI_PATTERN2, TAB_CELL_PAD = 2;
|
|
16324
|
+
var import_picocolors8, ESC2, CONTENT_WIDTH = 64, TOKEN_PATTERN, COLUMN_RESET_FINALS, active = false, activeMargin = 0, ANSI_PATTERN2, TAB_CELL_PAD = 2;
|
|
16318
16325
|
var init_layout = __esm(() => {
|
|
16319
16326
|
init_styles();
|
|
16320
16327
|
import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
@@ -16606,15 +16613,18 @@ function runInteractive(controller, io = {}) {
|
|
|
16606
16613
|
output.write(`${ESC4}[${frameLines}A${ESC4}[0J`);
|
|
16607
16614
|
frameLines = 0;
|
|
16608
16615
|
};
|
|
16616
|
+
const rowsFor = (line) => {
|
|
16617
|
+
const columns = output.columns || 80;
|
|
16618
|
+
return Math.max(1, Math.ceil((activeLayoutMargin() + visibleWidth(line)) / columns));
|
|
16619
|
+
};
|
|
16609
16620
|
const draw = () => {
|
|
16610
|
-
const
|
|
16611
|
-
`)).map((line) => `${brand(BAR)} ${line}`)
|
|
16612
|
-
`);
|
|
16621
|
+
const lines = controller.render().flatMap((line) => line.split(`
|
|
16622
|
+
`)).map((line) => `${brand(BAR)} ${line}`);
|
|
16613
16623
|
erase();
|
|
16614
|
-
output.write(`${
|
|
16624
|
+
output.write(`${lines.join(`
|
|
16625
|
+
`)}
|
|
16615
16626
|
`);
|
|
16616
|
-
frameLines =
|
|
16617
|
-
`).length;
|
|
16627
|
+
frameLines = lines.reduce((total, line) => total + rowsFor(line), 0);
|
|
16618
16628
|
};
|
|
16619
16629
|
output.write(HIDE_CURSOR2);
|
|
16620
16630
|
draw();
|
|
@@ -16724,7 +16734,11 @@ function multiselect2(opts, io = {}) {
|
|
|
16724
16734
|
let top = 0;
|
|
16725
16735
|
let error;
|
|
16726
16736
|
const picked = new Set(opts.initialValues ?? []);
|
|
16727
|
-
const
|
|
16737
|
+
const suffixWidth = Math.max(0, ...opts.options.map((option) => {
|
|
16738
|
+
const texts = opts.statusFor ? [opts.statusFor(option.value, true), opts.statusFor(option.value, false)] : [option.hint];
|
|
16739
|
+
return Math.max(0, ...texts.map((text) => text ? visibleWidth(text) + 3 : 0));
|
|
16740
|
+
}));
|
|
16741
|
+
const maxLabel = Math.max(16, contentWidth(output.columns || 80) - 8 - suffixWidth);
|
|
16728
16742
|
const clipLabel = (text) => text.length <= maxLabel ? text : `…${text.slice(text.length - maxLabel + 1)}`;
|
|
16729
16743
|
const labelWidth = Math.max(...opts.options.map((o) => clipLabel(optionLabel(o)).length));
|
|
16730
16744
|
const pickedValues = () => opts.options.filter((option) => picked.has(option.value)).map((option) => option.value);
|
|
@@ -22223,7 +22237,7 @@ var init_backlog = __esm(() => {
|
|
|
22223
22237
|
});
|
|
22224
22238
|
|
|
22225
22239
|
// src/telemetry/debug-id.ts
|
|
22226
|
-
var BUNDLE_DEBUG_ID_PLACEHOLDER = "
|
|
22240
|
+
var BUNDLE_DEBUG_ID_PLACEHOLDER = "c6dfd156-a2ff-b441-6475-6e2164756e21";
|
|
22227
22241
|
|
|
22228
22242
|
// src/telemetry/telemetry.ts
|
|
22229
22243
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -34691,4 +34705,4 @@ main().catch((err) => {
|
|
|
34691
34705
|
process.exit(1);
|
|
34692
34706
|
});
|
|
34693
34707
|
|
|
34694
|
-
//# debugId=
|
|
34708
|
+
//# debugId=c6dfd156-a2ff-b441-6475-6e2164756e21
|