Loading apps/cli/package.json +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading apps/cli/tsconfig.build.json +11 −0 Original line number Diff line number Diff line Loading @@ -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" } ], } apps/cli/tsconfig.json +0 −9 Original line number Diff line number Diff line { "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" } Loading apps/demo/package.json +14 −14 Original line number Diff line number Diff line Loading @@ -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", Loading @@ -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" Loading apps/demo/src/pages/chrome-devtools.tsx +15 −8 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ import { Symbols, WebSocket, request, setGlobalDispatcher, } from "@yume-chan/undici-browser"; import { action, Loading Loading @@ -113,8 +112,6 @@ const agent = new Agent({ } }, }); // WebSocket only uses global dispatcher setGlobalDispatcher(agent); interface Page { description: string; Loading @@ -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 { Loading Loading @@ -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 Loading
apps/cli/package.json +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading
apps/cli/tsconfig.build.json +11 −0 Original line number Diff line number Diff line Loading @@ -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" } ], }
apps/cli/tsconfig.json +0 −9 Original line number Diff line number Diff line { "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" } Loading
apps/demo/package.json +14 −14 Original line number Diff line number Diff line Loading @@ -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", Loading @@ -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" Loading
apps/demo/src/pages/chrome-devtools.tsx +15 −8 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ import { Symbols, WebSocket, request, setGlobalDispatcher, } from "@yume-chan/undici-browser"; import { action, Loading Loading @@ -113,8 +112,6 @@ const agent = new Agent({ } }, }); // WebSocket only uses global dispatcher setGlobalDispatcher(agent); interface Page { description: string; Loading @@ -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 { Loading Loading @@ -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