@taole/deploy-helper 1.1.0 → 1.1.1
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/index.mjs +1 -1
- package/lib/lightDeploy.mjs +9 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -289,7 +289,7 @@ async function main() {
|
|
|
289
289
|
|
|
290
290
|
const needHandleLight = config.type === "ddfe:cdn";
|
|
291
291
|
if(needHandleLight){
|
|
292
|
-
await lightDeploy(config, mode);
|
|
292
|
+
await lightDeploy(config, mode, version);
|
|
293
293
|
}
|
|
294
294
|
const needHandleAssets = config.assets && config.assets.dest;
|
|
295
295
|
|
package/lib/lightDeploy.mjs
CHANGED
|
@@ -48,8 +48,14 @@ async function apiCdnUpload({ distZipPath, prefix, mode, includeHtml, entryHtmlM
|
|
|
48
48
|
return resJson;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
/**
|
|
52
|
+
* light模式部署
|
|
53
|
+
* @param {*} config 配置
|
|
54
|
+
* @param {*} mode 部署环境
|
|
55
|
+
* @param {*} version 版本号
|
|
56
|
+
*/
|
|
57
|
+
export async function lightDeploy(config, mode, version) {
|
|
58
|
+
log(`light模式, 开始部署`, { mode, prefix: config.prefix, includeHtml: config.includeHtml, version });
|
|
53
59
|
|
|
54
60
|
if (!mode || (mode !== "test" && mode !== "prod")) {
|
|
55
61
|
throw new Error("部署环境无效,仅支持 test 或 prod");
|
|
@@ -91,6 +97,7 @@ export async function lightDeploy(config, mode) {
|
|
|
91
97
|
includeHtml,
|
|
92
98
|
entryHtmlMap: config.entryHtmlMap,
|
|
93
99
|
type: config.cdnType,
|
|
100
|
+
version,
|
|
94
101
|
},
|
|
95
102
|
userCache
|
|
96
103
|
);
|