cloudcc-cli 1.7.2 → 1.7.3

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 (55) hide show
  1. package/README.md +1211 -1204
  2. package/bin/cc.js +49 -49
  3. package/bin/plugin.js +6 -6
  4. package/bin/project.js +6 -6
  5. package/core/core/ServiceResult.java +35 -35
  6. package/core/core/UserInfo.java +45 -45
  7. package/package.json +34 -34
  8. package/src/classes/create.js +40 -40
  9. package/src/classes/index.js +8 -8
  10. package/src/classes/publish.js +43 -43
  11. package/src/config/get.js +20 -20
  12. package/src/config/index.js +8 -8
  13. package/src/config/use.js +14 -14
  14. package/src/object/get.js +14 -14
  15. package/src/object/index.js +7 -7
  16. package/src/plugin/create.js +70 -70
  17. package/src/plugin/create1.js +58 -58
  18. package/src/plugin/index.js +8 -8
  19. package/src/plugin/publish.js +262 -262
  20. package/src/plugin/publish1.js +256 -256
  21. package/src/project/create.js +87 -87
  22. package/src/project/create1.js +109 -109
  23. package/src/project/index.js +7 -7
  24. package/src/recordType/get.js +13 -13
  25. package/src/recordType/index.js +7 -7
  26. package/src/script/create.js +29 -29
  27. package/src/script/index.js +8 -8
  28. package/src/script/publish.js +62 -62
  29. package/src/timer/create.js +26 -26
  30. package/src/timer/index.js +8 -8
  31. package/src/timer/publish.js +43 -43
  32. package/src/token/get.js +11 -11
  33. package/src/token/index.js +7 -7
  34. package/src/triggers/create.js +27 -27
  35. package/src/triggers/index.js +8 -8
  36. package/src/triggers/publish.js +48 -48
  37. package/template/Appvue +24 -24
  38. package/template/babelconfigjs +5 -5
  39. package/template/demojava +14 -14
  40. package/template/gitignore +11 -11
  41. package/template/index.js +57 -57
  42. package/template/indexhtml +21 -21
  43. package/template/indexvue +29 -29
  44. package/template/javaconfigjson +2 -2
  45. package/template/mainjs +13 -13
  46. package/template/package-lockjson +13952 -13952
  47. package/template/packagejson +42 -42
  48. package/template/vueconfigjs +21 -21
  49. package/tool/branch/index.js +25 -25
  50. package/tool/checkLange/checkLang.js +68 -68
  51. package/tool/checkLange/clearLang.js +85 -85
  52. package/utils/checkVersion.js +94 -94
  53. package/utils/config.js +18 -0
  54. package/utils/http.js +123 -123
  55. package/utils/utils.js +40 -58
