cloudcc-cli 2.1.6 → 2.1.7
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 +8 -0
- package/package.json +1 -1
- package/src/classes/pullList.js +2 -2
- package/src/timer/pullList.js +1 -4
package/README.md
CHANGED
package/package.json
CHANGED
package/src/classes/pullList.js
CHANGED
|
@@ -15,7 +15,7 @@ async function pullList(id, url) {
|
|
|
15
15
|
const data = res.data;
|
|
16
16
|
const trigger = data.trigger;
|
|
17
17
|
const className = trigger.apiname;
|
|
18
|
-
const folderPath = path.join(url, `classes/${
|
|
18
|
+
const folderPath = path.join(url, `classes/${trigger.name}`);
|
|
19
19
|
// 3. Check and create folder
|
|
20
20
|
if (!fs.existsSync(folderPath)) {
|
|
21
21
|
fs.mkdirSync(folderPath, { recursive: true });
|
|
@@ -26,7 +26,7 @@ async function pullList(id, url) {
|
|
|
26
26
|
fs.writeFileSync(javaFile, javaContent, "utf8");
|
|
27
27
|
// 5. Create config.json
|
|
28
28
|
const configJson = {
|
|
29
|
-
name:
|
|
29
|
+
name: trigger.name,
|
|
30
30
|
version: "2",
|
|
31
31
|
id: trigger.id || id
|
|
32
32
|
};
|
package/src/timer/pullList.js
CHANGED
|
@@ -16,10 +16,7 @@ async function pullList(arg1, arg2) {
|
|
|
16
16
|
if (!trigger) throw new Error('No trigger detail found');
|
|
17
17
|
// 判断trigger.name是否全为英文
|
|
18
18
|
let timerName = trigger.apiname;
|
|
19
|
-
|
|
20
|
-
timerName = trigger.name;
|
|
21
|
-
}
|
|
22
|
-
const folderPath = path.join(arg2, `schedule/${timerName}`);
|
|
19
|
+
const folderPath = path.join(arg2, `schedule/${trigger.name}`);
|
|
23
20
|
if (!fs.existsSync(folderPath)) {
|
|
24
21
|
fs.mkdirSync(folderPath, { recursive: true });
|
|
25
22
|
}
|