@devicefarmer/adbkit 2.11.3 → 3.2.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/.github/dependabot.yml +46 -0
- package/CONTRIBUTING.md +28 -0
- package/README.md +749 -759
- package/bin/adbkit +1 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +84 -0
- package/dist/src/Callback.d.ts +2 -0
- package/dist/src/Callback.d.ts.map +1 -0
- package/dist/src/Callback.js +3 -0
- package/dist/src/Callback.js.map +1 -0
- package/dist/src/ClientOptions.d.ts +6 -0
- package/dist/src/ClientOptions.d.ts.map +1 -0
- package/dist/src/ClientOptions.js +3 -0
- package/dist/src/ClientOptions.js.map +1 -0
- package/dist/src/CpuStats.d.ts +17 -0
- package/dist/src/CpuStats.d.ts.map +1 -0
- package/dist/src/CpuStats.js +3 -0
- package/dist/src/CpuStats.js.map +1 -0
- package/dist/src/Device.d.ts +5 -0
- package/dist/src/Device.d.ts.map +1 -0
- package/dist/src/Device.js +3 -0
- package/dist/src/Device.js.map +1 -0
- package/dist/src/DeviceWithPath.d.ts +9 -0
- package/dist/src/DeviceWithPath.d.ts.map +1 -0
- package/dist/src/DeviceWithPath.js +3 -0
- package/dist/src/DeviceWithPath.js.map +1 -0
- package/dist/src/ExtendedPublicKey.d.ts +7 -0
- package/dist/src/ExtendedPublicKey.d.ts.map +1 -0
- package/dist/src/ExtendedPublicKey.js +3 -0
- package/dist/src/ExtendedPublicKey.js.map +1 -0
- package/dist/src/Features.d.ts +2 -0
- package/dist/src/Features.d.ts.map +1 -0
- package/dist/src/Features.js +3 -0
- package/dist/src/Features.js.map +1 -0
- package/dist/src/Forward.d.ts +6 -0
- package/dist/src/Forward.d.ts.map +1 -0
- package/dist/src/Forward.js +3 -0
- package/dist/src/Forward.js.map +1 -0
- package/dist/src/FramebufferMeta.d.ts +60 -0
- package/dist/src/FramebufferMeta.d.ts.map +1 -0
- package/dist/src/FramebufferMeta.js +3 -0
- package/dist/src/FramebufferMeta.js.map +1 -0
- package/dist/src/FramebufferStreamWithMeta.d.ts +10 -0
- package/dist/src/FramebufferStreamWithMeta.d.ts.map +1 -0
- package/dist/src/FramebufferStreamWithMeta.js +3 -0
- package/dist/src/FramebufferStreamWithMeta.js.map +1 -0
- package/dist/src/Properties.d.ts +2 -0
- package/dist/src/Properties.d.ts.map +1 -0
- package/dist/src/Properties.js +3 -0
- package/dist/src/Properties.js.map +1 -0
- package/dist/src/Reverse.d.ts +5 -0
- package/dist/src/Reverse.d.ts.map +1 -0
- package/dist/src/Reverse.js +3 -0
- package/dist/src/Reverse.js.map +1 -0
- package/dist/src/SocketOptions.d.ts +6 -0
- package/dist/src/SocketOptions.d.ts.map +1 -0
- package/dist/src/SocketOptions.js +3 -0
- package/dist/src/SocketOptions.js.map +1 -0
- package/dist/src/StartActivityOptions.d.ts +12 -0
- package/dist/src/StartActivityOptions.d.ts.map +1 -0
- package/dist/src/StartActivityOptions.js +3 -0
- package/dist/src/StartActivityOptions.js.map +1 -0
- package/dist/src/StartServiceOptions.d.ts +57 -0
- package/dist/src/StartServiceOptions.d.ts.map +1 -0
- package/dist/src/StartServiceOptions.js +3 -0
- package/dist/src/StartServiceOptions.js.map +1 -0
- package/dist/src/TrackerChangeSet.d.ts +7 -0
- package/dist/src/TrackerChangeSet.d.ts.map +1 -0
- package/dist/src/TrackerChangeSet.js +3 -0
- package/dist/src/TrackerChangeSet.js.map +1 -0
- package/dist/src/WithToString.d.ts +4 -0
- package/dist/src/WithToString.d.ts.map +1 -0
- package/dist/src/WithToString.js +3 -0
- package/dist/src/WithToString.js.map +1 -0
- package/dist/src/adb/DeviceClient.d.ts +376 -0
- package/dist/src/adb/DeviceClient.d.ts.map +1 -0
- package/dist/src/adb/DeviceClient.js +517 -0
- package/dist/src/adb/DeviceClient.js.map +1 -0
- package/dist/src/adb/auth.d.ts +8 -0
- package/dist/src/adb/auth.d.ts.map +1 -0
- package/dist/src/adb/auth.js +87 -0
- package/dist/src/adb/auth.js.map +1 -0
- package/dist/src/adb/client.d.ts +29 -0
- package/dist/src/adb/client.d.ts.map +1 -0
- package/dist/src/adb/client.js +73 -0
- package/dist/src/adb/client.js.map +1 -0
- package/dist/src/adb/command/host/connect.d.ts +6 -0
- package/dist/src/adb/command/host/connect.d.ts.map +1 -0
- package/dist/src/adb/command/host/connect.js +36 -0
- package/dist/src/adb/command/host/connect.js.map +1 -0
- package/dist/src/adb/command/host/devices.d.ts +10 -0
- package/dist/src/adb/command/host/devices.d.ts.map +1 -0
- package/dist/src/adb/command/host/devices.js +40 -0
- package/dist/src/adb/command/host/devices.js.map +1 -0
- package/dist/src/adb/command/host/deviceswithpaths.d.ts +9 -0
- package/dist/src/adb/command/host/deviceswithpaths.d.ts.map +1 -0
- package/dist/src/adb/command/host/deviceswithpaths.js +46 -0
- package/dist/src/adb/command/host/deviceswithpaths.js.map +1 -0
- package/dist/src/adb/command/host/disconnect.d.ts +6 -0
- package/dist/src/adb/command/host/disconnect.d.ts.map +1 -0
- package/dist/src/adb/command/host/disconnect.js +35 -0
- package/dist/src/adb/command/host/disconnect.js.map +1 -0
- package/dist/src/adb/command/host/index.d.ts +9 -0
- package/dist/src/adb/command/host/index.d.ts.map +1 -0
- package/dist/src/adb/command/host/index.js +23 -0
- package/dist/src/adb/command/host/index.js.map +1 -0
- package/dist/src/adb/command/host/kill.d.ts +6 -0
- package/dist/src/adb/command/host/kill.d.ts.map +1 -0
- package/dist/src/adb/command/host/kill.js +24 -0
- package/dist/src/adb/command/host/kill.js.map +1 -0
- package/dist/src/adb/command/host/trackdevices.d.ts +6 -0
- package/dist/src/adb/command/host/trackdevices.d.ts.map +1 -0
- package/dist/src/adb/command/host/trackdevices.js +27 -0
- package/dist/src/adb/command/host/trackdevices.js.map +1 -0
- package/dist/src/adb/command/host/transport.d.ts +6 -0
- package/dist/src/adb/command/host/transport.d.ts.map +1 -0
- package/dist/src/adb/command/host/transport.js +24 -0
- package/dist/src/adb/command/host/transport.js.map +1 -0
- package/dist/src/adb/command/host/version.d.ts +7 -0
- package/dist/src/adb/command/host/version.d.ts.map +1 -0
- package/dist/src/adb/command/host/version.js +29 -0
- package/dist/src/adb/command/host/version.js.map +1 -0
- package/dist/src/adb/command/host-serial/forward.d.ts +6 -0
- package/dist/src/adb/command/host-serial/forward.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/forward.js +33 -0
- package/dist/src/adb/command/host-serial/forward.js.map +1 -0
- package/dist/src/adb/command/host-serial/getdevicepath.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getdevicepath.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getdevicepath.js +26 -0
- package/dist/src/adb/command/host-serial/getdevicepath.js.map +1 -0
- package/dist/src/adb/command/host-serial/getserialno.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getserialno.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getserialno.js +24 -0
- package/dist/src/adb/command/host-serial/getserialno.js.map +1 -0
- package/dist/src/adb/command/host-serial/getstate.d.ts +6 -0
- package/dist/src/adb/command/host-serial/getstate.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/getstate.js +24 -0
- package/dist/src/adb/command/host-serial/getstate.js.map +1 -0
- package/dist/src/adb/command/host-serial/index.d.ts +7 -0
- package/dist/src/adb/command/host-serial/index.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/index.js +19 -0
- package/dist/src/adb/command/host-serial/index.js.map +1 -0
- package/dist/src/adb/command/host-serial/listforwards.d.ts +8 -0
- package/dist/src/adb/command/host-serial/listforwards.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/listforwards.js +34 -0
- package/dist/src/adb/command/host-serial/listforwards.js.map +1 -0
- package/dist/src/adb/command/host-serial/waitfordevice.d.ts +6 -0
- package/dist/src/adb/command/host-serial/waitfordevice.d.ts.map +1 -0
- package/dist/src/adb/command/host-serial/waitfordevice.js +33 -0
- package/dist/src/adb/command/host-serial/waitfordevice.js.map +1 -0
- package/dist/src/adb/command/host-transport/clear.d.ts +6 -0
- package/dist/src/adb/command/host-transport/clear.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/clear.js +39 -0
- package/dist/src/adb/command/host-transport/clear.js.map +1 -0
- package/dist/src/adb/command/host-transport/framebuffer.d.ts +12 -0
- package/dist/src/adb/command/host-transport/framebuffer.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/framebuffer.js +113 -0
- package/dist/src/adb/command/host-transport/framebuffer.js.map +1 -0
- package/dist/src/adb/command/host-transport/getfeatures.d.ts +8 -0
- package/dist/src/adb/command/host-transport/getfeatures.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getfeatures.js +35 -0
- package/dist/src/adb/command/host-transport/getfeatures.js.map +1 -0
- package/dist/src/adb/command/host-transport/getpackages.d.ts +7 -0
- package/dist/src/adb/command/host-transport/getpackages.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getpackages.js +45 -0
- package/dist/src/adb/command/host-transport/getpackages.js.map +1 -0
- package/dist/src/adb/command/host-transport/getproperties.d.ts +8 -0
- package/dist/src/adb/command/host-transport/getproperties.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/getproperties.js +37 -0
- package/dist/src/adb/command/host-transport/getproperties.js.map +1 -0
- package/dist/src/adb/command/host-transport/index.d.ts +28 -0
- package/dist/src/adb/command/host-transport/index.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/index.js +61 -0
- package/dist/src/adb/command/host-transport/index.js.map +1 -0
- package/dist/src/adb/command/host-transport/install.d.ts +6 -0
- package/dist/src/adb/command/host-transport/install.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/install.js +42 -0
- package/dist/src/adb/command/host-transport/install.js.map +1 -0
- package/dist/src/adb/command/host-transport/isinstalled.d.ts +6 -0
- package/dist/src/adb/command/host-transport/isinstalled.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/isinstalled.js +37 -0
- package/dist/src/adb/command/host-transport/isinstalled.js.map +1 -0
- package/dist/src/adb/command/host-transport/listreverses.d.ts +8 -0
- package/dist/src/adb/command/host-transport/listreverses.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/listreverses.js +38 -0
- package/dist/src/adb/command/host-transport/listreverses.js.map +1 -0
- package/dist/src/adb/command/host-transport/local.d.ts +8 -0
- package/dist/src/adb/command/host-transport/local.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/local.js +24 -0
- package/dist/src/adb/command/host-transport/local.js.map +1 -0
- package/dist/src/adb/command/host-transport/log.d.ts +8 -0
- package/dist/src/adb/command/host-transport/log.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/log.js +24 -0
- package/dist/src/adb/command/host-transport/log.js.map +1 -0
- package/dist/src/adb/command/host-transport/logcat.d.ts +9 -0
- package/dist/src/adb/command/host-transport/logcat.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/logcat.js +37 -0
- package/dist/src/adb/command/host-transport/logcat.js.map +1 -0
- package/dist/src/adb/command/host-transport/monkey.d.ts +8 -0
- package/dist/src/adb/command/host-transport/monkey.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/monkey.js +50 -0
- package/dist/src/adb/command/host-transport/monkey.js.map +1 -0
- package/dist/src/adb/command/host-transport/reboot.d.ts +6 -0
- package/dist/src/adb/command/host-transport/reboot.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/reboot.js +24 -0
- package/dist/src/adb/command/host-transport/reboot.js.map +1 -0
- package/dist/src/adb/command/host-transport/remount.d.ts +6 -0
- package/dist/src/adb/command/host-transport/remount.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/remount.js +24 -0
- package/dist/src/adb/command/host-transport/remount.js.map +1 -0
- package/dist/src/adb/command/host-transport/reverse.d.ts +6 -0
- package/dist/src/adb/command/host-transport/reverse.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/reverse.js +33 -0
- package/dist/src/adb/command/host-transport/reverse.js.map +1 -0
- package/dist/src/adb/command/host-transport/root.d.ts +6 -0
- package/dist/src/adb/command/host-transport/root.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/root.js +32 -0
- package/dist/src/adb/command/host-transport/root.js.map +1 -0
- package/dist/src/adb/command/host-transport/screencap.d.ts +8 -0
- package/dist/src/adb/command/host-transport/screencap.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/screencap.js +36 -0
- package/dist/src/adb/command/host-transport/screencap.js.map +1 -0
- package/dist/src/adb/command/host-transport/shell.d.ts +9 -0
- package/dist/src/adb/command/host-transport/shell.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/shell.js +27 -0
- package/dist/src/adb/command/host-transport/shell.js.map +1 -0
- package/dist/src/adb/command/host-transport/startactivity.d.ts +13 -0
- package/dist/src/adb/command/host-transport/startactivity.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/startactivity.js +166 -0
- package/dist/src/adb/command/host-transport/startactivity.js.map +1 -0
- package/dist/src/adb/command/host-transport/startservice.d.ts +7 -0
- package/dist/src/adb/command/host-transport/startservice.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/startservice.js +17 -0
- package/dist/src/adb/command/host-transport/startservice.js.map +1 -0
- package/dist/src/adb/command/host-transport/sync.d.ts +7 -0
- package/dist/src/adb/command/host-transport/sync.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/sync.js +25 -0
- package/dist/src/adb/command/host-transport/sync.js.map +1 -0
- package/dist/src/adb/command/host-transport/tcp.d.ts +8 -0
- package/dist/src/adb/command/host-transport/tcp.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/tcp.js +24 -0
- package/dist/src/adb/command/host-transport/tcp.js.map +1 -0
- package/dist/src/adb/command/host-transport/tcpip.d.ts +6 -0
- package/dist/src/adb/command/host-transport/tcpip.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/tcpip.js +32 -0
- package/dist/src/adb/command/host-transport/tcpip.js.map +1 -0
- package/dist/src/adb/command/host-transport/trackjdwp.d.ts +7 -0
- package/dist/src/adb/command/host-transport/trackjdwp.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/trackjdwp.js +25 -0
- package/dist/src/adb/command/host-transport/trackjdwp.js.map +1 -0
- package/dist/src/adb/command/host-transport/uninstall.d.ts +6 -0
- package/dist/src/adb/command/host-transport/uninstall.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/uninstall.js +40 -0
- package/dist/src/adb/command/host-transport/uninstall.js.map +1 -0
- package/dist/src/adb/command/host-transport/usb.d.ts +6 -0
- package/dist/src/adb/command/host-transport/usb.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/usb.js +32 -0
- package/dist/src/adb/command/host-transport/usb.js.map +1 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts +6 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.d.ts.map +1 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.js +27 -0
- package/dist/src/adb/command/host-transport/waitbootcomplete.js.map +1 -0
- package/dist/src/adb/command.d.ts +17 -0
- package/dist/src/adb/command.d.ts.map +1 -0
- package/dist/src/adb/command.js +43 -0
- package/dist/src/adb/command.js.map +1 -0
- package/dist/src/adb/connection.d.ts +24 -0
- package/dist/src/adb/connection.d.ts.map +1 -0
- package/dist/src/adb/connection.js +115 -0
- package/dist/src/adb/connection.js.map +1 -0
- package/dist/src/adb/dump.d.ts +4 -0
- package/dist/src/adb/dump.d.ts.map +1 -0
- package/dist/src/adb/dump.js +38 -0
- package/dist/src/adb/dump.js.map +1 -0
- package/dist/src/adb/framebuffer/rgbtransform.d.ts +16 -0
- package/dist/src/adb/framebuffer/rgbtransform.d.ts.map +1 -0
- package/dist/src/adb/framebuffer/rgbtransform.js +47 -0
- package/dist/src/adb/framebuffer/rgbtransform.js.map +1 -0
- package/dist/src/adb/jdwptracker.d.ts +41 -0
- package/dist/src/adb/jdwptracker.d.ts.map +1 -0
- package/dist/src/adb/jdwptracker.js +85 -0
- package/dist/src/adb/jdwptracker.js.map +1 -0
- package/dist/src/adb/keycode.d.ts +292 -0
- package/dist/src/adb/keycode.d.ts.map +1 -0
- package/dist/src/adb/keycode.js +298 -0
- package/dist/src/adb/keycode.js.map +1 -0
- package/dist/src/adb/linetransform.d.ts +17 -0
- package/dist/src/adb/linetransform.d.ts.map +1 -0
- package/dist/src/adb/linetransform.js +93 -0
- package/dist/src/adb/linetransform.js.map +1 -0
- package/dist/src/adb/parser.d.ts +37 -0
- package/dist/src/adb/parser.d.ts.map +1 -0
- package/dist/src/adb/parser.js +269 -0
- package/dist/src/adb/parser.js.map +1 -0
- package/dist/src/adb/proc/stat.d.ts +30 -0
- package/dist/src/adb/proc/stat.d.ts.map +1 -0
- package/dist/src/adb/proc/stat.js +131 -0
- package/dist/src/adb/proc/stat.js.map +1 -0
- package/dist/src/adb/protocol.d.ts +17 -0
- package/dist/src/adb/protocol.d.ts.map +1 -0
- package/dist/src/adb/protocol.js +29 -0
- package/dist/src/adb/protocol.js.map +1 -0
- package/dist/src/adb/sync/entry.d.ts +8 -0
- package/dist/src/adb/sync/entry.d.ts.map +1 -0
- package/dist/src/adb/sync/entry.js +16 -0
- package/dist/src/adb/sync/entry.js.map +1 -0
- package/dist/src/adb/sync/pulltransfer.d.ts +10 -0
- package/dist/src/adb/sync/pulltransfer.d.ts.map +1 -0
- package/dist/src/adb/sync/pulltransfer.js +24 -0
- package/dist/src/adb/sync/pulltransfer.js.map +1 -0
- package/dist/src/adb/sync/pushtransfer.d.ts +13 -0
- package/dist/src/adb/sync/pushtransfer.d.ts.map +1 -0
- package/dist/src/adb/sync/pushtransfer.js +30 -0
- package/dist/src/adb/sync/pushtransfer.js.map +1 -0
- package/dist/src/adb/sync/stats.d.ts +23 -0
- package/dist/src/adb/sync/stats.d.ts.map +1 -0
- package/dist/src/adb/sync/stats.js +54 -0
- package/dist/src/adb/sync/stats.js.map +1 -0
- package/dist/src/adb/sync.d.ts +31 -0
- package/dist/src/adb/sync.d.ts.map +1 -0
- package/dist/src/adb/sync.js +322 -0
- package/dist/src/adb/sync.js.map +1 -0
- package/dist/src/adb/tcpusb/packet.d.ts +27 -0
- package/dist/src/adb/tcpusb/packet.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/packet.js +94 -0
- package/dist/src/adb/tcpusb/packet.js.map +1 -0
- package/dist/src/adb/tcpusb/packetreader.d.ts +26 -0
- package/dist/src/adb/tcpusb/packetreader.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/packetreader.js +100 -0
- package/dist/src/adb/tcpusb/packetreader.js.map +1 -0
- package/dist/src/adb/tcpusb/rollingcounter.d.ts +8 -0
- package/dist/src/adb/tcpusb/rollingcounter.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/rollingcounter.js +17 -0
- package/dist/src/adb/tcpusb/rollingcounter.js.map +1 -0
- package/dist/src/adb/tcpusb/server.d.ts +19 -0
- package/dist/src/adb/tcpusb/server.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/server.js +78 -0
- package/dist/src/adb/tcpusb/server.js.map +1 -0
- package/dist/src/adb/tcpusb/service.d.ts +37 -0
- package/dist/src/adb/tcpusb/service.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/service.js +173 -0
- package/dist/src/adb/tcpusb/service.js.map +1 -0
- package/dist/src/adb/tcpusb/servicemap.d.ts +10 -0
- package/dist/src/adb/tcpusb/servicemap.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/servicemap.js +42 -0
- package/dist/src/adb/tcpusb/servicemap.js.map +1 -0
- package/dist/src/adb/tcpusb/socket.d.ts +45 -0
- package/dist/src/adb/tcpusb/socket.d.ts.map +1 -0
- package/dist/src/adb/tcpusb/socket.js +284 -0
- package/dist/src/adb/tcpusb/socket.js.map +1 -0
- package/dist/src/adb/tracker.d.ts +17 -0
- package/dist/src/adb/tracker.d.ts.map +1 -0
- package/dist/src/adb/tracker.js +72 -0
- package/dist/src/adb/tracker.js.map +1 -0
- package/dist/src/adb/util.d.ts +10 -0
- package/dist/src/adb/util.d.ts.map +1 -0
- package/dist/src/adb/util.js +17 -0
- package/dist/src/adb/util.js.map +1 -0
- package/dist/src/adb.d.ts +13 -0
- package/dist/src/adb.d.ts.map +1 -0
- package/dist/src/adb.js +28 -0
- package/dist/src/adb.js.map +1 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +86 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +12 -0
- package/dist/src/index.js.map +1 -0
- package/package.json +53 -33
- package/.semaphore/publish.yml +0 -19
- package/.semaphore/semaphore.yml +0 -27
- package/index.js +0 -4
- package/lib/adb/auth.js +0 -78
- package/lib/adb/client.js +0 -576
- package/lib/adb/command/host/connect.js +0 -46
- package/lib/adb/command/host/devices.js +0 -64
- package/lib/adb/command/host/deviceswithpaths.js +0 -70
- package/lib/adb/command/host/disconnect.js +0 -46
- package/lib/adb/command/host/kill.js +0 -36
- package/lib/adb/command/host/trackdevices.js +0 -40
- package/lib/adb/command/host/transport.js +0 -36
- package/lib/adb/command/host/version.js +0 -42
- package/lib/adb/command/host-serial/forward.js +0 -45
- package/lib/adb/command/host-serial/getdevicepath.js +0 -38
- package/lib/adb/command/host-serial/getserialno.js +0 -38
- package/lib/adb/command/host-serial/getstate.js +0 -38
- package/lib/adb/command/host-serial/listforwards.js +0 -56
- package/lib/adb/command/host-serial/waitfordevice.js +0 -45
- package/lib/adb/command/host-transport/clear.js +0 -45
- package/lib/adb/command/host-transport/framebuffer.js +0 -114
- package/lib/adb/command/host-transport/getfeatures.js +0 -51
- package/lib/adb/command/host-transport/getpackages.js +0 -51
- package/lib/adb/command/host-transport/getproperties.js +0 -51
- package/lib/adb/command/host-transport/install.js +0 -48
- package/lib/adb/command/host-transport/isinstalled.js +0 -47
- package/lib/adb/command/host-transport/listreverses.js +0 -55
- package/lib/adb/command/host-transport/local.js +0 -36
- package/lib/adb/command/host-transport/log.js +0 -36
- package/lib/adb/command/host-transport/logcat.js +0 -48
- package/lib/adb/command/host-transport/monkey.js +0 -42
- package/lib/adb/command/host-transport/reboot.js +0 -36
- package/lib/adb/command/host-transport/remount.js +0 -36
- package/lib/adb/command/host-transport/reverse.js +0 -45
- package/lib/adb/command/host-transport/root.js +0 -46
- package/lib/adb/command/host-transport/screencap.js +0 -52
- package/lib/adb/command/host-transport/shell.js +0 -39
- package/lib/adb/command/host-transport/startactivity.js +0 -184
- package/lib/adb/command/host-transport/startservice.js +0 -33
- package/lib/adb/command/host-transport/sync.js +0 -38
- package/lib/adb/command/host-transport/tcp.js +0 -36
- package/lib/adb/command/host-transport/tcpip.js +0 -46
- package/lib/adb/command/host-transport/trackjdwp.js +0 -120
- package/lib/adb/command/host-transport/uninstall.js +0 -44
- package/lib/adb/command/host-transport/usb.js +0 -46
- package/lib/adb/command/host-transport/waitbootcomplete.js +0 -42
- package/lib/adb/command.js +0 -56
- package/lib/adb/connection.js +0 -117
- package/lib/adb/dump.js +0 -15
- package/lib/adb/framebuffer/rgbtransform.js +0 -55
- package/lib/adb/keycode.js +0 -225
- package/lib/adb/linetransform.js +0 -87
- package/lib/adb/parser.js +0 -291
- package/lib/adb/proc/stat.js +0 -137
- package/lib/adb/protocol.js +0 -45
- package/lib/adb/sync/entry.js +0 -23
- package/lib/adb/sync/pulltransfer.js +0 -31
- package/lib/adb/sync/pushtransfer.js +0 -40
- package/lib/adb/sync/stats.js +0 -54
- package/lib/adb/sync.js +0 -343
- package/lib/adb/tcpusb/packet.js +0 -112
- package/lib/adb/tcpusb/packetreader.js +0 -121
- package/lib/adb/tcpusb/rollingcounter.js +0 -21
- package/lib/adb/tcpusb/server.js +0 -79
- package/lib/adb/tcpusb/service.js +0 -203
- package/lib/adb/tcpusb/servicemap.js +0 -48
- package/lib/adb/tcpusb/socket.js +0 -312
- package/lib/adb/tracker.js +0 -89
- package/lib/adb/util.js +0 -13
- package/lib/adb.js +0 -29
- package/lib/cli.js +0 -66
package/lib/adb/parser.js
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
var Parser, Promise, Protocol,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Promise = require('bluebird');
|
|
6
|
-
|
|
7
|
-
Protocol = require('./protocol');
|
|
8
|
-
|
|
9
|
-
Parser = (function() {
|
|
10
|
-
function Parser(stream) {
|
|
11
|
-
this.stream = stream;
|
|
12
|
-
this.ended = false;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
Parser.prototype.end = function() {
|
|
16
|
-
var endListener, errorListener, resolver, tryRead;
|
|
17
|
-
if (this.ended) {
|
|
18
|
-
return Promise.resolve(true);
|
|
19
|
-
}
|
|
20
|
-
resolver = Promise.defer();
|
|
21
|
-
tryRead = (function(_this) {
|
|
22
|
-
return function() {
|
|
23
|
-
while (_this.stream.read()) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
})(this);
|
|
28
|
-
this.stream.on('readable', tryRead);
|
|
29
|
-
this.stream.on('error', errorListener = function(err) {
|
|
30
|
-
return resolver.reject(err);
|
|
31
|
-
});
|
|
32
|
-
this.stream.on('end', endListener = (function(_this) {
|
|
33
|
-
return function() {
|
|
34
|
-
_this.ended = true;
|
|
35
|
-
return resolver.resolve(true);
|
|
36
|
-
};
|
|
37
|
-
})(this));
|
|
38
|
-
this.stream.read(0);
|
|
39
|
-
this.stream.end();
|
|
40
|
-
return resolver.promise.cancellable()["finally"]((function(_this) {
|
|
41
|
-
return function() {
|
|
42
|
-
_this.stream.removeListener('readable', tryRead);
|
|
43
|
-
_this.stream.removeListener('error', errorListener);
|
|
44
|
-
return _this.stream.removeListener('end', endListener);
|
|
45
|
-
};
|
|
46
|
-
})(this));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
Parser.prototype.raw = function() {
|
|
50
|
-
return this.stream;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
Parser.prototype.readAll = function() {
|
|
54
|
-
var all, endListener, errorListener, resolver, tryRead;
|
|
55
|
-
all = new Buffer(0);
|
|
56
|
-
resolver = Promise.defer();
|
|
57
|
-
tryRead = (function(_this) {
|
|
58
|
-
return function() {
|
|
59
|
-
var chunk;
|
|
60
|
-
while (chunk = _this.stream.read()) {
|
|
61
|
-
all = Buffer.concat([all, chunk]);
|
|
62
|
-
}
|
|
63
|
-
if (_this.ended) {
|
|
64
|
-
return resolver.resolve(all);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
})(this);
|
|
68
|
-
this.stream.on('readable', tryRead);
|
|
69
|
-
this.stream.on('error', errorListener = function(err) {
|
|
70
|
-
return resolver.reject(err);
|
|
71
|
-
});
|
|
72
|
-
this.stream.on('end', endListener = (function(_this) {
|
|
73
|
-
return function() {
|
|
74
|
-
_this.ended = true;
|
|
75
|
-
return resolver.resolve(all);
|
|
76
|
-
};
|
|
77
|
-
})(this));
|
|
78
|
-
tryRead();
|
|
79
|
-
return resolver.promise.cancellable()["finally"]((function(_this) {
|
|
80
|
-
return function() {
|
|
81
|
-
_this.stream.removeListener('readable', tryRead);
|
|
82
|
-
_this.stream.removeListener('error', errorListener);
|
|
83
|
-
return _this.stream.removeListener('end', endListener);
|
|
84
|
-
};
|
|
85
|
-
})(this));
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
Parser.prototype.readAscii = function(howMany) {
|
|
89
|
-
return this.readBytes(howMany).then(function(chunk) {
|
|
90
|
-
return chunk.toString('ascii');
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
Parser.prototype.readBytes = function(howMany) {
|
|
95
|
-
var endListener, errorListener, resolver, tryRead;
|
|
96
|
-
resolver = Promise.defer();
|
|
97
|
-
tryRead = (function(_this) {
|
|
98
|
-
return function() {
|
|
99
|
-
var chunk;
|
|
100
|
-
if (howMany) {
|
|
101
|
-
if (chunk = _this.stream.read(howMany)) {
|
|
102
|
-
howMany -= chunk.length;
|
|
103
|
-
if (howMany === 0) {
|
|
104
|
-
return resolver.resolve(chunk);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (_this.ended) {
|
|
108
|
-
return resolver.reject(new Parser.PrematureEOFError(howMany));
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
return resolver.resolve(new Buffer(0));
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
})(this);
|
|
115
|
-
endListener = (function(_this) {
|
|
116
|
-
return function() {
|
|
117
|
-
_this.ended = true;
|
|
118
|
-
return resolver.reject(new Parser.PrematureEOFError(howMany));
|
|
119
|
-
};
|
|
120
|
-
})(this);
|
|
121
|
-
errorListener = function(err) {
|
|
122
|
-
return resolver.reject(err);
|
|
123
|
-
};
|
|
124
|
-
this.stream.on('readable', tryRead);
|
|
125
|
-
this.stream.on('error', errorListener);
|
|
126
|
-
this.stream.on('end', endListener);
|
|
127
|
-
tryRead();
|
|
128
|
-
return resolver.promise.cancellable()["finally"]((function(_this) {
|
|
129
|
-
return function() {
|
|
130
|
-
_this.stream.removeListener('readable', tryRead);
|
|
131
|
-
_this.stream.removeListener('error', errorListener);
|
|
132
|
-
return _this.stream.removeListener('end', endListener);
|
|
133
|
-
};
|
|
134
|
-
})(this));
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
Parser.prototype.readByteFlow = function(howMany, targetStream) {
|
|
138
|
-
var endListener, errorListener, resolver, tryRead;
|
|
139
|
-
resolver = Promise.defer();
|
|
140
|
-
tryRead = (function(_this) {
|
|
141
|
-
return function() {
|
|
142
|
-
var chunk;
|
|
143
|
-
if (howMany) {
|
|
144
|
-
while (chunk = _this.stream.read(howMany) || _this.stream.read()) {
|
|
145
|
-
howMany -= chunk.length;
|
|
146
|
-
targetStream.write(chunk);
|
|
147
|
-
if (howMany === 0) {
|
|
148
|
-
return resolver.resolve();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
if (_this.ended) {
|
|
152
|
-
return resolver.reject(new Parser.PrematureEOFError(howMany));
|
|
153
|
-
}
|
|
154
|
-
} else {
|
|
155
|
-
return resolver.resolve();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
})(this);
|
|
159
|
-
endListener = (function(_this) {
|
|
160
|
-
return function() {
|
|
161
|
-
_this.ended = true;
|
|
162
|
-
return resolver.reject(new Parser.PrematureEOFError(howMany));
|
|
163
|
-
};
|
|
164
|
-
})(this);
|
|
165
|
-
errorListener = function(err) {
|
|
166
|
-
return resolver.reject(err);
|
|
167
|
-
};
|
|
168
|
-
this.stream.on('readable', tryRead);
|
|
169
|
-
this.stream.on('error', errorListener);
|
|
170
|
-
this.stream.on('end', endListener);
|
|
171
|
-
tryRead();
|
|
172
|
-
return resolver.promise.cancellable()["finally"]((function(_this) {
|
|
173
|
-
return function() {
|
|
174
|
-
_this.stream.removeListener('readable', tryRead);
|
|
175
|
-
_this.stream.removeListener('error', errorListener);
|
|
176
|
-
return _this.stream.removeListener('end', endListener);
|
|
177
|
-
};
|
|
178
|
-
})(this));
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
Parser.prototype.readError = function() {
|
|
182
|
-
return this.readValue().then(function(value) {
|
|
183
|
-
return Promise.reject(new Parser.FailError(value.toString()));
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
Parser.prototype.readValue = function() {
|
|
188
|
-
return this.readAscii(4).then((function(_this) {
|
|
189
|
-
return function(value) {
|
|
190
|
-
var length;
|
|
191
|
-
length = Protocol.decodeLength(value);
|
|
192
|
-
return _this.readBytes(length);
|
|
193
|
-
};
|
|
194
|
-
})(this));
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
Parser.prototype.readUntil = function(code) {
|
|
198
|
-
var read, skipped;
|
|
199
|
-
skipped = new Buffer(0);
|
|
200
|
-
read = (function(_this) {
|
|
201
|
-
return function() {
|
|
202
|
-
return _this.readBytes(1).then(function(chunk) {
|
|
203
|
-
if (chunk[0] === code) {
|
|
204
|
-
return skipped;
|
|
205
|
-
} else {
|
|
206
|
-
skipped = Buffer.concat([skipped, chunk]);
|
|
207
|
-
return read();
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
})(this);
|
|
212
|
-
return read();
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
Parser.prototype.searchLine = function(re) {
|
|
216
|
-
return this.readLine().then((function(_this) {
|
|
217
|
-
return function(line) {
|
|
218
|
-
var match;
|
|
219
|
-
if (match = re.exec(line)) {
|
|
220
|
-
return match;
|
|
221
|
-
} else {
|
|
222
|
-
return _this.searchLine(re);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
})(this));
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
Parser.prototype.readLine = function() {
|
|
229
|
-
return this.readUntil(0x0a).then(function(line) {
|
|
230
|
-
if (line[line.length - 1] === 0x0d) {
|
|
231
|
-
return line.slice(0, -1);
|
|
232
|
-
} else {
|
|
233
|
-
return line;
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
Parser.prototype.unexpected = function(data, expected) {
|
|
239
|
-
return Promise.reject(new Parser.UnexpectedDataError(data, expected));
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
return Parser;
|
|
243
|
-
|
|
244
|
-
})();
|
|
245
|
-
|
|
246
|
-
Parser.FailError = (function(superClass) {
|
|
247
|
-
extend(FailError, superClass);
|
|
248
|
-
|
|
249
|
-
function FailError(message) {
|
|
250
|
-
Error.call(this);
|
|
251
|
-
this.name = 'FailError';
|
|
252
|
-
this.message = "Failure: '" + message + "'";
|
|
253
|
-
Error.captureStackTrace(this, Parser.FailError);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return FailError;
|
|
257
|
-
|
|
258
|
-
})(Error);
|
|
259
|
-
|
|
260
|
-
Parser.PrematureEOFError = (function(superClass) {
|
|
261
|
-
extend(PrematureEOFError, superClass);
|
|
262
|
-
|
|
263
|
-
function PrematureEOFError(howManyMissing) {
|
|
264
|
-
Error.call(this);
|
|
265
|
-
this.name = 'PrematureEOFError';
|
|
266
|
-
this.message = "Premature end of stream, needed " + howManyMissing + " more bytes";
|
|
267
|
-
this.missingBytes = howManyMissing;
|
|
268
|
-
Error.captureStackTrace(this, Parser.PrematureEOFError);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return PrematureEOFError;
|
|
272
|
-
|
|
273
|
-
})(Error);
|
|
274
|
-
|
|
275
|
-
Parser.UnexpectedDataError = (function(superClass) {
|
|
276
|
-
extend(UnexpectedDataError, superClass);
|
|
277
|
-
|
|
278
|
-
function UnexpectedDataError(unexpected, expected) {
|
|
279
|
-
Error.call(this);
|
|
280
|
-
this.name = 'UnexpectedDataError';
|
|
281
|
-
this.message = "Unexpected '" + unexpected + "', was expecting " + expected;
|
|
282
|
-
this.unexpected = unexpected;
|
|
283
|
-
this.expected = expected;
|
|
284
|
-
Error.captureStackTrace(this, Parser.UnexpectedDataError);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return UnexpectedDataError;
|
|
288
|
-
|
|
289
|
-
})(Error);
|
|
290
|
-
|
|
291
|
-
module.exports = Parser;
|
package/lib/adb/proc/stat.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
var EventEmitter, Parser, ProcStat, split,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
EventEmitter = require('events').EventEmitter;
|
|
6
|
-
|
|
7
|
-
split = require('split');
|
|
8
|
-
|
|
9
|
-
Parser = require('../parser');
|
|
10
|
-
|
|
11
|
-
ProcStat = (function(superClass) {
|
|
12
|
-
var RE_COLSEP, RE_CPULINE;
|
|
13
|
-
|
|
14
|
-
extend(ProcStat, superClass);
|
|
15
|
-
|
|
16
|
-
RE_CPULINE = /^cpu[0-9]+ .*$/mg;
|
|
17
|
-
|
|
18
|
-
RE_COLSEP = /\ +/g;
|
|
19
|
-
|
|
20
|
-
function ProcStat(sync) {
|
|
21
|
-
this.sync = sync;
|
|
22
|
-
this.interval = 1000;
|
|
23
|
-
this.stats = this._emptyStats();
|
|
24
|
-
this._ignore = {};
|
|
25
|
-
this._timer = setInterval((function(_this) {
|
|
26
|
-
return function() {
|
|
27
|
-
return _this.update();
|
|
28
|
-
};
|
|
29
|
-
})(this), this.interval);
|
|
30
|
-
this.update();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
ProcStat.prototype.end = function() {
|
|
34
|
-
clearInterval(this._timer);
|
|
35
|
-
this.sync.end();
|
|
36
|
-
return this.sync = null;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
ProcStat.prototype.update = function() {
|
|
40
|
-
return new Parser(this.sync.pull('/proc/stat')).readAll().then((function(_this) {
|
|
41
|
-
return function(out) {
|
|
42
|
-
return _this._parse(out);
|
|
43
|
-
};
|
|
44
|
-
})(this))["catch"]((function(_this) {
|
|
45
|
-
return function(err) {
|
|
46
|
-
_this._error(err);
|
|
47
|
-
};
|
|
48
|
-
})(this));
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
ProcStat.prototype._parse = function(out) {
|
|
52
|
-
var cols, i, len, line, match, stats, total, type, val;
|
|
53
|
-
stats = this._emptyStats();
|
|
54
|
-
while (match = RE_CPULINE.exec(out)) {
|
|
55
|
-
line = match[0];
|
|
56
|
-
cols = line.split(RE_COLSEP);
|
|
57
|
-
type = cols.shift();
|
|
58
|
-
if (this._ignore[type] === line) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
total = 0;
|
|
62
|
-
for (i = 0, len = cols.length; i < len; i++) {
|
|
63
|
-
val = cols[i];
|
|
64
|
-
total += +val;
|
|
65
|
-
}
|
|
66
|
-
stats.cpus[type] = {
|
|
67
|
-
line: line,
|
|
68
|
-
user: +cols[0] || 0,
|
|
69
|
-
nice: +cols[1] || 0,
|
|
70
|
-
system: +cols[2] || 0,
|
|
71
|
-
idle: +cols[3] || 0,
|
|
72
|
-
iowait: +cols[4] || 0,
|
|
73
|
-
irq: +cols[5] || 0,
|
|
74
|
-
softirq: +cols[6] || 0,
|
|
75
|
-
steal: +cols[7] || 0,
|
|
76
|
-
guest: +cols[8] || 0,
|
|
77
|
-
guestnice: +cols[9] || 0,
|
|
78
|
-
total: total
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return this._set(stats);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
ProcStat.prototype._set = function(stats) {
|
|
85
|
-
var cur, found, id, loads, m, old, ref, ticks;
|
|
86
|
-
loads = {};
|
|
87
|
-
found = false;
|
|
88
|
-
ref = stats.cpus;
|
|
89
|
-
for (id in ref) {
|
|
90
|
-
cur = ref[id];
|
|
91
|
-
old = this.stats.cpus[id];
|
|
92
|
-
if (!old) {
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
ticks = cur.total - old.total;
|
|
96
|
-
if (ticks > 0) {
|
|
97
|
-
found = true;
|
|
98
|
-
m = 100 / ticks;
|
|
99
|
-
loads[id] = {
|
|
100
|
-
user: Math.floor(m * (cur.user - old.user)),
|
|
101
|
-
nice: Math.floor(m * (cur.nice - old.nice)),
|
|
102
|
-
system: Math.floor(m * (cur.system - old.system)),
|
|
103
|
-
idle: Math.floor(m * (cur.idle - old.idle)),
|
|
104
|
-
iowait: Math.floor(m * (cur.iowait - old.iowait)),
|
|
105
|
-
irq: Math.floor(m * (cur.irq - old.irq)),
|
|
106
|
-
softirq: Math.floor(m * (cur.softirq - old.softirq)),
|
|
107
|
-
steal: Math.floor(m * (cur.steal - old.steal)),
|
|
108
|
-
guest: Math.floor(m * (cur.guest - old.guest)),
|
|
109
|
-
guestnice: Math.floor(m * (cur.guestnice - old.guestnice)),
|
|
110
|
-
total: 100
|
|
111
|
-
};
|
|
112
|
-
} else {
|
|
113
|
-
this._ignore[id] = cur.line;
|
|
114
|
-
delete stats.cpus[id];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (found) {
|
|
118
|
-
this.emit('load', loads);
|
|
119
|
-
}
|
|
120
|
-
return this.stats = stats;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
ProcStat.prototype._error = function(err) {
|
|
124
|
-
return this.emit('error', err);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
ProcStat.prototype._emptyStats = function() {
|
|
128
|
-
return {
|
|
129
|
-
cpus: {}
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
return ProcStat;
|
|
134
|
-
|
|
135
|
-
})(EventEmitter);
|
|
136
|
-
|
|
137
|
-
module.exports = ProcStat;
|
package/lib/adb/protocol.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var Protocol;
|
|
2
|
-
|
|
3
|
-
Protocol = (function() {
|
|
4
|
-
function Protocol() {}
|
|
5
|
-
|
|
6
|
-
Protocol.OKAY = 'OKAY';
|
|
7
|
-
|
|
8
|
-
Protocol.FAIL = 'FAIL';
|
|
9
|
-
|
|
10
|
-
Protocol.STAT = 'STAT';
|
|
11
|
-
|
|
12
|
-
Protocol.LIST = 'LIST';
|
|
13
|
-
|
|
14
|
-
Protocol.DENT = 'DENT';
|
|
15
|
-
|
|
16
|
-
Protocol.RECV = 'RECV';
|
|
17
|
-
|
|
18
|
-
Protocol.DATA = 'DATA';
|
|
19
|
-
|
|
20
|
-
Protocol.DONE = 'DONE';
|
|
21
|
-
|
|
22
|
-
Protocol.SEND = 'SEND';
|
|
23
|
-
|
|
24
|
-
Protocol.QUIT = 'QUIT';
|
|
25
|
-
|
|
26
|
-
Protocol.decodeLength = function(length) {
|
|
27
|
-
return parseInt(length, 16);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
Protocol.encodeLength = function(length) {
|
|
31
|
-
return ('0000' + length.toString(16)).slice(-4).toUpperCase();
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
Protocol.encodeData = function(data) {
|
|
35
|
-
if (!Buffer.isBuffer(data)) {
|
|
36
|
-
data = new Buffer(data);
|
|
37
|
-
}
|
|
38
|
-
return Buffer.concat([new Buffer(Protocol.encodeLength(data.length)), data]);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return Protocol;
|
|
42
|
-
|
|
43
|
-
})();
|
|
44
|
-
|
|
45
|
-
module.exports = Protocol;
|
package/lib/adb/sync/entry.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var Entry, Stats,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Stats = require('./stats');
|
|
6
|
-
|
|
7
|
-
Entry = (function(superClass) {
|
|
8
|
-
extend(Entry, superClass);
|
|
9
|
-
|
|
10
|
-
function Entry(name, mode, size, mtime) {
|
|
11
|
-
this.name = name;
|
|
12
|
-
Entry.__super__.constructor.call(this, mode, size, mtime);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
Entry.prototype.toString = function() {
|
|
16
|
-
return this.name;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
return Entry;
|
|
20
|
-
|
|
21
|
-
})(Stats);
|
|
22
|
-
|
|
23
|
-
module.exports = Entry;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var PullTransfer, Stream,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Stream = require('stream');
|
|
6
|
-
|
|
7
|
-
PullTransfer = (function(superClass) {
|
|
8
|
-
extend(PullTransfer, superClass);
|
|
9
|
-
|
|
10
|
-
function PullTransfer() {
|
|
11
|
-
this.stats = {
|
|
12
|
-
bytesTransferred: 0
|
|
13
|
-
};
|
|
14
|
-
PullTransfer.__super__.constructor.call(this);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
PullTransfer.prototype.cancel = function() {
|
|
18
|
-
return this.emit('cancel');
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
PullTransfer.prototype.write = function(chunk, encoding, callback) {
|
|
22
|
-
this.stats.bytesTransferred += chunk.length;
|
|
23
|
-
this.emit('progress', this.stats);
|
|
24
|
-
return PullTransfer.__super__.write.call(this, chunk, encoding, callback);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return PullTransfer;
|
|
28
|
-
|
|
29
|
-
})(Stream.PassThrough);
|
|
30
|
-
|
|
31
|
-
module.exports = PullTransfer;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var EventEmitter, PushTransfer,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
EventEmitter = require('events').EventEmitter;
|
|
6
|
-
|
|
7
|
-
PushTransfer = (function(superClass) {
|
|
8
|
-
extend(PushTransfer, superClass);
|
|
9
|
-
|
|
10
|
-
function PushTransfer() {
|
|
11
|
-
this._stack = [];
|
|
12
|
-
this.stats = {
|
|
13
|
-
bytesTransferred: 0
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
PushTransfer.prototype.cancel = function() {
|
|
18
|
-
return this.emit('cancel');
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
PushTransfer.prototype.push = function(byteCount) {
|
|
22
|
-
return this._stack.push(byteCount);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
PushTransfer.prototype.pop = function() {
|
|
26
|
-
var byteCount;
|
|
27
|
-
byteCount = this._stack.pop();
|
|
28
|
-
this.stats.bytesTransferred += byteCount;
|
|
29
|
-
return this.emit('progress', this.stats);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
PushTransfer.prototype.end = function() {
|
|
33
|
-
return this.emit('end');
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return PushTransfer;
|
|
37
|
-
|
|
38
|
-
})(EventEmitter);
|
|
39
|
-
|
|
40
|
-
module.exports = PushTransfer;
|
package/lib/adb/sync/stats.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var Fs, Stats,
|
|
2
|
-
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
3
|
-
hasProp = {}.hasOwnProperty;
|
|
4
|
-
|
|
5
|
-
Fs = require('fs');
|
|
6
|
-
|
|
7
|
-
Stats = (function(superClass) {
|
|
8
|
-
extend(Stats, superClass);
|
|
9
|
-
|
|
10
|
-
Stats.S_IFMT = 0xf000;
|
|
11
|
-
|
|
12
|
-
Stats.S_IFSOCK = 0xc000;
|
|
13
|
-
|
|
14
|
-
Stats.S_IFLNK = 0xa000;
|
|
15
|
-
|
|
16
|
-
Stats.S_IFREG = 0x8000;
|
|
17
|
-
|
|
18
|
-
Stats.S_IFBLK = 0x6000;
|
|
19
|
-
|
|
20
|
-
Stats.S_IFDIR = 0x4000;
|
|
21
|
-
|
|
22
|
-
Stats.S_IFCHR = 0x2000;
|
|
23
|
-
|
|
24
|
-
Stats.S_IFIFO = 0x1000;
|
|
25
|
-
|
|
26
|
-
Stats.S_ISUID = 0x800;
|
|
27
|
-
|
|
28
|
-
Stats.S_ISGID = 0x400;
|
|
29
|
-
|
|
30
|
-
Stats.S_ISVTX = 0x200;
|
|
31
|
-
|
|
32
|
-
Stats.S_IRWXU = 0x1c0;
|
|
33
|
-
|
|
34
|
-
Stats.S_IRUSR = 0x100;
|
|
35
|
-
|
|
36
|
-
Stats.S_IWUSR = 0x80;
|
|
37
|
-
|
|
38
|
-
Stats.S_IXUSR = 0x40;
|
|
39
|
-
|
|
40
|
-
Stats.S_IRWXG = 0x38;
|
|
41
|
-
|
|
42
|
-
Stats.S_IRGRP = 0x20;
|
|
43
|
-
|
|
44
|
-
function Stats(mode, size, mtime) {
|
|
45
|
-
this.mode = mode;
|
|
46
|
-
this.size = size;
|
|
47
|
-
this.mtime = new Date(mtime * 1000);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return Stats;
|
|
51
|
-
|
|
52
|
-
})(Fs.Stats);
|
|
53
|
-
|
|
54
|
-
module.exports = Stats;
|