deeke-script-app 1.6.3 → 1.6.5

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 (93) hide show
  1. package/@deekeScript/@type/Class/Global.d.ts +1 -1
  2. package/@deekeScript/@type/Class/Rect.d.ts +16 -16
  3. package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
  4. package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
  5. package/@deekeScript/@type/interface/Access.d.ts +71 -71
  6. package/@deekeScript/@type/interface/Device.d.ts +88 -88
  7. package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
  8. package/@deekeScript/@type/interface/Engines.d.ts +39 -39
  9. package/@deekeScript/@type/interface/FloatDialogs.d.ts +35 -35
  10. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
  11. package/@deekeScript/@type/interface/Hid.d.ts +342 -342
  12. package/@deekeScript/@type/interface/Http.d.ts +41 -41
  13. package/@deekeScript/@type/interface/Images.d.ts +71 -71
  14. package/@deekeScript/@type/interface/Java.d.ts +7 -7
  15. package/@deekeScript/@type/interface/KeyBoards.d.ts +27 -27
  16. package/@deekeScript/@type/interface/Log.d.ts +16 -16
  17. package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
  18. package/@deekeScript/@type/interface/{SocketIOClient.d.ts → SocketIoClient.d.ts} +76 -76
  19. package/@deekeScript/@type/interface/System.d.ts +114 -114
  20. package/@deekeScript/@type/interface/UiObject.d.ts +192 -290
  21. package/README.md +67 -67
  22. package/deekeScript.json +669 -669
  23. package/deekeScriptZipBuild +48 -48
  24. package/gulpfile +17 -17
  25. package/init +32 -32
  26. package/jsconfig.json +11 -11
  27. package/package.json +42 -42
  28. package/script/9/common/util.js +19 -19
  29. package/script/9/dy/common/common.js +9 -9
  30. package/script/9/dy/common/version.js +3 -3
  31. package/script/9/dy/common/video.js +7 -7
  32. package/script/9/dy/task/taskOne.js +6 -6
  33. package/script/9/dy/version/310701.js +6 -6
  34. package/script/statistics/statistics.js +120 -120
  35. package/script/task/douyin_zan.js +37 -37
  36. package/script/task/dy.js +6 -6
  37. package/script/task/dyApp.js +6 -6
  38. package/script/task/tool.js +9 -9
  39. package/script/task.html +4 -4
  40. package/script/test/5.js +2 -2
  41. package/script/test/8.js +16 -16
  42. package/src/12/main.js +40 -40
  43. package/src/12/task.js +10 -10
  44. package/src/9/common/util.js +28 -28
  45. package/src/9/dy/common/common.js +12 -12
  46. package/src/9/dy/common/version.js +11 -11
  47. package/src/9/dy/common/video.js +14 -14
  48. package/src/9/dy/task/taskOne.js +13 -13
  49. package/src/9/dy/version/310701.js +7 -7
  50. package/src/statistics/statistics.js +120 -120
  51. package/src/task/douyin_zan.js +89 -89
  52. package/src/task/dy.js +14 -14
  53. package/src/task/dyApp.js +7 -7
  54. package/src/task/tool.js +19 -19
  55. package/src/task.html +4 -4
  56. package/src/test/2.js +2 -2
  57. package/src/test/5.js +4 -4
  58. package/src/test/8.js +36 -36
  59. package/test/2.0/engines/enginesSimple.js +72 -72
  60. package/test/2.js +6 -6
  61. package/test/Access.js +9 -9
  62. package/test/SocketIOClient.js +39 -39
  63. package/test/SocketIOServer.js +49 -49
  64. package/test/Storage.js +3 -3
  65. package/test/console.js +5 -5
  66. package/test/deekeScriptJson.js +5 -5
  67. package/test/device.js +11 -11
  68. package/test/encrypt.js +3 -3
  69. package/test/engines/1.js +4 -4
  70. package/test/engines/eng/1.js +8 -8
  71. package/test/engines/engines.js +6 -6
  72. package/test/engines/relative.dir.js +8 -8
  73. package/test/engines/relative.js +1 -1
  74. package/test/engines/test.js +6 -6
  75. package/test/engines.js +5 -5
  76. package/test/extension.js +27 -27
  77. package/test/files.js +7 -7
  78. package/test/foreground.js +23 -23
  79. package/test/http.js +19 -19
  80. package/test/images/findColor.js +15 -15
  81. package/test/java.js +28 -28
  82. package/test/log.js +10 -10
  83. package/test/module/module.js +4 -4
  84. package/test/notification.js +26 -26
  85. package/test/package.js +3 -3
  86. package/test/permise.js +29 -29
  87. package/test/thread.js +11 -11
  88. package/test/timer.close.js +27 -27
  89. package/test/timer.js +25 -25
  90. package/test/timer.stop.js +28 -28
  91. package/test/webSocket.js +22 -22
  92. package/uglify-config.json +15 -15
  93. package/images/test/statistics.png +0 -0
