@mintlify/cli 4.0.1353 → 4.0.1355

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.1353",
3
+ "version": "4.0.1355",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -45,11 +45,11 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "7.9.0",
48
- "@mintlify/common": "1.0.1053",
49
- "@mintlify/link-rot": "3.0.1247",
48
+ "@mintlify/common": "1.0.1054",
49
+ "@mintlify/link-rot": "3.0.1248",
50
50
  "@mintlify/models": "0.0.343",
51
- "@mintlify/prebuild": "1.0.1202",
52
- "@mintlify/previewing": "4.0.1271",
51
+ "@mintlify/prebuild": "1.0.1203",
52
+ "@mintlify/previewing": "4.0.1272",
53
53
  "@mintlify/validation": "0.1.805",
54
54
  "adm-zip": "0.5.16",
55
55
  "chalk": "5.2.0",
@@ -81,7 +81,7 @@
81
81
  "keytar": "7.9.0"
82
82
  },
83
83
  "devDependencies": {
84
- "@mintlify/editor": "0.0.259",
84
+ "@mintlify/editor": "0.0.260",
85
85
  "@mintlify/ts-config": "2.0.2",
86
86
  "@tsconfig/recommended": "1.0.2",
87
87
  "@types/adm-zip": "0.5.7",
@@ -101,5 +101,5 @@
101
101
  "vitest": "2.1.9",
102
102
  "vitest-mock-process": "1.0.4"
103
103
  },
104
- "gitHead": "ab5eb9d69cd28746b81944c279f5b84c8bcae896"
104
+ "gitHead": "794e98524b8dee29b51db101c203d77946ff720b"
105
105
  }
package/src/signup.tsx CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  } from 'openid-client';
10
10
 
11
11
  import { startCallbackServer } from './callbackServer.js';
12
+ import { clearConfigValue } from './config.js';
12
13
  import { API_URL, DASHBOARD_URL, STYTCH_CLIENT_ID, TOKEN_ENDPOINT } from './constants.js';
13
14
  import { isAI } from './helpers.js';
14
15
  import { storeCredentials } from './keyring.js';
@@ -124,6 +125,7 @@ export async function signup(options: SignupOptions = {}): Promise<void> {
124
125
 
125
126
  const token = body as TokenResponse;
126
127
  await storeCredentials(token.access_token, token.refresh_token);
128
+ await clearConfigValue('subdomain').catch(() => undefined);
127
129
  addLog(<SuccessLog message="account created and logged in successfully" />);
128
130
  addLog(<Text>Continue in the browser tab where you verified your email to connect GitHub.</Text>);
129
131
  }
package/src/status.tsx CHANGED
@@ -3,7 +3,7 @@ import { Box, Text } from 'ink';
3
3
  import { z } from 'zod';
4
4
 
5
5
  import { authenticatedFetch } from './authenticatedFetch.js';
6
- import { getConfigValue } from './config.js';
6
+ import { getConfigValue, setConfigValue } from './config.js';
7
7
  import { API_URL } from './constants.js';
8
8
  import { getCliVersion } from './helpers.js';
9
9
  import { getAccessToken } from './keyring.js';
@@ -54,7 +54,11 @@ export async function status(): Promise<void> {
54
54
 
55
55
  const { user, org, subdomains } = parsed.data;
56
56
  const version = getCliVersion();
57
- const subdomain = getConfigValue('subdomain') ?? subdomains[0] ?? null;
57
+
58
+ const cached = getConfigValue('subdomain');
59
+ const subdomain = (cached && subdomains.includes(cached) ? cached : subdomains[0]) ?? null;
60
+ if (subdomain && subdomain !== cached)
61
+ await setConfigValue('subdomain', subdomain).catch(() => undefined);
58
62
  addLog(
59
63
  <Box flexDirection="column" paddingY={1}>
60
64
  {version && (