豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit e56d793

Browse files
chore: don't re-export internals (#1211)
1 parent 53483bc commit e56d793

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

src/McpContext.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ import path from 'node:path';
1010
import type {TargetUniverse} from './DevtoolsUtils.js';
1111
import {UniverseManager} from './DevtoolsUtils.js';
1212
import {McpPage} from './McpPage.js';
13-
import type {ListenerMap, UncaughtError} from './PageCollector.js';
14-
import {NetworkCollector, ConsoleCollector} from './PageCollector.js';
13+
import {
14+
NetworkCollector,
15+
ConsoleCollector,
16+
type ListenerMap,
17+
type UncaughtError,
18+
} from './PageCollector.js';
1519
import type {DevTools} from './third_party/index.js';
1620
import type {
1721
Browser,
@@ -45,13 +49,6 @@ import {
4549
import {saveTemporaryFile} from './utils/files.js';
4650
import {WaitForHelper} from './WaitForHelper.js';
4751

48-
export type {
49-
EmulationSettings,
50-
GeolocationOptions,
51-
TextSnapshot,
52-
TextSnapshotNode,
53-
} from './types.js';
54-
5552
interface McpContextOptions {
5653
// Whether the DevTools windows are exposed as pages for debugging of DevTools.
5754
experimentalDevToolsDebugging: boolean;

src/formatters/SnapshotFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import type {TextSnapshot, TextSnapshotNode} from '../McpContext.js';
7+
import type {TextSnapshot, TextSnapshotNode} from '../types.js';
88

99
export class SnapshotFormatter {
1010
#snapshot: TextSnapshot;

src/tools/input.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
*/
66

77
import {logger} from '../logger.js';
8-
import type {McpContext, TextSnapshotNode} from '../McpContext.js';
8+
import type {McpContext} from '../McpContext.js';
99
import {zod} from '../third_party/index.js';
1010
import type {ElementHandle, KeyInput} from '../third_party/index.js';
11+
import type {TextSnapshotNode} from '../types.js';
1112
import {parseKey} from '../utils/keyboard.js';
1213

1314
import {ToolCategory} from './categories.js';

tests/formatters/snapshotFormatter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {describe, it} from 'node:test';
1010
import type {ElementHandle} from 'puppeteer-core';
1111

1212
import {SnapshotFormatter} from '../../src/formatters/SnapshotFormatter.js';
13-
import type {TextSnapshot, TextSnapshotNode} from '../../src/McpContext.js';
13+
import type {TextSnapshot, TextSnapshotNode} from '../../src/types.js';
1414

1515
describe('snapshotFormatter', () => {
1616
it('formats a snapshot with value properties', () => {

0 commit comments

Comments
 (0)