vibelet 1.2.138 → 1.2.139
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/index.cjs +1 -1
- package/dist/runtime-version.cjs +1 -1
- package/dist/vibelet.mjs +10 -19
- package/package.json +1 -1
package/dist/runtime-version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.
|
|
1
|
+
var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.139"}var a=l();process.stdout.write(`${a}
|
|
2
2
|
`);
|
package/dist/vibelet.mjs
CHANGED
|
@@ -11821,7 +11821,6 @@ const ANSI_HIDE_CURSOR = '\x1b[?25l';
|
|
|
11821
11821
|
const ANSI_SHOW_CURSOR = '\x1b[?25h';
|
|
11822
11822
|
const ANSI_RESET = '\x1b[0m';
|
|
11823
11823
|
const ANSI_BOLD = '\x1b[1m';
|
|
11824
|
-
const ANSI_DIM = '\x1b[2m';
|
|
11825
11824
|
const ANSI_CYAN = '\x1b[36m';
|
|
11826
11825
|
const ANSI_GREEN = '\x1b[32m';
|
|
11827
11826
|
const ANSI_YELLOW = '\x1b[33m';
|
|
@@ -12227,13 +12226,6 @@ function wrapText(text, width) {
|
|
|
12227
12226
|
return lines;
|
|
12228
12227
|
}
|
|
12229
12228
|
|
|
12230
|
-
function centerText(text, width) {
|
|
12231
|
-
const value = String(text);
|
|
12232
|
-
if (value.length >= width) return value.slice(0, width);
|
|
12233
|
-
const left = Math.floor((width - value.length) / 2);
|
|
12234
|
-
return `${' '.repeat(left)}${value}`;
|
|
12235
|
-
}
|
|
12236
|
-
|
|
12237
12229
|
function padRight(text, width) {
|
|
12238
12230
|
const value = String(text);
|
|
12239
12231
|
if (value.length >= width) return value.slice(0, width);
|
|
@@ -12241,7 +12233,7 @@ function padRight(text, width) {
|
|
|
12241
12233
|
}
|
|
12242
12234
|
|
|
12243
12235
|
function colorize(enabled, style, text) {
|
|
12244
|
-
if (!enabled) return text;
|
|
12236
|
+
if (!enabled || !style) return text;
|
|
12245
12237
|
return `${style}${text}${ANSI_RESET}`;
|
|
12246
12238
|
}
|
|
12247
12239
|
|
|
@@ -12258,7 +12250,7 @@ function getTerminalControlScreenPalette(tone) {
|
|
|
12258
12250
|
subtitle: ANSI_RED,
|
|
12259
12251
|
separator: ANSI_RED,
|
|
12260
12252
|
label: ANSI_YELLOW,
|
|
12261
|
-
body:
|
|
12253
|
+
body: '',
|
|
12262
12254
|
footer: `${ANSI_BOLD}${ANSI_YELLOW}`,
|
|
12263
12255
|
};
|
|
12264
12256
|
}
|
|
@@ -12268,7 +12260,7 @@ function getTerminalControlScreenPalette(tone) {
|
|
|
12268
12260
|
subtitle: ANSI_CYAN,
|
|
12269
12261
|
separator: ANSI_CYAN,
|
|
12270
12262
|
label: ANSI_CYAN,
|
|
12271
|
-
body:
|
|
12263
|
+
body: '',
|
|
12272
12264
|
footer: `${ANSI_BOLD}${ANSI_GREEN}`,
|
|
12273
12265
|
};
|
|
12274
12266
|
}
|
|
@@ -12277,7 +12269,7 @@ function getTerminalControlScreenPalette(tone) {
|
|
|
12277
12269
|
subtitle: ANSI_GREEN,
|
|
12278
12270
|
separator: ANSI_GREEN,
|
|
12279
12271
|
label: ANSI_CYAN,
|
|
12280
|
-
body:
|
|
12272
|
+
body: '',
|
|
12281
12273
|
footer: `${ANSI_BOLD}${ANSI_YELLOW}`,
|
|
12282
12274
|
};
|
|
12283
12275
|
}
|
|
@@ -12306,7 +12298,6 @@ function formatTerminalControlScreen({
|
|
|
12306
12298
|
const width = screenWidth < 60 ? screenWidth : Math.min(100, screenWidth);
|
|
12307
12299
|
const height = Math.max(20, Number(rows) || 24);
|
|
12308
12300
|
const innerWidth = width - 8;
|
|
12309
|
-
const gutter = ' '.repeat(Math.max(0, Math.floor((screenWidth - width) / 2)));
|
|
12310
12301
|
const separator = '='.repeat(width);
|
|
12311
12302
|
const tone = getTerminalControlScreenTone(title);
|
|
12312
12303
|
const palette = getTerminalControlScreenPalette(tone);
|
|
@@ -12316,12 +12307,12 @@ function formatTerminalControlScreen({
|
|
|
12316
12307
|
['Directory', cwd || process.cwd()],
|
|
12317
12308
|
].map(([label, value]) => {
|
|
12318
12309
|
const parts = formatTerminalFieldParts(label, value, innerWidth);
|
|
12319
|
-
return `${colorize(color, palette.label, parts.label)}${
|
|
12310
|
+
return `${colorize(color, palette.label, parts.label)}${parts.value}`;
|
|
12320
12311
|
});
|
|
12321
12312
|
const block = [
|
|
12322
12313
|
colorize(color, palette.separator, separator),
|
|
12323
|
-
colorize(color, palette.title, padRight(
|
|
12324
|
-
subtitle ? colorize(color, palette.subtitle, padRight(
|
|
12314
|
+
colorize(color, palette.title, padRight(title, width)),
|
|
12315
|
+
subtitle ? colorize(color, palette.subtitle, padRight(subtitle, width)) : '',
|
|
12325
12316
|
colorize(color, palette.separator, separator),
|
|
12326
12317
|
'',
|
|
12327
12318
|
...fieldLines,
|
|
@@ -12330,20 +12321,20 @@ function formatTerminalControlScreen({
|
|
|
12330
12321
|
|
|
12331
12322
|
for (const line of bodyLines) {
|
|
12332
12323
|
for (const wrapped of wrapText(line, innerWidth)) {
|
|
12333
|
-
block.push(colorize(color, palette.body, padRight(
|
|
12324
|
+
block.push(colorize(color, palette.body, padRight(wrapped, width)));
|
|
12334
12325
|
}
|
|
12335
12326
|
}
|
|
12336
12327
|
|
|
12337
12328
|
block.push('');
|
|
12338
12329
|
for (const line of footerLines) {
|
|
12339
12330
|
for (const wrapped of wrapText(line, innerWidth)) {
|
|
12340
|
-
block.push(colorize(color, palette.footer, padRight(
|
|
12331
|
+
block.push(colorize(color, palette.footer, padRight(wrapped, width)));
|
|
12341
12332
|
}
|
|
12342
12333
|
}
|
|
12343
12334
|
block.push(colorize(color, palette.separator, separator));
|
|
12344
12335
|
|
|
12345
12336
|
const verticalPadding = Math.max(0, Math.floor((height - block.length) / 3));
|
|
12346
|
-
return `${'\n'.repeat(verticalPadding)}${block.
|
|
12337
|
+
return `${'\n'.repeat(verticalPadding)}${block.join('\n')}\n`;
|
|
12347
12338
|
}
|
|
12348
12339
|
|
|
12349
12340
|
function renderTerminalControlScreen(stream, options) {
|