@wagq/wa-cli 0.6.24 → 0.6.26

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # cli 工具
2
2
 
3
3
  使用方式 全局安装后 可使用 wa [命令]
4
+
4
5
  - 更多描述可以使用help查看
5
6
 
6
7
  ```
@@ -8,32 +9,45 @@
8
9
  ```
9
10
 
10
11
  - 初始化项目
12
+
11
13
  ```bash
12
- wa init
14
+ wa init
13
15
  ```
14
16
 
15
17
  - 启动本地服务
18
+
19
+ - `-P` 3000 指定端口
20
+ - `-S` true 开启https
21
+
16
22
  ```bash
17
- wa server [path]
23
+ wa server [path]
18
24
  ```
19
- 可选参数
20
- -P 3000 指定端口
21
- -S true 开启https
22
25
 
23
26
  - 转换 xlsx 文件为多语言配置
24
- wa xlsx2Config [path] [name] [ext]
25
- 参数
26
27
 
27
- - path 文件路径
28
- - name 被转换目标文件名称
29
- - ext 转换后文件扩展名 json 或 ts
28
+ - `path` 文件路径
29
+ - `name` 被转换目标文件名称
30
+ - `ext` 转换后文件扩展名 json 或 ts
31
+
32
+ ```bash
33
+ wa xlsx2Config [path] [name] [ext]
34
+ ```
30
35
 
31
36
  - 同步远端低代码配置
37
+
32
38
  ```bash
33
39
  wa daml
34
40
  ```
35
41
 
36
42
  - 同步远端应用所有页面的低代码配置
43
+
37
44
  ```bash
38
45
  wa damls
39
46
  ```
