@vite-hub/cli 0.6.1 → 0.8.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/README.md +6 -3
- package/dist/{commands-FOmqEZUi.js → commands-w7tEEJph.js} +469 -160
- package/dist/console-apps-BQX-Np9Q.js +271 -0
- package/dist/console-auth-cCodgT_T.js +2813 -0
- package/dist/{console-env-lQ3_eMOy.js → console-env-eXdVI6kw.js} +7 -4
- package/dist/{deploy-DDen0JC0.js → deploy-CqR6pJa-.js} +49 -17
- package/dist/dist-CEIUyD15.js +2495 -0
- package/dist/env-D_CN5DyX.js +2169 -0
- package/dist/envelope-BJQ7xPyX.js +99 -0
- package/dist/help-cache-BI6y5pN8.js +195 -0
- package/dist/index.d.ts +13 -14
- package/dist/index.js +217 -66
- package/dist/link-BRNWNqT9.js +663 -0
- package/dist/provision-9QsGgeiq.js +1741 -0
- package/dist/{provision-kiD8Emd7.d.ts → provision-ByxmUa19.d.ts} +16 -1
- package/dist/provision-Fiosv3Un.js +1391 -0
- package/dist/setup/index.d.ts +37 -15
- package/dist/setup/index.js +12 -9
- package/dist/status-gjvZVutV.js +599 -0
- package/dist/vercel-B5CJLsT0.js +701 -0
- package/package.json +5 -4
- package/dist/env-DzYHxq9A.js +0 -5657
- package/dist/provision-YzxNsbhs.js +0 -4139
- package/dist/rolldown-runtime-BJohB4LM.js +0 -13
|
@@ -86,6 +86,7 @@ interface ProvisionStep {
|
|
|
86
86
|
id: string;
|
|
87
87
|
provider: ProvisionProvider;
|
|
88
88
|
plan: (context: ProvisionContext) => Promise<ProvisionAction[]>;
|
|
89
|
+
hasResources?: (context: Pick<ProvisionContext, "env">) => boolean;
|
|
89
90
|
/** Describes the Provision State this step records. Runs without network access, also without credentials. */
|
|
90
91
|
recordedState?: (context: Pick<ProvisionContext, "env">) => ProvisionStateCategory[];
|
|
91
92
|
}
|
|
@@ -102,10 +103,13 @@ interface ViteHubCliSpawnResult {
|
|
|
102
103
|
signal?: NodeJS.Signals | null;
|
|
103
104
|
/** The output of the child when `stdout` is `pipe`. */
|
|
104
105
|
stdout?: string;
|
|
106
|
+
/** The error output of the child when `stderr` is `pipe`. */
|
|
107
|
+
stderr?: string;
|
|
105
108
|
}
|
|
106
109
|
interface ViteHubCliSpawnOptions {
|
|
107
110
|
cwd?: string;
|
|
108
111
|
env?: NodeJS.ProcessEnv;
|
|
112
|
+
onOutput?: (text: string, stream: "stdout" | "stderr") => void;
|
|
109
113
|
stderr?: "inherit" | "pipe";
|
|
110
114
|
/** `ignore` gives the child no terminal input, so a tool that asks questions on a terminal does not ask. */
|
|
111
115
|
stdin?: "ignore" | "inherit";
|
|
@@ -113,7 +117,17 @@ interface ViteHubCliSpawnOptions {
|
|
|
113
117
|
stdout?: "inherit" | "pipe" | "stderr";
|
|
114
118
|
}
|
|
115
119
|
type ViteHubCliSpawn = (command: string, args: string[], options?: ViteHubCliSpawnOptions) => Promise<ViteHubCliSpawnResult>;
|
|
120
|
+
/** Where a call to an app goes through the Console: the operation endpoint of the app's Console project, and the token of `vitehub login`. */
|
|
121
|
+
interface ViteHubCliConsoleRoute {
|
|
122
|
+
authorization: string;
|
|
123
|
+
target: string;
|
|
124
|
+
}
|
|
116
125
|
interface ViteHubCliContext extends ViteHubCliStreams {
|
|
126
|
+
/**
|
|
127
|
+
* Finds the app at `url` in the Console of `vitehub login` and returns the route that lets the Console sign the call.
|
|
128
|
+
* Returns nothing when the command must call the app directly, such as when a `VITEHUB_CONSOLE_PRIVATE_KEY_<NAME>` is set.
|
|
129
|
+
*/
|
|
130
|
+
consoleRoute?: (url: string, signal: AbortSignal) => Promise<ViteHubCliConsoleRoute | undefined>;
|
|
117
131
|
cwd: string;
|
|
118
132
|
env: NodeJS.ProcessEnv;
|
|
119
133
|
/** Replaces `fetch` for commands that call a running app, so tests need no server. */
|
|
@@ -132,6 +146,7 @@ interface ViteHubCliContext extends ViteHubCliStreams {
|
|
|
132
146
|
spawn: ViteHubCliSpawn;
|
|
133
147
|
}
|
|
134
148
|
interface ViteHubCliProvision {
|
|
149
|
+
env?: NodeJS.ProcessEnv;
|
|
135
150
|
rootDir: string;
|
|
136
151
|
steps: readonly ProvisionStep[];
|
|
137
152
|
}
|
|
@@ -159,4 +174,4 @@ interface ViteHubCliCommandNamespace {
|
|
|
159
174
|
name: string;
|
|
160
175
|
}
|
|
161
176
|
type StdoutWriteCallback = (error?: Error | null) => void;
|
|
162
|
-
export {
|
|
177
|
+
export { ViteHubCliSpawn as a, CredentialSource as c, HostCredentialsDescription as d, ViteHubCliProvision as i, HostCliRun as l, ViteHubCliCommandNamespace as n, ProvisionProvider as o, ViteHubCliContext as r, CredentialHost as s, ViteHubCliCommand as t, HostCredentials as u };
|