@mintlify/cli 4.0.1354 → 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/bin/signup.js +2 -0
- package/bin/status.js +6 -3
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/signup.tsx +2 -0
- package/src/status.tsx +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1355",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"vitest": "2.1.9",
|
|
102
102
|
"vitest-mock-process": "1.0.4"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
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
|
-
|
|
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 && (
|