47
+
48
+ - batchUpdate
49
+ 批量更新指定组织下的包
50
+
51
+ ```bash
52
+ wa batchUpdate
53
+ ```
package/config/command.js CHANGED
@@ -1,97 +1,97 @@
1
- const init = require("../lib/init");
2
- const server = require("../lib/server");
3
- const xlsx2Config = require("../lib/locale/xlsx2Config");
4
- const asyncDaml = require("../lib/daml/async");
5
- const asyncDamlByApp = require("../lib/daml/asyncByApp");
6
- const batchUpdate = require("../lib/batchUpdate");
7
-
8
- const command = [
9
- {
10
- name: "daml",
11
- alias: "d",
12
- description: "同步低代码逻辑器文件",
13
- action: () => {
14
- asyncDaml();
15
- },
16
- },
17
- {
18
- name: "batchUpdate",
19
- alias: "bu",
20
- description: "批量升级依赖包,可以指定组织,只更新组织下的依赖",
21
- action: () => {
22
- batchUpdate();
23
- },
24
- },
25
- {
26
- name: "damls",
27
- description: `从应用同步所有页面的逻辑器与变量值,
28
- 可将appId,branchid,token配置到~/.damlrc文件中,
29
- 格式为{"origin":string,"appId":string,"branchid":string,"token":string, "appName": string}[]
30
- 其中origin为请求域名(/api/assembler/page/list(页面列表)接口域名),
31
- appId,branchid,token为请求参数,
32
- appName为应用名称,也是你区分不同应用的标识,所有生成的文件都会放在appName文件夹下`,
33
- alias: "da",
34
- action: () => {
35
- asyncDamlByApp();
36
- },
37
- },
38
- {
39
- name: "init",
40
- alias: "i",
41
- description: "项目初始化工具",
42
- action: (name) => {
43
- init(name);
44
- },
45
- },
46
- {
47
- name: "server [path]",
48
- alias: "s",
49
- description: "启动本地服务",
50
- action: server,
51
- options: {
52
- 端口: "-P, --port <port>",
53
- https: "-S, --https <boolean>",
54
- },
55
- positional: [
56
- {
57
- key: "path",
58
- option: {
59
- default: "dist",
60
- describe: "文件路径",
61
- type: "string",
62
- },
63
- },
64
- ],
65
- },
66
- {
67
- name: "xlsx2Config [path] [name] [ext]",
68
- alias: "l",
69
- description: "xlsx文件转多语言配置",
70
- positional: [
71
- {
72
- key: "path",
73
- option: {
74
- describe: "文件路径",
75
- type: "string",
76
- },
77
- },
78
- {
79
- key: "name",
80
- option: {
81
- describe: "xlsx文件名称",
82
- type: "string",
83
- },
84
- },
85
- {
86
- key: "ext",
87
- option: {
88
- describe: "转换文件格式(ts or json)",
89
- type: "string",
90
- },
91
- },
92
- ],
93
- action: xlsx2Config,
94
- },
95
- ];
96
-
97
- module.exports = command;
1
+ const init = require("../lib/init");
2
+ const server = require("../lib/server");
3
+ const xlsx2Config = require("../lib/locale/xlsx2Config");
4
+ const asyncDaml = require("../lib/daml/async");
5
+ const asyncDamlByApp = require("../lib/daml/asyncByApp");
6
+ const batchUpdate = require("../lib/batchUpdate");
7
+
8
+ const command = [
9
+ {
10
+ name: "daml",
11
+ alias: "d",
12
+ description: "同步低代码逻辑器文件",
13
+ action: () => {
14
+ asyncDaml();
15
+ },
16
+ },
17
+ {
18
+ name: "batchUpdate",
19
+ alias: "bu",
20
+ description: "批量升级依赖包,可以指定组织,只更新组织下的依赖",
21
+ action: () => {
22
+ batchUpdate();
23
+ },
24
+ },
25
+ {
26
+ name: "damls",
27
+ description: `从应用同步所有页面的逻辑器与变量值,
28
+ 可将appId,branchid,token配置到~/.damlrc文件中,
29
+ 格式为{"origin":string,"appId":string,"branchid":string,"token":string, "appName": string}[]
30
+ 其中origin为请求域名(/api/assembler/page/list(页面列表)接口域名),
31
+ appId,branchid,token为请求参数,
32
+ appName为应用名称,也是你区分不同应用的标识,所有生成的文件都会放在appName文件夹下`,
33
+ alias: "da",
34
+ action: () => {
35
+ asyncDamlByApp();
36
+ },
37
+ },
38
+ {
39
+ name: "init",
40
+ alias: "i",
41
+ description: "项目初始化工具",
42
+ action: (name) => {
43
+ init(name);
44
+ },
45
+ },
46
+ {
47
+ name: "server [path]",
48
+ alias: "s",
49
+ description: "启动本地服务",
50
+ action: server,
51
+ options: {
52
+ 端口: "-P, --port <port>",
53
+ https: "-S, --https <boolean>",
54
+ },
55
+ positional: [
56
+ {
57
+ key: "path",
58
+ option: {
59
+ default: "dist",
60
+ describe: "文件路径",
61
+ type: "string",
62
+ },
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ name: "xlsx2Config [path] [name] [ext]",
68
+ alias: "l",
69
+ description: "xlsx文件转多语言配置",
70
+ positional: [
71
+ {
72
+ key: "path",
73
+ option: {
74
+ describe: "文件路径",
75
+ type: "string",
76
+ },
77
+ },
78
+ {
79
+ key: "name",
80
+ option: {
81
+ describe: "xlsx文件名称",
82
+ type: "string",
83
+ },
84
+ },
85
+ {
86
+ key: "ext",
87
+ option: {
88
+ describe: "转换文件格式(ts or json)",
89
+ type: "string",
90
+ },
91
+ },
92
+ ],
93
+ action: xlsx2Config,
94
+ },
95
+ ];
96
+
97
+ module.exports = command;
package/lib/init/index.js CHANGED
@@ -8,6 +8,7 @@ const { execSync } = require("child_process");
8
8
 
9
9
  const viteBin = "npm create vite@latest";
10
10
  const uniAppBin = "npm create unibest";
11
+ const rnAppBin = "npx create-expo-app --template";
11
12
 
12
13
  const urls = {
13
14
  vue单页面后台: { remote: "sdmu-gaoqi/vite-vue" },
@@ -18,6 +19,7 @@ const urls = {
18
19
  "vscode插件-vue版": { remote: "sdmu-gaoqi/vscode-plugin#vue" },
19
20
  "vscode插件-react版": { remote: "sdmu-gaoqi/vscode-plugin#react" },
20
21
  umi: { bin: "npx create-umi@latest" },
22
+ "react-native": { bin: rnAppBin },
21
23
  };
22
24
 
23
25
  const reactRepoMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wagq/wa-cli",
3
- "version": "0.6.24",
3
+ "version": "0.6.26",
4
4
  "description": "wa的脚手架",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,6 +8,10 @@
8
8
  "pub": "npm publish --access public --registry=https://registry.npmjs.org",
9
9
  "dev": "node ./bin/wa.js"
10
10
  },
11
+ "exports": {
12
+ "cert": "./config/cert.pem",
13
+ "key": "./config/key.pem"
14
+ },
11
15
  "keywords": [
12
16
  "wa的脚手架"
13
17
  ],