cloudcc-cli 1.9.4 → 1.9.6

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.6
2
+ #### Release Date: 2025-3-11
3
+ #### Release Scope: Full
4
+ #### Release Content
5
+ * Optimization
6
+ * change triggers function name
7
+
8
+ # ReleaseV1.9.5
9
+ #### Release Date: 2025-3-11
10
+ #### Release Scope: Full
11
+ #### Release Content
12
+ * Optimization
13
+ * plugin add component file
14
+
1
15
  # ReleaseV1.9.4
2
16
  #### Release Date: 2025-3-7
3
17
  #### Release Scope: Full
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcc-cli",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "cloudcc-cli",
5
5
  "keywords": [
6
6
  "cloudcc",
@@ -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))
@@ -17,7 +17,7 @@ async function create(argvs) {
17
17
  fs.mkdirSync(triggersPath, { recursive: true });
18
18
 
19
19
  const javaTmp = `public class ${body.name} extends CCTrigger {
20
- public void demo(){
20
+ public void ${body.name}(){
21
21
  // @SOURCE_CONTENT_START
22
22
  System.out.print("hello World");
23
23
  // @SOURCE_CONTENT_END