deeke-script-app 1.7.7 → 1.7.8

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 (49) 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 +141 -141
  6. package/@deekeScript/@type/interface/App.d.ts +101 -101
  7. package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
  8. package/@deekeScript/@type/interface/Device.d.ts +212 -212
  9. package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
  10. package/@deekeScript/@type/interface/Engines.d.ts +39 -39
  11. package/@deekeScript/@type/interface/Files.d.ts +283 -283
  12. package/@deekeScript/@type/interface/FloatDialogs.d.ts +47 -47
  13. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
  14. package/@deekeScript/@type/interface/Hid.d.ts +342 -342
  15. package/@deekeScript/@type/interface/Http.d.ts +94 -94
  16. package/@deekeScript/@type/interface/Images.d.ts +71 -71
  17. package/@deekeScript/@type/interface/Java.d.ts +7 -7
  18. package/@deekeScript/@type/interface/KeyBoards.d.ts +54 -54
  19. package/@deekeScript/@type/interface/Log.d.ts +16 -16
  20. package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
  21. package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
  22. package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
  23. package/@deekeScript/@type/interface/Storage.d.ts +119 -119
  24. package/@deekeScript/@type/interface/System.d.ts +120 -120
  25. package/@deekeScript/@type/interface/UiObject.d.ts +202 -202
  26. package/README.md +67 -67
  27. package/deekeScript.json +672 -670
  28. package/deekeScript.schema.json +686 -681
  29. package/deekeScriptZipBuild +48 -48
  30. package/gulpfile +17 -17
  31. package/images/test/statistics.png +0 -0
  32. package/init +32 -32
  33. package/jsconfig.json +11 -11
  34. package/package.json +43 -43
  35. package/script/statistics/statistics.js +120 -120
  36. package/script/task/douyin_zan.js +37 -37
  37. package/script/task/dy.js +6 -6
  38. package/script/task/dyApp.js +6 -6
  39. package/script/task/tool.js +9 -9
  40. package/script/task.html +4 -4
  41. package/src/statistics/statistics.js +120 -120
  42. package/src/task/douyin_zan.js +89 -89
  43. package/src/task/dy.js +14 -14
  44. package/src/task/dyApp.js +7 -7
  45. package/src/task/tool.js +19 -19
  46. package/src/task.html +4 -4
  47. package/test.json +132 -132
  48. package/uglify-config.json +15 -15
  49. package/update-types.js +118 -118