@@ -1,48 +1,48 @@
1
- const path = require('path'); // CommonJS 方式引入 path‌:ml-citation{ref="1,2" data="citationList"}
2
- const fs = require('fs'); // 引入 fs 模块‌:ml-citation{ref="5" data="citationList"}
3
- const AdmZip = require('adm-zip'); // 引入 adm-zip 库‌:ml-citation{ref="3,4" data="citationList"}
4
-
5
- // 获取上层目录路径
6
- // const parentDir = path.join(__dirname, '..');
7
- const parentDir = __dirname;
8
- console.log('开始执行打包');
9
-
10
- fs.unlink(path.join(parentDir, 'deekeScript.zip'), (err) => {
11
- if (err) {
12
- //没有文件
13
- } else {
14
- //console.log('deekeScript.zip文件已删除');
15
- }
16
- });
17
-
18
- // 创建 zip 实例
19
- const zip = new AdmZip();
20
-
21
- // 递归添加文件并排除目录
22
- function addFilesToZip(directory) {
23
- const files = fs.readdirSync(directory);
24
-
25
- files.forEach(file => {
26
- const fullPath = path.join(directory, file);
27
- const relativePath = path.relative(parentDir, fullPath);
28
-
29
- // 排除 DeekeScript 和 node_modules 目录
30
- if (relativePath.startsWith('src') || relativePath.startsWith('.vscode') || relativePath.startsWith('.git') || relativePath.startsWith('@deekeScript') || relativePath.startsWith('node_modules')) {
31
- console.log('排除目录:' + relativePath);
32
- return;
33
- }
34
-
35
- // 处理子目录或文件
36
- if (fs.statSync(fullPath).isDirectory()) {
37
- addFilesToZip(fullPath); // 递归处理子目录
38
- } else {
39
- zip.addLocalFile(fullPath, path.dirname(relativePath));
40
- }
41
- });
42
- }
43
-
44
- // 执行压缩
45
- addFilesToZip(parentDir);
46
- zip.writeZip(path.join(parentDir, 'deekeScript.zip'));
47
-
48
- console.log('打包完成');
1
+ const path = require('path'); // CommonJS 方式引入 path‌:ml-citation{ref="1,2" data="citationList"}
2
+ const fs = require('fs'); // 引入 fs 模块‌:ml-citation{ref="5" data="citationList"}
3
+ const AdmZip = require('adm-zip'); // 引入 adm-zip 库‌:ml-citation{ref="3,4" data="citationList"}
4
+
5
+ // 获取上层目录路径
6
+ // const parentDir = path.join(__dirname, '..');
7
+ const parentDir = __dirname;
8
+ console.log('开始执行打包');
9
+
10
+ fs.unlink(path.join(parentDir, 'deekeScript.zip'), (err) => {
11
+ if (err) {
12
+ //没有文件
13
+ } else {
14
+ //console.log('deekeScript.zip文件已删除');
15
+ }
16
+ });
17
+
18
+ // 创建 zip 实例
19
+ const zip = new AdmZip();
20
+
21
+ // 递归添加文件并排除目录
22
+ function addFilesToZip(directory) {
23
+ const files = fs.readdirSync(directory);
24
+
25
+ files.forEach(file => {
26
+ const fullPath = path.join(directory, file);
27
+ const relativePath = path.relative(parentDir, fullPath);
28
+
29
+ // 排除 DeekeScript 和 node_modules 目录
30
+ if (relativePath.startsWith('src') || relativePath.startsWith('.vscode') || relativePath.startsWith('.git') || relativePath.startsWith('@deekeScript') || relativePath.startsWith('node_modules')) {
31
+ console.log('排除目录:' + relativePath);
32
+ return;
33
+ }
34
+
35
+ // 处理子目录或文件
36
+ if (fs.statSync(fullPath).isDirectory()) {
37
+ addFilesToZip(fullPath); // 递归处理子目录
38
+ } else {
39
+ zip.addLocalFile(fullPath, path.dirname(relativePath));
40
+ }
41
+ });
42
+ }
43
+
44
+ // 执行压缩
45
+ addFilesToZip(parentDir);
46
+ zip.writeZip(path.join(parentDir, 'deekeScript.zip'));
47
+
48
+ console.log('打包完成');
package/gulpfile CHANGED
@@ -1,17 +1,17 @@
1
- const uglifyConfig = require('./uglify-config.json');
2
- const gulp = require('gulp');
3
- const uglify = require('gulp-uglify');
4
-
5
- function compressJS() {
6
- let config = ['script/**/*.js'];//需要混淆的文件
7
- //不需要混淆
8
- let exclude = [
9
- "!script/statistics/*.js"
10
- ];
11
-
12
- config = [...config, ...exclude];
13
- return gulp.src(config).pipe(uglify(uglifyConfig)) // 应用 JSON 配置
14
- .pipe(gulp.dest('script'));
15
- }
16
-
17
- compressJS();
1
+ const uglifyConfig = require('./uglify-config.json');
2
+ const gulp = require('gulp');
3
+ const uglify = require('gulp-uglify');
4
+
5
+ function compressJS() {
6
+ let config = ['script/**/*.js'];//需要混淆的文件
7
+ //不需要混淆
8
+ let exclude = [
9
+ "!script/statistics/*.js"
10
+ ];
11
+
12
+ config = [...config, ...exclude];
13
+ return gulp.src(config).pipe(uglify(uglifyConfig)) // 应用 JSON 配置
14
+ .pipe(gulp.dest('script'));
15
+ }
16
+
17
+ compressJS();
package/init CHANGED
@@ -1,32 +1,32 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- function generateFiles(answers) {
5
- const projectPath = path.dirname(path.dirname(__dirname)); // 输出:/Users/username/project
6
- const files = fs.readdirSync(projectPath);
7
-
8
- if (files.includes('init.lock')) {
9
- return ;
10
- }
11
-
12
- const entries = fs.readdirSync(__dirname, { withFileTypes: true });
13
- const excludeFiles = ['node_modules']; // 需排除的文件名列表
14
-
15
- const filteredEntries = entries.filter(entry =>
16
- !excludeFiles.includes(entry.name)
17
- );
18
-
19
- filteredEntries.forEach(entry => {
20
- const srcPath = path.join(__dirname, entry.name);
21
- const destPath = path.join(projectPath, entry.name);
22
-
23
- if (entry.isFile()) {
24
- fs.copyFileSync(srcPath, destPath);
25
- } else if (entry.isDirectory()) {
26
- fs.cpSync(srcPath, destPath, { recursive: true });
27
- }
28
- });
29
-
30
- }
31
-
32
- generateFiles({});
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ function generateFiles(answers) {
5
+ const projectPath = path.dirname(path.dirname(__dirname)); // 输出:/Users/username/project
6
+ const files = fs.readdirSync(projectPath);
7
+
8
+ if (files.includes('init.lock')) {
9
+ return ;
10
+ }
11
+
12
+ const entries = fs.readdirSync(__dirname, { withFileTypes: true });
13
+ const excludeFiles = ['node_modules']; // 需排除的文件名列表
14
+
15
+ const filteredEntries = entries.filter(entry =>
16
+ !excludeFiles.includes(entry.name)
17
+ );
18
+
19
+ filteredEntries.forEach(entry => {
20
+ const srcPath = path.join(__dirname, entry.name);
21
+ const destPath = path.join(projectPath, entry.name);
22
+
23
+ if (entry.isFile()) {
24
+ fs.copyFileSync(srcPath, destPath);
25
+ } else if (entry.isDirectory()) {
26
+ fs.cpSync(srcPath, destPath, { recursive: true });
27
+ }
28
+ });
29
+
30
+ }
31
+
32
+ generateFiles({});
package/jsconfig.json CHANGED
@@ -1,12 +1,12 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- "lib": ["es6"], // 不包含 "dom"
5
- "checkJs": true
6
- },
7
- "include": [
8
- "src/**/*",
9
- "test/**/*",
10
- "@deekeScript/**/*"
11
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "lib": ["es6"], // 不包含 "dom"
5
+ "checkJs": true
6
+ },
7
+ "include": [
8
+ "src/**/*",
9
+ "test/**/*",
10
+ "@deekeScript/**/*"
11
+ ]
12
12
  }
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "deeke-script-app",
3
- "version": "1.6.3",
4
- "description": "DeekeScript应用",
5
- "main": "src/index.ts",
6
- "scripts": {
7
- "build": "cpx \"src/**/*\" script",
8
- "build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
9
- "build-obfuscator": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile",
10
- "build-obfuscator-zip": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile && ts-node --esm ./deekeScriptZipBuild",
11
- "postinstall": "ts-node --esm init"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/DeekeScript/deekeScript.git"
16
- },
17
- "keywords": [
18
- "DeekeScript应用"
19
- ],
20
- "author": "DeekeScript",
21
- "license": "ISC",
22
- "bugs": {
23
- "url": "https://github.com/DeekeScript/deekeScript/issues"
24
- },
25
- "homepage": "https://github.com/DeekeScript/deekeScript#readme",
26
- "devDependencies": {
27
- "@types/adm-zip": "^0.5.7",
28
- "@types/node": "^22.13.9",
29
- "file-loader": "^6.2.0",
30
- "glob": "^11.0.0",
31
- "gulp": "^5.0.0",
32
- "gulp-uglify": "^3.0.2",
33
- "ts-loader": "^9.5.1",
34
- "typescript": "^5.8.2"
35
- },
36
- "dependencies": {
37
- "adm-zip": "^0.5.16",
38
- "cpx": "^1.5.0",
39
- "socket.io": "^4.8.1",
40
- "ts-node": "^10.9.2"
41
- }
42
- }
1
+ {
2
+ "name": "deeke-script-app",
3
+ "version": "1.6.5",
4
+ "description": "DeekeScript应用",
5
+ "main": "src/index.ts",
6
+ "scripts": {
7
+ "build": "cpx \"src/**/*\" script",
8
+ "build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
9
+ "build-obfuscator": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile",
10
+ "build-obfuscator-zip": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile && ts-node --esm ./deekeScriptZipBuild",
11
+ "postinstall": "ts-node --esm init"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/DeekeScript/deekeScript.git"
16
+ },
17
+ "keywords": [
18
+ "DeekeScript应用"
19
+ ],
20
+ "author": "DeekeScript",
21
+ "license": "ISC",
22
+ "bugs": {
23
+ "url": "https://github.com/DeekeScript/deekeScript/issues"
24
+ },
25
+ "homepage": "https://github.com/DeekeScript/deekeScript#readme",
26
+ "devDependencies": {
27
+ "@types/adm-zip": "^0.5.7",
28
+ "@types/node": "^22.13.9",
29
+ "file-loader": "^6.2.0",
30
+ "glob": "^11.0.0",
31
+ "gulp": "^5.0.0",
32
+ "gulp-uglify": "^3.0.2",
33
+ "ts-loader": "^9.5.1",
34
+ "typescript": "^5.8.2"
35
+ },
36
+ "dependencies": {
37
+ "adm-zip": "^0.5.16",
38
+ "cpx": "^1.5.0",
39
+ "socket.io": "^4.8.1",
40
+ "ts-node": "^10.9.2"
41
+ }
42
+ }
@@ -1,20 +1,20 @@
1
- let e = {
2
- setLog(e) {
3
- Log.setFile(e);
4
- },
5
- log() {
6
- Log.log(arguments), console.log(arguments);
7
- },
8
- click(e) {
9
- this.log("点击了控件:", e), Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().top + Math.random() * e.bounds().height());
10
- },
11
- input(e, t) {
12
- e.setText(t);
13
- },
14
- swipe() {
15
- var e = Device.height() * (.6 + .2 * Math.random()), t = Device.height() * (.2 + .2 * Math.random()), o = Math.random() * Device.width() * .6 + .2 * Device.width();
16
- Gesture.swipe(o, e, o + .1 * Device.width(), t, 200 + 100 * Math.random());
17
- }
18
- };
19
-
1
+ let e = {
2
+ setLog(e) {
3
+ Log.setFile(e);
4
+ },
5
+ log() {
6
+ Log.log(arguments), console.log(arguments);
7
+ },
8
+ click(e) {
9
+ this.log("点击了控件:", e), Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().top + Math.random() * e.bounds().height());
10
+ },
11
+ input(e, t) {
12
+ e.setText(t);
13
+ },
14
+ swipe() {
15
+ var e = Device.height() * (.6 + .2 * Math.random()), t = Device.height() * (.2 + .2 * Math.random()), o = Math.random() * Device.width() * .6 + .2 * Device.width();
16
+ Gesture.swipe(o, e, o + .1 * Device.width(), t, 200 + 100 * Math.random());
17
+ }
18
+ };
19
+
20
20
  module.exports = e;
