vibeview 0.14.0 → 0.14.2

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.
@@ -38,7 +38,7 @@ function resolveAuth(options) {
38
38
 
39
39
  // src/lib/api-client.ts
40
40
  import { openAsBlob, readFileSync as readFileSync2 } from "fs";
41
- import { createWriteStream, renameSync, rmSync } from "fs";
41
+ import { createWriteStream, mkdirSync as mkdirSync2, renameSync, rmSync } from "fs";
42
42
  import { basename, join as join2, resolve, sep } from "path";
43
43
  import { pipeline } from "stream/promises";
44
44
  import { Readable } from "stream";
@@ -332,6 +332,7 @@ var ApiClient = class {
332
332
  if (resolvedPath !== join2(resolvedDestDir, filename) || !resolvedPath.startsWith(resolvedDestDir + sep)) {
333
333
  throw new Error(`Refusing to write artifact outside destination directory: ${filename}`);
334
334
  }
335
+ mkdirSync2(resolvedDestDir, { recursive: true });
335
336
  if (!resp.body) {
336
337
  createWriteStream(path).end();
337
338
  return { filename, path };
@@ -5,7 +5,7 @@ import {
5
5
  loadConfig,
6
6
  resolveAuth,
7
7
  uploadAppBuild
8
- } from "./chunk-KUU4IUZU.js";
8
+ } from "./chunk-2WTLJ66O.js";
9
9
 
10
10
  // src/lib/dev-state.ts
11
11
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -998,6 +998,7 @@ function persistPickedAppId(cwd, cfg, platform, appId) {
998
998
  return next;
999
999
  }
1000
1000
  var CREATE_NEW_APP = "__vibeview_create_new_app__";
1001
+ var DONT_LINK_APP = "__vibeview_dont_link_app__";
1001
1002
  async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
1002
1003
  const createFromArtifact = /* @__PURE__ */ new Set();
1003
1004
  const missing = platforms.filter((p) => !cfgRef.current?.platforms?.[p]?.appId);
@@ -1021,7 +1022,9 @@ async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
1021
1022
  createFromArtifact.add(platform);
1022
1023
  if (!opts.json) {
1023
1024
  console.error(
1024
- chalk2.dim(`no ${platform} apps yet \u2014 this build will create one from the artifact`)
1025
+ chalk2.dim(
1026
+ opts.production ? `no ${platform} apps yet \u2014 production builds aren't linked to an app; the signed artifact will be available from the build itself` : `no ${platform} apps yet \u2014 this build will create one from the artifact`
1027
+ )
1025
1028
  );
1026
1029
  }
1027
1030
  continue;
@@ -1032,11 +1035,21 @@ async function resolveCloudAppIds(cwd, cfgRef, platforms, opts, listApps) {
1032
1035
  // one platform, so `(ios)` on every row would be pure noise (same
1033
1036
  // reasoning as dev.ts's picker).
1034
1037
  choices: [
1038
+ // Under --production a "Don't link an app" row leads the list (the
1039
+ // neutral default, since the create-from-artifact escape hatch below
1040
+ // is suppressed there): production builds aren't linked to an app
1041
+ // unless the user explicitly wants the link — see DONT_LINK_APP.
1042
+ ...opts.production ? [{ value: DONT_LINK_APP, name: "Don't link an app" }] : [],
1035
1043
  ...apps.map((a) => ({ value: a.public_id, name: a.name })),
1036
- { value: CREATE_NEW_APP, name: "Create a new app from this build" }
1044
+ // No create-from-artifact row under --production: a production build
1045
+ // never creates an app (internal_builds returns before app creation),
1046
+ // so offering it would promise something that can't happen. Picking
1047
+ // an EXISTING app is still meaningful — app-scoped signing
1048
+ // credentials resolve by app.
1049
+ ...opts.production ? [] : [{ value: CREATE_NEW_APP, name: "Create a new app from this build" }]
1037
1050
  ]
1038
1051
  });
1039
- if (appId === CREATE_NEW_APP) {
1052
+ if (appId === CREATE_NEW_APP || appId === DONT_LINK_APP) {
1040
1053
  createFromArtifact.add(platform);
1041
1054
  continue;
1042
1055
  }
@@ -1213,7 +1226,9 @@ ${offenders}`);
1213
1226
  return;
1214
1227
  }
1215
1228
  const finished = await waitForCloudBuilds(created, opts, d);
1216
- persistResolvedAppIds(cwd, cfgRef, createFromArtifact, finished.values());
1229
+ if (!opts.production) {
1230
+ persistResolvedAppIds(cwd, cfgRef, createFromArtifact, finished.values());
1231
+ }
1217
1232
  let downloadFailed = false;
1218
1233
  if (opts.download) {
1219
1234
  for (const b of finished.values()) {
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  readDevState,
14
14
  readMetroState,
15
15
  runAgentVerb
16
- } from "./chunk-J64ENS7W.js";
16
+ } from "./chunk-S3ANKSHB.js";
17
17
  import {
18
18
  ApiClient,
19
19
  EXIT_INFRA_ERROR,
@@ -26,7 +26,7 @@ import {
26
26
  resolveAuth,
27
27
  saveConfig,
28
28
  uploadApp
29
- } from "./chunk-KUU4IUZU.js";
29
+ } from "./chunk-2WTLJ66O.js";
30
30
 
31
31
  // src/cli.ts
32
32
  import { createRequire } from "module";
@@ -1288,7 +1288,10 @@ The build may still be running server-side \u2014 resume watching it with \`vibe
1288
1288
  id,
1289
1289
  platform: "",
1290
1290
  status,
1291
+ distribution: "simulator",
1291
1292
  app_public_id: null,
1293
+ app_name: null,
1294
+ requested_by: null,
1292
1295
  created_at: null,
1293
1296
  started_at: null,
1294
1297
  finished_at: null,
@@ -1296,6 +1299,9 @@ The build may still be running server-side \u2014 resume watching it with \`vibe
1296
1299
  used_free_quota: false,
1297
1300
  error_summary: null,
1298
1301
  app_build_id: null,
1302
+ has_artifact: false,
1303
+ artifact_size: 0,
1304
+ artifact_filename: null,
1299
1305
  timeout_s: 0
1300
1306
  };
1301
1307
  const final = await fetchFinalSummary(id, fallback, deps);
@@ -1791,16 +1797,24 @@ async function credentialsList(opts, deps) {
1791
1797
  process.exitCode = 1;
1792
1798
  }
1793
1799
  }
1800
+ function formatIdentity(c) {
1801
+ if (!c.fingerprint) return "";
1802
+ const [tag, ...rest] = c.fingerprint.split(":");
1803
+ const value = rest.join(":");
1804
+ if (tag === "cert-sha256") return `cert sha256:${value}`;
1805
+ if (tag === "file-sha256") return `keystore-file sha256:${value}`;
1806
+ return c.platform === "android" ? `keystore-file sha256:${c.fingerprint}` : `cert sha1:${c.fingerprint}`;
1807
+ }
1794
1808
  function formatCredentialsHuman(credentials2) {
1795
1809
  if (credentials2.length === 0) {
1796
1810
  return "No signing credentials found.\n";
1797
1811
  }
1798
- const HEADERS3 = ["NAME", "PLATFORM", "SCOPE", "FINGERPRINT", "EXPIRES"];
1812
+ const HEADERS3 = ["NAME", "PLATFORM", "SCOPE", "IDENTITY", "EXPIRES"];
1799
1813
  const rows = credentials2.map((c) => [
1800
1814
  c.name,
1801
1815
  c.platform,
1802
1816
  c.app_public_id ?? "org-wide",
1803
- c.fingerprint ?? "",
1817
+ formatIdentity(c),
1804
1818
  c.expires_at ? c.expires_soon ? `${c.expires_at} (soon)` : c.expires_at : ""
1805
1819
  ]);
1806
1820
  const widths = HEADERS3.map((h, i) => Math.max(h.length, ...rows.map((r) => r[i].length)));
@@ -2221,7 +2235,7 @@ program.command("dev-stop").description("Stop a `vibeview dev --detach` session
2221
2235
  program.command("mcp").description(
2222
2236
  "Run an MCP stdio server exposing the agent verbs (tap, swipe, type, ...) plus dev_start/dev_stop as tools"
2223
2237
  ).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").action(async (opts) => {
2224
- const { runMcpServer } = await import("./server-VF3N2CO5.js");
2238
+ const { runMcpServer } = await import("./server-LTJ4F4DC.js");
2225
2239
  await runMcpServer(opts);
2226
2240
  });
2227
2241
  program.command("agent-setup").description(
@@ -11,11 +11,11 @@ import {
11
11
  readDevState,
12
12
  renderEnvelope,
13
13
  startDevSession
14
- } from "./chunk-J64ENS7W.js";
14
+ } from "./chunk-S3ANKSHB.js";
15
15
  import {
16
16
  ApiClient,
17
17
  resolveAuth
18
- } from "./chunk-KUU4IUZU.js";
18
+ } from "./chunk-2WTLJ66O.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-3WXNF57W.js");
242
+ const { uploadAppBuild } = await import("./upload-app-NVPQ7KRO.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-KUU4IUZU.js";
5
+ } from "./chunk-2WTLJ66O.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.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "VibeView CLI -- run mobile tests from CI/CD pipelines",
5
5
  "type": "module",
6
6
  "bin": {