@vite-hub/cli 0.5.1 → 0.6.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.
@@ -1,18 +1,21 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.js";
2
- import { $ as internalErrorDiagnostics, B as formatInstallArgument, H as installSpecifier, I as featureIds, L as featurePackages, Q as isRecord, R as featureSupport, V as impliedFeatures, W as invariant, b as loadAllEnv, c as createNetlifyApiClient, f as resolveHostCredentials, l as createVercelProvisionClient, m as cliErrorDiagnostics, o as createCloudflareApiClient, p as runHostCli, s as createCloudflareProvisionClient, u as isProvisionRequestError, x as withViteStageEnvironment, z as features } from "./provision-DlknnTAt.js";
3
- import { i as setupFailure, o as writeSetupError, r as setupExitCodes, s as writeSetupJson, t as isSetupFailure } from "./envelope-DbplCDko.js";
2
+ import { A as resolveDeploymentPlan, B as readConsoleCredential, D as shellQuote, E as setupStatus, G as setupFailure, H as isSetupFailure, J as writeSetupJson, Mt as isRecord, W as setupExitCodes, Y as cliErrorDiagnostics, _ as consoleAppUrl, b as listConsoleApps, c as createNetlifyApiClient, f as resolveHostCredentials, g as checkProblem, h as checkConsoleApp, k as hostFromNitroPreset, l as createVercelProvisionClient, nt as withViteStageEnvironment, o as createCloudflareApiClient, p as runHostCli, q as writeSetupError, s as createCloudflareProvisionClient, tt as loadAllEnv, u as isProvisionRequestError, wt as invariant, x as openConsole, y as linkConsoleApp } from "./provision-YzxNsbhs.js";
4
3
  import { createRequire } from "node:module";
5
4
  import { spawn } from "node:child_process";
6
- import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
7
- import process$1 from "node:process";
5
+ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
6
+ import process from "node:process";
8
7
  import { basename, dirname, join, relative, resolve } from "pathe";
9
8
  import { mkdir, mkdtemp, open, readFile, readdir, realpath, rm, stat, unlink, writeFile } from "node:fs/promises";
10
9
  import { basename as basename$1, delimiter, sep } from "node:path";
11
10
  import { createInterface } from "node:readline/promises";
12
11
  import { constants, homedir, tmpdir } from "node:os";
12
+ import { parseArgs, parseEnv } from "node:util";
13
13
  import { parse as parse$1 } from "@babel/parser";
14
14
  import { parse as parse$2 } from "rc9";
15
- import { parseArgs, parseEnv } from "node:util";
15
+ import { Range, minVersion, subset, validRange } from "semver";
16
+ import { parseDocument } from "yaml";
17
+ import { setTimeout as setTimeout$1 } from "node:timers/promises";
18
+ import { normalizeConsoleProjectUrl } from "@vite-hub/runtime/internal/console";
16
19
  import { createPublicKey, diffieHellman, generateKeyPairSync, randomBytes } from "node:crypto";
17
20
  import { hsalsa, xsalsa20poly1305 } from "@noble/ciphers/salsa.js";
18
21
  import { blake2b } from "@noble/hashes/blake2.js";
@@ -2242,6 +2245,22 @@ function insertViteHubConfig(file, code, options) {
2242
2245
  };
2243
2246
  }
2244
2247
  // src/setup/project.ts