package/test.json CHANGED
@@ -1,133 +1,133 @@
1
- {
2
- "$schema": "./deekeScript.schema.json",
3
- "name": "test",
4
- "versionCode": "100",
5
- "versionName": "名称",
6
- "debug": true,
7
- "icon": "icon.png",
8
- "head": "head.png",
9
- "host": "http://127.0.0.1:8080",
10
- "switchSetting": {
11
- "alipay": false
12
- },
13
- "settingTopBg": "top.png",
14
- "groups": [
15
- {
16
- "title": "测试",
17
- "methods": [
18
- {
19
- "icon": "icon.png",
20
- "title": "测试",
21
- "jsFile": "test.js",
22
- "settingPage": {
23
- "params": [
24
- {
25
- "label": "标题",
26
- "name": "title",
27
- "type": "number"
28
- },
29
- {
30
- "type": "notice",
31
- "title": "提示"
32
- },
33
- {
34
- "type": "switch",
35
- "label": "标题",
36
- "name": "title",
37
- "value": true
38
- },
39
- {
40
- "type": "number",
41
- "label": "标题",
42
- "name": "title",
43
- "value": 3223
44
- },
45
- {
46
- "type": "digit",
47
- "label": "标题",
48
- "name": "title",
49
- "value": 32
50
- },
51
- {
52
- "type": "numberRange",
53
- "label": "标题",
54
- "name": "title",
55
- "value": 32,
56
- "min": 0,
57
- "max": 100,
58
- "step": 1
59
- },
60
- {
61
- "type": "textArea",
62
- "label": "标题",
63
- "name": "title",
64
- "value": "32",
65
- "lines": 3
66
- },
67
- {
68
- "type": "checkboxGroup",
69
- "label": "标题",
70
- "name": "title",
71
- "children": ["1", "2", "3"],
72
- "values": ["1", "2", "3"]
73
- },
74
- {
75
- "type": "digitRange",
76
- "label": "标题",
77
- "name": "title",
78
- "value": 32,
79
- "min": 0,
80
- "max": 100,
81
- "step": 1
82
- },
83
- {
84
- "type": "radio",
85
- "label": "标题",
86
- "name": "title",
87
- "value": "1",
88
- "dataFrom": "role",
89
- "options": []
90
- },
91
- {
92
- "type": "text",
93
- "label": "标题",
94
- "name": "title",
95
- "value": "32"
96
- }
97
- ]
98
- }
99
- }
100
- ]
101
- }
102
- ],
103
- "apis": [
104
- {
105
- "type": "aiSpeechToken",
106
- "url": "http://127.0.0.1:8080/api/aiSpeechToken"
107
- }
108
- ],
109
- "bottomMenus": [
110
- {
111
- "banner": "banner.png",
112
- "icon": "icon.png",
113
- "title": "标题",
114
- "type": "home"
115
- }
116
- ],
117
- "settingLists": [
118
- {
119
- "title": "设置",
120
- "icon": "icon.png",
121
- "type": "clear",
122
- "settingPage": {
123
- "params": [
124
- {
125
- "label": "标题",
126
- "name": "title",
127
- "type": "number"
128
- }
129
- ]
130
- }
131
- }
132
- ]
1
+ {
2
+ "$schema": "./deekeScript.schema.json",
3
+ "name": "test",
4
+ "versionCode": "100",
5
+ "versionName": "名称",
6
+ "debug": true,
7
+ "icon": "icon.png",
8
+ "head": "head.png",
9
+ "host": "http://127.0.0.1:8080",
10
+ "switchSetting": {
11
+ "alipay": false
12
+ },
13
+ "settingTopBg": "top.png",
14
+ "groups": [
15
+ {
16
+ "title": "测试",
17
+ "methods": [
18
+ {
19
+ "icon": "icon.png",
20
+ "title": "测试",
21
+ "jsFile": "test.js",
22
+ "settingPage": {
23
+ "params": [
24
+ {
25
+ "label": "标题",
26
+ "name": "title",
27
+ "type": "number"
28
+ },
29
+ {
30
+ "type": "notice",
31
+ "title": "提示"
32
+ },
33
+ {
34
+ "type": "switch",
35
+ "label": "标题",
36
+ "name": "title",
37
+ "value": true
38
+ },
39
+ {
40
+ "type": "number",
41
+ "label": "标题",
42
+ "name": "title",
43
+ "value": 3223
44
+ },
45
+ {
46
+ "type": "digit",
47
+ "label": "标题",
48
+ "name": "title",
49
+ "value": 32
50
+ },
51
+ {
52
+ "type": "numberRange",
53
+ "label": "标题",
54
+ "name": "title",
55
+ "value": 32,
56
+ "min": 0,
57
+ "max": 100,
58
+ "step": 1
59
+ },
60
+ {
61
+ "type": "textArea",
62
+ "label": "标题",
63
+ "name": "title",
64
+ "value": "32",
65
+ "lines": 3
66
+ },
67
+ {
68
+ "type": "checkboxGroup",
69
+ "label": "标题",
70
+ "name": "title",
71
+ "children": ["1", "2", "3"],
72
+ "values": ["1", "2", "3"]
73
+ },
74
+ {
75
+ "type": "digitRange",
76
+ "label": "标题",
77
+ "name": "title",
78
+ "value": 32,
79
+ "min": 0,
80
+ "max": 100,
81
+ "step": 1
82
+ },
83
+ {
84
+ "type": "radio",
85
+ "label": "标题",
86
+ "name": "title",
87
+ "value": "1",
88
+ "dataFrom": "role",
89
+ "options": []
90
+ },
91
+ {
92
+ "type": "text",
93
+ "label": "标题",
94
+ "name": "title",
95
+ "value": "32"
96
+ }
97
+ ]
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ ],
103
+ "apis": [
104
+ {
105
+ "type": "aiSpeechToken",
106
+ "url": "http://127.0.0.1:8080/api/aiSpeechToken"
107
+ }
108
+ ],
109
+ "bottomMenus": [
110
+ {
111
+ "banner": "banner.png",
112
+ "icon": "icon.png",
113
+ "title": "标题",
114
+ "type": "home"
115
+ }
116
+ ],
117
+ "settingLists": [
118
+ {
119
+ "title": "设置",
120
+ "icon": "icon.png",
121
+ "type": "clear",
122
+ "settingPage": {
123
+ "params": [
124
+ {
125
+ "label": "标题",
126
+ "name": "title",
127
+ "type": "number"
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ ]
133
133
  }
@@ -1,16 +1,16 @@
1
- {
2
- "compress": {
3
- "drop_console": false,
4
- "unused": true,
5
- "sequences": true,
6
- "dead_code": true,
7
- "unsafe_math": true
8
- },
9
- "mangle": {
10
- "toplevel": true
11
- },
12
- "output": {
13
- "beautify": true,
14
- "comments": "/^!|@license/i"
15
- }
1
+ {
2
+ "compress": {
3
+ "drop_console": false,
4
+ "unused": true,
5
+ "sequences": true,
6
+ "dead_code": true,
7
+ "unsafe_math": true
8
+ },
9
+ "mangle": {
10
+ "toplevel": true
11
+ },
12
+ "output": {
13
+ "beautify": true,
14
+ "comments": "/^!|@license/i"
15
+ }
16
16
  }
package/update-types.js CHANGED
@@ -1,118 +1,118 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
-
5
- const PROJECT_ROOT = __dirname;
6
- const TYPES_FOLDER = path.join(PROJECT_ROOT, '@deekeScript');
7
- const TEMP_DIR = path.join(PROJECT_ROOT, '.temp-update');
8
- const PACKAGE_NAME = 'deeke-script-app';
9
-
10
- // 颜色输出
11
- const colors = {
12
- reset: '\x1b[0m',
13
- green: '\x1b[32m',
14
- yellow: '\x1b[33m',
15
- red: '\x1b[31m',
16
- blue: '\x1b[34m',
17
- cyan: '\x1b[36m'
18
- };
19
-
20
- function log(message, color = 'reset') {
21
- console.log(`${colors[color]}${message}${colors.reset}`);
22
- }
23
-
24
- // 清理临时目录
25
- function cleanup() {
26
- if (fs.existsSync(TEMP_DIR)) {
27
- fs.rmSync(TEMP_DIR, { recursive: true, force: true });
28
- }
29
- }
30
-
31
- // 从npm更新
32
- async function updateFromNpm() {
33
- log('\n📦 从npm更新类型定义文件...', 'cyan');
34
-
35
- try {
36
- // 检查npm包是否存在
37
- log('检查npm包版本...', 'blue');
38
- const latestVersion = execSync(`npm view ${PACKAGE_NAME} version`, { encoding: 'utf-8' }).trim();
39
- log(`最新版本: ${latestVersion}`, 'green');
40
-
41
- // 创建临时目录
42
- if (!fs.existsSync(TEMP_DIR)) {
43
- fs.mkdirSync(TEMP_DIR, { recursive: true });
44
- }
45
-
46
- const tempPackageDir = path.join(TEMP_DIR, 'node_modules', PACKAGE_NAME);
47
-
48
- // 在临时目录安装npm包
49
- log('下载并安装npm包...', 'blue');
50
- const packageJsonPath = path.join(TEMP_DIR, 'package.json');
51
- fs.writeFileSync(packageJsonPath, JSON.stringify({
52
- name: 'temp-update',
53
- version: '1.0.0',
54
- dependencies: {
55
- [PACKAGE_NAME]: 'latest'
56
- }
57
- }, null, 2));
58
-
59
- execSync('npm install', {
60
- cwd: TEMP_DIR,
61
- stdio: 'pipe',
62
- env: { ...process.env, npm_config_progress: 'false' }
63
- });
64
-
65
- // 检查@deekeScript文件夹是否存在
66
- const sourceTypesFolder = path.join(tempPackageDir, '@deekeScript');
67
- if (!fs.existsSync(sourceTypesFolder)) {
68
- throw new Error('npm包中未找到@deekeScript文件夹');
69
- }
70
-
71
- // 备份现有文件夹
72
- if (fs.existsSync(TYPES_FOLDER)) {
73
- log('备份现有类型定义文件...', 'yellow');
74
- const backupFolder = path.join(PROJECT_ROOT, '@deekeScript.backup');
75
- if (fs.existsSync(backupFolder)) {
76
- fs.rmSync(backupFolder, { recursive: true, force: true });
77
- }
78
- fs.cpSync(TYPES_FOLDER, backupFolder, { recursive: true });
79
- }
80
-
81
- // 删除旧文件夹并复制新文件夹
82
- if (fs.existsSync(TYPES_FOLDER)) {
83
- fs.rmSync(TYPES_FOLDER, { recursive: true, force: true });
84
- }
85
- fs.cpSync(sourceTypesFolder, TYPES_FOLDER, { recursive: true });
86
-
87
- log('✅ 类型定义文件更新成功!', 'green');
88
- log(`已更新到版本: ${latestVersion}`, 'green');
89
-
90
- } catch (error) {
91
- log(`❌ 从npm更新失败: ${error.message}`, 'red');
92
- throw error;
93
- }
94
- }
95
-
96
- // 主函数
97
- async function main() {
98
- log('🚀 开始更新@deekeScript类型定义文件...', 'cyan');
99
-
100
- try {
101
- // 确保在项目根目录
102
- if (!fs.existsSync(path.join(PROJECT_ROOT, 'package.json'))) {
103
- throw new Error('请在项目根目录运行此脚本');
104
- }
105
-
106
- await updateFromNpm();
107
-
108
- } catch (error) {
109
- log(`\n❌ 更新失败: ${error.message}`, 'red');
110
- process.exit(1);
111
- } finally {
112
- // 清理临时文件
113
- cleanup();
114
- }
115
- }
116
-
117
- // 运行主函数
118
- main();
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const { execSync } = require('child_process');
4
+
5
+ const PROJECT_ROOT = __dirname;
6
+ const TYPES_FOLDER = path.join(PROJECT_ROOT, '@deekeScript');
7
+ const TEMP_DIR = path.join(PROJECT_ROOT, '.temp-update');
8
+ const PACKAGE_NAME = 'deeke-script-app';
9
+
10
+ // 颜色输出
11
+ const colors = {
12
+ reset: '\x1b[0m',
13
+ green: '\x1b[32m',
14
+ yellow: '\x1b[33m',
15
+ red: '\x1b[31m',
16
+ blue: '\x1b[34m',
17
+ cyan: '\x1b[36m'
18
+ };
19
+
20
+ function log(message, color = 'reset') {
21
+ console.log(`${colors[color]}${message}${colors.reset}`);
22
+ }
23
+
24
+ // 清理临时目录
25
+ function cleanup() {
26
+ if (fs.existsSync(TEMP_DIR)) {
27
+ fs.rmSync(TEMP_DIR, { recursive: true, force: true });
28
+ }
29
+ }
30
+
31
+ // 从npm更新
32
+ async function updateFromNpm() {
33
+ log('\n📦 从npm更新类型定义文件...', 'cyan');
34
+
35
+ try {
36
+ // 检查npm包是否存在
37
+ log('检查npm包版本...', 'blue');
38
+ const latestVersion = execSync(`npm view ${PACKAGE_NAME} version`, { encoding: 'utf-8' }).trim();
39
+ log(`最新版本: ${latestVersion}`, 'green');
40
+
41
+ // 创建临时目录
42
+ if (!fs.existsSync(TEMP_DIR)) {
43
+ fs.mkdirSync(TEMP_DIR, { recursive: true });
44
+ }
45
+
46
+ const tempPackageDir = path.join(TEMP_DIR, 'node_modules', PACKAGE_NAME);
47
+
48
+ // 在临时目录安装npm包
49
+ log('下载并安装npm包...', 'blue');
50
+ const packageJsonPath = path.join(TEMP_DIR, 'package.json');
51
+ fs.writeFileSync(packageJsonPath, JSON.stringify({
52
+ name: 'temp-update',
53
+ version: '1.0.0',
54
+ dependencies: {
55
+ [PACKAGE_NAME]: 'latest'
56
+ }
57
+ }, null, 2));
58
+
59
+ execSync('npm install', {
60
+ cwd: TEMP_DIR,
61
+ stdio: 'pipe',
62
+ env: { ...process.env, npm_config_progress: 'false' }
63
+ });
64
+
65
+ // 检查@deekeScript文件夹是否存在
66
+ const sourceTypesFolder = path.join(tempPackageDir, '@deekeScript');
67
+ if (!fs.existsSync(sourceTypesFolder)) {
68
+ throw new Error('npm包中未找到@deekeScript文件夹');
69
+ }
70
+
71
+ // 备份现有文件夹
72
+ if (fs.existsSync(TYPES_FOLDER)) {
73
+ log('备份现有类型定义文件...', 'yellow');
74
+ const backupFolder = path.join(PROJECT_ROOT, '@deekeScript.backup');
75
+ if (fs.existsSync(backupFolder)) {
76
+ fs.rmSync(backupFolder, { recursive: true, force: true });
77
+ }
78
+ fs.cpSync(TYPES_FOLDER, backupFolder, { recursive: true });
79
+ }
80
+
81
+ // 删除旧文件夹并复制新文件夹
82
+ if (fs.existsSync(TYPES_FOLDER)) {
83
+ fs.rmSync(TYPES_FOLDER, { recursive: true, force: true });
84
+ }
85
+ fs.cpSync(sourceTypesFolder, TYPES_FOLDER, { recursive: true });
86
+
87
+ log('✅ 类型定义文件更新成功!', 'green');
88
+ log(`已更新到版本: ${latestVersion}`, 'green');
89
+
90
+ } catch (error) {
91
+ log(`❌ 从npm更新失败: ${error.message}`, 'red');
92
+ throw error;
93
+ }
94
+ }
95
+
96
+ // 主函数
97
+ async function main() {
98
+ log('🚀 开始更新@deekeScript类型定义文件...', 'cyan');
99
+
100
+ try {
101
+ // 确保在项目根目录
102
+ if (!fs.existsSync(path.join(PROJECT_ROOT, 'package.json'))) {
103
+ throw new Error('请在项目根目录运行此脚本');
104
+ }
105
+
106
+ await updateFromNpm();
107
+
108
+ } catch (error) {
109
+ log(`\n❌ 更新失败: ${error.message}`, 'red');
110
+ process.exit(1);
111
+ } finally {
112
+ // 清理临时文件
113
+ cleanup();
114
+ }
115
+ }
116
+
117
+ // 运行主函数
118
+ main();