@ttmg/cli 0.4.6-vibe-beta.21 → 0.4.6-vibe-beta.22

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttmg/cli",
3
- "version": "0.4.6-vibe-beta.21",
3
+ "version": "0.4.6-vibe-beta.22",
4
4
  "description": "TikTok Mini Game Command Line Tool",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -337,6 +337,8 @@ async function main() {
337
337
  });
338
338
  assert.equal(saved.code, 0, saved.stderr);
339
339
  const savedEvents = events(saved);
340
+ const waitingPage = savedEvents.find(e => e.status === 'waiting_authorization').pageUrl;
341
+ assert.deepEqual(saved.stderr.split(/\r?\n/).filter(line => line.startsWith('page: ')), [`page: ${waitingPage}`]);
340
342
  const savedFinal = savedEvents.at(-1);
341
343
  assert.equal(savedFinal.status, 'uploaded', JSON.stringify(savedEvents.map(e => ({ status: e.status, terminal: e.terminal, step: e.uploadStep, uploaded: e.uploaded }))));
342
344
  assert.equal(savedFinal.uploaded, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttmg/cli",
3
- "version": "0.4.6-vibe-beta.21",
3
+ "version": "0.4.6-vibe-beta.22",
4
4
  "description": "TikTok Mini Game Command Line Tool",
5
5
  "license": "ISC",
6
6
  "bin": {
package/vibe-upload.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  `ttmg upload --vibe` 将本地小游戏上传到 TikTok Mini Games。用户提供游戏标题和头像,在手机 TikTok 扫码授权后,CLI 自动完成头像、应用资料和代码包上传。Skill 负责准备工程、调用命令和读取结果;CLI 负责素材校验、打包、授权轮询及上传。
4
4
 
5
- `0.4.6-vibe-beta.21` 支持手机授权、自动上传、同任务轮询和双二维码预览,并兼容后端返回的 TikTok 客户端授权地址。左侧保留原码用于「查看进度」,右侧从加载态切换为「扫码预览」。页面按浏览器语言显示中英文。当前为 PPE 测试链路,上传完成不代表审核通过或正式发布。
5
+ `0.4.6-vibe-beta.22` 支持手机授权、自动上传、同任务轮询和双二维码预览,并兼容后端返回的 TikTok 客户端授权地址。NDJSON 模式下,即使 Skill 将 stdout 保存到文件,控制台仍会在扫码页就绪时显示 `page: <url>`。左侧保留原码用于「查看进度」,右侧从加载态切换为「扫码预览」。页面按浏览器语言显示中英文。当前为 PPE 测试链路,上传完成不代表审核通过或正式发布。
6
6
 
7
- Version `0.4.6-vibe-beta.21` supports phone authorization, automatic upload, same-task polling and two QR codes, including TikTok client authorization URLs returned by the backend. Check progress remains on the left, and the preview loader or QR appears on the right. This is a PPE trial; upload success is not review approval or production release.
7
+ Version `0.4.6-vibe-beta.22` supports phone authorization, automatic upload, same-task polling and two QR codes, including TikTok client authorization URLs returned by the backend. In NDJSON mode, the console shows `page: <url>` when the scan page is ready, even if the Skill saves stdout to a file. Check progress remains on the left, and the preview loader or QR appears on the right. This is a PPE trial; upload success is not review approval or production release.
8
8
 
9
9
  ## Quick Start
10
10
 
@@ -38,10 +38,10 @@ ttmg upload --vibe --dir ./game --title "星环守卫" --icon ./avatar.png --for
38
38
 
39
39
  在独立 Tool 工程目录调用:`ttmg upload --vibe --minis-type MINI_TOOL --dir ./tool --title "Focus Timer" --icon ./icon.png --format ndjson`。工程身份首次创建后固定类型,不要复用小游戏的 `.ttmg/vibe-project.json`。
40
40
 
41
- 安装后确认版本为 `0.4.6-vibe-beta.21`。能力声明中 `authorizationMode=qr`、`previewQr=true`,预览主码用途为 `game_preview`(Tool 为 `tool_preview`),原码仍保留。支持 Node.js 20.19.1–20.x 或 22 及以上版本。
41
+ 安装后确认版本为 `0.4.6-vibe-beta.22`。能力声明中 `authorizationMode=qr`、`previewQr=true`,预览主码用途为 `game_preview`(Tool 为 `tool_preview`),原码仍保留。支持 Node.js 20.19.1–20.x 或 22 及以上版本。
42
42
 
43
43
  ```sh
44
- npm install -g @ttmg/cli@0.4.6-vibe-beta.21
44
+ npm install -g @ttmg/cli@0.4.6-vibe-beta.22
45
45
  ttmg --version
46
46
  ttmg capabilities --format json
47
47
  ```
@@ -150,7 +150,7 @@ ttmg auth open --page-url <pageUrl> --format json
150
150
 
151
151
  ## 结构化状态与结果判断
152
152
 
153
- 输出 schema 为 `"2"`。每行 NDJSON 是同一 `operationId` 的状态快照;只有最后一行 `terminal=true`。`--format json` 仅在结束时向 stdout 输出一个对象,等待授权的本地页面地址写到 stderr。不要解析中文/英文文案判断状态。
153
+ 输出 schema 为 `"2"`。每行 NDJSON 是同一 `operationId` 的状态快照;只有最后一行 `terminal=true`。`--format ndjson` 在 `waiting_authorization` 时另向 stderr 输出一行 `page: <url>`,即使 stdout 重定向到文件也能在控制台看到本地二维码页地址。`--format json` 仅在结束时向 stdout 输出一个对象,等待授权的本地页面地址写到 stderr。不要解析中文/英文文案判断状态。
154
154
 
155
155
  - `precheck / packaging / prepared`:正在检查或准备素材;dry-run 的 prepared 为终态。
156
156