@mintlify/cli 4.0.1200 → 4.0.1202
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/tsconfig.build.tsbuildinfo +1 -1
- package/bin/welcome.js +14 -25
- package/package.json +7 -7
- package/src/welcome.ts +14 -27
- package/bin/logo.js +0 -28
- package/src/logo.ts +0 -31
package/bin/welcome.js
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
|
|
2
|
+
const MINT_GREEN = '#18E299';
|
|
3
3
|
const mint = chalk.hex(MINT_GREEN);
|
|
4
|
-
const TAGLINE = 'Build, preview, and ship beautiful docs.';
|
|
5
|
-
// Row at which the identity block starts beside the logo, and the gap between
|
|
6
|
-
// the logo's right edge and that block.
|
|
7
|
-
const META_TOP_ROW = 6;
|
|
8
|
-
const META_GAP = 4;
|
|
9
4
|
const GROUPS = [
|
|
10
5
|
{
|
|
11
6
|
title: 'Preview',
|
|
12
7
|
commands: [
|
|
13
|
-
{ name: 'dev', description: 'Start a local preview of your
|
|
8
|
+
{ name: 'dev', description: 'Start a local preview of your site' },
|
|
14
9
|
{ name: 'new', description: 'Scaffold a new documentation site' },
|
|
15
10
|
],
|
|
16
11
|
},
|
|
17
12
|
{
|
|
18
13
|
title: 'Quality',
|
|
19
14
|
commands: [
|
|
20
|
-
{ name: 'validate', description: 'Validate the
|
|
21
|
-
{
|
|
22
|
-
|
|
15
|
+
{ name: 'validate', description: 'Validate the site build (strict)' },
|
|
16
|
+
{
|
|
17
|
+
name: 'broken-links',
|
|
18
|
+
description: 'Find broken links before you ship',
|
|
19
|
+
},
|
|
20
|
+
{ name: 'a11y', description: 'Check site for accessibility issues' },
|
|
23
21
|
{ name: 'score', description: 'Run agent-readiness checks' },
|
|
24
22
|
],
|
|
25
23
|
},
|
|
26
24
|
{
|
|
27
25
|
title: 'Insights',
|
|
28
26
|
commands: [
|
|
29
|
-
{ name: 'analytics', description: 'View analytics for your
|
|
27
|
+
{ name: 'analytics', description: 'View analytics for your site' },
|
|
30
28
|
{ name: 'workflow', description: 'Create and manage workflows' },
|
|
31
29
|
],
|
|
32
30
|
},
|
|
@@ -47,10 +45,10 @@ const GROUPS = [
|
|
|
47
45
|
},
|
|
48
46
|
];
|
|
49
47
|
const EXAMPLES = [
|
|
50
|
-
{ name: 'dev', description: 'Start a local preview of your
|
|
51
|
-
{ name: 'new docs', description: 'Scaffold a new
|
|
52
|
-
{ name: 'validate', description: 'Validate your
|
|
53
|
-
{ name: 'broken-links', description: 'Find broken links across your
|
|
48
|
+
{ name: 'dev', description: 'Start a local preview of your site' },
|
|
49
|
+
{ name: 'new docs', description: 'Scaffold a new site in ./docs' },
|
|
50
|
+
{ name: 'validate', description: 'Validate your site before shipping' },
|
|
51
|
+
{ name: 'broken-links', description: 'Find broken links across your site' },
|
|
54
52
|
];
|
|
55
53
|
const COMMAND_NAME_WIDTH = GROUPS.flatMap((group) => group.commands).reduce((max, command) => Math.max(max, command.name.length), 0) + 2;
|
|
56
54
|
// `name description`, name padded to a shared column and colored mint. Padding
|
|
@@ -68,22 +66,13 @@ export function renderWelcome({ packageName, version, signedIn, subdomain, }) {
|
|
|
68
66
|
const identity = [
|
|
69
67
|
chalk.bold(title) + (versionLabel ? chalk.dim(` ${versionLabel}`) : ''),
|
|
70
68
|
'',
|
|
71
|
-
chalk.dim(TAGLINE),
|
|
72
69
|
signedIn
|
|
73
70
|
? chalk.dim('Signed in to Mintlify')
|
|
74
71
|
: chalk.dim('Run ') + mint(`${packageName} login`) + chalk.dim(' to sign in'),
|
|
75
72
|
...(subdomain ? [chalk.dim(`Project ${subdomain}`)] : []),
|
|
76
73
|
];
|
|
77
74
|
const lines = [''];
|
|
78
|
-
|
|
79
|
-
MINT_LOGO.forEach((logoLine, index) => {
|
|
80
|
-
const identityLine = identity[index - META_TOP_ROW];
|
|
81
|
-
let row = ' ' + mint(logoLine);
|
|
82
|
-
if (identityLine) {
|
|
83
|
-
row += ' '.repeat(MINT_LOGO_WIDTH - logoLine.length + META_GAP) + identityLine;
|
|
84
|
-
}
|
|
85
|
-
lines.push(row);
|
|
86
|
-
});
|
|
75
|
+
lines.push(...identity);
|
|
87
76
|
// Examples.
|
|
88
77
|
const exampleWidth = EXAMPLES.reduce((max, example) => Math.max(max, `${packageName} ${example.name}`.length), 0) +
|
|
89
78
|
2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1202",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
|
-
"@mintlify/common": "1.0.
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
48
|
+
"@mintlify/common": "1.0.925",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1107",
|
|
50
50
|
"@mintlify/models": "0.0.317",
|
|
51
|
-
"@mintlify/prebuild": "1.0.
|
|
52
|
-
"@mintlify/previewing": "4.0.
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
51
|
+
"@mintlify/prebuild": "1.0.1070",
|
|
52
|
+
"@mintlify/previewing": "4.0.1132",
|
|
53
|
+
"@mintlify/validation": "0.1.723",
|
|
54
54
|
"adm-zip": "0.5.16",
|
|
55
55
|
"chalk": "5.2.0",
|
|
56
56
|
"color": "4.2.3",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"vitest": "2.1.9",
|
|
96
96
|
"vitest-mock-process": "1.0.4"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "f82f74faa2a2695cd3ad653db3b190120f356a61"
|
|
99
99
|
}
|
package/src/welcome.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const MINT_GREEN = '#18E299';
|
|
4
4
|
|
|
5
5
|
const mint = chalk.hex(MINT_GREEN);
|
|
6
6
|
|
|
7
|
-
const TAGLINE = 'Build, preview, and ship beautiful docs.';
|
|
8
|
-
|
|
9
|
-
// Row at which the identity block starts beside the logo, and the gap between
|
|
10
|
-
// the logo's right edge and that block.
|
|
11
|
-
const META_TOP_ROW = 6;
|
|
12
|
-
const META_GAP = 4;
|
|
13
|
-
|
|
14
7
|
interface CommandEntry {
|
|
15
8
|
name: string;
|
|
16
9
|
description: string;
|
|
@@ -25,23 +18,26 @@ const GROUPS: CommandGroup[] = [
|
|
|
25
18
|
{
|
|
26
19
|
title: 'Preview',
|
|
27
20
|
commands: [
|
|
28
|
-
{ name: 'dev', description: 'Start a local preview of your
|
|
21
|
+
{ name: 'dev', description: 'Start a local preview of your site' },
|
|
29
22
|
{ name: 'new', description: 'Scaffold a new documentation site' },
|
|
30
23
|
],
|
|
31
24
|
},
|
|
32
25
|
{
|
|
33
26
|
title: 'Quality',
|
|
34
27
|
commands: [
|
|
35
|
-
{ name: 'validate', description: 'Validate the
|
|
36
|
-
{
|
|
37
|
-
|
|
28
|
+
{ name: 'validate', description: 'Validate the site build (strict)' },
|
|
29
|
+
{
|
|
30
|
+
name: 'broken-links',
|
|
31
|
+
description: 'Find broken links before you ship',
|
|
32
|
+
},
|
|
33
|
+
{ name: 'a11y', description: 'Check site for accessibility issues' },
|
|
38
34
|
{ name: 'score', description: 'Run agent-readiness checks' },
|
|
39
35
|
],
|
|
40
36
|
},
|
|
41
37
|
{
|
|
42
38
|
title: 'Insights',
|
|
43
39
|
commands: [
|
|
44
|
-
{ name: 'analytics', description: 'View analytics for your
|
|
40
|
+
{ name: 'analytics', description: 'View analytics for your site' },
|
|
45
41
|
{ name: 'workflow', description: 'Create and manage workflows' },
|
|
46
42
|
],
|
|
47
43
|
},
|
|
@@ -63,10 +59,10 @@ const GROUPS: CommandGroup[] = [
|
|
|
63
59
|
];
|
|
64
60
|
|
|
65
61
|
const EXAMPLES: CommandEntry[] = [
|
|
66
|
-
{ name: 'dev', description: 'Start a local preview of your
|
|
67
|
-
{ name: 'new docs', description: 'Scaffold a new
|
|
68
|
-
{ name: 'validate', description: 'Validate your
|
|
69
|
-
{ name: 'broken-links', description: 'Find broken links across your
|
|
62
|
+
{ name: 'dev', description: 'Start a local preview of your site' },
|
|
63
|
+
{ name: 'new docs', description: 'Scaffold a new site in ./docs' },
|
|
64
|
+
{ name: 'validate', description: 'Validate your site before shipping' },
|
|
65
|
+
{ name: 'broken-links', description: 'Find broken links across your site' },
|
|
70
66
|
];
|
|
71
67
|
|
|
72
68
|
const COMMAND_NAME_WIDTH =
|
|
@@ -105,7 +101,6 @@ export function renderWelcome({
|
|
|
105
101
|
const identity: string[] = [
|
|
106
102
|
chalk.bold(title) + (versionLabel ? chalk.dim(` ${versionLabel}`) : ''),
|
|
107
103
|
'',
|
|
108
|
-
chalk.dim(TAGLINE),
|
|
109
104
|
signedIn
|
|
110
105
|
? chalk.dim('Signed in to Mintlify')
|
|
111
106
|
: chalk.dim('Run ') + mint(`${packageName} login`) + chalk.dim(' to sign in'),
|
|
@@ -114,15 +109,7 @@ export function renderWelcome({
|
|
|
114
109
|
|
|
115
110
|
const lines: string[] = [''];
|
|
116
111
|
|
|
117
|
-
|
|
118
|
-
MINT_LOGO.forEach((logoLine, index) => {
|
|
119
|
-
const identityLine = identity[index - META_TOP_ROW];
|
|
120
|
-
let row = ' ' + mint(logoLine);
|
|
121
|
-
if (identityLine) {
|
|
122
|
-
row += ' '.repeat(MINT_LOGO_WIDTH - logoLine.length + META_GAP) + identityLine;
|
|
123
|
-
}
|
|
124
|
-
lines.push(row);
|
|
125
|
-
});
|
|
112
|
+
lines.push(...identity);
|
|
126
113
|
|
|
127
114
|
// Examples.
|
|
128
115
|
const exampleWidth =
|
package/bin/logo.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// AUTO-GENERATED by `scripts/generate-logo.mjs` from the Mintlify icon mark.
|
|
2
|
-
// Do not edit by hand — run `node scripts/generate-logo.mjs` to regenerate.
|
|
3
|
-
/** Mintlify brand greens. */
|
|
4
|
-
export const MINT_GREEN = '#18E299';
|
|
5
|
-
export const MINT_GREEN_DEEP = '#0C8C5E';
|
|
6
|
-
/**
|
|
7
|
-
* The Mintlify leaf, rendered as a solid `#` mark (chafa shape detection,
|
|
8
|
-
* normalized to a single glyph). Drawn in {@link MINT_GREEN} on the welcome
|
|
9
|
-
* screen.
|
|
10
|
-
*/
|
|
11
|
-
export const MINT_LOGO = [
|
|
12
|
-
' ##############',
|
|
13
|
-
' #################',
|
|
14
|
-
' ###################',
|
|
15
|
-
' #####################',
|
|
16
|
-
' #### ##############',
|
|
17
|
-
' ##### ###########',
|
|
18
|
-
' ####### #########',
|
|
19
|
-
'######## ########',
|
|
20
|
-
'######## ######',
|
|
21
|
-
'######## ####',
|
|
22
|
-
'###### ##############',
|
|
23
|
-
' ### ##############',
|
|
24
|
-
' ##############',
|
|
25
|
-
' ##########',
|
|
26
|
-
];
|
|
27
|
-
/** Width of the widest logo row, for laying out content beside it. */
|
|
28
|
-
export const MINT_LOGO_WIDTH = MINT_LOGO.reduce((max, line) => Math.max(max, line.length), 0);
|
package/src/logo.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// AUTO-GENERATED by `scripts/generate-logo.mjs` from the Mintlify icon mark.
|
|
2
|
-
// Do not edit by hand — run `node scripts/generate-logo.mjs` to regenerate.
|
|
3
|
-
|
|
4
|
-
/** Mintlify brand greens. */
|
|
5
|
-
export const MINT_GREEN = '#18E299';
|
|
6
|
-
export const MINT_GREEN_DEEP = '#0C8C5E';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The Mintlify leaf, rendered as a solid `#` mark (chafa shape detection,
|
|
10
|
-
* normalized to a single glyph). Drawn in {@link MINT_GREEN} on the welcome
|
|
11
|
-
* screen.
|
|
12
|
-
*/
|
|
13
|
-
export const MINT_LOGO: string[] = [
|
|
14
|
-
' ##############',
|
|
15
|
-
' #################',
|
|
16
|
-
' ###################',
|
|
17
|
-
' #####################',
|
|
18
|
-
' #### ##############',
|
|
19
|
-
' ##### ###########',
|
|
20
|
-
' ####### #########',
|
|
21
|
-
'######## ########',
|
|
22
|
-
'######## ######',
|
|
23
|
-
'######## ####',
|
|
24
|
-
'###### ##############',
|
|
25
|
-
' ### ##############',
|
|
26
|
-
' ##############',
|
|
27
|
-
' ##########',
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
/** Width of the widest logo row, for laying out content beside it. */
|
|
31
|
-
export const MINT_LOGO_WIDTH = MINT_LOGO.reduce((max, line) => Math.max(max, line.length), 0);
|