deeke-script-app 1.2.8 → 1.3.0

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.
@@ -7,7 +7,7 @@ interface Engines {
7
7
  * 执行脚本
8
8
  * @param file 文件路径,相对根目录的路径
9
9
  */
10
- public execScript(file: string): void;
10
+ public executeScript(file: string): void;
11
11
 
12
12
  /**
13
13
  * 执行脚本
@@ -19,6 +19,11 @@ interface Engines {
19
19
  * 关闭所有脚本
20
20
  */
21
21
  public closeAll(): void;
22
+
23
+ /**
24
+ * 关闭当前脚本之外的其他脚本
25
+ */
26
+ public closeOther(): void
22
27
  }
23
28
 
24
29
  export { };
@@ -0,0 +1,16 @@
1
+ global {
2
+ var Log: log;
3
+ }
4
+
5
+ interface log {
6
+ /**
7
+ * 全局设置日志输出文件
8
+ */
9
+ public setFile(filename: string): boolean;
10
+ /**
11
+ * 输出日志内容
12
+ */
13
+ public log(...obj: object): void;
14
+ }
15
+
16
+ export { };
package/deekeScript.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
- "name": "Deeke",
2
+ "name": "测试",
3
3
  "icon": "images/test/app.png",
4
4
  "head": "images/test/app.png",
5
5
  "settingTopBg": "images/test/setting-top.png",
6
+ "version": "1.0.0",
6
7
  "host": "https://home.deeke.top",
7
8
  "switchSetting": {
8
9
  "alipay": true
package/jsconfig.json CHANGED
@@ -6,6 +6,7 @@
6
6
  },
7
7
  "include": [
8
8
  "src/**/*",
9
+ "test/**/*",
9
10
  "@deekeScript/**/*"
10
11
  ]
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deeke-script-app",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "description": "DeekeScript应用",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/script/index.js CHANGED
@@ -1 +0,0 @@
1
- //这个文件不用编写代码
package/script/task/dy.js CHANGED
@@ -1,14 +1,7 @@
1
- let dyApp = require("./dyApp");
1
+ let e = require("./dyApp"), o = UiSelector().id("name").findOne(), r = {
2
+ toker_view_video_keywords: Storage.get("toker_view_video_keywords"),
3
+ toker_view_video_second: Storage.getInteger("toker_view_video_second"),
4
+ toker_run_sex: Storage.getArray("toker_run_sex")
5
+ };
2
6
 
3
- let tag = UiSelector().id('name').findOne();
4
-
5
- // console.log(tag.click());
6
- let config = {
7
- toker_view_video_keywords: Storage.get('toker_view_video_keywords'),
8
- toker_view_video_second: Storage.getInteger('toker_view_video_second'),
9
- toker_run_sex: Storage.getArray('toker_run_sex'),
10
- }
11
-
12
- console.log(config, dyApp.getName());//获取json文件中的配置参数
13
-
14
- FloatDialogs.show('提示', '请编写业务代码');
7
+ console.log(r, e.getName()), FloatDialogs.show("提示", "请编写业务代码");
@@ -1,7 +1,7 @@
1
- const dyApp = {
2
- getName(){
1
+ let e = {
2
+ getName() {
3
3
  return "appName";
4
4
  }
5
- }
5
+ };
6
6
 
7
- module.exports = dyApp;
7
+ module.exports = e;
@@ -1 +1 @@
1
- FloatDialogs.show('提示', '请编写业务代码');
1
+ FloatDialogs.show("提示", "请编写业务代码");
@@ -1,19 +1,10 @@
1
- let myTask = {
2
- intoApp() {
3
- //打开并进入App
4
- },
5
-
6
- backApp() {
7
- //退出当前App
8
- },
9
-
10
- task(){
11
- //任务代码
12
- },
13
-
1
+ let a = {
2
+ intoApp() {},
3
+ backApp() {},
4
+ task() {},
14
5
  run() {
15
- FloatDialogs.show('提示', '请编写业务代码');
6
+ FloatDialogs.show("提示", "请编写业务代码");
16
7
  }
17
- }
8
+ };
18
9
 
19
- myTask.run();
10
+ a.run();
@@ -0,0 +1,6 @@
1
+
2
+ const one = {
3
+
4
+ }
5
+
6
+ module.exports = one;
@@ -0,0 +1,8 @@
1
+ const one = require('../../test-one/one');
2
+ const tool = require('../../../task/tool');
3
+ const mo = require('../../../../test/module/module');
4
+ const three = {
5
+
6
+ }
7
+
8
+ module.exports = three;
@@ -0,0 +1,6 @@
1
+ const one = require('./three/three');
2
+ const two = {
3
+
4
+ }
5
+
6
+ module.exports = two;
@@ -0,0 +1,9 @@
1
+
2
+ try {
3
+ // const one = require('./test-one/one');
4
+ // const two = require('./test-two/two');
5
+ console.log(2342);
6
+ FloatDialogs.show([1,2,3],1,3);
7
+ } catch (e) {
8
+ console.log(e);
9
+ }
package/test/engines.js CHANGED
@@ -1,4 +1,4 @@
1
- Engines.executeScriptStr("My first DeekeScript", "console.log('My first DeekeScript');");
1
+ Engines.executeScriptStr("console.log('My first DeekeScript');");
2
2
 
3
3
  Engines.executeScriptStr("console.log('My first DeekeScript');");
4
4
 
@@ -0,0 +1,5 @@
1
+ const mo = {
2
+
3
+ }
4
+ console.log(333);
5
+ module.exports = mo;