vslides 1.0.7 → 1.0.8

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 (3) hide show
  1. package/README.md +20 -0
  2. package/dist/cli.js +27 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -214,6 +214,26 @@ vslides export pdf
214
214
  vslides export pptx
215
215
  ```
216
216
 
217
+ ## Deploy
218
+
219
+ #### `vslides deploy`
220
+
221
+ Deploy presentation as a permanent static site. The deployed URL works without the sandbox running and loads faster.
222
+
223
+ ```bash
224
+ vslides deploy
225
+ # Output:
226
+ # DEPLOYED: https://slidev-server.vercel.app/static/happy-blue-ocean
227
+ # VERSION: 5
228
+ # DEPLOYED_AT: 2026-01-28T12:00:00.000Z
229
+ ```
230
+
231
+ Benefits:
232
+ - Permanent URL that doesn't expire
233
+ - Fast loading (no sandbox startup)
234
+ - Works even after sandbox times out
235
+ - Can be embedded in docs/wikis
236
+
217
237
  ## Version History
218
238
 
219
239
  #### `vslides history`
package/dist/cli.js CHANGED
@@ -3322,6 +3322,17 @@ async function revokeCLIAuth(token) {
3322
3322
  // Don't clear auth on revoke failure
3323
3323
  });
3324
3324
  }
3325
+ async function deploy(slug, token) {
3326
+ return request(`/api/session/${slug}/deploy`, {
3327
+ method: "POST",
3328
+ headers: {
3329
+ "X-Slug": slug,
3330
+ "X-Session-Token": token,
3331
+ "Content-Type": "application/json"
3332
+ },
3333
+ body: JSON.stringify({})
3334
+ });
3335
+ }
3325
3336
 
3326
3337
  // src/lib/config.ts
3327
3338
  var import_node_fs2 = require("node:fs");
@@ -4087,6 +4098,21 @@ async function revert(version) {
4087
4098
  info(`REVERTED: Now at version ${newVersion} (content from version ${revertedFrom})`);
4088
4099
  }
4089
4100
 
4101
+ // src/commands/deploy.ts
4102
+ async function deploy2() {
4103
+ const { config: cfg, token } = requireToken();
4104
+ info("Deploying presentation...");
4105
+ const result = await deploy(cfg.slug, token);
4106
+ if (!result.ok) {
4107
+ const errorData = result.data;
4108
+ error(`Deploy failed: ${errorData.message || errorData.error || "Unknown error"}`);
4109
+ process.exit(ExitCode.NetworkError);
4110
+ }
4111
+ info(`DEPLOYED: ${result.data.url}`);
4112
+ info(`VERSION: ${result.data.version}`);
4113
+ info(`DEPLOYED_AT: ${new Date(result.data.deployedAt).toISOString()}`);
4114
+ }
4115
+
4090
4116
  // src/commands/login.ts
4091
4117
  var POLL_INTERVAL2 = 2e3;
4092
4118
  var POLL_TIMEOUT2 = 12e4;
@@ -4217,6 +4243,7 @@ program.command("push").description("Upload slides.md to server").option("--forc
4217
4243
  program.command("sync").description("Smart bidirectional sync").action(wrapCommand(sync));
4218
4244
  program.command("upload <file>").description("Upload an image or media file").action(wrapCommand(upload));
4219
4245
  program.command("export <format>").description("Export presentation to PDF or PPTX").action(wrapCommand(exportSlides2));
4246
+ program.command("deploy").description("Deploy presentation as static site").action(wrapCommand(deploy2));
4220
4247
  program.command("history").description("List saved versions").action(wrapCommand(history));
4221
4248
  program.command("revert <version>").description("Revert to a previous version").action(wrapCommand(revert));
4222
4249
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vslides",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "CLI for Vercel Slides API",
5
5
  "license": "MIT",
6
6
  "author": "Vercel",