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/script/publish.js
CHANGED
|
@@ -1,69 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path")
|
|
5
|
-
const chalk = require("chalk")
|
|
6
|
-
const { post } = require("../../utils/http")
|
|
7
|
-
const { getPackageJson } = require("../../utils/utils")
|
|
8
|
-
const BaseUrl = "https://developer.apis.cloudcc.cn"
|
|
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
|
-
} else {
|
|
64
|
-
console.error(chalk.red(`登录失败`, JSON.stringify(res)));
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
module.exports = publish;
|
|
1
|
+
|
|
2
|
+
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path")
|
|
5
|
+
const chalk = require("chalk")
|
|
6
|
+
const { post } = require("../../utils/http")
|
|
7
|
+
const { getPackageJson } = require("../../utils/utils")
|
|
8
|
+
const BaseUrl = "https://developer.apis.cloudcc.cn"
|
|
9
|
+
|
|
10
|
+
async function publish(argvs) {
|
|
11
|
+
let name = argvs[2]
|
|
12
|
+
let res = await checkUpdate();
|
|
13
|
+
if (!res) {
|
|
14
|
+
const srcPath = path.join(process.cwd(), `script/${name}/`);
|
|
15
|
+
let classContent = fs.readFileSync(srcPath + `${name}.js`, 'utf8').replace(/\s+/g, '').replace(/\n/g, '').match(/\{([\s\S]*?)\}/)[1];
|
|
16
|
+
let configContent = JSON.parse(fs.readFileSync(srcPath + "config.json", 'utf8'));
|
|
17
|
+
let configContentOld = JSON.parse(JSON.stringify(configContent))
|
|
18
|
+
|
|
19
|
+
if (classContent) {
|
|
20
|
+
let devConsoleConfig = getPackageJson()
|
|
21
|
+
|
|
22
|
+
if ("private" != devConsoleConfig.version) {
|
|
23
|
+
devConsoleConfig = { "accessToken": await getToken(devConsoleConfig) };
|
|
24
|
+
}
|
|
25
|
+
console.log(chalk.green('Posting, please wait...'));
|
|
26
|
+
configContent.scriptContent = classContent
|
|
27
|
+
let res = await post((devConsoleConfig.baseUrl || BaseUrl) + "/devconsole/script/saveClientScript", configContent, devConsoleConfig)
|
|
28
|
+
if (res.result) {
|
|
29
|
+
console.log();
|
|
30
|
+
console.log(chalk.green('Success!'));
|
|
31
|
+
console.log();
|
|
32
|
+
|
|
33
|
+
if (!configContentOld.id) {
|
|
34
|
+
configContentOld.id = res.data
|
|
35
|
+
fs.writeFileSync(path.join(srcPath, "config.json"), JSON.stringify(configContentOld))
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
console.log();
|
|
39
|
+
console.log(chalk.red('Fail:' + res.returnInfo));
|
|
40
|
+
console.log();
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
console.log();
|
|
44
|
+
console.log(chalk.red('Invalid Script Content'));
|
|
45
|
+
console.log();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
async function getToken(devConsoleConfig) {
|
|
53
|
+
let res = await post(devConsoleConfig.baseUrl || BaseUrl + "/sysconfig/auth/pc/1.0/post/tokenInfo", devConsoleConfig);
|
|
54
|
+
if (res.returnCode == 200) {
|
|
55
|
+
return res.data.accessToken;
|
|
56
|
+
} else {
|
|
57
|
+
console.error(chalk.red(`Login failed`, JSON.stringify(res)));
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = publish;
|
package/src/timer/create.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
const { checkUpdate } = require("../../utils/checkVersion")
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path")
|
|
4
|
-
const chalk = require("chalk")
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fs.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
console.log(
|
|
20
|
-
console.log()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = create;
|
|
1
|
+
const { checkUpdate } = require("../../utils/checkVersion")
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path")
|
|
4
|
+
const chalk = require("chalk")
|
|
5
|
+
|
|
6
|
+
async function create(name) {
|
|
7
|
+
let res = await checkUpdate();
|
|
8
|
+
if (!res) {
|
|
9
|
+
const timerPath = path.join(process.cwd(), "timer/" + name);
|
|
10
|
+
try {
|
|
11
|
+
fs.mkdirSync(timerPath, { recursive: true })
|
|
12
|
+
const javaTmp = `System.out.print("hello CloudCC");`
|
|
13
|
+
fs.writeFileSync(path.join(timerPath, name + ".java"), javaTmp)
|
|
14
|
+
fs.writeFileSync(path.join(timerPath, "config.json"), `{"name":"${name}","version":"3"}`)
|
|
15
|
+
console.log()
|
|
16
|
+
console.log(chalk.green("Successfully Created:" + name))
|
|
17
|
+
console.log()
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.log()
|
|
20
|
+
console.log(chalk.red("Creation Failed:" + e))
|
|
21
|
+
console.log()
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = create;
|
package/src/timer/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const cc = {}
|
|
2
|
-
cc.create = require("./create")
|
|
3
|
-
cc.publish = require("./publish")
|
|
4
|
-
function Timer(action, argvs) {
|
|
5
|
-
cc[action](argvs[2])
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
module.exports = Timer;
|
|
1
|
+
const cc = {}
|
|
2
|
+
cc.create = require("./create")
|
|
3
|
+
cc.publish = require("./publish")
|
|
4
|
+
function Timer(action, argvs) {
|
|
5
|
+
cc[action](argvs[2])
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
module.exports = Timer;
|
package/src/timer/publish.js
CHANGED
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path")
|
|
5
|
-
const chalk = require("chalk")
|
|
6
|
-
const { postNormal } = require("../../utils/http")
|
|
7
|
-
|
|
8
|
-
const { getBusToken } = require("../../utils/utils")
|
|
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
|
-
module.exports = publish;
|
|
1
|
+
|
|
2
|
+
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path")
|
|
5
|
+
const chalk = require("chalk")
|
|
6
|
+
const { postNormal } = require("../../utils/http")
|
|
7
|
+
|
|
8
|
+
const { getBusToken } = require("../../utils/utils")
|
|
9
|
+
|
|
10
|
+
async function publish(name) {
|
|
11
|
+
let res = await checkUpdate();
|
|
12
|
+
if (!res) {
|
|
13
|
+
console.log();
|
|
14
|
+
console.log(chalk.green('Posting, please wait...'));
|
|
15
|
+
console.log();
|
|
16
|
+
const timerPath = path.join(process.cwd(), `timer/${name}/`);
|
|
17
|
+
let classContent = fs.readFileSync(timerPath + `${name}.java`, 'utf8');
|
|
18
|
+
let configContent = JSON.parse(fs.readFileSync(timerPath + "config.json", 'utf8'));
|
|
19
|
+
|
|
20
|
+
if (await getBusToken()) {
|
|
21
|
+
let body = {
|
|
22
|
+
"id": configContent.id,
|
|
23
|
+
"name": name,
|
|
24
|
+
"version": configContent.version,
|
|
25
|
+
"source": encodeURI(classContent),
|
|
26
|
+
"folderId": "wgd"
|
|
27
|
+
}
|
|
28
|
+
let res = await postNormal(global.setupSvc + "/api/ccPeak/save", body)
|
|
29
|
+
if (res.result) {
|
|
30
|
+
console.log(chalk.green('Success!'));
|
|
31
|
+
console.log();
|
|
32
|
+
|
|
33
|
+
if (!configContent.id) {
|
|
34
|
+
configContent.id = res.data
|
|
35
|
+
fs.writeFileSync(path.join(timerPath, "config.json"), JSON.stringify(configContent))
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
console.log(chalk.red('Fail:' + res.returnInfo));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
module.exports = publish;
|
package/src/token/get.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
const { getBusToken } = require("../../utils/utils")
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
module.exports = get;
|
|
1
|
+
const { getBusToken } = require("../../utils/utils")
|
|
2
|
+
|
|
3
|
+
async function get(path) {
|
|
4
|
+
let token = await getBusToken(path)
|
|
5
|
+
if (token) {
|
|
6
|
+
console.log(token)
|
|
7
|
+
return token;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = get;
|
package/src/token/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const cc = {}
|
|
2
|
-
cc.get = require("./get")
|
|
3
|
-
function Token(action,argvs) {
|
|
4
|
-
cc[action](argvs[2])
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
module.exports = Token;
|
|
1
|
+
const cc = {}
|
|
2
|
+
cc.get = require("./get")
|
|
3
|
+
function Token(action,argvs) {
|
|
4
|
+
cc[action](argvs[2])
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
module.exports = Token;
|
package/src/triggers/create.js
CHANGED
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
const { checkUpdate } = require("../../utils/checkVersion")
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path")
|
|
4
|
-
const chalk = require("chalk")
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fs.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
console.log()
|
|
29
|
-
console.log(chalk.red("创建失败:" + e))
|
|
30
|
-
console.log()
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
module.exports = create;
|
|
1
|
+
const { checkUpdate } = require("../../utils/checkVersion")
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path")
|
|
4
|
+
const chalk = require("chalk")
|
|
5
|
+
|
|
6
|
+
async function create(argvs) {
|
|
7
|
+
let res = await checkUpdate();
|
|
8
|
+
if (!res) {
|
|
9
|
+
let body = JSON.parse(decodeURI(argvs[2]))
|
|
10
|
+
const triggersPath = path.join(process.cwd(), "triggers/" + body.name);
|
|
11
|
+
try {
|
|
12
|
+
fs.mkdirSync(triggersPath, { recursive: true })
|
|
13
|
+
const javaTmp = `System.out.print("hello CloudCC");`
|
|
14
|
+
fs.writeFileSync(path.join(triggersPath, body.name + ".java"), javaTmp)
|
|
15
|
+
fs.writeFileSync(path.join(triggersPath, "config.json"), JSON.stringify(body))
|
|
16
|
+
console.log()
|
|
17
|
+
console.log(chalk.green("Successfully Created:" + body.name))
|
|
18
|
+
console.log()
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.log()
|
|
21
|
+
console.log(chalk.red("Creation Failed:" + e))
|
|
22
|
+
console.log()
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = create;
|
package/src/triggers/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const cc = {}
|
|
2
|
-
cc.create = require("./create")
|
|
3
|
-
cc.publish = require("./publish")
|
|
4
|
-
function Classes(action, argvs) {
|
|
5
|
-
cc[action](argvs
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
module.exports = Classes;
|
|
1
|
+
const cc = {}
|
|
2
|
+
cc.create = require("./create")
|
|
3
|
+
cc.publish = require("./publish")
|
|
4
|
+
function Classes(action, argvs) {
|
|
5
|
+
cc[action](argvs)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
module.exports = Classes;
|
package/src/triggers/publish.js
CHANGED
|
@@ -1,51 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path")
|
|
5
|
-
const chalk = require("chalk")
|
|
6
|
-
const { postNormal } = require("../../utils/http")
|
|
7
|
-
const { getBusToken } = require("../../utils/utils")
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
console.log();
|
|
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
|
-
module.exports = publish;
|
|
1
|
+
|
|
2
|
+
const { checkUpdate } = require("../../utils/checkVersion")
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path")
|
|
5
|
+
const chalk = require("chalk")
|
|
6
|
+
const { postNormal } = require("../../utils/http")
|
|
7
|
+
const { getBusToken } = require("../../utils/utils")
|
|
8
|
+
|
|
9
|
+
async function publish(argvs) {
|
|
10
|
+
let name = argvs[2]
|
|
11
|
+
let res = await checkUpdate();
|
|
12
|
+
if (!res) {
|
|
13
|
+
console.log();
|
|
14
|
+
console.log(chalk.green('Posting, please wait...'));
|
|
15
|
+
console.log();
|
|
16
|
+
const triggersPath = path.join(process.cwd(), `triggers/${name}/`);
|
|
17
|
+
let classContent = fs.readFileSync(triggersPath + `${name}.java`, 'utf8');
|
|
18
|
+
let configContent = JSON.parse(fs.readFileSync(triggersPath + "config.json", 'utf8'));
|
|
19
|
+
|
|
20
|
+
if (await getBusToken()) {
|
|
21
|
+
let body = {
|
|
22
|
+
"id": configContent.id,
|
|
23
|
+
"apiname": configContent.apiname,
|
|
24
|
+
"isactive": configContent.isactive,
|
|
25
|
+
"targetObjectId": configContent.targetObjectId,
|
|
26
|
+
"triggerTime": configContent.triggerTime,
|
|
27
|
+
"name": name,
|
|
28
|
+
"version": configContent.version,
|
|
29
|
+
"triggerSource": encodeURI(classContent),
|
|
30
|
+
"folderId": "wgd"
|
|
31
|
+
}
|
|
32
|
+
let res = await postNormal(global.setupSvc + "/api/triggerSetup/saveTrigger", body)
|
|
33
|
+
if (res.result) {
|
|
34
|
+
console.log(chalk.green('Success!'));
|
|
35
|
+
console.log();
|
|
36
|
+
|
|
37
|
+
if (!configContent.id) {
|
|
38
|
+
configContent.id = res.data.id
|
|
39
|
+
configContent.apiname = res.data.apiname
|
|
40
|
+
fs.writeFileSync(path.join(triggersPath, "config.json"), JSON.stringify(configContent))
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
console.log(chalk.red('Fail:' + res.returnInfo));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
module.exports = publish;
|
package/template/Appvue
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="cc-container">
|
|
3
|
-
<div>Hello CloudCC</div>
|
|
4
|
-
<div>
|
|
5
|
-
<a href="https://cloudccone.feishu.cn/wiki/JZ7CwcRfriU8taknCKCcwKEmncd">
|
|
6
|
-
开发者文档</a
|
|
7
|
-
>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
name: "App",
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<style lang="scss" scoped>
|
|
19
|
-
html body {
|
|
20
|
-
padding: 0;
|
|
21
|
-
margin: 0;
|
|
22
|
-
height: 100vh;
|
|
23
|
-
width: 100%;
|
|
24
|
-
}
|
|
25
|
-
.cc-container {
|
|
26
|
-
text-align: center;
|
|
27
|
-
padding: 8px;
|
|
28
|
-
background: goldenrod;
|
|
29
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cc-container">
|
|
3
|
+
<div>Hello CloudCC</div>
|
|
4
|
+
<div>
|
|
5
|
+
<a href="https://cloudccone.feishu.cn/wiki/JZ7CwcRfriU8taknCKCcwKEmncd">
|
|
6
|
+
开发者文档</a
|
|
7
|
+
>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: "App",
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
html body {
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
height: 100vh;
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
.cc-container {
|
|
26
|
+
text-align: center;
|
|
27
|
+
padding: 8px;
|
|
28
|
+
background: goldenrod;
|
|
29
|
+
}
|
|
30
30
|
</style>
|
package/template/babelconfigjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
presets: [
|
|
3
|
-
'@vue/cli-plugin-babel/preset'
|
|
4
|
-
]
|
|
5
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [
|
|
3
|
+
'@vue/cli-plugin-babel/preset'
|
|
4
|
+
]
|
|
5
|
+
}
|
package/template/demojava
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
public class Test{
|
|
2
|
-
private CCServiceV3 cs;
|
|
3
|
-
private UserInfo userInfo;
|
|
4
|
-
|
|
5
|
-
public Test(UserInfo userInfo){
|
|
6
|
-
this.userInfo = userInfo;
|
|
7
|
-
cs = new CCServiceV3(userInfo);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
public String demo(String str){
|
|
12
|
-
str = "demo";
|
|
13
|
-
return str;
|
|
14
|
-
}
|
|
1
|
+
public class Test{
|
|
2
|
+
private CCServiceV3 cs;
|
|
3
|
+
private UserInfo userInfo;
|
|
4
|
+
|
|
5
|
+
public Test(UserInfo userInfo){
|
|
6
|
+
this.userInfo = userInfo;
|
|
7
|
+
cs = new CCServiceV3(userInfo);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
public String demo(String str){
|
|
12
|
+
str = "demo";
|
|
13
|
+
return str;
|
|
14
|
+
}
|
|
15
15
|
}
|