2248
+ /**
2249
+ * The Nuxt releases that a `nuxt` range allows, as a semver range. A Nuxt 5 nightly counts as its release, so
2250
+ * `npm:nuxt-nightly@5.0.0-2611071848-2d8337c` is `5.0.0`. The `5x` channel tag of `nuxt-nightly` is `5.x`.
2251
+ * `undefined` for another tag or a range without a version.
2252
+ */
2253
+ function nuxtReleases(nuxt) {
2254
+ if (typeof nuxt !== "string") return void 0;
2255
+ const range = validRange(nuxt.replace(/^npm:nuxt-nightly@(\d+)x$/u, "$1.x").replace(/^npm:nuxt(?:-nightly)?@/u, ""));
2256
+ if (!range || !minVersion(range)) return void 0;
2257
+ return new Range(range).set.map((comparators) => comparators.map(({ operator, semver, value }) => typeof semver !== "symbol" && semver.major === 5 && semver.prerelease.length > 0 ? `${operator}5.${semver.minor}.${semver.patch}` : value).join(" ")).join(" || ");
2258
+ }
2259
+ /** True when a `nuxt` range allows only Nuxt 5, so `vitehub init --nuxt-nightly` creates the same app. */
2260
+ function declaresNuxt5(nuxt) {
2261
+ const releases = nuxtReleases(nuxt);
2262
+ return !!releases && subset(releases, ">=5.0.0 <6.0.0");
2263
+ }
2245
2264
  const nuxtConfigFiles = [
2246
2265
  "nuxt.config.ts",
2247
2266
  "nuxt.config.mts",
@@ -2273,6 +2292,24 @@ function parentFolders(root) {
2273
2292
  for (let folder = dirname(root); folder !== folders.at(-1); folder = dirname(folder)) folders.push(folder);
2274
2293
  return folders;
2275
2294
  }
2295
+ function pnpmWorkspaceFile(root) {
2296
+ return parentFolders(root).map((folder) => join(folder, "pnpm-workspace.yaml")).find(existsSync);
2297
+ }
2298
+ async function resolveNuxtSpecifier(root, specifier) {
2299
+ if (typeof specifier !== "string") return void 0;
2300
+ if (!specifier.startsWith("catalog:")) return specifier;
2301
+ const file = pnpmWorkspaceFile(root);
2302
+ if (!file) return void 0;
2303
+ const workspace = parseDocument(await readFile(file, "utf8"));
2304
+ if (workspace.errors.length) return void 0;
2305
+ const catalog = specifier.slice(8);
2306
+ const entry = workspace.getIn(catalog && catalog !== "default" ? [
2307
+ "catalogs",
2308
+ catalog,
2309
+ "nuxt"
2310
+ ] : ["catalog", "nuxt"]);
2311
+ return typeof entry === "string" ? entry : void 0;
2312
+ }
2276
2313
  async function readManifest(root) {
2277
2314
  const file = join(root, "package.json");
2278
2315
  if (!existsSync(file)) return;
@@ -2358,7 +2395,7 @@ async function nuxtServerDirs(root, config, env) {
2358
2395
  return [resolve(appRoot, serverDir?.kind === "literal" && typeof serverDir.value === "string" ? serverDir.value || "server" : "server")];
2359
2396
  }
2360
2397
  function globalPackageDirs(name) {
2361
- return (process$1.env.NODE_PATH ?? "").split(delimiter).filter(Boolean).flatMap((dir) => {
2398
+ return (process.env.NODE_PATH ?? "").split(delimiter).filter(Boolean).flatMap((dir) => {
2362
2399
  try {
2363
2400
  return [realpathSync(join(dir, name))];
2364
2401
  } catch {
@@ -2390,6 +2427,7 @@ async function readSetupProject(root, env) {
2390
2427
  };
2391
2428
  const folders = parentFolders(root);
2392
2429
  const require = createRequire(join(root, "package.json"));
2430
+ const nuxt = await resolveNuxtSpecifier(root, dependencies.nuxt);
2393
2431
  return {
2394
2432
  config,
2395
2433
  ...configFile ? {
@@ -2408,462 +2446,11 @@ async function readSetupProject(root, env) {
2408
2446
  return false;
2409
2447
  },
2410
2448
  ...detectPackageManager(root, manifest, env),
2449
+ ...nuxt === void 0 ? {} : { nuxt },
2411
2450
  root,
2412
2451
  serverDirs: framework === "nuxt" ? await nuxtServerDirs(root, config, env) : [join(root, "server")]
2413
2452
  };
2414
2453
  }
2415
- // ../internal/dist/definition-catalog.js
2416
- const sourceFilePattern = /\.(?:c|m)?[jt]sx?$/i;
2417
- const declarationFilePattern = /\.d\.(?:c|m)?[jt]sx?$/i;
2418
- const testFilePattern = /\.(?:test|spec)\.(?:c|m)?[jt]sx?$/i;
2419
- const ignoredDirs = /* @__PURE__ */ new Set([
2420
- "node_modules",
2421
- "dist",
2422
- ".output",
2423
- ".nuxt",
2424
- ".vercel",
2425
- ".git",
2426
- ".vitehub"
2427
- ]);
2428
- function readDirEntries(root) {
2429
- try {
2430
- return readdirSync(root, { withFileTypes: true });
2431
- } catch (error) {
2432
- if (error.code === "ENOENT") return [];
2433
- throw error;
2434
- }
2435
- }
2436
- function isGitRepositoryDirectory(directory) {
2437
- return existsSync(resolve(directory, ".git"));
2438
- }
2439
- function listMatchingFiles(root, predicate, options = {}) {
2440
- const files = [];
2441
- for (const entry of readDirEntries(root)) {
2442
- const absolute = resolve(root, entry.name);
2443
- if (entry.isDirectory() && !entry.isSymbolicLink()) {
2444
- if (isGitRepositoryDirectory(absolute)) continue;
2445
- if (entry.name.startsWith(".")) continue;
2446
- if (ignoredDirs.has(entry.name)) continue;
2447
- files.push(...listMatchingFiles(absolute, predicate, options));
2448
- continue;
2449
- }
2450
- if (entry.name.startsWith(".") && !options.includeHidden) continue;
2451
- if (entry.isFile() && predicate(entry.name)) files.push(absolute);
2452
- }
2453
- return files.sort();
2454
- }
2455
- /** A module that a Definitions folder can hold: JavaScript or TypeScript, and not a declaration, test, or spec file. */
2456
- function isDefinitionSourceFile(name) {
2457
- return sourceFilePattern.test(name) && !declarationFilePattern.test(name) && !testFilePattern.test(name);
2458
- }
2459
- function listSourceFiles(root, options = {}) {
2460
- return listMatchingFiles(root, isDefinitionSourceFile, options);
2461
- }
2462
- /**
2463
- * Whether `path` is a file, or a folder that holds a Definition source file. A Definition file in a server directory,
2464
- * such as `server/auth.ts` or a file in `server/queues/`, turns its feature on without a key. An empty folder, which
2465
- * Git does not keep, turns nothing on.
2466
- */
2467
- function hasDefinitionFiles(path) {
2468
- if (!existsSync(path)) return false;
2469
- return statSync(path).isFile() || listSourceFiles(path).length > 0;
2470
- }
2471
- // ../internal/dist/deployment.js
2472
- const unsupported = (reason) => ({
2473
- reason,
2474
- supported: false
2475
- });
2476
- const plans = {
2477
- cloudflare: {
2478
- host: "cloudflare",
2479
- nitroPreset: "cloudflare-module",
2480
- output: {
2481
- directory: ".output",
2482
- entry: "server/index.mjs",
2483
- packaging: "none"
2484
- },
2485
- runtime: "workerd",
2486
- services: {
2487
- blob: {
2488
- driver: "cloudflare",
2489
- guarantee: "native",
2490
- supported: true
2491
- },
2492
- browser: {
2493
- driver: "cloudflare",
2494
- guarantee: "native",
2495
- supported: true
2496
- },
2497
- queue: {
2498
- driver: "cloudflare",
2499
- guarantee: "native",
2500
- supported: true
2501
- },
2502
- rateLimit: {
2503
- driver: "cloudflare",
2504
- guarantee: "native",
2505
- supported: true
2506
- },
2507
- realtime: {
2508
- driver: "cloudflare",
2509
- guarantee: "native",
2510
- supported: true
2511
- },
2512
- sandbox: {
2513
- driver: "cloudflare",
2514
- guarantee: "native",
2515
- supported: true
2516
- }
2517
- }
2518
- },
2519
- deno: {
2520
- host: "deno",
2521
- nitroPreset: "deno-deploy",
2522
- output: {
2523
- directory: ".output",
2524
- entry: "server/index.mjs",
2525
- packaging: "deno-node-modules"
2526
- },
2527
- runtime: "deno",
2528
- services: {
2529
- blob: unsupported("Deno Deploy has no built-in durable Blob Store with ViteHub's object-storage contract."),
2530
- browser: unsupported("Deno Deploy has no built-in Browser Provider."),
2531
- queue: unsupported("Deno Deploy has no built-in Queue Provider with ViteHub's delivery contract."),
2532
- rateLimit: unsupported("Deno Deploy has no built-in distributed Rate Limit driver."),
2533
- realtime: unsupported("Deno Deploy has no shared room authority for Realtime."),
2534
- sandbox: unsupported("Deno Deploy has no built-in isolated Sandbox Provider.")
2535
- }
2536
- },
2537
- netlify: {
2538
- host: "netlify",
2539
- nitroPreset: "netlify",
2540
- output: {
2541
- directory: ".netlify",
2542
- entry: "v1/functions/server/server.mjs",
2543
- packaging: "none"
2544
- },
2545
- runtime: "node",
2546
- services: {
2547
- blob: {
2548
- driver: "netlify-blobs",
2549
- guarantee: "native",
2550
- supported: true
2551
- },
2552
- browser: unsupported("Netlify has no built-in Browser Provider."),
2553
- queue: unsupported("Netlify has no built-in Queue Provider with ViteHub's delivery contract."),
2554
- rateLimit: unsupported("Netlify has no built-in distributed Rate Limit driver."),
2555
- realtime: unsupported("Netlify has no shared room authority for Realtime."),
2556
- sandbox: unsupported("Netlify has no built-in isolated Sandbox Provider.")
2557
- }
2558
- },
2559
- node: {
2560
- host: "node",
2561
- nitroPreset: "node-server",
2562
- output: {
2563
- directory: ".output",
2564
- entry: "server/index.mjs",
2565
- packaging: "none"
2566
- },
2567
- runtime: "node",
2568
- services: {
2569
- blob: {
2570
- driver: "fs",
2571
- guarantee: "single-host",
2572
- supported: true
2573
- },
2574
- browser: unsupported("The Node host has no built-in Browser Provider."),
2575
- queue: {
2576
- driver: "local",
2577
- guarantee: "single-host",
2578
- supported: true
2579
- },
2580
- rateLimit: {
2581
- driver: "memory",
2582
- guarantee: "process-local",
2583
- supported: true
2584
- },
2585
- realtime: {
2586
- driver: "node",
2587
- guarantee: "native",
2588
- supported: true
2589
- },
2590
- sandbox: unsupported("The Node host has no built-in isolated Sandbox Provider.")
2591
- }
2592
- },
2593
- vercel: {
2594
- host: "vercel",
2595
- nitroPreset: "vercel",
2596
- output: {
2597
- directory: ".vercel/output",
2598
- entry: "functions/__server.func/index.mjs",
2599
- packaging: "none"
2600
- },
2601
- runtime: "node",
2602
- services: {
2603
- blob: {
2604
- driver: "vercel",
2605
- guarantee: "native",
2606
- supported: true
2607
- },
2608
- browser: unsupported("Vercel has no built-in Browser Provider."),
2609
- queue: {
2610
- driver: "vercel",
2611
- guarantee: "native",
2612
- supported: true
2613
- },
2614
- rateLimit: unsupported("Vercel has no built-in distributed Rate Limit driver."),
2615
- realtime: unsupported("Vercel has no shared room authority for Realtime."),
2616
- sandbox: {
2617
- driver: "vercel",
2618
- guarantee: "native",
2619
- supported: true
2620
- }
2621
- }
2622
- }
2623
- };
2624
- function resolveDeploymentPlan(host) {
2625
- const plan = plans[host];
2626
- if (!plan) throw internalErrorDiagnostics.INTERNAL_R0001({ message: `Unknown ViteHub host: ${JSON.stringify(host)}.` });
2627
- return plan;
2628
- }
2629
- /** Maps a host name or a Nitro preset name, such as `cloudflare-module` or `node-server`, to its ViteHub host. */
2630
- function hostFromNitroPreset(value) {
2631
- const normalized = value?.trim().toLowerCase().replaceAll("_", "-");
2632
- if (!normalized) return;
2633
- if (normalized.startsWith("cloudflare")) return "cloudflare";
2634
- if (normalized.startsWith("deno")) return "deno";
2635
- if (normalized.startsWith("netlify")) return "netlify";
2636
- if (normalized === "node" || normalized.startsWith("node-")) return "node";
2637
- if (normalized.startsWith("vercel")) return "vercel";
2638
- }
2639
- const providerHosts = [
2640
- ["WORKERS_CI", "cloudflare"],
2641
- ["NETLIFY", "netlify"],
2642
- ["NOW_BUILDER", "vercel"],
2643
- ["VERCEL", "vercel"],
2644
- ["VERCEL_ENV", "vercel"],
2645
- ["DENO_DEPLOY", "deno"],
2646
- ["DENO_DEPLOYMENT_ID", "deno"]
2647
- ];
2648
- /**
2649
- * Returns the ViteHub host that this process builds or runs on, or `undefined` when no variable names a host.
2650
- * The order is `VITEHUB_HOST`, `NITRO_PRESET`, `SERVER_PRESET`, then the provider variables:
2651
- * `WORKERS_CI` (Cloudflare Workers Builds), `NETLIFY`, `NOW_BUILDER`, `VERCEL` or `VERCEL_ENV`, then `DENO_DEPLOY` or `DENO_DEPLOYMENT_ID`.
2652
- * `vitehub()` uses this result when `host` is omitted, and `"node"` when it is `undefined`.
2653
- */
2654
- function detectHost(env = process.env) {
2655
- for (const name of [
2656
- "VITEHUB_HOST",
2657
- "NITRO_PRESET",
2658
- "SERVER_PRESET"
2659
- ]) {
2660
- const host = hostFromNitroPreset(env[name]);
2661
- if (host) return host;
2662
- }
2663
- return providerHosts.find(([name]) => env[name]?.trim())?.[1];
2664
- }
2665
- // src/setup/status.ts
2666
- const addArgs = {
2667
- bun: {
2668
- dev: ["add", "-d"],
2669
- prod: ["add"]
2670
- },
2671
- npm: {
2672
- dev: ["install", "-D"],
2673
- prod: ["install"]
2674
- },
2675
- pnpm: {
2676
- dev: ["add", "-D"],
2677
- prod: ["add"]
2678
- },
2679
- yarn: {
2680
- dev: ["add", "-D"],
2681
- prod: ["add"]
2682
- }
2683
- };
2684
- /** Quotes `value` for a POSIX shell when it needs quotes. */
2685
- function shellQuote(value) {
2686
- return /^[\w@%+=:,./-]+$/u.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
2687
- }
2688
- /** The arguments of the `packageManager` command that installs `packages`, such as `["add", "-D", "drizzle-kit"]`. */
2689
- function installArgs(packageManager, packages, dev) {
2690
- return [...addArgs[packageManager][dev ? "dev" : "prod"], ...packages];
2691
- }
2692
- const removeArgs = {
2693
- bun: ["remove"],
2694
- npm: ["uninstall"],
2695
- pnpm: ["remove"],
2696
- yarn: ["remove"]
2697
- };
2698
- /** The arguments of the `packageManager` command that uninstalls `packages`, such as `["remove", "@vite-hub/queue"]`. */
2699
- function uninstallArgs(packageManager, packages) {
2700
- return [...removeArgs[packageManager], ...packages];
2701
- }
2702
- function formatInstallCommand(command, args) {
2703
- return [command, ...args].map(formatInstallArgument).join(" ");
2704
- }
2705
- function installCommand(packageManager, prod, dev) {
2706
- const commands = [...prod.length ? [formatInstallCommand(packageManager, installArgs(packageManager, prod, false))] : [], ...dev.length ? [formatInstallCommand(packageManager, installArgs(packageManager, dev, true))] : []];
2707
- return commands.length ? commands.join(" && ") : void 0;
2708
- }
2709
- function readHost(project, env) {
2710
- const config = project.config;
2711
- if (config && !config.ok && config.reason !== "no-vitehub") return {
2712
- name: "unknown",
2713
- source: "config"
2714
- };
2715
- const site = config?.ok ? config.site : void 0;
2716
- const host = site?.keys.host;
2717
- const fromConfig = host?.kind === "literal" && typeof host.value === "string" ? hostFromNitroPreset(host.value) : void 0;
2718
- if (fromConfig) return {
2719
- name: fromConfig,
2720
- source: "config"
2721
- };
2722
- if (host || site?.spread) return {
2723
- name: "unknown",
2724
- source: "config"
2725
- };
2726
- const fromEnv = detectHost(env);
2727
- return fromEnv ? {
2728
- name: fromEnv,
2729
- source: "env"
2730
- } : {
2731
- name: "node",
2732
- source: "default"
2733
- };
2734
- }
2735
- function readEnabled(project, id, withoutDefinitions) {
2736
- const config = project.config;
2737
- if (!config || !config.ok && config.reason === "no-vitehub") return {
2738
- enabled: "off",
2739
- reason: "default"
2740
- };
2741
- if (!config.ok) return {
2742
- enabled: "unknown",
2743
- reason: "config"
2744
- };
2745
- const value = config.site.keys[id];
2746
- if (value?.kind === "expression") return {
2747
- enabled: "unknown",
2748
- reason: "config"
2749
- };
2750
- if (value) return {
2751
- enabled: value.value === false ? "off" : "on",
2752
- reason: "config"
2753
- };
2754
- if (config.site.spread) return {
2755
- enabled: "unknown",
2756
- reason: "config"
2757
- };
2758
- if (features[id].enabledByDefault) return {
2759
- enabled: "on",
2760
- reason: "default"
2761
- };
2762
- if (withoutDefinitions?.has(id)) return {
2763
- enabled: "off",
2764
- reason: "default"
2765
- };
2766
- const discovery = features[id].enabledByDiscovery;
2767
- const directories = project.serverDirs ?? (project.framework === "nuxt" ? void 0 : [join(project.root, "server")]);
2768
- if (discovery && !directories) return {
2769
- enabled: "unknown",
2770
- reason: "default"
2771
- };
2772
- return {
2773
- enabled: discovery?.some((file) => directories?.some((directory) => hasDefinitionFiles(join(directory, file)))) ? "on" : "off",
2774
- reason: "default"
2775
- };
2776
- }
2777
- const kvDefaultStoreOption = "kv.stores.default.driver";
2778
- function kvStores(value) {
2779
- return isRecord(value) && isRecord(value.stores) ? value.stores : void 0;
2780
- }
2781
- function missingProviderOption(project, option, value) {
2782
- const [id, key] = option.split(".");
2783
- const configured = project.config?.ok ? project.config.site.keys[id] : void 0;
2784
- if (configured?.kind === "expression") return;
2785
- const options = value ?? configured?.value;
2786
- const stores = option === "kv.driver" ? kvStores(options) : void 0;
2787
- if (stores) {
2788
- const store = stores.default;
2789
- const driver = isRecord(store) ? store.driver : void 0;
2790
- if (driver !== "upstash" && driver !== "redis" && driver !== "database") return kvDefaultStoreOption;
2791
- return;
2792
- }
2793
- if (!isRecord(options) || !(key in options)) return option;
2794
- }
2795
- function featureFix(project, id, support, host, missing, providerChosen) {
2796
- const install = installCommand(project.packageManager, missing.prod.map(installSpecifier), missing.dev.map(installSpecifier));
2797
- if (install) return install;
2798
- if (support.level === "unsupported") return `Set \`${id}: false\`, or build for another host than ${host}.`;
2799
- if (support.level === "explicit" && !providerChosen) {
2800
- const option = missingProviderOption(project, support.option);
2801
- if (option) return `Set \`${option}\` in vitehub() to choose a provider on ${host}.`;
2802
- }
2803
- }
2804
- /** What the project enables, on which host, and what each enabled feature still needs. Reads the config without running it. */
2805
- function setupStatus(project, env, withoutDefinitions) {
2806
- const host = readHost(project, env);
2807
- const enabled = new Map(featureIds.map((id) => [id, readEnabled(project, id, withoutDefinitions)]));
2808
- const on = featureIds.filter((id) => enabled.get(id).enabled === "on");
2809
- const keep = featureIds.filter((id) => enabled.get(id).enabled !== "on" && enabled.get(id).reason === "config");
2810
- const maybeOn = featureIds.filter((id) => enabled.get(id).enabled !== "off");
2811
- const disabled = keep.filter((id) => enabled.get(id).enabled === "off");
2812
- const definite = impliedFeatures(on, keep);
2813
- for (const id of impliedFeatures(maybeOn, disabled)) {
2814
- const state = enabled.get(id);
2815
- if (state.enabled === "off" && state.reason === "default") enabled.set(id, {
2816
- enabled: definite.includes(id) ? "on" : "unknown",
2817
- reason: "implied"
2818
- });
2819
- }
2820
- return {
2821
- config: !project.config ? { manual: "no-vitehub" } : project.config.ok ? {
2822
- file: project.configFile,
2823
- form: project.config.site.form
2824
- } : {
2825
- file: project.configFile,
2826
- manual: project.config.reason,
2827
- ...project.config.line === void 0 ? {} : { line: project.config.line }
2828
- },
2829
- features: featureIds.map((id) => {
2830
- const state = enabled.get(id);
2831
- const support = host.name === "unknown" ? {
2832
- level: "unknown",
2833
- detail: "The config does not statically identify the deployment host."
2834
- } : featureSupport(id, host.name);
2835
- const definition = features[id];
2836
- const value = project.config?.ok ? project.config.site.keys[id] : void 0;
2837
- const literal = value?.kind === "literal" ? value.value : void 0;
2838
- const packages = featurePackages(id, literal, host.name, featureIds.filter((feature) => enabled.get(feature)?.enabled === "on"));
2839
- const missing = state.enabled === "on" ? {
2840
- dev: definition.devPackages.filter((name) => !project.installed(name)),
2841
- prod: packages.filter((name) => !project.installed(name))
2842
- } : {
2843
- dev: [],
2844
- prod: []
2845
- };
2846
- const providerChosen = id === "workflow" && host.name !== "netlify" && packages.includes("openworkflow");
2847
- const fix = state.enabled === "on" ? featureFix(project, id, support, host.name, missing, providerChosen) : void 0;
2848
- const resolvedSupport = support.level === "explicit" && support.option === "kv.driver" && kvStores(literal) ? {
2849
- ...support,
2850
- option: kvDefaultStoreOption
2851
- } : support;
2852
- return {
2853
- id,
2854
- ...state,
2855
- missingPackages: [...missing.prod, ...missing.dev],
2856
- support: resolvedSupport,
2857
- ...fix ? { fix } : {}
2858
- };
2859
- }),
2860
- framework: project.framework,
2861
- host,
2862
- packageManager: project.packageManager,
2863
- root: project.root,
2864
- schemaVersion: 1
2865
- };
2866
- }
2867
2454
  // src/setup/deploy/host.ts
2868
2455
  /** A failed host CLI that may print values on stdout, such as `vercel env ls --json`: only stderr goes into the reason. */
2869
2456
  function hostListFailed(step, result, secrets) {
@@ -2888,14 +2475,14 @@ async function untilInterrupted(work) {
2888
2475
  received ??= signal;
2889
2476
  controller.abort();
2890
2477
  };
2891
- process$1.on("SIGINT", stop);
2892
- process$1.on("SIGTERM", stop);
2478
+ process.on("SIGINT", stop);
2479
+ process.on("SIGTERM", stop);
2893
2480
  try {
2894
2481
  return await work(controller.signal);
2895
2482
  } finally {
2896
- process$1.off("SIGINT", stop);
2897
- process$1.off("SIGTERM", stop);
2898
- if (received) process$1.exit(128 + constants.signals[received]);
2483
+ process.off("SIGINT", stop);
2484
+ process.off("SIGTERM", stop);
2485
+ if (received) process.exit(128 + constants.signals[received]);
2899
2486
  }
2900
2487
  }
2901
2488
  /**
@@ -2941,7 +2528,7 @@ function createDeployRun(stderr, secrets) {
2941
2528
  "pipe",
2942
2529
  "pipe"
2943
2530
  ],
2944
- detached: process$1.platform !== "win32"
2531
+ detached: process.platform !== "win32"
2945
2532
  });
2946
2533
  const output = {
2947
2534
  stderr: "",
@@ -3005,7 +2592,7 @@ function createDeployRun(stderr, secrets) {
3005
2592
  };
3006
2593
  const killTree = (signal) => {
3007
2594
  if (!child.pid) return;
3008
- if (process$1.platform === "win32") spawn("taskkill", [
2595
+ if (process.platform === "win32") spawn("taskkill", [
3009
2596
  "/pid",
3010
2597
  String(child.pid),
3011
2598
  "/T",
@@ -3017,7 +2604,7 @@ function createDeployRun(stderr, secrets) {
3017
2604
  child.kill(signal);
3018
2605
  });
3019
2606
  else try {
3020
- process$1.kill(-child.pid, signal);
2607
+ process.kill(-child.pid, signal);
3021
2608
  } catch (error) {
3022
2609
  if (error.code !== "ESRCH") child.kill(signal);
3023
2610
  }
@@ -3064,7 +2651,7 @@ function windowsNodeEntry(file) {
3064
2651
  if (/\.(?:exe|cmd|bat)$/iu.test(file)) return;
3065
2652
  if (!existsSync(file)) return;
3066
2653
  const source = readFileSync(file, "utf8");
3067
- if (/\.[cm]?js$/iu.test(file) || /^#![^\r\n]*\bnode(?:\.exe)?(?:\s|$)/u.test(source)) return [process$1.execPath, file];
2654
+ if (/\.[cm]?js$/iu.test(file) || /^#![^\r\n]*\bnode(?:\.exe)?(?:\s|$)/u.test(source)) return [process.execPath, file];
3068
2655
  }
3069
2656
  function executableIn(folder, name, platform) {
3070
2657
  const file = join(folder, name);
@@ -3081,7 +2668,7 @@ function executableIn(folder, name, platform) {
3081
2668
  * The host CLI as a command and its first arguments: the project's `node_modules/.bin` (walking up), then `PATH`,
3082
2669
  * then `npx --yes <package>`, which the build output also names.
3083
2670
  */
3084
- function hostCli(name, npmPackage, root, env, platform = process$1.platform) {
2671
+ function hostCli(name, npmPackage, root, env, platform = process.platform) {
3085
2672
  for (let folder = root;; folder = dirname(folder)) {
3086
2673
  const found = executableIn(join(folder, "node_modules", ".bin"), name, platform);
3087
2674
  if (found) return found;
@@ -3093,7 +2680,7 @@ function hostCli(name, npmPackage, root, env, platform = process$1.platform) {
3093
2680
  if (found) return found;
3094
2681
  }
3095
2682
  if (platform === "win32") {
3096
- for (const folder of [...path, dirname(process$1.execPath)]) {
2683
+ for (const folder of [...path, dirname(process.execPath)]) {
3097
2684
  const npx = executableIn(folder, "npx", platform);
3098
2685
  if (npx) return [
3099
2686
  ...npx,
@@ -3300,6 +2887,84 @@ async function readBuildOutput(root, host) {
3300
2887
  ...identityName ? { identityName } : {}
3301
2888
  };
3302
2889
  }
2890
+ // src/setup/deploy/console.ts
2891
+ const consoleKeyPrefix = "VITEHUB_CONSOLE_KEY_";
2892
+ const checkDelays = [
2893
+ 1e3,
2894
+ 2e3,
2895
+ 4e3
2896
+ ];
2897
+ /** True when the build reads `VITEHUB_CONSOLE_KEY_<NAME>`, which `console: true` adds. */
2898
+ function readsConsoleKey(entries) {
2899
+ return entries.some((entry) => entry.prefix === consoleKeyPrefix);
2900
+ }
2901
+ async function openDeployConsole(context) {
2902
+ if (!await readConsoleCredential(context.env)) return;
2903
+ try {
2904
+ const client = await openConsole(context);
2905
+ const apps = await listConsoleApps(client);
2906
+ return {
2907
+ apps,
2908
+ client,
2909
+ keys: Object.fromEntries(apps.flatMap((app) => app.keyVariable && app.publicKey ? [[app.keyVariable, app.publicKey]] : []))
2910
+ };
2911
+ } catch (error) {
2912
+ context.stderr.write(`Warning: deploy does not link the app in the Console, because the Console failed: ${errorMessage(error)}\n`);
2913
+ return "unavailable";
2914
+ }
2915
+ }
2916
+ async function linkDeployedApp(options) {
2917
+ const { client } = options.console;
2918
+ try {
2919
+ const target = normalizeConsoleProjectUrl(options.url);
2920
+ const installed = options.console.apps.filter((app) => app.keyVariable && options.onHost.has(app.keyVariable));
2921
+ const known = installed.find((app) => app.url === target);
2922
+ if (!known && installed.length) {
2923
+ options.context.stderr.write(`Warning: the installed Console key links to ${installed.map((app) => app.url).join(", ")}, not ${options.url}. Link the current production URL and set its key with \`vitehub apps link ${options.url}\`.\n`);
2924
+ return;
2925
+ }
2926
+ const { app, created } = known ? {
2927
+ app: known,
2928
+ created: false
2929
+ } : await linkConsoleApp(client, {
2930
+ label: options.label,
2931
+ url: options.url
2932
+ });
2933
+ const keySet = app.keyVariable && app.publicKey && !options.onHost.has(app.keyVariable) ? app.keyVariable : void 0;
2934
+ const liveUrl = keySet && app.publicKey ? await options.setKey(keySet, app.publicKey) : options.url;
2935
+ if (!liveUrl || normalizeConsoleProjectUrl(liveUrl) !== app.url) {
2936
+ options.context.stderr.write(`Warning: the Console record for ${app.url} does not match the final production URL (${liveUrl ?? "not reported"}). Check the production URL before linking the app.\n`);
2937
+ return;
2938
+ }
2939
+ let check = await checkConsoleApp(client, app.id);
2940
+ for (const delay of checkDelays) {
2941
+ if (check.linked) break;
2942
+ await setTimeout$1(delay);
2943
+ check = await checkConsoleApp(client, app.id);
2944
+ }
2945
+ return {
2946
+ app: app.id,
2947
+ console: client.origin,
2948
+ created,
2949
+ ...keySet ? { keySet } : {},
2950
+ linked: check.linked,
2951
+ ...check.linked ? {} : { problem: checkProblem(check) },
2952
+ url: consoleAppUrl(client.origin, app)
2953
+ };
2954
+ } catch (error) {
2955
+ options.context.stderr.write(`Warning: the app is deployed, but deploy could not link it in the Console: ${errorMessage(error)} Run \`vitehub apps link ${options.url}\`.\n`);
2956
+ }
2957
+ }
2958
+ function formatDeployConsole(output) {
2959
+ return `${[
2960
+ ...output.created ? [`Linked the app in ${output.console} as ${output.app}.`] : [],
2961
+ ...output.keySet ? [`Set ${output.keySet} on the host.`] : [],
2962
+ output.linked ? `Console: ${output.url}` : `The app does not accept the Console yet: ${output.problem ?? "no answer"}. Run \`vitehub apps check ${output.app}\`.`
2963
+ ].join("\n")}\n`;
2964
+ }
2965
+ function errorMessage(error) {
2966
+ return error instanceof Error ? error.message : String(error);
2967
+ }
3303
2968
  // src/setup/deploy/cloudflare.ts
3304
2969
  const valueFlags = /* @__PURE__ */ new Set(["--config"]);
3305
2970
  const plainFlags = /* @__PURE__ */ new Set(["--containers-rollout=gradual"]);
@@ -3400,6 +3065,28 @@ async function readWranglerOutput(file) {
3400
3065
  }
3401
3066
  });
3402
3067
  }
3068
+ /**
3069
+ * Wrangler 4.157 writes the `workers.dev` target as an `https://` URL, a custom domain as a bare host, such as
3070
+ * `example.com (custom domain)`, and a route as its pattern. A route with one host and the path `/*` serves every path
3071
+ * of that host. A wildcard host, a narrower path, triggers, and a custom domain with `production: disabled` have no
3072
+ * URL to request.
3073
+ */
3074
+ function wranglerTargetUrl(targets) {
3075
+ const texts = Array.isArray(targets) ? targets.filter((target) => typeof target === "string") : [];
3076
+ return [...texts.map(directTargetUrl), ...texts.map(routeTargetUrl)].find((url) => url !== void 0 && URL.canParse(url));
3077
+ }
3078
+ const workersDevTarget = /^https:\/\/[^\s*/]+\.workers\.dev\/?$/u;
3079
+ const customDomainTarget = /^([^\s*/:]+) \(custom domain[ )]/u;
3080
+ const catchAllRouteTarget = /^(?:https:\/\/)?([^\s*/:]+)\/\*(?: \(zone (?:id|name): [^)]+\))?$/u;
3081
+ function directTargetUrl(target) {
3082
+ if (workersDevTarget.test(target)) return target;
3083
+ const domain = customDomainTarget.exec(target)?.[1];
3084
+ return domain && !target.includes("production: disabled") ? `https://${domain}` : void 0;
3085
+ }
3086
+ function routeTargetUrl(target) {
3087
+ const host = catchAllRouteTarget.exec(target)?.[1];
3088
+ return host ? `https://${host}` : void 0;
3089
+ }
3403
3090
  const durationUnits = {
3404
3091
  second: 1e3,
3405
3092
  minute: 6e4,
@@ -3508,18 +3195,19 @@ async function cloudflareAdapter(context) {
3508
3195
  show: true,
3509
3196
  signal
3510
3197
  });
3511
- if (result.exitCode !== 0) throw hostCliFailed(context.preview ? "wrangler versions upload" : "wrangler deploy", result, context.secrets);
3198
+ const step = context.preview ? "wrangler versions upload" : "wrangler deploy";
3199
+ if (result.exitCode !== 0) throw hostCliFailed(step, result, context.secrets);
3512
3200
  const entry = (await readWranglerOutput(outputFile)).findLast((item) => item.type === (context.preview ? "version-upload" : "deploy"));
3513
3201
  const text = `${result.stdout}\n${result.stderr}`;
3514
- const targets = Array.isArray(entry?.targets) ? entry.targets.filter((target) => typeof target === "string") : [];
3515
- const url = (context.preview ? optionalString$1(entry?.preview_url) : targets[0]) ?? findUrl(text, /\.workers\.dev$/u);
3516
- if (!url) throw hostCliFailed("wrangler deploy printed no URL", result, context.secrets);
3202
+ const fromTargets = entry && !context.preview;
3203
+ const url = fromTargets ? wranglerTargetUrl(entry.targets) : optionalString$1(entry?.preview_url) ?? findUrl(text, /\.workers\.dev$/u);
3204
+ if (!url && !fromTargets) throw hostCliFailed(`${step} printed no URL`, result, context.secrets);
3517
3205
  const version = optionalString$1(entry?.version_id);
3518
3206
  const claimUrl = /Claim URL:\s*(https:\/\/\S+)/u.exec(text)?.[1];
3519
3207
  const expiresAt = claimExpiry(text);
3520
3208
  const name = optionalString$1(entry?.worker_name);
3521
3209
  return {
3522
- url,
3210
+ ...url ? { url } : {},
3523
3211
  ...version ? { version } : {},
3524
3212
  ...claimUrl ? { claim: {
3525
3213
  url: claimUrl,
@@ -3737,7 +3425,7 @@ async function denoAdapter(context, organization) {
3737
3425
  DENO_DEPLOY_ORG: organization
3738
3426
  };
3739
3427
  return { async deploy() {
3740
- const result = await context.run(process$1.execPath, [runner], {
3428
+ const result = await context.run(process.execPath, [runner], {
3741
3429
  cwd: context.root,
3742
3430
  env,
3743
3431
  show: true
@@ -3813,7 +3501,7 @@ function denoEnv(context) {
3813
3501
  return Array.isArray(value) ? value.flatMap((item) => isRecord(item) && typeof item.key === "string" ? [item.key] : []) : [];
3814
3502
  },
3815
3503
  async setSecret(name, value, { secret }) {
3816
- if (process$1.platform === "win32") throw setupFailure(cliErrorDiagnostics.SETUP_ENV_VALUE_UNSUPPORTED({
3504
+ if (process.platform === "win32") throw setupFailure(cliErrorDiagnostics.SETUP_ENV_VALUE_UNSUPPORTED({
3817
3505
  host: "deno",
3818
3506
  name,
3819
3507
  reason: "Windows has no /dev/stdin for `deno deploy env load`."
@@ -4257,12 +3945,14 @@ function vercelAdapter(context) {
4257
3945
  if (result.exitCode !== 0) throw hostCliFailed("vercel deploy", result, context.secrets);
4258
3946
  const json = lastJsonObject(result.stdout);
4259
3947
  const deployment = isRecord(json?.deployment) ? json.deployment : json;
4260
- const url = context.preview ? optionalString$1(deployment?.url) : optionalString$1(deployment?.productionUrl) ?? optionalString$1(deployment?.url);
3948
+ const productionUrl = context.preview ? void 0 : optionalString$1(deployment?.productionUrl);
3949
+ const url = productionUrl ?? optionalString$1(deployment?.url);
4261
3950
  if (!url) throw hostCliFailed("vercel deploy printed no URL", result, context.secrets);
4262
3951
  const id = optionalString$1(deployment?.id);
4263
3952
  const claim = context.temporary ? await readClaim(context.root) : void 0;
4264
3953
  return {
4265
3954
  url,
3955
+ ...productionUrl ? { productionUrl } : {},
4266
3956
  ...id ? { deploymentId: id } : {},
4267
3957
  ...claim ? { claim } : {},
4268
3958
  ...context.temporary ? {} : { project: {
@@ -5736,8 +5426,8 @@ async function decryptPlanned(planned, root, env, secrets) {
5736
5426
  }
5737
5427
  async function confirmPush(planned, label) {
5738
5428
  const terminal = createInterface({
5739
- input: process$1.stdin,
5740
- output: process$1.stderr
5429
+ input: process.stdin,
5430
+ output: process.stderr
5741
5431
  });
5742
5432
  try {
5743
5433
  return /^y(?:es)?$/iu.test((await terminal.question(`Push ${planned.map((item) => item.name).join(", ")} to ${label}? [y/N] `)).trim());
@@ -5765,7 +5455,7 @@ function addRedactions(planned, secrets) {
5765
5455
  for (const item of planned) if (item.secret || item.value.length >= 4) secrets.push(item.value);
5766
5456
  }
5767
5457
  function sourceLabel(source) {
5768
- return source === "process" ? "the shell" : source === "generated" ? "a generated value" : source;
5458
+ return source === "process" ? "the shell" : source === "generated" ? "a generated value" : source === "console" ? "the Console" : source;
5769
5459
  }
5770
5460
  function writePush(output, context) {
5771
5461
  const lines = output.pushed.length ? [`Pushed to ${targetLabel(output)}:`, ...output.pushed.map((item) => ` ${item.name} from ${sourceLabel(item.source)}${item.encrypted ? ", decrypted" : ""}${item.replaced ? ", replaced" : ""}`)] : [`Nothing to push to ${targetLabel(output)}.`];
@@ -5790,7 +5480,7 @@ async function runPush(args, context) {
5790
5480
  await assertUntracked(stored, target.project.root, target.run, context.env, context.stderr);
5791
5481
  const planned = await decryptPlanned(stored, target.project.root, context.env, target.secrets);
5792
5482
  if (!args.yes) {
5793
- if (!(!args.json && !!process$1.stdin.isTTY && !!process$1.stderr.isTTY)) throw setupFailure(cliErrorDiagnostics.CLI_R0004({ message: `[vitehub] \`vitehub env push\` changes ${target.github ? "GitHub Actions secrets" : "host variables"} and was not confirmed. Without a terminal, pass --yes.` }), setupExitCodes.inputNeeded, { rerun: pushRerun(args) });
5483
+ if (!(!args.json && !!process.stdin.isTTY && !!process.stderr.isTTY)) throw setupFailure(cliErrorDiagnostics.CLI_R0004({ message: `[vitehub] \`vitehub env push\` changes ${target.github ? "GitHub Actions secrets" : "host variables"} and was not confirmed. Without a terminal, pass --yes.` }), setupExitCodes.inputNeeded, { rerun: pushRerun(args) });
5794
5484
  if (!await confirmPush(planned, targetLabel(output))) throw setupFailure(cliErrorDiagnostics.CLI_R0004({ message: "[vitehub] The push was not confirmed. Nothing was pushed." }), setupExitCodes.error);
5795
5485
  }
5796
5486
  const remoteName = (name) => target.github ? name.toUpperCase() : name;
@@ -5812,8 +5502,8 @@ async function runPush(args, context) {
5812
5502
  const appSecretName = "VITEHUB_SECRET";
5813
5503
  async function confirmGenerate(label) {
5814
5504
  const terminal = createInterface({
5815
- input: process$1.stdin,
5816
- output: process$1.stderr
5505
+ input: process.stdin,
5506
+ output: process.stderr
5817
5507
  });
5818
5508
  try {
5819
5509
  return /^y(?:es)?$/iu.test((await terminal.question(`${appSecretName} is not set on ${label} and has no local value. Generate one and set it? [y/N] `)).trim());
@@ -5842,6 +5532,7 @@ async function checkDeployEnv(options) {
5842
5532
  };
5843
5533
  if (!entries.length) return {
5844
5534
  apply: async () => {},
5535
+ onHost: /* @__PURE__ */ new Set(),
5845
5536
  output,
5846
5537
  upload: {}
5847
5538
  };
@@ -5857,6 +5548,12 @@ async function checkDeployEnv(options) {
5857
5548
  }) : void 0;
5858
5549
  const onHost = new Set(hostEnv ? await hostEnv.listSecretNames() : []);
5859
5550
  const values = await readLocalEnvValues(options.root, options.envDir, stage, context.env);
5551
+ for (const [name, value] of Object.entries(host === "cloudflare" ? options.consoleKeys ?? {} : {})) if (onHost.has(name) && !values.has(name)) values.set(name, {
5552
+ encrypted: false,
5553
+ files: [],
5554
+ source: "console",
5555
+ value
5556
+ });
5860
5557
  const configVars = await configVarNames(host, options.outputDir);
5861
5558
  const stored = planPush(entries, values, [], options.pushEnv || host === "cloudflare" ? configVars : onHost).planned;
5862
5559
  if (host === "cloudflare") {
@@ -5870,6 +5567,7 @@ async function checkDeployEnv(options) {
5870
5567
  }
5871
5568
  const unavailable = [...onHost].filter((name) => !values.has(name));
5872
5569
  if (unavailable.length) throw setupFailure(cliErrorDiagnostics.SETUP_DEPLOY_ENV_STAGE_UNSAFE({
5570
+ console: unavailable.some((name) => name.startsWith(consoleKeyPrefix)),
5873
5571
  names: unavailable.join(", "),
5874
5572
  stage
5875
5573
  }), setupExitCodes.inputNeeded);
@@ -5893,11 +5591,12 @@ async function checkDeployEnv(options) {
5893
5591
  output.generated = [appSecretName];
5894
5592
  }
5895
5593
  addRedactions(stored, options.secrets);
5896
- const missing = unset();
5594
+ const missing = unset().filter((entry) => !options.deferConsoleKey || entry.prefix !== "VITEHUB_CONSOLE_KEY_");
5897
5595
  const required = missing.filter(isRequired);
5898
5596
  if (required.length) {
5899
5597
  const names = required.map((entry) => entryLabel(diffEntry(entry))).join(", ");
5900
5598
  throw setupFailure(cliErrorDiagnostics.SETUP_DEPLOY_ENV_MISSING({
5599
+ console: required.some((entry) => entry.prefix === consoleKeyPrefix),
5901
5600
  firstDeploy: !link,
5902
5601
  host,
5903
5602
  names,
@@ -5920,8 +5619,14 @@ async function checkDeployEnv(options) {
5920
5619
  output.pushed = planned.map((item) => item.name);
5921
5620
  if (output.missing.length) context.stderr.write(`Warning: optional env not set on ${host}: ${output.missing.map(entryLabel).join(", ")}.\n`);
5922
5621
  for (const item of planned) context.stderr.write(item.source === "generated" ? `Generated ${item.name} and set it on ${host}.\n` : `Setting ${item.name} on ${host}${host === "cloudflare" ? " with the new version" : ""} from ${sourceLabel(item.source)}${item.encrypted ? ", decrypted" : ""}${onHost.has(item.name) ? ", replaced" : ""}.\n`);
5622
+ const deployedNames = /* @__PURE__ */ new Set([
5623
+ ...onHost,
5624
+ ...configVars,
5625
+ ...output.pushed
5626
+ ]);
5923
5627
  if (host === "cloudflare" || !hostEnv) return {
5924
5628
  apply: async () => {},
5629
+ onHost: deployedNames,
5925
5630
  output,
5926
5631
  upload: host === "cloudflare" ? Object.fromEntries(planned.map((item) => [item.name, item.value])) : {}
5927
5632
  };
@@ -5929,6 +5634,7 @@ async function checkDeployEnv(options) {
5929
5634
  apply: async () => {
5930
5635
  for (const item of planned) await hostEnv.setSecret(item.name, item.value, { secret: item.secret });
5931
5636
  },
5637
+ onHost: deployedNames,
5932
5638
  output,
5933
5639
  upload: {}
5934
5640
  };
@@ -5948,4 +5654,4 @@ async function runEnvCommand(feature, args, context) {
5948
5654
  return writeSetupError(context, json, error);
5949
5655
  }
5950
5656
  }
5951
- export { readDeployCommit as A, listMatchingFiles as B, denoOrganization as C, build as D, listCloudflareDeployments as E, setupStatus as F, insertViteHubConfig as G, readSetupProject as H, shellQuote as I, locateViteHubConfig as K, uninstallArgs as L, installArgs as M, installCommand as N, readBuildOutput as O, missingProviderOption as P, hostFromNitroPreset as R, denoAdapter as S, cloudflareAdapter as T, setupLockfiles as U, detectPackageManager as V, editViteHubConfig as W, listVercelDeployments as _, ensureViteHubGitignore as a, netlifyAdapter as b, linkSetupProject as c, readSetupLinkStatus as d, readSetupLinks as f, hasVercelLogin as g, writeSeparateResourcesNote as h, addSetupLink as i, formatInstallCommand as j, createDeployRun as k, readLinkHostOption as l, unlinkSetupProject as m, env_exports as n, gitignoreWithViteHub as o, selectSetupLink as p, SETUP_LINK_FILE as r, hostRequired as s, checkDeployEnv as t, readSetupLinkState as u, vercelAdapter as v, listDenoDeployments as w, abortable as x, listNetlifyDeployments as y, hasDefinitionFiles as z };
5657
+ export { openDeployConsole as A, readSetupProject as B, denoAdapter as C, listCloudflareDeployments as D, cloudflareAdapter as E, readDeployCommit as F, editViteHubConfig as H, declaresNuxt5 as I, detectPackageManager as L, build as M, readBuildOutput as N, formatDeployConsole as O, createDeployRun as P, nuxtReleases as R, abortable as S, listDenoDeployments as T, insertViteHubConfig as U, setupLockfiles as V, locateViteHubConfig as W, hasVercelLogin as _, addSetupLink as a, listNetlifyDeployments as b, hostRequired as c, readSetupLinkState as d, readSetupLinkStatus as f, writeSeparateResourcesNote as g, unlinkSetupProject as h, SETUP_LINK_FILE as i, readsConsoleKey as j, linkDeployedApp as k, linkSetupProject as l, selectSetupLink as m, env_exports as n, ensureViteHubGitignore as o, readSetupLinks as p, hostEnvs as r, gitignoreWithViteHub as s, checkDeployEnv as t, readLinkHostOption as u, listVercelDeployments as v, denoOrganization as w, netlifyAdapter as x, vercelAdapter as y, pnpmWorkspaceFile as z };