cloudcc-cli 2.0.3 → 2.0.4

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.4
2
+ #### Release Date: 2025-4-8
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * Optimize the plugin token acquisition logic to ensure that tokens are requested only in non-private versions
7
+
1
8
  # ReleaseV2.0.3
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.3",
3
+ "version": "2.0.4",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -27,7 +27,6 @@ class Builder {
27
27
  this.options.devConsoleConfig.CloudCCDev = "";
28
28
  this.options.pluginConfig = JSON.parse(fs.readFileSync(path.join(process.cwd(), `plugins/${name}/config.json`), 'utf8'));
29
29
  let config = this.options.devConsoleConfig
30
-
31
30
  if ("private" != this.options.devConsoleConfig.version) {
32
31
  config = { "accessToken": this.options.devConsoleConfig.pluginToken || await this.getToken(config) };
33
32
  }
@@ -275,7 +274,7 @@ class Builder {
275
274
  console.error(chalk.green(`Success!`));
276
275
  console.log();
277
276
  } else {
278
- console.error(chalk.red(`Publish Plugin Fail: ${res.returnInfo}`));
277
+ console.error(chalk.red(`Publish Plugin Fail: ${JSON.stringify(res)}`));
279
278
  console.log();
280
279
  }
281
280
  return res;
package/utils/utils.js CHANGED
@@ -128,7 +128,9 @@ async function getDevConsoleConfig(projectPath = process.cwd(), config) {
128
128
  config = await getBaseUrl(config);
129
129
  config = await getBusToken(config);
130
130
  config = await getSecretKey(config);
131
- config = await getPluginToken(config);
131
+ if ("private" != config.version) {
132
+ config = await getPluginToken(config);
133
+ }
132
134
  config.timestamp = Date.now();
133
135
  writeCache(projectPath, { [config.safetyMark || config.secretKey]: config })
134
136
  return config;