@ttmg/cli 0.1.1-beta.1 → 0.1.2-beta.1
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/CHANGELOG.md +3 -0
- package/dist/index.js +6 -5
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var glob = require('glob');
|
|
|
22
22
|
var got = require('got');
|
|
23
23
|
var FormData = require('form-data');
|
|
24
24
|
var ttmgPack = require('ttmg-pack');
|
|
25
|
-
var
|
|
25
|
+
var QRCode = require('qrcode');
|
|
26
26
|
|
|
27
27
|
function _interopNamespaceDefault(e) {
|
|
28
28
|
var n = Object.create(null);
|
|
@@ -1101,6 +1101,7 @@ class WsServer {
|
|
|
1101
1101
|
const method = clientMessage.method;
|
|
1102
1102
|
switch (method) {
|
|
1103
1103
|
case 'startUpload':
|
|
1104
|
+
console.log('startUpload');
|
|
1104
1105
|
this.sendUploadStatus('start');
|
|
1105
1106
|
uploadGame(({ status, percent, msg }) => {
|
|
1106
1107
|
if (status === 'process') {
|
|
@@ -1266,9 +1267,9 @@ async function showSchema() {
|
|
|
1266
1267
|
console.log(` 2. ${chalk.yellow.bold('Will auto upload compiled resource to client.')} ${chalk.bold(outputDir)}`);
|
|
1267
1268
|
console.log(` 3. ${chalk.yellow.bold('Debug your game in the browser.')}\n`);
|
|
1268
1269
|
const schema = `https://www.tiktok.com/ttmg/dev/${clientKey}?host=${localIP}&port=${DEV_WS_PORT}`;
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1270
|
+
QRCode.toString(schema, { type: 'terminal', version: 5 }, function (err, qr) {
|
|
1271
|
+
if (err)
|
|
1272
|
+
throw err;
|
|
1272
1273
|
console.log(qr);
|
|
1273
1274
|
});
|
|
1274
1275
|
}
|
|
@@ -1292,7 +1293,7 @@ async function dev() {
|
|
|
1292
1293
|
await watchChange();
|
|
1293
1294
|
}
|
|
1294
1295
|
|
|
1295
|
-
var version = "0.1.
|
|
1296
|
+
var version = "0.1.2-beta.1";
|
|
1296
1297
|
var pkg = {
|
|
1297
1298
|
version: version};
|
|
1298
1299
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2-beta.1",
|
|
4
4
|
"description": "TikTok Mini Game Command Line Tool",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"multer": "^2.0.2",
|
|
42
42
|
"open": "^10.2.0",
|
|
43
43
|
"prettier": "^3.6.2",
|
|
44
|
+
"qrcode": "^1.5.4",
|
|
44
45
|
"qrcode-terminal": "^0.12.0",
|
|
45
46
|
"ttmg-pack": "0.0.22",
|
|
46
47
|
"ws": "^8.18.3"
|