@extension-use/testing 0.0.0-stage → 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/index.d.ts +68 -0
- package/dist/index.js +91 -0
- package/dist/playwright.d.ts +72 -0
- package/dist/playwright.js +88 -0
- package/package.json +53 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ahmed Gamal and Extension-use contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @extension-use/testing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Test your controllers: `createMockHost()` for unit tests, and Playwright fixtures that load your real extension.
|
|
4
|
+
|
|
5
|
+
Part of **Extension-use**, which lets a web app drive a browser extension through a fixed, typed set of actions. See the main README and docs in the Extension-use repository.
|
|
6
|
+
|
|
7
|
+
License: MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ConnectOptions, Client } from '@extension-use/client';
|
|
2
|
+
import { ResolvedTab, createRouter, ActionDef, Policy } from '@extension-use/host/background';
|
|
3
|
+
import { Target, ExtensionUseError } from '@extension-use/protocol';
|
|
4
|
+
import { CoreActions, CoreActionName } from '@extension-use/protocol/schemas';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @extension-use/testing
|
|
8
|
+
*
|
|
9
|
+
* An in-memory host for unit tests of controllers. It runs the real router, so
|
|
10
|
+
* inputs are validated, grants and site policy apply, and errors have the same
|
|
11
|
+
* codes as in the browser. You provide the results of the actions you use.
|
|
12
|
+
*
|
|
13
|
+
* const host = createMockHost({
|
|
14
|
+
* handlers: { "dom.click": () => ({ ref: "e1" }) },
|
|
15
|
+
* });
|
|
16
|
+
* const ext = await host.connect();
|
|
17
|
+
* await ext.dom.click({ locator: { role: "button", name: "Save" } });
|
|
18
|
+
* expect(host.calls).toEqual([{ action: "dom.click", input: { ... }, target: undefined }]);
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface MockCall {
|
|
22
|
+
action: string;
|
|
23
|
+
input: unknown;
|
|
24
|
+
target: Target | undefined;
|
|
25
|
+
}
|
|
26
|
+
interface MockContext {
|
|
27
|
+
target: Target | undefined;
|
|
28
|
+
tab: ResolvedTab;
|
|
29
|
+
}
|
|
30
|
+
type CoreHandlers = {
|
|
31
|
+
[K in CoreActionName]?: (input: Required<CoreActions[K]["input"]>, ctx: MockContext) => CoreActions[K]["output"] | Promise<CoreActions[K]["output"]>;
|
|
32
|
+
};
|
|
33
|
+
type MockHandler = (input: any, ctx: MockContext) => unknown;
|
|
34
|
+
interface MockHostOptions {
|
|
35
|
+
/** Results for built-in actions. Actions without a handler are not offered (UNKNOWN_ACTION). */
|
|
36
|
+
handlers?: CoreHandlers & Record<string, MockHandler>;
|
|
37
|
+
/** Host-defined actions, run for real. */
|
|
38
|
+
actions?: ActionDef[];
|
|
39
|
+
/** Grants for connected controllers. Default ["*"]. */
|
|
40
|
+
grants?: string[];
|
|
41
|
+
/** The tab every call targets. Default: tab 1 on https://example.com/. */
|
|
42
|
+
tab?: Partial<ResolvedTab> | ((target: Target | undefined) => ResolvedTab | Promise<ResolvedTab>);
|
|
43
|
+
policy?: Policy;
|
|
44
|
+
/** Check handler results against the action's output schema. Default true. */
|
|
45
|
+
validateOutput?: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface MockHost {
|
|
48
|
+
/** Connect a new controller. */
|
|
49
|
+
connect<A extends Record<string, {
|
|
50
|
+
input: unknown;
|
|
51
|
+
output: unknown;
|
|
52
|
+
}> = CoreActions>(options?: ConnectOptions): Promise<Client<A>>;
|
|
53
|
+
/** Every call that reached a handler, in order. */
|
|
54
|
+
readonly calls: MockCall[];
|
|
55
|
+
/** Calls to one action. */
|
|
56
|
+
callsTo(action: string): MockCall[];
|
|
57
|
+
/** Push an event to subscribed controllers. */
|
|
58
|
+
emit(name: string, payload: unknown, tabId?: number): void;
|
|
59
|
+
/** Replace or add a handler while the test runs. */
|
|
60
|
+
setHandler(action: string, handler: MockHandler): void;
|
|
61
|
+
/** The real router underneath (pause(), audit()...). */
|
|
62
|
+
readonly router: ReturnType<typeof createRouter>;
|
|
63
|
+
}
|
|
64
|
+
declare function createMockHost(options?: MockHostOptions): MockHost;
|
|
65
|
+
/** Assert that a promise rejects with an Extension-use error code. Returns the error. */
|
|
66
|
+
declare function expectErrorCode(promise: Promise<unknown>, code: string): Promise<ExtensionUseError>;
|
|
67
|
+
|
|
68
|
+
export { type MockCall, type MockContext, type MockHandler, type MockHost, type MockHostOptions, createMockHost, expectErrorCode };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { connect } from "@extension-use/client";
|
|
3
|
+
import { memoryPair } from "@extension-use/client/memory";
|
|
4
|
+
import { createRouter } from "@extension-use/host/background";
|
|
5
|
+
import { ExtensionUseError } from "@extension-use/protocol";
|
|
6
|
+
import { coreActionSchemas } from "@extension-use/protocol/schemas";
|
|
7
|
+
function createMockHost(options = {}) {
|
|
8
|
+
const handlers = new Map(Object.entries(options.handlers ?? {}));
|
|
9
|
+
if (!handlers.has("runtime.ping")) handlers.set("runtime.ping", () => ({ pong: true, ts: Date.now() }));
|
|
10
|
+
const calls = [];
|
|
11
|
+
const validate = options.validateOutput ?? true;
|
|
12
|
+
const schemas = coreActionSchemas;
|
|
13
|
+
const resolveTab = async (target) => {
|
|
14
|
+
if (typeof options.tab === "function") return options.tab(target);
|
|
15
|
+
return { tabId: 1, windowId: 1, url: "https://example.com/", ...options.tab };
|
|
16
|
+
};
|
|
17
|
+
const run = async (action, input, target, tab) => {
|
|
18
|
+
const handler = handlers.get(action);
|
|
19
|
+
if (!handler) throw new ExtensionUseError("UNKNOWN_ACTION", `No mock handler for "${action}"`);
|
|
20
|
+
calls.push({ action, input, target });
|
|
21
|
+
const output = await handler(input, { target, tab });
|
|
22
|
+
const schema = schemas[action];
|
|
23
|
+
if (validate && schema) {
|
|
24
|
+
const parsed = schema.output.safeParse(output ?? {});
|
|
25
|
+
if (!parsed.success) {
|
|
26
|
+
throw new ExtensionUseError("INTERNAL", `Mock for "${action}" returned an invalid result: ${parsed.error.issues.map((i) => `${i.path.join(".") || "output"} ${i.message}`).join("; ")}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return output ?? {};
|
|
30
|
+
};
|
|
31
|
+
const defs = [];
|
|
32
|
+
for (const name of handlers.keys()) {
|
|
33
|
+
const schema = schemas[name];
|
|
34
|
+
if (!schema) continue;
|
|
35
|
+
if (schema.where === "content") defs.push({ name, schema });
|
|
36
|
+
else
|
|
37
|
+
defs.push({
|
|
38
|
+
name,
|
|
39
|
+
schema,
|
|
40
|
+
handler: async (input, ctx) => run(name, input, ctx.target, await ctx.tab())
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const custom = new Set((options.actions ?? []).map((a) => a.name));
|
|
44
|
+
for (const name of handlers.keys()) {
|
|
45
|
+
if (!schemas[name] && !custom.has(name)) throw new Error(`Mock handler "${name}" is not a built-in action; pass its definition in \`actions\``);
|
|
46
|
+
}
|
|
47
|
+
const router = createRouter({
|
|
48
|
+
host: { id: "mock-host", name: "Mock host", version: "0.0.0" },
|
|
49
|
+
actions: [...defs, ...options.actions ?? []],
|
|
50
|
+
...options.policy ? { policy: options.policy } : {},
|
|
51
|
+
env: {
|
|
52
|
+
resolveTab: (target) => resolveTab(target),
|
|
53
|
+
sendToContent: async (tab, _frameId, req) => run(req.action, req.input, req.target, tab)
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
async connect(connectOptions) {
|
|
58
|
+
const { transport, server } = memoryPair();
|
|
59
|
+
const conn = router.connect({
|
|
60
|
+
transport: "memory",
|
|
61
|
+
origin: "mock://controller",
|
|
62
|
+
grants: options.grants ?? ["*"],
|
|
63
|
+
send: (env) => server.send(env)
|
|
64
|
+
});
|
|
65
|
+
server.onMessage((env) => conn.receive(env));
|
|
66
|
+
return connect(transport, connectOptions);
|
|
67
|
+
},
|
|
68
|
+
calls,
|
|
69
|
+
callsTo: (action) => calls.filter((c) => c.action === action),
|
|
70
|
+
emit: (name, payload, tabId) => router.emit(name, payload, tabId),
|
|
71
|
+
setHandler(action, handler) {
|
|
72
|
+
if (!handlers.has(action)) throw new Error(`"${action}" was not registered when the host was created; add a handler for it in createMockHost()`);
|
|
73
|
+
handlers.set(action, handler);
|
|
74
|
+
},
|
|
75
|
+
router
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function expectErrorCode(promise, code) {
|
|
79
|
+
try {
|
|
80
|
+
await promise;
|
|
81
|
+
} catch (err) {
|
|
82
|
+
const e = ExtensionUseError.from(err);
|
|
83
|
+
if (e.code !== code) throw new Error(`Expected error ${code}, got ${e.code}: ${e.message}`);
|
|
84
|
+
return e;
|
|
85
|
+
}
|
|
86
|
+
throw new Error(`Expected error ${code}, but the call succeeded`);
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
createMockHost,
|
|
90
|
+
expectErrorCode
|
|
91
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as _playwright_test from '@playwright/test';
|
|
2
|
+
import { Page, Frame, BrowserContext, Worker } from '@playwright/test';
|
|
3
|
+
export { expect } from '@playwright/test';
|
|
4
|
+
import { CallOptions } from '@extension-use/protocol';
|
|
5
|
+
import { CoreActions } from '@extension-use/protocol/schemas';
|
|
6
|
+
import { ActionNamespaces } from '@extension-use/client';
|
|
7
|
+
|
|
8
|
+
type CallResult<O = any> = {
|
|
9
|
+
ok: true;
|
|
10
|
+
output: O;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
code: string;
|
|
14
|
+
message: string;
|
|
15
|
+
data?: unknown;
|
|
16
|
+
};
|
|
17
|
+
type Controller<A extends Record<string, {
|
|
18
|
+
input: unknown;
|
|
19
|
+
output: unknown;
|
|
20
|
+
}> = CoreActions> = ActionNamespaces<A> & {
|
|
21
|
+
/** The page or frame the controller app runs in. */
|
|
22
|
+
readonly frame: Page | Frame;
|
|
23
|
+
/** Call an action. Rejects with an ExtensionUseError on failure. */
|
|
24
|
+
call<O = any>(action: string, input?: unknown, options?: Omit<CallOptions, "signal">): Promise<O>;
|
|
25
|
+
/** Call an action and return the outcome instead of throwing. */
|
|
26
|
+
try<O = any>(action: string, input?: unknown, options?: Omit<CallOptions, "signal">): Promise<CallResult<O>>;
|
|
27
|
+
/** Whether the host offers this action to the controller. */
|
|
28
|
+
has(action: string): Promise<boolean>;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Drive the Extension-use client that a controller app exposed in this page or
|
|
32
|
+
* frame. Waits for the app to connect.
|
|
33
|
+
*/
|
|
34
|
+
declare function controllerIn<A extends Record<string, {
|
|
35
|
+
input: unknown;
|
|
36
|
+
output: unknown;
|
|
37
|
+
}> = CoreActions>(frame: Page | Frame, options?: {
|
|
38
|
+
key?: string;
|
|
39
|
+
timeoutMs?: number;
|
|
40
|
+
}): Promise<Controller<A>>;
|
|
41
|
+
interface Panel {
|
|
42
|
+
/** The extension page (side panel opened as a tab). */
|
|
43
|
+
page: Page;
|
|
44
|
+
/** The iframe running your web app. */
|
|
45
|
+
frame: Frame;
|
|
46
|
+
/** The web app's client. */
|
|
47
|
+
ext: Controller;
|
|
48
|
+
}
|
|
49
|
+
interface ExtensionFixtures {
|
|
50
|
+
/** Path to the built, unpacked extension. Set it in `use` in playwright.config. */
|
|
51
|
+
extensionPath: string;
|
|
52
|
+
/** Extension page that mounts the frame bridge. Default "sidepanel.html". */
|
|
53
|
+
panelPath: string;
|
|
54
|
+
/** Run the browser headless. Default true (unless HEADED=1). */
|
|
55
|
+
extensionHeadless: boolean;
|
|
56
|
+
/** Extra Chromium command-line switches. */
|
|
57
|
+
extensionArgs: string[];
|
|
58
|
+
context: BrowserContext;
|
|
59
|
+
serviceWorker: Worker;
|
|
60
|
+
extensionId: string;
|
|
61
|
+
/**
|
|
62
|
+
* Open the side panel page as a tab (Playwright can't open the real side
|
|
63
|
+
* panel) and connect to the web app inside it. The bridge code is the same.
|
|
64
|
+
*/
|
|
65
|
+
openPanel(options?: {
|
|
66
|
+
path?: string;
|
|
67
|
+
frameUrl?: string | RegExp;
|
|
68
|
+
}): Promise<Panel>;
|
|
69
|
+
}
|
|
70
|
+
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & ExtensionFixtures, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
|
|
71
|
+
|
|
72
|
+
export { type CallResult, type Controller, type ExtensionFixtures, type Panel, controllerIn, test };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/playwright.ts
|
|
2
|
+
import { test as base, chromium } from "@playwright/test";
|
|
3
|
+
import { ExtensionUseError } from "@extension-use/protocol";
|
|
4
|
+
import { resolve } from "path";
|
|
5
|
+
import { expect } from "@playwright/test";
|
|
6
|
+
var EXPOSE_KEY = "__extensionUse";
|
|
7
|
+
async function controllerIn(frame, options = {}) {
|
|
8
|
+
const key = options.key ?? EXPOSE_KEY;
|
|
9
|
+
await frame.waitForFunction((k) => Boolean(globalThis[k]), key, { timeout: options.timeoutMs ?? 1e4 });
|
|
10
|
+
const tryCall = (action, input = {}, callOptions = {}) => frame.evaluate(
|
|
11
|
+
async ([k, a, i, o]) => {
|
|
12
|
+
const ext = globalThis[k];
|
|
13
|
+
try {
|
|
14
|
+
return { ok: true, output: await ext.callRaw(a, i, o) };
|
|
15
|
+
} catch (e) {
|
|
16
|
+
const err = e;
|
|
17
|
+
return { ok: false, code: err.code ?? "INTERNAL", message: err.message ?? String(e), ...err.data !== void 0 ? { data: err.data } : {} };
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
[key, action, input, callOptions]
|
|
21
|
+
);
|
|
22
|
+
const base2 = {
|
|
23
|
+
frame,
|
|
24
|
+
try: tryCall,
|
|
25
|
+
async call(action, input, callOptions) {
|
|
26
|
+
const r = await tryCall(action, input, callOptions);
|
|
27
|
+
if (!r.ok) throw new ExtensionUseError(r.code, r.message, r.data);
|
|
28
|
+
return r.output;
|
|
29
|
+
},
|
|
30
|
+
has: (action) => frame.evaluate(([k, a]) => globalThis[k].has(a), [key, action])
|
|
31
|
+
};
|
|
32
|
+
return new Proxy(base2, {
|
|
33
|
+
get(target, prop, receiver) {
|
|
34
|
+
if (typeof prop !== "string" || prop in target) return Reflect.get(target, prop, receiver);
|
|
35
|
+
return new Proxy(
|
|
36
|
+
{},
|
|
37
|
+
{
|
|
38
|
+
get: (_t, method) => typeof method === "string" && method !== "then" ? (input, opts) => base2.call(`${prop}.${method}`, input, opts) : void 0
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var test = base.extend({
|
|
45
|
+
extensionPath: ["", { option: true }],
|
|
46
|
+
panelPath: ["sidepanel.html", { option: true }],
|
|
47
|
+
extensionHeadless: [!process.env.HEADED, { option: true }],
|
|
48
|
+
extensionArgs: [[], { option: true }],
|
|
49
|
+
context: async ({ extensionPath, extensionHeadless, extensionArgs }, use) => {
|
|
50
|
+
if (!extensionPath) throw new Error('Set `use: { extensionPath: "path/to/unpacked/extension" }` in playwright.config');
|
|
51
|
+
const path = resolve(extensionPath);
|
|
52
|
+
const context = await chromium.launchPersistentContext("", {
|
|
53
|
+
channel: "chromium",
|
|
54
|
+
headless: extensionHeadless,
|
|
55
|
+
args: [`--disable-extensions-except=${path}`, `--load-extension=${path}`, ...extensionArgs]
|
|
56
|
+
});
|
|
57
|
+
await use(context);
|
|
58
|
+
await context.close();
|
|
59
|
+
},
|
|
60
|
+
serviceWorker: async ({ context }, use) => {
|
|
61
|
+
let [worker] = context.serviceWorkers();
|
|
62
|
+
worker ??= await context.waitForEvent("serviceworker");
|
|
63
|
+
await use(worker);
|
|
64
|
+
},
|
|
65
|
+
extensionId: async ({ serviceWorker }, use) => {
|
|
66
|
+
await use(new URL(serviceWorker.url()).host);
|
|
67
|
+
},
|
|
68
|
+
openPanel: async ({ context, extensionId, panelPath }, use) => {
|
|
69
|
+
await use(async (options = {}) => {
|
|
70
|
+
const page = await context.newPage();
|
|
71
|
+
await page.goto(`chrome-extension://${extensionId}/${options.path ?? panelPath}`);
|
|
72
|
+
const matches = (url) => options.frameUrl instanceof RegExp ? options.frameUrl.test(url) : options.frameUrl ? url.startsWith(options.frameUrl) : /^https?:/.test(url);
|
|
73
|
+
let frame;
|
|
74
|
+
for (let i = 0; i < 100 && !frame; i++) {
|
|
75
|
+
frame = page.frames().find((f) => f !== page.mainFrame() && matches(f.url()));
|
|
76
|
+
if (!frame) await page.waitForTimeout(100);
|
|
77
|
+
}
|
|
78
|
+
if (!frame) throw new Error("The panel did not load a web app frame");
|
|
79
|
+
await frame.waitForLoadState();
|
|
80
|
+
return { page, frame, ext: await controllerIn(frame) };
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
controllerIn,
|
|
86
|
+
expect,
|
|
87
|
+
test
|
|
88
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extension-use/testing",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Test your Extension-use controllers: an in-memory mock host and Playwright fixtures for the real extension",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Ahmed Gamal",
|
|
7
|
+
"homepage": "https://extension-use.appzlr.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/ahmedGamalhamed/extension-use.git",
|
|
11
|
+
"directory": "packages/testing"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/ahmedGamalhamed/extension-use/issues"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"source": "./src/index.ts",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./playwright": {
|
|
24
|
+
"source": "./src/playwright.ts",
|
|
25
|
+
"types": "./dist/playwright.d.ts",
|
|
26
|
+
"default": "./dist/playwright.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@extension-use/client": "0.1.0",
|
|
34
|
+
"@extension-use/host": "0.1.0",
|
|
35
|
+
"@extension-use/protocol": "0.1.0"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@playwright/test": ">=1.45"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"@playwright/test": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"browser-extension",
|
|
47
|
+
"chrome-extension",
|
|
48
|
+
"manifest-v3",
|
|
49
|
+
"side-panel",
|
|
50
|
+
"automation",
|
|
51
|
+
"extension-use"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsup src/index.ts src/playwright.ts --format esm --dts --clean --external @playwright/test"
|
|
55
|
+
}
|
|
6
56
|
}
|