htmlship 0.1.1 → 0.1.2

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 +5 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -56,7 +56,7 @@ var VERSION;
56
56
  var init_version = __esm({
57
57
  "src/version.ts"() {
58
58
  "use strict";
59
- VERSION = "0.1.1";
59
+ VERSION = "0.1.2";
60
60
  }
61
61
  });
62
62
 
@@ -207,14 +207,14 @@ function buildMcpServer(client) {
207
207
  inputSchema: {
208
208
  html: z.string().describe("The HTML body to publish."),
209
209
  title: z.string().optional().describe("Optional human-readable title."),
210
- expires_in_seconds: z.number().int().positive().optional().describe("Optional TTL in seconds.")
210
+ expires_in: z.number().int().min(1).max(60 * 24 * 7).optional().describe("Optional TTL in minutes (1\u201310080, i.e. up to 7 days).")
211
211
  }
212
212
  },
213
- async ({ html, title, expires_in_seconds }) => {
213
+ async ({ html, title, expires_in }) => {
214
214
  try {
215
215
  const paste = await c.publish(html, {
216
216
  title: title ?? null,
217
- expiresIn: expires_in_seconds ?? null
217
+ expiresIn: expires_in ?? null
218
218
  });
219
219
  return {
220
220
  content: [
@@ -530,7 +530,7 @@ async function tryClipboardCopy(text) {
530
530
 
531
531
  // src/commands/publish.ts
532
532
  function registerPublish(program) {
533
- program.command("publish").description("Publish an HTML document and get a URL.").argument("[source]", "file path, '-' for stdin (default: stdin if piped)").option("-f, --file <path>", "HTML file path").option("--title <title>", "Optional title").option("--password <password>", "Password-protect the paste").option("--expires-in <seconds>", "Seconds until expiry").option("--no-clipboard", "Don't copy URL to clipboard").option("-q, --quiet", "Print only the URL").action(async function(source, opts) {
533
+ program.command("publish").description("Publish an HTML document and get a URL.").argument("[source]", "file path, '-' for stdin (default: stdin if piped)").option("-f, --file <path>", "HTML file path").option("--title <title>", "Optional title").option("--password <password>", "Password-protect the paste").option("--expires-in <minutes>", "Minutes until expiry (1\u201310080, i.e. up to 7 days)").option("--no-clipboard", "Don't copy URL to clipboard").option("-q, --quiet", "Print only the URL").action(async function(source, opts) {
534
534
  const html = readHtmlFromSource(source, opts.file);
535
535
  const apiUrl = this.parent?.opts()?.apiUrl;
536
536
  const client = new HTMLShipClient({ baseUrl: apiUrl });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htmlship",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Host and share HTML pages from LLMs and coding agents in one line. CLI + MCP server.",
5
5
  "keywords": [
6
6
  "html",