honkit 5.1.5 → 6.0.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/lib/api/decodeConfig.js +1 -2
- package/lib/api/decodeGlobal.js +1 -2
- package/lib/api/encodeGlobal.d.ts.map +1 -1
- package/lib/bin.d.ts.map +1 -1
- package/lib/cli/buildEbook.js +1 -1
- package/lib/cli/server.d.ts +0 -1
- package/lib/cli/server.d.ts.map +1 -1
- package/lib/cli/server.js +4 -0
- package/lib/fs/node.js +1 -1
- package/lib/models/file.d.ts +0 -1
- package/lib/models/file.d.ts.map +1 -1
- package/lib/models/fs.d.ts +0 -1
- package/lib/models/fs.d.ts.map +1 -1
- package/lib/models/hash.js +2 -2
- package/lib/output/generateBook.js +2 -3
- package/lib/output/json/onFinish.js +1 -2
- package/lib/output/json/onPage.js +1 -2
- package/lib/output/modifiers/fetchRemoteImages.d.ts +2 -2
- package/lib/output/modifiers/fetchRemoteImages.d.ts.map +1 -1
- package/lib/output/modifiers/inlineSvg.d.ts.map +1 -1
- package/lib/output/modifiers/inlineSvg.js +1 -0
- package/lib/output/modifiers/modifyHTML.d.ts.map +1 -1
- package/lib/output/modifiers/modifyHTML.js +1 -0
- package/lib/output/testing/generateMock.js +1 -2
- package/lib/output/website/onFinish.js +1 -2
- package/lib/output/website/onPage.js +1 -2
- package/lib/plugins/PluginResolver.d.ts.map +1 -1
- package/lib/plugins/PluginResolver.js +3 -1
- package/lib/plugins/loadPlugin.js +1 -2
- package/lib/utils/command.d.ts +0 -1
- package/lib/utils/command.d.ts.map +1 -1
- package/lib/utils/fs.d.ts +0 -1
- package/lib/utils/fs.d.ts.map +1 -1
- package/lib/utils/promise.js +6 -7
- package/package.json +34 -32
- package/lib/__tests__/__fixtures__/honkit/book.d.ts +0 -7
- package/lib/__tests__/__fixtures__/honkit/book.d.ts.map +0 -1
- package/lib/__tests__/__fixtures__/honkit/book.js +0 -9
- package/lib/__tests__/e2e.test.d.ts +0 -2
- package/lib/__tests__/e2e.test.d.ts.map +0 -1
- package/lib/__tests__/e2e.test.js +0 -81
- package/lib/__tests__/init.d.ts +0 -2
- package/lib/__tests__/init.d.ts.map +0 -1
- package/lib/__tests__/init.js +0 -19
- package/lib/__tests__/satisfies.d.ts +0 -2
- package/lib/__tests__/satisfies.d.ts.map +0 -1
- package/lib/__tests__/satisfies.js +0 -11
- package/lib/__tests__/snapshot-asciidoc.d.ts +0 -2
- package/lib/__tests__/snapshot-asciidoc.d.ts.map +0 -1
- package/lib/__tests__/snapshot-asciidoc.js +0 -48
- package/lib/__tests__/snapshot-honkit.d.ts +0 -2
- package/lib/__tests__/snapshot-honkit.d.ts.map +0 -1
- package/lib/__tests__/snapshot-honkit.js +0 -48
- package/lib/constants/__tests__/configSchema.d.ts +0 -2
- package/lib/constants/__tests__/configSchema.d.ts.map +0 -1
- package/lib/constants/__tests__/configSchema.js +0 -41
- package/lib/fs/__tests__/mock.d.ts +0 -2
- package/lib/fs/__tests__/mock.d.ts.map +0 -1
- package/lib/fs/__tests__/mock.js +0 -68
- package/lib/models/__tests__/config.d.ts +0 -2
- package/lib/models/__tests__/config.d.ts.map +0 -1
- package/lib/models/__tests__/config.js +0 -164
- package/lib/models/__tests__/glossary.d.ts +0 -2
- package/lib/models/__tests__/glossary.d.ts.map +0 -1
- package/lib/models/__tests__/glossary.js +0 -38
- package/lib/models/__tests__/glossaryEntry.d.ts +0 -2
- package/lib/models/__tests__/glossaryEntry.d.ts.map +0 -1
- package/lib/models/__tests__/glossaryEntry.js +0 -16
- package/lib/models/__tests__/page.d.ts +0 -2
- package/lib/models/__tests__/page.d.ts.map +0 -1
- package/lib/models/__tests__/page.js +0 -26
- package/lib/models/__tests__/plugin.d.ts +0 -2
- package/lib/models/__tests__/plugin.d.ts.map +0 -1
- package/lib/models/__tests__/plugin.js +0 -50
- package/lib/models/__tests__/pluginDependency.d.ts +0 -2
- package/lib/models/__tests__/pluginDependency.d.ts.map +0 -1
- package/lib/models/__tests__/pluginDependency.js +0 -71
- package/lib/models/__tests__/summary.d.ts +0 -2
- package/lib/models/__tests__/summary.d.ts.map +0 -1
- package/lib/models/__tests__/summary.js +0 -115
- package/lib/models/__tests__/summaryArticle.d.ts +0 -2
- package/lib/models/__tests__/summaryArticle.d.ts.map +0 -1
- package/lib/models/__tests__/summaryArticle.js +0 -117
- package/lib/models/__tests__/summaryPart.d.ts +0 -2
- package/lib/models/__tests__/summaryPart.d.ts.map +0 -1
- package/lib/models/__tests__/summaryPart.js +0 -24
- package/lib/models/__tests__/templateBlock.d.ts +0 -2
- package/lib/models/__tests__/templateBlock.d.ts.map +0 -1
- package/lib/models/__tests__/templateBlock.js +0 -172
- package/lib/models/__tests__/templateEngine.d.ts +0 -2
- package/lib/models/__tests__/templateEngine.d.ts.map +0 -1
- package/lib/models/__tests__/templateEngine.js +0 -49
- package/lib/modifiers/config/__tests__/addPlugin.d.ts +0 -2
- package/lib/modifiers/config/__tests__/addPlugin.d.ts.map +0 -1
- package/lib/modifiers/config/__tests__/addPlugin.js +0 -30
- package/lib/modifiers/config/__tests__/removePlugin.d.ts +0 -2
- package/lib/modifiers/config/__tests__/removePlugin.d.ts.map +0 -1
- package/lib/modifiers/config/__tests__/removePlugin.js +0 -29
- package/lib/modifiers/config/__tests__/togglePlugin.d.ts +0 -2
- package/lib/modifiers/config/__tests__/togglePlugin.d.ts.map +0 -1
- package/lib/modifiers/config/__tests__/togglePlugin.js +0 -28
- package/lib/modifiers/summary/__tests__/editPartTitle.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/editPartTitle.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/editPartTitle.js +0 -41
- package/lib/modifiers/summary/__tests__/insertArticle.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/insertArticle.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/insertArticle.js +0 -72
- package/lib/modifiers/summary/__tests__/insertPart.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/insertPart.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/insertPart.js +0 -56
- package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/mergeAtLevel.js +0 -45
- package/lib/modifiers/summary/__tests__/moveArticle.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/moveArticle.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/moveArticle.js +0 -66
- package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/moveArticleAfter.js +0 -75
- package/lib/modifiers/summary/__tests__/removeArticle.d.ts +0 -2
- package/lib/modifiers/summary/__tests__/removeArticle.d.ts.map +0 -1
- package/lib/modifiers/summary/__tests__/removeArticle.js +0 -54
- package/lib/output/__tests__/ebook.d.ts +0 -2
- package/lib/output/__tests__/ebook.d.ts.map +0 -1
- package/lib/output/__tests__/ebook.js +0 -17
- package/lib/output/__tests__/json.d.ts +0 -2
- package/lib/output/__tests__/json.d.ts.map +0 -1
- package/lib/output/__tests__/json.js +0 -43
- package/lib/output/__tests__/plugin-hooks.d.ts +0 -2
- package/lib/output/__tests__/plugin-hooks.d.ts.map +0 -1
- package/lib/output/__tests__/plugin-hooks.js +0 -57
- package/lib/output/__tests__/website.d.ts +0 -2
- package/lib/output/__tests__/website.d.ts.map +0 -1
- package/lib/output/__tests__/website.js +0 -121
- package/lib/output/modifiers/__tests__/addHeadingId.d.ts +0 -2
- package/lib/output/modifiers/__tests__/addHeadingId.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/addHeadingId.js +0 -46
- package/lib/output/modifiers/__tests__/annotateText.d.ts +0 -2
- package/lib/output/modifiers/__tests__/annotateText.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/annotateText.js +0 -76
- package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts +0 -2
- package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/fetchRemoteImages.js +0 -69
- package/lib/output/modifiers/__tests__/highlightCode.d.ts +0 -2
- package/lib/output/modifiers/__tests__/highlightCode.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/highlightCode.js +0 -71
- package/lib/output/modifiers/__tests__/inlinePng.d.ts +0 -2
- package/lib/output/modifiers/__tests__/inlinePng.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/inlinePng.js +0 -45
- package/lib/output/modifiers/__tests__/inlineSvg.d.ts +0 -2
- package/lib/output/modifiers/__tests__/inlineSvg.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/inlineSvg.js +0 -65
- package/lib/output/modifiers/__tests__/resolveImages.d.ts +0 -2
- package/lib/output/modifiers/__tests__/resolveImages.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/resolveImages.js +0 -62
- package/lib/output/modifiers/__tests__/resolveLinks.d.ts +0 -2
- package/lib/output/modifiers/__tests__/resolveLinks.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/resolveLinks.js +0 -104
- package/lib/output/modifiers/__tests__/svgToImg.d.ts +0 -2
- package/lib/output/modifiers/__tests__/svgToImg.d.ts.map +0 -1
- package/lib/output/modifiers/__tests__/svgToImg.js +0 -52
- package/lib/output/website/__tests__/i18n.d.ts +0 -2
- package/lib/output/website/__tests__/i18n.d.ts.map +0 -1
- package/lib/output/website/__tests__/i18n.js +0 -40
- package/lib/parse/__tests__/listAssets.d.ts +0 -2
- package/lib/parse/__tests__/listAssets.d.ts.map +0 -1
- package/lib/parse/__tests__/listAssets.js +0 -63
- package/lib/parse/__tests__/parseBook.d.ts +0 -2
- package/lib/parse/__tests__/parseBook.d.ts.map +0 -1
- package/lib/parse/__tests__/parseBook.js +0 -77
- package/lib/parse/__tests__/parseGlossary.d.ts +0 -2
- package/lib/parse/__tests__/parseGlossary.d.ts.map +0 -1
- package/lib/parse/__tests__/parseGlossary.js +0 -32
- package/lib/parse/__tests__/parseIgnore.d.ts +0 -2
- package/lib/parse/__tests__/parseIgnore.d.ts.map +0 -1
- package/lib/parse/__tests__/parseIgnore.js +0 -37
- package/lib/parse/__tests__/parsePageFromString.d.ts +0 -2
- package/lib/parse/__tests__/parsePageFromString.d.ts.map +0 -1
- package/lib/parse/__tests__/parsePageFromString.js +0 -34
- package/lib/parse/__tests__/parseReadme.d.ts +0 -2
- package/lib/parse/__tests__/parseReadme.d.ts.map +0 -1
- package/lib/parse/__tests__/parseReadme.js +0 -33
- package/lib/parse/__tests__/parseSummary.d.ts +0 -2
- package/lib/parse/__tests__/parseSummary.d.ts.map +0 -1
- package/lib/parse/__tests__/parseSummary.js +0 -30
- package/lib/plugins/__tests__/listDependencies.d.ts +0 -2
- package/lib/plugins/__tests__/listDependencies.d.ts.map +0 -1
- package/lib/plugins/__tests__/listDependencies.js +0 -28
- package/lib/plugins/__tests__/sortDependencies.d.ts +0 -2
- package/lib/plugins/__tests__/sortDependencies.d.ts.map +0 -1
- package/lib/plugins/__tests__/sortDependencies.js +0 -28
- package/lib/plugins/__tests__/validatePlugin.d.ts +0 -2
- package/lib/plugins/__tests__/validatePlugin.d.ts.map +0 -1
- package/lib/plugins/__tests__/validatePlugin.js +0 -99
- package/lib/templating/__tests__/conrefsLoader.d.ts +0 -2
- package/lib/templating/__tests__/conrefsLoader.d.ts.map +0 -1
- package/lib/templating/__tests__/conrefsLoader.js +0 -90
- package/lib/templating/__tests__/postRender.d.ts +0 -2
- package/lib/templating/__tests__/postRender.d.ts.map +0 -1
- package/lib/templating/__tests__/postRender.js +0 -52
- package/lib/templating/__tests__/replaceShortcuts.d.ts +0 -2
- package/lib/templating/__tests__/replaceShortcuts.d.ts.map +0 -1
- package/lib/templating/__tests__/replaceShortcuts.js +0 -27
- package/lib/utils/__tests__/git.d.ts +0 -2
- package/lib/utils/__tests__/git.d.ts.map +0 -1
- package/lib/utils/__tests__/git.js +0 -46
- package/lib/utils/__tests__/location.d.ts +0 -2
- package/lib/utils/__tests__/location.d.ts.map +0 -1
- package/lib/utils/__tests__/location.js +0 -81
- package/lib/utils/__tests__/path.d.ts +0 -2
- package/lib/utils/__tests__/path.d.ts.map +0 -1
- package/lib/utils/__tests__/path.js +0 -19
package/lib/api/decodeConfig.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeConfig =
|
|
3
|
+
exports.decodeConfig = decodeConfig;
|
|
4
4
|
/**
|
|
5
5
|
Decode changes from a JS API to a config object
|
|
6
6
|
|
|
@@ -14,4 +14,3 @@ function decodeConfig(config, result) {
|
|
|
14
14
|
delete values.output;
|
|
15
15
|
return config.updateValues(values);
|
|
16
16
|
}
|
|
17
|
-
exports.decodeConfig = decodeConfig;
|
package/lib/api/decodeGlobal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeGlobal =
|
|
3
|
+
exports.decodeGlobal = decodeGlobal;
|
|
4
4
|
const decodeConfig_1 = require("./decodeConfig");
|
|
5
5
|
/**
|
|
6
6
|
Decode changes from a JS API to a output object.
|
|
@@ -18,4 +18,3 @@ function decodeGlobal(output, result) {
|
|
|
18
18
|
book = book.set("config", config);
|
|
19
19
|
return output.set("book", book);
|
|
20
20
|
}
|
|
21
|
-
exports.decodeGlobal = decodeGlobal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeGlobal.d.ts","sourceRoot":"","sources":["../../src/api/encodeGlobal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encodeGlobal.d.ts","sourceRoot":"","sources":["../../src/api/encodeGlobal.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,MAAM,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAapB;;;;OAIG;;IAKH;;;;OAIG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAKH;;;;;OAKG;;IAQH;;;;;;;OAOG;wBAC0B,MAAM,QAAQ,MAAM,WAAW,aAAa;IAMzE;;;;;;;OAOG;yBAC2B,MAAM,QAAQ,MAAM,WAAW,aAAa;;QAOtE;;;;;;WAMG;;;;QASH;;;WAGG;;QAGH;;;WAGG;;QAKH;;;;;WAKG;;QAKH;;;WAGG;;QAKH;;;;;WAKG;;QAUH;;;;;;;WAOG;;QAYH;;;;;;;;WAQG;;;;;;;;;EAoEd;AAED,eAAe,YAAY,CAAC"}
|
package/lib/bin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG,uBAA0B,
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG,uBAA0B,OAAO,CAAC,IAAI,CA2CrD,CAAC"}
|
package/lib/cli/buildEbook.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
6
7
|
const path_1 = __importDefault(require("path"));
|
|
7
8
|
const promise_1 = __importDefault(require("../utils/promise"));
|
|
8
9
|
const fs_1 = __importDefault(require("../utils/fs"));
|
|
@@ -60,4 +61,3 @@ function default_1(format) {
|
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
|
-
exports.default = default_1;
|
package/lib/cli/server.d.ts
CHANGED
package/lib/cli/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/cli/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/cli/server.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAO5B,cAAM,MAAO,SAAQ,MAAM,CAAC,YAAY;IACpC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,GAAG,CAAO;IAClB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,OAAO,CAAQ;;IASvB;;;;OAIG;IACH,SAAS;IAIT;;;;OAIG;IACH,IAAI;IAqBJ;;;;OAIG;IACH,KAAK,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;CA0DlB;AAcD,eAAe,MAAM,CAAC"}
|
package/lib/cli/server.js
CHANGED
|
@@ -9,6 +9,10 @@ const send_1 = __importDefault(require("send"));
|
|
|
9
9
|
const url_1 = __importDefault(require("url"));
|
|
10
10
|
const promise_1 = __importDefault(require("../utils/promise"));
|
|
11
11
|
class Server extends events_1.default.EventEmitter {
|
|
12
|
+
running;
|
|
13
|
+
dir;
|
|
14
|
+
port;
|
|
15
|
+
sockets;
|
|
12
16
|
constructor() {
|
|
13
17
|
super();
|
|
14
18
|
this.running = null;
|
package/lib/fs/node.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = createNodeFS;
|
|
6
7
|
const path_1 = __importDefault(require("path"));
|
|
7
8
|
const immutable_1 = __importDefault(require("immutable"));
|
|
8
9
|
const fs_1 = __importDefault(require("../utils/fs"));
|
|
@@ -41,4 +42,3 @@ function createNodeFS(root) {
|
|
|
41
42
|
fsReadAsStream: fs_1.default.readStream
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
exports.default = createNodeFS;
|
package/lib/models/file.d.ts
CHANGED
package/lib/models/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/models/file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/models/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,MAAM,MAAM,UAAU,CAAC;;AAE9B,cAAM,IAAK,SAAQ,SAMjB;IACE,OAAO,IAAI,MAAM;IAIjB,QAAQ,IAAI,IAAI;IAIhB;;;;OAIG;IAEH,MAAM,IAAI,OAAO;IAIjB;;;;OAIG;IACH,OAAO,IAAI,MAAM;IASjB;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI;IAO7D;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAKpD;AAED,eAAe,IAAI,CAAC"}
|
package/lib/models/fs.d.ts
CHANGED
package/lib/models/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/models/fs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/models/fs.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,kBAAkB,CAAC;;AAIvC,cAAM,EAAG,SAAQ,OAUf;IACE;;;;OAIG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAOpC;;;OAGG;IACH,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;IAelC;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW1C;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWvC;;;OAGG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAM1E;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM;IAiB7B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAezC;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM;IAevB;;;;;;OAMG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM;IAMzB;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;IA4BjE;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAQ1C;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM;IAwB7B;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,KAAA;IAIjB;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE;CAGhD;AAQD,eAAe,EAAE,CAAC"}
|
package/lib/models/hash.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.hash = void 0;
|
|
4
|
+
exports.hashString = hashString;
|
|
4
5
|
// v8 has an optimization for storing 31-bit signed numbers.
|
|
5
6
|
// Values which have either 00 or 11 as the high order bits qualify.
|
|
6
7
|
// This function drops the highest order bit in a signed number, maintaining
|
|
@@ -101,7 +102,6 @@ function hashString(string) {
|
|
|
101
102
|
}
|
|
102
103
|
return smi(hashed);
|
|
103
104
|
}
|
|
104
|
-
exports.hashString = hashString;
|
|
105
105
|
function hashJSObj(obj) {
|
|
106
106
|
let hashed;
|
|
107
107
|
if (usingWeakMap) {
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.generateBook = generateBook;
|
|
7
|
+
exports.incrementalBuild = incrementalBuild;
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const immutable_1 = __importDefault(require("immutable"));
|
|
9
10
|
const output_1 = __importDefault(require("../models/output"));
|
|
@@ -151,7 +152,6 @@ function generateBook(generator, book, options = {}) {
|
|
|
151
152
|
return output;
|
|
152
153
|
}));
|
|
153
154
|
}
|
|
154
|
-
exports.generateBook = generateBook;
|
|
155
155
|
/**
|
|
156
156
|
* Incremental build for pages
|
|
157
157
|
* output should be prepared plugins
|
|
@@ -172,4 +172,3 @@ function incrementalBuild(generator, output) {
|
|
|
172
172
|
})
|
|
173
173
|
.tap((output) => generateMultipleLanguages(generator, output));
|
|
174
174
|
}
|
|
175
|
-
exports.incrementalBuild = incrementalBuild;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.onFinish =
|
|
6
|
+
exports.onFinish = onFinish;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const promise_1 = __importDefault(require("../../utils/promise"));
|
|
9
9
|
const fs_1 = __importDefault(require("../../utils/fs"));
|
|
@@ -36,4 +36,3 @@ function onFinish(output) {
|
|
|
36
36
|
})
|
|
37
37
|
.thenResolve(output));
|
|
38
38
|
}
|
|
39
|
-
exports.onFinish = onFinish;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.onPage =
|
|
6
|
+
exports.onPage = onPage;
|
|
7
7
|
const json_1 = __importDefault(require("../../json"));
|
|
8
8
|
const path_1 = __importDefault(require("../../utils/path"));
|
|
9
9
|
const modifiers_1 = __importDefault(require("../modifiers"));
|
|
@@ -34,4 +34,3 @@ function onPage(output, page) {
|
|
|
34
34
|
return (0, writeFile_1.default)(output, filePath, JSON.stringify(json, null, 4));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
exports.onPage = onPage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type cheerio from "cheerio";
|
|
2
2
|
/**
|
|
3
3
|
Fetch all remote images
|
|
4
4
|
*/
|
|
5
|
-
declare function fetchRemoteImages(rootFolder: string, currentFile: string, $: cheerio.
|
|
5
|
+
declare function fetchRemoteImages(rootFolder: string, currentFile: string, $: cheerio.CheerioAPI): Promise<any>;
|
|
6
6
|
export default fetchRemoteImages;
|
|
7
7
|
//# sourceMappingURL=fetchRemoteImages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchRemoteImages.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/fetchRemoteImages.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"fetchRemoteImages.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/fetchRemoteImages.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC;;GAEG;AAEH,iBAAS,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CA2BvG;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inlineSvg.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/inlineSvg.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH,iBAAS,SAAS,CAAC,UAAU,KAAA,EAAE,WAAW,KAAA,EAAE,CAAC,KAAA,
|
|
1
|
+
{"version":3,"file":"inlineSvg.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/inlineSvg.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH,iBAAS,SAAS,CAAC,UAAU,KAAA,EAAE,WAAW,KAAA,EAAE,CAAC,KAAA,OAwB5C;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -49,6 +49,7 @@ function inlineSvg(rootFolder, currentFile, $) {
|
|
|
49
49
|
src = location_1.default.toAbsolute(src, currentDirectory, ".");
|
|
50
50
|
const inputPath = path_1.default.join(rootFolder, src);
|
|
51
51
|
return fs_1.default.readFile(inputPath).then((svgContext) => {
|
|
52
|
+
// @ts-expect-error
|
|
52
53
|
const $ = cheerio.load(svgContext, { _useHtmlParser2: true, xmlMode: true });
|
|
53
54
|
const $svg = $("svg");
|
|
54
55
|
if ($svg.attr("style")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifyHTML.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/modifyHTML.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,iBAAS,UAAU,CAAC,IAAI,KAAA,EAAE,UAAU,KAAA,
|
|
1
|
+
{"version":3,"file":"modifyHTML.d.ts","sourceRoot":"","sources":["../../../src/output/modifiers/modifyHTML.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,iBAAS,UAAU,CAAC,IAAI,KAAA,EAAE,UAAU,KAAA,OAcnC;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -38,6 +38,7 @@ const promise_1 = __importDefault(require("../../utils/promise"));
|
|
|
38
38
|
*/
|
|
39
39
|
function modifyHTML(page, operations) {
|
|
40
40
|
const html = page.getContent();
|
|
41
|
+
// @ts-expect-error
|
|
41
42
|
const $ = cheerio.load(html, { _useHtmlParser2: true });
|
|
42
43
|
return promise_1.default.forEach(operations, (op) => {
|
|
43
44
|
return op($);
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateMockBook =
|
|
6
|
+
exports.generateMockBook = generateMockBook;
|
|
7
7
|
const mock_1 = __importDefault(require("../../fs/mock"));
|
|
8
8
|
const tmp_1 = __importDefault(require("tmp"));
|
|
9
9
|
const book_1 = __importDefault(require("../../models/book"));
|
|
@@ -38,7 +38,6 @@ function generateMockBook(Generator, files) {
|
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
exports.generateMockBook = generateMockBook;
|
|
42
41
|
/**
|
|
43
42
|
* Generate a book using a generator
|
|
44
43
|
* And returns the path to the output dir.
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.onFinish =
|
|
6
|
+
exports.onFinish = onFinish;
|
|
7
7
|
const promise_1 = __importDefault(require("../../utils/promise"));
|
|
8
8
|
const json_1 = __importDefault(require("../../json"));
|
|
9
9
|
const templating_1 = __importDefault(require("../../templating"));
|
|
@@ -32,4 +32,3 @@ function onFinish(output) {
|
|
|
32
32
|
return (0, writeFile_1.default)(output, filePath, tplOut.getContent());
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
|
-
exports.onFinish = onFinish;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.onPage =
|
|
6
|
+
exports.onPage = onPage;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const omit_keys_1 = __importDefault(require("omit-keys"));
|
|
9
9
|
const templating_1 = __importDefault(require("../../templating"));
|
|
@@ -70,4 +70,3 @@ function onPage(output, page) {
|
|
|
70
70
|
}));
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
exports.onPage = onPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginResolver.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginResolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PluginResolver.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginResolver.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AAEH,qBAAa,cAAc;IACvB,aAAa,EAAE,MAAM,CAAC;gBAEV,MAAM,GAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO;IAOnD;;;;OAIG;IACH,wBAAwB,CAAC,WAAW,KAAA;CAyBvC"}
|
|
@@ -32,7 +32,8 @@ const path_1 = __importDefault(require("path"));
|
|
|
32
32
|
const util = __importStar(require("./package-name-util"));
|
|
33
33
|
const try_resolve_1 = __importDefault(require("try-resolve"));
|
|
34
34
|
const SPECIAL_PACKAGE_NAME = [
|
|
35
|
-
"
|
|
35
|
+
"fontsettings", // → @honkit/honkit-plugin-fontsettings
|
|
36
|
+
"highlight", // → @honkit/honkit-plugin-highlight
|
|
36
37
|
"theme-default" // → @honkit/honkit-plugin-theme-default
|
|
37
38
|
];
|
|
38
39
|
/**
|
|
@@ -49,6 +50,7 @@ const SPECIAL_PACKAGE_NAME = [
|
|
|
49
50
|
* - gitbook-plugin-*
|
|
50
51
|
*/
|
|
51
52
|
class PluginResolver {
|
|
53
|
+
baseDirectory;
|
|
52
54
|
constructor(config = {}) {
|
|
53
55
|
/**
|
|
54
56
|
* @type {string} baseDirectory for resolving
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.loadPlugin =
|
|
6
|
+
exports.loadPlugin = loadPlugin;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const resolve_1 = __importDefault(require("resolve"));
|
|
9
9
|
const immutable_1 = __importDefault(require("immutable"));
|
|
@@ -86,4 +86,3 @@ function loadPlugin(book, plugin) {
|
|
|
86
86
|
p = timing_1.default.measure("plugin.load", p);
|
|
87
87
|
return p;
|
|
88
88
|
}
|
|
89
|
-
exports.loadPlugin = loadPlugin;
|
package/lib/utils/command.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/utils/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/utils/command.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,eAAe,CAAC;AAGzC;;;;;;GAMG;AACH,iBAAS,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,GAAG,YAAY,CAAC,WAAW,OAqBzF;AAmBD;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,OAAO,KAAA,UAkBlC;;;;;AAED,wBAGE"}
|
package/lib/utils/fs.d.ts
CHANGED
package/lib/utils/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAYpB,iBAAS,WAAW,CAAC,QAAQ,KAAA,EAAE,EAAE,KAAA,OA0BhC;AAGD,iBAAS,UAAU,CAAC,QAAQ,KAAA,OAY3B;AAGD,iBAAS,UAAU,CAAC,IAAI,KAAA,OAEvB;AAED;;;;GAIG;AACH,iBAAS,SAAS,CAAC,IAAI,KAAA,OAEtB;AA0BD,iBAAe,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,gBAaxD;AAGD,iBAAS,cAAc,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA,OAcrC;AAGD,iBAAS,UAAU,CAAC,QAAQ,KAAA,OAI3B;AAGD,iBAAS,KAAK,CAAC,IAAI,KAAA,OAIlB;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,QAAQ,KAAA,EAAE,SAAS,KAAA,OAMtC;AAED;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAC,UAAU,KAAA,EAAE,QAAQ,KAAA,UAOrC;AAED;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,UAAU,KAAA,OAQ/B;;;;;;;;;;;;;;;;;IAiCG;;OAEG;;;;;;;;AAjCP,wBAwCE"}
|
package/lib/utils/promise.js
CHANGED
|
@@ -3,7 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.forEach = forEach;
|
|
7
|
+
exports.reduce = reduce;
|
|
8
|
+
exports.map = map;
|
|
9
|
+
exports.serie = serie;
|
|
10
|
+
exports.some = some;
|
|
11
|
+
exports.wrap = wrap;
|
|
7
12
|
const q_1 = __importDefault(require("q"));
|
|
8
13
|
const immutable_1 = __importDefault(require("immutable"));
|
|
9
14
|
// Debugging for long stack traces
|
|
@@ -26,7 +31,6 @@ function reduce(arr, iter, base) {
|
|
|
26
31
|
});
|
|
27
32
|
}, (0, q_1.default)(base));
|
|
28
33
|
}
|
|
29
|
-
exports.reduce = reduce;
|
|
30
34
|
/**
|
|
31
35
|
* Iterate over an array using an async iter
|
|
32
36
|
*
|
|
@@ -40,7 +44,6 @@ function forEach(arr, iter) {
|
|
|
40
44
|
return iter(el, key);
|
|
41
45
|
});
|
|
42
46
|
}
|
|
43
|
-
exports.forEach = forEach;
|
|
44
47
|
/**
|
|
45
48
|
* Transform an array
|
|
46
49
|
*
|
|
@@ -56,7 +59,6 @@ function serie(arr, iter, base) {
|
|
|
56
59
|
});
|
|
57
60
|
}, []);
|
|
58
61
|
}
|
|
59
|
-
exports.serie = serie;
|
|
60
62
|
/**
|
|
61
63
|
* Iter over an array and return first result (not null)
|
|
62
64
|
*
|
|
@@ -74,7 +76,6 @@ function some(arr, iter) {
|
|
|
74
76
|
});
|
|
75
77
|
}, (0, q_1.default)());
|
|
76
78
|
}
|
|
77
|
-
exports.some = some;
|
|
78
79
|
/**
|
|
79
80
|
* Map an array using an async (promised) iterator
|
|
80
81
|
*
|
|
@@ -117,7 +118,6 @@ function map(arr, iter) {
|
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
|
-
exports.map = map;
|
|
121
121
|
/**
|
|
122
122
|
* Wrap a function in a promise
|
|
123
123
|
*
|
|
@@ -132,7 +132,6 @@ function wrap(func) {
|
|
|
132
132
|
});
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
exports.wrap = wrap;
|
|
136
135
|
q_1.default.forEach = forEach;
|
|
137
136
|
q_1.default.reduce = reduce;
|
|
138
137
|
q_1.default.map = map;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "honkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "HonKit is building beautiful books using Markdown.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|
|
@@ -37,67 +37,69 @@
|
|
|
37
37
|
"updateSnapshot": "jest src -u"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@honkit/asciidoc": "
|
|
41
|
-
"@honkit/honkit-plugin-
|
|
42
|
-
"@honkit/honkit-plugin-
|
|
43
|
-
"@honkit/
|
|
40
|
+
"@honkit/asciidoc": "6.0.1",
|
|
41
|
+
"@honkit/honkit-plugin-fontsettings": "6.0.1",
|
|
42
|
+
"@honkit/honkit-plugin-highlight": "6.0.1",
|
|
43
|
+
"@honkit/honkit-plugin-theme-default": "6.0.1",
|
|
44
|
+
"@honkit/html": "6.0.1",
|
|
45
|
+
"@honkit/markdown-legacy": "6.0.1",
|
|
44
46
|
"bash-color": "^0.0.4",
|
|
45
|
-
"cheerio": "^1.0.0
|
|
46
|
-
"chokidar": "^3.
|
|
47
|
+
"cheerio": "^1.0.0",
|
|
48
|
+
"chokidar": "^3.6.0",
|
|
47
49
|
"commander": "^5.1.0",
|
|
48
50
|
"cp": "^0.2.0",
|
|
49
51
|
"cpr": "^3.0.1",
|
|
50
52
|
"crc": "^3.8.0",
|
|
51
|
-
"destroy": "^1.0
|
|
53
|
+
"destroy": "^1.2.0",
|
|
52
54
|
"direction": "^0.1.5",
|
|
53
|
-
"dom-serializer": "^0.1.
|
|
55
|
+
"dom-serializer": "^0.1.1",
|
|
54
56
|
"error": "7.0.2",
|
|
55
57
|
"escape-html": "^1.0.3",
|
|
56
58
|
"escape-string-regexp": "^4.0.0",
|
|
57
|
-
"extend": "^3.0.
|
|
59
|
+
"extend": "^3.0.2",
|
|
58
60
|
"flat-cache": "^2.0.1",
|
|
59
|
-
"front-matter": "^2.
|
|
60
|
-
"gitbook-plugin-fontsettings": "^2.0.0",
|
|
61
|
+
"front-matter": "^2.3.0",
|
|
61
62
|
"gitbook-plugin-livereload": "^0.0.1",
|
|
62
63
|
"gitbook-plugin-lunr": "^1.2.0",
|
|
63
64
|
"gitbook-plugin-search": "^2.2.1",
|
|
64
65
|
"github-slugid": "^1.0.1",
|
|
65
66
|
"i18n-t": "^1.0.1",
|
|
66
|
-
"ignore": "^5.
|
|
67
|
-
"immutable": "^3.8.
|
|
68
|
-
"is": "^3.
|
|
69
|
-
"js-yaml": "^3.
|
|
67
|
+
"ignore": "^5.3.2",
|
|
68
|
+
"immutable": "^3.8.2",
|
|
69
|
+
"is": "^3.3.0",
|
|
70
|
+
"js-yaml": "^3.14.1",
|
|
70
71
|
"json-schema-defaults": "^0.1.1",
|
|
71
72
|
"jsonschema": "1.1.0",
|
|
72
|
-
"juice": "^8.
|
|
73
|
+
"juice": "^8.1.0",
|
|
73
74
|
"lru_map": "^0.4.1",
|
|
74
|
-
"memoize-one": "^5.
|
|
75
|
+
"memoize-one": "^5.2.1",
|
|
75
76
|
"mkdirp": "^1.0.4",
|
|
76
|
-
"moment": "^2.
|
|
77
|
-
"nunjucks": "^3.2.
|
|
77
|
+
"moment": "^2.30.1",
|
|
78
|
+
"nunjucks": "^3.2.4",
|
|
78
79
|
"nunjucks-do": "^1.0.0",
|
|
79
|
-
"object-path": "^0.11.
|
|
80
|
+
"object-path": "^0.11.8",
|
|
80
81
|
"omit-keys": "^0.1.0",
|
|
81
|
-
"open": "^7.
|
|
82
|
+
"open": "^7.4.2",
|
|
82
83
|
"q": "^1.5.1",
|
|
83
|
-
"resolve": "^1.
|
|
84
|
-
"semver": "^7.
|
|
85
|
-
"send": "^0.17.
|
|
84
|
+
"resolve": "^1.22.8",
|
|
85
|
+
"semver": "^7.6.3",
|
|
86
|
+
"send": "^0.17.2",
|
|
86
87
|
"tiny-lr": "^1.1.1",
|
|
87
88
|
"tmp": "0.0.28",
|
|
88
89
|
"try-resolve": "^1.0.1",
|
|
89
|
-
"urijs": "^1.19.
|
|
90
|
+
"urijs": "^1.19.11"
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|
|
92
|
-
"@honkit/internal-test-utils": "
|
|
93
|
+
"@honkit/internal-test-utils": "6.0.1",
|
|
93
94
|
"@relmify/jest-serializer-strip-ansi": "^1.0.2",
|
|
94
|
-
"@types/
|
|
95
|
-
"@types/
|
|
95
|
+
"@types/jest": "^29.5.13",
|
|
96
|
+
"@types/node": "^22.7.4",
|
|
97
|
+
"@types/nunjucks": "^3.2.6",
|
|
96
98
|
"cross-env": "^7.0.3",
|
|
97
|
-
"jest": "^29.0
|
|
99
|
+
"jest": "^29.7.0",
|
|
98
100
|
"jest-mock-process": "^2.0.0",
|
|
99
101
|
"rimraf": "^3.0.2",
|
|
100
|
-
"typescript": "^
|
|
102
|
+
"typescript": "^5.6.2"
|
|
101
103
|
},
|
|
102
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "8a67601b23ce480bce2bd1a8fb787f1f6f56656f"
|
|
103
105
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"book.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/__fixtures__/honkit/book.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"e2e.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/e2e.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const bin_1 = require("../bin");
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const jest_mock_process_1 = require("jest-mock-process");
|
|
9
|
-
const jest_serializer_strip_ansi_1 = require("@relmify/jest-serializer-strip-ansi");
|
|
10
|
-
const CWD = process.cwd();
|
|
11
|
-
const cwdPlugin = {
|
|
12
|
-
test: (value) => typeof value === "string" && value.includes(CWD),
|
|
13
|
-
print: (value, serialize) => {
|
|
14
|
-
if (typeof value === "string") {
|
|
15
|
-
return serialize(value.split(CWD).join("<CWD>").replace(/\\/g, "/"));
|
|
16
|
-
}
|
|
17
|
-
return value;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
expect.addSnapshotSerializer(jest_serializer_strip_ansi_1.stripAnsi);
|
|
21
|
-
expect.addSnapshotSerializer(cwdPlugin);
|
|
22
|
-
describe("e2e", function () {
|
|
23
|
-
let stdoutMock;
|
|
24
|
-
beforeEach(() => {
|
|
25
|
-
stdoutMock = (0, jest_mock_process_1.mockProcessStdout)();
|
|
26
|
-
});
|
|
27
|
-
afterEach(() => {
|
|
28
|
-
stdoutMock.mockRestore();
|
|
29
|
-
});
|
|
30
|
-
it("`honkit parse` for multilang", async () => {
|
|
31
|
-
await (0, bin_1.run)([process.argv[0], "honkit", "parse", path_1.default.join(__dirname, "__fixtures__/multilang")]);
|
|
32
|
-
expect(stdoutMock.mock.calls).toMatchInlineSnapshot(`
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
"info: parsing multilingual book, with 2 languages
|
|
36
|
-
",
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
"warn: no summary file in this book
|
|
40
|
-
",
|
|
41
|
-
],
|
|
42
|
-
[
|
|
43
|
-
"warn: no summary file in this book
|
|
44
|
-
",
|
|
45
|
-
],
|
|
46
|
-
[
|
|
47
|
-
"info: Book located in: <CWD>/src/__tests__/__fixtures__/multilang
|
|
48
|
-
",
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
"info: 2 languages
|
|
52
|
-
",
|
|
53
|
-
],
|
|
54
|
-
[
|
|
55
|
-
"info: Language: English
|
|
56
|
-
",
|
|
57
|
-
],
|
|
58
|
-
[
|
|
59
|
-
"info: Introduction file is README.md
|
|
60
|
-
",
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"info:
|
|
64
|
-
",
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
"info: Language: Japanese
|
|
68
|
-
",
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
"info: Introduction file is README.md
|
|
72
|
-
",
|
|
73
|
-
],
|
|
74
|
-
[
|
|
75
|
-
"info:
|
|
76
|
-
",
|
|
77
|
-
],
|
|
78
|
-
]
|
|
79
|
-
`);
|
|
80
|
-
});
|
|
81
|
-
});
|
package/lib/__tests__/init.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/__tests__/init.ts"],"names":[],"mappings":""}
|