zmp-cli 3.4.2 → 3.4.3
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/package.json +1 -1
- package/start/frame/index.html +2 -2
- package/start/index.js +13 -8
package/package.json
CHANGED
package/start/frame/index.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<link rel="icon" href="/src/static/icons/favicon.png" />
|
|
18
18
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
19
19
|
<script>
|
|
20
|
-
fetch('http://localhost:
|
|
20
|
+
fetch('http://localhost:2999/app-config.json')
|
|
21
21
|
.then(response => response.json())
|
|
22
22
|
.then(data => {
|
|
23
23
|
if (data.app.title) {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
</div>
|
|
138
138
|
<span id="title"></span>
|
|
139
139
|
</div>
|
|
140
|
-
<iframe id="zalo-frame" src="http://localhost:
|
|
140
|
+
<iframe id="zalo-frame" src="http://localhost:2999"></iframe>
|
|
141
141
|
</div>
|
|
142
142
|
</body>
|
|
143
143
|
</html>
|
package/start/index.js
CHANGED
|
@@ -24,11 +24,11 @@ module.exports = async (options = {}, logger, { exitOnError = true } = {}) => {
|
|
|
24
24
|
if (!logger) {
|
|
25
25
|
// eslint-disable-next-line
|
|
26
26
|
logger = {
|
|
27
|
-
statusStart() {},
|
|
28
|
-
statusDone() {},
|
|
29
|
-
statusError() {},
|
|
30
|
-
text() {},
|
|
31
|
-
error() {},
|
|
27
|
+
statusStart() { },
|
|
28
|
+
statusDone() { },
|
|
29
|
+
statusError() { },
|
|
30
|
+
text() { },
|
|
31
|
+
error() { },
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
spinner.start();
|
|
@@ -96,7 +96,7 @@ module.exports = async (options = {}, logger, { exitOnError = true } = {}) => {
|
|
|
96
96
|
}),
|
|
97
97
|
],
|
|
98
98
|
server: {
|
|
99
|
-
port:
|
|
99
|
+
port: 2999,
|
|
100
100
|
strictPort: true,
|
|
101
101
|
...(previewOnZalo ? publicServer : localServer),
|
|
102
102
|
},
|
|
@@ -110,10 +110,15 @@ module.exports = async (options = {}, logger, { exitOnError = true } = {}) => {
|
|
|
110
110
|
configFile: false,
|
|
111
111
|
root: __dirname + '/frame',
|
|
112
112
|
server: {
|
|
113
|
-
port: port
|
|
113
|
+
port: port,
|
|
114
|
+
open: true
|
|
114
115
|
},
|
|
115
116
|
});
|
|
116
|
-
serverFrame.listen();
|
|
117
|
+
await serverFrame.listen();
|
|
118
|
+
spinner.stop();
|
|
119
|
+
const info = server.config.logger.info
|
|
120
|
+
info(chalk.green(`Zalo Mini App dev server is running at:\n`))
|
|
121
|
+
serverFrame.printUrls()
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
spinner.stop();
|