cloudcc-cli 1.7.2 → 1.7.4
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 +1219 -1204
- package/bin/cc.js +49 -49
- package/bin/plugin.js +6 -6
- package/bin/project.js +6 -6
- package/core/core/ServiceResult.java +35 -35
- package/core/core/UserInfo.java +45 -45
- package/package.json +34 -34
- package/src/classes/create.js +40 -40
- package/src/classes/index.js +8 -8
- package/src/classes/publish.js +43 -43
- package/src/config/get.js +20 -20
- package/src/config/index.js +8 -8
- package/src/config/use.js +14 -14
- package/src/object/get.js +14 -14
- package/src/object/index.js +7 -7
- package/src/plugin/create.js +70 -70
- package/src/plugin/create1.js +58 -58
- package/src/plugin/index.js +8 -8
- package/src/plugin/publish.js +262 -262
- package/src/plugin/publish1.js +256 -256
- package/src/project/create.js +87 -87
- package/src/project/create1.js +109 -109
- package/src/project/index.js +7 -7
- package/src/recordType/get.js +13 -13
- package/src/recordType/index.js +7 -7
- package/src/script/create.js +29 -29
- package/src/script/index.js +8 -8
- package/src/script/publish.js +62 -62
- package/src/timer/create.js +26 -26
- package/src/timer/index.js +8 -8
- package/src/timer/publish.js +43 -43
- package/src/token/get.js +11 -11
- package/src/token/index.js +7 -7
- package/src/triggers/create.js +27 -27
- package/src/triggers/index.js +8 -8
- package/src/triggers/publish.js +48 -48
- package/template/Appvue +24 -24
- 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 +29 -29
- package/template/javaconfigjson +2 -2
- package/template/mainjs +13 -13
- package/template/package-lockjson +13952 -13952
- package/template/packagejson +42 -42
- package/template/vueconfigjs +21 -21
- package/tool/branch/index.js +25 -25
- package/tool/checkLange/checkLang.js +68 -68
- package/tool/checkLange/clearLang.js +85 -85
- package/utils/checkVersion.js +90 -94
- package/utils/config.js +18 -0
- package/utils/http.js +123 -123
- package/utils/utils.js +40 -58
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,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;
|
package/src/plugin/create1.js
CHANGED
|
@@ -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;
|
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;
|