mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
chore: update dependencies
This commit is contained in:
parent
3beaad2055
commit
db796b6205
48 changed files with 827 additions and 748 deletions
|
@ -36,12 +36,12 @@
|
|||
"@yume-chan/stream-extra": "workspace:^0.0.19",
|
||||
"commander": "^10.0.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"tslib": "^2.5.0"
|
||||
"tslib": "^2.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@yume-chan/eslint-config": "workspace:^1.0.0",
|
||||
"@yume-chan/tsconfig": "workspace:^1.0.0",
|
||||
"eslint": "^8.39.0",
|
||||
"eslint": "^8.41.0",
|
||||
"jest": "^29.5.0",
|
||||
"prettier": "^2.8.8",
|
||||
"typescript": "^5.0.3"
|
||||
|
|
|
@ -6,4 +6,15 @@
|
|||
"DOM"
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../../libraries/adb/tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "../../libraries/adb-server-node-tcp/tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "../../libraries/stream-extra/tsconfig.build.json"
|
||||
}
|
||||
],
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
{
|
||||
"references": [
|
||||
{
|
||||
"path": "../../libraries/adb/tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "../../libraries/adb-server-node-tcp/tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "../../libraries/stream-extra/tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
}
|
||||
|
|
|
@ -10,17 +10,17 @@
|
|||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluentui/react": "^8.108.1",
|
||||
"@fluentui/react-file-type-icons": "^8.8.13",
|
||||
"@fluentui/react-hooks": "^8.6.20",
|
||||
"@fluentui/react-icons": "^2.0.200",
|
||||
"@fluentui/style-utilities": "^8.9.6",
|
||||
"@fluentui/react": "^8.109.4",
|
||||
"@fluentui/react-file-type-icons": "^8.8.17",
|
||||
"@fluentui/react-hooks": "^8.6.24",
|
||||
"@fluentui/react-icons": "^2.0.202",
|
||||
"@fluentui/style-utilities": "^8.9.10",
|
||||
"@griffel/react": "^1.5.7",
|
||||
"@yume-chan/adb": "workspace:^0.0.19",
|
||||
"@yume-chan/adb-credential-web": "workspace:^0.0.19",
|
||||
"@yume-chan/adb-daemon-direct-sockets": "workspace:^0.0.9",
|
||||
"@yume-chan/adb-daemon-webusb": "workspace:^0.0.19",
|
||||
"@yume-chan/adb-daemon-ws": "workspace:^0.0.9",
|
||||
"@yume-chan/adb-credential-web": "workspace:^0.0.19",
|
||||
"@yume-chan/adb-scrcpy": "workspace:^0.0.19",
|
||||
"@yume-chan/android-bin": "workspace:^0.0.19",
|
||||
"@yume-chan/aoa": "workspace:^0.0.19",
|
||||
|
@ -34,28 +34,28 @@
|
|||
"@yume-chan/stream-extra": "workspace:^0.0.19",
|
||||
"@yume-chan/stream-saver": "^2.0.6",
|
||||
"@yume-chan/struct": "workspace:^0.0.19",
|
||||
"@yume-chan/undici-browser": "5.21.2-mod.9",
|
||||
"@yume-chan/tabby-launcher": "workspace:^1.0.197-nightly.1",
|
||||
"@yume-chan/undici-browser": "5.22.1-mod.6",
|
||||
"comlink": "^4.4.1",
|
||||
"fflate": "^0.7.4",
|
||||
"mobx": "^6.7.0",
|
||||
"mobx-react-lite": "^3.4.3",
|
||||
"next": "13.3.1",
|
||||
"next": "13.4.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"webm-muxer": "^3.0.3"
|
||||
"webm-muxer": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdx-js/loader": "^2.2.1",
|
||||
"@mdx-js/react": "^2.2.1",
|
||||
"@next/bundle-analyzer": "^13.3.1",
|
||||
"@next/bundle-analyzer": "^13.4.3",
|
||||
"@next/mdx": "^13.3.1",
|
||||
"@types/dom-webcodecs": "^0.1.6",
|
||||
"@types/node": "^18.16.0",
|
||||
"@types/react": "18.0.38",
|
||||
"@types/node": "^20.2.1",
|
||||
"@types/react": "18.2.6",
|
||||
"@yume-chan/next-pwa": "5.6.0-mod.2",
|
||||
"eslint": "^8.39.0",
|
||||
"eslint-config-next": "13.3.1",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-next": "13.4.3",
|
||||
"prettier": "^2.8.8",
|
||||
"source-map-loader": "^4.0.1",
|
||||
"typescript": "^5.0.3"
|
||||
|
|
|
@ -14,7 +14,6 @@ import {
|
|||
Symbols,
|
||||
WebSocket,
|
||||
request,
|
||||
setGlobalDispatcher,
|
||||
} from "@yume-chan/undici-browser";
|
||||
import {
|
||||
action,
|
||||
|
@ -113,8 +112,6 @@ const agent = new Agent({
|
|||
}
|
||||
},
|
||||
});
|
||||
// WebSocket only uses global dispatcher
|
||||
setGlobalDispatcher(agent);
|
||||
|
||||
interface Page {
|
||||
description: string;
|
||||
|
@ -139,23 +136,31 @@ interface Version {
|
|||
// https://source.chromium.org/chromium/chromium/src/+/refs/heads/main:chrome/browser/devtools/device/devtools_device_discovery.cc;l=36;drc=4651cec294d1542d6673a89190e192e20de03240
|
||||
|
||||
async function getPages(socket: string) {
|
||||
const response = await request(`http://${socket}/json`);
|
||||
const response = await request(`http://${socket}/json`, {
|
||||
dispatcher: agent,
|
||||
});
|
||||
const body = await response.body.json();
|
||||
return body as Page[];
|
||||
}
|
||||
|
||||
async function getVersion(socket: string) {
|
||||
const response = await request(`http://${socket}/json/version`);
|
||||
const response = await request(`http://${socket}/json/version`, {
|
||||
dispatcher: agent,
|
||||
});
|
||||
const body = await response.body.json();
|
||||
return body as Version;
|
||||
}
|
||||
|
||||
async function focusPage(socket: string, page: Page) {
|
||||
await request(`http://${socket}/json/activate/${page.id}`);
|
||||
await request(`http://${socket}/json/activate/${page.id}`, {
|
||||
dispatcher: agent,
|
||||
});
|
||||
}
|
||||
|
||||
async function closePage(socket: string, page: Page) {
|
||||
await request(`http://${socket}/json/close/${page.id}`);
|
||||
await request(`http://${socket}/json/close/${page.id}`, {
|
||||
dispatcher: agent,
|
||||
});
|
||||
}
|
||||
|
||||
const {
|
||||
|
@ -322,7 +327,9 @@ const ChromeDevToolsPage: NextPage = observer(function ChromeDevTools() {
|
|||
|
||||
const port = e.ports[0];
|
||||
|
||||
const ws = new WebSocket(url);
|
||||
const ws = new WebSocket(url, {
|
||||
dispatcher: agent,
|
||||
});
|
||||
ws.binaryType = "arraybuffer";
|
||||
ws.onopen = () => {
|
||||
port.postMessage({ type: "open" });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue