@jokerized/decksmith 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -336,7 +336,7 @@ turn a document into a deck with the same settings the CLI takes.
336
336
  }
337
337
  ```
338
338
 
339
- Build it first with `npm run build && npm run build:mcp`. `DECKSMITH_MCP_ROOT` is the fence
339
+ Build it first with `npm run build`. `DECKSMITH_MCP_ROOT` is the fence
340
340
  — documents outside it are not readable, and it defaults to your home directory rather than
341
341
  the working directory, because not every client launches a stdio server anywhere useful.
342
342
 
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/cli.ts
4
4
  import { cp, mkdir as mkdir7, readdir as readdir3, readFile as readFile13, stat, writeFile as writeFile8 } from "node:fs/promises";
5
- import { createRequire as createRequire2 } from "node:module";
5
+ import { createRequire as createRequire3 } from "node:module";
6
6
  import { dirname as dirname4, join as join12, relative as relative2, resolve as resolve3 } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { Command } from "commander";
@@ -8340,6 +8340,10 @@ async function readCompositions(dir) {
8340
8340
  );
8341
8341
  }
8342
8342
 
8343
+ // src/version.ts
8344
+ import { createRequire as createRequire2 } from "node:module";
8345
+ var VERSION = createRequire2(import.meta.url)("../package.json").version;
8346
+
8343
8347
  // src/cli.ts
8344
8348
  var AUDIO_DIR = "audio";
8345
8349
  var NARRATION_FILE = "narration.json";
@@ -8353,7 +8357,7 @@ async function deckRuntime() {
8353
8357
  }
8354
8358
  }
8355
8359
  function playerBundle() {
8356
- const require2 = createRequire2(import.meta.url);
8360
+ const require2 = createRequire3(import.meta.url);
8357
8361
  try {
8358
8362
  return join12(dirname4(require2.resolve("hyperframes/package.json")), "dist", PLAYER_FILE);
8359
8363
  } catch {
@@ -8361,7 +8365,7 @@ function playerBundle() {
8361
8365
  }
8362
8366
  }
8363
8367
  async function vendorKatex(out) {
8364
- const require2 = createRequire2(import.meta.url);
8368
+ const require2 = createRequire3(import.meta.url);
8365
8369
  const dist = join12(dirname4(require2.resolve("katex/package.json")), "dist");
8366
8370
  const css = await readFile13(join12(dist, "katex.min.css"), "utf8");
8367
8371
  await mkdir7(join12(out, "katex/fonts"), { recursive: true });
@@ -8376,7 +8380,7 @@ async function vendorKatex(out) {
8376
8380
  await writeFile8(join12(out, "katex/katex.min.css"), woff2Only);
8377
8381
  }
8378
8382
  async function vendorScripts(out) {
8379
- const require2 = createRequire2(import.meta.url);
8383
+ const require2 = createRequire3(import.meta.url);
8380
8384
  await mkdir7(join12(out, "vendor"), { recursive: true });
8381
8385
  for (const [pkg, rel, name] of [
8382
8386
  ["gsap/package.json", "dist/gsap.min.js", "gsap.min.js"],
@@ -8435,7 +8439,7 @@ function stated(prefs, key) {
8435
8439
  return prefs[key] === DEFAULTS[key] ? void 0 : prefs[key];
8436
8440
  }
8437
8441
  var program = new Command();
8438
- program.name("decksmith").description("Turn a source document into an animated explanation deck.").version("0.1.0");
8442
+ program.name("decksmith").description("Turn a source document into an animated explanation deck.").version(VERSION);
8439
8443
  program.command("ingest").description("Parse a document into source.json, localising its figures and font.").argument("<input>", "source document (markdown)").requiredOption("-o, --out <file>", "where to write source.json").option("--lang <bcp47>", "override the sniffed language").action(async (input, o) => {
8440
8444
  const md = await readFile13(resolve3(input), "utf8").catch(() => {
8441
8445
  throw new Error(`Cannot read ${input}.`);