aiot-toolkit 2.0.6-beta.21 → 2.0.6-beta.23
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 +42 -18
- package/lib/bin.js +27 -6
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -74,26 +74,50 @@ aiot-toolkit2.0目前支持的打包格式如下:
|
|
|
74
74
|
|
|
75
75
|
## resign
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
**rpk解压的代码目录**重新生成rpk
|
|
78
|
+
|
|
79
|
+
### 示例
|
|
80
|
+
|
|
81
|
+
#### 无参数
|
|
82
|
+
|
|
83
|
+
1. 创建目录结构如下
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
folder
|
|
87
|
+
build // 用户复制:代码目录
|
|
88
|
+
*.js
|
|
89
|
+
sign // 用户复制:证书 (可选)
|
|
90
|
+
certificate.pem
|
|
91
|
+
private.pem
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
1. 执行命令:`npx aiot-toolkit resign`
|
|
95
|
+
1. 产物
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
folder
|
|
99
|
+
dist // 生成
|
|
100
|
+
***.rpk
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### 自定义参数
|
|
104
|
+
|
|
105
|
+
1. 执行命令:`npx aiot-toolkit resign --source="com.your.app" --output="."`
|
|
106
|
+
2. 产物:
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
com.your.app // 代码目录
|
|
110
|
+
com.your.app.rpk // 产物
|
|
95
111
|
```
|
|
96
112
|
|
|
113
|
+
### 参数说明
|
|
114
|
+
|
|
115
|
+
| 名称 | 说明 | 默认值 |
|
|
116
|
+
| ------ | -------- | ------- |
|
|
117
|
+
| source | 代码目录 | `build` |
|
|
118
|
+
| output | 产物目录 | `dist` |
|
|
119
|
+
| sign | 证书目录 | `sign` |
|
|
120
|
+
|
|
97
121
|
## jsc
|
|
98
122
|
|
|
99
123
|
指定目录的js文件转换为jsc文件
|
package/lib/bin.js
CHANGED
|
@@ -176,18 +176,39 @@ async function main() {
|
|
|
176
176
|
}, {
|
|
177
177
|
name: 'resign',
|
|
178
178
|
description: 'resign build folder to dist/rpk',
|
|
179
|
-
|
|
179
|
+
paramList: [{
|
|
180
|
+
name: 'source',
|
|
181
|
+
description: 'build folder to resign',
|
|
182
|
+
defaultValue: 'build',
|
|
183
|
+
type: 'string'
|
|
184
|
+
}, {
|
|
185
|
+
name: 'output',
|
|
186
|
+
description: 'output folder for the resigned build',
|
|
187
|
+
defaultValue: 'dist',
|
|
188
|
+
type: 'string'
|
|
189
|
+
}, {
|
|
190
|
+
name: 'sign',
|
|
191
|
+
description: 'sign folder for the resigned build',
|
|
192
|
+
defaultValue: 'sign',
|
|
193
|
+
type: 'string'
|
|
194
|
+
}],
|
|
195
|
+
action: option => {
|
|
196
|
+
const {
|
|
197
|
+
source,
|
|
198
|
+
output,
|
|
199
|
+
sign
|
|
200
|
+
} = option;
|
|
180
201
|
const projectPath = process.cwd();
|
|
181
202
|
const param = {
|
|
182
|
-
signRoot:
|
|
203
|
+
signRoot: sign,
|
|
183
204
|
mode: _aiotpack.CompileMode.DEVELOPMENT,
|
|
184
|
-
outputPath:
|
|
185
|
-
releasePath:
|
|
205
|
+
outputPath: source,
|
|
206
|
+
releasePath: output,
|
|
186
207
|
projectPath,
|
|
187
208
|
buildNameFormat: _BuildNameFormatType.default.DEFAULT,
|
|
188
|
-
sourceRoot:
|
|
209
|
+
sourceRoot: source
|
|
189
210
|
};
|
|
190
|
-
return _ZipUtil.default.createRpk(projectPath
|
|
211
|
+
return _ZipUtil.default.createRpk(_path.default.join(projectPath, source), param);
|
|
191
212
|
}
|
|
192
213
|
}, {
|
|
193
214
|
name: 'jsc',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiot-toolkit",
|
|
3
|
-
"version": "2.0.6-beta.
|
|
3
|
+
"version": "2.0.6-beta.23",
|
|
4
4
|
"description": "Tools for creating, developing, and packaging aiot applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiot"
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"test": "node ./__tests__/aiot-toolkit.test.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aiot-toolkit/aiotpack": "2.0.6-beta.
|
|
26
|
-
"@aiot-toolkit/commander": "2.0.6-beta.
|
|
27
|
-
"@aiot-toolkit/emulator": "2.0.6-beta.
|
|
28
|
-
"@aiot-toolkit/shared-utils": "2.0.6-beta.
|
|
25
|
+
"@aiot-toolkit/aiotpack": "2.0.6-beta.23",
|
|
26
|
+
"@aiot-toolkit/commander": "2.0.6-beta.23",
|
|
27
|
+
"@aiot-toolkit/emulator": "2.0.6-beta.23",
|
|
28
|
+
"@aiot-toolkit/shared-utils": "2.0.6-beta.23",
|
|
29
29
|
"@inquirer/prompts": "^5.3.0",
|
|
30
30
|
"@miwt/adb": "^0.9.0",
|
|
31
31
|
"axios": "^1.7.4",
|
|
32
|
-
"file-lane": "2.0.6-beta.
|
|
32
|
+
"file-lane": "2.0.6-beta.23",
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"koa-router": "^13.0.1",
|
|
35
35
|
"lodash": "^4.17.21",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@types/qr-image": "^3.2.9",
|
|
44
44
|
"@types/semver": "^7.5.8"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9de83750ab05714a26c3f23c22619605ebea720b"
|
|
47
47
|
}
|