vibeview 0.20.0 → 0.20.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.
@@ -333,6 +333,7 @@ import { input, select } from "@inquirer/prompts";
333
333
  // src/lib/project-detect.ts
334
334
  import { existsSync as existsSync3, readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
335
335
  import { join as join4 } from "path";
336
+ import ignore from "ignore";
336
337
  function readJson(cwd, name) {
337
338
  try {
338
339
  return JSON.parse(readFileSync3(join4(cwd, name), "utf-8"));
@@ -359,8 +360,22 @@ function detectFlavor(cwd) {
359
360
  if (isFile(join4(cwd, "manifest"))) return "roku";
360
361
  return "unknown";
361
362
  }
362
- function isManagedExpo(cwd) {
363
- return detectFlavor(cwd) === "expo" && !existsSync3(join4(cwd, "android", "gradlew")) && iosWorkspaceName(cwd) === null;
363
+ function nativeDirShipped(cwd, dir) {
364
+ if (!existsSync3(join4(cwd, dir))) return false;
365
+ try {
366
+ const ig = ignore().add(readFileSync3(join4(cwd, ".gitignore"), "utf-8"));
367
+ return !ig.ignores(`${dir}/`);
368
+ } catch {
369
+ return true;
370
+ }
371
+ }
372
+ function isManagedExpo(cwd, platform) {
373
+ if (detectFlavor(cwd) !== "expo") return false;
374
+ const android = !nativeDirShipped(cwd, "android");
375
+ const ios = !nativeDirShipped(cwd, "ios");
376
+ if (platform === "android" || platform === "androidtv") return android;
377
+ if (platform === "ios" || platform === "tvos") return ios;
378
+ return android && ios;
364
379
  }
365
380
  function iosWorkspaceName(cwd) {
366
381
  try {
@@ -372,6 +387,18 @@ function iosWorkspaceName(cwd) {
372
387
  }
373
388
  var IOS_ARTIFACT = "ios/build/Build/Products/Debug-iphonesimulator/*.app";
374
389
  var ANDROID_ARTIFACT = "android/app/build/outputs/apk/debug/*.apk";
390
+ function installCommand(cwd) {
391
+ if (existsSync3(join4(cwd, "yarn.lock"))) return "yarn install --immutable";
392
+ if (existsSync3(join4(cwd, "pnpm-lock.yaml"))) return "pnpm install --frozen-lockfile";
393
+ if (existsSync3(join4(cwd, "package-lock.json"))) return "npm ci";
394
+ return "yarn install --immutable";
395
+ }
396
+ function managedExpoAndroidCommand(cwd) {
397
+ return `${installCommand(cwd)} && npx expo prebuild --platform android --no-install && cd android && ./gradlew assembleDebug`;
398
+ }
399
+ function managedExpoIosCommand(cwd, name) {
400
+ return `${installCommand(cwd)} && npx expo prebuild --platform ios && xcodebuild -workspace ios/${name}.xcworkspace -scheme ${name} -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build CODE_SIGNING_ALLOWED=NO`;
401
+ }
375
402
  var ROKU_DEFAULT_ARTIFACT = "out/channel.zip";
376
403
  var ROKU_ZIP_COMMAND = "zip -r out/channel.zip manifest source components images -x '*.DS_Store'";
377
404
  function rokuDefaults(cwd) {
@@ -401,15 +428,17 @@ function defaultsFor(cwd, platform) {
401
428
  const metroCommand = flavor === "expo" ? "npx expo start" : "yarn start";
402
429
  if (platform === "tvos" || platform === "androidtv") return { metroCommand };
403
430
  if (platform === "android") {
431
+ const managed = isManagedExpo(cwd, "android");
404
432
  return {
405
- buildCommand: flavor === "expo" ? "npx expo run:android --variant debug" : "cd android && ./gradlew assembleDebug",
433
+ buildCommand: managed ? managedExpoAndroidCommand(cwd) : "cd android && ./gradlew assembleDebug",
406
434
  artifact: ANDROID_ARTIFACT,
407
435
  metroCommand
408
436
  };
409
437
  }
410
- if (flavor === "expo") {
438
+ if (isManagedExpo(cwd, "ios")) {
439
+ const name = managedExpoIosName(cwd);
411
440
  return {
412
- buildCommand: "npx expo run:ios --configuration Debug",
441
+ buildCommand: name ? managedExpoIosCommand(cwd, name) : void 0,
413
442
  artifact: IOS_ARTIFACT,
414
443
  metroCommand
415
444
  };
@@ -422,9 +451,13 @@ function defaultsFor(cwd, platform) {
422
451
  };
423
452
  }
424
453
  var ANDROID_PRODUCTION_ARTIFACT = "android/app/build/outputs/bundle/release/*.aab";
425
- var ANDROID_PRODUCTION_COMMAND = "yarn install --immutable && cd android && ./gradlew bundleRelease";
454
+ function androidProductionCommand(cwd) {
455
+ return `${installCommand(cwd)} && cd android && ./gradlew bundleRelease`;
456
+ }
426
457
  var IOS_PRODUCTION_ARTIFACT = "ios/build/*.ipa";
427
- var MANAGED_EXPO_ANDROID_PRODUCTION_COMMAND = "yarn install --immutable && npx expo prebuild --platform android --no-install && cd android && ./gradlew bundleRelease";
458
+ function managedExpoAndroidProductionCommand(cwd) {
459
+ return `${installCommand(cwd)} && npx expo prebuild --platform android --no-install && cd android && ./gradlew bundleRelease`;
460
+ }
428
461
  function expoSanitizedName(name) {
429
462
  return name.replace(/[\W_]+/g, "").normalize("NFD").replace(/[\u0300-\u036f]/g, "");
430
463
  }
@@ -449,7 +482,7 @@ function iosArchiveExportCommand(ws) {
449
482
  function productionDefaultsFor(cwd, platform) {
450
483
  if (platform === "android" || platform === "androidtv") {
451
484
  return {
452
- buildCommand: isManagedExpo(cwd) ? MANAGED_EXPO_ANDROID_PRODUCTION_COMMAND : ANDROID_PRODUCTION_COMMAND,
485
+ buildCommand: isManagedExpo(cwd, "android") ? managedExpoAndroidProductionCommand(cwd) : androidProductionCommand(cwd),
453
486
  artifact: ANDROID_PRODUCTION_ARTIFACT
454
487
  };
455
488
  }
@@ -457,18 +490,18 @@ function productionDefaultsFor(cwd, platform) {
457
490
  return { artifact: IOS_PRODUCTION_ARTIFACT };
458
491
  }
459
492
  if (platform === "ios") {
460
- if (isManagedExpo(cwd)) {
493
+ if (isManagedExpo(cwd, "ios")) {
461
494
  const name = managedExpoIosName(cwd);
462
495
  if (!name) return { artifact: IOS_PRODUCTION_ARTIFACT };
463
496
  return {
464
- buildCommand: "yarn install --immutable && npx expo prebuild --platform ios && " + iosArchiveExportCommand(name),
497
+ buildCommand: `${installCommand(cwd)} && npx expo prebuild --platform ios && ` + iosArchiveExportCommand(name),
465
498
  artifact: IOS_PRODUCTION_ARTIFACT
466
499
  };
467
500
  }
468
501
  const ws = iosWorkspaceName(cwd);
469
502
  if (!ws) return { artifact: IOS_PRODUCTION_ARTIFACT };
470
503
  return {
471
- buildCommand: `yarn install --immutable && ${iosArchiveExportCommand(ws)}`,
504
+ buildCommand: `${installCommand(cwd)} && ${iosArchiveExportCommand(ws)}`,
472
505
  artifact: IOS_PRODUCTION_ARTIFACT
473
506
  };
474
507
  }
@@ -581,7 +614,7 @@ import { execFile, spawn } from "child_process";
581
614
  import { lstatSync, mkdtempSync as mkdtempSync2, readFileSync as readFileSync4, rmSync as rmSync3, statSync as statSync3, writeFileSync as writeFileSync3 } from "fs";
582
615
  import { tmpdir as tmpdir2 } from "os";
583
616
  import { join as join5 } from "path";
584
- import ignore from "ignore";
617
+ import ignore2 from "ignore";
585
618
  var NotAGitRepoError = class extends Error {
586
619
  constructor(message) {
587
620
  super(message);
@@ -608,7 +641,7 @@ async function listSourceFiles(projectRoot) {
608
641
  let filtered = rawPaths;
609
642
  const vvignorePath = join5(projectRoot, ".vvignore");
610
643
  if (statOrNull(vvignorePath)?.isFile()) {
611
- const ig = ignore().add(readFileSync4(vvignorePath, "utf-8"));
644
+ const ig = ignore2().add(readFileSync4(vvignorePath, "utf-8"));
612
645
  filtered = filtered.filter((p) => !ig.ignores(p));
613
646
  }
614
647
  const result = [];
package/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  readDevState,
16
16
  readMetroState,
17
17
  runAgentVerb
18
- } from "./chunk-GUCKFB4K.js";
18
+ } from "./chunk-QZNZPKHV.js";
19
19
  import {
20
20
  ApiClient,
21
21
  EXIT_INFRA_ERROR,
@@ -3255,7 +3255,7 @@ program.command("dev-stop").description("Stop a `vibeview dev --detach` session
3255
3255
  program.command("mcp").description(
3256
3256
  "Run an MCP stdio server exposing the agent verbs (tap, swipe, type, ...) plus dev_start/dev_stop as tools"
3257
3257
  ).option("--token <token>", "API token (or set VIBEVIEW_API_TOKEN)").action(async (opts) => {
3258
- const { runMcpServer } = await import("./server-NR3ZPQF5.js");
3258
+ const { runMcpServer } = await import("./server-UN5JRYGY.js");
3259
3259
  await runMcpServer(opts);
3260
3260
  });
3261
3261
  program.command("agent-setup").description(
@@ -11,7 +11,7 @@ import {
11
11
  readDevState,
12
12
  renderEnvelope,
13
13
  startDevSession
14
- } from "./chunk-GUCKFB4K.js";
14
+ } from "./chunk-QZNZPKHV.js";
15
15
  import {
16
16
  ApiClient,
17
17
  resolveAuth
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "vibeview",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "description": "VibeView CLI -- run mobile tests from CI/CD pipelines",
5
+ "mcpName": "io.github.vibeview/vibeview",
5
6
  "type": "module",
6
7
  "bin": {
7
8
  "vibeview": "./dist/cli.js"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vibeview-agent
3
- description: Verify a React Native change on a real running app — install/launch it on a live iOS or Android device via VibeView, drive the UI, and check the result. Use when asked to verify this change on a device, test my React Native app, or run it on a simulator.
3
+ description: Verify a React Native change on a real running app — install/launch it on a live iOS, Android, Apple TV or Android TV device via VibeView, drive the UI, and check the result. Use when asked to verify this change on a device, test my React Native app, or run it on a simulator.
4
4
  ---
5
5
 
6
6
  # VibeView agent control