@mintlify/cli 4.0.1805 → 4.0.1807
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/__test__/agent-claim.test.ts +9 -0
- package/bin/agent-claim.js +7 -2
- package/bin/cli.js +3 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/agent-claim.ts +9 -2
- package/src/cli.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1807",
|
|
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.1344",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1585",
|
|
50
50
|
"@mintlify/models": "0.0.388",
|
|
51
|
-
"@mintlify/og": "0.0.
|
|
52
|
-
"@mintlify/prebuild": "1.0.
|
|
53
|
-
"@mintlify/previewing": "4.0.
|
|
51
|
+
"@mintlify/og": "0.0.143",
|
|
52
|
+
"@mintlify/prebuild": "1.0.1517",
|
|
53
|
+
"@mintlify/previewing": "4.0.1603",
|
|
54
54
|
"@mintlify/validation": "0.1.961",
|
|
55
55
|
"adm-zip": "0.6.0",
|
|
56
56
|
"chalk": "5.2.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"keytar": "7.9.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@mintlify/editor": "0.0.
|
|
90
|
+
"@mintlify/editor": "0.0.622",
|
|
91
91
|
"@mintlify/ts-config": "2.0.2",
|
|
92
92
|
"@tsconfig/recommended": "1.0.2",
|
|
93
93
|
"@types/detect-port": "1.3.2",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"vitest": "2.1.9",
|
|
107
107
|
"vitest-mock-process": "1.0.4"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "4909797e4b1c1ba6cd03f77bb49833bd5f735c45"
|
|
110
110
|
}
|
package/src/agent-claim.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
saveAgentCredentials,
|
|
11
11
|
type AgentCredentials,
|
|
12
12
|
} from './agent-credentials.js';
|
|
13
|
-
import { agentRequest, agentResponse } from './agent-http.js';
|
|
13
|
+
import { AgentApiError, agentRequest, agentResponse } from './agent-http.js';
|
|
14
14
|
import { DASHBOARD_URL } from './constants.js';
|
|
15
15
|
import { trackEvent } from './telemetry/track.js';
|
|
16
16
|
|
|
@@ -37,7 +37,14 @@ export async function createAgentClaimLink(
|
|
|
37
37
|
}),
|
|
38
38
|
}),
|
|
39
39
|
claimAttemptSchema
|
|
40
|
-
)
|
|
40
|
+
).catch((error: unknown) => {
|
|
41
|
+
if (error instanceof AgentApiError && error.code === 'too_many_attempts') {
|
|
42
|
+
throw new Error(
|
|
43
|
+
'Too many claim links are still pending. Send the user the last claim link, or wait 5 minutes and retry.'
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
});
|
|
41
48
|
const token = z
|
|
42
49
|
.string()
|
|
43
50
|
.min(1)
|
package/src/cli.tsx
CHANGED
|
@@ -326,9 +326,10 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
326
326
|
try {
|
|
327
327
|
process.stderr.write('Creating the claim link...\n');
|
|
328
328
|
claimUrl = await createAgentClaimLink(API_URL, result.credentials, argv.email);
|
|
329
|
-
} catch {
|
|
329
|
+
} catch (error) {
|
|
330
|
+
const reason = error instanceof Error ? ` ${error.message}` : '';
|
|
330
331
|
process.stderr.write(
|
|
331
|
-
|
|
332
|
+
`Warning: Could not create the claim link.${reason} Your site is provisioned; retry with --email later.\n`
|
|
332
333
|
);
|
|
333
334
|
}
|
|
334
335
|
}
|