cloudcc-cli 1.4.0 → 1.4.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/README.md CHANGED
@@ -1,3 +1,12 @@
1
+ # ReleaseV1.4.1
2
+ #### 发布日期:2023-5-11
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 迭代
6
+ * 组件发布地址改成动态配置。
7
+ * 升级marked依赖。
8
+ * 打包h5代码命令兼容mac系统。
9
+
1
10
  # ReleaseV1.4.0
2
11
  #### 发布日期:2023-4-13
3
12
  #### 发布范围:全量
package/bin/buildtag.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  const Creator = require("../src/buildTag.js");
4
4
 
package/bin/publishh5.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  const Publish = require("../src/publishProjectH5.js");
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -29,11 +29,10 @@
29
29
  "crypto-js": "^4.1.1",
30
30
  "dayjs": "^1.10.7",
31
31
  "inquirer": "^8.1.0",
32
- "marked": "^3.0.7",
33
- "md-to-html": "^1.0.2",
32
+ "marked": "^5.0.1",
34
33
  "mem-fs": "^2.2.1",
35
34
  "mem-fs-editor": "^9.0.1",
36
35
  "vue-custom-element": "^3.3.0",
37
36
  "vue-template-compiler": "^2.6.14"
38
37
  }
39
- }
38
+ }
@@ -171,7 +171,9 @@ class Builder {
171
171
  "category": obj.category,
172
172
  "belongOrgFlag": this.options.devConsoleConfig.belongOrgFlag || "custom" //belongOrgFlag: 所属单位标识,std:官方的组件(神州云动);custom:第三方的组件
173
173
  }
174
- let res = await post(this.options.devConsoleConfig.baseUrl + "/devconsole/custom/pc/1.0/post/insertCustomComp",
174
+ // 服务名
175
+ let devSvcDispatch = this.options.devConsoleConfig.devSvcDispatch || '/devconsole'
176
+ let res = await post(`${this.options.devConsoleConfig.baseUrl}${devSvcDispatch}/custom/pc/1.0/post/insertCustomComp`,
175
177
  body, header);
176
178
  if (res.returnCode == 200) {
177
179
  console.error(chalk.green(`发布成功!`));
@@ -112,7 +112,12 @@ class Publish {
112
112
  console.log(chalk.green('开始编译,请稍后...'));
113
113
  console.log();
114
114
  let that = this;
115
- exec('cli.exe publish --platform h5 --project ' + projectConfig.name, (error, stdout, stderr) => {
115
+ // 当时mac系统时使用mac路径命令,当时window系统时,使用window命令路径
116
+ let path = "cli.exe"
117
+ if (process.platform === 'darwin') {
118
+ path = "/Applications/HBuilderX.app/Contents/MacOS/cli"
119
+ }
120
+ exec(`${path} publish --platform h5 --project ` + projectConfig.name, (error, stdout, stderr) => {
116
121
  if (error) {
117
122
  console.log('编译失败:', error);
118
123
  console.log(chalk.red('编译失败:' + stdout));
package/utils/md2html.js CHANGED
@@ -27,7 +27,7 @@ function watchFile(target) {
27
27
  function change(target = "README", outPath = "dist", outFile = "README") {
28
28
  //读取文件
29
29
  const data = fs.readFileSync(target + ".md", 'utf-8')
30
- const html = marked(data); //将md内容转为html内容
30
+ const html = marked.parse(data); //将md内容转为html内容
31
31
  let template = createTemplate();
32
32
  template = template.replace('{{{content}}}', html); //替换html内容占位标记
33
33