deeke-script-app 1.2.4 → 1.2.6

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.
Files changed (52) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/@deekeScript/{@type → type}/Class/UiSelector.d.ts +191 -191
  3. package/@deekeScript/{@type → type}/interface/Storage.d.ts +110 -110
  4. package/README.md +35 -35
  5. package/deekeScript.json +597 -597
  6. package/deekeScriptZipBuild +48 -48
  7. package/images/test/statistics.png +0 -0
  8. package/init +32 -32
  9. package/jsconfig.json +10 -10
  10. package/obfuscator.config.json +13 -13
  11. package/package.json +41 -41
  12. package/script/common/common.js +7 -0
  13. package/script/index.js +1 -2
  14. package/script/statistics/statistics.js +121 -120
  15. package/script/task/dy.js +15 -55
  16. package/script/task/dyApp.js +6 -54
  17. package/script/task/dyCity.js +1 -43
  18. package/script/task/tool.js +14 -57
  19. package/script/task.html +4 -4
  20. package/src/common/common.js +7 -0
  21. package/src/statistics/statistics.js +121 -120
  22. package/src/task/dy.js +16 -14
  23. package/src/task/dyApp.js +7 -7
  24. package/src/task/tool.js +19 -19
  25. package/src/task.html +4 -4
  26. package/test/console.js +5 -5
  27. package/test/encrypt.js +3 -3
  28. package/test/engines.js +5 -5
  29. package/test/error.js +5 -0
  30. package/test/extension.js +26 -26
  31. package/test/files.js +7 -7
  32. package/test/http.js +4 -4
  33. package/test/log.js +10 -10
  34. package/test/package.js +3 -3
  35. package/test/permise.js +14 -14
  36. package/test/thread.js +11 -11
  37. package/test/timer.js +25 -25
  38. /package/@deekeScript/{@type → type}/Class/Rect.d.ts +0 -0
  39. /package/@deekeScript/{@type → type}/README.md +0 -0
  40. /package/@deekeScript/{@type → type}/interface/App.d.ts +0 -0
  41. /package/@deekeScript/{@type → type}/interface/Console.d.ts +0 -0
  42. /package/@deekeScript/{@type → type}/interface/DeekeScript.d.ts +0 -0
  43. /package/@deekeScript/{@type → type}/interface/Device.d.ts +0 -0
  44. /package/@deekeScript/{@type → type}/interface/Dialogs.d.ts +0 -0
  45. /package/@deekeScript/{@type → type}/interface/Encrypt.d.ts +0 -0
  46. /package/@deekeScript/{@type → type}/interface/Engines.d.ts +0 -0
  47. /package/@deekeScript/{@type → type}/interface/FloatDialogs.d.ts +0 -0
  48. /package/@deekeScript/{@type → type}/interface/Gesture.d.ts +0 -0
  49. /package/@deekeScript/{@type → type}/interface/Http.d.ts +0 -0
  50. /package/@deekeScript/{@type → type}/interface/Intent.d.ts +0 -0
  51. /package/@deekeScript/{@type → type}/interface/System.d.ts +0 -0
  52. /package/@deekeScript/{@type → type}/interface/UiObject.d.ts +0 -0
@@ -3,6 +3,6 @@
3
3
  "deekeScript"
4
4
  ],
5
5
  "files.exclude": {
6
- "**/@deekeScript": true, // 隐藏 DeekeScript文件夹
6
+ "**/@deekeScript": false, // 隐藏 DeekeScript文件夹
7
7
  }
8
8
  }
