cloudcc-cli 1.9.2 → 1.9.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,17 @@
1
+ # ReleaseV1.9.4
2
+ #### Release Date: 2025-3-7
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * upload class template
7
+
8
+ # ReleaseV1.9.3
9
+ #### Release Date: 2025-2-28
10
+ #### Release Scope: Full
11
+ #### Release Content
12
+ * Optimization
13
+ * Add the function of getting object field attributes
14
+
1
15
  # ReleaseV1.9.2
2
16
  #### Release Date: 2025-2-11
3
17
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -14,12 +14,16 @@ async function create(name) {
14
14
  `// @SOURCE_CONTENT_START
15
15
  public class ${name}{
16
16
  private UserInfo userInfo;
17
-
17
+ private CCService cs;
18
+
18
19
  public ${name}(UserInfo userInfo){
20
+ this(userInfo,new CCService(userInfo));
21
+ }
22
+ public ${name}(UserInfo userInfo,CCService cs){
19
23
  this.userInfo = userInfo;
24
+ this.cs=cs;
20
25
  }
21
26
 
22
-
23
27
  public String demo(String str){
24
28
  str = "demo";
25
29
  return str;
package/src/object/get.js CHANGED
@@ -2,10 +2,41 @@ const { getBusToken } = require("../../utils/utils")
2
2
  const { postNormal } = require("../../utils/http")
3
3
 
4
4
 
5
- async function get(path, type) {
5
+ async function get(path, type, object) {
6
6
  if (await getBusToken(path)) {
7
7
  let res = [];
8
- if ("trigger" === type) {
8
+ if ("fields" === type) {
9
+ object = JSON.parse(decodeURI(object))
10
+ let fieldsResults = await postNormal(global.setupSvc + "/api/fieldSetup/queryField", { prefix: object.objprefix })
11
+ res = {
12
+ ...object,
13
+ fields: fieldsResults.data.stdFields.map((field) => {
14
+ return {
15
+ fieldname: field.labelName,
16
+ apiname: field.schemefieldName
17
+ }
18
+ })
19
+ }
20
+ } else if ("chat" === type) {
21
+ //get chat object
22
+ let standardObjList = await postNormal(global.setupSvc + "/api/customObject/standardObjList");
23
+ standardObjList.data.map((item) => {
24
+ res.push({
25
+ apiname: item.label,
26
+ objname: item.objname,
27
+ objprefix: item.objprefix
28
+ })
29
+ })
30
+ //get custom object
31
+ let customObjList = await postNormal(global.setupSvc + "/api/customObject/list")
32
+ customObjList.data.objList.map((item) => {
33
+ res.push({
34
+ apiname: item.schemetableName,
35
+ objname: item.objLabel,
36
+ objprefix: item.prefix,
37
+ })
38
+ })
39
+ } else if ("trigger" === type) {
9
40
  //get trigger object
10
41
  let triggerObjList = await postNormal(global.setupSvc + "/api/trigger/newobjtrigger")
11
42
  triggerObjList.data.targetObjList.map((item) => {
@@ -1,7 +1,7 @@
1
1
  const cc = {}
2
2
  cc.get = require("./get")
3
3
  function main(action, argvs) {
4
- cc[action](argvs[2], argvs[3])
4
+ cc[action](argvs[2], argvs[3], argvs[4])
5
5
  }
6
6
 
7
7
  module.exports = main;