@ttmg/cli 0.1.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 +7 -9
- package/package.json +3 -2
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);
|
|
@@ -401,9 +401,6 @@ To update, run: ${chalk.magenta(`npm i -g ${pkgName}`)}
|
|
|
401
401
|
borderColor: 'yellowBright',
|
|
402
402
|
}));
|
|
403
403
|
}
|
|
404
|
-
else {
|
|
405
|
-
console.log(chalk.green('已是最新版本!'));
|
|
406
|
-
}
|
|
407
404
|
}
|
|
408
405
|
|
|
409
406
|
var libs = /*#__PURE__*/Object.freeze({
|
|
@@ -1103,7 +1100,8 @@ class WsServer {
|
|
|
1103
1100
|
if (from === 'browser') {
|
|
1104
1101
|
const method = clientMessage.method;
|
|
1105
1102
|
switch (method) {
|
|
1106
|
-
case '
|
|
1103
|
+
case 'startUpload':
|
|
1104
|
+
console.log('startUpload');
|
|
1107
1105
|
this.sendUploadStatus('start');
|
|
1108
1106
|
uploadGame(({ status, percent, msg }) => {
|
|
1109
1107
|
if (status === 'process') {
|
|
@@ -1269,9 +1267,9 @@ async function showSchema() {
|
|
|
1269
1267
|
console.log(` 2. ${chalk.yellow.bold('Will auto upload compiled resource to client.')} ${chalk.bold(outputDir)}`);
|
|
1270
1268
|
console.log(` 3. ${chalk.yellow.bold('Debug your game in the browser.')}\n`);
|
|
1271
1269
|
const schema = `https://www.tiktok.com/ttmg/dev/${clientKey}?host=${localIP}&port=${DEV_WS_PORT}`;
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1270
|
+
QRCode.toString(schema, { type: 'terminal', version: 5 }, function (err, qr) {
|
|
1271
|
+
if (err)
|
|
1272
|
+
throw err;
|
|
1275
1273
|
console.log(qr);
|
|
1276
1274
|
});
|
|
1277
1275
|
}
|
|
@@ -1295,7 +1293,7 @@ async function dev() {
|
|
|
1295
1293
|
await watchChange();
|
|
1296
1294
|
}
|
|
1297
1295
|
|
|
1298
|
-
var version = "0.1.1";
|
|
1296
|
+
var version = "0.1.2-beta.1";
|
|
1299
1297
|
var pkg = {
|
|
1300
1298
|
version: version};
|
|
1301
1299
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.1.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,8 +41,9 @@
|
|
|
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
|
-
"ttmg-pack": "
|
|
46
|
+
"ttmg-pack": "0.0.22",
|
|
46
47
|
"ws": "^8.18.3"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|