cloudcc-cli 1.6.0 → 1.6.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.
Files changed (50) hide show
  1. package/README.md +1147 -1128
  2. package/bin/cc.js +48 -48
  3. package/bin/plugin.js +5 -5
  4. package/bin/project.js +5 -5
  5. package/package.json +34 -34
  6. package/src/classes/create.js +43 -43
  7. package/src/classes/index.js +8 -8
  8. package/src/classes/publish.js +48 -47
  9. package/src/config/get.js +22 -0
  10. package/src/config/index.js +8 -0
  11. package/src/config/use.js +16 -0
  12. package/src/object/get.js +16 -0
  13. package/src/object/index.js +7 -0
  14. package/src/plugin/create.js +80 -80
  15. package/src/plugin/create1.js +66 -67
  16. package/src/plugin/index.js +8 -8
  17. package/src/plugin/publish.js +298 -305
  18. package/src/plugin/publish1.js +286 -293
  19. package/src/project/create.js +89 -89
  20. package/src/project/create1.js +111 -94
  21. package/src/project/index.js +7 -7
  22. package/src/recordType/get.js +16 -0
  23. package/src/recordType/index.js +7 -0
  24. package/src/script/create.js +33 -0
  25. package/src/script/index.js +8 -0
  26. package/src/script/publish.js +69 -0
  27. package/src/timer/create.js +29 -29
  28. package/src/timer/index.js +8 -8
  29. package/src/timer/publish.js +47 -47
  30. package/src/token/get.js +13 -0
  31. package/src/token/index.js +7 -0
  32. package/src/triggers/create.js +35 -35
  33. package/src/triggers/index.js +8 -8
  34. package/src/triggers/publish.js +51 -51
  35. package/template/Appvue +29 -29
  36. package/template/babelconfigjs +5 -5
  37. package/template/cloudcc-cli.configjs +1 -0
  38. package/template/demojava +14 -14
  39. package/template/gitignore +11 -0
  40. package/template/index.js +57 -52
  41. package/template/indexhtml +21 -21
  42. package/template/indexvue +34 -34
  43. package/template/javaconfigjson +2 -2
  44. package/template/mainjs +13 -13
  45. package/template/package-lockjson +12115 -12115
  46. package/template/packagejson +42 -46
  47. package/template/vueconfigjs +26 -26
  48. package/utils/checkVersion.js +105 -105
  49. package/utils/http.js +122 -122
  50. package/utils/utils.js +54 -44
@@ -1,67 +1,66 @@
1
- // 检查cli版本更新功能
2
- const { checkUpdate } = require("../../utils/checkVersion")
3
- const fs = require("fs");
4
- const path = require("path")
5
- const chalk = require("chalk")
6
-
7
- const temp = `<template>
8
- <div class="cc-container">
9
- <div>Hello CloudCC</div>
10
- <div>
11
- <a href="https://cloudccone.feishu.cn/wiki/JZ7CwcRfriU8taknCKCcwKEmncd">
12
- 开发者文档</a
13
- >
14
- </div>
15
- </div>
16
- </template>
17
-
18
- <script>
19
- export default {
20
- data() {
21
- return {
22
- componentInfo: {
23
- // 组件唯一标识,全局唯一
24
- component: "cloudcc-demo-01",
25
- // 组件名称,在页面编辑器显示的名字
26
- compName: "cloudcc-demo-01",
27
- // 组件描述信息
28
- compDesc: "组件描述信息",
29
- },
30
- isLock: false,
31
- };
32
- },
33
- };
34
- </script>
35
- <style lang="scss" scoped>
36
- .cc-container {
37
- text-align: center;
38
- padding: 8px;
39
- background: goldenrod;
40
- }
41
- </style>`
42
-
43
-
44
-
45
- /**
46
- * 创建文件
47
- * @param {string} name 文件名称
48
- */
49
- async function create(name) {
50
- let res = await checkUpdate();
51
- if (!res) {
52
- const pluginPath = path.join(process.cwd(), "plugin/" + name);
53
- try {
54
- fs.mkdirSync(pluginPath, { recursive: true })
55
- fs.writeFileSync(path.join(pluginPath, name + ".vue"), temp)
56
- fs.writeFileSync(path.join(pluginPath, "config.json"), `{"name":"${name}"}`)
57
- console.log()
58
- console.log(chalk.green("创建成功:" + name))
59
- console.log()
60
- } catch (e) {
61
- console.log()
62
- console.log(chalk.red("创建失败:" + e))
63
- console.log()
64
- }
65
- }
66
- }
67
- module.exports = create;
1
+ // 检查cli版本更新功能
2
+ const { checkUpdate } = require("../../utils/checkVersion")
3
+ const fs = require("fs");
4
+ const path = require("path")
5
+ const chalk = require("chalk")
6
+
7
+
8
+ /**
9
+ * 创建文件
10
+ * @param {string} name 文件名称
11
+ */
12
+ async function create(name) {
13
+ const temp = `<template>
14
+ <div class="cc-container">
15
+ <div>Hello CloudCC</div>
16
+ <div>
17
+ <a href="https://cloudccone.feishu.cn/wiki/JZ7CwcRfriU8taknCKCcwKEmncd">
18
+ 开发者文档</a
19
+ >
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ data() {
27
+ return {
28
+ componentInfo: {
29
+ // 组件唯一标识,全局唯一
30
+ component: "${name}",
31
+ // 组件名称,在页面编辑器显示的名字
32
+ compName: "${name}",
33
+ // 组件描述信息
34
+ compDesc: "组件描述信息",
35
+ },
36
+ isLock: false,
37
+ };
38
+ },
39
+ };
40
+ </script>
41
+ <style lang="scss" scoped>
42
+ .cc-container {
43
+ text-align: center;
44
+ padding: 8px;
45
+ background: goldenrod;
46
+ }
47
+ </style>`
48
+ let res = await checkUpdate();
49
+ if (!res) {
50
+
51
+ const pluginPath = path.join(process.cwd(), "plugin/" + name);
52
+ try {
53
+ fs.mkdirSync(pluginPath, { recursive: true })
54
+ fs.writeFileSync(path.join(pluginPath, name + ".vue"), temp)
55
+ fs.writeFileSync(path.join(pluginPath, "config.json"), `{"name":"${name}"}`)
56
+ console.log()
57
+ console.log(chalk.green("创建成功:" + name))
58
+ console.log()
59
+ } catch (e) {
60
+ console.log()
61
+ console.log(chalk.red("创建失败:" + e))
62
+ console.log()
63
+ }
64
+ }
65
+ }
66
+ module.exports = create;
@@ -1,8 +1,8 @@
1
- const cc = {}
2
- cc.create = require("./create1")
3
- cc.publish = require("./publish1")
4
- function Plugin(action, name) {
5
- cc[action](name)
6
- }
7
-
8
- module.exports = Plugin;
1
+ const cc = {}
2
+ cc.create = require("./create1")
3
+ cc.publish = require("./publish1")
4
+ function Plugin(action, argvs) {
5
+ cc[action](argvs[2])
6
+ }
7
+
8
+ module.exports = Plugin;