@ttmg/cli 0.4.5 → 0.4.6-vibe-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 +8 -0
- package/dist/index.js +8889 -2167
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -1
- package/dist/scripts/run-ts-test.js +41 -0
- package/package.json +5 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6-vibe-beta.1",
|
|
4
4
|
"description": "TikTok Mini Game Command Line Tool",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"build": "node scripts/build.js",
|
|
19
19
|
"verify:dist-version": "node scripts/verify-dist-version.js",
|
|
20
20
|
"test:network": "node -r ts-node/register src/commands/native/dev/utils/getLocalIPs.test.ts",
|
|
21
|
+
"test:upload-preview": "node scripts/run-ts-test.js src/commands/common/upload.test.ts",
|
|
22
|
+
"test:test-account": "node scripts/run-ts-test.js src/commands/common/testAccount.test.ts",
|
|
21
23
|
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag beta",
|
|
22
24
|
"setup": "node scripts/setup.js",
|
|
23
25
|
"reset:local-state": "node scripts/resetLocalState.js",
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
"ora": "^9.0.0",
|
|
60
62
|
"p-limit": "5.0.0",
|
|
61
63
|
"prettier": "^3.6.2",
|
|
64
|
+
"qrcode": "^1.5.4",
|
|
62
65
|
"qs": "6.12.1",
|
|
63
66
|
"semver": "^7.7.2",
|
|
64
67
|
"socks-proxy-agent": "^9.0.0",
|
|
@@ -77,6 +80,7 @@
|
|
|
77
80
|
"@rollup/plugin-terser": "^0.4.4",
|
|
78
81
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
79
82
|
"@types/node": "^24.2.0",
|
|
83
|
+
"@types/qrcode": "^1.5.5",
|
|
80
84
|
"compression": "^1.8.1",
|
|
81
85
|
"eslint": "^9.31.0",
|
|
82
86
|
"rollup": "^4.46.4",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const { execFileSync } = require('child_process');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const esbuild = require('esbuild');
|
|
6
|
+
|
|
7
|
+
const entry = process.argv[2];
|
|
8
|
+
if (!entry) {
|
|
9
|
+
throw new Error('Missing TypeScript test entry.');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ttmg-cli-test-'));
|
|
13
|
+
const outputFile = path.join(tempDir, 'test.cjs');
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
esbuild.buildSync({
|
|
17
|
+
entryPoints: [path.resolve(process.cwd(), entry)],
|
|
18
|
+
bundle: true,
|
|
19
|
+
platform: 'node',
|
|
20
|
+
format: 'cjs',
|
|
21
|
+
target: 'node20',
|
|
22
|
+
outfile: outputFile,
|
|
23
|
+
external: ['esbuild'],
|
|
24
|
+
sourcemap: 'inline',
|
|
25
|
+
logLevel: 'warning',
|
|
26
|
+
});
|
|
27
|
+
execFileSync(process.execPath, [outputFile], {
|
|
28
|
+
stdio: 'inherit',
|
|
29
|
+
env: {
|
|
30
|
+
...process.env,
|
|
31
|
+
NODE_PATH: [
|
|
32
|
+
path.resolve(process.cwd(), 'node_modules'),
|
|
33
|
+
process.env.NODE_PATH,
|
|
34
|
+
]
|
|
35
|
+
.filter(Boolean)
|
|
36
|
+
.join(path.delimiter),
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
} finally {
|
|
40
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttmg/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6-vibe-beta.1",
|
|
4
4
|
"description": "TikTok Mini Game Command Line Tool",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"build": "node scripts/build.js",
|
|
19
19
|
"verify:dist-version": "node scripts/verify-dist-version.js",
|
|
20
20
|
"test:network": "node -r ts-node/register src/commands/native/dev/utils/getLocalIPs.test.ts",
|
|
21
|
+
"test:upload-preview": "node scripts/run-ts-test.js src/commands/common/upload.test.ts",
|
|
22
|
+
"test:test-account": "node scripts/run-ts-test.js src/commands/common/testAccount.test.ts",
|
|
21
23
|
"publish:beta": "npm publish --registry=https://registry.npmjs.org/ --access public --tag beta",
|
|
22
24
|
"setup": "node scripts/setup.js",
|
|
23
25
|
"reset:local-state": "node scripts/resetLocalState.js",
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
"ora": "^9.0.0",
|
|
60
62
|
"p-limit": "5.0.0",
|
|
61
63
|
"prettier": "^3.6.2",
|
|
64
|
+
"qrcode": "^1.5.4",
|
|
62
65
|
"qs": "6.12.1",
|
|
63
66
|
"semver": "^7.7.2",
|
|
64
67
|
"socks-proxy-agent": "^9.0.0",
|
|
@@ -77,6 +80,7 @@
|
|
|
77
80
|
"@rollup/plugin-terser": "^0.4.4",
|
|
78
81
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
79
82
|
"@types/node": "^24.2.0",
|
|
83
|
+
"@types/qrcode": "^1.5.5",
|
|
80
84
|
"compression": "^1.8.1",
|
|
81
85
|
"eslint": "^9.31.0",
|
|
82
86
|
"rollup": "^4.46.4",
|