@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 CHANGED
@@ -1,4 +1,4 @@
1
- var _a, _b, _c, _d;
1
+ var _a, _b;
2
2
  import { LOCAL_LINKED_CLI_VERSION } from '@mintlify/previewing';
3
3
  import os from 'os';
4
4
  import path from 'path';
@@ -12,10 +12,5 @@ export const CALLBACK_PORT = 11582;
12
12
  const IS_LOCAL_BUILD = process.env.CLI_TEST_MODE === 'true' ? true : getCliVersion() == LOCAL_LINKED_CLI_VERSION;
13
13
  export const API_URL = (_a = process.env.MINTLIFY_API_URL) !== null && _a !== void 0 ? _a : (IS_LOCAL_BUILD ? 'http://localhost:5000' : 'https://leaves.mintlify.com');
14
14
  export const DASHBOARD_URL = (_b = process.env.MINTLIFY_DASHBOARD_URL) !== null && _b !== void 0 ? _b : (IS_LOCAL_BUILD ? 'http://localhost:3000' : 'https://app.mintlify.com');
15
- const DEV_TOKEN_ENDPOINT = 'https://test.stytch.com/v1/public/project-test-2d86347b-dfdb-4609-be69-12d8146220bd/oauth2/token';
16
- const DEV_STYTCH_CLIENT_ID = 'connected-app-test-b597afb3-304a-420f-bc13-dacca566c59f';
17
- const PROD_TOKEN_ENDPOINT = 'https://api.stytch.com/v1/public/project-live-731b7a04-9ac3-4923-90b8-0806d4aa29d4/oauth2/token';
18
- const PROD_STYTCH_CLIENT_ID = 'connected-app-live-d813eedd-dbb0-434b-a1f9-2ce69e5efc49';
19
- export const TOKEN_ENDPOINT = (_c = process.env.MINTLIFY_TOKEN_ENDPOINT) !== null && _c !== void 0 ? _c : (IS_LOCAL_BUILD ? DEV_TOKEN_ENDPOINT : PROD_TOKEN_ENDPOINT);
20
- export const STYTCH_CLIENT_ID = (_d = process.env.MINTLIFY_STYTCH_CLIENT_ID) !== null && _d !== void 0 ? _d : (IS_LOCAL_BUILD ? DEV_STYTCH_CLIENT_ID : PROD_STYTCH_CLIENT_ID);
15
+ export const TOKEN_ENDPOINT = `${API_URL}/api/oauth-token/cli`;
21
16
  export const CUSTOM_DOMAIN_CNAME_TARGET = 'cname.mintlify.builders';
package/bin/login.js CHANGED
@@ -16,7 +16,7 @@ import open from 'open';
16
16
  import { calculatePKCECodeChallenge, randomNonce, randomPKCECodeVerifier, randomState, } from 'openid-client';
17
17
  import { startCallbackServer } from './callbackServer.js';
18
18
  import { setConfigValue } from './config.js';
19
- import { DASHBOARD_URL, STYTCH_CLIENT_ID, TOKEN_ENDPOINT } from './constants.js';
19
+ import { DASHBOARD_URL, TOKEN_ENDPOINT } from './constants.js';
20
20
  import { getEmailFromIdToken } from './idToken.js';
21
21
  import { storeCredentials } from './keyring.js';
22
22
  import { getCliSubdomains } from './status.js';
@@ -65,11 +65,9 @@ export function login() {
65
65
  method: 'POST',
66
66
  headers: { 'Content-Type': 'application/json' },
67
67
  body: JSON.stringify({
68
- client_id: STYTCH_CLIENT_ID,
69
68
  grant_type: 'authorization_code',
70
69
  code,
71
70
  code_verifier: codeVerifier,
72
- redirect_uri: `${DASHBOARD_URL}/api/cli/oauth/callback`,
73
71
  }),
74
72
  });
75
73
  const body = yield res.json().catch(() => ({}));
package/bin/signup.js CHANGED
@@ -14,7 +14,7 @@ import { Box, Text } from 'ink';
14
14
  import { calculatePKCECodeChallenge, randomNonce, randomPKCECodeVerifier, randomState, } from 'openid-client';
15
15
  import { startCallbackServer } from './callbackServer.js';
16
16
  import { clearConfigValue } from './config.js';
17
- import { API_URL, DASHBOARD_URL, STYTCH_CLIENT_ID, TOKEN_ENDPOINT } from './constants.js';
17
+ import { API_URL, TOKEN_ENDPOINT } from './constants.js';
18
18
  import { isAI } from './helpers.js';
19
19
  import { getEmailFromIdToken } from './idToken.js';
20
20
  import { storeCredentials } from './keyring.js';
@@ -70,11 +70,9 @@ export function signup() {
70
70
  method: 'POST',
71
71
  headers: { 'Content-Type': 'application/json' },
72
72
  body: JSON.stringify({
73
- client_id: STYTCH_CLIENT_ID,
74
73
  grant_type: 'authorization_code',
75
74
  code,
76
75
  code_verifier: codeVerifier,
77
- redirect_uri: `${DASHBOARD_URL}/api/cli/oauth/callback`,
78
76
  }),
79
77
  });
80
78
  const body = yield res.json().catch(() => ({}));
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { STYTCH_CLIENT_ID, TOKEN_ENDPOINT } from './constants.js';
10
+ import { TOKEN_ENDPOINT } from './constants.js';
11
11
  import { getEmailFromIdToken } from './idToken.js';
12
12
  import { getRefreshToken, storeCredentials } from './keyring.js';
13
13
  let inflightRefresh = null;
@@ -31,7 +31,6 @@ function doRefresh() {
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
  }),