@vivliostyle/cli 7.3.0 → 8.0.0
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/epub.js +3 -2
- package/dist/epub.js.map +1 -1
- package/package.json +6 -6
package/dist/epub.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'upath';
|
|
4
4
|
import { inflateZip, useTmpDirectory } from './util.js';
|
|
@@ -7,9 +7,10 @@ export async function openEpubToTmpDirectory(filePath) {
|
|
|
7
7
|
const [tmpDir, deleteEpub] = await useTmpDirectory();
|
|
8
8
|
await inflateZip(filePath, tmpDir);
|
|
9
9
|
const containerXmlPath = path.join(tmpDir, 'META-INF/container.xml');
|
|
10
|
-
const
|
|
10
|
+
const xmlParser = new XMLParser({
|
|
11
11
|
ignoreAttributes: false,
|
|
12
12
|
});
|
|
13
|
+
const { container } = xmlParser.parse(fs.readFileSync(containerXmlPath, 'utf8'));
|
|
13
14
|
const rootfile = pickFirstOne(container.rootfiles.rootfile); // Only supports a default rendition
|
|
14
15
|
const epubOpfPath = path.join(tmpDir, rootfile['@_full-path']);
|
|
15
16
|
return { dest: tmpDir, epubOpfPath, deleteEpub };
|
package/dist/epub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epub.js","sourceRoot":"","sources":["../src/epub.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"epub.js","sourceRoot":"","sources":["../src/epub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,YAAY,GAAG,CAAI,GAAY,EAAK,EAAE,CAC1C,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,QAAgB;IAK3D,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,eAAe,EAAE,CAAC;IACrD,MAAM,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEnC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACrE,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC9B,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;IACH,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,KAAK,CACnC,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAC1C,CAAC;IACF,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,oCAAoC;IACjG,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivliostyle/cli",
|
|
3
3
|
"description": "Save the pdf file via headless browser and Vivliostyle.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
5
5
|
"author": "spring_raining <harusamex.com@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dev": "run-p dev:*",
|
|
15
15
|
"dev:cli": "tsc -w --preserveWatchOutput",
|
|
16
16
|
"example": "yarn --cwd example build",
|
|
17
|
-
"pretest": "yarn build && playwright install chromium",
|
|
17
|
+
"pretest": "yarn build && playwright-core install chromium",
|
|
18
18
|
"release": "release-it",
|
|
19
19
|
"release:pre": "release-it --preRelease --npm.tag=next",
|
|
20
20
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@npmcli/arborist": "^6.1.3",
|
|
24
24
|
"@vivliostyle/vfm": "2.1.0",
|
|
25
|
-
"@vivliostyle/viewer": "2.25.
|
|
25
|
+
"@vivliostyle/viewer": "2.25.1",
|
|
26
26
|
"ajv": "^8.11.2",
|
|
27
27
|
"ajv-formats": "^2.1.1",
|
|
28
28
|
"better-ajv-errors": "^1.2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"decamelize": "5.0.0",
|
|
36
36
|
"execa": "^5.1.1",
|
|
37
37
|
"fast-glob": "3.2.12",
|
|
38
|
-
"fast-xml-parser": "^
|
|
38
|
+
"fast-xml-parser": "^4.2.4",
|
|
39
39
|
"globby": "13.1.2",
|
|
40
40
|
"hast-util-to-html": "^7.1.3",
|
|
41
41
|
"hastscript": "^6.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"node-stream-zip": "^1.14.0",
|
|
47
47
|
"ora": "^5.4.1",
|
|
48
48
|
"pdf-lib": "^1.16.0",
|
|
49
|
-
"playwright-core": "1.
|
|
49
|
+
"playwright-core": "1.35.0",
|
|
50
50
|
"portfinder": "^1.0.28",
|
|
51
51
|
"press-ready": "^4.0.3",
|
|
52
52
|
"prettier": "^2.3.2",
|
|
@@ -126,6 +126,6 @@
|
|
|
126
126
|
],
|
|
127
127
|
"license": "AGPL-3.0",
|
|
128
128
|
"engines": {
|
|
129
|
-
"node": ">=
|
|
129
|
+
"node": ">=16"
|
|
130
130
|
}
|
|
131
131
|
}
|