@likecoin/epubcheck-ts 0.2.1 → 0.2.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/bin/epubcheck.js +4 -2
- package/bin/epubcheck.ts +8 -6
- package/dist/index.cjs +943 -229
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +943 -229
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/bin/epubcheck.js
CHANGED
|
@@ -3,7 +3,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { basename } from "node:path";
|
|
5
5
|
const { EpubCheck, toJSONReport } = await import("../dist/index.js");
|
|
6
|
-
const VERSION = "0.2.
|
|
6
|
+
const VERSION = "0.2.3";
|
|
7
7
|
const { values, positionals } = parseArgs({
|
|
8
8
|
options: {
|
|
9
9
|
json: { type: "string", short: "j" },
|
|
@@ -103,7 +103,9 @@ async function main() {
|
|
|
103
103
|
if (!values.quiet) {
|
|
104
104
|
const fatal = result.messages.filter((m) => m.severity === "fatal");
|
|
105
105
|
const errors = result.messages.filter((m) => m.severity === "error");
|
|
106
|
-
const warnings = result.messages.filter(
|
|
106
|
+
const warnings = result.messages.filter(
|
|
107
|
+
(m) => m.severity === "warning"
|
|
108
|
+
);
|
|
107
109
|
const info = result.messages.filter((m) => m.severity === "info");
|
|
108
110
|
const usage = result.messages.filter((m) => m.severity === "usage");
|
|
109
111
|
const printMessages = (messages, color, label) => {
|
package/bin/epubcheck.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { basename } from 'node:path';
|
|
|
14
14
|
// Dynamic import to support both ESM and CJS builds
|
|
15
15
|
const { EpubCheck, toJSONReport } = await import('../dist/index.js');
|
|
16
16
|
|
|
17
|
-
const VERSION = '0.2.
|
|
17
|
+
const VERSION = '0.2.3';
|
|
18
18
|
|
|
19
19
|
// Parse command line arguments
|
|
20
20
|
const { values, positionals } = parseArgs({
|
|
@@ -137,11 +137,13 @@ async function main(): Promise<void> {
|
|
|
137
137
|
// Console output (unless quiet mode)
|
|
138
138
|
if (!values.quiet) {
|
|
139
139
|
// Group messages by severity
|
|
140
|
-
const fatal = result.messages.filter((m) => m.severity === 'fatal');
|
|
141
|
-
const errors = result.messages.filter((m) => m.severity === 'error');
|
|
142
|
-
const warnings = result.messages.filter(
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
const fatal = result.messages.filter((m: { severity: string }) => m.severity === 'fatal');
|
|
141
|
+
const errors = result.messages.filter((m: { severity: string }) => m.severity === 'error');
|
|
142
|
+
const warnings = result.messages.filter(
|
|
143
|
+
(m: { severity: string }) => m.severity === 'warning',
|
|
144
|
+
);
|
|
145
|
+
const info = result.messages.filter((m: { severity: string }) => m.severity === 'info');
|
|
146
|
+
const usage = result.messages.filter((m: { severity: string }) => m.severity === 'usage');
|
|
145
147
|
|
|
146
148
|
// Print messages with colors
|
|
147
149
|
const printMessages = (
|