cloudcc-cli 1.9.3 → 1.9.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,17 @@
1
+ # ReleaseV1.9.5
2
+ #### Release Date: 2025-3-11
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * plugin add component file
7
+
8
+ # ReleaseV1.9.4
9
+ #### Release Date: 2025-3-7
10
+ #### Release Scope: Full
11
+ #### Release Content
12
+ * Optimization
13
+ * upload class template
14
+
1
15
  # ReleaseV1.9.3
2
16
  #### Release Date: 2025-2-28
3
17
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
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
@@ -7,11 +7,10 @@ async function get(path, type, object) {
7
7
  let res = [];
8
8
  if ("fields" === type) {
9
9
  object = JSON.parse(decodeURI(object))
10
- let fieldsPromises = postNormal(global.setupSvc + "/api/fieldSetup/queryField", { prefix: object.objprefix })
11
- const fieldsResults = await Promise.all([fieldsPromises])
10
+ let fieldsResults = await postNormal(global.setupSvc + "/api/fieldSetup/queryField", { prefix: object.objprefix })
12
11
  res = {
13
12
  ...object,
14
- fields: fieldsResults[0].data.stdFields.map((field) => {
13
+ fields: fieldsResults.data.stdFields.map((field) => {
15
14
  return {
16
15
  fieldname: field.labelName,
17
16
  apiname: field.schemefieldName
@@ -9,12 +9,16 @@ const chalk = require("chalk")
9
9
  async function create(name) {
10
10
  const temp = `<template>
11
11
  <div class="cc-container">
12
- <div>Hello</div>
12
+ <HelloWorld />
13
13
  </div>
14
14
  </template>
15
15
 
16
16
  <script>
17
+ import HelloWorld from "./components/HelloWorld.vue";
17
18
  export default {
19
+ components: {
20
+ HelloWorld,
21
+ },
18
22
  data() {
19
23
  return {
20
24
  componentInfo: {
@@ -37,13 +41,28 @@ data() {
37
41
  background: goldenrod;
38
42
  }
39
43
  </style>`
44
+
45
+ const temp1 = `
46
+ <template>
47
+ <div>Hello world</div>
48
+ </template>
49
+
50
+ <script>
51
+ export default {};
52
+ </script>
53
+
54
+ <style lang="scss" scoped>
55
+ </style>
56
+ `
40
57
  let res = await checkUpdate();
41
58
  if (!res) {
42
59
 
43
- const pluginPath = path.join(process.cwd(), "plugins/" + name);
60
+ const pluginPath = path.join(process.cwd(), "plugins", name);
44
61
  try {
45
62
  fs.mkdirSync(pluginPath, { recursive: true })
46
63
  fs.writeFileSync(path.join(pluginPath, name + ".vue"), temp)
64
+ fs.mkdirSync(path.join(pluginPath, "components"), { recursive: true })
65
+ fs.writeFileSync(path.join(pluginPath, "components", "HelloWorld.vue"), temp1)
47
66
  fs.writeFileSync(path.join(pluginPath, "config.json"), `{"component":"component-${name}","compName":"compName-${name}","compDesc":"Component description information"}`)
48
67
  console.log()
49
68
  console.log(chalk.green("Successfully Created:" + name))