mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 09:49:24 +02:00
fix(usb): fix getDevices
doesn't match filter with auto generated serial number
This commit is contained in:
parent
4494e1b969
commit
06b3f47680
10 changed files with 132 additions and 105 deletions
|
@ -43,7 +43,7 @@
|
|||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@yume-chan/eslint-config": "workspace:^1.0.0",
|
||||
"@yume-chan/tsconfig": "workspace:^1.0.0",
|
||||
"eslint": "^8.56.0",
|
||||
|
|
188
common/config/rush/pnpm-lock.yaml
generated
188
common/config/rush/pnpm-lock.yaml
generated
|
@ -33,8 +33,8 @@ importers:
|
|||
version: 2.6.2
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.10.4
|
||||
version: 20.10.4
|
||||
specifier: ^20.10.5
|
||||
version: 20.10.5
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^1.0.0
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -46,7 +46,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -79,8 +79,8 @@ importers:
|
|||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2
|
||||
'@types/node':
|
||||
specifier: ^20.10.4
|
||||
version: 20.10.4
|
||||
specifier: ^20.10.5
|
||||
version: 20.10.5
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^1.0.0
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -95,7 +95,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -206,7 +206,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -233,8 +233,8 @@ importers:
|
|||
version: 2.6.2
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.10.4
|
||||
version: 20.10.4
|
||||
specifier: ^20.10.5
|
||||
version: 20.10.5
|
||||
'@yume-chan/eslint-config':
|
||||
specifier: workspace:^1.0.0
|
||||
version: link:../../toolchain/eslint-config
|
||||
|
@ -246,7 +246,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -286,7 +286,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -333,7 +333,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -367,7 +367,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -385,8 +385,8 @@ importers:
|
|||
version: 4.0.3
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.10.4
|
||||
version: 20.10.4
|
||||
specifier: ^20.10.5
|
||||
version: 20.10.5
|
||||
|
||||
../../libraries/pcm-player:
|
||||
dependencies:
|
||||
|
@ -414,7 +414,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -454,7 +454,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -509,7 +509,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -552,7 +552,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -595,7 +595,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -632,7 +632,7 @@ importers:
|
|||
version: 8.56.0
|
||||
jest:
|
||||
specifier: ^30.0.0-alpha.2
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
version: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
|
@ -649,11 +649,11 @@ importers:
|
|||
specifier: ^1.6.1
|
||||
version: 1.6.1
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: ^6.14.0
|
||||
version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
specifier: ^6.16.0
|
||||
version: 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^6.14.0
|
||||
version: 6.14.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
specifier: ^6.16.0
|
||||
version: 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint:
|
||||
specifier: ^8.56.0
|
||||
version: 8.56.0
|
||||
|
@ -1086,7 +1086,7 @@ packages:
|
|||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
jest-message-util: 30.0.0-alpha.2
|
||||
jest-util: 30.0.0-alpha.2
|
||||
|
@ -1107,14 +1107,14 @@ packages:
|
|||
'@jest/test-result': 30.0.0-alpha.2
|
||||
'@jest/transform': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
ansi-escapes: 4.3.2
|
||||
chalk: 4.1.2
|
||||
ci-info: 4.0.0
|
||||
exit: 0.1.2
|
||||
graceful-fs: 4.2.11
|
||||
jest-changed-files: 30.0.0-alpha.2
|
||||
jest-config: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
jest-config: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
jest-haste-map: 30.0.0-alpha.2
|
||||
jest-message-util: 30.0.0-alpha.2
|
||||
jest-regex-util: 30.0.0-alpha.2
|
||||
|
@ -1142,7 +1142,7 @@ packages:
|
|||
dependencies:
|
||||
'@jest/fake-timers': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
jest-mock: 30.0.0-alpha.2
|
||||
dev: true
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ packages:
|
|||
dependencies:
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@sinonjs/fake-timers': 11.2.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
jest-message-util: 30.0.0-alpha.2
|
||||
jest-mock: 30.0.0-alpha.2
|
||||
jest-util: 30.0.0-alpha.2
|
||||
|
@ -1202,7 +1202,7 @@ packages:
|
|||
'@jest/transform': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@jridgewell/trace-mapping': 0.3.20
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
collect-v8-coverage: 1.0.2
|
||||
exit: 0.1.2
|
||||
|
@ -1297,7 +1297,7 @@ packages:
|
|||
'@jest/schemas': 29.6.3
|
||||
'@types/istanbul-lib-coverage': 2.0.6
|
||||
'@types/istanbul-reports': 3.0.4
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
'@types/yargs': 17.0.32
|
||||
chalk: 4.1.2
|
||||
dev: true
|
||||
|
@ -1309,7 +1309,7 @@ packages:
|
|||
'@jest/schemas': 30.0.0-alpha.2
|
||||
'@types/istanbul-lib-coverage': 2.0.6
|
||||
'@types/istanbul-reports': 3.0.4
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
'@types/yargs': 17.0.32
|
||||
chalk: 4.1.2
|
||||
dev: true
|
||||
|
@ -1475,8 +1475,8 @@ packages:
|
|||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
dev: false
|
||||
|
||||
/@types/node@20.10.4:
|
||||
resolution: {integrity: sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==}
|
||||
/@types/node@20.10.5:
|
||||
resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
|
@ -1503,8 +1503,8 @@ packages:
|
|||
'@types/yargs-parser': 21.0.3
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==}
|
||||
/@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
|
||||
|
@ -1515,11 +1515,11 @@ packages:
|
|||
optional: true
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.14.0
|
||||
'@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.14.0
|
||||
'@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
graphemer: 1.4.0
|
||||
|
@ -1532,8 +1532,8 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==}
|
||||
/@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
|
@ -1542,10 +1542,10 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 6.14.0
|
||||
'@typescript-eslint/types': 6.14.0
|
||||
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.14.0
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
typescript: 5.3.3
|
||||
|
@ -1553,16 +1553,16 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/scope-manager@6.14.0:
|
||||
resolution: {integrity: sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==}
|
||||
/@typescript-eslint/scope-manager@6.16.0:
|
||||
resolution: {integrity: sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.14.0
|
||||
'@typescript-eslint/visitor-keys': 6.14.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/type-utils@6.14.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==}
|
||||
/@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
|
@ -1571,8 +1571,8 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
ts-api-utils: 1.0.3(typescript@5.3.3)
|
||||
|
@ -1581,13 +1581,13 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/types@6.14.0:
|
||||
resolution: {integrity: sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==}
|
||||
/@typescript-eslint/types@6.16.0:
|
||||
resolution: {integrity: sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/typescript-estree@6.14.0(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==}
|
||||
/@typescript-eslint/typescript-estree@6.16.0(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
|
@ -1595,11 +1595,12 @@ packages:
|
|||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.14.0
|
||||
'@typescript-eslint/visitor-keys': 6.14.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.3
|
||||
semver: 7.5.4
|
||||
ts-api-utils: 1.0.3(typescript@5.3.3)
|
||||
typescript: 5.3.3
|
||||
|
@ -1607,8 +1608,8 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/utils@6.14.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==}
|
||||
/@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
|
@ -1616,9 +1617,9 @@ packages:
|
|||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
|
||||
'@types/json-schema': 7.0.15
|
||||
'@types/semver': 7.5.6
|
||||
'@typescript-eslint/scope-manager': 6.14.0
|
||||
'@typescript-eslint/types': 6.14.0
|
||||
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
eslint: 8.56.0
|
||||
semver: 7.5.4
|
||||
transitivePeerDependencies:
|
||||
|
@ -1626,11 +1627,11 @@ packages:
|
|||
- typescript
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/visitor-keys@6.14.0:
|
||||
resolution: {integrity: sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==}
|
||||
/@typescript-eslint/visitor-keys@6.16.0:
|
||||
resolution: {integrity: sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.14.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: false
|
||||
|
||||
|
@ -1956,6 +1957,12 @@ packages:
|
|||
balanced-match: 1.0.2
|
||||
concat-map: 0.0.1
|
||||
|
||||
/brace-expansion@2.0.1:
|
||||
resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==}
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
dev: false
|
||||
|
||||
/braces@3.0.2:
|
||||
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
|
||||
engines: {node: '>=8'}
|
||||
|
@ -3249,7 +3256,7 @@ packages:
|
|||
'@jest/expect': 30.0.0-alpha.2
|
||||
'@jest/test-result': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
co: 4.6.0
|
||||
dedent: 1.5.1
|
||||
|
@ -3270,7 +3277,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/jest-cli@30.0.0-alpha.2(@types/node@20.10.4):
|
||||
/jest-cli@30.0.0-alpha.2(@types/node@20.10.5):
|
||||
resolution: {integrity: sha512-xBuIqOGv4uxhUZLVnrlhRVTpuBl5G6mcl8g4fn1yR66YPaPsxHuCQVrKV4rPbd2l7piuajjBm/ueuzYg0KR07Q==}
|
||||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
|
@ -3286,7 +3293,7 @@ packages:
|
|||
chalk: 4.1.2
|
||||
exit: 0.1.2
|
||||
import-local: 3.1.0
|
||||
jest-config: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
jest-config: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
jest-util: 30.0.0-alpha.2
|
||||
jest-validate: 30.0.0-alpha.2
|
||||
yargs: 17.7.2
|
||||
|
@ -3297,7 +3304,7 @@ packages:
|
|||
- ts-node
|
||||
dev: true
|
||||
|
||||
/jest-config@30.0.0-alpha.2(@types/node@20.10.4):
|
||||
/jest-config@30.0.0-alpha.2(@types/node@20.10.5):
|
||||
resolution: {integrity: sha512-uTN0r0Ly+CPLAJb65mSucSkcKqOcRTrOY2Wda9dbUIdcin5hd3TqNPy32eYyxwVRahQTqgiUJGjmdI79pXBjxA==}
|
||||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
|
@ -3312,7 +3319,7 @@ packages:
|
|||
'@babel/core': 7.23.6
|
||||
'@jest/test-sequencer': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
babel-jest: 30.0.0-alpha.2(@babel/core@7.23.6)
|
||||
chalk: 4.1.2
|
||||
ci-info: 4.0.0
|
||||
|
@ -3372,7 +3379,7 @@ packages:
|
|||
'@jest/environment': 30.0.0-alpha.2
|
||||
'@jest/fake-timers': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
jest-mock: 30.0.0-alpha.2
|
||||
jest-util: 30.0.0-alpha.2
|
||||
dev: true
|
||||
|
@ -3387,7 +3394,7 @@ packages:
|
|||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
anymatch: 3.1.3
|
||||
fb-watchman: 2.0.2
|
||||
graceful-fs: 4.2.11
|
||||
|
@ -3438,7 +3445,7 @@ packages:
|
|||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
jest-util: 30.0.0-alpha.2
|
||||
dev: true
|
||||
|
||||
|
@ -3493,7 +3500,7 @@ packages:
|
|||
'@jest/test-result': 30.0.0-alpha.2
|
||||
'@jest/transform': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
emittery: 0.13.1
|
||||
graceful-fs: 4.2.11
|
||||
|
@ -3524,7 +3531,7 @@ packages:
|
|||
'@jest/test-result': 30.0.0-alpha.2
|
||||
'@jest/transform': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
cjs-module-lexer: 1.2.3
|
||||
collect-v8-coverage: 1.0.2
|
||||
|
@ -3577,7 +3584,7 @@ packages:
|
|||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 29.6.3
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
ci-info: 3.9.0
|
||||
graceful-fs: 4.2.11
|
||||
|
@ -3589,7 +3596,7 @@ packages:
|
|||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
chalk: 4.1.2
|
||||
ci-info: 4.0.0
|
||||
graceful-fs: 4.2.11
|
||||
|
@ -3614,7 +3621,7 @@ packages:
|
|||
dependencies:
|
||||
'@jest/test-result': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
ansi-escapes: 4.3.2
|
||||
chalk: 4.1.2
|
||||
emittery: 0.13.1
|
||||
|
@ -3626,13 +3633,13 @@ packages:
|
|||
resolution: {integrity: sha512-ucN1yueK1Kq6gytid2AwsNemTRpq79h61fXgySGhRtlHFcsM4Su6sPFQrWzUcGg9F8fNI4HjLZckqdTFW2tvtg==}
|
||||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
dependencies:
|
||||
'@types/node': 20.10.4
|
||||
'@types/node': 20.10.5
|
||||
jest-util: 30.0.0-alpha.2
|
||||
merge-stream: 2.0.0
|
||||
supports-color: 8.1.1
|
||||
dev: true
|
||||
|
||||
/jest@30.0.0-alpha.2(@types/node@20.10.4):
|
||||
/jest@30.0.0-alpha.2(@types/node@20.10.5):
|
||||
resolution: {integrity: sha512-IsPsmd3eNViFholO9CjVhZQxP/YXePGDgQi4m3RKRu/cc+AfyVxjKbpU1LQzVHCLJGblik1kDl9WeCkMGyMHvQ==}
|
||||
engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
|
@ -3645,7 +3652,7 @@ packages:
|
|||
'@jest/core': 30.0.0-alpha.2
|
||||
'@jest/types': 30.0.0-alpha.2
|
||||
import-local: 3.1.0
|
||||
jest-cli: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
jest-cli: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- babel-plugin-macros
|
||||
|
@ -3834,6 +3841,13 @@ packages:
|
|||
dependencies:
|
||||
brace-expansion: 1.1.11
|
||||
|
||||
/minimatch@9.0.3:
|
||||
resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
dependencies:
|
||||
brace-expansion: 2.0.1
|
||||
dev: false
|
||||
|
||||
/minimist@1.2.8:
|
||||
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
|
||||
dev: false
|
||||
|
@ -4603,7 +4617,7 @@ packages:
|
|||
dependencies:
|
||||
bs-logger: 0.2.6
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
jest: 30.0.0-alpha.2(@types/node@20.10.4)
|
||||
jest: 30.0.0-alpha.2(@types/node@20.10.5)
|
||||
jest-util: 29.7.0
|
||||
json5: 2.2.3
|
||||
lodash.memoize: 4.1.2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
||||
{
|
||||
"pnpmShrinkwrapHash": "da9c080b9b164b35e32ebbd511862e2960bc800b",
|
||||
"pnpmShrinkwrapHash": "4d086ee4091667e3ff2032d5ea4d4353d66a65c0",
|
||||
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
||||
}
|
||||
|
|
|
@ -23,7 +23,11 @@ import type { ExactReadable } from "@yume-chan/struct";
|
|||
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";
|
||||
|
||||
import type { AdbDeviceFilter } from "./utils.js";
|
||||
import { findUsbAlternateInterface, isErrorName } from "./utils.js";
|
||||
import {
|
||||
findUsbAlternateInterface,
|
||||
getSerialNumber,
|
||||
isErrorName,
|
||||
} from "./utils.js";
|
||||
|
||||
/**
|
||||
* The default filter for ADB devices, as defined by Google.
|
||||
|
@ -310,14 +314,7 @@ export class AdbDaemonWebUsbDevice implements AdbDaemonDevice {
|
|||
usbManager: USB,
|
||||
) {
|
||||
this.#raw = device;
|
||||
if (device.serialNumber) {
|
||||
this.#serial = device.serialNumber;
|
||||
} else {
|
||||
this.#serial =
|
||||
device.vendorId.toString(16).padStart(4, "0") +
|
||||
"x" +
|
||||
device.productId.toString(16).padStart(4, "0");
|
||||
}
|
||||
this.#serial = getSerialNumber(device);
|
||||
this.#filters = filters;
|
||||
this.#usbManager = usbManager;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import { ADB_DEFAULT_DEVICE_FILTER, AdbDaemonWebUsbDevice } from "./device.js";
|
||||
import type { AdbDeviceFilter } from "./utils.js";
|
||||
import { findUsbAlternateInterface, isErrorName } from "./utils.js";
|
||||
import {
|
||||
findUsbAlternateInterface,
|
||||
getSerialNumber,
|
||||
isErrorName,
|
||||
} from "./utils.js";
|
||||
|
||||
export namespace AdbDaemonWebUsbDeviceManager {
|
||||
export interface RequestDeviceOptions {
|
||||
|
@ -109,7 +113,7 @@ export class AdbDaemonWebUsbDeviceManager {
|
|||
}
|
||||
if (
|
||||
"serialNumber" in filter &&
|
||||
device.serialNumber !== filter.serialNumber
|
||||
getSerialNumber(device) !== filter.serialNumber
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -44,3 +44,15 @@ export function findUsbAlternateInterface(
|
|||
|
||||
throw new Error("No matched alternate interface found");
|
||||
}
|
||||
|
||||
function padNumber(value: number) {
|
||||
return value.toString(16).padStart(4, "0");
|
||||
}
|
||||
|
||||
export function getSerialNumber(device: USBDevice) {
|
||||
if (device.serialNumber) {
|
||||
return device.serialNumber;
|
||||
}
|
||||
|
||||
return padNumber(device.vendorId) + "x" + padNumber(device.productId);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@yume-chan/eslint-config": "workspace:^1.0.0",
|
||||
"@yume-chan/tsconfig": "workspace:^1.0.0",
|
||||
"eslint": "^8.56.0",
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^30.0.0-alpha.2",
|
||||
"@types/node": "^20.10.4",
|
||||
"@types/node": "^20.10.5",
|
||||
"@yume-chan/eslint-config": "workspace:^1.0.0",
|
||||
"@yume-chan/tsconfig": "workspace:^1.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
"gh-release-fetch": "^4.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.4"
|
||||
"@types/node": "^20.10.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@rushstack/eslint-patch": "^1.6.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
||||
"@typescript-eslint/parser": "^6.16.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"typescript": "^5.3.3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue