cloudcc-cli 1.7.5 → 1.7.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 +8 -0
- package/package.json +1 -1
- package/src/plugin/create1.js +4 -4
- package/src/plugin/publish1.js +3 -18
- package/utils/utils.js +3 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/plugin/create1.js
CHANGED
|
@@ -9,16 +9,16 @@ const chalk = require("chalk")
|
|
|
9
9
|
async function create(name) {
|
|
10
10
|
const temp = `<template>
|
|
11
11
|
<div class="cc-container">
|
|
12
|
-
<div>
|
|
12
|
+
<div>Hello</div>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
17
|
export default {
|
|
18
18
|
data() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
return {
|
|
20
|
+
isLock: false,
|
|
21
|
+
}
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
</script>
|
package/src/plugin/publish1.js
CHANGED
|
@@ -91,24 +91,9 @@ class Builder {
|
|
|
91
91
|
console.log(chalk.yellow("Warning: The scoped attribute is missing in style, which may cause global style pollution. It is recommended to fix it。"));
|
|
92
92
|
console.log()
|
|
93
93
|
}
|
|
94
|
-
vueData = vueData.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
let data = {};
|
|
99
|
-
|
|
100
|
-
try {
|
|
101
|
-
data = eval(`(${vueData})`) || {};
|
|
102
|
-
} catch (err) {
|
|
103
|
-
console.log();
|
|
104
|
-
console.log(chalk.red(
|
|
105
|
-
"Error: Failed to parse data() in component. \n" +
|
|
106
|
-
"Please check if there are any reference type variable in your data(). \n" +
|
|
107
|
-
"Suggestion: Initialize external variables in created() lifecycle hook instead."
|
|
108
|
-
));
|
|
109
|
-
console.log();
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
94
|
+
vueData = vueData.split(/data\s*\(\s*\)/)[1].split(/isLock\s*:/)[0] + "isLock:false,};}";
|
|
95
|
+
vueData = "function data()" + vueData;
|
|
96
|
+
const data = eval(`(${vueData})`)()
|
|
112
97
|
|
|
113
98
|
if (!data.propObj) {
|
|
114
99
|
data.propObj = {};
|
package/utils/utils.js
CHANGED
|
@@ -20,7 +20,7 @@ async function getBaseUrl(devConfig) {
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
if (
|
|
23
|
+
if (devConfig.baseUrl) {
|
|
24
24
|
global.apiSvc = devConfig.baseUrl + (devConfig.apiSvcPrefix || "/apitfs")
|
|
25
25
|
global.setupSvc = devConfig.baseUrl + (devConfig.setupSvcPrefix || "/setup")
|
|
26
26
|
} else {
|
|
@@ -86,6 +86,8 @@ async function getBusToken(path = process.cwd()) {
|
|
|
86
86
|
};
|
|
87
87
|
writeCache(cache);
|
|
88
88
|
return res.data.accessToken;
|
|
89
|
+
} else {
|
|
90
|
+
console.log(chalk.red(res.returnInfo));
|
|
89
91
|
}
|
|
90
92
|
return false;
|
|
91
93
|
}
|