cloudcc-cli 1.7.6 → 1.7.8
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 +14 -0
- package/bin/cc.js +2 -1
- package/package.json +1 -1
- package/src/object/get.js +1 -2
- package/src/plugin/create.js +1 -1
- package/src/plugin/create1.js +12 -4
- package/src/script/create.js +1 -1
- package/src/timer/create.js +2 -2
- package/src/timer/publish.js +1 -1
- package/src/triggers/create.js +1 -1
- package/template/Appvue +1 -1
- package/template/indexvue +8 -8
- package/utils/utils.js +0 -1
package/README.md
CHANGED
package/bin/cc.js
CHANGED
|
@@ -28,9 +28,10 @@ cc.plugin = require("../src/plugin/index")
|
|
|
28
28
|
|
|
29
29
|
cc.classes = require("../src/classes/index")
|
|
30
30
|
|
|
31
|
-
cc.
|
|
31
|
+
cc.schedule = require("../src/timer/index")
|
|
32
32
|
|
|
33
33
|
cc.triggers = require("../src/triggers/index")
|
|
34
|
+
cc.timer = require("../src/timer/index")
|
|
34
35
|
|
|
35
36
|
cc.script = require("../src/script/index")
|
|
36
37
|
|
package/package.json
CHANGED
package/src/object/get.js
CHANGED
|
@@ -2,8 +2,7 @@ const { getBusToken } = require("../../utils/utils")
|
|
|
2
2
|
const { postNormal } = require("../../utils/http")
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
async function get(path
|
|
6
|
-
|
|
5
|
+
async function get(path) {
|
|
7
6
|
if (await getBusToken(path)) {
|
|
8
7
|
let res = await postNormal(global.setupSvc + "/api/customObject/standardObjList")
|
|
9
8
|
console.log(JSON.stringify(res.data))
|
package/src/plugin/create.js
CHANGED
package/src/plugin/create1.js
CHANGED
|
@@ -15,11 +15,19 @@ async function create(name) {
|
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
17
|
export default {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
componentInfo: {
|
|
21
|
+
|
|
22
|
+
component: "cloudcc-demo-01",
|
|
23
|
+
|
|
24
|
+
compName: "cloudcc-demo-01",
|
|
25
|
+
|
|
26
|
+
compDesc: "Component description information",
|
|
27
|
+
},
|
|
20
28
|
isLock: false,
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
};
|
|
30
|
+
},
|
|
23
31
|
};
|
|
24
32
|
</script>
|
|
25
33
|
<style lang="scss" scoped>
|
package/src/script/create.js
CHANGED
|
@@ -12,7 +12,7 @@ async function create(argvs) {
|
|
|
12
12
|
fs.mkdirSync(filePath, { recursive: true })
|
|
13
13
|
const fileTmp =
|
|
14
14
|
`function main($CCDK, obj){
|
|
15
|
-
console.log("
|
|
15
|
+
console.log("hello World")
|
|
16
16
|
}`
|
|
17
17
|
fs.writeFileSync(path.join(filePath, body.scriptName + ".js"), fileTmp)
|
|
18
18
|
fs.writeFileSync(path.join(filePath, "config.json"), JSON.stringify(body))
|
package/src/timer/create.js
CHANGED
|
@@ -6,11 +6,11 @@ const chalk = require("chalk")
|
|
|
6
6
|
async function create(name) {
|
|
7
7
|
let res = await checkUpdate();
|
|
8
8
|
if (!res) {
|
|
9
|
-
const timerPath = path.join(process.cwd(), "
|
|
9
|
+
const timerPath = path.join(process.cwd(), "schedule/" + name);
|
|
10
10
|
try {
|
|
11
11
|
fs.mkdirSync(timerPath, { recursive: true })
|
|
12
12
|
const javaTmp = `// @SOURCE_CONTENT_START
|
|
13
|
-
System.out.print("hello
|
|
13
|
+
System.out.print("hello World");
|
|
14
14
|
// @SOURCE_CONTENT_END`
|
|
15
15
|
fs.writeFileSync(path.join(timerPath, name + ".java"), javaTmp)
|
|
16
16
|
fs.writeFileSync(path.join(timerPath, "config.json"), `{"name":"${name}","version":"3"}`)
|
package/src/timer/publish.js
CHANGED
|
@@ -12,7 +12,7 @@ async function publish(name) {
|
|
|
12
12
|
console.log();
|
|
13
13
|
console.log(chalk.green('Posting, please wait...'));
|
|
14
14
|
console.log();
|
|
15
|
-
const timerPath = path.join(process.cwd(), `
|
|
15
|
+
const timerPath = path.join(process.cwd(), `schedule/${name}/`);
|
|
16
16
|
let fullContent = fs.readFileSync(timerPath + `${name}.java`, 'utf8');
|
|
17
17
|
|
|
18
18
|
// 提取标记之间的内容
|
package/src/triggers/create.js
CHANGED
|
@@ -11,7 +11,7 @@ async function create(argvs) {
|
|
|
11
11
|
try {
|
|
12
12
|
fs.mkdirSync(triggersPath, { recursive: true })
|
|
13
13
|
const javaTmp = `// @SOURCE_CONTENT_START
|
|
14
|
-
System.out.print("hello
|
|
14
|
+
System.out.print("hello World");
|
|
15
15
|
// @SOURCE_CONTENT_END`
|
|
16
16
|
fs.writeFileSync(path.join(triggersPath, body.name + ".java"), javaTmp)
|
|
17
17
|
fs.writeFileSync(path.join(triggersPath, "config.json"), JSON.stringify(body))
|
package/template/Appvue
CHANGED
package/template/indexvue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="cc-container">
|
|
3
|
-
<div>
|
|
4
|
-
|
|
5
|
-
</template>
|
|
2
|
+
<div class="cc-container" >
|
|
3
|
+
<div>hello World </div>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
6
|
|
|
7
|
-
<script>
|
|
7
|
+
<script>
|
|
8
8
|
export default {
|
|
9
9
|
data() {
|
|
10
10
|
return {
|
|
@@ -21,9 +21,9 @@ export default {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
</script>
|
|
24
|
-
<style lang="scss" scoped>
|
|
25
|
-
.cc-container {
|
|
26
|
-
text-align: center;
|
|
24
|
+
< style lang = "scss" scoped >
|
|
25
|
+
.cc - container {
|
|
26
|
+
text - align: center;
|
|
27
27
|
padding: 8px;
|
|
28
28
|
background: goldenrod;
|
|
29
29
|
}
|
package/utils/utils.js
CHANGED