Skip to content

Commit c466188

Browse files
author
Piotr Paulski
committed
Export types from bundle again
1 parent 99ce69a commit c466188

File tree

15 files changed

+30
-27
lines changed

15 files changed

+30
-27
lines changed

src/DevToolsConnectionAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import {type ConnectionTransport} from 'puppeteer-core';
8-
97
import {Connection} from '../node_modules/chrome-devtools-frontend/front_end/core/protocol_client/InspectorBackend.js';
108

9+
import {type ConnectionTransport} from './third_party/puppeteer-core/index.js';
10+
1111
/**
1212
* Allows a puppeteer {@link ConnectionTransport} to act like a DevTools {@link Connection}.
1313
*/

src/McpContext.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import os from 'node:os';
88
import path from 'node:path';
99

1010
import type {Debugger} from 'debug';
11+
12+
import type {ListenerMap} from './PageCollector.js';
13+
import {NetworkCollector, PageCollector} from './PageCollector.js';
14+
import {Locator} from './third_party/puppeteer-core/index.js';
1115
import type {
1216
Browser,
1317
ConsoleMessage,
@@ -17,11 +21,7 @@ import type {
1721
Page,
1822
SerializedAXNode,
1923
PredefinedNetworkConditions,
20-
} from 'puppeteer-core';
21-
22-
import type {ListenerMap} from './PageCollector.js';
23-
import {NetworkCollector, PageCollector} from './PageCollector.js';
24-
import {Locator} from './third_party/puppeteer-core/index.js';
24+
} from './third_party/puppeteer-core/index.js';
2525
import {listPages} from './tools/pages.js';
2626
import {takeSnapshot} from './tools/snapshot.js';
2727
import {CLOSE_PAGE_ERROR} from './tools/ToolDefinition.js';

src/McpResponse.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Copyright 2025 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
import type {ConsoleMessage, ResourceType} from 'puppeteer-core';
7-
86
import type {ConsoleMessageData} from './formatters/consoleFormatter.js';
97
import {
108
formatConsoleEventShort,
@@ -23,6 +21,10 @@ import type {
2321
ImageContent,
2422
TextContent,
2523
} from './third_party/modelcontextprotocol-sdk/index.js';
24+
import type {
25+
ConsoleMessage,
26+
ResourceType,
27+
} from './third_party/puppeteer-core/index.js';
2628
import {handleDialog} from './tools/pages.js';
2729
import type {ImageContentData, Response} from './tools/ToolDefinition.js';
2830
import {paginate} from './utils/pagination.js';

src/PageCollector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
type HTTPRequest,
1212
type Page,
1313
type PageEvents,
14-
} from 'puppeteer-core';
14+
} from './third_party/puppeteer-core/index.js';
1515

1616
export type ListenerMap<EventMap extends PageEvents = PageEvents> = {
1717
[K in keyof EventMap]?: (event: EventMap[K]) => void;

src/WaitForHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* Copyright 2025 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
import type {Page, Protocol} from 'puppeteer-core';
76
import type {CdpPage} from 'puppeteer-core/internal/cdp/Page.js';
87

98
import {logger} from './logger.js';
9+
import type {Page, Protocol} from './third_party/puppeteer-core/index.js';
1010

1111
export class WaitForHelper {
1212
#abortController = new AbortController();

src/browser.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import type {
1313
ChromeReleaseChannel,
1414
LaunchOptions,
1515
Target,
16-
} from 'puppeteer-core';
17-
16+
} from './third_party/puppeteer-core/index.js';
1817
import {puppeteer} from './third_party/puppeteer-core/index.js';
1918

2019
let browser: Browser | undefined;

src/formatters/networkFormatter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
import {isUtf8} from 'node:buffer';
88

9-
import type {HTTPRequest, HTTPResponse} from 'puppeteer-core';
9+
import type {
10+
HTTPRequest,
11+
HTTPResponse,
12+
} from '../third_party/puppeteer-core/index.js';
1013

1114
const BODY_CONTEXT_SIZE_LIMIT = 10000;
1215

src/third_party/puppeteer-core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66

77
export {Locator, PredefinedNetworkConditions} from 'puppeteer-core';
88
export {default as puppeteer} from 'puppeteer-core';
9+
export type * from 'puppeteer-core';

src/tools/ToolDefinition.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import type {Dialog, ElementHandle, Page} from 'puppeteer-core';
8-
97
import type {TextSnapshotNode} from '../McpContext.js';
108
import {zod} from '../third_party/modelcontextprotocol-sdk/index.js';
9+
import type {
10+
Dialog,
11+
ElementHandle,
12+
Page,
13+
} from '../third_party/puppeteer-core/index.js';
1114
import type {TraceResult} from '../trace-processing/parse.js';
1215
import type {PaginationOptions} from '../utils/types.js';
1316

src/tools/console.ts

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

7-
import type {ConsoleMessageType} from 'puppeteer-core';
8-
97
import {zod} from '../third_party/modelcontextprotocol-sdk/index.js';
8+
import type {ConsoleMessageType} from '../third_party/puppeteer-core/index.js';
109

1110
import {ToolCategories} from './categories.js';
1211
import {defineTool} from './ToolDefinition.js';

0 commit comments

Comments
 (0)