@mintlify/previewing 4.0.1287 → 4.0.1289
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/dist/local-preview/run.js +4 -1
- package/dist/logs.d.ts +3 -0
- package/dist/logs.js +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -5,7 +5,7 @@ import { createServer } from 'http';
|
|
|
5
5
|
import { Server as SocketServer } from 'socket.io';
|
|
6
6
|
import { CMD_EXEC_PATH, NEXT_PUBLIC_PATH } from '../constants.js';
|
|
7
7
|
import { addLog, removeSpinnerLogs } from '../logging-state.js';
|
|
8
|
-
import { LaunchLog, UpdateLog } from '../logs.js';
|
|
8
|
+
import { LaunchLog, SearchDisabledLog, UpdateLog } from '../logs.js';
|
|
9
9
|
import { maybeFixMissingWindowsEnvVar } from '../util.js';
|
|
10
10
|
import { addDevTimingLog, startDevTiming, timeDev } from './dev-timing.js';
|
|
11
11
|
import listener, { initializeDocsConfigHashCache, initializeFrontmatterHashCache, initializeImportCache, } from './listener/index.js';
|
|
@@ -147,6 +147,9 @@ export const run = async (argv) => {
|
|
|
147
147
|
if (argv.needsUpdate) {
|
|
148
148
|
addLog(_jsx(UpdateLog, { updateCommand: `${argv.packageName} update` }));
|
|
149
149
|
}
|
|
150
|
+
if (!accessToken) {
|
|
151
|
+
addLog(_jsx(SearchDisabledLog, { loginCommand: `${argv.packageName} login` }));
|
|
152
|
+
}
|
|
150
153
|
addLog(_jsx(LaunchLog, { localUrl: `http://localhost:${port}`, networkUrl: localIp ? `http://${localIp}:${port}` : undefined }));
|
|
151
154
|
/**
|
|
152
155
|
* We're running into a known bug with the `open` package, where Windows machines error out because process.env.SYSTEMROOT is not set:
|
package/dist/logs.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export declare const WarningLog: ({ message }: {
|
|
|
19
19
|
export declare const UpdateLog: ({ updateCommand }: {
|
|
20
20
|
updateCommand: string;
|
|
21
21
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export declare const SearchDisabledLog: ({ loginCommand }: {
|
|
23
|
+
loginCommand: string;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
25
|
export declare const ErrorLog: ({ message }: {
|
|
23
26
|
message: string;
|
|
24
27
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
package/dist/logs.js
CHANGED
|
@@ -46,6 +46,13 @@ export const UpdateLog = ({ updateCommand }) => {
|
|
|
46
46
|
}
|
|
47
47
|
return (_jsxs(Box, { flexDirection: "column", alignItems: "flex-start", children: [_jsxs(Text, { children: [_jsx(Text, { color: "yellow", bold: true, children: "update available" }), _jsxs(Text, { children: [' ', "- run `", _jsx(Text, { bold: true, children: updateCommand }), "` to get the latest version"] })] }), _jsx(EmptyLineLog, {})] }));
|
|
48
48
|
};
|
|
49
|
+
export const SearchDisabledLog = ({ loginCommand }) => {
|
|
50
|
+
if (process.env.CLI_TEST_MODE === 'true') {
|
|
51
|
+
console.log(`Run ${loginCommand} in the cli to activate search`);
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return (_jsxs(Box, { flexDirection: "column", alignItems: "flex-start", children: [_jsxs(Text, { color: "yellow", children: ["Run ", _jsx(Text, { bold: true, children: loginCommand }), " in the cli to activate search"] }), _jsx(EmptyLineLog, {})] }));
|
|
55
|
+
};
|
|
49
56
|
export const ErrorLog = ({ message }) => {
|
|
50
57
|
if (process.env.CLI_TEST_MODE === 'true') {
|
|
51
58
|
console.log(`error ${message}`);
|