cloudcc-cli 1.2.0 → 1.2.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,10 @@
1
+ # ReleaseV1.2.1
2
+ #### 发布日期:2022-9-9
3
+ #### 发布范围:全量
4
+ #### 发布内容
5
+ * 修复
6
+ * 添加cloudcc-ccdk
7
+
1
8
  # ReleaseV1.2.0
2
9
  #### 发布日期:2022-8-24
3
10
  #### 发布范围:全量
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.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -25,7 +25,8 @@ class Creator {
25
25
  let res = await checkUpdate();
26
26
  if (!res) {
27
27
  console.log()
28
- console.log(chalk.green('欢迎使用Cloudcc-CLI'));
28
+ console.log(chalk.green('欢迎使用CloudCC-CLI'));
29
+ console.log()
29
30
  this.ask().then(answers => {
30
31
  this.options = Object.assign({}, this.options, answers);
31
32
  console.log(this.options);
@@ -49,7 +49,8 @@ class Publish {
49
49
  async init() {
50
50
  // 检查cli版本,提示用户更新:false:不更新,true:更新
51
51
  // let update = false
52
- let update = await checkUpdate();
52
+ let update = false;
53
+ // let update = await checkUpdate();
53
54
  if (!update) {
54
55
  // 1:版本发布信息,包含发布版本类型信息
55
56
  let condition = {};
@@ -19,7 +19,7 @@ const { notifyFeishu, notifyDingDing } = require("../utils/notifyIM")
19
19
  // 时间库
20
20
  const dayjs = require("dayjs")
21
21
  /**
22
- * 项目打包发布脚本
22
+ * H5项目打包发布脚本
23
23
  */
24
24
  class Publish {
25
25
  constructor() {
@@ -111,6 +111,7 @@ class Publish {
111
111
  console.log();
112
112
  // 打包命令
113
113
  try {
114
+ // /Applications/HBuilderX.app/Contents/MacOS/cli macos路径
114
115
  exec('cli.exe publish --platform h5 --project ' + projectConfig.name);
115
116
  console.log(chalk.green('编译成功!'));
116
117
  console.log();
package/template/httpjs CHANGED
@@ -1,6 +1,6 @@
1
- import VueCookies from "vue-cookies";
2
1
  import axios from 'axios'
3
2
  import packageJson from '../package.json'
3
+ import * as CCDK from "cloudcc-ccdk/lib/ccdk.min.js";
4
4
  const service = axios.create({
5
5
  timeout: 60000, // request timeout
6
6
  headers: {
@@ -8,10 +8,10 @@ const service = axios.create({
8
8
  },
9
9
  })
10
10
 
11
- // request interceptor
11
+ // request interceptor
12
12
  service.interceptors.request.use(
13
13
  config => {
14
- config.headers.accessToken = VueCookies.get("JSESSIONID")
14
+ config.headers.accessToken = CCDK.CCToken.getToken()
15
15
  return config
16
16
  },
17
17
  error => {
@@ -39,7 +39,7 @@ const formateData = data => {
39
39
  head: {
40
40
  appType: packageJson.name,
41
41
  appVersion: packageJson.version,
42
- accessToken: VueCookies.get("JSESSIONID")
42
+ accessToken: CCDK.CCToken.getToken()
43
43
  },
44
44
  body: {
45
45
  ...data
package/template/index.js CHANGED
@@ -24,6 +24,10 @@ module.exports = function (creator, options, callback) {
24
24
  name, description
25
25
  })
26
26
 
27
+ creator.copyTpl('package-lockjson', path.join(projectPath, "package-lock.json"), {
28
+ name, description
29
+ })
30
+
27
31
  creator.copyTpl('vueconfigjs', path.join(projectPath, "vue.config.js"))
28
32
 
29
33
  creator.copyTpl('babelconfigjs', path.join(projectPath, "babel.config.js"))