@storyteller-platform/align 0.1.37 → 0.1.38

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.
@@ -68,6 +68,7 @@ __export(markup_exports, {
68
68
  });
69
69
  module.exports = __toCommonJS(markup_exports);
70
70
  var import_promises = require("node:fs/promises");
71
+ var import_node_path = require("node:path");
71
72
  var import_posix = require("node:path/posix");
72
73
  var import_epub = require("@storyteller-platform/epub");
73
74
  var import_ghost_story = require("@storyteller-platform/ghost-story");
@@ -81,6 +82,7 @@ async function markup(input, output, options) {
81
82
  try {
82
83
  const timing = (0, import_ghost_story.createAggregator)();
83
84
  timing.setMetadata("granularity", options.granularity ?? "sentence");
85
+ await (0, import_promises.mkdir)((0, import_node_path.dirname)(output), { recursive: true });
84
86
  await (0, import_promises.copyFile)(input, output);
85
87
  const epub = __using(_stack, await import_epub.Epub.from(output));
86
88
  const primaryLocale = options.primaryLocale ?? await epub.getLanguage();
@@ -2,7 +2,8 @@ import {
2
2
  __callDispose,
3
3
  __using
4
4
  } from "../chunk-BIEQXUOY.js";
5
- import { copyFile } from "node:fs/promises";
5
+ import { copyFile, mkdir } from "node:fs/promises";
6
+ import { dirname } from "node:path";
6
7
  import { basename } from "node:path/posix";
7
8
  import { Epub } from "@storyteller-platform/epub";
8
9
  import {
@@ -24,6 +25,7 @@ async function markup(input, output, options) {
24
25
  try {
25
26
  const timing = createAggregator();
26
27
  timing.setMetadata("granularity", options.granularity ?? "sentence");
28
+ await mkdir(dirname(output), { recursive: true });
27
29
  await copyFile(input, output);
28
30
  const epub = __using(_stack, await Epub.from(output));
29
31
  const primaryLocale = options.primaryLocale ?? await epub.getLanguage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyteller-platform/align",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "A library and CLI for automatically aligning audiobooks and EPUBs to produce Media Overlays",
5
5
  "author": "Shane Friedman",
6
6
  "license": "MIT",