@@ -1,10 +1,10 @@
1
- let e = {
2
- openApp() {
3
- App.launch("com.ss.android.ugc.aweme"), System.sleep(8e3);
4
- },
5
- id(e) {
6
- return UiSelector().id("com.ss.android.ugc.aweme:id/" + e);
7
- }
8
- };
9
-
1
+ let e = {
2
+ openApp() {
3
+ App.launch("com.ss.android.ugc.aweme"), System.sleep(8e3);
4
+ },
5
+ id(e) {
6
+ return UiSelector().id("com.ss.android.ugc.aweme:id/" + e);
7
+ }
8
+ };
9
+
10
10
  module.exports = e;
@@ -1,4 +1,4 @@
1
- let e;
2
-
3
- (e = 310701 == App.getAppVersionCode("com.ss.android.ugc.aweme") ? require("../version/310701.js") : e) || (FloatDialogs.show("当前版本不支持"),
1
+ let e;
2
+
3
+ (e = 310701 == App.getAppVersionCode("com.ss.android.ugc.aweme") ? require("../version/310701.js") : e) || (FloatDialogs.show("当前版本不支持"),
4
4
  System.exit()), module.exports = e;
@@ -1,8 +1,8 @@
1
- let i = require("../../common/util"), r = require("./common"), o = require("./version"), e = {
2
- zan() {
3
- var e = r.id(o.video.zan).isVisibleToUser(!0).findOne();
4
- e && i.click(e);
5
- }
6
- };
7
-
1
+ let i = require("../../common/util"), r = require("./common"), o = require("./version"), e = {
2
+ zan() {
3
+ var e = r.id(o.video.zan).isVisibleToUser(!0).findOne();
4
+ e && i.click(e);
5
+ }
6
+ };
7
+
8
8
  module.exports = e;
@@ -1,7 +1,7 @@
1
- let e = require("../../common/util"), o = require("../../dy/common/common"), m = require("../../dy/common/video"), c = {
2
- exec() {
3
- o.openApp(), m.zan();
4
- }
5
- };
6
-
1
+ let e = require("../../common/util"), o = require("../../dy/common/common"), m = require("../../dy/common/video"), c = {
2
+ exec() {
3
+ o.openApp(), m.zan();
4
+ }
5
+ };
6
+
7
7
  c.exec();
@@ -1,7 +1,7 @@
1
- let e = {
2
- video: {
3
- zan: "fd9"
4
- }
5
- };
6
-
1
+ let e = {
2
+ video: {
3
+ zan: "fd9"
4
+ }
5
+ };
6
+
7
7
  module.exports = e;