@mintlify/cli 4.0.882 → 4.0.884
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/cli.js +28 -1
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/cli.tsx +37 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.884",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "7.9.0",
|
|
43
43
|
"@mintlify/common": "1.0.666",
|
|
44
|
-
"@mintlify/link-rot": "3.0.
|
|
44
|
+
"@mintlify/link-rot": "3.0.823",
|
|
45
45
|
"@mintlify/models": "0.0.257",
|
|
46
|
-
"@mintlify/prebuild": "1.0.
|
|
47
|
-
"@mintlify/previewing": "4.0.
|
|
46
|
+
"@mintlify/prebuild": "1.0.801",
|
|
47
|
+
"@mintlify/previewing": "4.0.857",
|
|
48
48
|
"@mintlify/validation": "0.1.558",
|
|
49
49
|
"adm-zip": "0.5.16",
|
|
50
50
|
"chalk": "5.2.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"vitest": "2.0.4",
|
|
82
82
|
"vitest-mock-process": "1.0.4"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "edd0aba69387d13cba044952c0426504f01c83af"
|
|
85
85
|
}
|
package/src/cli.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { getBrokenInternalLinks, renameFilesAndUpdateLinksInContent } from '@min
|
|
|
3
3
|
import {
|
|
4
4
|
addLog,
|
|
5
5
|
dev,
|
|
6
|
+
validateBuild,
|
|
6
7
|
ErrorLog,
|
|
7
8
|
SpinnerLog,
|
|
8
9
|
SuccessLog,
|
|
@@ -119,6 +120,42 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
)
|
|
123
|
+
.command(
|
|
124
|
+
'validate',
|
|
125
|
+
'validate the documentation build (strict mode, exits on warnings or errors)',
|
|
126
|
+
(yargs) =>
|
|
127
|
+
yargs
|
|
128
|
+
.option('local-schema', {
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
default: false,
|
|
131
|
+
hidden: true,
|
|
132
|
+
description: 'use a locally hosted schema file',
|
|
133
|
+
})
|
|
134
|
+
.option('client-version', {
|
|
135
|
+
type: 'string',
|
|
136
|
+
hidden: true,
|
|
137
|
+
description: 'the version of the client to use for cli testing',
|
|
138
|
+
})
|
|
139
|
+
.option('groups', {
|
|
140
|
+
type: 'array',
|
|
141
|
+
description: 'Mock user groups for validation',
|
|
142
|
+
})
|
|
143
|
+
.option('disable-openapi', {
|
|
144
|
+
type: 'boolean',
|
|
145
|
+
default: false,
|
|
146
|
+
description: 'Disable OpenAPI file generation',
|
|
147
|
+
})
|
|
148
|
+
.usage('usage: mintlify validate [options]')
|
|
149
|
+
.example('mintlify validate', 'validate the build'),
|
|
150
|
+
async (argv) => {
|
|
151
|
+
const { cli: cliVersion } = getVersions();
|
|
152
|
+
await validateBuild({
|
|
153
|
+
...argv,
|
|
154
|
+
packageName,
|
|
155
|
+
cliVersion,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
)
|
|
122
159
|
.command(
|
|
123
160
|
'openapi-check <filename>',
|
|
124
161
|
'check if an OpenAPI spec is valid',
|