@mintlify/cli 4.0.1576 → 4.0.1577
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/constants.js +2 -7
- package/bin/login.js +1 -3
- package/bin/signup.js +1 -3
- package/bin/tokenRefresh.js +1 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/constants.ts +1 -13
- package/src/login.tsx +1 -3
- package/src/signup.tsx +1 -3
- package/src/tokenRefresh.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1577",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vitest": "2.1.9",
|
|
106
106
|
"vitest-mock-process": "1.0.4"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "a124a18f64eb48645803f430b4a019fb566f322d"
|
|
109
109
|
}
|
package/src/constants.ts
CHANGED
|
@@ -23,18 +23,6 @@ export const DASHBOARD_URL =
|
|
|
23
23
|
process.env.MINTLIFY_DASHBOARD_URL ??
|
|
24
24
|
(IS_LOCAL_BUILD ? 'http://localhost:3000' : 'https://app.mintlify.com');
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
'https://test.stytch.com/v1/public/project-test-2d86347b-dfdb-4609-be69-12d8146220bd/oauth2/token';
|
|
28
|
-
const DEV_STYTCH_CLIENT_ID = 'connected-app-test-b597afb3-304a-420f-bc13-dacca566c59f';
|
|
29
|
-
const PROD_TOKEN_ENDPOINT =
|
|
30
|
-
'https://api.stytch.com/v1/public/project-live-731b7a04-9ac3-4923-90b8-0806d4aa29d4/oauth2/token';
|
|
31
|
-
const PROD_STYTCH_CLIENT_ID = 'connected-app-live-d813eedd-dbb0-434b-a1f9-2ce69e5efc49';
|
|
32
|
-
|
|
33
|
-
export const TOKEN_ENDPOINT =
|
|
34
|
-
process.env.MINTLIFY_TOKEN_ENDPOINT ??
|
|
35
|
-
(IS_LOCAL_BUILD ? DEV_TOKEN_ENDPOINT : PROD_TOKEN_ENDPOINT);
|
|
36
|
-
export const STYTCH_CLIENT_ID =
|
|
37
|
-
process.env.MINTLIFY_STYTCH_CLIENT_ID ??
|
|
38
|
-
(IS_LOCAL_BUILD ? DEV_STYTCH_CLIENT_ID : PROD_STYTCH_CLIENT_ID);
|
|
26
|
+
export const TOKEN_ENDPOINT = `${API_URL}/api/oauth-token/cli`;
|
|
39
27
|
|
|
40
28
|
export const CUSTOM_DOMAIN_CNAME_TARGET = 'cname.mintlify.builders';
|
package/src/login.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import { startCallbackServer } from './callbackServer.js';
|
|
14
14
|
import { setConfigValue } from './config.js';
|
|
15
|
-
import { DASHBOARD_URL,
|
|
15
|
+
import { DASHBOARD_URL, TOKEN_ENDPOINT } from './constants.js';
|
|
16
16
|
import { getEmailFromIdToken } from './idToken.js';
|
|
17
17
|
import { storeCredentials } from './keyring.js';
|
|
18
18
|
import { getCliSubdomains } from './status.js';
|
|
@@ -96,11 +96,9 @@ export async function login(): Promise<void> {
|
|
|
96
96
|
method: 'POST',
|
|
97
97
|
headers: { 'Content-Type': 'application/json' },
|
|
98
98
|
body: JSON.stringify({
|
|
99
|
-
client_id: STYTCH_CLIENT_ID,
|
|
100
99
|
grant_type: 'authorization_code',
|
|
101
100
|
code,
|
|
102
101
|
code_verifier: codeVerifier,
|
|
103
|
-
redirect_uri: `${DASHBOARD_URL}/api/cli/oauth/callback`,
|
|
104
102
|
}),
|
|
105
103
|
});
|
|
106
104
|
|
package/src/signup.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import { startCallbackServer } from './callbackServer.js';
|
|
12
12
|
import { clearConfigValue } from './config.js';
|
|
13
|
-
import { API_URL,
|
|
13
|
+
import { API_URL, TOKEN_ENDPOINT } from './constants.js';
|
|
14
14
|
import { isAI } from './helpers.js';
|
|
15
15
|
import { getEmailFromIdToken } from './idToken.js';
|
|
16
16
|
import { storeCredentials } from './keyring.js';
|
|
@@ -108,11 +108,9 @@ export async function signup(options: SignupOptions = {}): Promise<void> {
|
|
|
108
108
|
method: 'POST',
|
|
109
109
|
headers: { 'Content-Type': 'application/json' },
|
|
110
110
|
body: JSON.stringify({
|
|
111
|
-
client_id: STYTCH_CLIENT_ID,
|
|
112
111
|
grant_type: 'authorization_code',
|
|
113
112
|
code,
|
|
114
113
|
code_verifier: codeVerifier,
|
|
115
|
-
redirect_uri: `${DASHBOARD_URL}/api/cli/oauth/callback`,
|
|
116
114
|
}),
|
|
117
115
|
});
|
|
118
116
|
|
package/src/tokenRefresh.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TOKEN_ENDPOINT } from './constants.js';
|
|
2
2
|
import { getEmailFromIdToken } from './idToken.js';
|
|
3
3
|
import { getRefreshToken, storeCredentials } from './keyring.js';
|
|
4
4
|
|
|
@@ -31,7 +31,6 @@ async function doRefresh(): Promise<string | null> {
|
|
|
31
31
|
method: 'POST',
|
|
32
32
|
headers: { 'Content-Type': 'application/json' },
|
|
33
33
|
body: JSON.stringify({
|
|
34
|
-
client_id: STYTCH_CLIENT_ID,
|
|
35
34
|
grant_type: 'refresh_token',
|
|
36
35
|
refresh_token: refreshToken,
|
|
37
36
|
}),
|