@ekhein/lamda-node-sdk 2.1.0 → 2.1.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/dist/main.d.ts +3 -1
- package/dist/main.js +11 -2
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -20,8 +20,10 @@ export declare class Device {
|
|
|
20
20
|
waitFor(...args: Parameters<typeof this.UiAutomator["selectorWaitForExists"]>): Promise<void>;
|
|
21
21
|
sleep(min?: number, max?: number): Promise<unknown>;
|
|
22
22
|
passwd(pwd: string, keyboard: Record<"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9", Parameters<typeof this.UiAutomator["selectorClick"]>[0]>): Promise<void>;
|
|
23
|
-
|
|
23
|
+
activity(data: string): Promise<import("./rpc/types").Boolean>;
|
|
24
24
|
kill(...args: Parameters<typeof this.Application["stopApplication"]>): Promise<import("./rpc/types").Boolean>;
|
|
25
|
+
open(...args: Parameters<typeof this.Application["startApplication"]>): Promise<import("./rpc/types").Boolean>;
|
|
26
|
+
restart(name: string): Promise<void>;
|
|
25
27
|
call(args: {
|
|
26
28
|
package: string;
|
|
27
29
|
callinfo: {
|
package/dist/main.js
CHANGED
|
@@ -52,7 +52,7 @@ class Device {
|
|
|
52
52
|
.selectorClick(...args);
|
|
53
53
|
}
|
|
54
54
|
async waitFor(...args) {
|
|
55
|
-
args[0] = Object.assign({ timeout:
|
|
55
|
+
args[0] = Object.assign({ timeout: 30e3 }, args[0]);
|
|
56
56
|
return this.UiAutomator
|
|
57
57
|
.selectorWaitForExists(...args)
|
|
58
58
|
.then(async (exists) => {
|
|
@@ -71,7 +71,7 @@ class Device {
|
|
|
71
71
|
await this.click(keyboard[pwd[i]]);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
async
|
|
74
|
+
async activity(data) {
|
|
75
75
|
return this.Application
|
|
76
76
|
.startActivity({
|
|
77
77
|
data,
|
|
@@ -83,6 +83,15 @@ class Device {
|
|
|
83
83
|
return this.Application
|
|
84
84
|
.stopApplication(...args);
|
|
85
85
|
}
|
|
86
|
+
async open(...args) {
|
|
87
|
+
return this.Application
|
|
88
|
+
.startApplication(...args);
|
|
89
|
+
}
|
|
90
|
+
async restart(name) {
|
|
91
|
+
await this.kill({ name });
|
|
92
|
+
await this.sleep(200);
|
|
93
|
+
await this.open({ name });
|
|
94
|
+
}
|
|
86
95
|
async call(args) {
|
|
87
96
|
const callinfo = JSON.stringify(args.callinfo);
|
|
88
97
|
return this.Application
|