zmp-cli 3.11.1 → 3.11.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/package.json +1 -1
- package/start/dist/index.dev.js +12 -7
- package/start/index.js +24 -24
package/package.json
CHANGED
package/start/dist/index.dev.js
CHANGED
|
@@ -186,7 +186,7 @@ module.exports = function _callee() {
|
|
|
186
186
|
app = _context.sent;
|
|
187
187
|
|
|
188
188
|
if (previewOnZalo) {
|
|
189
|
-
_context.next =
|
|
189
|
+
_context.next = 47;
|
|
190
190
|
break;
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -229,6 +229,10 @@ module.exports = function _callee() {
|
|
|
229
229
|
server.printUrls();
|
|
230
230
|
|
|
231
231
|
case 45:
|
|
232
|
+
_context.next = 48;
|
|
233
|
+
break;
|
|
234
|
+
|
|
235
|
+
case 47:
|
|
232
236
|
try {
|
|
233
237
|
chii.start({
|
|
234
238
|
port: remoteDebugPort
|
|
@@ -245,8 +249,9 @@ module.exports = function _callee() {
|
|
|
245
249
|
logger.text("".concat(logSymbols.info, " ").concat(chalk.red("Can not start remote debug server")));
|
|
246
250
|
}
|
|
247
251
|
|
|
252
|
+
case 48:
|
|
248
253
|
spinner.stop();
|
|
249
|
-
_context.next =
|
|
254
|
+
_context.next = 51;
|
|
250
255
|
return regeneratorRuntime.awrap(new Promise(function () {
|
|
251
256
|
var previewOnZaloURL = "https://zalo.me/app/link/zapps/".concat(appId, "/?env=TESTING_LOCAL&clientIp=").concat(isIOS ? 'http' : 'https', "://").concat(host, ":").concat(app.config.server.port);
|
|
252
257
|
|
|
@@ -286,11 +291,11 @@ module.exports = function _callee() {
|
|
|
286
291
|
}
|
|
287
292
|
}));
|
|
288
293
|
|
|
289
|
-
case
|
|
294
|
+
case 51:
|
|
290
295
|
return _context.abrupt("return", _context.sent);
|
|
291
296
|
|
|
292
|
-
case
|
|
293
|
-
_context.prev =
|
|
297
|
+
case 54:
|
|
298
|
+
_context.prev = 54;
|
|
294
299
|
_context.t0 = _context["catch"](15);
|
|
295
300
|
logger.statusError('Error starting project'); // if (err) logger.error(err.stderr || err);
|
|
296
301
|
|
|
@@ -298,10 +303,10 @@ module.exports = function _callee() {
|
|
|
298
303
|
errorExit(_context.t0);
|
|
299
304
|
return _context.abrupt("return");
|
|
300
305
|
|
|
301
|
-
case
|
|
306
|
+
case 60:
|
|
302
307
|
case "end":
|
|
303
308
|
return _context.stop();
|
|
304
309
|
}
|
|
305
310
|
}
|
|
306
|
-
}, null, null, [[15,
|
|
311
|
+
}, null, null, [[15, 54]]);
|
|
307
312
|
};
|
package/start/index.js
CHANGED
|
@@ -142,33 +142,33 @@ module.exports = async (options = {}, logger, { exitOnError = true } = {}) => {
|
|
|
142
142
|
info(chalk.green(`Zalo Mini App dev server is running at:\n`));
|
|
143
143
|
server.printUrls();
|
|
144
144
|
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
)
|
|
157
|
-
);
|
|
158
|
-
if (!isIOS) {
|
|
159
|
-
const processAdbReverseRemoteDEbug = require('child_process').spawn(
|
|
160
|
-
`adb`,
|
|
161
|
-
['reverse', `tcp:${remoteDebugPort}`, `tcp:${remoteDebugPort}`]
|
|
145
|
+
} else {
|
|
146
|
+
try {
|
|
147
|
+
chii.start({
|
|
148
|
+
port: remoteDebugPort,
|
|
149
|
+
});
|
|
150
|
+
logger.text(
|
|
151
|
+
chalk.green(
|
|
152
|
+
`${logSymbols.info} ${chalk.bold(
|
|
153
|
+
`Remote debugging tool is running at: http://localhost:${remoteDebugPort}`
|
|
154
|
+
)}`
|
|
155
|
+
)
|
|
162
156
|
);
|
|
157
|
+
if (!isIOS) {
|
|
158
|
+
const processAdbReverseRemoteDEbug = require('child_process').spawn(
|
|
159
|
+
`adb`,
|
|
160
|
+
['reverse', `tcp:${remoteDebugPort}`, `tcp:${remoteDebugPort}`]
|
|
161
|
+
);
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
processAdbReverseRemoteDEbug.stderr.on('data', function (data) {
|
|
164
|
+
logger.error(data.toString());
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
} catch (error) {
|
|
168
|
+
logger.text(
|
|
169
|
+
`${logSymbols.info} ${chalk.red(`Can not start remote debug server`)}`
|
|
170
|
+
);
|
|
167
171
|
}
|
|
168
|
-
} catch (error) {
|
|
169
|
-
logger.text(
|
|
170
|
-
`${logSymbols.info} ${chalk.red(`Can not start remote debug server`)}`
|
|
171
|
-
);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
spinner.stop();
|