vslides 1.0.19 → 1.0.20
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/cli.js +27 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3334,6 +3334,14 @@ async function revokeCLIAuth(token) {
|
|
|
3334
3334
|
// Don't clear auth on revoke failure
|
|
3335
3335
|
});
|
|
3336
3336
|
}
|
|
3337
|
+
async function getDeployInfo(slug, token) {
|
|
3338
|
+
return request(`/api/session/${slug}/deploy`, {
|
|
3339
|
+
headers: {
|
|
3340
|
+
"X-Slug": slug,
|
|
3341
|
+
"X-Session-Token": token
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
}
|
|
3337
3345
|
async function deploy(slug, token) {
|
|
3338
3346
|
return request(`/api/session/${slug}/deploy`, {
|
|
3339
3347
|
method: "POST",
|
|
@@ -4340,8 +4348,25 @@ async function revert(version) {
|
|
|
4340
4348
|
}
|
|
4341
4349
|
|
|
4342
4350
|
// src/commands/deploy.ts
|
|
4343
|
-
async function deploy2() {
|
|
4351
|
+
async function deploy2(options = {}) {
|
|
4344
4352
|
const { config: cfg, token } = requireToken();
|
|
4353
|
+
if (options.status) {
|
|
4354
|
+
const result2 = await getDeployInfo(cfg.slug, token);
|
|
4355
|
+
if (!result2.ok) {
|
|
4356
|
+
const errorData = result2.data;
|
|
4357
|
+
error(`Failed to get deploy info: ${errorData.message || errorData.error || "Unknown error"}`);
|
|
4358
|
+
process.exit(ExitCode.NetworkError);
|
|
4359
|
+
}
|
|
4360
|
+
const data = result2.data;
|
|
4361
|
+
if (!data.deployed) {
|
|
4362
|
+
info("Not deployed yet");
|
|
4363
|
+
return;
|
|
4364
|
+
}
|
|
4365
|
+
info(`URL: ${data.url}`);
|
|
4366
|
+
info(`DEPLOYED_VERSION: ${data.version}`);
|
|
4367
|
+
info(`DEPLOYED_AT: ${new Date(data.deployedAt).toISOString()}`);
|
|
4368
|
+
return;
|
|
4369
|
+
}
|
|
4345
4370
|
info("Deploying presentation...");
|
|
4346
4371
|
const result = await deploy(cfg.slug, token);
|
|
4347
4372
|
if (!result.ok) {
|
|
@@ -4685,7 +4710,7 @@ program.command("push").description("Upload slides.md to server").option("--forc
|
|
|
4685
4710
|
program.command("sync").description("Smart bidirectional sync").action(wrapCommand(sync));
|
|
4686
4711
|
program.command("upload <file>").description("Upload an image or media file").action(wrapCommand(upload));
|
|
4687
4712
|
program.command("export <format>").description("Export presentation to PDF or PPTX").action(wrapCommand(exportSlides2));
|
|
4688
|
-
program.command("deploy").description("Deploy presentation as static site").action(wrapCommand(deploy2));
|
|
4713
|
+
program.command("deploy").description("Deploy presentation as static site").option("--status", "Check deployment status").action(wrapCommand((options) => deploy2(options)));
|
|
4689
4714
|
program.command("history").description("List saved versions").action(wrapCommand(history));
|
|
4690
4715
|
program.command("revert <version>").description("Revert to a previous version").action(wrapCommand(revert));
|
|
4691
4716
|
program.parse();
|