@markuplint/cli-utils 4.4.10 → 4.4.11
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.md +4 -0
- package/lib/color.d.ts +1 -0
- package/lib/color.js +5 -0
- package/lib/header.js +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/install-module.js +1 -1
- package/lib/logo.js +2 -2
- package/lib/name.js +2 -2
- package/lib/prompt.js +1 -1
- package/lib/space.js +2 -4
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.4.11](https://github.com/markuplint/markuplint/compare/@markuplint/cli-utils@4.4.10...@markuplint/cli-utils@4.4.11) (2025-04-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @markuplint/cli-utils
|
|
9
|
+
|
|
6
10
|
## [4.4.10](https://github.com/markuplint/markuplint/compare/@markuplint/cli-utils@4.4.9...@markuplint/cli-utils@4.4.10) (2024-11-17)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @markuplint/cli-utils
|
package/lib/color.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const xterm: (index: number) => (text: string) => string;
|
package/lib/color.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import c from 'picocolors';
|
|
2
|
+
export const xterm = (index) => (text) => {
|
|
3
|
+
// https://github.com/jaywcjlove/colors-cli/blob/d3a3152ec2f087c46655e7d2a663ef637ed5fea5/lib/color.js#L121
|
|
4
|
+
return c.isColorSupported ? '\u001B[38;5;' + index + 'm' + text + '\u001B[0m' : text;
|
|
5
|
+
};
|
package/lib/header.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as font } from '
|
|
1
|
+
export { default as font } from 'picocolors';
|
|
2
|
+
export { xterm } from './color.js';
|
|
2
3
|
export { input, confirm, confirmSequence, select, multiSelect } from './prompt.js';
|
|
3
4
|
export { installModule, InstallModuleResult } from './install-module.js';
|
|
4
5
|
export { getWidth } from './get-width.js';
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default as font } from '
|
|
1
|
+
export { default as font } from 'picocolors';
|
|
2
|
+
export { xterm } from './color.js';
|
|
2
3
|
export { input, confirm, confirmSequence, select, multiSelect } from './prompt.js';
|
|
3
4
|
export { installModule } from './install-module.js';
|
|
4
5
|
export { getWidth } from './get-width.js';
|
package/lib/install-module.js
CHANGED
package/lib/logo.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { xterm } from './color.js';
|
|
2
2
|
import { PRIMARY_COLOR } from './const.js';
|
|
3
|
-
export const logo = `/${
|
|
3
|
+
export const logo = `/${xterm(PRIMARY_COLOR)('✔')}\\`;
|
package/lib/name.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { xterm } from './color.js';
|
|
2
2
|
import { PRIMARY_COLOR } from './const.js';
|
|
3
|
-
export const name = `Markup${
|
|
3
|
+
export const name = `Markup${xterm(PRIMARY_COLOR)('lint')}`;
|
package/lib/prompt.js
CHANGED
package/lib/space.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { xterm } from './color.js';
|
|
2
2
|
/**
|
|
3
3
|
* Replace space to visible characters.
|
|
4
4
|
*
|
|
@@ -7,9 +7,7 @@ import c from 'cli-color';
|
|
|
7
7
|
*/
|
|
8
8
|
export function space(str) {
|
|
9
9
|
return str
|
|
10
|
-
.replaceAll(/\s+/g, $0 =>
|
|
11
|
-
return c.xterm(8)($0);
|
|
12
|
-
})
|
|
10
|
+
.replaceAll(/\s+/g, $0 => xterm(8)($0))
|
|
13
11
|
.replaceAll(' ', $0 => '•')
|
|
14
12
|
.replaceAll('\t', $0 => '→ ');
|
|
15
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/cli-utils",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.11",
|
|
4
4
|
"description": "Utilities for CLI of Markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -22,15 +22,12 @@
|
|
|
22
22
|
"clean": "tsc --build --clean"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"cli-color": "2.0.4",
|
|
26
25
|
"detect-installed": "2.0.4",
|
|
27
26
|
"eastasianwidth": "0.3.0",
|
|
28
27
|
"enquirer": "2.4.1",
|
|
29
28
|
"has-yarn": "3.0.0",
|
|
29
|
+
"picocolors": "1.1.1",
|
|
30
30
|
"strip-ansi": "7.1.0"
|
|
31
31
|
},
|
|
32
|
-
"
|
|
33
|
-
"@types/cli-color": "2.0.6"
|
|
34
|
-
},
|
|
35
|
-
"gitHead": "b2154ecf1e67559a3791991752f45c9c0283801a"
|
|
32
|
+
"gitHead": "eb36d59f7e13d4e59ff3f3c4eabb5ec06c070eb0"
|
|
36
33
|
}
|