@vite-hub/cli 0.5.0 → 0.6.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.
- package/dist/{commands-W0ijB5R6.js → commands-D0WSlS7h.js} +41 -36
- package/dist/{console-env--3nqqpCV.js → console-env-CYHb4owT.js} +2 -5
- package/dist/{deploy-CHW75le_.js → deploy-DwNjKrHq.js} +98 -27
- package/dist/{env-MtXhP7A7.js → env-BiVwma4a.js} +1075 -834
- package/dist/index.d.ts +2 -3
- package/dist/index.js +64 -28
- package/dist/{provision-DgT_lpyn.js → provision-akHsvf-B.js} +1344 -250
- package/dist/{provision-bhi-xnCG.d.ts → provision-kiD8Emd7.d.ts} +0 -8
- package/dist/{rolldown-runtime-8H4AJuhK.js → rolldown-runtime-BJohB4LM.js} +1 -2
- package/dist/setup/index.d.ts +28 -57
- package/dist/setup/index.js +5 -8
- package/package.json +12 -12
- package/dist/console-auth-Dz9HHP2G.js +0 -312
- package/dist/envelope-C7e408hm.js +0 -88
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import "nostics";
|
|
2
|
-
//#region ../internal/dist/host-credentials-NQkTpoab.d.ts
|
|
3
|
-
//#region src/host-credentials.d.ts
|
|
4
2
|
type CredentialHost = "cloudflare" | "vercel" | "netlify" | "deno";
|
|
5
3
|
type CredentialSource = "env" | "host-cli";
|
|
6
4
|
type HostCredentials = {
|
|
@@ -40,9 +38,6 @@ type HostCliRun = (command: string, args: readonly string[], options: {
|
|
|
40
38
|
env: NodeJS.ProcessEnv;
|
|
41
39
|
signal?: AbortSignal;
|
|
42
40
|
}) => Promise<HostCliRunResult>;
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region ../internal/dist/provision-k67k9T1h.d.ts
|
|
45
|
-
//#region src/provision.d.ts
|
|
46
41
|
type ProvisionProvider = "cloudflare" | "vercel";
|
|
47
42
|
interface ProvisionLogger {
|
|
48
43
|
log: (message: string) => void;
|
|
@@ -94,8 +89,6 @@ interface ProvisionStep {
|
|
|
94
89
|
/** Describes the Provision State this step records. Runs without network access, also without credentials. */
|
|
95
90
|
recordedState?: (context: Pick<ProvisionContext, "env">) => ProvisionStateCategory[];
|
|
96
91
|
}
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region ../internal/dist/cli.d.ts
|
|
99
92
|
interface ViteHubCliStreams {
|
|
100
93
|
stderr: {
|
|
101
94
|
write: (chunk: string | Uint8Array, encoding?: BufferEncoding | StdoutWriteCallback, callback?: StdoutWriteCallback) => unknown;
|
|
@@ -166,5 +159,4 @@ interface ViteHubCliCommandNamespace {
|
|
|
166
159
|
name: string;
|
|
167
160
|
}
|
|
168
161
|
type StdoutWriteCallback = (error?: Error | null) => void;
|
|
169
|
-
//#endregion
|
|
170
162
|
export { ProvisionProvider as a, HostCliRun as c, ViteHubCliProvision as i, HostCredentials as l, ViteHubCliCommandNamespace as n, CredentialHost as o, ViteHubCliContext as r, CredentialSource as s, ViteHubCliCommand as t, HostCredentialsDescription as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __exportAll = (all, no_symbols) => {
|
|
5
5
|
let target = {};
|
|
@@ -10,5 +10,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
10
10
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
11
|
return target;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { __exportAll as t };
|
package/dist/setup/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { l as HostCredentials, o as CredentialHost, r as ViteHubCliContext, s as CredentialSource, t as ViteHubCliCommand, u as HostCredentialsDescription } from "../provision-
|
|
2
|
-
//#region ../internal/dist/config-edit.d.ts
|
|
3
|
-
//#region src/config-edit.d.ts
|
|
1
|
+
import { l as HostCredentials, o as CredentialHost, r as ViteHubCliContext, s as CredentialSource, t as ViteHubCliCommand, u as HostCredentialsDescription } from "../provision-kiD8Emd7.js";
|
|
4
2
|
type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
5
3
|
readonly [key: string]: JsonValue;
|
|
6
4
|
};
|
|
@@ -38,15 +36,9 @@ type LocateResult = {
|
|
|
38
36
|
reason: ManualReason;
|
|
39
37
|
line?: number;
|
|
40
38
|
};
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region ../internal/dist/deployment.d.ts
|
|
43
|
-
//#region src/deployment.d.ts
|
|
44
39
|
/** The host that ViteHub builds for: the `host` option of `vitehub()` and the value of `VITEHUB_HOST`. */
|
|
45
40
|
type ViteHubHost = "cloudflare" | "deno" | "netlify" | "node" | "vercel";
|
|
46
41
|
type DeploymentService = "blob" | "browser" | "queue" | "rateLimit" | "realtime" | "sandbox";
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../internal/dist/features.d.ts
|
|
49
|
-
//#region src/features.d.ts
|
|
50
42
|
/**
|
|
51
43
|
* The feature keys of `vitehub({...})`. `vitehub add <feature>` and `vitehub status` read this list before the owner
|
|
52
44
|
* package of a feature is installed, so the catalog is plain data with no owner imports.
|
|
@@ -141,8 +133,6 @@ interface FeatureDefinition<TId extends FeatureId = FeatureId> {
|
|
|
141
133
|
/** Hosts that use `hosts.dev` during development instead of their deployment entry. Node always uses `hosts.dev`. */
|
|
142
134
|
developmentOverrides?: readonly ViteHubHost[];
|
|
143
135
|
}
|
|
144
|
-
//#endregion
|
|
145
|
-
//#region src/setup/project.d.ts
|
|
146
136
|
type SetupFramework = "vite" | "nuxt" | "none";
|
|
147
137
|
type SetupPackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
148
138
|
interface SetupProject {
|
|
@@ -169,8 +159,6 @@ interface SetupProject {
|
|
|
169
159
|
* Throws `SETUP_NOT_A_PROJECT` when `root` has no package.json and no Vite or Nuxt config.
|
|
170
160
|
*/
|
|
171
161
|
export declare function readSetupProject(root: string, env: NodeJS.ProcessEnv): Promise<SetupProject>;
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region src/setup/status.d.ts
|
|
174
162
|
interface SetupFeatureStatus {
|
|
175
163
|
id: FeatureId;
|
|
176
164
|
enabled: "on" | "off" | "unknown";
|
|
@@ -206,8 +194,6 @@ interface SetupStatus {
|
|
|
206
194
|
}
|
|
207
195
|
/** What the project enables, on which host, and what each enabled feature still needs. Reads the config without running it. */
|
|
208
196
|
export declare function setupStatus(project: SetupProject, env: NodeJS.ProcessEnv, withoutDefinitions?: ReadonlySet<FeatureId>): SetupStatus;
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/setup/add.d.ts
|
|
211
197
|
interface SetupAddArgs {
|
|
212
198
|
features: FeatureId[];
|
|
213
199
|
json: boolean;
|
|
@@ -274,8 +260,6 @@ export declare function planSetupAdd(project: SetupProject, args: SetupAddArgs,
|
|
|
274
260
|
/** Applies a `vitehub add` plan: installs the packages, writes the starter Definitions, and writes the config last. */
|
|
275
261
|
export declare function applySetupAdd(project: SetupProject, planned: SetupAddPlanned, args: Pick<SetupAddArgs, "install">, context: Pick<ViteHubCliContext, "env" | "spawn">): Promise<void>;
|
|
276
262
|
export declare const addCommand: ViteHubCliCommand;
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/setup/catalog.d.ts
|
|
279
263
|
interface SetupCatalog {
|
|
280
264
|
schemaVersion: 1;
|
|
281
265
|
hosts: readonly FeatureHost[];
|
|
@@ -283,12 +267,8 @@ interface SetupCatalog {
|
|
|
283
267
|
}
|
|
284
268
|
/** Every feature of `vitehub({...})` and how each host supports it. Needs no project. */
|
|
285
269
|
export declare function setupCatalog(): SetupCatalog;
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/setup/commands.d.ts
|
|
288
270
|
/** The setup commands. They run before the CLI loads the project config. */
|
|
289
271
|
export declare const setupCommands: readonly ViteHubCliCommand[];
|
|
290
|
-
//#endregion
|
|
291
|
-
//#region src/setup/console-auth.d.ts
|
|
292
272
|
/** The hosted Console. `--console` and `VITEHUB_CONSOLE_URL` name a self-hosted one. */
|
|
293
273
|
export declare const defaultConsoleUrl = "https://console.vitehub.dev";
|
|
294
274
|
/** An API key for CI. It wins over the saved key, and `vitehub logout` does not remove it. */
|
|
@@ -319,7 +299,7 @@ export declare function consoleOrigin(value: string): string;
|
|
|
319
299
|
* `vitehub login` saved for the Console. Without `console`, the Console is `VITEHUB_CONSOLE_URL`, else the only saved
|
|
320
300
|
* Console, else console.vitehub.dev. `undefined` when there is no key.
|
|
321
301
|
*/
|
|
322
|
-
export declare function readConsoleCredential(env: NodeJS.ProcessEnv, console?: string): Promise<{
|
|
302
|
+
export declare function readConsoleCredential(env: NodeJS.ProcessEnv, console?: string, signal?: AbortSignal): Promise<{
|
|
323
303
|
origin: string;
|
|
324
304
|
token: string;
|
|
325
305
|
source: "env" | "file";
|
|
@@ -328,8 +308,6 @@ export declare function readConsoleCredential(env: NodeJS.ProcessEnv, console?:
|
|
|
328
308
|
export declare const loginCommand: ViteHubCliCommand;
|
|
329
309
|
export declare const whoamiCommand: ViteHubCliCommand;
|
|
330
310
|
export declare const logoutCommand: ViteHubCliCommand;
|
|
331
|
-
//#endregion
|
|
332
|
-
//#region src/setup/envelope.d.ts
|
|
333
311
|
/** Exit codes of the setup commands. */
|
|
334
312
|
export declare const setupExitCodes: {
|
|
335
313
|
readonly done: 0;
|
|
@@ -367,8 +345,6 @@ type SetupFailure = Error & {
|
|
|
367
345
|
readonly details: SetupFailureDetails;
|
|
368
346
|
readonly exitCode: number;
|
|
369
347
|
};
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region src/setup/link.d.ts
|
|
372
348
|
/** The link file, relative to the project root. It is gitignored and never holds a secret. */
|
|
373
349
|
export declare const SETUP_LINK_FILE = ".vitehub/link.json";
|
|
374
350
|
type SetupLinkHost = CredentialHost;
|
|
@@ -473,8 +449,6 @@ export declare function readSetupLinkState(project: SetupProject, host: string,
|
|
|
473
449
|
}): Promise<SetupLinkState>;
|
|
474
450
|
/** The link and the credential status for `vitehub status`. The credentials never include the token. */
|
|
475
451
|
export declare function readSetupLinkStatus(project: SetupProject, host: string, context: ViteHubCliContext): Promise<SetupLinkStatus>;
|
|
476
|
-
//#endregion
|
|
477
|
-
//#region src/setup/deploy/host.d.ts
|
|
478
452
|
/** The hosts that `vitehub deploy` deploys to. */
|
|
479
453
|
type DeployHost = "cloudflare" | "vercel" | "netlify" | "deno";
|
|
480
454
|
/** The git commit of the deployed source. A folder without git has none. */
|
|
@@ -505,8 +479,6 @@ interface HostDeployment {
|
|
|
505
479
|
};
|
|
506
480
|
source: HostDeploymentSource;
|
|
507
481
|
}
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region src/setup/deploy/after.d.ts
|
|
510
482
|
/** One path of `deploy.check`, as the deployed app answered it. */
|
|
511
483
|
interface DeployCheckResult {
|
|
512
484
|
path: string;
|
|
@@ -537,8 +509,6 @@ type DeployIndexNowOutput = {
|
|
|
537
509
|
error: string;
|
|
538
510
|
status?: number;
|
|
539
511
|
};
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/setup/deploy/checkouts.d.ts
|
|
542
512
|
/** What `pushWorkspaces()` returns for one checkout folder, the same as `vitehub push --json`. */
|
|
543
513
|
interface CheckoutPushResult {
|
|
544
514
|
workspace: string;
|
|
@@ -573,8 +543,23 @@ type DeployCheckoutsOutput = {
|
|
|
573
543
|
} | {
|
|
574
544
|
error: CheckoutPushError;
|
|
575
545
|
};
|
|
576
|
-
|
|
577
|
-
|
|
546
|
+
/** What `vitehub deploy --json` prints in `console` after it linked the app. */
|
|
547
|
+
interface DeployConsoleOutput {
|
|
548
|
+
/** The Console origin. */
|
|
549
|
+
console: string;
|
|
550
|
+
/** The id of the app in the Console. */
|
|
551
|
+
app: string;
|
|
552
|
+
/** The Console page of the app. */
|
|
553
|
+
url: string;
|
|
554
|
+
/** True when this deploy linked the app. False when the Console had it. */
|
|
555
|
+
created: boolean;
|
|
556
|
+
/** The key variable that this deploy set on the host. Missing when the host had it. */
|
|
557
|
+
keySet?: string;
|
|
558
|
+
/** True when the app answered a signed request of the Console. */
|
|
559
|
+
linked: boolean;
|
|
560
|
+
/** Why the app did not answer, such as `401 CONSOLE_KEY_UNKNOWN: ...`. Only when `linked` is false. */
|
|
561
|
+
problem?: string;
|
|
562
|
+
}
|
|
578
563
|
/** One set of names that the app reads, without its values. */
|
|
579
564
|
interface EnvDiffEntry {
|
|
580
565
|
names: readonly string[];
|
|
@@ -596,11 +581,7 @@ interface DeployEnvOutput {
|
|
|
596
581
|
/** Names that the deploy generated, such as `VITEHUB_SECRET`. They are in `pushed` too. */
|
|
597
582
|
generated?: string[];
|
|
598
583
|
}
|
|
599
|
-
//#endregion
|
|
600
|
-
//#region src/provision.d.ts
|
|
601
584
|
type ProvisionActionStatus = "create" | "update" | "pending" | "exists";
|
|
602
|
-
//#endregion
|
|
603
|
-
//#region src/setup/deploy/provision.d.ts
|
|
604
585
|
/** What `vitehub deploy --json` reports in `provision`. */
|
|
605
586
|
interface DeployProvisionOutput {
|
|
606
587
|
/** The resources that this deploy created or changed. Empty when everything existed. */
|
|
@@ -613,8 +594,6 @@ interface DeployProvisionOutput {
|
|
|
613
594
|
/** The ids of the host resources, by category and key, as `.vitehub/provision.json` records them. */
|
|
614
595
|
ids: Record<string, Record<string, string>>;
|
|
615
596
|
}
|
|
616
|
-
//#endregion
|
|
617
|
-
//#region src/setup/deploy.d.ts
|
|
618
597
|
interface SetupDeployArgs {
|
|
619
598
|
/** The host of --host, as the user wrote it. */
|
|
620
599
|
host?: string;
|
|
@@ -630,6 +609,8 @@ interface SetupDeployArgs {
|
|
|
630
609
|
check: boolean;
|
|
631
610
|
/** False with --no-index-now: do not send the sitemap URLs to IndexNow. */
|
|
632
611
|
indexNow: boolean;
|
|
612
|
+
/** False with --no-console: do not link the app in the Console of the saved login. */
|
|
613
|
+
console: boolean;
|
|
633
614
|
temporary: boolean;
|
|
634
615
|
yes: boolean;
|
|
635
616
|
json: boolean;
|
|
@@ -638,7 +619,8 @@ interface SetupDeployArgs {
|
|
|
638
619
|
/** What `vitehub deploy --json` prints, after `schemaVersion: 1`. */
|
|
639
620
|
interface SetupDeployOutput {
|
|
640
621
|
host: DeployHost;
|
|
641
|
-
|
|
622
|
+
/** The URL that serves the new version. Missing when the host reports none, such as a Worker with only `*.example.com/*` routes. */
|
|
623
|
+
url?: string;
|
|
642
624
|
deploymentId?: string;
|
|
643
625
|
version?: string;
|
|
644
626
|
temporary?: {
|
|
@@ -652,17 +634,17 @@ interface SetupDeployOutput {
|
|
|
652
634
|
checkouts?: DeployCheckoutsOutput;
|
|
653
635
|
/** The env names that the deploy checked and set. Never a value. */
|
|
654
636
|
env: DeployEnvOutput;
|
|
655
|
-
/** The `deploy.check` paths and how the deployed app answered. Missing when the build has none,
|
|
637
|
+
/** The `deploy.check` paths and how the deployed app answered. Missing when the build has none, with --no-check, or without `url`. */
|
|
656
638
|
checks?: DeployCheckResult[];
|
|
657
639
|
/** How to roll production back. Only when a check failed. */
|
|
658
640
|
rollback?: DeployRollback;
|
|
659
641
|
/** The IndexNow submission. Missing when the build has no `deploy.indexNow`, for a preview, and with --no-index-now. */
|
|
660
642
|
indexNow?: DeployIndexNowOutput;
|
|
643
|
+
/** The Console link. Missing without `console: true`, without a `vitehub login`, for a preview, and with --no-console. */
|
|
644
|
+
console?: DeployConsoleOutput;
|
|
661
645
|
}
|
|
662
646
|
export declare function readDeployArgs(args: readonly string[]): SetupDeployArgs;
|
|
663
647
|
export declare const deployCommand: ViteHubCliCommand;
|
|
664
|
-
//#endregion
|
|
665
|
-
//#region src/setup/deployments.d.ts
|
|
666
648
|
/** How long `vitehub status` waits for the host before it reports `liveReason: "timeout"`. */
|
|
667
649
|
export declare const STATUS_HOST_TIMEOUT_MS = 5000;
|
|
668
650
|
/** What `vitehub deployments --json` prints, after `schemaVersion: 1`. */
|
|
@@ -699,8 +681,6 @@ export declare function readSetupLive(root: string, link: SetupLink | undefined,
|
|
|
699
681
|
offline: boolean;
|
|
700
682
|
signal?: AbortSignal;
|
|
701
683
|
}): Promise<SetupLiveStatus>;
|
|
702
|
-
//#endregion
|
|
703
|
-
//#region src/setup/stack.d.ts
|
|
704
684
|
interface SetupStack {
|
|
705
685
|
command: string | null;
|
|
706
686
|
omits: readonly {
|
|
@@ -708,15 +688,13 @@ interface SetupStack {
|
|
|
708
688
|
reason: "opaque-config" | "spread" | "expression" | "unresolved-host" | "unresolved-feature" | "disabled-feature" | "unsupported-feature" | "non-replayable-option" | "credential-option" | "required-option" | "unplannable-stack";
|
|
709
689
|
}[];
|
|
710
690
|
}
|
|
711
|
-
//#endregion
|
|
712
|
-
//#region src/setup/init.d.ts
|
|
713
691
|
declare const initHosts: readonly ["cloudflare", "vercel", "netlify", "deno", "node"];
|
|
714
692
|
type InitHost = typeof initHosts[number];
|
|
715
693
|
type InitFramework = "vite" | "nuxt";
|
|
716
694
|
/**
|
|
717
695
|
* The packages of a new app, as `getting-started/installation.md` installs them. The Nitro and H3 versions match the
|
|
718
|
-
* server integration of ViteHub. Nuxt 5 supplies Nitro 3, and
|
|
719
|
-
* bodies in the docs' route examples.
|
|
696
|
+
* server integration of ViteHub. Nuxt 5 supplies Nitro 3, and a Nuxt 4.7 app also gets `nuxtNitroPackage`. The
|
|
697
|
+
* tutorials import H3 2. Valibot validates request bodies in the docs' route examples.
|
|
720
698
|
*/
|
|
721
699
|
export declare const initPackages: Readonly<Record<InitFramework, {
|
|
722
700
|
prod: readonly string[];
|
|
@@ -766,8 +744,6 @@ interface SetupInitPlan {
|
|
|
766
744
|
/** Reads the arguments. Throws `CLI_R0003` for an unknown flag or value. */
|
|
767
745
|
export declare function readInitArgs(args: readonly string[]): SetupInitArgs;
|
|
768
746
|
export declare const initCommandDefinition: ViteHubCliCommand;
|
|
769
|
-
//#endregion
|
|
770
|
-
//#region src/setup/remove.d.ts
|
|
771
747
|
interface SetupRemoveArgs {
|
|
772
748
|
features: FeatureId[];
|
|
773
749
|
json: boolean;
|
|
@@ -839,8 +815,6 @@ export declare function applySetupRemove(project: SetupProject, planned: Planned
|
|
|
839
815
|
configLast?: boolean;
|
|
840
816
|
}): Promise<void>;
|
|
841
817
|
export declare const removeCommand: ViteHubCliCommand;
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/setup/update.d.ts
|
|
844
818
|
interface SetupUpdateArgs {
|
|
845
819
|
dryRun: boolean;
|
|
846
820
|
help: boolean;
|
|
@@ -885,8 +859,6 @@ interface PlannedUpdate {
|
|
|
885
859
|
/** Plans the update: finds every ViteHub specifier, resolves the target, and computes the new files. Writes nothing. */
|
|
886
860
|
export declare function planSetupUpdate(rootDir: string, args: Pick<SetupUpdateArgs, "preview">, context: Pick<ViteHubCliContext, "env" | "fetch">): Promise<PlannedUpdate>;
|
|
887
861
|
export declare const updateCommand: ViteHubCliCommand;
|
|
888
|
-
//#endregion
|
|
889
|
-
//#region src/setup/session.d.ts
|
|
890
862
|
/**
|
|
891
863
|
* Runs the package manager with an argument array and no shell. `onOutput` gets its stdout and stderr as they arrive.
|
|
892
864
|
* Tests pass a fake runner.
|
|
@@ -966,5 +938,4 @@ export declare function setupRequestArgs(request: unknown): {
|
|
|
966
938
|
* `add`, and `remove` do, with the same documents, and keeps each plan until one `apply()` uses it.
|
|
967
939
|
*/
|
|
968
940
|
export declare function createSetupSession(options: SetupSessionOptions): SetupSession;
|
|
969
|
-
//#endregion
|
|
970
941
|
export type { ConsoleCredential, DeployCommit, HostDeployment, HostDeploymentSource, PlannedRemove, SetupAddArgs, SetupAddPlan, SetupAddPlanned, SetupCatalog, SetupChange, SetupChoice, SetupCommandRunner, SetupDeployArgs, SetupDeployOutput, SetupDeploymentsOutput, SetupError, SetupFailure, SetupFailureDetails, SetupFeatureStatus, SetupFramework, SetupInitArgs, SetupInitPlan, SetupLink, SetupLinkAccount, SetupLinkFile, SetupLinkHost, SetupLinkOptions, SetupLinkResult, SetupLinkSelection, SetupLinkState, SetupLinkStatus, SetupLinkSummary, SetupLinkTarget, SetupLinks, SetupLive, SetupLiveReason, SetupLiveStatus, SetupMissing, SetupOptions, SetupPackageManager, SetupPlanRequest, SetupProject, SetupReference, SetupRemoveArgs, SetupRemovePlan, SetupRerun, SetupSession, SetupSessionOptions, SetupSessionPlanFields, SetupSessionResult, SetupStatus, SetupUpdateArgs, SetupUpdatePlan };
|
package/dist/setup/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
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";
|
|
1
|
+
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-D0WSlS7h.js";
|
|
2
|
+
import { B as readConsoleCredential, D as shellQuote, E as setupStatus, F as consoleTokenVariable, G as setupFailure, I as consoleUrlVariable, L as defaultConsoleUrl, N as consoleCredentialsFile, P as consoleOrigin, R as loginCommand, V as whoamiCommand, W as setupExitCodes, Y as cliErrorDiagnostics, q as writeSetupError, z as logoutCommand } from "../provision-akHsvf-B.js";
|
|
3
|
+
import { a as deploymentsCommand, i as STATUS_HOST_TIMEOUT_MS, r as readDeployArgs, s as readSetupLive, t as deployCommand } from "../deploy-DwNjKrHq.js";
|
|
4
|
+
import { L as readSetupProject, d as readSetupLinkState, f as readSetupLinkStatus, h as unlinkSetupProject, i as SETUP_LINK_FILE, l as linkSetupProject, m as selectSetupLink, p as readSetupLinks } from "../env-BiVwma4a.js";
|
|
7
5
|
import { join } from "pathe";
|
|
8
6
|
import { readFile } from "node:fs/promises";
|
|
9
7
|
import { createHash, randomUUID } from "node:crypto";
|
|
10
|
-
|
|
8
|
+
// src/setup/session.ts
|
|
11
9
|
const featurePattern = /^[a-z][a-z-]*$/iu;
|
|
12
10
|
function invalid(message) {
|
|
13
11
|
return cliErrorDiagnostics.CLI_R0003({ message: `[vitehub] ${message}` });
|
|
@@ -229,5 +227,4 @@ function createSetupSession(options) {
|
|
|
229
227
|
}
|
|
230
228
|
};
|
|
231
229
|
}
|
|
232
|
-
//#endregion
|
|
233
230
|
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.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Command-line workflows for ViteHub projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -42,33 +42,33 @@
|
|
|
42
42
|
"./package.json": "./package.json"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@babel/parser": "^
|
|
45
|
+
"@babel/parser": "^8.1.3",
|
|
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.
|
|
49
|
+
"@vite-hub/runtime": "0.6.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
54
|
"rc9": "^3.1.0",
|
|
55
|
-
"semver": "^7.8.
|
|
55
|
+
"semver": "^7.8.6"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/node": "^24.19.
|
|
58
|
+
"@types/node": "^24.19.2",
|
|
59
59
|
"@types/semver": "^7.8.0",
|
|
60
|
-
"@vite-hub/forge": "0.
|
|
60
|
+
"@vite-hub/forge": "0.6.0",
|
|
61
61
|
"@vite-hub/internal": "0.0.1",
|
|
62
|
-
"nuxt": "npm:nuxt-nightly@5.0.0-
|
|
62
|
+
"nuxt": "npm:nuxt-nightly@5.0.0-2611222336-0ed8910",
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
64
|
"valibot": "^1.5.0",
|
|
65
|
-
"vite": "^8.
|
|
66
|
-
"vite-plus": "^
|
|
67
|
-
"vitest": "
|
|
65
|
+
"vite": "^8.3.8",
|
|
66
|
+
"vite-plus": "^1.7.0",
|
|
67
|
+
"vitest": "5.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@vite-hub/forge": "0.
|
|
71
|
-
"nuxt": ">=5.0.0-0",
|
|
70
|
+
"@vite-hub/forge": "0.6.0",
|
|
71
|
+
"nuxt": "^4.7.0 || >=5.0.0-0",
|
|
72
72
|
"vite": ">=8.0.0"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|