cloudcc-cli 2.2.0 → 2.2.2
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 +16 -2
- package/package.json +1 -1
- package/src/classes/publish.js +3 -0
- package/src/classes/pull.js +3 -0
- package/src/plugin/publish.js +3 -0
- package/src/plugin/publish1.js +11 -8
- package/src/script/publish.js +3 -0
- package/src/script/pull.js +3 -0
- package/src/timer/publish.js +3 -0
- package/src/timer/pull.js +3 -0
- package/src/triggers/publish.js +3 -0
- package/src/triggers/pull.js +3 -0
- package/template/cloudcc-cli.configjs +7 -1
- package/template/index.js +0 -4
- package/template/vueconfigjs +10 -10
- package/utils/checkVersion.js +2 -0
- package/template/demojava +0 -15
- package/template/indexvue +0 -29
- package/template/javaconfigjson +0 -3
- package/template/package-lockjson +0 -13952
package/README.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# ReleaseV2.2.2
|
|
2
|
+
#### Release Date: 2025-12-3
|
|
3
|
+
#### Release Scope: Full
|
|
4
|
+
#### Release Content
|
|
5
|
+
* Optimization
|
|
6
|
+
* Added links to development documentation and changelog to version check output
|
|
7
|
+
* Upgraded Node dependencies to version 20
|
|
8
|
+
* Added timestamp output to multiple files to enhance user experience
|
|
9
|
+
|
|
10
|
+
# ReleaseV2.2.1
|
|
11
|
+
#### Release Date: 2025-11-24
|
|
12
|
+
#### Release Scope: Full
|
|
13
|
+
#### Release Content
|
|
14
|
+
* Optimization
|
|
15
|
+
* update other config
|
|
16
|
+
|
|
1
17
|
# ReleaseV2.2.0
|
|
2
18
|
#### Release Date: 2025-11-24
|
|
3
19
|
#### Release Scope: Full
|
|
@@ -6,8 +22,6 @@
|
|
|
6
22
|
* Update the packaging and parsing of Vue files
|
|
7
23
|
* Add upload dependency tree to custom component
|
|
8
24
|
|
|
9
|
-
|
|
10
|
-
|
|
11
25
|
# ReleaseV2.1.9
|
|
12
26
|
#### Release Date: 2025-9-1
|
|
13
27
|
#### Release Scope: Full
|
package/package.json
CHANGED
package/src/classes/publish.js
CHANGED
|
@@ -13,6 +13,9 @@ async function publish(name) {
|
|
|
13
13
|
let res = await checkUpdate();
|
|
14
14
|
if (!res) {
|
|
15
15
|
console.log();
|
|
16
|
+
const now = new Date();
|
|
17
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
18
|
+
console.log(chalk.green(timeStr));
|
|
16
19
|
console.log(chalk.green('Posting, please wait...'));
|
|
17
20
|
console.log();
|
|
18
21
|
const classPath = path.join(process.cwd(), `classes/${name}/`);
|
package/src/classes/pull.js
CHANGED
|
@@ -12,6 +12,9 @@ async function pull(name) {
|
|
|
12
12
|
let res = await checkUpdate();
|
|
13
13
|
if (!res) {
|
|
14
14
|
console.log();
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
17
|
+
console.log(chalk.green(timeStr));
|
|
15
18
|
console.log(chalk.green('Pulling, please wait...'));
|
|
16
19
|
console.log();
|
|
17
20
|
const classPath = path.join(process.cwd(), `classes/${name}/`);
|
package/src/plugin/publish.js
CHANGED
|
@@ -224,6 +224,9 @@ class Builder {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
async upload(obj, header) {
|
|
227
|
+
const now = new Date();
|
|
228
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
229
|
+
console.log(chalk.green(timeStr));
|
|
227
230
|
console.log(chalk.green('Posting, please wait...'));
|
|
228
231
|
let jsContent = "";
|
|
229
232
|
try {
|
package/src/plugin/publish1.js
CHANGED
|
@@ -207,14 +207,14 @@ class Builder {
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
// 输出依赖信息到文件
|
|
210
|
-
try {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
} catch (err) {
|
|
216
|
-
|
|
217
|
-
}
|
|
210
|
+
// try {
|
|
211
|
+
// const outputPath = path.join(process.cwd(), 'dependencies-output.json');
|
|
212
|
+
// fs.writeFileSync(outputPath, JSON.stringify(allDependencies, null, 2), 'utf8');
|
|
213
|
+
// console.log(chalk.green(`Dependencies collected and saved to: ${outputPath}`));
|
|
214
|
+
// console.log(chalk.cyan(`Total files: ${Object.keys(allDependencies).length}`));
|
|
215
|
+
// } catch (err) {
|
|
216
|
+
// console.log(chalk.yellow('Warning: Failed to write dependencies output file:', err.message));
|
|
217
|
+
// }
|
|
218
218
|
|
|
219
219
|
return {
|
|
220
220
|
compName,
|
|
@@ -284,6 +284,9 @@ class Builder {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
async upload(obj, header) {
|
|
287
|
+
const now = new Date();
|
|
288
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
289
|
+
console.log(chalk.green(timeStr));
|
|
287
290
|
console.log(chalk.green('Posting, please wait...'));
|
|
288
291
|
let jsContent = "";
|
|
289
292
|
try {
|
package/src/script/publish.js
CHANGED
|
@@ -39,6 +39,9 @@ async function publish(argvs) {
|
|
|
39
39
|
|
|
40
40
|
if (scriptContent) {
|
|
41
41
|
let devConsoleConfig = await getPackageJson()
|
|
42
|
+
const now = new Date();
|
|
43
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
44
|
+
console.log(chalk.green(timeStr));
|
|
42
45
|
console.log(chalk.green('Posting, please wait...'));
|
|
43
46
|
configContent.scriptContent = scriptContent.trim()
|
|
44
47
|
let res = await post((devConsoleConfig.baseUrl || BaseUrl) + "/devconsole/script/saveClientScript", configContent, devConsoleConfig)
|
package/src/script/pull.js
CHANGED
|
@@ -16,6 +16,9 @@ async function pull(argvs) {
|
|
|
16
16
|
const srcPath = path.join(process.cwd(), `script/${namePath}/`);
|
|
17
17
|
|
|
18
18
|
let devConsoleConfig = await getPackageJson()
|
|
19
|
+
const now = new Date();
|
|
20
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
21
|
+
console.log(chalk.green(timeStr));
|
|
19
22
|
console.log(chalk.green('Pulling, please wait...'));
|
|
20
23
|
let configContent = JSON.parse(fs.readFileSync(srcPath + "config.json", 'utf8'));
|
|
21
24
|
if (!configContent.id) {
|
package/src/timer/publish.js
CHANGED
|
@@ -11,6 +11,9 @@ async function publish(name) {
|
|
|
11
11
|
let res = await checkUpdate();
|
|
12
12
|
if (!res) {
|
|
13
13
|
console.log();
|
|
14
|
+
const now = new Date();
|
|
15
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
16
|
+
console.log(chalk.green(timeStr));
|
|
14
17
|
console.log(chalk.green('Posting, please wait...'));
|
|
15
18
|
console.log();
|
|
16
19
|
const timerPath = path.join(process.cwd(), `schedule/${name}/`);
|
package/src/timer/pull.js
CHANGED
|
@@ -12,6 +12,9 @@ async function pull(name) {
|
|
|
12
12
|
let res = await checkUpdate();
|
|
13
13
|
if (!res) {
|
|
14
14
|
console.log();
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
17
|
+
console.log(chalk.green(timeStr));
|
|
15
18
|
console.log(chalk.green('Pulling, please wait...'));
|
|
16
19
|
console.log();
|
|
17
20
|
const timerPath = path.join(process.cwd(), `schedule/${name}/`);
|
package/src/triggers/publish.js
CHANGED
|
@@ -12,6 +12,9 @@ async function publish(argvs) {
|
|
|
12
12
|
let res = await checkUpdate();
|
|
13
13
|
if (!res) {
|
|
14
14
|
console.log();
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
17
|
+
console.log(chalk.green(timeStr));
|
|
15
18
|
console.log(chalk.green('Posting, please wait...'));
|
|
16
19
|
console.log();
|
|
17
20
|
const triggersPath = path.join(process.cwd(), `triggers/${namePath}/`);
|
package/src/triggers/pull.js
CHANGED
|
@@ -11,6 +11,9 @@ async function pull(argvs) {
|
|
|
11
11
|
let res = await checkUpdate();
|
|
12
12
|
if (!res) {
|
|
13
13
|
console.log();
|
|
14
|
+
const now = new Date();
|
|
15
|
+
const timeStr = now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0') + ' ' + String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
|
16
|
+
console.log(chalk.green(timeStr));
|
|
14
17
|
console.log(chalk.green('Pulling, please wait...'));
|
|
15
18
|
console.log();
|
|
16
19
|
const triggersPath = path.join(process.cwd(), `triggers/${namePath}/`);
|
package/template/index.js
CHANGED
|
@@ -59,10 +59,6 @@ module.exports = function (creator, options, callback) {
|
|
|
59
59
|
name, description
|
|
60
60
|
})
|
|
61
61
|
|
|
62
|
-
creator.copyTpl('package-lockjson', path.join(projectPath, "package-lock.json"), {
|
|
63
|
-
name, description
|
|
64
|
-
})
|
|
65
|
-
|
|
66
62
|
creator.copyTpl('vueconfigjs', path.join(projectPath, "vue.config.js"))
|
|
67
63
|
|
|
68
64
|
creator.copyTpl('babelconfigjs', path.join(projectPath, "babel.config.js"))
|
package/template/vueconfigjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const external = process.env.NODE_ENV == 'development' ? {} : {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"vue": 'Vue',
|
|
3
|
+
"vue-router": 'VueRouter',
|
|
4
|
+
'vue-echarts': 'VueECharts',
|
|
5
|
+
'element-ui': 'ELEMENT',
|
|
6
|
+
"axios": 'axios',
|
|
7
|
+
"d3": 'd3',
|
|
8
|
+
'echarts': 'echarts',
|
|
9
|
+
"jschardet": 'jschardet',
|
|
10
|
+
"crypto-js": 'CryptoJS',
|
|
11
|
+
"vue-i18n": 'VueI18n',
|
|
12
12
|
}
|
|
13
13
|
module.exports = {
|
|
14
14
|
publicPath: '/',
|
package/utils/checkVersion.js
CHANGED
|
@@ -29,6 +29,8 @@ function checkNpmVersion() {
|
|
|
29
29
|
console.log(' ' + chalk.green('★') + ' Current Version : ' + chalk.bold.green('v' + config.version));
|
|
30
30
|
console.log(' ' + chalk.blue('★') + ' Latest Version : ' + chalk.bold.blue('v' + onlineVersion));
|
|
31
31
|
console.log(' ' + chalk.yellow('★') + ' Published At : ' + chalk.gray(formattedTime));
|
|
32
|
+
console.log(' ' + chalk.magenta('★') + ' Developer Docs : ' + chalk.cyan('https://dev-help.cloudcc.cn/'));
|
|
33
|
+
console.log(' ' + chalk.magenta('★') + ' Changelog : ' + chalk.cyan('https://www.npmjs.com/package/cloudcc-cli'));
|
|
32
34
|
console.log(' ' + chalk.gray('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n'));
|
|
33
35
|
|
|
34
36
|
if (onlineVersionNum - currentVersion > 0) {
|
package/template/demojava
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
package/template/indexvue
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="cc-container" >
|
|
3
|
-
<div>hello World </div>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
data() {
|
|
10
|
-
return {
|
|
11
|
-
componentInfo: {
|
|
12
|
-
// Component unique identifier, globally unique
|
|
13
|
-
component: "cloudcc-demo-01",
|
|
14
|
-
// Component name, the name displayed in the page editor
|
|
15
|
-
compName: "cloudcc-demo-01",
|
|
16
|
-
// Component description information
|
|
17
|
-
compDesc: "Component description information",
|
|
18
|
-
},
|
|
19
|
-
isLock: false,
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
</script>
|
|
24
|
-
< style lang = "scss" scoped >
|
|
25
|
-
.cc - container {
|
|
26
|
-
text - align: center;
|
|
27
|
-
padding: 8px;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
package/template/javaconfigjson
DELETED