@vatio-ai/cli 0.51.0 → 0.52.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/lib/commands/deploy.mjs +13 -1
- package/lib/commands/mcp.mjs +2 -1
- package/lib/help.mjs +2 -1
- package/package.json +1 -1
package/lib/commands/deploy.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { buildBundle, BundleError } from "../bundle.mjs";
|
|
|
18
18
|
import { ApiClient, CliClient } from "../api-client.mjs";
|
|
19
19
|
import { NotFoundError } from "../http.mjs";
|
|
20
20
|
import { deviceLogin } from "./auth.mjs";
|
|
21
|
-
import { detectGitSha, fail, takeEnv, takeFlag, takeValue } from "../support.mjs";
|
|
21
|
+
import { detectGitSha, fail, paint, takeEnv, takeFlag, takeValue } from "../support.mjs";
|
|
22
22
|
|
|
23
23
|
// The first command that makes something exist on a server, so the first one
|
|
24
24
|
// that needs to know whose it is.
|
|
@@ -141,6 +141,16 @@ export async function push(config, args) {
|
|
|
141
141
|
console.log(hint.message);
|
|
142
142
|
console.log(` ${hint.url}`);
|
|
143
143
|
}
|
|
144
|
+
printNotices(payload);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Something the platform wants the developer to know about the command they
|
|
148
|
+
// just ran -- a deprecation, usually. On stderr so scripts reading stdout keep
|
|
149
|
+
// working.
|
|
150
|
+
function printNotices(payload) {
|
|
151
|
+
for (const notice of asArray(payload.notices)) {
|
|
152
|
+
process.stderr.write(`\n${paint("yellow", `Notice: ${notice}`)}\n`);
|
|
153
|
+
}
|
|
144
154
|
}
|
|
145
155
|
|
|
146
156
|
export async function publish(config, args) {
|
|
@@ -156,12 +166,14 @@ export async function publish(config, args) {
|
|
|
156
166
|
const from = asArray(payload.published_from);
|
|
157
167
|
const source = from.length > 0 ? ` from ${from.join(", ")}` : "";
|
|
158
168
|
console.log(`Published live deployment #${payload.deployment_id}${source} (git_sha=${JSON.stringify(payload.git_sha ?? null)})`);
|
|
169
|
+
printNotices(payload);
|
|
159
170
|
}
|
|
160
171
|
|
|
161
172
|
export async function rollback(config) {
|
|
162
173
|
const workspace = config.resolveWorkspaceRequired();
|
|
163
174
|
const payload = await deployClient(config, workspace).rollback({ createdBy: process.env.USER ?? null });
|
|
164
175
|
console.log(`Rolled back to deployment #${payload.deployment_id} (from #${payload.rolled_back_from_id})`);
|
|
176
|
+
printNotices(payload);
|
|
165
177
|
}
|
|
166
178
|
|
|
167
179
|
export async function status(config) {
|
package/lib/commands/mcp.mjs
CHANGED
|
@@ -69,7 +69,8 @@ const COMMANDS = {
|
|
|
69
69
|
summary:
|
|
70
70
|
"Promote the latest push to live (or the preview `--env` names), which is what customers " +
|
|
71
71
|
"see. Ask the developer first: this is " +
|
|
72
|
-
"the one step that changes what real visitors get."
|
|
72
|
+
"the one step that changes what real visitors get. Refused when the workspace is connected " +
|
|
73
|
+
"to GitHub: there, live changes only by merging to the default branch.",
|
|
73
74
|
annotations: { readOnlyHint: false, destructiveHint: true }
|
|
74
75
|
},
|
|
75
76
|
rollback: {
|
package/lib/help.mjs
CHANGED
|
@@ -25,7 +25,8 @@ flag, the directory decides.
|
|
|
25
25
|
Deploy:
|
|
26
26
|
push [--env NAME] Validate the workspace, then update a preview
|
|
27
27
|
publish [--env NAME] Promote the latest push to live. --env promotes
|
|
28
|
-
a specific preview instead
|
|
28
|
+
a specific preview instead. Refused when GitHub
|
|
29
|
+
is connected: merge to the default branch
|
|
29
30
|
rollback Restore the previous live deployment
|
|
30
31
|
status Preview and live deployment state
|
|
31
32
|
diff [--env NAME] What this directory would change (default: preview)
|