@twin.org/cli-core 0.0.1-next.3 → 0.0.1-next.7
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/cjs/index.cjs
CHANGED
|
@@ -472,6 +472,12 @@ class CLIBase {
|
|
|
472
472
|
CLIDisplay.header(options.title, options.version, options.icon);
|
|
473
473
|
}
|
|
474
474
|
const program = new commander.Command();
|
|
475
|
+
let outputWidth = options.overrideOutputWidth;
|
|
476
|
+
let outputErrWidth = options.overrideOutputWidth;
|
|
477
|
+
if (core.Is.undefined(outputWidth) && process.stdout.isTTY) {
|
|
478
|
+
outputWidth = process.stdout.columns;
|
|
479
|
+
outputErrWidth = process.stderr.columns;
|
|
480
|
+
}
|
|
475
481
|
program
|
|
476
482
|
.name(options.appName)
|
|
477
483
|
.version(options.version)
|
|
@@ -480,6 +486,8 @@ class CLIBase {
|
|
|
480
486
|
.configureOutput({
|
|
481
487
|
writeOut: str => CLIDisplay.write(str),
|
|
482
488
|
writeErr: str => CLIDisplay.writeError(str),
|
|
489
|
+
getOutHelpWidth: () => outputWidth,
|
|
490
|
+
getErrHelpWidth: () => outputErrWidth,
|
|
483
491
|
outputError: (str, write) => CLIDisplay.error(str.replace(/^error: /, ""), false)
|
|
484
492
|
})
|
|
485
493
|
.exitOverride(err => {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -451,6 +451,12 @@ class CLIBase {
|
|
|
451
451
|
CLIDisplay.header(options.title, options.version, options.icon);
|
|
452
452
|
}
|
|
453
453
|
const program = new Command();
|
|
454
|
+
let outputWidth = options.overrideOutputWidth;
|
|
455
|
+
let outputErrWidth = options.overrideOutputWidth;
|
|
456
|
+
if (Is.undefined(outputWidth) && process.stdout.isTTY) {
|
|
457
|
+
outputWidth = process.stdout.columns;
|
|
458
|
+
outputErrWidth = process.stderr.columns;
|
|
459
|
+
}
|
|
454
460
|
program
|
|
455
461
|
.name(options.appName)
|
|
456
462
|
.version(options.version)
|
|
@@ -459,6 +465,8 @@ class CLIBase {
|
|
|
459
465
|
.configureOutput({
|
|
460
466
|
writeOut: str => CLIDisplay.write(str),
|
|
461
467
|
writeErr: str => CLIDisplay.writeError(str),
|
|
468
|
+
getOutHelpWidth: () => outputWidth,
|
|
469
|
+
getErrHelpWidth: () => outputErrWidth,
|
|
462
470
|
outputError: (str, write) => CLIDisplay.error(str.replace(/^error: /, ""), false)
|
|
463
471
|
})
|
|
464
472
|
.exitOverride(err => {
|
package/docs/changelog.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/cli-core",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.7",
|
|
4
4
|
"description": "Core classes for building a CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,42 +13,14 @@
|
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rimraf dist coverage",
|
|
18
|
-
"build": "tspc",
|
|
19
|
-
"merge-locales": "copyfiles locales/en.json dist",
|
|
20
|
-
"test": "vitest --run --config ./vitest.config.ts --no-cache",
|
|
21
|
-
"coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
|
|
22
|
-
"bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
|
|
23
|
-
"bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
|
|
24
|
-
"bundle": "npm run bundle:esm && npm run bundle:cjs",
|
|
25
|
-
"docs:clean": "rimraf docs/reference",
|
|
26
|
-
"docs:generate": "typedoc",
|
|
27
|
-
"docs": "npm run docs:clean && npm run docs:generate",
|
|
28
|
-
"dist": "npm run clean && npm run build && npm run merge-locales && npm run test && npm run bundle && npm run docs"
|
|
29
|
-
},
|
|
30
16
|
"dependencies": {
|
|
31
|
-
"@twin.org/core": "0.0.1-next.
|
|
32
|
-
"@twin.org/crypto": "0.0.1-next.
|
|
17
|
+
"@twin.org/core": "0.0.1-next.7",
|
|
18
|
+
"@twin.org/crypto": "0.0.1-next.7",
|
|
33
19
|
"@twin.org/nameof": "next",
|
|
34
20
|
"chalk": "5.3.0",
|
|
35
21
|
"commander": "12.1.0",
|
|
36
22
|
"dotenv": "16.4.5"
|
|
37
23
|
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@twin.org/nameof-transformer": "next",
|
|
40
|
-
"@types/node": "22.5.5",
|
|
41
|
-
"@vitest/coverage-v8": "2.1.1",
|
|
42
|
-
"copyfiles": "2.4.1",
|
|
43
|
-
"rimraf": "6.0.1",
|
|
44
|
-
"rollup": "4.21.3",
|
|
45
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
46
|
-
"ts-patch": "3.2.1",
|
|
47
|
-
"typedoc": "0.26.7",
|
|
48
|
-
"typedoc-plugin-markdown": "4.2.7",
|
|
49
|
-
"typescript": "5.6.2",
|
|
50
|
-
"vitest": "2.1.1"
|
|
51
|
-
},
|
|
52
24
|
"main": "./dist/cjs/index.cjs",
|
|
53
25
|
"module": "./dist/esm/index.mjs",
|
|
54
26
|
"types": "./dist/types/index.d.ts",
|