vibeview 0.20.2 → 0.20.4

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.
@@ -6,7 +6,7 @@ import {
6
6
  loadConfig,
7
7
  resolveAuth,
8
8
  uploadAppBuild
9
- } from "./chunk-MCCXPIGE.js";
9
+ } from "./chunk-KON2FOEC.js";
10
10
 
11
11
  // src/lib/dev-state.ts
12
12
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -490,6 +490,15 @@ var ApiClient = class {
490
490
  ...body.changesNotSentForReview !== void 0 ? { changes_not_sent_for_review: body.changesNotSentForReview } : {}
491
491
  });
492
492
  }
493
+ /** GET /api/v1/submissions/preflight — is the store ready to receive
494
+ * this app? Answers by identifier (bundle id / package name), so it can
495
+ * run before any build exists. Always resolves — a "not ready" is an
496
+ * answer carried in `status`/`message`, never a thrown error. */
497
+ async checkStorePreflight(q) {
498
+ const params = new URLSearchParams({ platform: q.platform, identifier: q.identifier });
499
+ if (q.ascKey !== void 0) params.set("asc_key", q.ascKey);
500
+ return this.requestRaw("GET", `/submissions/preflight?${params.toString()}`);
501
+ }
493
502
  /** GET /api/v1/submissions?build=<id> — that build's submissions, newest
494
503
  * first. */
495
504
  async listSubmissions(build) {
package/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  readDevState,
16
16
  readMetroState,
17
17
  runAgentVerb
18
- } from "./chunk-QZNZPKHV.js";
18
+ } from "./chunk-BBGXBKJQ.js";
19
19
  import {
20
20
  ApiClient,
21
21
  EXIT_INFRA_ERROR,
@@ -28,7 +28,7 @@ import {
28
28
  resolveAuth,
29
29
  saveConfig,
30
30
  uploadApp
31
- } from "./chunk-MCCXPIGE.js";
31
+ } from "./chunk-KON2FOEC.js";
32
32
 
33
33
  // src/cli.ts
34
34
  import { createRequire } from "module";
@@ -1387,7 +1387,8 @@ function defaultDeps2(client) {
1387
1387
  createSubmission: client.createSubmission.bind(client),
1388
1388
  getSubmission: client.getSubmission.bind(client),
1389
1389
  getSubmissionLog: client.getSubmissionLog.bind(client),
1390
- listCloudBuilds: client.listCloudBuilds.bind(client)
1390
+ listCloudBuilds: client.listCloudBuilds.bind(client),
1391
+ checkStorePreflight: client.checkStorePreflight.bind(client)
1391
1392
  };
1392
1393
  }
1393
1394
  var POLL_INTERVAL_MS2 = 2e3;
@@ -1450,10 +1451,20 @@ async function submitCommand(opts, deps) {
1450
1451
  }
1451
1452
  const platform = opts.platform;
1452
1453
  const androidFamily = platform === "android" || platform === "androidtv";
