Skip to content

Commit 99ce69a

Browse files
author
Piotr Paulski
committed
Fix formatting
1 parent 7aa5cfa commit 99ce69a

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;
@@ -120,7 +124,11 @@ export class McpContext implements Context {
120124
await this.#consoleCollector.init();
121125
}
122126

123-
static async from(browser: Browser, logger: Debugger, locatorClass: typeof Locator = Locator) {
127+
static async from(
128+
browser: Browser,
129+
logger: Debugger,
130+
locatorClass: typeof Locator = Locator,
131+
) {
124132
const context = new McpContext(browser, logger, locatorClass);
125133
await context.#init();
126134
return context;
@@ -427,7 +435,13 @@ export class McpContext implements Context {
427435
return this.#networkCollector.getIdForResource(request);
428436
}
429437

430-
waitForTextOnPage({text, timeout}: {text: string, timeout?: number|undefined}): Promise<Element> {
438+
waitForTextOnPage({
439+
text,
440+
timeout,
441+
}: {
442+
text: string;
443+
timeout?: number | undefined;
444+
}): Promise<Element> {
431445
const page = this.getSelectedPage();
432446
const frames = page.frames();
433447

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)