@mintlify/cli 4.0.624 → 4.0.626
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 +12 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/cli.tsx +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.626",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"format:check": "prettier . --check"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@mintlify/common": "1.0.
|
|
43
|
-
"@mintlify/link-rot": "3.0.
|
|
42
|
+
"@mintlify/common": "1.0.453",
|
|
43
|
+
"@mintlify/link-rot": "3.0.576",
|
|
44
44
|
"@mintlify/models": "0.0.207",
|
|
45
|
-
"@mintlify/prebuild": "1.0.
|
|
46
|
-
"@mintlify/previewing": "4.0.
|
|
47
|
-
"@mintlify/validation": "0.1.
|
|
45
|
+
"@mintlify/prebuild": "1.0.571",
|
|
46
|
+
"@mintlify/previewing": "4.0.615",
|
|
47
|
+
"@mintlify/validation": "0.1.416",
|
|
48
48
|
"chalk": "^5.2.0",
|
|
49
49
|
"detect-port": "^1.5.1",
|
|
50
50
|
"fs-extra": "^11.2.0",
|
|
51
|
-
"ink": "^
|
|
51
|
+
"ink": "^5.2.1",
|
|
52
52
|
"inquirer": "^12.3.0",
|
|
53
53
|
"js-yaml": "^4.1.0",
|
|
54
|
-
"react": "^
|
|
54
|
+
"react": "^18.3.1",
|
|
55
55
|
"semver": "^7.7.2",
|
|
56
56
|
"yargs": "^17.6.0"
|
|
57
57
|
},
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"vitest": "^2.0.4",
|
|
74
74
|
"vitest-mock-process": "^1.0.4"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "1ebf8ca521c8d533c648a5bd44a8a3c4b69df832"
|
|
77
77
|
}
|
package/src/cli.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
Logs,
|
|
10
10
|
clearLogs,
|
|
11
11
|
BrokenLinksLog,
|
|
12
|
+
WarningLog,
|
|
12
13
|
} from '@mintlify/previewing';
|
|
13
14
|
import { render, Text } from 'ink';
|
|
14
15
|
import path from 'path';
|
|
@@ -116,6 +117,15 @@ export const cli = () => {
|
|
|
116
117
|
addLog(<SuccessLog message="OpenAPI definition is valid." />);
|
|
117
118
|
await terminate(0);
|
|
118
119
|
}
|
|
120
|
+
|
|
121
|
+
if (filename.startsWith('http://') && !localSchema) {
|
|
122
|
+
addLog(
|
|
123
|
+
<WarningLog message="include the --local-schema flag to check locally hosted OpenAPI files" />
|
|
124
|
+
);
|
|
125
|
+
addLog(<WarningLog message="only https protocol is supported in production" />);
|
|
126
|
+
await terminate(0);
|
|
127
|
+
}
|
|
128
|
+
|
|
119
129
|
const document = await readLocalOpenApiFile(filename);
|
|
120
130
|
|
|
121
131
|
if (!document) {
|
|
@@ -126,7 +136,13 @@ export const cli = () => {
|
|
|
126
136
|
await validate(document);
|
|
127
137
|
addLog(<SuccessLog message="OpenAPI definition is valid." />);
|
|
128
138
|
} catch (err) {
|
|
129
|
-
|
|
139
|
+
if (err && typeof err === 'object' && 'code' in err && err.code === 'ENOENT') {
|
|
140
|
+
addLog(
|
|
141
|
+
<ErrorLog message={`file not found, please check the path provided: ${filename}`} />
|
|
142
|
+
);
|
|
143
|
+
} else {
|
|
144
|
+
addLog(<ErrorLog message={err instanceof Error ? err.message : 'unknown error'} />);
|
|
145
|
+
}
|
|
130
146
|
await terminate(1);
|
|
131
147
|
}
|
|
132
148
|
|