mirror of
https://github.com/AdsPower/adspower-browser.git
synced 2026-09-19 03:08:18 +08:00
refactor(core): browserBase 改用 playwright-core 以支持 CDP 与可打包产物
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"colors": "^1.4.0",
|
||||
"commander": "^14.0.3",
|
||||
"fs-extra2": "^1.0.1",
|
||||
"playwright": "^1.51.1",
|
||||
"playwright-core": "^1.51.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -7,5 +7,5 @@ export default defineConfig({
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
// Bundle @adspower/local-api-core from workspace (source); keep runtime deps external
|
||||
external: ['axios', 'playwright', 'zod'],
|
||||
external: ['axios', 'playwright-core', 'zod'],
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"axios": "^1.8.4",
|
||||
"playwright": "^1.51.1",
|
||||
"playwright-core": "^1.51.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Browser, Page, chromium } from 'playwright';
|
||||
import { Browser, Page, chromium } from 'playwright-core';
|
||||
|
||||
class BrowserBase {
|
||||
private browser: Browser | null;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.7.0",
|
||||
"axios": "^1.8.4",
|
||||
"playwright": "^1.51.1",
|
||||
"playwright-core": "^1.51.1",
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -7,5 +7,5 @@ export default defineConfig({
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
// Bundle @adspower/local-api-core from workspace (source); keep runtime deps external
|
||||
external: ['axios', 'playwright', 'zod', '@modelcontextprotocol/sdk'],
|
||||
external: ['axios', 'playwright-core', 'zod', '@modelcontextprotocol/sdk'],
|
||||
});
|
||||
|
||||
Generated
+3
-14
@@ -29,7 +29,7 @@ importers:
|
||||
fs-extra2:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
playwright:
|
||||
playwright-core:
|
||||
specifier: ^1.51.1
|
||||
version: 1.51.1
|
||||
zod:
|
||||
@@ -54,7 +54,7 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.8.4
|
||||
version: 1.8.4
|
||||
playwright:
|
||||
playwright-core:
|
||||
specifier: ^1.51.1
|
||||
version: 1.51.1
|
||||
zod:
|
||||
@@ -76,7 +76,7 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.8.4
|
||||
version: 1.8.4
|
||||
playwright:
|
||||
playwright-core:
|
||||
specifier: ^1.51.1
|
||||
version: 1.51.1
|
||||
zod:
|
||||
@@ -893,11 +893,6 @@ packages:
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
playwright@1.51.1:
|
||||
resolution: {integrity: sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
postcss-load-config@6.0.1:
|
||||
resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==}
|
||||
engines: {node: '>= 18'}
|
||||
@@ -1868,12 +1863,6 @@ snapshots:
|
||||
|
||||
playwright-core@1.51.1: {}
|
||||
|
||||
playwright@1.51.1:
|
||||
dependencies:
|
||||
playwright-core: 1.51.1
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
|
||||
postcss-load-config@6.0.1(postcss@8.5.9):
|
||||
dependencies:
|
||||
lilconfig: 3.1.3
|
||||
|
||||
Reference in New Issue
Block a user