claudekit-cli 3.41.4-dev.27 → 3.41.4-dev.29

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
@@ -14750,7 +14750,8 @@ var init_desktop = __esm(() => {
14750
14750
  "darwin-x86_64": DesktopPlatformAssetSchema,
14751
14751
  "linux-x86_64": DesktopPlatformAssetSchema,
14752
14752
  "windows-x86_64": DesktopPlatformAssetSchema
14753
- })
14753
+ }),
14754
+ channel: exports_external.enum(["stable", "dev"]).default("stable")
14754
14755
  });
14755
14756
  });
14756
14757
 
@@ -60662,7 +60663,7 @@ var package_default;
60662
60663
  var init_package = __esm(() => {
60663
60664
  package_default = {
60664
60665
  name: "claudekit-cli",
60665
- version: "3.41.4-dev.27",
60666
+ version: "3.41.4-dev.29",
60666
60667
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
60667
60668
  type: "module",
60668
60669
  repository: {
@@ -79053,12 +79054,19 @@ function launchDesktopApp(binaryPath, options2 = {}) {
79053
79054
  }
79054
79055
  // src/domains/desktop/desktop-release-service.ts
79055
79056
  var DESKTOP_RELEASE_REPOSITORY = "https://github.com/mrgoonie/claudekit-cli/releases/download";
79056
- function getDesktopManifestUrl(version) {
79057
- const tag = version ? `desktop-v${version}` : "desktop-latest";
79057
+ function getDesktopManifestUrl(opts) {
79058
+ const version = opts?.version;
79059
+ const channel = opts?.channel ?? "stable";
79060
+ let tag;
79061
+ if (version) {
79062
+ tag = `desktop-v${version}`;
79063
+ } else {
79064
+ tag = channel === "dev" ? "desktop-latest-dev" : "desktop-latest";
79065
+ }
79058
79066
  return `${DESKTOP_RELEASE_REPOSITORY}/${tag}/desktop-manifest.json`;
79059
79067
  }
79060
- async function fetchDesktopReleaseManifest(version, fetchFn = globalThis.fetch) {
79061
- const response = await fetchFn(getDesktopManifestUrl(version));
79068
+ async function fetchDesktopReleaseManifest(opts, fetchFn = globalThis.fetch) {
79069
+ const response = await fetchFn(getDesktopManifestUrl(opts));
79062
79070
  if (!response.ok) {
79063
79071
  throw new Error(`Failed to fetch desktop manifest: ${response.status} ${response.statusText}`);
79064
79072
  }
@@ -79529,7 +79537,7 @@ function getDesktopBinaryPath(options2 = {}) {
79529
79537
  }
79530
79538
  async function downloadDesktopBinary(version, options2 = {}) {
79531
79539
  const fetchManifest = options2.fetchManifest || fetchDesktopReleaseManifest;
79532
- const manifest = await fetchManifest(version);
79540
+ const manifest = await fetchManifest({ version, channel: options2.channel });
79533
79541
  const entry = selectDesktopPlatformEntry(manifest, {
79534
79542
  platform: options2.platform,
79535
79543
  arch: options2.arch
@@ -79562,20 +79570,34 @@ async function uninstallDesktopBinary(options2 = {}) {
79562
79570
  };
79563
79571
  }
79564
79572
  // src/commands/app/app-command.ts
79573
+ init_version_utils();
79565
79574
  init_output_manager();
79575
+ init_package();
79566
79576
  var APP_ACTION_CONFLICT_ERROR = "Use only one of --web, --update, --path, or --uninstall per invocation.";
79577
+ var DEV_STABLE_CONFLICT_ERROR = "Use only one of --dev or --stable per invocation.";
79567
79578
  function ensureExclusiveAction(options2) {
79568
79579
  const enabledFlags = [options2.web, options2.update, options2.path, options2.uninstall].filter(Boolean);
79569
79580
  if (enabledFlags.length > 1) {
79570
79581
  throw new Error(APP_ACTION_CONFLICT_ERROR);
79571
79582
  }
79572
79583
  }
79584
+ function resolveDesktopChannel(options2) {
79585
+ if (options2.dev && options2.stable) {
79586
+ throw new Error(DEV_STABLE_CONFLICT_ERROR);
79587
+ }
79588
+ if (options2.dev)
79589
+ return "dev";
79590
+ if (options2.stable)
79591
+ return "stable";
79592
+ return isPrereleaseVersion(package_default.version) ? "dev" : "stable";
79593
+ }
79573
79594
  async function appCommand(options2 = {}, deps = {}) {
79574
79595
  ensureExclusiveAction(options2);
79596
+ const channel = resolveDesktopChannel(options2);
79575
79597
  const launchWeb = deps.launchWeb || configUICommand;
79576
79598
  const getBinaryPath = deps.getBinaryPath || getDesktopBinaryPath;
79577
79599
  const getInstallPath2 = deps.getInstallPath || getDesktopInstallPath;
79578
- const downloadBinary = deps.downloadBinary || downloadDesktopBinary;
79600
+ const downloadBinary = deps.downloadBinary || ((opts) => downloadDesktopBinary(undefined, { channel: opts?.channel }));
79579
79601
  const installBinary = deps.installBinary || installDesktopBinary;
79580
79602
  const launchBinary = deps.launchBinary || launchDesktopApp;
79581
79603
  const uninstallBinary = deps.uninstallBinary || uninstallDesktopBinary;
@@ -79611,14 +79633,14 @@ async function appCommand(options2 = {}, deps = {}) {
79611
79633
  return;
79612
79634
  }
79613
79635
  info(options2.update ? "Downloading the latest ClaudeKit Control Center build..." : "ClaudeKit Control Center not found. Downloading...");
79614
- const downloadedBinary = await downloadBinary();
79636
+ const downloadedBinary = await downloadBinary({ channel });
79615
79637
  const installedBinary = await installBinary(downloadedBinary);
79616
79638
  success(`Installed ClaudeKit Control Center to ${installedBinary}`);
79617
79639
  success("Launching ClaudeKit Control Center...");
79618
79640
  launchBinary(installedBinary);
79619
79641
  }
79620
79642
  function registerAppCommand(cli) {
79621
- cli.command("app", "Launch ClaudeKit Control Center desktop app").option("--web", "Open the web dashboard instead of the desktop app").option("--update", "Download and install the latest desktop build before launching").option("--path", "Print the current install path (or target path) and exit").option("--uninstall", "Remove the installed desktop app and exit").action(async (options2) => {
79643
+ cli.command("app", "Launch ClaudeKit Control Center desktop app").option("--web", "Open the web dashboard instead of the desktop app").option("--update", "Download and install the latest desktop build before launching").option("--path", "Print the current install path (or target path) and exit").option("--uninstall", "Remove the installed desktop app and exit").option("--dev", "Force dev channel for this invocation").option("--stable", "Force stable channel for this invocation").action(async (options2) => {
79622
79644
  await appCommand(options2);
79623
79645
  });
79624
79646
  }