@@ -1,7 +1,7 @@
1
- const cc = {}
2
- cc.get = require("./get")
3
- function main(action, argvs) {
4
- cc[action](argvs[2])
5
- }
6
-
7
- module.exports = main;
1
+ const cc = {}
2
+ cc.get = require("./get")
3
+ function main(action, argvs) {
4
+ cc[action](argvs[2])
5
+ }
6
+
7
+ module.exports = main;
@@ -1,70 +1,70 @@
1
- const fs = require('fs');
2
- const inquirer = require("inquirer")
3
-
4
- const { checkUpdate } = require("../../utils/checkVersion")
5
- const temp = `<template>
6
- <div class="cc-container">
7
- <div>Hello CloudCC</div>
8
- </div>
9
- </template>
10
-
11
- <script>
12
- export default {
13
- data() {
14
- return {
15
- componentInfo: {
16
-
17
- component: "cloudcc-demo-01",
18
-
19
- compName: "cloudcc-demo-01",
20
-
21
- compDesc: "Component description information",
22
- },
23
- isLock: false,
24
- };
25
- },
26
- };
27
- </script>
28
- <style lang="scss" scoped>
29
- .cc-container {
30
- text-align: center;
31
- padding: 8px;
32
- background: goldenrod;
33
- }
34
- </style>`
35
-
36
- class Builder {
37
- constructor() {
38
- this.options = {
39
-
40
- devConsoleConfig: {
41
- },
42
- }
43
- this.plugin = process.argv.splice(2)[0]
44
- }
45
- async init() {
46
- let res = await checkUpdate();
47
- if (!res) {
48
-
49
- let answers;
50
- if (this.plugin) {
51
- answers = { buildFileName: this.plugin + "/demo.vue" }
52
- } else {
53
- answers = await this.ask();
54
- answers.buildFileName = "./plugin/" + answers.buildFileName
55
- }
56
- fs.writeFileSync(answers.buildFileName, temp);
57
- }
58
- }
59
-
60
- ask() {
61
- const prompt = [];
62
- prompt.push({
63
- type: "input",
64
- name: "buildFileName",
65
- message: "Please enter a file name, such as index.vue",
66
- })
67
- return inquirer.prompt(prompt)
68
- }
69
- }
70
- module.exports = Builder;
1
+ const fs = require('fs');
2
+ const inquirer = require("inquirer")
3
+
4
+ const { checkUpdate } = require("../../utils/checkVersion")
5
+ const temp = `<template>
6
+ <div class="cc-container">
7
+ <div>Hello CloudCC</div>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ data() {
14
+ return {
15
+ componentInfo: {
16
+
17
+ component: "cloudcc-demo-01",
18
+
19
+ compName: "cloudcc-demo-01",
20
+
21
+ compDesc: "Component description information",
22
+ },
23
+ isLock: false,
24
+ };
25
+ },
26
+ };
27
+ </script>
28
+ <style lang="scss" scoped>
29
+ .cc-container {
30
+ text-align: center;
31
+ padding: 8px;
32
+ background: goldenrod;
33
+ }
34
+ </style>`
35
+
36
+ class Builder {
37
+ constructor() {
38
+ this.options = {
39
+
40
+ devConsoleConfig: {
41
+ },
42
+ }
43
+ this.plugin = process.argv.splice(2)[0]
44
+ }
45
+ async init() {
46
+ let res = await checkUpdate();
47
+ if (!res) {
48
+
49
+ let answers;
50
+ if (this.plugin) {
51
+ answers = { buildFileName: this.plugin + "/demo.vue" }
52
+ } else {
53
+ answers = await this.ask();
54
+ answers.buildFileName = "./plugin/" + answers.buildFileName
55
+ }
56
+ fs.writeFileSync(answers.buildFileName, temp);
57
+ }
58
+ }
59
+
60
+ ask() {
61
+ const prompt = [];
62
+ prompt.push({
63
+ type: "input",
64
+ name: "buildFileName",
65
+ message: "Please enter a file name, such as index.vue",
66
+ })
67
+ return inquirer.prompt(prompt)
68
+ }
69
+ }
70
+ module.exports = Builder;
@@ -1,58 +1,58 @@
1
-
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
- async function create(name) {
10
- const temp = `<template>
11
- <div class="cc-container">
12
- <div>Hello CloudCC</div>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- data() {
19
- return {
20
- componentInfo: {
21
-
22
- component: "${name}",
23
-
24
- compName: "${name}",
25
-
26
- compDesc: "Component description information",
27
- },
28
- isLock: false,
29
- };
30
- },
31
- };
32
- </script>
33
- <style lang="scss" scoped>
34
- .cc-container {
35
- text-align: center;
36
- padding: 8px;
37
- background: goldenrod;
38
- }
39
- </style>`
40
- let res = await checkUpdate();
41
- if (!res) {
42
-
43
- const pluginPath = path.join(process.cwd(), "plugins/" + name);
44
- try {
45
- fs.mkdirSync(pluginPath, { recursive: true })
46
- fs.writeFileSync(path.join(pluginPath, name + ".vue"), temp)
47
- fs.writeFileSync(path.join(pluginPath, "config.json"), `{"name":"${name}"}`)
48
- console.log()
49
- console.log(chalk.green("Successfully Created:" + name))
50
- console.log()
51
- } catch (e) {
52
- console.log()
53
- console.log(chalk.red("Creation Failed:" + e))
54
- console.log()
55
- }
56
- }
57
- }
58
- module.exports = create;
1
+
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
+ async function create(name) {
10
+ const temp = `<template>
11
+ <div class="cc-container">
12
+ <div>Hello CloudCC</div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ data() {
19
+ return {
20
+ componentInfo: {
21
+
22
+ component: "${name}",
23
+
24
+ compName: "${name}",
25
+
26
+ compDesc: "Component description information",
27
+ },
28
+ isLock: false,
29
+ };
30
+ },
31
+ };
32
+ </script>
33
+ <style lang="scss" scoped>
34
+ .cc-container {
35
+ text-align: center;
36
+ padding: 8px;
37
+ background: goldenrod;
38
+ }
39
+ </style>`
40
+ let res = await checkUpdate();
41
+ if (!res) {
42
+
43
+ const pluginPath = path.join(process.cwd(), "plugins/" + name);
44
+ try {
45
+ fs.mkdirSync(pluginPath, { recursive: true })
46
+ fs.writeFileSync(path.join(pluginPath, name + ".vue"), temp)
47
+ fs.writeFileSync(path.join(pluginPath, "config.json"), `{"name":"${name}"}`)
48
+ console.log()
49
+ console.log(chalk.green("Successfully Created:" + name))
50
+ console.log()
51
+ } catch (e) {
52
+ console.log()
53
+ console.log(chalk.red("Creation Failed:" + e))
54
+ console.log()
55
+ }
56
+ }
57
+ }
58
+ module.exports = create;
@@ -1,8 +1,8 @@
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;
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;