cloudcc-cli 2.0.4 → 2.0.5

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
+ # ReleaseV2.0.5
2
+ #### Release Date: 2025-5-9
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * Optimize the request header and ensure that the source field is included to facilitate source tracking
7
+
1
8
  # ReleaseV2.0.4
2
9
  #### Release Date: 2025-4-8
3
10
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -268,6 +268,7 @@ class Builder {
268
268
  }
269
269
 
270
270
  let devSvcDispatch = this.options.devConsoleConfig.devSvcDispatch || '/devconsole'
271
+ header.source = this.options.devConsoleConfig.source || "cloudcc_cli"
271
272
  let res = await post(`${this.options.devConsoleConfig.baseUrl || BaseUrl}${devSvcDispatch}/custom/pc/1.0/post/insertCustomComp`,
272
273
  body, header);
273
274
  if (res.returnCode == 200) {
package/utils/http.js CHANGED
@@ -49,7 +49,7 @@ service.interceptors.response.use(
49
49
  )
50
50
  const formateData = (data, header) => {
51
51
  if (header) {
52
- Object.assign(header, { source: "cloudcc_cli" })
52
+ Object.assign({ source: "cloudcc_cli" }, header)
53
53
  }
54
54
  return {
55
55
  head: {
package/utils/utils.js CHANGED
@@ -94,7 +94,7 @@ async function getBusToken(config) {
94
94
  process.exit(1)
95
95
  }
96
96
  } catch (error) {
97
- console.error(chalk.red(`Get OpenAPI Token Failed:`, error.message));
97
+ console.error(chalk.red(`Get OpenAPI Token Error:`, error.message));
98
98
  process.exit(1)
99
99
  }
100
100
  }