cloudcc-cli 1.8.1 → 1.8.2

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,11 @@
1
+ # ReleaseV1.8.2
2
+ #### Release Date: 2025-1-21
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * Create a project and stop checking the version upgrade。
7
+ * Add custom object search
8
+
1
9
  # ReleaseV1.8.1
2
10
  #### Release Date: 2025-1-21
3
11
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
package/src/object/get.js CHANGED
@@ -4,9 +4,16 @@ const { postNormal } = require("../../utils/http")
4
4
 
5
5
  async function get(path) {
6
6
  if (await getBusToken(path)) {
7
- let res = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
8
- console.log(JSON.stringify(res.data))
9
- return res.data
7
+ let res = await postNormal(global.setupSvc + "/api/trigger/newobjtrigger")
8
+ res = res.data.targetObjList.map((item) => {
9
+ return {
10
+ id: item.id,
11
+ objname: item.label,
12
+ objprefix: item.schemetable_name
13
+ }
14
+ })
15
+ console.log(JSON.stringify(res))
16
+ return res
10
17
  }
11
18
  }
12
19
 
@@ -4,7 +4,6 @@ const memFs = require("mem-fs")
4
4
  const memFsEditor = require("mem-fs-editor")
5
5
  const fs = require("fs")
6
6
  const path = require("path")
7
- const { checkUpdate } = require("../../utils/checkVersion")
8
7
 
9
8
  class Creator {
10
9
  constructor() {
@@ -13,31 +12,28 @@ class Creator {
13
12
  name: "",
14
13
  description: ""
15
14
  }
16
-
15
+
17
16
  this.rootPath = path.resolve(__dirname, "../../");
18
-
17
+
19
18
  this.tplDirPath = path.join(this.rootPath, "template");
20
19
  }
21
-
20
+
22
21
  async init(name) {
23
- let res = await checkUpdate();
24
- if (!res) {
25
- console.log()
26
- console.log(chalk.green('Welcome CloudCC-CLI'));
27
- console.log()
28
- if (!name) {
29
- this.ask().then(answers => {
30
- this.options = Object.assign({}, this.options, answers);
31
- console.log(this.options);
32
- this.write();
33
- })
34
- } else {
35
- this.options = { name }
22
+ console.log()
23
+ console.log(chalk.green('Welcome CloudCC-CLI'));
24
+ console.log()
25
+ if (!name) {
26
+ this.ask().then(answers => {
27
+ this.options = Object.assign({}, this.options, answers);
28
+ console.log(this.options);
36
29
  this.write();
37
- }
30
+ })
31
+ } else {
32
+ this.options = { name }
33
+ this.write();
38
34
  }
39
35
  }
40
-
36
+
41
37
  ask() {
42
38
  const prompt = [];
43
39
 
@@ -59,7 +55,7 @@ class Creator {
59
55
  });
60
56
  return inquirer.prompt(prompt)
61
57
  }
62
-
58
+
63
59
  write() {
64
60
  console.log();
65
61
  console.log(chalk.green("Starting construction, please wait"));
@@ -4,7 +4,6 @@ const memFs = require("mem-fs")
4
4
  const memFsEditor = require("mem-fs-editor")
5
5
  const fs = require("fs")
6
6
  const path = require("path")
7
- const { checkUpdate } = require("../../utils/checkVersion")
8
7
  const tplBuilder = require("../../template/index");
9
8
  const execSync = require('child_process').execSync;
10
9
 
@@ -15,31 +14,28 @@ class Creator {
15
14
  name: "",
16
15
  description: ""
17
16
  }
18
-
17
+
19
18
  this.rootPath = path.resolve(__dirname, "../../");
20
-
19
+
21
20
  this.tplDirPath = path.join(this.rootPath, "template");
22
21
  }
23
-
22
+
24
23
  async init(name) {
25
- let res = await checkUpdate();
26
- if (!res) {
27
- console.log()
28
- console.log(chalk.green('Welcome CloudCC-CLI'));
29
- console.log()
30
- if (!name) {
31
- this.ask().then(answers => {
32
- this.options = Object.assign({}, this.options, answers);
33
- console.log(this.options);
34
- this.write();
35
- })
36
- } else {
37
- this.options = { name }
24
+ console.log()
25
+ console.log(chalk.green('Welcome CloudCC-CLI'));
26
+ console.log()
27
+ if (!name) {
28
+ this.ask().then(answers => {
29
+ this.options = Object.assign({}, this.options, answers);
30
+ console.log(this.options);
38
31
  this.write();
39
- }
32
+ })
33
+ } else {
34
+ this.options = { name }
35
+ this.write();
40
36
  }
41
37
  }
42
-
38
+
43
39
  ask() {
44
40
  const prompt = [];
45
41
 
@@ -61,7 +57,7 @@ class Creator {
61
57
  });
62
58
  return inquirer.prompt(prompt)
63
59
  }
64
-
60
+
65
61
  write() {
66
62
  console.log();
67
63
  console.log(chalk.green("Starting construction, please wait"));
@@ -8,7 +8,7 @@ async function create(argvs) {
8
8
  if (!res) {
9
9
  let body = JSON.parse(decodeURI(argvs[2]))
10
10
  const baseTriggersPath = path.join(process.cwd(), "triggers");
11
- const objectFolderPath = path.join(baseTriggersPath, body.targetObjectId);
11
+ const objectFolderPath = path.join(baseTriggersPath, `${body.schemetableName.toLowerCase()}`);
12
12
  const triggersPath = path.join(objectFolderPath, body.name);
13
13
 
14
14
  try {