honkit 3.6.21 → 3.7.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/__tests__/init.js +1 -1
- package/lib/__tests__/snapshot-honkit.js +1 -1
- package/lib/api/decodeGlobal.js +1 -1
- package/lib/api/encodeConfig.js +0 -4
- package/lib/api/encodeGlobal.js +9 -9
- package/lib/api/encodeNavigation.js +0 -4
- package/lib/api/encodePage.js +1 -5
- package/lib/api/encodeProgress.js +1 -6
- package/lib/api/encodeSummary.js +3 -5
- package/lib/bin.js +1 -1
- package/lib/cli/build.js +3 -3
- package/lib/cli/buildEbook.js +2 -2
- package/lib/cli/getBook.js +1 -1
- package/lib/cli/index.js +1 -1
- package/lib/cli/init.js +1 -1
- package/lib/cli/parse.js +1 -1
- package/lib/cli/serve.js +7 -7
- package/lib/cli/server.js +3 -3
- package/lib/constants/configDefault.js +1 -1
- package/lib/constants/defaultFilters.js +2 -2
- package/lib/fs/__tests__/mock.js +1 -1
- package/lib/index.js +1 -1
- package/lib/init.js +1 -1
- package/lib/json/encodeBook.js +5 -5
- package/lib/json/encodeBookWithPage.js +3 -3
- package/lib/json/encodeGlossary.js +1 -1
- package/lib/json/encodeLanguages.js +1 -1
- package/lib/json/encodeOutput.js +1 -1
- package/lib/json/encodeOutputWithPage.js +3 -3
- package/lib/json/encodePage.js +9 -8
- package/lib/json/encodeReadme.js +1 -1
- package/lib/json/encodeSummary.js +1 -1
- package/lib/json/encodeSummaryArticle.js +8 -1
- package/lib/json/encodeSummaryArticleWithCache.js +36 -0
- package/lib/models/__tests__/summaryArticle.js +55 -0
- package/lib/models/__tests__/templateBlock.js +2 -2
- package/lib/models/book.js +1 -1
- package/lib/models/config.js +1 -1
- package/lib/models/fs.js +5 -5
- package/lib/models/glossaryEntry.js +1 -1
- package/lib/models/ignore.js +2 -2
- package/lib/models/output.js +1 -1
- package/lib/models/page.js +1 -1
- package/lib/models/parser.js +11 -11
- package/lib/models/templateBlock.js +3 -3
- package/lib/modifiers/config/__tests__/addPlugin.js +1 -1
- package/lib/modifiers/config/__tests__/removePlugin.js +3 -3
- package/lib/modifiers/config/__tests__/togglePlugin.js +2 -2
- package/lib/modifiers/config/addPlugin.js +2 -2
- package/lib/modifiers/config/isDefaultPlugin.js +1 -1
- package/lib/modifiers/config/removePlugin.js +2 -2
- package/lib/modifiers/config/togglePlugin.js +1 -1
- package/lib/modifiers/summary/__tests__/editPartTitle.js +3 -3
- package/lib/modifiers/summary/__tests__/insertArticle.js +2 -2
- package/lib/modifiers/summary/__tests__/insertPart.js +2 -2
- package/lib/modifiers/summary/__tests__/mergeAtLevel.js +2 -2
- package/lib/modifiers/summary/__tests__/moveArticle.js +3 -3
- package/lib/modifiers/summary/__tests__/moveArticleAfter.js +5 -5
- package/lib/modifiers/summary/__tests__/removeArticle.js +1 -1
- package/lib/modifiers/summary/editArticleRef.js +1 -1
- package/lib/modifiers/summary/editArticleTitle.js +1 -1
- package/lib/modifiers/summary/indexPartLevels.js +1 -1
- package/lib/modifiers/summary/insertArticle.js +2 -2
- package/lib/modifiers/summary/insertPart.js +1 -1
- package/lib/modifiers/summary/moveArticle.js +2 -2
- package/lib/modifiers/summary/moveArticleAfter.js +4 -4
- package/lib/modifiers/summary/removeArticle.js +2 -2
- package/lib/modifiers/summary/removePart.js +1 -1
- package/lib/modifiers/summary/unshiftArticle.js +1 -1
- package/lib/output/Generator.js +2 -0
- package/lib/output/__tests__/ebook.js +1 -1
- package/lib/output/__tests__/json.js +3 -3
- package/lib/output/__tests__/plugin-hooks.js +3 -3
- package/lib/output/__tests__/website.js +8 -8
- package/lib/output/callHook.js +1 -1
- package/lib/output/callPageHook.js +1 -1
- package/lib/output/ebook/getConvertOptions.js +4 -4
- package/lib/output/ebook/getPDFTemplate.js +3 -1
- package/lib/output/ebook/index.js +1 -1
- package/lib/output/ebook/onFinish.js +3 -3
- package/lib/output/generateAssets.js +1 -1
- package/lib/output/generateBook.js +54 -46
- package/lib/output/generatePage.js +5 -5
- package/lib/output/generatePages.js +3 -3
- package/lib/output/getModifiers.js +2 -2
- package/lib/output/helper/fileToURL.js +1 -1
- package/lib/output/helper/resolveFileToURL.js +1 -1
- package/lib/output/index.js +0 -2
- package/lib/output/json/onFinish.js +1 -1
- package/lib/output/json/onPage.js +2 -2
- package/lib/output/modifiers/__tests__/addHeadingId.js +2 -2
- package/lib/output/modifiers/__tests__/annotateText.js +3 -3
- package/lib/output/modifiers/__tests__/fetchRemoteImages.js +2 -2
- package/lib/output/modifiers/__tests__/highlightCode.js +5 -5
- package/lib/output/modifiers/__tests__/inlinePng.js +1 -1
- package/lib/output/modifiers/__tests__/inlineSvg.js +2 -2
- package/lib/output/modifiers/__tests__/resolveImages.js +3 -3
- package/lib/output/modifiers/__tests__/resolveLinks.js +7 -7
- package/lib/output/modifiers/__tests__/svgToImg.js +2 -2
- package/lib/output/modifiers/addHeadingId.js +2 -2
- package/lib/output/modifiers/annotateText.js +1 -1
- package/lib/output/modifiers/fetchRemoteImages.js +1 -1
- package/lib/output/modifiers/highlightCode.js +2 -2
- package/lib/output/modifiers/inlineAssets.js +1 -1
- package/lib/output/modifiers/inlinePng.js +1 -1
- package/lib/output/modifiers/inlineSvg.js +1 -1
- package/lib/output/modifiers/resolveImages.js +1 -1
- package/lib/output/modifiers/resolveLinks.js +1 -1
- package/lib/output/modifiers/svgToImg.js +2 -2
- package/lib/output/preparePages.js +1 -1
- package/lib/output/preparePlugins.js +1 -1
- package/lib/output/testing/createMock.js +2 -2
- package/lib/output/testing/generateMock.js +3 -3
- package/lib/output/website/__tests__/i18n.js +6 -6
- package/lib/output/website/copyPluginAssets.js +4 -4
- package/lib/output/website/createTemplateEngine.js +6 -7
- package/lib/output/website/onFinish.js +3 -3
- package/lib/output/website/onInit.js +1 -1
- package/lib/output/website/onPage.js +5 -5
- package/lib/output/website/prepareI18n.js +2 -2
- package/lib/output/website/prepareResources.js +2 -2
- package/lib/output/website/state.js +1 -1
- package/lib/parse/__tests__/listAssets.js +6 -6
- package/lib/parse/__tests__/parseBook.js +6 -6
- package/lib/parse/__tests__/parseGlossary.js +4 -4
- package/lib/parse/__tests__/parseIgnore.js +2 -2
- package/lib/parse/__tests__/parsePageFromString.js +3 -3
- package/lib/parse/__tests__/parseReadme.js +5 -5
- package/lib/parse/__tests__/parseSummary.js +4 -4
- package/lib/parse/lookupStructureFile.js +1 -1
- package/lib/parse/parseBook.js +3 -3
- package/lib/parse/parseConfig.js +2 -2
- package/lib/parse/parseGlossary.js +1 -1
- package/lib/parse/parseIgnore.js +1 -1
- package/lib/parse/parseLanguages.js +1 -1
- package/lib/parse/parsePage.js +1 -1
- package/lib/parse/parsePageFromString.js +2 -2
- package/lib/parse/parsePagesList.js +2 -2
- package/lib/parse/parseReadme.js +1 -1
- package/lib/parse/parseStructureFile.js +1 -1
- package/lib/parse/parseSummary.js +1 -1
- package/lib/parse/validateConfig.js +2 -2
- package/lib/parse/walkSummary.js +1 -1
- package/lib/plugins/PluginResolver.js +4 -4
- package/lib/plugins/__tests__/findInstalled.js +1 -1
- package/lib/plugins/__tests__/listDependencies.js +6 -6
- package/lib/plugins/__tests__/sortDependencies.js +4 -4
- package/lib/plugins/__tests__/validatePlugin.js +3 -3
- package/lib/plugins/findInstalled.js +2 -2
- package/lib/plugins/listDependencies.js +1 -1
- package/lib/plugins/listDepsForBook.js +1 -1
- package/lib/plugins/loadForBook.js +2 -2
- package/lib/plugins/loadPlugin.js +2 -2
- package/lib/plugins/validateConfig.js +2 -2
- package/lib/plugins/validatePlugin.js +1 -1
- package/lib/templating/__tests__/conrefsLoader.js +8 -8
- package/lib/templating/__tests__/postRender.js +4 -4
- package/lib/templating/__tests__/replaceShortcuts.js +2 -2
- package/lib/templating/render.js +1 -1
- package/lib/templating/renderFile.js +2 -2
- package/lib/templating/replaceShortcuts.js +2 -2
- package/lib/utils/command.js +1 -33
- package/lib/utils/error.js +10 -10
- package/lib/utils/fs.js +6 -6
- package/lib/utils/git.js +4 -4
- package/lib/utils/promise.js +6 -6
- package/package.json +4 -3
|
@@ -18,7 +18,7 @@ function renderTemplateFile(engine, filePath, context) {
|
|
|
18
18
|
const loader = engine.getLoader();
|
|
19
19
|
// Resolve the filePath
|
|
20
20
|
const resolvedFilePath = loader.resolve(null, filePath);
|
|
21
|
-
return promise_1.default()
|
|
21
|
+
return (0, promise_1.default)()
|
|
22
22
|
.then(() => {
|
|
23
23
|
if (!loader.async) {
|
|
24
24
|
return loader.getSource(resolvedFilePath);
|
|
@@ -33,7 +33,7 @@ function renderTemplateFile(engine, filePath, context) {
|
|
|
33
33
|
filename: filePath,
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
return render_1.default(engine, result.path, result.src, context);
|
|
36
|
+
return (0, render_1.default)(engine, result.path, result.src, context);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
exports.default = renderTemplateFile;
|
|
@@ -16,7 +16,7 @@ function applyShortcut(content, shortcut) {
|
|
|
16
16
|
const end = shortcut.getEnd();
|
|
17
17
|
const tagStart = shortcut.getStartTag();
|
|
18
18
|
const tagEnd = shortcut.getEndTag();
|
|
19
|
-
const regex = new RegExp(`${escape_string_regexp_1.default(start)}([\\s\\S]*?[^\\$])${escape_string_regexp_1.default(end)}`, "g");
|
|
19
|
+
const regex = new RegExp(`${(0, escape_string_regexp_1.default)(start)}([\\s\\S]*?[^\\$])${(0, escape_string_regexp_1.default)(end)}`, "g");
|
|
20
20
|
return content.replace(regex, (all, match) => {
|
|
21
21
|
return `{% ${tagStart} %}${match}{% ${tagEnd} %}`;
|
|
22
22
|
});
|
|
@@ -30,7 +30,7 @@ function applyShortcut(content, shortcut) {
|
|
|
30
30
|
* @return {string}
|
|
31
31
|
*/
|
|
32
32
|
function replaceShortcuts(blocks, filePath, content) {
|
|
33
|
-
const shortcuts = listShortcuts_1.default(blocks, filePath);
|
|
33
|
+
const shortcuts = (0, listShortcuts_1.default)(blocks, filePath);
|
|
34
34
|
return shortcuts.reduce(applyShortcut, content);
|
|
35
35
|
}
|
|
36
36
|
exports.default = replaceShortcuts;
|
package/lib/utils/command.js
CHANGED
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const is_1 = __importDefault(require("is"));
|
|
7
7
|
const child_process_1 = __importDefault(require("child_process"));
|
|
8
|
-
const spawn_cmd_1 = require("spawn-cmd");
|
|
9
8
|
const promise_1 = __importDefault(require("./promise"));
|
|
10
9
|
/**
|
|
11
10
|
Execute a command
|
|
@@ -20,7 +19,7 @@ function exec(command, options) {
|
|
|
20
19
|
if (!err) {
|
|
21
20
|
return d.resolve();
|
|
22
21
|
}
|
|
23
|
-
err.message = stdout.toString(
|
|
22
|
+
err.message = stdout.toString() + stderr.toString();
|
|
24
23
|
d.reject(err);
|
|
25
24
|
});
|
|
26
25
|
child.stdout.on("data", (data) => {
|
|
@@ -31,36 +30,6 @@ function exec(command, options) {
|
|
|
31
30
|
});
|
|
32
31
|
return d.promise;
|
|
33
32
|
}
|
|
34
|
-
/**
|
|
35
|
-
Spawn an executable
|
|
36
|
-
|
|
37
|
-
@param {string} command
|
|
38
|
-
@param {Array} args
|
|
39
|
-
@param {Object} options
|
|
40
|
-
@return {Promise}
|
|
41
|
-
*/
|
|
42
|
-
function spawnCmd(command, args, options) {
|
|
43
|
-
const d = promise_1.default.defer();
|
|
44
|
-
const child = spawn_cmd_1.spawn(command, args, options);
|
|
45
|
-
child.on("error", (error) => {
|
|
46
|
-
return d.reject(error);
|
|
47
|
-
});
|
|
48
|
-
child.stdout.on("data", (data) => {
|
|
49
|
-
d.notify(data);
|
|
50
|
-
});
|
|
51
|
-
child.stderr.on("data", (data) => {
|
|
52
|
-
d.notify(data);
|
|
53
|
-
});
|
|
54
|
-
child.on("close", (code) => {
|
|
55
|
-
if (code === 0) {
|
|
56
|
-
d.resolve();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
d.reject(new Error(`Error with command "${command}"`));
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return d.promise;
|
|
63
|
-
}
|
|
64
33
|
/**
|
|
65
34
|
Transform an option object to a command line string
|
|
66
35
|
|
|
@@ -99,6 +68,5 @@ function optionsToShellArgs(options) {
|
|
|
99
68
|
}
|
|
100
69
|
exports.default = {
|
|
101
70
|
exec: exec,
|
|
102
|
-
spawn: spawnCmd,
|
|
103
71
|
optionsToShellArgs: optionsToShellArgs,
|
|
104
72
|
};
|
package/lib/utils/error.js
CHANGED
|
@@ -14,28 +14,28 @@ function enforce(err) {
|
|
|
14
14
|
return err;
|
|
15
15
|
}
|
|
16
16
|
// Random error wrappers during parsing/generation
|
|
17
|
-
const ParsingError = wrapped_1.default({
|
|
17
|
+
const ParsingError = (0, wrapped_1.default)({
|
|
18
18
|
message: "Parsing Error: {origMessage}",
|
|
19
19
|
type: "parse",
|
|
20
20
|
});
|
|
21
|
-
const OutputError = wrapped_1.default({
|
|
21
|
+
const OutputError = (0, wrapped_1.default)({
|
|
22
22
|
message: "Output Error: {origMessage}",
|
|
23
23
|
type: "generate",
|
|
24
24
|
});
|
|
25
25
|
// A file does not exists
|
|
26
|
-
const FileNotFoundError = typed_1.default({
|
|
26
|
+
const FileNotFoundError = (0, typed_1.default)({
|
|
27
27
|
type: "file.not-found",
|
|
28
28
|
message: 'No "{filename}" file (or is ignored)',
|
|
29
29
|
filename: null,
|
|
30
30
|
});
|
|
31
31
|
// A file cannot be parsed
|
|
32
|
-
const FileNotParsableError = typed_1.default({
|
|
32
|
+
const FileNotParsableError = (0, typed_1.default)({
|
|
33
33
|
type: "file.not-parsable",
|
|
34
34
|
message: '"{filename}" file cannot be parsed',
|
|
35
35
|
filename: null,
|
|
36
36
|
});
|
|
37
37
|
// A file is outside the scope
|
|
38
|
-
const FileOutOfScopeError = typed_1.default({
|
|
38
|
+
const FileOutOfScopeError = (0, typed_1.default)({
|
|
39
39
|
type: "file.out-of-scope",
|
|
40
40
|
message: '"{filename}" not in "{root}"',
|
|
41
41
|
filename: null,
|
|
@@ -43,7 +43,7 @@ const FileOutOfScopeError = typed_1.default({
|
|
|
43
43
|
code: "EACCESS",
|
|
44
44
|
});
|
|
45
45
|
// A file is outside the scope
|
|
46
|
-
const RequireInstallError = typed_1.default({
|
|
46
|
+
const RequireInstallError = (0, typed_1.default)({
|
|
47
47
|
type: "install.required",
|
|
48
48
|
message: '"{cmd}" is not installed.\n{install}',
|
|
49
49
|
cmd: null,
|
|
@@ -51,24 +51,24 @@ const RequireInstallError = typed_1.default({
|
|
|
51
51
|
install: "",
|
|
52
52
|
});
|
|
53
53
|
// Error for nunjucks templates
|
|
54
|
-
const TemplateError = wrapped_1.default({
|
|
54
|
+
const TemplateError = (0, wrapped_1.default)({
|
|
55
55
|
message: 'Error compiling template "{filename}": {origMessage}',
|
|
56
56
|
type: "template",
|
|
57
57
|
filename: null,
|
|
58
58
|
});
|
|
59
59
|
// Error for nunjucks templates
|
|
60
|
-
const PluginError = wrapped_1.default({
|
|
60
|
+
const PluginError = (0, wrapped_1.default)({
|
|
61
61
|
message: 'Error with plugin "{plugin}": {origMessage}',
|
|
62
62
|
type: "plugin",
|
|
63
63
|
plugin: null,
|
|
64
64
|
});
|
|
65
65
|
// Error with the book's configuration
|
|
66
|
-
const ConfigurationError = wrapped_1.default({
|
|
66
|
+
const ConfigurationError = (0, wrapped_1.default)({
|
|
67
67
|
message: "Error with book's configuration: {origMessage}",
|
|
68
68
|
type: "configuration",
|
|
69
69
|
});
|
|
70
70
|
// Error during ebook generation
|
|
71
|
-
const EbookError = wrapped_1.default({
|
|
71
|
+
const EbookError = (0, wrapped_1.default)({
|
|
72
72
|
message: "Error during ebook generation: {origMessage}\n{stdout}",
|
|
73
73
|
type: "ebook",
|
|
74
74
|
stdout: "",
|
package/lib/utils/fs.js
CHANGED
|
@@ -17,7 +17,7 @@ function writeStream(filename, st) {
|
|
|
17
17
|
const d = promise_1.default.defer();
|
|
18
18
|
const wstream = fs_1.default.createWriteStream(filename);
|
|
19
19
|
const cleanup = function () {
|
|
20
|
-
destroy_1.default(wstream);
|
|
20
|
+
(0, destroy_1.default)(wstream);
|
|
21
21
|
wstream.removeAllListeners();
|
|
22
22
|
};
|
|
23
23
|
wstream.on("finish", () => {
|
|
@@ -58,7 +58,7 @@ function genTmpDir(opts) {
|
|
|
58
58
|
}
|
|
59
59
|
// Download an image
|
|
60
60
|
function download(uri, dest) {
|
|
61
|
-
return writeStream(dest, request_1.default(uri));
|
|
61
|
+
return writeStream(dest, (0, request_1.default)(uri));
|
|
62
62
|
}
|
|
63
63
|
// Find a filename available in a folder
|
|
64
64
|
function uniqueFilename(base, filename) {
|
|
@@ -71,12 +71,12 @@ function uniqueFilename(base, filename) {
|
|
|
71
71
|
_filename = `${filename}_${i}${ext}`;
|
|
72
72
|
i = i + 1;
|
|
73
73
|
}
|
|
74
|
-
return promise_1.default(path_1.default.relative(base, _filename));
|
|
74
|
+
return (0, promise_1.default)(path_1.default.relative(base, _filename));
|
|
75
75
|
}
|
|
76
76
|
// Create all required folder to create a file
|
|
77
77
|
function ensureFile(filename) {
|
|
78
78
|
const base = path_1.default.dirname(filename);
|
|
79
|
-
return promise_1.default(mkdirp_1.default(base));
|
|
79
|
+
return (0, promise_1.default)((0, mkdirp_1.default)(base));
|
|
80
80
|
}
|
|
81
81
|
// Remove a folder
|
|
82
82
|
function rmDir(base) {
|
|
@@ -121,10 +121,10 @@ function pickFile(rootFolder, fileName) {
|
|
|
121
121
|
function ensureFolder(rootFolder) {
|
|
122
122
|
return rmDir(rootFolder)
|
|
123
123
|
.fail(() => {
|
|
124
|
-
return promise_1.default();
|
|
124
|
+
return (0, promise_1.default)();
|
|
125
125
|
})
|
|
126
126
|
.then(() => {
|
|
127
|
-
return promise_1.default(mkdirp_1.default(rootFolder));
|
|
127
|
+
return (0, promise_1.default)((0, mkdirp_1.default)(rootFolder));
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
exports.default = {
|
package/lib/utils/git.js
CHANGED
|
@@ -24,7 +24,7 @@ Git.prototype.repoID = function (host, ref) {
|
|
|
24
24
|
Git.prototype.allocateDir = function () {
|
|
25
25
|
const that = this;
|
|
26
26
|
if (this.tmpDir)
|
|
27
|
-
return promise_1.default();
|
|
27
|
+
return (0, promise_1.default)();
|
|
28
28
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 0.
|
|
29
29
|
return fs_1.default.tmpDir().then((dir) => {
|
|
30
30
|
that.tmpDir = dir;
|
|
@@ -61,13 +61,13 @@ Git.prototype.resolve = function (giturl) {
|
|
|
61
61
|
// Path to a file in a git repo?
|
|
62
62
|
if (!Git.isUrl(giturl)) {
|
|
63
63
|
if (this.resolveRoot(giturl))
|
|
64
|
-
return promise_1.default(giturl);
|
|
65
|
-
return promise_1.default(null);
|
|
64
|
+
return (0, promise_1.default)(giturl);
|
|
65
|
+
return (0, promise_1.default)(null);
|
|
66
66
|
}
|
|
67
67
|
if (is_1.default.string(giturl))
|
|
68
68
|
giturl = Git.parseUrl(giturl);
|
|
69
69
|
if (!giturl)
|
|
70
|
-
return promise_1.default(null);
|
|
70
|
+
return (0, promise_1.default)(null);
|
|
71
71
|
// Clone or get from cache
|
|
72
72
|
return this.clone(giturl.host, giturl.ref).then((repo) => {
|
|
73
73
|
return path_1.default.resolve(repo, giturl.filepath);
|
package/lib/utils/promise.js
CHANGED
|
@@ -24,7 +24,7 @@ function reduce(arr, iter, base) {
|
|
|
24
24
|
return prev.then((val) => {
|
|
25
25
|
return iter(val, elem, key);
|
|
26
26
|
});
|
|
27
|
-
}, q_1.default(base));
|
|
27
|
+
}, (0, q_1.default)(base));
|
|
28
28
|
}
|
|
29
29
|
exports.reduce = reduce;
|
|
30
30
|
/**
|
|
@@ -50,7 +50,7 @@ exports.forEach = forEach;
|
|
|
50
50
|
*/
|
|
51
51
|
function serie(arr, iter, base) {
|
|
52
52
|
return reduce(arr, (before, item, key) => {
|
|
53
|
-
return q_1.default(iter(item, key)).then((r) => {
|
|
53
|
+
return (0, q_1.default)(iter(item, key)).then((r) => {
|
|
54
54
|
before.push(r);
|
|
55
55
|
return before;
|
|
56
56
|
});
|
|
@@ -72,7 +72,7 @@ function some(arr, iter) {
|
|
|
72
72
|
return val;
|
|
73
73
|
return iter(elem, i);
|
|
74
74
|
});
|
|
75
|
-
}, q_1.default());
|
|
75
|
+
}, (0, q_1.default)());
|
|
76
76
|
}
|
|
77
77
|
exports.some = some;
|
|
78
78
|
/**
|
|
@@ -84,7 +84,7 @@ exports.some = some;
|
|
|
84
84
|
*/
|
|
85
85
|
function mapAsList(arr, iter) {
|
|
86
86
|
return reduce(arr, (prev, entry, i) => {
|
|
87
|
-
return q_1.default(iter(entry, i)).then((out) => {
|
|
87
|
+
return (0, q_1.default)(iter(entry, i)).then((out) => {
|
|
88
88
|
prev.push(out);
|
|
89
89
|
return prev;
|
|
90
90
|
});
|
|
@@ -104,7 +104,7 @@ function map(arr, iter) {
|
|
|
104
104
|
type = "OrderedMap";
|
|
105
105
|
}
|
|
106
106
|
return mapAsList(arr, (value, key) => {
|
|
107
|
-
return q_1.default(iter(value, key)).then((result) => {
|
|
107
|
+
return (0, q_1.default)(iter(value, key)).then((result) => {
|
|
108
108
|
return [key, result];
|
|
109
109
|
});
|
|
110
110
|
}).then((result) => {
|
|
@@ -127,7 +127,7 @@ exports.map = map;
|
|
|
127
127
|
function wrap(func) {
|
|
128
128
|
return function () {
|
|
129
129
|
const args = Array.prototype.slice.call(arguments, 0);
|
|
130
|
-
return q_1.default().then(() => {
|
|
130
|
+
return (0, q_1.default)().then(() => {
|
|
131
131
|
return func.apply(null, args);
|
|
132
132
|
});
|
|
133
133
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "honkit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"description": "HonKit is building beautiful books using Markdown.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|
|
7
|
+
"markdown",
|
|
7
8
|
"book",
|
|
8
9
|
"honkit",
|
|
9
10
|
"gitbook"
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"json-schema-defaults": "^0.1.1",
|
|
81
82
|
"jsonschema": "1.1.0",
|
|
82
83
|
"juice": "^6.0.0",
|
|
84
|
+
"lru_map": "^0.4.1",
|
|
83
85
|
"memoize-one": "^5.1.1",
|
|
84
86
|
"mkdirp": "^1.0.4",
|
|
85
87
|
"moment": "^2.24.0",
|
|
@@ -94,7 +96,6 @@
|
|
|
94
96
|
"resolve": "^1.17.0",
|
|
95
97
|
"semver": "^5.1.0",
|
|
96
98
|
"send": "^0.17.1",
|
|
97
|
-
"spawn-cmd": "0.0.2",
|
|
98
99
|
"tiny-lr": "^1.1.1",
|
|
99
100
|
"tmp": "0.0.28",
|
|
100
101
|
"try-resolve": "^1.0.1",
|
|
@@ -108,5 +109,5 @@
|
|
|
108
109
|
"rimraf": "^3.0.2",
|
|
109
110
|
"typescript": "^4.1.3"
|
|
110
111
|
},
|
|
111
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "35d95d4d0b9f28dce4a4ac8cd3feb39c12ec1d1b"
|
|
112
113
|
}
|