vslides 1.0.19 → 1.0.21

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.
Files changed (2) hide show
  1. package/dist/cli.js +33 -2
  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,31 @@ 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
+ info(`CURRENT_VERSION: ${data.currentVersion}`);
4364
+ return;
4365
+ }
4366
+ info(`URL: ${data.url}`);
4367
+ info(`DEPLOYED_VERSION: ${data.deployedVersion}`);
4368
+ info(`CURRENT_VERSION: ${data.currentVersion}`);
4369
+ if (data.isUpToDate) {
4370
+ success("Deployment is up to date");
4371
+ } else {
4372
+ info("NEEDS_REDEPLOY: Content has changed since last deploy");
4373
+ }
4374
+ return;
4375
+ }
4345
4376
  info("Deploying presentation...");
4346
4377
  const result = await deploy(cfg.slug, token);
4347
4378
  if (!result.ok) {
@@ -4685,7 +4716,7 @@ program.command("push").description("Upload slides.md to server").option("--forc
4685
4716
  program.command("sync").description("Smart bidirectional sync").action(wrapCommand(sync));
4686
4717
  program.command("upload <file>").description("Upload an image or media file").action(wrapCommand(upload));
4687
4718
  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));
4719
+ program.command("deploy").description("Deploy presentation as static site").option("--status", "Check deployment status").action(wrapCommand((options) => deploy2(options)));
4689
4720
  program.command("history").description("List saved versions").action(wrapCommand(history));
4690
4721
  program.command("revert <version>").description("Revert to a previous version").action(wrapCommand(revert));
4691
4722
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vslides",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "CLI for Vercel Slides API",
5
5
  "license": "MIT",
6
6
  "author": "Vercel",