@rehpic/vcli 0.1.0-beta.47.1 → 0.1.0-beta.48.1

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/index.js CHANGED
@@ -3747,8 +3747,11 @@ serviceCommand.command("start").description("Start the bridge service via Launch
3747
3747
  console.log(`Bridge is already running (PID ${existing.pid}).`);
3748
3748
  return;
3749
3749
  }
3750
+ const { spinner } = await import("@clack/prompts");
3751
+ const s = spinner();
3750
3752
  let config = loadBridgeConfig();
3751
3753
  if (!config) {
3754
+ s.start("Registering device...");
3752
3755
  const runtime = await getRuntime(command);
3753
3756
  const session = requireSession(runtime);
3754
3757
  const client = await createConvexClient(
@@ -3757,18 +3760,20 @@ serviceCommand.command("start").description("Start the bridge service via Launch
3757
3760
  runtime.convexUrl
3758
3761
  );
3759
3762
  const user = await runQuery(client, api.users.currentUser);
3760
- if (!user) throw new Error("Not logged in. Run `vcli auth login` first.");
3763
+ if (!user) {
3764
+ s.stop("Failed");
3765
+ throw new Error("Not logged in. Run `vcli auth login` first.");
3766
+ }
3761
3767
  config = await setupBridgeDevice(runtime.convexUrl, user._id);
3762
- console.log(
3763
- `Device registered: ${config.displayName} (${config.deviceId})`
3764
- );
3768
+ s.stop(`Device registered: ${config.displayName}`);
3765
3769
  }
3766
3770
  if (osPlatform() === "darwin") {
3771
+ s.start("Starting bridge service...");
3767
3772
  const vcliPath = process.argv[1] ?? "vcli";
3768
3773
  installLaunchAgent(vcliPath);
3769
3774
  loadLaunchAgent();
3770
3775
  await launchMenuBar();
3771
- console.log("Bridge service started.");
3776
+ s.stop("Bridge service started.");
3772
3777
  } else {
3773
3778
  console.log(
3774
3779
  "Starting bridge in foreground (use systemd for background)..."
@@ -3825,8 +3830,11 @@ serviceCommand.command("install").description("Install the bridge as a system se
3825
3830
  console.error("On Linux, use systemd --user manually for now.");
3826
3831
  return;
3827
3832
  }
3833
+ const { spinner } = await import("@clack/prompts");
3834
+ const s = spinner();
3828
3835
  let config = loadBridgeConfig();
3829
3836
  if (!config) {
3837
+ s.start("Registering device...");
3830
3838
  const runtime = await getRuntime(command);
3831
3839
  const session = requireSession(runtime);
3832
3840
  const client = await createConvexClient(
@@ -3835,16 +3843,24 @@ serviceCommand.command("install").description("Install the bridge as a system se
3835
3843
  runtime.convexUrl
3836
3844
  );
3837
3845
  const user = await runQuery(client, api.users.currentUser);
3838
- if (!user) throw new Error("Not logged in. Run `vcli auth login` first.");
3846
+ if (!user) {
3847
+ s.stop("Failed");
3848
+ throw new Error("Not logged in. Run `vcli auth login` first.");
3849
+ }
3839
3850
  config = await setupBridgeDevice(runtime.convexUrl, user._id);
3840
- console.log(
3841
- `Device registered: ${config.displayName} (${config.deviceId})`
3842
- );
3851
+ s.stop(`Device registered: ${config.displayName}`);
3843
3852
  }
3853
+ s.start("Installing LaunchAgent...");
3844
3854
  const vcliPath = process.argv[1] ?? "vcli";
3845
3855
  installLaunchAgent(vcliPath);
3856
+ s.stop("LaunchAgent installed");
3857
+ s.start("Starting bridge service...");
3846
3858
  loadLaunchAgent();
3859
+ s.stop("Bridge service started");
3860
+ s.start("Launching menu bar...");
3847
3861
  await launchMenuBar();
3862
+ s.stop("Menu bar ready");
3863
+ console.log("");
3848
3864
  console.log(
3849
3865
  "Bridge installed and running. Will start automatically on login."
3850
3866
  );