-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAPIs.js
79 lines (66 loc) · 2.05 KB
/
APIs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Copyright (c) 2023-2024 LG Electronics Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/* eslint new-cap: ["error", { "newIsCap": false }] */
const {promisify} = require('util'),
aresGenerator = require('./lib/generator'),
aresInspector = require('./lib/inspect'),
aresInstaller = require('./lib/install'),
aresLauncher = require('./lib/launch'),
aresPackager = require('./lib/package'),
aresPuller = require('./lib/pull'),
aresPusher = require('./lib/pusher'),
aresShell = require('./lib/shell'),
aresServer = require('./lib/base/server'),
aresSetupDevice = require('./lib/base/setup-device');
const Generator = new aresGenerator();
const Inspector = {
inspect: promisify(aresInspector.inspect),
stop: promisify(aresInspector.stop)
};
const Installer = {
install: promisify(aresInstaller.install),
remove: promisify(aresInstaller.remove),
list: promisify(aresInstaller.list)
};
const Launcher = {
close: promisify(aresLauncher.close),
launch: promisify(aresLauncher.launch),
listRunningApp: promisify(aresLauncher.listRunningApp)
};
const Packager = new aresPackager.Packager();
const Puller = {
pull: promisify(aresPuller.pull)
};
const Pusher = new aresPusher();
const Server = {
openBrowser: promisify(aresServer.openBrowser),
runServer: promisify(aresServer.runServer),
stop: promisify(aresServer.stop)
};
const Shell = {
remoteRun: promisify(aresShell.remoteRun),
shell: promisify(aresShell.shell)
};
const SetupDevice = {
modifyDevice: promisify(aresSetupDevice.modifyDeviceInfo),
removeDevice: promisify(aresSetupDevice.removeDeviceInfo),
resetDeviceList: promisify(aresSetupDevice.resetDeviceList),
setDefaultDevice: promisify(aresSetupDevice.setDefaultDevice),
showDeviceList: promisify(aresSetupDevice.showDeviceList),
showDeviceListFull: promisify(aresSetupDevice.showDeviceListFull),
};
module.exports = {
Generator,
Inspector,
Installer,
Launcher,
Packager,
Puller,
Pusher,
Server,
Shell,
SetupDevice
};