cloudcc-cli 1.6.4 → 1.6.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 +1176 -1161
- package/bin/cc.js +49 -49
- package/bin/plugin.js +6 -6
- package/bin/project.js +6 -6
- package/core/core/CCObject.java +48 -0
- package/core/core/CCService.java +806 -0
- package/core/core/CCTrigger.java +23 -0
- package/core/core/CCTriggerHandler.java +15 -0
- package/core/core/DevLogger.java +39 -0
- package/core/core/OperatationEnum.java +5 -0
- package/core/core/PeakInterf.java +6 -0
- package/core/core/PeakSvc.java +8 -0
- package/core/core/ServiceResult.java +35 -0
- package/core/core/TriggerInvoker.java +83 -0
- package/core/core/TriggerMethod.java +9 -0
- package/core/core/TriggerTimeEnum.java +5 -0
- package/core/core/UserInfo.java +45 -0
- package/core.zip +0 -0
- package/package.json +34 -34
- package/src/classes/create.js +40 -43
- package/src/classes/index.js +8 -8
- package/src/classes/publish.js +43 -47
- package/src/config/get.js +20 -22
- package/src/config/index.js +8 -8
- package/src/config/use.js +14 -16
- package/src/object/get.js +14 -16
- package/src/object/index.js +7 -7
- package/src/plugin/create.js +70 -80
- package/src/plugin/create1.js +58 -66
- package/src/plugin/index.js +8 -8
- package/src/plugin/publish.js +265 -298
- package/src/plugin/publish1.js +256 -286
- package/src/project/create.js +87 -89
- package/src/project/create1.js +109 -111
- package/src/project/index.js +7 -7
- package/src/recordType/get.js +13 -16
- package/src/recordType/index.js +7 -7
- package/src/script/create.js +29 -32
- package/src/script/index.js +8 -8
- package/src/script/publish.js +62 -69
- package/src/timer/create.js +26 -29
- package/src/timer/index.js +8 -8
- package/src/timer/publish.js +43 -47
- package/src/token/get.js +11 -13
- package/src/token/index.js +7 -7
- package/src/triggers/create.js +27 -35
- package/src/triggers/index.js +8 -8
- package/src/triggers/publish.js +48 -51
- package/template/Appvue +29 -29
- package/template/babelconfigjs +5 -5
- package/template/demojava +14 -14
- package/template/gitignore +11 -11
- package/template/index.js +57 -57
- package/template/indexhtml +21 -21
- package/template/indexvue +34 -34
- package/template/javaconfigjson +2 -2
- package/template/mainjs +13 -13
- package/template/package-lockjson +12115 -12115
- package/template/packagejson +42 -42
- package/template/vueconfigjs +26 -26
- package/tool/branch/index.js +25 -0
- package/tool/checkLange/checkLang.js +68 -0
- package/tool/checkLange/clearLang.js +85 -0
- package/tool/checkLange/result.txt +0 -0
- package/utils/checkVersion.js +94 -105
- package/utils/http.js +122 -122
- package/utils/utils.js +57 -59
package/src/object/get.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
const { getBusToken } = require("../../utils/utils")
|
|
2
|
-
const { postNormal } = require("../../utils/http")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module.exports = get;
|
|
1
|
+
const { getBusToken } = require("../../utils/utils")
|
|
2
|
+
const { postNormal } = require("../../utils/http")
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async function get(path = process.cwd()) {
|
|
6
|
+
|
|
7
|
+
if (await getBusToken(path)) {
|
|
8
|
+
let res = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
|
|
9
|
+
console.log(JSON.stringify(res.data))
|
|
10
|
+
return res.data
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = get;
|
package/src/object/index.js
CHANGED
|
@@ -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;
|
package/src/plugin/create.js
CHANGED
|
@@ -1,80 +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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const prompt = [];
|
|
72
|
-
prompt.push({
|
|
73
|
-
type: "input",
|
|
74
|
-
name: "buildFileName",
|
|
75
|
-
message: "请输入文件名,如index.vue",
|
|
76
|
-
})
|
|
77
|
-
return inquirer.prompt(prompt)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
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;
|
package/src/plugin/create1.js
CHANGED
|
@@ -1,66 +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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} catch (e) {
|
|
60
|
-
console.log()
|
|
61
|
-
console.log(chalk.red("创建失败:" + e))
|
|
62
|
-
console.log()
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
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;
|
package/src/plugin/index.js
CHANGED
|
@@ -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;
|