cloudcc-cli 1.5.1 → 1.5.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,19 @@
1
+ # ReleaseV1.5.3
2
+ #### 发布日期:2023-11-21
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 迭代
6
+ * 关闭scoped检查自动添加scoped。
7
+ * 增加style无scoped提示。
8
+
9
+ # ReleaseV1.5.2
10
+ #### 发布日期:2023-10-17
11
+ #### 发布范围:全量
12
+ #### 发布内容
13
+ * 迭代
14
+ * 创建模板项目去掉安装依赖和打开vs code操作
15
+ * 更改获取版本号的源地址,使用阿里源获取版本信息
16
+
1
17
  # ReleaseV1.5.1
2
18
  #### 发布日期:2023-09-20
3
19
  #### 发布范围:全量
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -26,7 +26,6 @@ class Builder {
26
26
  if (!res) {
27
27
  this.options.devConsoleConfig = this.getPackageJson();
28
28
  let config = this.options.devConsoleConfig
29
- // await this.getSecretKey(config.username)
30
29
  // 如果不是私有化部署,那么需要获取token
31
30
  if ("private" != this.options.devConsoleConfig.version) { // private私有化
32
31
  config = { "accessToken": await this.getToken(config) };
@@ -75,21 +74,6 @@ class Builder {
75
74
  const packageJson = JSON.parse(fs.readFileSync("package.json", 'utf8'));
76
75
  return packageJson.devConsoleConfig; // cloudcc-plugin 中的 devConsoleConfig
77
76
  }
78
-
79
- /**
80
- * 通过用户名获取密钥
81
- * @param {string} username 用户名
82
- */
83
- async getSecretKey(username) {
84
- let res = await axios.post(this.options.devConsoleConfig.baseUrl || BaseUrl + "/sysconfig/auth/secretkey/get", { username }, {
85
- timeout: 60000,
86
- headers: {
87
- 'Content-Type': 'application/x-www-form-urlencoded',
88
- },
89
- })
90
-
91
- console.log("res", JSON.stringify(res))
92
- }
93
77
  /**
94
78
  * 请求用户token
95
79
  * @param {用户信息} devConsoleConfig
@@ -113,7 +97,10 @@ class Builder {
113
97
  let vueData = vueContent + ""
114
98
  // 添加scoped限制样式污染
115
99
  if (!vueContent.includes("scoped")) {
116
- vueData = vueData.replace("<style", "<style scoped")
100
+ // vueData = vueData.replace("<style", "<style scoped ")
101
+ console.log()
102
+ console.log(chalk.yellow("警告:style中缺少scoped属性,可能会造成样式全局污染,建议修复。"));
103
+ console.log()
117
104
  }
118
105
  // 去除空格
119
106
  // vueData = vueData.replace(/\ +/g, "")
@@ -68,12 +68,12 @@ class Creator {
68
68
  console.log(chalk.green("开始构建,请稍后"));
69
69
  const tplBuilder = require("../template/index");
70
70
  tplBuilder(this, this.options, () => {
71
+ // console.log();
72
+ // console.log(chalk.green('安装依赖'));
73
+ // let os = process.platform
74
+ // exec(`cd ${this.options.name} && ${'darwin' == os ? 'sudo' : ''} npm install --registry http://registry.npmmirror.com && code . `)
71
75
  console.log();
72
- console.log(chalk.green('安装依赖'));
73
- let os = process.platform
74
- exec(`cd ${this.options.name} && ${'darwin' == os ? 'sudo' : ''} npm install --registry http://registry.npmmirror.com && code . `)
75
- console.log();
76
- console.log(chalk.green('构建完成'))
76
+ console.log(chalk.green('构建完成,运行前请安装依赖'))
77
77
  })
78
78
  }
79
79
 
@@ -12,16 +12,16 @@ function checkNpmVersion() {
12
12
  let onlineVersionNum
13
13
  let onlineVersion = '0.0.1'
14
14
 
15
- // 从npm官网获取版本号
16
- // onlineVersion = exec(`npm view cloudcc-cli version --registry http://registry.npmjs.org`)
17
- // onlineVersion = onlineVersion.toString("utf8").trim();
15
+ // 从阿里源获取版本号
16
+ onlineVersion = exec(`npm view cloudcc-cli version --registry http://registry.npmmirror.com`)
17
+ onlineVersion = onlineVersion.toString("utf8").trim();
18
18
 
19
19
  // 从阿里源获取版本号
20
- try {
21
- onlineVersion = exec(`curl -s https://npmmirror.com/api/info?pkgName=cloudcc-cli`)
22
- onlineVersion = JSON.parse(onlineVersion.toString("utf8").trim()).data['dist-tags'].latest
23
- } catch (e) {
24
- }
20
+ // try {
21
+ // onlineVersion = exec(`curl -s https://npmmirror.com/api/info?pkgName=cloudcc-cli`)
22
+ // onlineVersion = JSON.parse(onlineVersion.toString("utf8").trim()).data['dist-tags'].latest
23
+ // } catch (e) {
24
+ // }
25
25
  onlineVersionNum = Number(onlineVersion.replace(/\./g, ""));
26
26
 
27
27
  console.log(chalk.green(