@mintlify/previewing 4.0.1672 → 4.0.1673
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.
|
@@ -47,7 +47,7 @@ describe.runIf(['darwin', 'linux', 'win32'].includes(process.platform))('watchTr
|
|
|
47
47
|
await expectSeen('change', 'a.mdx');
|
|
48
48
|
expect(seen).not.toContainEqual(['add', 'a.mdx']);
|
|
49
49
|
});
|
|
50
|
-
it('reports files of a renamed directory', async () => {
|
|
50
|
+
it.skipIf(process.platform === 'win32')('reports files of a renamed directory', async () => {
|
|
51
51
|
await rename(path.join(root, 'guide'), path.join(root, 'guides'));
|
|
52
52
|
await expectSeen('unlink', 'guide/b.mdx');
|
|
53
53
|
await expectSeen('add', 'guides/b.mdx');
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ import { getClientVersion } from './util.js';
|
|
|
8
8
|
export * from './logs.js';
|
|
9
9
|
export * from './logging-state.js';
|
|
10
10
|
export * from './packages/index.js';
|
|
11
|
+
export { createPreviewPathIgnored } from './local-preview/listener/previewPathIgnored.js';
|
|
12
|
+
export { watchTree, type TreeWatcher, type WatchEventType } from './watcher.js';
|
|
11
13
|
export { dev, exportSite, checkBuild, getClientVersion, getLatestClientVersion, downloadTargetMint, getVersionMap, LOCAL_LINKED_CLI_VERSION, };
|
package/dist/index.js
CHANGED
|
@@ -7,4 +7,6 @@ import { getClientVersion } from './util.js';
|
|
|
7
7
|
export * from './logs.js';
|
|
8
8
|
export * from './logging-state.js';
|
|
9
9
|
export * from './packages/index.js';
|
|
10
|
+
export { createPreviewPathIgnored } from './local-preview/listener/previewPathIgnored.js';
|
|
11
|
+
export { watchTree } from './watcher.js';
|
|
10
12
|
export { dev, exportSite, checkBuild, getClientVersion, getLatestClientVersion, downloadTargetMint, getVersionMap, LOCAL_LINKED_CLI_VERSION, };
|
package/dist/logging-state.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const addErrorLog: (log: React.ReactNode) => void;
|
|
|
7
7
|
export declare const addRawErrorLog: (message: string) => void;
|
|
8
8
|
export declare const clearErrorLogs: () => void;
|
|
9
9
|
export declare const removeErrorLogs: (targets: readonly React.ReactNode[]) => void;
|
|
10
|
+
/** Calls the listener after every clearLogs, so a standing line can put itself back. */
|
|
11
|
+
export declare const onLogsCleared: (listener: () => void) => () => void;
|
|
10
12
|
export declare const clearLogs: () => void;
|
|
11
13
|
export declare const removeLastLog: () => void;
|
|
12
14
|
export declare const removeLog: (target: React.ReactNode) => void;
|
package/dist/logging-state.js
CHANGED
|
@@ -52,10 +52,20 @@ export const removeErrorLogs = (targets) => {
|
|
|
52
52
|
currentErrorLogs = currentErrorLogs.filter((log) => !targets.includes(log));
|
|
53
53
|
setErrorLogsCallback?.(currentErrorLogs);
|
|
54
54
|
};
|
|
55
|
+
const clearListeners = new Set();
|
|
56
|
+
/** Calls the listener after every clearLogs, so a standing line can put itself back. */
|
|
57
|
+
export const onLogsCleared = (listener) => {
|
|
58
|
+
clearListeners.add(listener);
|
|
59
|
+
return () => {
|
|
60
|
+
clearListeners.delete(listener);
|
|
61
|
+
};
|
|
62
|
+
};
|
|
55
63
|
export const clearLogs = () => {
|
|
56
64
|
ensureLoggingInstance();
|
|
57
65
|
currentLogs = [];
|
|
58
66
|
setLogsCallback?.(currentLogs);
|
|
67
|
+
for (const listener of clearListeners)
|
|
68
|
+
listener();
|
|
59
69
|
};
|
|
60
70
|
export const removeLastLog = () => {
|
|
61
71
|
ensureLoggingInstance();
|