1453
- if (opts.build && opts.latest) {
1454
+ if (opts.check && (opts.build || opts.latest)) {
1455
+ throw new UsageError(
1456
+ "--check looks the app up by identifier, not by build \u2014 drop --build/--latest (pass --bundle-id for ios/tvos or --package for android/androidtv)"
1457
+ );
1458
+ }
1459
+ if (!opts.check && opts.bundleId !== void 0) {
1460
+ throw new UsageError(
1461
+ "--bundle-id only applies with --check \u2014 a submission reads the bundle id from the build itself"
1462
+ );
1463
+ }
1464
+ if (!opts.check && opts.build && opts.latest) {
1454
1465
  throw new UsageError("pass either --build <id> or --latest, not both");
1455
1466
  }
1456
- if (!opts.build && !opts.latest) {
1467
+ if (!opts.check && !opts.build && !opts.latest) {
1457
1468
  throw new UsageError(
1458
1469
  "pass --build <id> (see `vibeview builds list`) or --latest (the newest succeeded production build for this platform)"
1459
1470
  );
@@ -1467,6 +1478,11 @@ async function submitCommand(opts, deps) {
1467
1478
  if (androidFamily && opts.ascKey !== void 0) {
1468
1479
  throw new UsageError(`--asc-key only applies to ios/tvos (TestFlight) \u2014 not ${platform}`);
1469
1480
  }
1481
+ if (androidFamily && opts.bundleId !== void 0) {
1482
+ throw new UsageError(
1483
+ `--bundle-id only applies to ios/tvos \u2014 for ${platform} pass --package <name>`
1484
+ );
1485
+ }
1470
1486
  if (!androidFamily && opts.releaseStatus !== void 0) {
1471
1487
  throw new UsageError(
1472
1488
  `--release-status only applies to android/androidtv (Play) \u2014 not ${platform}`
@@ -1508,6 +1524,10 @@ async function submitCommand(opts, deps) {
1508
1524
  const { token, baseUrl } = resolveAuth(opts);
1509
1525
  const client = new ApiClient(baseUrl, token);
1510
1526
  const d = deps ?? defaultDeps2(client);
1527
+ if (opts.check) {
1528
+ await checkStore(platform, androidFamily, ascKey2, opts, d);
1529
+ return;
1530
+ }
1511
1531
  try {
1512
1532
  const buildId = opts.build ?? await resolveLatestBuild(platform, d);
1513
1533
  const sub = await d.createSubmission({
@@ -1546,6 +1566,37 @@ async function submitCommand(opts, deps) {
1546
1566
  process.exitCode = 1;
1547
1567
  }
1548
1568
  }
1569
+ async function checkStore(platform, androidFamily, ascKey2, opts, deps) {
1570
+ const identifier = androidFamily ? opts.package : opts.bundleId;
1571
+ if (!identifier) {
1572
+ throw new UsageError(
1573
+ androidFamily ? `--check needs the package name to look up: --package <name> (e.g. --package io.example.app)` : `--check needs the bundle identifier to look up: --bundle-id <id> (e.g. --bundle-id io.example.app)`
1574
+ );
1575
+ }
1576
+ try {
1577
+ const result = await deps.checkStorePreflight({
1578
+ platform,
1579
+ identifier,
1580
+ ...ascKey2 !== void 0 ? { ascKey: ascKey2 } : {}
1581
+ });
1582
+ emit(opts.json, { event: "preflight", ...result });
1583
+ if (!opts.json) {
1584
+ const mark = result.ready ? chalk12.green("\u2713") : chalk12.red("\u2717");
1585
+ console.error(`${mark} ${result.message}`);
1586
+ if (result.ready) {
1587
+ console.error(
1588
+ chalk12.dim(
1589
+ ` next: vibeview build --cloud --production --platform ${platform}, then vibeview submit --platform ${platform} --latest`
1590
+ )
1591
+ );
1592
+ }
1593
+ }
1594
+ process.exitCode = result.ready ? 0 : 1;
1595
+ } catch (err) {
1596
+ printError2(opts, err);
1597
+ process.exitCode = 1;
1598
+ }
1599
+ }
1549
1600
  async function resolveLatestBuild(platform, deps) {
1550
1601
  const { builds: builds2 } = await deps.listCloudBuilds({
1551
1602
  platform,
@@ -2979,7 +3030,7 @@ Suggested line for your project's ${chalk19.bold("CLAUDE.md")} (or ${chalk19.bol
2979
3030
  `);
2980
3031
  console.log(
2981
3032
  chalk19.dim(
2982
- "Other agents (Cursor, Copilot, Codex, ...): point them at the skill file above, or\nadd the MCP server per client \u2014 see https://vibeview.io/docs/agent-control"
3033
+ "Other agents (Cursor, Copilot, Codex, ...): install the same skill from GitHub with\n npx skills add vibeview/skills\nor point them at the skill file above, or add the MCP server per client \u2014\nsee https://vibeview.io/docs/agent-control"
2983
3034
  )
2984
3035
  );
2985
3036
  }
@@ -3163,7 +3214,11 @@ program.command("submit").description(
3163
3214
  ).option(
3164
3215
  "--rollout <fraction>",
3165
3216
  "android/androidtv only: staged-rollout fraction, 0 < f < 1 (requires --release-status inProgress)"
3166
- ).option("--no-wait", "Print the submission id and exit without waiting for completion").option("--json", "Emit line-delimited JSON events on stdout instead of human output", false).action((opts) => submitCommand(opts));
3217
+ ).option(
3218
+ "--check",
3219
+ "Only check store readiness: does the store know this app with your stored key? Takes --platform plus --bundle-id (ios/tvos) or --package (android/androidtv); no build needed. Exit 0 when ready",
3220
+ false
3221
+ ).option("--bundle-id <id>", "ios/tvos, with --check: the bundle identifier to look up").option("--no-wait", "Print the submission id and exit without waiting for completion").option("--json", "Emit line-delimited JSON events on stdout instead of human output", false).action((opts) => submitCommand(opts));
3167
3222
  var builds = program.command("builds").description("Manage cloud builds (see `vibeview build --cloud`)");
3168
3223
  builds.command("list").description("List cloud builds in your organization").option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--json", "Print the raw build summaries as a JSON array", false).option("--limit <n>", "Max builds to return (default 50, max 200)").action((opts) => buildsList(opts));
3169
3224
  builds.command("logs <id>").description("Print a cloud build's log output").option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").option("--json", "Print NDJSON log/outcome events instead of raw text", false).option("--follow", "Keep polling until the build reaches a terminal status", false).action((id, opts) => buildsLogs(id, opts));
@@ -3255,7 +3310,7 @@ program.command("dev-stop").description("Stop a `vibeview dev --detach` session
3255
3310
  program.command("mcp").description(
3256
3311
  "Run an MCP stdio server exposing the agent verbs (tap, swipe, type, ...) plus dev_start/dev_stop as tools"
3257
3312
  ).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").action(async (opts) => {
3258
- const { runMcpServer } = await import("./server-UN5JRYGY.js");
3313
+ const { runMcpServer } = await import("./server-WOIB6CDQ.js");
3259
3314
  await runMcpServer(opts);
3260
3315
  });
3261
3316
  program.command("agent-setup").description(
@@ -11,11 +11,11 @@ import {
11
11
  readDevState,
12
12
  renderEnvelope,
13
13
  startDevSession
14
- } from "./chunk-QZNZPKHV.js";
14
+ } from "./chunk-BBGXBKJQ.js";
15
15
  import {
16
16
  ApiClient,
17
17
  resolveAuth
18
- } from "./chunk-MCCXPIGE.js";
18
+ } from "./chunk-KON2FOEC.js";
19
19
 
20
20
  // src/mcp/server.ts
21
21
  import { writeFileSync } from "fs";
@@ -239,7 +239,7 @@ async function handleUploadApp(args, deps) {
239
239
  }
240
240
  const name = typeof args.name === "string" && args.name ? args.name : void 0;
241
241
  const upload = deps.uploadApp ?? (async (f, n) => {
242
- const { uploadAppBuild } = await import("./upload-app-HUMMA6UY.js");
242
+ const { uploadAppBuild } = await import("./upload-app-W6NOSJPA.js");
243
243
  const { result: result2 } = await uploadAppBuild(f, { ...deps.auth, name: n });
244
244
  return result2;
245
245
  });
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  uploadApp,
4
4
  uploadAppBuild
5
- } from "./chunk-MCCXPIGE.js";
5
+ } from "./chunk-KON2FOEC.js";
6
6
  export {
7
7
  uploadApp,
8
8
  uploadAppBuild
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeview",
3
- "version": "0.20.2",
3
+ "version": "0.20.4",
4
4
  "description": "VibeView CLI -- run mobile tests from CI/CD pipelines",
5
5
  "mcpName": "io.github.vibeview/vibeview",
6
6
  "type": "module",