@ttmg/cli 0.4.6-vibe-beta.20 → 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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ### @ttmg/cli
2
2
 
3
- `0.4.6-vibe-beta.20`:扫码授权后自动上传,并持续查询同一任务。左侧保留原码用于「查看进度」,右侧从加载态切换为「扫码预览」;两个二维码图案尺寸和白边一致。头像与整块应用信息垂直居中,标题、说明和进度条间距已调整。兼容状态 9(等待提交代码审核),无需先提审即可展示后端返回的预览码。
3
+ `0.4.6-vibe-beta.22`:`--format ndjson` 扫码授权页就绪时,stderr 会输出一次 `page: <url>`;即使 Skill 将 stdout 保存为 `vibe.ndjson`,开发者仍能在控制台看到页面地址。授权、上传和双二维码预览流程与 beta.21 一致。
4
4
 
5
- Version `0.4.6-vibe-beta.20`: authorize in TikTok, upload, and keep polling the same task. The original QR stays on the left for checking progress; the loader on the right becomes the preview QR when ready. Both codes have equal visible sizes and quiet zones. The icon is vertically centered beside the app details, with adjusted spacing between the heading, description and progress bar. Status 9 (waiting for review submission) supports preview without requiring review submission first.
5
+ Version `0.4.6-vibe-beta.22`: when the authorization page is ready, `--format ndjson` writes one `page: <url>` line to stderr. Developers can see the page address in the console even when the Skill saves stdout to `vibe.ndjson`. The authorization, upload and two-QR preview flow remains the same as beta.21.
6
6
 
7
7
  默认总等待时间为 30 分钟,`--timeout <seconds>` 最长可设 60 分钟。页面在任务进行中保持可用,CLI 结束后再保留 30 分钟;失败仍保留上传回执,勿直接重传。页面随浏览器语言显示中英文。
8
8
 
@@ -26,7 +26,7 @@ Vibe 版本支持手机扫码授权上传、可选 `--description`、分类查
26
26
  固定版本安装(发布标签为 `vibe-beta`):
27
27
 
28
28
  ```bash
29
- npm install -g @ttmg/cli@0.4.6-vibe-beta.20
29
+ npm install -g @ttmg/cli@0.4.6-vibe-beta.22
30
30
  ttmg --version
31
31
  ttmg capabilities --format json
32
32
  ttmg upload --help
package/dist/index.js CHANGED
@@ -16386,7 +16386,7 @@ async function authStatus(options = {}) {
16386
16386
  return result;
16387
16387
  }
16388
16388
 
16389
- var version = "0.4.6-vibe-beta.20";
16389
+ var version = "0.4.6-vibe-beta.22";
16390
16390
  var engines = {
16391
16391
  node: ">=20.19.1 <21 || >=22"
16392
16392
  };
@@ -18758,6 +18758,7 @@ function createBackend(mode, transport) {
18758
18758
  signal,
18759
18759
  });
18760
18760
  if (!nonempty(data.import_token) ||
18761
+ !nonempty(data.landing_url) ||
18761
18762
  !Number.isFinite(data.poll_interval_seconds) ||
18762
18763
  data.poll_interval_seconds <= 0 ||
18763
18764
  data.poll_interval_seconds > 3600)
@@ -18765,7 +18766,7 @@ function createBackend(mode, transport) {
18765
18766
  return {
18766
18767
  taskId: taskId(data.task_id),
18767
18768
  importToken: data.import_token,
18768
- landingUrl: safeWebUrl(data.landing_url),
18769
+ landingUrl: data.landing_url,
18769
18770
  pollIntervalSeconds: data.poll_interval_seconds,
18770
18771
  };
18771
18772
  },
@@ -19068,7 +19069,7 @@ function createMockBackend(scenario = 'success') {
19068
19069
  function createAuthorizationScheme(landingUrl) {
19069
19070
  // QR and browser authorization use the same backend-provided landing URL.
19070
19071
  // Preserve its query exactly; do not wrap it in an app scheme or re-encode it.
19071
- return safeWebUrl(landingUrl);
19072
+ return landingUrl;
19072
19073
  }
19073
19074
 
19074
19075
  const DEV_PORT = 3000;
@@ -20655,8 +20656,11 @@ async function vibeUpload(options) {
20655
20656
  try {
20656
20657
  const format = options.format || 'text';
20657
20658
  const result = await executeVibeUpload(options, event => {
20658
- if (format === 'ndjson')
20659
+ if (format === 'ndjson') {
20659
20660
  console.log(JSON.stringify(event));
20661
+ if (event.status === 'waiting_authorization' && event.pageUrl)
20662
+ console.error(`page: ${event.pageUrl}`);
20663
+ }
20660
20664
  else if (format === 'text')
20661
20665
  console.log(`${event.simulation ? '[MOCK] ' : ''}${event.message}${event.status === 'uploading' && percent(event.loadedBytes, event.totalBytes) !== undefined ? ` ${percent(event.loadedBytes, event.totalBytes)}%` : ''}${event.pageUrl && ['waiting_authorization', 'uploaded'].includes(event.status) ? `\n${event.pageUrl}` : ''}${event.errorCode ? ` (${event.errorCode})` : ''}`);
20662
20666
  else if (event.status === 'waiting_authorization')