usb 2.17.0 → 3.0.0-alpha.2
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 +18 -4
- package/README.md +25 -516
- package/dist/index.d.ts +67 -13
- package/dist/index.js +333 -64
- package/index.d.ts +89 -0
- package/index.js +583 -0
- package/package.json +53 -33
- package/CHANGELOG.md +0 -294
- package/binding.gyp +0 -128
- package/dist/index.js.map +0 -1
- package/dist/usb/bindings.d.ts +0 -266
- package/dist/usb/bindings.js +0 -10
- package/dist/usb/bindings.js.map +0 -1
- package/dist/usb/capability.d.ts +0 -13
- package/dist/usb/capability.js +0 -17
- package/dist/usb/capability.js.map +0 -1
- package/dist/usb/descriptors.d.ts +0 -128
- package/dist/usb/descriptors.js +0 -3
- package/dist/usb/descriptors.js.map +0 -1
- package/dist/usb/device.d.ts +0 -100
- package/dist/usb/device.js +0 -297
- package/dist/usb/device.js.map +0 -1
- package/dist/usb/endpoint.d.ts +0 -94
- package/dist/usb/endpoint.js +0 -219
- package/dist/usb/endpoint.js.map +0 -1
- package/dist/usb/index.d.ts +0 -31
- package/dist/usb/index.js +0 -116
- package/dist/usb/index.js.map +0 -1
- package/dist/usb/interface.d.ts +0 -80
- package/dist/usb/interface.js +0 -133
- package/dist/usb/interface.js.map +0 -1
- package/dist/webusb/index.d.ts +0 -64
- package/dist/webusb/index.js +0 -295
- package/dist/webusb/index.js.map +0 -1
- package/dist/webusb/webusb-device.d.ts +0 -54
- package/dist/webusb/webusb-device.js +0 -434
- package/dist/webusb/webusb-device.js.map +0 -1
- package/libusb/.clang-tidy +0 -34
- package/libusb/.codespellrc +0 -3
- package/libusb/.private/README.txt +0 -5
- package/libusb/.private/appveyor_build.sh +0 -26
- package/libusb/.private/bm.sh +0 -54
- package/libusb/.private/ci-build.sh +0 -92
- package/libusb/.private/ci-container-build.sh +0 -67
- package/libusb/.private/post-rewrite.sh +0 -32
- package/libusb/.private/pre-commit.sh +0 -52
- package/libusb/.private/wbs.txt +0 -43
- package/libusb/.travis.yml +0 -58
- package/libusb/AUTHORS +0 -231
- package/libusb/COPYING +0 -504
- package/libusb/ChangeLog +0 -365
- package/libusb/HACKING +0 -25
- package/libusb/INSTALL_WIN.txt +0 -52
- package/libusb/KEYS +0 -123
- package/libusb/Makefile.am +0 -50
- package/libusb/NEWS +0 -2
- package/libusb/PORTING +0 -94
- package/libusb/README +0 -29
- package/libusb/README.git +0 -41
- package/libusb/TODO +0 -2
- package/libusb/Xcode/common.xcconfig +0 -92
- package/libusb/Xcode/config.h +0 -31
- package/libusb/Xcode/debug.xcconfig +0 -32
- package/libusb/Xcode/libusb.xcconfig +0 -21
- package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +0 -1391
- package/libusb/Xcode/libusb_debug.xcconfig +0 -21
- package/libusb/Xcode/libusb_release.xcconfig +0 -21
- package/libusb/Xcode/release.xcconfig +0 -30
- package/libusb/android/README +0 -152
- package/libusb/android/config.h +0 -55
- package/libusb/android/examples/unrooted_android.c +0 -301
- package/libusb/android/examples/unrooted_android.h +0 -36
- package/libusb/android/jni/Android.mk +0 -23
- package/libusb/android/jni/Application.mk +0 -40
- package/libusb/android/jni/examples.mk +0 -168
- package/libusb/android/jni/libusb.mk +0 -60
- package/libusb/android/jni/tests.mk +0 -45
- package/libusb/appveyor.yml +0 -108
- package/libusb/autogen.sh +0 -10
- package/libusb/bootstrap.sh +0 -10
- package/libusb/configure.ac +0 -450
- package/libusb/doc/Makefile.in +0 -22
- package/libusb/doc/doxygen.cfg.in +0 -2571
- package/libusb/doc/libusb.png +0 -0
- package/libusb/examples/Makefile.am +0 -12
- package/libusb/examples/dpfp.c +0 -711
- package/libusb/examples/ezusb.c +0 -846
- package/libusb/examples/ezusb.h +0 -109
- package/libusb/examples/fxload.c +0 -310
- package/libusb/examples/hotplugtest.c +0 -147
- package/libusb/examples/listdevs.c +0 -73
- package/libusb/examples/sam3u_benchmark.c +0 -228
- package/libusb/examples/testlibusb.c +0 -312
- package/libusb/examples/xusb.c +0 -1254
- package/libusb/libusb/Makefile.am +0 -98
- package/libusb/libusb/Makefile.am.extra +0 -26
- package/libusb/libusb/core.c +0 -2925
- package/libusb/libusb/descriptor.c +0 -1558
- package/libusb/libusb/hotplug.c +0 -489
- package/libusb/libusb/io.c +0 -2865
- package/libusb/libusb/libusb-1.0.def +0 -199
- package/libusb/libusb/libusb-1.0.rc +0 -53
- package/libusb/libusb/libusb.h +0 -2421
- package/libusb/libusb/libusbi.h +0 -1535
- package/libusb/libusb/os/darwin_usb.c +0 -2977
- package/libusb/libusb/os/darwin_usb.h +0 -156
- package/libusb/libusb/os/emscripten_webusb.cpp +0 -875
- package/libusb/libusb/os/events_posix.c +0 -340
- package/libusb/libusb/os/events_posix.h +0 -62
- package/libusb/libusb/os/events_windows.c +0 -214
- package/libusb/libusb/os/events_windows.h +0 -46
- package/libusb/libusb/os/haiku_pollfs.cpp +0 -372
- package/libusb/libusb/os/haiku_usb.h +0 -113
- package/libusb/libusb/os/haiku_usb_backend.cpp +0 -532
- package/libusb/libusb/os/haiku_usb_raw.cpp +0 -231
- package/libusb/libusb/os/haiku_usb_raw.h +0 -188
- package/libusb/libusb/os/linux_netlink.c +0 -401
- package/libusb/libusb/os/linux_udev.c +0 -321
- package/libusb/libusb/os/linux_usbfs.c +0 -2829
- package/libusb/libusb/os/linux_usbfs.h +0 -221
- package/libusb/libusb/os/netbsd_usb.c +0 -617
- package/libusb/libusb/os/null_usb.c +0 -111
- package/libusb/libusb/os/openbsd_usb.c +0 -700
- package/libusb/libusb/os/sunos_usb.c +0 -1619
- package/libusb/libusb/os/sunos_usb.h +0 -79
- package/libusb/libusb/os/threads_posix.c +0 -126
- package/libusb/libusb/os/threads_posix.h +0 -98
- package/libusb/libusb/os/threads_windows.c +0 -40
- package/libusb/libusb/os/threads_windows.h +0 -113
- package/libusb/libusb/os/windows_common.c +0 -923
- package/libusb/libusb/os/windows_common.h +0 -424
- package/libusb/libusb/os/windows_usbdk.c +0 -724
- package/libusb/libusb/os/windows_usbdk.h +0 -106
- package/libusb/libusb/os/windows_winusb.c +0 -4766
- package/libusb/libusb/os/windows_winusb.h +0 -787
- package/libusb/libusb/strerror.c +0 -223
- package/libusb/libusb/sync.c +0 -342
- package/libusb/libusb/version.h +0 -18
- package/libusb/libusb/version_nano.h +0 -1
- package/libusb/libusb-1.0.pc.in +0 -11
- package/libusb/msvc/Base.props +0 -60
- package/libusb/msvc/Configuration.Application.props +0 -7
- package/libusb/msvc/Configuration.Base.props +0 -47
- package/libusb/msvc/Configuration.DynamicLibrary.props +0 -21
- package/libusb/msvc/Configuration.StaticLibrary.props +0 -7
- package/libusb/msvc/ProjectConfigurations.Base.props +0 -69
- package/libusb/msvc/build_all.ps1 +0 -17
- package/libusb/msvc/config.h +0 -58
- package/libusb/msvc/dpfp.vcxproj +0 -33
- package/libusb/msvc/dpfp_threaded.vcxproj +0 -38
- package/libusb/msvc/fxload.vcxproj +0 -46
- package/libusb/msvc/getopt/getopt.c +0 -1060
- package/libusb/msvc/getopt/getopt.h +0 -180
- package/libusb/msvc/getopt/getopt1.c +0 -188
- package/libusb/msvc/getopt.vcxproj +0 -33
- package/libusb/msvc/hotplugtest.vcxproj +0 -32
- package/libusb/msvc/init_context.vcxproj +0 -35
- package/libusb/msvc/libusb.sln +0 -542
- package/libusb/msvc/libusb_dll.vcxproj +0 -61
- package/libusb/msvc/libusb_static.vcxproj +0 -49
- package/libusb/msvc/listdevs.vcxproj +0 -32
- package/libusb/msvc/sam3u_benchmark.vcxproj +0 -33
- package/libusb/msvc/set_option.vcxproj +0 -35
- package/libusb/msvc/stress.vcxproj +0 -35
- package/libusb/msvc/stress_mt.vcxproj +0 -33
- package/libusb/msvc/testlibusb.vcxproj +0 -32
- package/libusb/msvc/xusb.vcxproj +0 -38
- package/libusb/tests/Makefile.am +0 -40
- package/libusb/tests/init_context.c +0 -153
- package/libusb/tests/libusb_testlib.h +0 -76
- package/libusb/tests/macos.c +0 -130
- package/libusb/tests/set_option.c +0 -253
- package/libusb/tests/stress.c +0 -172
- package/libusb/tests/stress_mt.c +0 -267
- package/libusb/tests/testlib.c +0 -184
- package/libusb/tests/umockdev.c +0 -1175
- package/libusb/tests/webusb-test-shim/index.js +0 -12
- package/libusb/tests/webusb-test-shim/package-lock.json +0 -50
- package/libusb/tests/webusb-test-shim/package.json +0 -10
- package/libusb.gypi +0 -154
- package/libusb_config/config.h +0 -1
- package/prebuilds/android-arm/node.napi.armv7.node +0 -0
- package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
- package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/linux-ia32/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/prebuilds/win32-arm64/node.napi.node +0 -0
- package/prebuilds/win32-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/device.cc +0 -439
- package/src/helpers.h +0 -64
- package/src/hotplug/hotplug.h +0 -22
- package/src/hotplug/libusb.cc +0 -90
- package/src/hotplug/windows.cc +0 -168
- package/src/node_usb.cc +0 -314
- package/src/node_usb.h +0 -131
- package/src/thread_name.cc +0 -79
- package/src/thread_name.h +0 -11
- package/src/transfer.cc +0 -143
- package/src/uv_async_queue.h +0 -41
- package/test/usb.coffee +0 -250
- package/test/webusb.coffee +0 -227
- package/test/worker.cjs +0 -13
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// It's not yet possible to automate actual Chrome's device selection, so
|
|
2
|
-
// for now run automated tests via Node.js WebUSB implementation.
|
|
3
|
-
//
|
|
4
|
-
// It might differ from browser one, but should be enough to catch most obvious issues.
|
|
5
|
-
|
|
6
|
-
const { WebUSB } = require('usb');
|
|
7
|
-
|
|
8
|
-
globalThis.navigator = {
|
|
9
|
-
usb: new WebUSB({
|
|
10
|
-
allowAllDevices: true
|
|
11
|
-
})
|
|
12
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "webusb-test-runner",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "webusb-test-runner",
|
|
9
|
-
"version": "1.0.0",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"usb": "^2.11.0"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"node_modules/@types/w3c-web-usb": {
|
|
16
|
-
"version": "1.0.10",
|
|
17
|
-
"resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.10.tgz",
|
|
18
|
-
"integrity": "sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ=="
|
|
19
|
-
},
|
|
20
|
-
"node_modules/node-addon-api": {
|
|
21
|
-
"version": "7.0.0",
|
|
22
|
-
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz",
|
|
23
|
-
"integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA=="
|
|
24
|
-
},
|
|
25
|
-
"node_modules/node-gyp-build": {
|
|
26
|
-
"version": "4.7.0",
|
|
27
|
-
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.0.tgz",
|
|
28
|
-
"integrity": "sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==",
|
|
29
|
-
"bin": {
|
|
30
|
-
"node-gyp-build": "bin.js",
|
|
31
|
-
"node-gyp-build-optional": "optional.js",
|
|
32
|
-
"node-gyp-build-test": "build-test.js"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"node_modules/usb": {
|
|
36
|
-
"version": "2.11.0",
|
|
37
|
-
"resolved": "https://registry.npmjs.org/usb/-/usb-2.11.0.tgz",
|
|
38
|
-
"integrity": "sha512-u5+NZ6DtoW8TIBtuSArQGAZZ/K15i3lYvZBAYmcgI+RcDS9G50/KPrUd3CrU8M92ahyCvg5e0gc8BDvr5Hwejg==",
|
|
39
|
-
"hasInstallScript": true,
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@types/w3c-web-usb": "^1.0.6",
|
|
42
|
-
"node-addon-api": "^7.0.0",
|
|
43
|
-
"node-gyp-build": "^4.5.0"
|
|
44
|
-
},
|
|
45
|
-
"engines": {
|
|
46
|
-
"node": ">=12.22.0 <13.0 || >=14.17.0"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
package/libusb.gypi
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
'variables': {
|
|
3
|
-
'use_udev%': 1,
|
|
4
|
-
'use_system_libusb%': 'false',
|
|
5
|
-
'module_name': 'usb_bindings',
|
|
6
|
-
'module_path': './src/binding'
|
|
7
|
-
},
|
|
8
|
-
'targets': [
|
|
9
|
-
{
|
|
10
|
-
# Based on https://chromium.googlesource.com/chromium/src/+/master/third_party/libusb/libusb.gyp
|
|
11
|
-
'target_name': 'libusb',
|
|
12
|
-
'type': 'static_library',
|
|
13
|
-
'sources': [
|
|
14
|
-
'libusb_config/config.h',
|
|
15
|
-
'libusb/libusb/core.c',
|
|
16
|
-
'libusb/libusb/descriptor.c',
|
|
17
|
-
'libusb/libusb/hotplug.c',
|
|
18
|
-
'libusb/libusb/io.c',
|
|
19
|
-
'libusb/libusb/libusb.h',
|
|
20
|
-
'libusb/libusb/libusbi.h',
|
|
21
|
-
'libusb/libusb/strerror.c',
|
|
22
|
-
'libusb/libusb/sync.c',
|
|
23
|
-
'libusb/libusb/version_nano.h',
|
|
24
|
-
'libusb/libusb/version.h',
|
|
25
|
-
],
|
|
26
|
-
'include_dirs': [
|
|
27
|
-
'libusb_config',
|
|
28
|
-
'libusb/libusb',
|
|
29
|
-
'libusb/libusb/os',
|
|
30
|
-
],
|
|
31
|
-
'direct_dependent_settings': {
|
|
32
|
-
'include_dirs': [
|
|
33
|
-
'libusb/libusb',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
'defines': [
|
|
37
|
-
'ENABLE_LOGGING=1',
|
|
38
|
-
],
|
|
39
|
-
'cflags': [
|
|
40
|
-
'-w',
|
|
41
|
-
],
|
|
42
|
-
'conditions': [
|
|
43
|
-
[ 'OS == "linux" or OS == "android" or OS == "mac"', {
|
|
44
|
-
'sources': [
|
|
45
|
-
'libusb/libusb/os/events_posix.c',
|
|
46
|
-
'libusb/libusb/os/events_posix.h',
|
|
47
|
-
'libusb/libusb/os/threads_posix.c',
|
|
48
|
-
'libusb/libusb/os/threads_posix.h',
|
|
49
|
-
],
|
|
50
|
-
'defines': [
|
|
51
|
-
'PLATFORM_POSIX=1',
|
|
52
|
-
'PRINTF_FORMAT(a, b)=__attribute__ ((__format__ (__printf__, a, b)))',
|
|
53
|
-
'DEFAULT_VISIBILITY=',
|
|
54
|
-
'HAVE_GETTIMEOFDAY=1',
|
|
55
|
-
'HAVE_POLL_H=1',
|
|
56
|
-
'HAVE_SYS_TIME_H=1',
|
|
57
|
-
'LIBUSB_DESCRIBE="1.0.17"',
|
|
58
|
-
'POLL_NFDS_TYPE=nfds_t',
|
|
59
|
-
'THREADS_POSIX=1',
|
|
60
|
-
],
|
|
61
|
-
}],
|
|
62
|
-
[ 'OS == "linux" or OS == "android"', {
|
|
63
|
-
'sources': [
|
|
64
|
-
'libusb/libusb/os/linux_usbfs.c',
|
|
65
|
-
'libusb/libusb/os/linux_usbfs.h',
|
|
66
|
-
],
|
|
67
|
-
'defines': [
|
|
68
|
-
'HAVE_CLOCK_GETTIME=1',
|
|
69
|
-
'OS_LINUX=1',
|
|
70
|
-
'_GNU_SOURCE=1',
|
|
71
|
-
'USBI_TIMERFD_AVAILABLE=1',
|
|
72
|
-
],
|
|
73
|
-
}],
|
|
74
|
-
[ 'OS == "linux" and use_udev == 1 or OS == "android"', {
|
|
75
|
-
'sources': [
|
|
76
|
-
'libusb/libusb/os/linux_udev.c',
|
|
77
|
-
],
|
|
78
|
-
'defines': [
|
|
79
|
-
'HAVE_LIBUDEV=1',
|
|
80
|
-
'USE_UDEV=1',
|
|
81
|
-
],
|
|
82
|
-
'direct_dependent_settings': {
|
|
83
|
-
'libraries': [
|
|
84
|
-
'-ludev',
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
}],
|
|
88
|
-
[ 'OS == "linux" and use_udev == 0', {
|
|
89
|
-
'sources': [
|
|
90
|
-
'libusb/libusb/os/linux_netlink.c',
|
|
91
|
-
],
|
|
92
|
-
'defines': [
|
|
93
|
-
'HAVE_LINUX_NETLINK_H',
|
|
94
|
-
],
|
|
95
|
-
'conditions': [
|
|
96
|
-
['clang==1', {
|
|
97
|
-
'cflags': [
|
|
98
|
-
'-Wno-pointer-sign',
|
|
99
|
-
]
|
|
100
|
-
}]
|
|
101
|
-
],
|
|
102
|
-
}],
|
|
103
|
-
[ 'OS == "mac"', {
|
|
104
|
-
'sources': [
|
|
105
|
-
'libusb/libusb/os/darwin_usb.c',
|
|
106
|
-
'libusb/libusb/os/darwin_usb.h',
|
|
107
|
-
'libusb/Xcode/config.h',
|
|
108
|
-
],
|
|
109
|
-
'include_dirs': [
|
|
110
|
-
'libusb/Xcode',
|
|
111
|
-
],
|
|
112
|
-
'defines': [
|
|
113
|
-
'OS_DARWIN=1',
|
|
114
|
-
],
|
|
115
|
-
'xcode_settings': {
|
|
116
|
-
'OTHER_CFLAGS': [
|
|
117
|
-
'-arch x86_64',
|
|
118
|
-
'-arch arm64'
|
|
119
|
-
],
|
|
120
|
-
'CLANG_CXX_LIBRARY': 'libc++',
|
|
121
|
-
'MACOSX_DEPLOYMENT_TARGET': '10.7'
|
|
122
|
-
}
|
|
123
|
-
}],
|
|
124
|
-
[ 'OS == "win"', {
|
|
125
|
-
'sources': [
|
|
126
|
-
'libusb/libusb/os/events_windows.c',
|
|
127
|
-
'libusb/libusb/os/events_windows.h',
|
|
128
|
-
'libusb/libusb/os/threads_windows.c',
|
|
129
|
-
'libusb/libusb/os/threads_windows.h',
|
|
130
|
-
'libusb/libusb/os/windows_common.c',
|
|
131
|
-
'libusb/libusb/os/windows_common.h',
|
|
132
|
-
'libusb/libusb/os/windows_usbdk.c',
|
|
133
|
-
'libusb/libusb/os/windows_usbdk.h',
|
|
134
|
-
'libusb/libusb/os/windows_winusb.c',
|
|
135
|
-
'libusb/libusb/os/windows_winusb.h',
|
|
136
|
-
'libusb/msvc/config.h',
|
|
137
|
-
],
|
|
138
|
-
'include_dirs!': [
|
|
139
|
-
'libusb_config',
|
|
140
|
-
],
|
|
141
|
-
'include_dirs': [
|
|
142
|
-
'libusb/msvc',
|
|
143
|
-
],
|
|
144
|
-
'msvs_disabled_warnings': [ 4267 ],
|
|
145
|
-
'msvs_settings': {
|
|
146
|
-
'VCCLCompilerTool': {
|
|
147
|
-
'AdditionalOptions': [ '/source-charset:utf-8' ],
|
|
148
|
-
},
|
|
149
|
-
}
|
|
150
|
-
}],
|
|
151
|
-
],
|
|
152
|
-
},
|
|
153
|
-
]
|
|
154
|
-
}
|
package/libusb_config/config.h
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/* Nothing. Configured by gyp. */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|