@aiot-toolkit/aiotpack 2.0.4-beta.4 → 2.0.4-beta.6
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.
|
@@ -72,9 +72,10 @@ declare class ZipUtil {
|
|
|
72
72
|
*
|
|
73
73
|
* @param dist 打包后的文件目录的绝对路径
|
|
74
74
|
* @param param 打包参数
|
|
75
|
+
* @param manifest manifest.json内容的json对象
|
|
75
76
|
* @returns
|
|
76
77
|
*/
|
|
77
|
-
static getSortedFiles(dist: string, param: IJavascriptCompileOption,
|
|
78
|
+
static getSortedFiles(dist: string, param: IJavascriptCompileOption, manifest: IManifest): string[];
|
|
78
79
|
/**
|
|
79
80
|
* 根据 **固定规则**、**manifest.json入口配置**,获取压缩文件时使用的排序规则
|
|
80
81
|
*
|
|
@@ -117,7 +117,7 @@ class ZipUtil {
|
|
|
117
117
|
} = param;
|
|
118
118
|
const filePath = _path.default.join(projectPath, releasePath, fileName);
|
|
119
119
|
_fsExtra.default.outputFileSync(filePath, buffer);
|
|
120
|
-
_sharedUtils.ColorConsole.success(`Project build and generate files:${
|
|
120
|
+
_sharedUtils.ColorConsole.success(`Project build and generate files:${filePath}`);
|
|
121
121
|
return fileName;
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -196,10 +196,11 @@ class ZipUtil {
|
|
|
196
196
|
*
|
|
197
197
|
* @param dist 打包后的文件目录的绝对路径
|
|
198
198
|
* @param param 打包参数
|
|
199
|
+
* @param manifest manifest.json内容的json对象
|
|
199
200
|
* @returns
|
|
200
201
|
*/
|
|
201
|
-
static getSortedFiles(dist, param,
|
|
202
|
-
const priorities = this.getPriorities(
|
|
202
|
+
static getSortedFiles(dist, param, manifest) {
|
|
203
|
+
const priorities = this.getPriorities(manifest);
|
|
203
204
|
const getFileIndex = file => {
|
|
204
205
|
const result = priorities.findIndex(item => {
|
|
205
206
|
if (typeof item === 'string') {
|
|
@@ -234,11 +235,11 @@ class ZipUtil {
|
|
|
234
235
|
* @param param
|
|
235
236
|
* @returns
|
|
236
237
|
*/
|
|
237
|
-
static getPriorities(
|
|
238
|
+
static getPriorities(manifest) {
|
|
238
239
|
const entrySkFiles = []; // todo
|
|
239
240
|
const {
|
|
240
241
|
entry
|
|
241
|
-
} =
|
|
242
|
+
} = manifest.router;
|
|
242
243
|
const result = ['META-INF/CERT',
|
|
243
244
|
// 多语言配置文件要在 manifest 之前
|
|
244
245
|
/^i18n\/.+\.json$/i,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/aiotpack",
|
|
3
|
-
"version": "2.0.4-beta.
|
|
3
|
+
"version": "2.0.4-beta.6",
|
|
4
4
|
"description": "The process tool for packaging aiot projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiotpack"
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"test": "node ./__tests__/aiotpack.test.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aiot-toolkit/generator": "2.0.4-beta.
|
|
23
|
-
"@aiot-toolkit/parser": "2.0.4-beta.
|
|
24
|
-
"@aiot-toolkit/shared-utils": "2.0.4-beta.
|
|
22
|
+
"@aiot-toolkit/generator": "2.0.4-beta.6",
|
|
23
|
+
"@aiot-toolkit/parser": "2.0.4-beta.6",
|
|
24
|
+
"@aiot-toolkit/shared-utils": "2.0.4-beta.6",
|
|
25
25
|
"@hap-toolkit/aaptjs": "^2.0.0",
|
|
26
26
|
"@rspack/core": "^1.1.8",
|
|
27
27
|
"aiot-parse5": "^1.0.0",
|
|
28
28
|
"archiver": "^7.0.1",
|
|
29
29
|
"babel-loader": "^9.1.3",
|
|
30
30
|
"fast-glob": "^3.3.2",
|
|
31
|
-
"file-lane": "2.0.4-beta.
|
|
31
|
+
"file-lane": "2.0.4-beta.6",
|
|
32
32
|
"file-loader": "^6.2.0",
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"jsrsasign": "^11.1.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@types/jsrsasign": "^10.5.12",
|
|
47
47
|
"@types/webpack-sources": "^3.2.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "d2a2c1bfbe4351fe244f79852884fe0d4332946d"
|
|
50
50
|
}
|