@storyteller-platform/epub 0.6.0 → 0.6.1
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/dist/adapters/tmpfs.cjs +2 -2
- package/dist/adapters/tmpfs.js +2 -2
- package/dist/upgrade.d.cts +1 -1
- package/dist/upgrade.d.ts +1 -1
- package/package.json +2 -2
package/dist/adapters/tmpfs.cjs
CHANGED
|
@@ -100,7 +100,7 @@ function isAudioFile(filenameOrExt) {
|
|
|
100
100
|
return AUDIO_FILE_EXTENSIONS.some((ext) => filenameOrExt.endsWith(ext));
|
|
101
101
|
}
|
|
102
102
|
function mintRootPath() {
|
|
103
|
-
return (0, import_path.join)((0, import_node_os.tmpdir)(), `storyteller-platform-epub-${(0, import_node_crypto.randomUUID)()}
|
|
103
|
+
return (0, import_path.join)((0, import_node_os.tmpdir)(), `storyteller-platform-epub-${(0, import_node_crypto.randomUUID)()}`);
|
|
104
104
|
}
|
|
105
105
|
class TmpFsAdapter {
|
|
106
106
|
constructor(rootPath) {
|
|
@@ -119,7 +119,7 @@ class TmpFsAdapter {
|
|
|
119
119
|
await zipfile.close();
|
|
120
120
|
});
|
|
121
121
|
for await (const entry of zipfile) {
|
|
122
|
-
if (entry.filename.endsWith(
|
|
122
|
+
if (entry.filename.endsWith("/")) {
|
|
123
123
|
continue;
|
|
124
124
|
}
|
|
125
125
|
const writePath = (0, import_path.join)(rootPath, entry.filename);
|
package/dist/adapters/tmpfs.js
CHANGED
|
@@ -44,7 +44,7 @@ function isAudioFile(filenameOrExt) {
|
|
|
44
44
|
return AUDIO_FILE_EXTENSIONS.some((ext) => filenameOrExt.endsWith(ext));
|
|
45
45
|
}
|
|
46
46
|
function mintRootPath() {
|
|
47
|
-
return join(tmpdir(), `storyteller-platform-epub-${randomUUID()}
|
|
47
|
+
return join(tmpdir(), `storyteller-platform-epub-${randomUUID()}`);
|
|
48
48
|
}
|
|
49
49
|
class TmpFsAdapter {
|
|
50
50
|
constructor(rootPath) {
|
|
@@ -63,7 +63,7 @@ class TmpFsAdapter {
|
|
|
63
63
|
await zipfile.close();
|
|
64
64
|
});
|
|
65
65
|
for await (const entry of zipfile) {
|
|
66
|
-
if (entry.filename.endsWith(
|
|
66
|
+
if (entry.filename.endsWith("/")) {
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
69
|
const writePath = join(rootPath, entry.filename);
|
package/dist/upgrade.d.cts
CHANGED
|
@@ -821,7 +821,7 @@ declare class Epub {
|
|
|
821
821
|
* @param head Optional - the XMl nodes to place in the head
|
|
822
822
|
* @param language Optional - defaults to the EPUB's language
|
|
823
823
|
*/
|
|
824
|
-
createXhtmlDocument(body: ParsedXml, head?: ParsedXml, language?: Intl.Locale): Promise<(XmlElement<"
|
|
824
|
+
createXhtmlDocument(body: ParsedXml, head?: ParsedXml, language?: Intl.Locale): Promise<(XmlElement<"?xml"> | XmlElement<"html">)[]>;
|
|
825
825
|
/**
|
|
826
826
|
* Retrieves the contents of an XHTML item, given its manifest id.
|
|
827
827
|
*
|
package/dist/upgrade.d.ts
CHANGED
|
@@ -821,7 +821,7 @@ declare class Epub {
|
|
|
821
821
|
* @param head Optional - the XMl nodes to place in the head
|
|
822
822
|
* @param language Optional - defaults to the EPUB's language
|
|
823
823
|
*/
|
|
824
|
-
createXhtmlDocument(body: ParsedXml, head?: ParsedXml, language?: Intl.Locale): Promise<(XmlElement<"
|
|
824
|
+
createXhtmlDocument(body: ParsedXml, head?: ParsedXml, language?: Intl.Locale): Promise<(XmlElement<"?xml"> | XmlElement<"html">)[]>;
|
|
825
825
|
/**
|
|
826
826
|
* Retrieves the contents of an XHTML item, given its manifest id.
|
|
827
827
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyteller-platform/epub",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@readium/shared": "^2.2.0",
|
|
51
51
|
"@storyteller-platform/fs": "^0.1.4",
|
|
52
|
-
"@storyteller-platform/path": "^0.1.
|
|
52
|
+
"@storyteller-platform/path": "^0.1.3",
|
|
53
53
|
"@zip.js/zip.js": "^2.0.0",
|
|
54
54
|
"async-mutex": "^0.5.0",
|
|
55
55
|
"fast-xml-parser": "^4.0.1",
|