@@ -1,191 +1,191 @@
1
-
2
- declare global {
3
- function UiSelector(simpleMode?: boolean): UiSelector;
4
- /**
5
- * 控件选择器
6
- */
7
- class UiSelector {
8
- //public setLevel(level: number): UiSelector; //这个方法待完善
9
- //public getLevel(): number;//这个方法待完善
10
- public UiSelector(): void;//使用new UiSelector() 或者 UiSelector() 都可以实例化选择器
11
-
12
- /**
13
- *
14
- * @param text 控件文本
15
- */
16
- public text(text: string): UiSelector;
17
-
18
- /**
19
- *
20
- * @param text 模糊匹配文本控件
21
- */
22
- public textContains(text: string): UiSelector;
23
-
24
- /**
25
- *
26
- * @param text 正则匹配文本控件
27
- */
28
- public textMatches(text: string): UiSelector;
29
-
30
- //public textStartsWith(text: string): UiSelector;
31
- //public textEndsWith(text: string): UiSelector;
32
-
33
- /**
34
- *
35
- * @param desc 控件描述内容
36
- */
37
- public desc(desc: string): UiSelector;
38
-
39
- /**
40
- *
41
- * @param desc 模糊匹配描述控件
42
- */
43
- public descContains(desc: string): UiSelector;
44
-
45
- /**
46
- *
47
- * @param desc 正则表达式匹配描述控件
48
- */
49
- public descMatches(desc: string): UiSelector;
50
- //public descStartsWith(desc: string): UiSelector;
51
- //public descEndsWith(desc: string): UiSelector;
52
-
53
- /**
54
- *
55
- * @param className 控件类名
56
- */
57
- public className(className: string): UiSelector;
58
- //public classNameMatches(className: string): UiSelector;
59
-
60
- // public packageName(packageName: string): UiSelector;
61
- //public packageNameMatches(packageName: string): UiSelector;
62
-
63
- /**
64
- *
65
- * @param id 控件ID
66
- */
67
- public id(id: string): UiSelector;
68
-
69
- /**
70
- *
71
- * @param left 左边距 整数
72
- * @param top 上边距 整数
73
- * @param right 右边距 整数
74
- * @param bottom 下边距 整数
75
- */
76
- public bounds(left: Number, top: Number, right: Number, bottom: Number): UiSelector;
77
-
78
- /**
79
- *
80
- * @param bool 是否可以点击
81
- */
82
- public clickable(bool: boolean): UiSelector;
83
-
84
- /**
85
- *
86
- * @param bool 是否选中
87
- */
88
- public checked(bool: boolean): UiSelector;
89
-
90
- /**
91
- *
92
- * @param bool 是否被选择
93
- */
94
- public selected(bool: boolean): UiSelector;
95
-
96
- /**
97
- *
98
- * @param bool 是否可用,为false时,用户无法通过点击、输入等方式与该控件交互
99
- */
100
- public enabled(bool: boolean): UiSelector;
101
-
102
- /**
103
- *
104
- * @param bool 是否已被勾选
105
- */
106
- public checked(bool: boolean): UiSelector;
107
-
108
- /**
109
- *
110
- * @param bool 是否可以滚动
111
- */
112
- public scrollable(bool: boolean): UiSelector;
113
-
114
- /**
115
- *
116
- * @param bool 是否可以勾选
117
- */
118
- public checkable(bool: boolean): UiSelector;
119
-
120
- /**
121
- *
122
- * @param bool 是否可以聚焦
123
- */
124
- public focusable(bool: boolean): UiSelector;
125
-
126
- /**
127
- *
128
- * @param bool 是否可见
129
- */
130
- public isVisibleToUser(bool: boolean): UiSelector;
131
-
132
- /**
133
- *
134
- * @param filter 过滤控件,回调函数,返回true表示符合条件,返回false表示不符合条件
135
- */
136
- public filter(filter: (v: UiObject) => boolean): UiSelector;
137
-
138
- /**
139
- * 判断节点是否存在,底层使用的findOne方法
140
- */
141
- public exists(): boolean;
142
-
143
- /**
144
- *
145
- * 等待节点出现,一直阻塞直到找到节点
146
- */
147
- public waitFindOne(): UiObject;
148
-
149
- /**
150
- * 查找所有符合条件的控件
151
- */
152
- public find(): UiObject[];
153
-
154
- /**
155
- * 在当前的所有控件对象中查找所有符合某个控件选择器的控件
156
- * @param obj 控件选择器
157
- */
158
- public findBy(obj: UiSelector): UiObject[];
159
-
160
- /**
161
- * 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
162
- * @param timeout 查找时间(毫秒数)
163
- */
164
- public findBy(timeout: Number): UiObject[];
165
-
166
- /**
167
- * 返回一个符合当前选择器条件的控件
168
- */
169
- public findOne(): UiObject;
170
-
171
- /**
172
- * 返回一个符合当前选择器条件的控件
173
- */
174
- public findOnce(): UiObject;
175
-
176
- /**
177
- * 返回一个符合当前控件选择的控件
178
- * @param obj 控件选择器
179
- */
180
- public findOneBy(obj: UiSelector): UiObject;
181
-
182
- /**
183
- * 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
184
- * @param timeout 查找时间(毫秒数)
185
- */
186
- public findOneBy(timeout: Number): UiObject;
187
- }
188
- }
189
-
190
-
191
- export {};
1
+
2
+ declare global {
3
+ function UiSelector(simpleMode?: boolean): UiSelector;
4
+ /**
5
+ * 控件选择器
6
+ */
7
+ class UiSelector {
8
+ //public setLevel(level: number): UiSelector; //这个方法待完善
9
+ //public getLevel(): number;//这个方法待完善
10
+ public UiSelector(): void;//使用new UiSelector() 或者 UiSelector() 都可以实例化选择器
11
+
12
+ /**
13
+ *
14
+ * @param text 控件文本
15
+ */
16
+ public text(text: string): UiSelector;
17
+
18
+ /**
19
+ *
20
+ * @param text 模糊匹配文本控件
21
+ */
22
+ public textContains(text: string): UiSelector;
23
+
24
+ /**
25
+ *
26
+ * @param text 正则匹配文本控件
27
+ */
28
+ public textMatches(text: string): UiSelector;
29
+
30
+ //public textStartsWith(text: string): UiSelector;
31
+ //public textEndsWith(text: string): UiSelector;
32
+
33
+ /**
34
+ *
35
+ * @param desc 控件描述内容
36
+ */
37
+ public desc(desc: string): UiSelector;
38
+
39
+ /**
40
+ *
41
+ * @param desc 模糊匹配描述控件
42
+ */
43
+ public descContains(desc: string): UiSelector;
44
+
45
+ /**
46
+ *
47
+ * @param desc 正则表达式匹配描述控件
48
+ */
49
+ public descMatches(desc: string): UiSelector;
50
+ //public descStartsWith(desc: string): UiSelector;
51
+ //public descEndsWith(desc: string): UiSelector;
52
+
53
+ /**
54
+ *
55
+ * @param className 控件类名
56
+ */
57
+ public className(className: string): UiSelector;
58
+ //public classNameMatches(className: string): UiSelector;
59
+
60
+ // public packageName(packageName: string): UiSelector;
61
+ //public packageNameMatches(packageName: string): UiSelector;
62
+
63
+ /**
64
+ *
65
+ * @param id 控件ID
66
+ */
67
+ public id(id: string): UiSelector;
68
+
69
+ /**
70
+ *
71
+ * @param left 左边距 整数
72
+ * @param top 上边距 整数
73
+ * @param right 右边距 整数
74
+ * @param bottom 下边距 整数
75
+ */
76
+ public bounds(left: Number, top: Number, right: Number, bottom: Number): UiSelector;
77
+
78
+ /**
79
+ *
80
+ * @param bool 是否可以点击
81
+ */
82
+ public clickable(bool: boolean): UiSelector;
83
+
84
+ /**
85
+ *
86
+ * @param bool 是否选中
87
+ */
88
+ public checked(bool: boolean): UiSelector;
89
+
90
+ /**
91
+ *
92
+ * @param bool 是否被选择
93
+ */
94
+ public selected(bool: boolean): UiSelector;
95
+
96
+ /**
97
+ *
98
+ * @param bool 是否可用,为false时,用户无法通过点击、输入等方式与该控件交互
99
+ */
100
+ public enabled(bool: boolean): UiSelector;
101
+
102
+ /**
103
+ *
104
+ * @param bool 是否已被勾选
105
+ */
106
+ public checked(bool: boolean): UiSelector;
107
+
108
+ /**
109
+ *
110
+ * @param bool 是否可以滚动
111
+ */
112
+ public scrollable(bool: boolean): UiSelector;
113
+
114
+ /**
115
+ *
116
+ * @param bool 是否可以勾选
117
+ */
118
+ public checkable(bool: boolean): UiSelector;
119
+
120
+ /**
121
+ *
122
+ * @param bool 是否可以聚焦
123
+ */
124
+ public focusable(bool: boolean): UiSelector;
125
+
126
+ /**
127
+ *
128
+ * @param bool 是否可见
129
+ */
130
+ public isVisibleToUser(bool: boolean): UiSelector;
131
+
132
+ /**
133
+ *
134
+ * @param filter 过滤控件,回调函数,返回true表示符合条件,返回false表示不符合条件
135
+ */
136
+ public filter(filter: (v: UiObject) => boolean): UiSelector;
137
+
138
+ /**
139
+ * 判断节点是否存在,底层使用的findOne方法
140
+ */
141
+ public exists(): boolean;
142
+
143
+ /**
144
+ *
145
+ * 等待节点出现,一直阻塞直到找到节点
146
+ */
147
+ public waitFindOne(): UiObject;
148
+
149
+ /**
150
+ * 查找所有符合条件的控件
151
+ */
152
+ public find(): UiObject[];
153
+
154
+ /**
155
+ * 在当前的所有控件对象中查找所有符合某个控件选择器的控件
156
+ * @param obj 控件选择器
157
+ */
158
+ public findBy(obj: UiSelector): UiObject[];
159
+
160
+ /**
161
+ * 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
162
+ * @param timeout 查找时间(毫秒数)
163
+ */
164
+ public findBy(timeout: Number): UiObject[];
165
+
166
+ /**
167
+ * 返回一个符合当前选择器条件的控件
168
+ */
169
+ public findOne(): UiObject;
170
+
171
+ /**
172
+ * 返回一个符合当前选择器条件的控件
173
+ */
174
+ public findOnce(): UiObject;
175
+
176
+ /**
177
+ * 返回一个符合当前控件选择的控件
178
+ * @param obj 控件选择器
179
+ */
180
+ public findOneBy(obj: UiSelector): UiObject;
181
+
182
+ /**
183
+ * 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
184
+ * @param timeout 查找时间(毫秒数)
185
+ */
186
+ public findOneBy(timeout: Number): UiObject;
187
+ }
188
+ }
189
+
190
+
191
+ export {};
@@ -1,110 +1,110 @@
1
-
2
- declare global {
3
- var Storage: storage;
4
- }
5
-
6
- interface storage {
7
- /**
8
- * 创建存储实例 全局使用一个即可
9
- * @param db 数据库名称
10
- * @return 返回当前实例,如果已存在则直接返回
11
- */
12
- public create(db: string): Storage;
13
-
14
- /**
15
- * 设置字符串
16
- * @param key 键
17
- * @param value 值
18
- */
19
- public put(key: string, value: string): boolean;
20
-
21
- /**
22
- * 设置整型值
23
- * @param key 键
24
- * @param value 值
25
- */
26
- public putInteger(key: string, value: number): boolean;
27
-
28
- /**
29
- * 设置bool
30
- * @param key 键
31
- * @param value 值
32
- */
33
- public putBool(key: string, value: boolean): boolean;
34
-
35
- /**
36
- * 设置双精度值
37
- * @param key 键
38
- * @param value 值
39
- */
40
- public putDouble(key: string, value: number): boolean;
41
-
42
- /**
43
- * 设置对象
44
- * @param key 键
45
- * @param obj 值
46
- */
47
- public putObj(key: string, obj: object): boolean;
48
-
49
- /**
50
- * 设置集合(字符串)
51
- * @param key 键
52
- * @param set 值
53
- */
54
- public putSet(key: string, set: Set<string>): boolean;
55
-
56
- /**
57
- * 获取集合(字符串)
58
- * @param key 键
59
- */
60
- public getArray(key: string): Set<string>;
61
-
62
- /**
63
- * 获取字符串
64
- * @param key 键
65
- */
66
- public get(key: string): string;
67
-
68
- /**
69
- * 获取字符串
70
- * @param key 键
71
- */
72
- public getString(key: string): string;
73
-
74
- /**
75
- * 获取bool类型的值
76
- * @param key 键
77
- */
78
- public getBoolean(key: string): boolean;
79
-
80
- /**
81
- * 获取Double类型的值
82
- * @param key 键
83
- */
84
- public getDouble(key: string): number;
85
-
86
- /**
87
- * 获取整型类型的值
88
- * @param key 键
89
- */
90
- public getInteger(key: string): number;
91
-
92
- /**
93
- * 获取对象类型的值
94
- * @param key 键
95
- */
96
- public getObject(key: string): object;
97
-
98
- /**
99
- * 移除某个键
100
- * @param key 键
101
- */
102
- public remove(key: string): boolean;
103
-
104
- /**
105
- * 清空所有值
106
- */
107
- public clear(): boolean;
108
- }
109
-
110
- export { };
1
+
2
+ declare global {
3
+ var Storage: storage;
4
+ }
5
+
6
+ interface storage {
7
+ /**
8
+ * 创建存储实例 全局使用一个即可
9
+ * @param db 数据库名称
10
+ * @return 返回当前实例,如果已存在则直接返回
11
+ */
12
+ public create(db: string): Storage;
13
+
14
+ /**
15
+ * 设置字符串
16
+ * @param key 键
17
+ * @param value 值
18
+ */
19
+ public put(key: string, value: string): boolean;
20
+
21
+ /**
22
+ * 设置整型值
23
+ * @param key 键
24
+ * @param value 值
25
+ */
26
+ public putInteger(key: string, value: number): boolean;
27
+
28
+ /**
29
+ * 设置bool
30
+ * @param key 键
31
+ * @param value 值
32
+ */
33
+ public putBool(key: string, value: boolean): boolean;
34
+
35
+ /**
36
+ * 设置双精度值
37
+ * @param key 键
38
+ * @param value 值
39
+ */
40
+ public putDouble(key: string, value: number): boolean;
41
+
42
+ /**
43
+ * 设置对象
44
+ * @param key 键
45
+ * @param obj 值
46
+ */
47
+ public putObj(key: string, obj: object): boolean;
48
+
49
+ /**
50
+ * 设置集合(字符串)
51
+ * @param key 键
52
+ * @param set 值
53
+ */
54
+ public putSet(key: string, set: Set<string>): boolean;
55
+
56
+ /**
57
+ * 获取集合(字符串)
58
+ * @param key 键
59
+ */
60
+ public getArray(key: string): Set<string>;
61
+
62
+ /**
63
+ * 获取字符串
64
+ * @param key 键
65
+ */
66
+ public get(key: string): string;
67
+
68
+ /**
69
+ * 获取字符串
70
+ * @param key 键
71
+ */
72
+ public getString(key: string): string;
73
+
74
+ /**
75
+ * 获取bool类型的值
76
+ * @param key 键
77
+ */
78
+ public getBoolean(key: string): boolean;
79
+
80
+ /**
81
+ * 获取Double类型的值
82
+ * @param key 键
83
+ */
84
+ public getDouble(key: string): number;
85
+
86
+ /**
87
+ * 获取整型类型的值
88
+ * @param key 键
89
+ */
90
+ public getInteger(key: string): number;
91
+
92
+ /**
93
+ * 获取对象类型的值
94
+ * @param key 键
95
+ */
96
+ public getObject(key: string): object;
97
+
98
+ /**
99
+ * 移除某个键
100
+ * @param key 键
101
+ */
102
+ public remove(key: string): boolean;
103
+
104
+ /**
105
+ * 清空所有值
106
+ */
107
+ public clear(): boolean;
108
+ }
109
+
110
+ export { };
package/README.md CHANGED
@@ -1,35 +1,35 @@
1
- ## DeekeScript应用代码
2
-
3
- **DeekeScript/deekeScript** 是采用DeekeScript框架开发✨模拟点击(代替人工操控基于Android的移动设备)✨类产品的模版。在环境安装好之后,拉取本仓库到本地,即可开启美妙的旅途~~
4
-
5
- **最终能开发出什么样的应用❓请移步查阅:
6
- [https://github.com/DeekeScript/ad-deeke](https://github.com/DeekeScript/ad-deeke)**
7
-
8
-
9
- ## 使用步骤
10
-
11
-
12
- ### 安装前准备
13
- > 请移步到<a target="_blank" href="https://doc.deeke.cn">https://doc.deeke.cn</a> 或者 <a target="_blank" href="https://deekescript.github.io/">https://deekescript.github.io/</a>
14
- >
15
- > 阅读上述文档内容,并且安装相关软件和依赖
16
-
17
- ### 安装方式一:npm安装方式【推荐】
18
- >
19
- > 步骤一:创建文件夹
20
- >
21
- > 步骤二:执行下面的脚本
22
- ```npm i deeke-script-app```
23
-
24
- ### 安装方式二:git&npm安装方式
25
- >
26
- > git clone https://github.com/DeekeScript/deekeScript.git ./
27
- >
28
- > npm install
29
-
30
- ### 编写代码
31
- > 请在src下创建代码文件
32
-
33
-
34
- ## Tips 📢
35
- > 文件夹@deekeScript请不要删除,此代码会提供代码提示能力~
1
+ ## DeekeScript应用代码
2
+
3
+ **DeekeScript/deekeScript** 是采用DeekeScript框架开发✨模拟点击(代替人工操控基于Android的移动设备)✨类产品的模版。在环境安装好之后,拉取本仓库到本地,即可开启美妙的旅途~~
4
+
5
+ **最终能开发出什么样的应用❓请移步查阅:
6
+ [https://github.com/DeekeScript/ad-deeke](https://github.com/DeekeScript/ad-deeke)**
7
+
8
+
9
+ ## 使用步骤
10
+
11
+
12
+ ### 安装前准备
13
+ > 请移步到<a target="_blank" href="https://doc.deeke.cn">https://doc.deeke.cn</a> 或者 <a target="_blank" href="https://deekescript.github.io/">https://deekescript.github.io/</a>
14
+ >
15
+ > 阅读上述文档内容,并且安装相关软件和依赖
16
+
17
+ ### 安装方式一:npm安装方式【推荐】
18
+ >
19
+ > 步骤一:创建文件夹
20
+ >
21
+ > 步骤二:执行下面的脚本
22
+ ```npm i deeke-script-app```
23
+
24
+ ### 安装方式二:git&npm安装方式
25
+ >
26
+ > git clone https://github.com/DeekeScript/deekeScript.git ./
27
+ >
28
+ > npm install
29
+
30
+ ### 编写代码
31
+ > 请在src下创建代码文件
32
+
33
+
34
+ ## Tips 📢
35
+ > 文件夹@deekeScript请不要删除,此代码会提供代码提示能力~