@vite-hub/cli 0.4.1 → 0.5.0

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,5 +1,5 @@
1
1
  import "nostics";
2
- //#region ../internal/dist/host-credentials-MN0OQ2os.d.ts
2
+ //#region ../internal/dist/host-credentials-NQkTpoab.d.ts
3
3
  //#region src/host-credentials.d.ts
4
4
  type CredentialHost = "cloudflare" | "vercel" | "netlify" | "deno";
5
5
  type CredentialSource = "env" | "host-cli";
@@ -32,6 +32,7 @@ type HostCredentialsDescription = {
32
32
  interface HostCliRunResult {
33
33
  exitCode: number | null;
34
34
  stdout: string;
35
+ stderr?: string;
35
36
  }
36
37
  /** Runs a host CLI with an argument array and no shell, and returns its stdout. */
37
38
  type HostCliRun = (command: string, args: readonly string[], options: {
@@ -95,7 +96,6 @@ interface ProvisionStep {
95
96
  }
96
97
  //#endregion
97
98
  //#region ../internal/dist/cli.d.ts
98
- //#region src/cli.d.ts
99
99
  interface ViteHubCliStreams {
100
100
  stderr: {
101
101
  write: (chunk: string | Uint8Array, encoding?: BufferEncoding | StdoutWriteCallback, callback?: StdoutWriteCallback) => unknown;
@@ -0,0 +1,14 @@
1
+ import "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
+ return target;
12
+ };
13
+ //#endregion
14
+ export { __exportAll as t };
@@ -1,4 +1,4 @@
1
- import { l as HostCredentials, o as CredentialHost, r as ViteHubCliContext, s as CredentialSource, t as ViteHubCliCommand, u as HostCredentialsDescription } from "../provision-C9p1wSzq.js";
1
+ import { l as HostCredentials, o as CredentialHost, r as ViteHubCliContext, s as CredentialSource, t as ViteHubCliCommand, u as HostCredentialsDescription } from "../provision-bhi-xnCG.js";
2
2
  //#region ../internal/dist/config-edit.d.ts
3
3
  //#region src/config-edit.d.ts
4
4
  type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
@@ -126,6 +126,10 @@ interface FeatureDefinition<TId extends FeatureId = FeatureId> {
126
126
  packages: readonly string[];
127
127
  /** Additional packages selected by literal provider options. */
128
128
  providerPackages?: Readonly<Record<string, Readonly<Record<string, readonly string[]>>>>;
129
+ requiredOptions?: readonly {
130
+ option: `${TId}.${string}`;
131
+ detail: string;
132
+ }[];
129
133
  /** Development dependencies that the app installs for this feature. */
130
134
  devPackages: readonly string[];
131
135
  implies: readonly FeatureImplication[];
@@ -374,7 +378,7 @@ interface SetupLinkAccount {
374
378
  }
375
379
  /** One host target of `.vitehub/link.json`. */
376
380
  interface SetupLinkTarget {
377
- /** Absent only for a Deno link without `--account`. */
381
+ /** Can be absent for an unverified Deno link. */
378
382
  account?: SetupLinkAccount;
379
383
  project: {
380
384
  id?: string;
@@ -696,6 +700,15 @@ export declare function readSetupLive(root: string, link: SetupLink | undefined,
696
700
  signal?: AbortSignal;
697
701
  }): Promise<SetupLiveStatus>;
698
702
  //#endregion
703
+ //#region src/setup/stack.d.ts
704
+ interface SetupStack {
705
+ command: string | null;
706
+ omits: readonly {
707
+ path: string;
708
+ reason: "opaque-config" | "spread" | "expression" | "unresolved-host" | "unresolved-feature" | "disabled-feature" | "unsupported-feature" | "non-replayable-option" | "credential-option" | "required-option" | "unplannable-stack";
709
+ }[];
710
+ }
711
+ //#endregion
699
712
  //#region src/setup/init.d.ts
700
713
  declare const initHosts: readonly ["cloudflare", "vercel", "netlify", "deno", "node"];
701
714
  type InitHost = typeof initHosts[number];
@@ -747,18 +760,11 @@ interface SetupInitPlan {
747
760
  devPackages: readonly string[];
748
761
  command?: string;
749
762
  };
750
- /** The command that creates the same stack. README.md keeps it. */
751
- stack: {
752
- command: string;
753
- };
763
+ stack: SetupStack;
754
764
  nextSteps: readonly string[];
755
765
  }
756
766
  /** Reads the arguments. Throws `CLI_R0003` for an unknown flag or value. */
757
767
  export declare function readInitArgs(args: readonly string[]): SetupInitArgs;
758
- /** The stack command in the README.md block of `root`, for `vitehub status`. `null` when there is no block. */
759
- export declare function readSetupStack(root: string): Promise<{
760
- command: string;
761
- } | null>;
762
768
  export declare const initCommandDefinition: ViteHubCliCommand;
763
769
  //#endregion
764
770
  //#region src/setup/remove.d.ts
@@ -1,9 +1,9 @@
1
- import { B as readSetupProject, P as setupStatus, c as linkSetupProject, d as readSetupLinkStatus, f as readSetupLinks, m as unlinkSetupProject, p as selectSetupLink, r as SETUP_LINK_FILE, u as readSetupLinkState } from "../env-B1Gg-WnA.js";
2
- import { m as cliErrorDiagnostics } from "../provision-DXl97xG0.js";
3
- import { i as setupFailure, o as writeSetupError, r as setupExitCodes } from "../envelope-B4mPbSbj.js";
4
- import { _ as addCommand, a as updateCommand, b as readAddArgs, c as planSetupRemove, d as initCommandDefinition, f as initPackages, g as setupCatalog, h as readSetupStack, i as readUpdateArgs, l as readRemoveArgs, m as readInitArgs, n as setupCommands, o as updateInstallArgs, p as nuxiPackage, r as planSetupUpdate, s as applySetupRemove, u as removeCommand, v as applySetupAdd, x as shellQuote, y as planSetupAdd } from "../commands-BQucvYlq.js";
5
- import { a as defaultConsoleUrl, c as readConsoleCredential, i as consoleUrlVariable, l as whoamiCommand, n as consoleOrigin, o as loginCommand, r as consoleTokenVariable, s as logoutCommand, t as consoleCredentialsFile } from "../console-auth-B0HxFFiX.js";
6
- import { a as deploymentsCommand, i as STATUS_HOST_TIMEOUT_MS, r as readDeployArgs, s as readSetupLive, t as deployCommand } from "../deploy-C0RdI5OK.js";
1
+ import { m as cliErrorDiagnostics } from "../provision-DgT_lpyn.js";
2
+ import { F as setupStatus, H as readSetupProject, I as shellQuote, c as linkSetupProject, d as readSetupLinkStatus, f as readSetupLinks, m as unlinkSetupProject, p as selectSetupLink, r as SETUP_LINK_FILE, u as readSetupLinkState } from "../env-MtXhP7A7.js";
3
+ import { _ as applySetupAdd, a as updateCommand, c as planSetupRemove, d as initCommandDefinition, f as initPackages, g as addCommand, h as setupCatalog, i as readUpdateArgs, l as readRemoveArgs, m as readInitArgs, n as setupCommands, o as updateInstallArgs, p as nuxiPackage, r as planSetupUpdate, s as applySetupRemove, u as removeCommand, v as planSetupAdd, y as readAddArgs } from "../commands-W0ijB5R6.js";
4
+ import { i as setupFailure, o as writeSetupError, r as setupExitCodes } from "../envelope-C7e408hm.js";
5
+ import { a as defaultConsoleUrl, c as readConsoleCredential, i as consoleUrlVariable, l as whoamiCommand, n as consoleOrigin, o as loginCommand, r as consoleTokenVariable, s as logoutCommand, t as consoleCredentialsFile } from "../console-auth-Dz9HHP2G.js";
6
+ import { a as deploymentsCommand, i as STATUS_HOST_TIMEOUT_MS, r as readDeployArgs, s as readSetupLive, t as deployCommand } from "../deploy-CHW75le_.js";
7
7
  import { join } from "pathe";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { createHash, randomUUID } from "node:crypto";
@@ -64,7 +64,6 @@ function setupRequestArgs(request) {
64
64
  argv
65
65
  };
66
66
  }
67
- /** The SHA-256 of each file, or `absent`. */
68
67
  async function fingerprint(root, paths) {
69
68
  const files = /* @__PURE__ */ new Map();
70
69
  for (const path of new Set(paths)) {
@@ -231,4 +230,4 @@ function createSetupSession(options) {
231
230
  };
232
231
  }
233
232
  //#endregion
234
- export { SETUP_LINK_FILE, STATUS_HOST_TIMEOUT_MS, addCommand, applySetupAdd, applySetupRemove, consoleCredentialsFile, consoleOrigin, consoleTokenVariable, consoleUrlVariable, createSetupSession, defaultConsoleUrl, deployCommand, deploymentsCommand, initCommandDefinition, initPackages, linkSetupProject, loginCommand, logoutCommand, nuxiPackage, planSetupAdd, planSetupRemove, planSetupUpdate, readAddArgs, readConsoleCredential, readDeployArgs, readInitArgs, readRemoveArgs, readSetupLinkState, readSetupLinkStatus, readSetupLinks, readSetupLive, readSetupProject, readSetupStack, readUpdateArgs, removeCommand, selectSetupLink, setupCatalog, setupCommands, setupExitCodes, setupRequestArgs, setupStatus, unlinkSetupProject, updateCommand, updateInstallArgs, whoamiCommand };
233
+ export { SETUP_LINK_FILE, STATUS_HOST_TIMEOUT_MS, addCommand, applySetupAdd, applySetupRemove, consoleCredentialsFile, consoleOrigin, consoleTokenVariable, consoleUrlVariable, createSetupSession, defaultConsoleUrl, deployCommand, deploymentsCommand, initCommandDefinition, initPackages, linkSetupProject, loginCommand, logoutCommand, nuxiPackage, planSetupAdd, planSetupRemove, planSetupUpdate, readAddArgs, readConsoleCredential, readDeployArgs, readInitArgs, readRemoveArgs, readSetupLinkState, readSetupLinkStatus, readSetupLinks, readSetupLive, readSetupProject, readUpdateArgs, removeCommand, selectSetupLink, setupCatalog, setupCommands, setupExitCodes, setupRequestArgs, setupStatus, unlinkSetupProject, updateCommand, updateInstallArgs, whoamiCommand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/cli",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Command-line workflows for ViteHub projects.",
5
5
  "keywords": [
6
6
  "agent",
@@ -46,17 +46,18 @@
46
46
  "@dotenvx/primitives": "^4.4.0",
47
47
  "@noble/ciphers": "^2.4.0",
48
48
  "@noble/hashes": "^2.4.0",
49
- "@vite-hub/runtime": "0.4.1",
49
+ "@vite-hub/runtime": "0.5.0",
50
50
  "birpc": "^4.2.0",
51
51
  "diff": "^9.0.0",
52
52
  "nostics": "1.4.0",
53
53
  "pathe": "^2.0.3",
54
+ "rc9": "^3.1.0",
54
55
  "semver": "^7.8.5"
55
56
  },
56
57
  "devDependencies": {
57
58
  "@types/node": "^24.19.1",
58
59
  "@types/semver": "^7.8.0",
59
- "@vite-hub/forge": "0.4.1",
60
+ "@vite-hub/forge": "0.5.0",
60
61
  "@vite-hub/internal": "0.0.1",
61
62
  "nuxt": "npm:nuxt-nightly@5.0.0-2611052317-a04317f",
62
63
  "typescript": "^6.0.3",
@@ -66,7 +67,7 @@
66
67
  "vitest": "^4.1.11"
67
68
  },
68
69
  "peerDependencies": {
69
- "@vite-hub/forge": "0.4.1",
70
+ "@vite-hub/forge": "0.5.0",
70
71
  "nuxt": ">=5.0.0-0",
71
72
  "vite": ">=8.0.0"
72
73
  },