@mintlify/cli 4.0.1685 → 4.0.1686

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/status.js CHANGED
@@ -73,8 +73,8 @@ export function getCliSubdomains(accessToken) {
73
73
  }
74
74
  export function status() {
75
75
  return __awaiter(this, void 0, void 0, function* () {
76
- var _a;
77
- const accessToken = yield getAccessToken();
76
+ var _a, _b;
77
+ const accessToken = (_a = (yield getAccessToken().catch(() => null))) !== null && _a !== void 0 ? _a : process.env.MINTLIFY_SESSION_TOKEN;
78
78
  if (!accessToken) {
79
79
  addLog(_jsx(ErrorLog, { message: "not logged in. Run `mint login` to authenticate." }));
80
80
  return;
@@ -94,7 +94,7 @@ export function status() {
94
94
  const { user, org, subdomains } = parsed.data;
95
95
  const version = getCliVersion();
96
96
  const cached = getConfigValue('subdomain');
97
- const subdomain = (_a = (cached && subdomains.includes(cached) ? cached : subdomains[0])) !== null && _a !== void 0 ? _a : null;
97
+ const subdomain = (_b = (cached && subdomains.includes(cached) ? cached : subdomains[0])) !== null && _b !== void 0 ? _b : null;
98
98
  if (subdomain && subdomain !== cached)
99
99
  yield setConfigValue('subdomain', subdomain).catch(() => undefined);
100
100
  addLog(_jsxs(Box, { flexDirection: "column", paddingY: 1, children: [version && (_jsxs(Box, { children: [_jsx(Box, { minWidth: 16, children: _jsx(Text, { dimColor: true, children: "Version" }) }), _jsx(Text, { children: version })] })), _jsxs(Box, { children: [_jsx(Box, { minWidth: 16, children: _jsx(Text, { dimColor: true, children: "Email" }) }), _jsx(Text, { children: user.email })] }), _jsxs(Box, { children: [_jsx(Box, { minWidth: 16, children: _jsx(Text, { dimColor: true, children: "Organization" }) }), _jsx(Text, { children: org.name })] }), subdomain && (_jsxs(Box, { children: [_jsx(Box, { minWidth: 16, children: _jsx(Text, { dimColor: true, children: "Subdomain" }) }), _jsx(Text, { children: subdomain })] }))] }));