Skip to content

Commit 59381f4

Browse files
author
Piotr Paulski
committed
Fix formatting
1 parent df076e9 commit 59381f4

File tree

6 files changed

+34
-9
lines changed

6 files changed

+34
-9
lines changed

rollup.config.mjs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ import license from 'rollup-plugin-license';
2929

3030
const isProduction = process.env.NODE_ENV === 'production';
3131

32-
const allowed_licenses = ['MIT', 'Apache 2.0', 'Apache-2.0', 'BSD-3-Clause', 'BSD-2-Clause', 'ISC', '0BSD'];
32+
const allowed_licenses = [
33+
'MIT',
34+
'Apache 2.0',
35+
'Apache-2.0',
36+
'BSD-3-Clause',
37+
'BSD-2-Clause',
38+
'ISC',
39+
'0BSD',
40+
];
3341

3442
/** @returns {import('rollup').RollupOptions} */
3543
const bundleDependency = (wrapperIndexPath, extraOutputOptions = {}) => ({
@@ -96,5 +104,7 @@ const bundleDependency = (wrapperIndexPath, extraOutputOptions = {}) => ({
96104

97105
export default [
98106
bundleDependency('./build/src/third_party/modelcontextprotocol-sdk/index.js'),
99-
bundleDependency('./build/src/third_party/puppeteer-core/index.js', {inlineDynamicImports: true}),
107+
bundleDependency('./build/src/third_party/puppeteer-core/index.js', {
108+
inlineDynamicImports: true,
109+
}),
100110
];

src/McpContext.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ export class McpContext implements Context {
9494

9595
#locatorClass: typeof Locator;
9696

97-
private constructor(browser: Browser, logger: Debugger, locatorClass: typeof Locator) {
97+
private constructor(
98+
browser: Browser,
99+
logger: Debugger,
100+
locatorClass: typeof Locator,
101+
) {
98102
this.browser = browser;
99103
this.logger = logger;
100104
this.#locatorClass = locatorClass;
@@ -126,7 +130,11 @@ export class McpContext implements Context {
126130
await this.#consoleCollector.init();
127131
}
128132

129-
static async from(browser: Browser, logger: Debugger, locatorClass: typeof Locator = Locator) {
133+
static async from(
134+
browser: Browser,
135+
logger: Debugger,
136+
locatorClass: typeof Locator = Locator,
137+
) {
130138
const context = new McpContext(browser, logger, locatorClass);
131139
await context.#init();
132140
return context;
@@ -433,7 +441,13 @@ export class McpContext implements Context {
433441
return this.#networkCollector.getIdForResource(request);
434442
}
435443

436-
waitForTextOnPage({text, timeout}: {text: string, timeout?: number|undefined}): Promise<Element> {
444+
waitForTextOnPage({
445+
text,
446+
timeout,
447+
}: {
448+
text: string;
449+
timeout?: number | undefined;
450+
}): Promise<Element> {
437451
const page = this.getSelectedPage();
438452
const frames = page.frames();
439453

src/third_party/puppeteer-core/index.ts

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

7-
export {Locator,PredefinedNetworkConditions} from 'puppeteer-core';
7+
export {Locator, PredefinedNetworkConditions} from 'puppeteer-core';
88
export {default as puppeteer} from 'puppeteer-core';

src/tools/ToolDefinition.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export type Context = Readonly<{
9393
filename: string,
9494
): Promise<{filename: string}>;
9595
waitForEventsAfterAction(action: () => Promise<unknown>): Promise<void>;
96-
waitForTextOnPage(params: {text: string, timeout?: number|undefined}): Promise<Element>;
96+
waitForTextOnPage(params: {
97+
text: string;
98+
timeout?: number | undefined;
99+
}): Promise<Element>;
97100
}>;
98101

99102
export function defineTool<Schema extends zod.ZodRawShape>(

src/tools/emulation.ts

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

7-
87
import {zod} from '../third_party/modelcontextprotocol-sdk/index.js';
98
import {PredefinedNetworkConditions} from '../third_party/puppeteer-core/index.js';
109

src/tools/snapshot.ts

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

7-
87
import {zod} from '../third_party/modelcontextprotocol-sdk/index.js';
98

109
import {ToolCategories} from './categories.js';

0 commit comments

Comments
 (0)