@mintlify/cli 4.0.1314 → 4.0.1315
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 +10 -1
- package/bin/signup.js +1 -1
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/cli.tsx +12 -1
- package/src/signup.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1315",
|
|
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.1024",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1216",
|
|
50
50
|
"@mintlify/models": "0.0.339",
|
|
51
|
-
"@mintlify/prebuild": "1.0.
|
|
52
|
-
"@mintlify/previewing": "4.0.
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
51
|
+
"@mintlify/prebuild": "1.0.1172",
|
|
52
|
+
"@mintlify/previewing": "4.0.1241",
|
|
53
|
+
"@mintlify/validation": "0.1.789",
|
|
54
54
|
"adm-zip": "0.5.16",
|
|
55
55
|
"chalk": "5.2.0",
|
|
56
56
|
"color": "4.2.3",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"vitest": "2.1.9",
|
|
93
93
|
"vitest-mock-process": "1.0.4"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "39084acb284ab7c4a40d9288cf34e4f096a1245d"
|
|
96
96
|
}
|
package/src/cli.tsx
CHANGED
|
@@ -41,7 +41,7 @@ import { mdxLinter } from './mdxLinter.js';
|
|
|
41
41
|
import { createTelemetryMiddleware } from './middlewares/telemetryMiddleware.js';
|
|
42
42
|
import { checkOpenApiFile, getOpenApiFilenamesFromDocsConfig } from './openApiCheck.js';
|
|
43
43
|
import { scoreHandler } from './score/index.js';
|
|
44
|
-
import { signup } from './signup.js';
|
|
44
|
+
import { sendAIUsageMessage, signup } from './signup.js';
|
|
45
45
|
import { status, getCliSubdomains } from './status.js';
|
|
46
46
|
import { trackTelemetryPreferenceChange } from './telemetry/track.js';
|
|
47
47
|
import { update } from './update.js';
|
|
@@ -78,6 +78,12 @@ const showWelcome = async (packageName: string): Promise<void> => {
|
|
|
78
78
|
await terminate(0);
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
// If an AI tries to run mint signup --help, it needs to get the AI custom prompt instead
|
|
82
|
+
const isAISignupHelpRequest = (args: string[]): boolean => {
|
|
83
|
+
const positionals = args.filter((arg) => !arg.startsWith('-'));
|
|
84
|
+
return isAI() && positionals[0] === 'signup' && (args.includes('--help') || args.includes('-h'));
|
|
85
|
+
};
|
|
86
|
+
|
|
81
87
|
export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
82
88
|
if (shouldShowWelcome(hideBin(process.argv))) {
|
|
83
89
|
return showWelcome(packageName);
|
|
@@ -86,6 +92,11 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
86
92
|
const telemetryMiddleware = createTelemetryMiddleware();
|
|
87
93
|
render(<Logs />);
|
|
88
94
|
|
|
95
|
+
if (isAISignupHelpRequest(hideBin(process.argv))) {
|
|
96
|
+
sendAIUsageMessage();
|
|
97
|
+
return terminate(0);
|
|
98
|
+
}
|
|
99
|
+
|
|
89
100
|
return (
|
|
90
101
|
yargs(hideBin(process.argv))
|
|
91
102
|
.scriptName(packageName)
|
package/src/signup.tsx
CHANGED