cloudcc-cli 1.8.7 → 1.8.9
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 +1326 -1312
- package/bin/cc.js +49 -49
- package/bin/plugin.js +5 -5
- package/bin/project.js +5 -5
- package/core/core/ServiceResult.java +35 -35
- package/core/core/UserInfo.java +45 -45
- package/package.json +34 -34
- package/src/classes/create.js +43 -43
- package/src/classes/index.js +8 -8
- package/src/classes/publish.js +45 -45
- 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 +35 -35
- 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 +267 -267
- package/src/plugin/publish1.js +297 -297
- package/src/plugin/readme.md +6 -6
- package/src/project/create.js +83 -83
- package/src/project/create1.js +105 -105
- 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 +35 -35
- package/src/script/index.js +8 -8
- package/src/script/publish.js +71 -51
- package/src/timer/create.js +29 -29
- package/src/timer/index.js +8 -8
- package/src/timer/publish.js +47 -47
- package/src/token/get.js +11 -11
- package/src/token/index.js +7 -7
- package/src/triggers/create.js +39 -39
- package/src/triggers/index.js +8 -8
- package/src/triggers/publish.js +53 -53
- package/template/Appvue +24 -24
- package/template/babelconfigjs +5 -5
- package/template/demojava +14 -14
- package/template/gitignore +13 -13
- 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/cache.js +31 -31
- package/utils/checkVersion.js +107 -107
- package/utils/config.js +18 -18
- package/utils/http.js +123 -123
- package/utils/utils.js +95 -95
package/src/object/get.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
const { getBusToken } = require("../../utils/utils")
|
|
2
|
-
const { postNormal } = require("../../utils/http")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
async function get(path) {
|
|
6
|
-
if (await getBusToken(path)) {
|
|
7
|
-
let res = [];
|
|
8
|
-
//get standar object
|
|
9
|
-
let standardObjList = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
|
|
10
|
-
standardObjList.data.forEach((item) => {
|
|
11
|
-
res.push({
|
|
12
|
-
id: item.id,
|
|
13
|
-
label: item.objname,
|
|
14
|
-
objname: item.label,
|
|
15
|
-
objprefix: item.objprefix,
|
|
16
|
-
schemetableName: item.label
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
//get custom object
|
|
20
|
-
let customObjList = await postNormal(global.setupSvc + "/api/customObject/list")
|
|
21
|
-
customObjList.data.objList.map((item) => {
|
|
22
|
-
res.push({
|
|
23
|
-
id: item.id,
|
|
24
|
-
label: item.objLabel,
|
|
25
|
-
objname: item.schemetable_name,
|
|
26
|
-
objprefix: item.prefix,
|
|
27
|
-
schemetableName: item.schemetableName
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
console.log(JSON.stringify(res))
|
|
31
|
-
return res
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
module.exports = get;
|
|
1
|
+
const { getBusToken } = require("../../utils/utils")
|
|
2
|
+
const { postNormal } = require("../../utils/http")
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async function get(path) {
|
|
6
|
+
if (await getBusToken(path)) {
|
|
7
|
+
let res = [];
|
|
8
|
+
//get standar object
|
|
9
|
+
let standardObjList = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
|
|
10
|
+
standardObjList.data.forEach((item) => {
|
|
11
|
+
res.push({
|
|
12
|
+
id: item.id,
|
|
13
|
+
label: item.objname,
|
|
14
|
+
objname: item.label,
|
|
15
|
+
objprefix: item.objprefix,
|
|
16
|
+
schemetableName: item.label
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
//get custom object
|
|
20
|
+
let customObjList = await postNormal(global.setupSvc + "/api/customObject/list")
|
|
21
|
+
customObjList.data.objList.map((item) => {
|
|
22
|
+
res.push({
|
|
23
|
+
id: item.id,
|
|
24
|
+
label: item.objLabel,
|
|
25
|
+
objname: item.schemetable_name,
|
|
26
|
+
objprefix: item.prefix,
|
|
27
|
+
schemetableName: item.schemetableName
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
console.log(JSON.stringify(res))
|
|
31
|
+
return res
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
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,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 World</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 World</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</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
componentInfo: {
|
|
21
|
-
|
|
22
|
-
component: "component-${name}",
|
|
23
|
-
|
|
24
|
-
compName: "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"), `{"component":"component-${name}","compName":"compName-${name}","compDesc":"Component description information"}`)
|
|
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</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
componentInfo: {
|
|
21
|
+
|
|
22
|
+
component: "component-${name}",
|
|
23
|
+
|
|
24
|
+
compName: "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"), `{"component":"component-${name}","compName":"compName-${name}","compDesc":"Component description information"}`)
|
|
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;
|