@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1805",
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.1343",
49
- "@mintlify/link-rot": "3.0.1584",
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.142",
52
- "@mintlify/prebuild": "1.0.1516",
53
- "@mintlify/previewing": "4.0.1602",
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.621",
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": "4f04b6102539eb00678e168c50f38e6c9671622d"
109
+ "gitHead": "4909797e4b1c1ba6cd03f77bb49833bd5f735c45"
110
110
  }
@@ -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
- 'Warning: Could not create the claim link. Your site is provisioned; retry with --email later.\n'
332
+ `Warning: Could not create the claim link.${reason} Your site is provisioned; retry with --email later.\n`
332
333
  );
333
334
  }
334
335
  }