cloudcc-cli 1.1.0 → 1.1.3

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,3 +1,24 @@
1
+ # ReleaseV1.1.3
2
+ #### 发布日期:2022-6-23
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 修复
6
+ * 将版本信心写入env文件,供其他业务使用
7
+
8
+ # ReleaseV1.1.2
9
+ #### 发布日期:2022-6-21
10
+ #### 发布范围:全量
11
+ #### 发布内容
12
+ * 修复
13
+ * lightning-web的master分支开放生成readme文件
14
+
15
+ # ReleaseV1.1.1
16
+ #### 发布日期:2022-6-17
17
+ #### 发布范围:全量
18
+ #### 发布内容
19
+ * 修复
20
+ * 检查更新添加try、catch功能
21
+
1
22
  # ReleaseV1.1.0
2
23
  #### 发布日期:2022-6-9
3
24
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.3",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -33,4 +33,4 @@
33
33
  "vue-custom-element": "^3.3.0",
34
34
  "vue-template-compiler": "^2.6.14"
35
35
  }
36
- }
36
+ }
@@ -69,6 +69,12 @@ class Publish {
69
69
  console.log(chalk.green('待发布版本:' + version));
70
70
  console.log();
71
71
 
72
+ // 3.1:将版本信息写入env文件中,公其他业务使用
73
+ try {
74
+ fs.writeFileSync(".env.production", "VUE_APP_PROJECT_VERSION = " + version, 'utf-8')
75
+ } catch (error) {
76
+ }
77
+
72
78
  // 4:如果存在多语言配置,则更新多语言
73
79
  if (projectConfig.config && projectConfig.config["language-config"]) {
74
80
  // 询问是否更新多语言
@@ -91,14 +97,14 @@ class Publish {
91
97
  outPath = projectConfig.config["doc-path"];
92
98
  }
93
99
  // lightning的Release禁止生成Readme文档
94
- if (!(Object.is("CloudCC", projectConfig.name) && Object.is("Release", condition.type))) {
95
- try {
96
- // 设置readme文件位置
97
- change("README", outPath);
98
- } catch (error) {
99
- console.log(chalk.red("README写入异常:" + error))
100
- }
100
+ // if (!(Object.is("CloudCC", projectConfig.name) && Object.is("Release", condition.type))) {
101
+ try {
102
+ // 设置readme文件位置
103
+ change("README", outPath);
104
+ } catch (error) {
105
+ console.log(chalk.red("README写入异常:" + error))
101
106
  }
107
+ // }
102
108
 
103
109
  try {
104
110
  // 7:写入版本信息
@@ -57,7 +57,12 @@ function update(onlineVersion) {
57
57
  * 检查更新
58
58
  */
59
59
  async function checkUpdate() {
60
- let onlineVersion = checkNpmVersion();
60
+ let onlineVersion;
61
+ try {
62
+ onlineVersion = checkNpmVersion();
63
+ } catch (error) {
64
+ onlineVersion = false;
65
+ }
61
66
  if (onlineVersion) {
62
67
  let res = await askUpdate()
63
68
  if ("Yes" == res.update) {