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
|
@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const summaryArticle_1 = __importDefault(require("../summaryArticle"));
|
|
7
7
|
const file_1 = __importDefault(require("../file"));
|
|
8
|
+
const encodeSummaryArticleWithCache_1 = __importDefault(require("../../json/encodeSummaryArticleWithCache"));
|
|
9
|
+
const encodeSummaryArticle_1 = __importDefault(require("../../json/encodeSummaryArticle"));
|
|
8
10
|
describe("SummaryArticle", () => {
|
|
9
11
|
describe("createChildLevel", () => {
|
|
10
12
|
test("must create the right level", () => {
|
|
@@ -59,4 +61,57 @@ describe("SummaryArticle", () => {
|
|
|
59
61
|
expect(article.hasAnchor()).toBe(true);
|
|
60
62
|
});
|
|
61
63
|
});
|
|
64
|
+
describe("withCache", function () {
|
|
65
|
+
it("encodeSummaryArticle (non cached) should return an object", function () {
|
|
66
|
+
var article = summaryArticle_1.default.create({
|
|
67
|
+
ref: "1-1.md",
|
|
68
|
+
}, "1.1");
|
|
69
|
+
expect((0, encodeSummaryArticle_1.default)(article)).toBeInstanceOf(Object);
|
|
70
|
+
});
|
|
71
|
+
it("encodeSummaryArticleWithCache (cached) should return an object", function () {
|
|
72
|
+
var article = summaryArticle_1.default.create({
|
|
73
|
+
ref: "1-1.md",
|
|
74
|
+
}, "1.1");
|
|
75
|
+
expect((0, encodeSummaryArticleWithCache_1.default)(article)).toBeInstanceOf(Object);
|
|
76
|
+
});
|
|
77
|
+
it("encodeSummaryArticle (non cached) should return different object when pass difference SummaryArticle", function () {
|
|
78
|
+
var article_1 = summaryArticle_1.default.create({
|
|
79
|
+
ref: "1-1.md"
|
|
80
|
+
}, "1.1");
|
|
81
|
+
var article_2 = summaryArticle_1.default.create({
|
|
82
|
+
ref: "1-2.md"
|
|
83
|
+
}, "1.2");
|
|
84
|
+
expect((0, encodeSummaryArticle_1.default)(article_1)).not.toStrictEqual((0, encodeSummaryArticle_1.default)(article_2));
|
|
85
|
+
});
|
|
86
|
+
it("encodeSummaryArticle (non cached) should return same object when pass same SummaryArticle", function () {
|
|
87
|
+
var article = summaryArticle_1.default.create({
|
|
88
|
+
ref: "1-1.md"
|
|
89
|
+
}, "1.1");
|
|
90
|
+
expect((0, encodeSummaryArticle_1.default)(article)).toStrictEqual((0, encodeSummaryArticle_1.default)(article));
|
|
91
|
+
});
|
|
92
|
+
it("encodeSummaryArticleWithCache (cached) should return different object when pass difference SummaryArticle", function () {
|
|
93
|
+
var article_1 = summaryArticle_1.default.create({
|
|
94
|
+
ref: "1-1.md"
|
|
95
|
+
}, "1.1");
|
|
96
|
+
var article_2 = summaryArticle_1.default.create({
|
|
97
|
+
ref: "1-2.md"
|
|
98
|
+
}, "1.2");
|
|
99
|
+
expect((0, encodeSummaryArticle_1.default)(article_1)).not.toStrictEqual((0, encodeSummaryArticleWithCache_1.default)(article_2));
|
|
100
|
+
});
|
|
101
|
+
it("encodeSummaryArticleWithCache (cached) should return same object when pass same SummaryArticle", function () {
|
|
102
|
+
var article = summaryArticle_1.default.create({
|
|
103
|
+
ref: "1-1.md"
|
|
104
|
+
}, "1.1");
|
|
105
|
+
expect((0, encodeSummaryArticle_1.default)(article)).toStrictEqual((0, encodeSummaryArticle_1.default)(article));
|
|
106
|
+
});
|
|
107
|
+
it("encodeSummaryArticle (non cached) and encodeSummaryArticleWithCache (cached) should return same object when pass same SummaryArticle", function () {
|
|
108
|
+
var article = summaryArticle_1.default.create({
|
|
109
|
+
ref: "1-1.md",
|
|
110
|
+
articles: [summaryArticle_1.default.create({
|
|
111
|
+
ref: "2-1.md",
|
|
112
|
+
}, "2.1")]
|
|
113
|
+
}, "1.1");
|
|
114
|
+
expect((0, encodeSummaryArticle_1.default)(article)).toStrictEqual((0, encodeSummaryArticleWithCache_1.default)(article));
|
|
115
|
+
});
|
|
116
|
+
});
|
|
62
117
|
});
|
|
@@ -22,7 +22,7 @@ describe("TemplateBlock", () => {
|
|
|
22
22
|
expect(templateBlock.getBlocks().size).toBe(0);
|
|
23
23
|
expect(templateBlock.getExtensionName()).toBe("BlocksayhelloExtension");
|
|
24
24
|
// Check result of applying block
|
|
25
|
-
return promise_1.default()
|
|
25
|
+
return (0, promise_1.default)()
|
|
26
26
|
.then(() => {
|
|
27
27
|
return templateBlock.applyBlock();
|
|
28
28
|
})
|
|
@@ -122,7 +122,7 @@ describe("TemplateBlock", () => {
|
|
|
122
122
|
});
|
|
123
123
|
test("must accept an async function", () => {
|
|
124
124
|
const templateBlock = templateBlock_1.default.create("sayhello", (block) => {
|
|
125
|
-
return promise_1.default().then(() => {
|
|
125
|
+
return (0, promise_1.default)().then(() => {
|
|
126
126
|
return {
|
|
127
127
|
body: `Hello ${block.body}`,
|
|
128
128
|
parse: true,
|
package/lib/models/book.js
CHANGED
|
@@ -16,7 +16,7 @@ const ignore_1 = __importDefault(require("./ignore"));
|
|
|
16
16
|
class Book extends immutable_1.default.Record({
|
|
17
17
|
// Logger for outptu message
|
|
18
18
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 0.
|
|
19
|
-
logger: logger_1.default(),
|
|
19
|
+
logger: (0, logger_1.default)(),
|
|
20
20
|
// Filesystem binded to the book scope to read files/directories
|
|
21
21
|
fs: new fs_1.default(),
|
|
22
22
|
// Ignore files parser
|
package/lib/models/config.js
CHANGED
|
@@ -24,7 +24,7 @@ class Config extends immutable_1.default.Record({
|
|
|
24
24
|
* @return {Map}
|
|
25
25
|
*/
|
|
26
26
|
toReducedVersion() {
|
|
27
|
-
return reducedObject_1.default(configDefault_1.default, this.getValues());
|
|
27
|
+
return (0, reducedObject_1.default)(configDefault_1.default, this.getValues());
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Render config as text
|
package/lib/models/fs.js
CHANGED
|
@@ -62,7 +62,7 @@ class FS extends immutable_1.default.Record({
|
|
|
62
62
|
*/
|
|
63
63
|
exists(filename) {
|
|
64
64
|
const that = this;
|
|
65
|
-
return promise_1.default().then(() => {
|
|
65
|
+
return (0, promise_1.default)().then(() => {
|
|
66
66
|
filename = that.resolve(filename);
|
|
67
67
|
const exists = that.get("fsExists");
|
|
68
68
|
return exists(filename);
|
|
@@ -76,7 +76,7 @@ class FS extends immutable_1.default.Record({
|
|
|
76
76
|
*/
|
|
77
77
|
read(filename) {
|
|
78
78
|
const that = this;
|
|
79
|
-
return promise_1.default().then(() => {
|
|
79
|
+
return (0, promise_1.default)().then(() => {
|
|
80
80
|
filename = that.resolve(filename);
|
|
81
81
|
const read = that.get("fsReadFile");
|
|
82
82
|
return read(filename);
|
|
@@ -102,7 +102,7 @@ class FS extends immutable_1.default.Record({
|
|
|
102
102
|
const filepath = that.resolve(filename);
|
|
103
103
|
const fsReadAsStream = this.get("fsReadAsStream");
|
|
104
104
|
if (fsReadAsStream) {
|
|
105
|
-
return promise_1.default(fsReadAsStream(filepath));
|
|
105
|
+
return (0, promise_1.default)(fsReadAsStream(filepath));
|
|
106
106
|
}
|
|
107
107
|
return this.read(filename).then((buf) => {
|
|
108
108
|
const bufferStream = new stream_1.default.PassThrough();
|
|
@@ -118,7 +118,7 @@ class FS extends immutable_1.default.Record({
|
|
|
118
118
|
*/
|
|
119
119
|
statFile(filename) {
|
|
120
120
|
const that = this;
|
|
121
|
-
return promise_1.default()
|
|
121
|
+
return (0, promise_1.default)()
|
|
122
122
|
.then(() => {
|
|
123
123
|
const filepath = that.resolve(filename);
|
|
124
124
|
const stat = that.get("fsStatFile");
|
|
@@ -137,7 +137,7 @@ class FS extends immutable_1.default.Record({
|
|
|
137
137
|
*/
|
|
138
138
|
readDir(dirname) {
|
|
139
139
|
const that = this;
|
|
140
|
-
return promise_1.default()
|
|
140
|
+
return (0, promise_1.default)()
|
|
141
141
|
.then(() => {
|
|
142
142
|
const dirpath = that.resolve(dirname);
|
|
143
143
|
const readDir = that.get("fsReadDir");
|
|
@@ -28,7 +28,7 @@ class GlossaryEntry extends immutable_1.default.Record({
|
|
|
28
28
|
Normalize a glossary entry name into a unique id
|
|
29
29
|
*/
|
|
30
30
|
static nameToID(name) {
|
|
31
|
-
return github_slugid_1.default(name);
|
|
31
|
+
return (0, github_slugid_1.default)(name);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
exports.default = GlossaryEntry;
|
package/lib/models/ignore.js
CHANGED
|
@@ -9,7 +9,7 @@ const ignore_1 = __importDefault(require("ignore"));
|
|
|
9
9
|
Immutable version of node-ignore
|
|
10
10
|
*/
|
|
11
11
|
class Ignore extends immutable_1.default.Record({
|
|
12
|
-
ignore: ignore_1.default(),
|
|
12
|
+
ignore: (0, ignore_1.default)(),
|
|
13
13
|
}, "Ignore") {
|
|
14
14
|
getIgnore() {
|
|
15
15
|
return this.get("ignore");
|
|
@@ -31,7 +31,7 @@ class Ignore extends immutable_1.default.Record({
|
|
|
31
31
|
*/
|
|
32
32
|
add(rule) {
|
|
33
33
|
const ignore = this.getIgnore();
|
|
34
|
-
const newIgnore = ignore_1.default();
|
|
34
|
+
const newIgnore = (0, ignore_1.default)();
|
|
35
35
|
newIgnore.add(ignore);
|
|
36
36
|
newIgnore.add(rule);
|
|
37
37
|
return this.set("ignore", newIgnore);
|
package/lib/models/output.js
CHANGED
|
@@ -66,7 +66,7 @@ class Output extends immutable_1.default.Record({
|
|
|
66
66
|
if (!page) {
|
|
67
67
|
return this;
|
|
68
68
|
}
|
|
69
|
-
const newPage = parsePageFromString_1.default(page, fs_1.default.readFileSync(filePath, "utf-8"));
|
|
69
|
+
const newPage = (0, parsePageFromString_1.default)(page, fs_1.default.readFileSync(filePath, "utf-8"));
|
|
70
70
|
return this.merge({
|
|
71
71
|
pages: pages.set(relativePath, newPage),
|
|
72
72
|
});
|
package/lib/models/page.js
CHANGED
package/lib/models/parser.js
CHANGED
|
@@ -26,47 +26,47 @@ class Parser extends immutable_1.default.Record({
|
|
|
26
26
|
// PARSE
|
|
27
27
|
parseReadme(content) {
|
|
28
28
|
const readme = this.get("readme");
|
|
29
|
-
return promise_1.default(readme(content));
|
|
29
|
+
return (0, promise_1.default)(readme(content));
|
|
30
30
|
}
|
|
31
31
|
parseSummary(content) {
|
|
32
32
|
const summary = this.get("summary");
|
|
33
|
-
return promise_1.default(summary(content));
|
|
33
|
+
return (0, promise_1.default)(summary(content));
|
|
34
34
|
}
|
|
35
35
|
parseGlossary(content) {
|
|
36
36
|
const glossary = this.get("glossary");
|
|
37
|
-
return promise_1.default(glossary(content));
|
|
37
|
+
return (0, promise_1.default)(glossary(content));
|
|
38
38
|
}
|
|
39
39
|
preparePage(content) {
|
|
40
40
|
const page = this.get("page");
|
|
41
41
|
if (!page.prepare) {
|
|
42
|
-
return promise_1.default(content);
|
|
42
|
+
return (0, promise_1.default)(content);
|
|
43
43
|
}
|
|
44
|
-
return promise_1.default(page.prepare(content));
|
|
44
|
+
return (0, promise_1.default)(page.prepare(content));
|
|
45
45
|
}
|
|
46
46
|
parsePage(content) {
|
|
47
47
|
const page = this.get("page");
|
|
48
|
-
return promise_1.default(page(content));
|
|
48
|
+
return (0, promise_1.default)(page(content));
|
|
49
49
|
}
|
|
50
50
|
parseInline(content) {
|
|
51
51
|
const inline = this.get("inline");
|
|
52
|
-
return promise_1.default(inline(content));
|
|
52
|
+
return (0, promise_1.default)(inline(content));
|
|
53
53
|
}
|
|
54
54
|
parseLanguages(content) {
|
|
55
55
|
const langs = this.get("langs");
|
|
56
|
-
return promise_1.default(langs(content));
|
|
56
|
+
return (0, promise_1.default)(langs(content));
|
|
57
57
|
}
|
|
58
58
|
// TO TEXT
|
|
59
59
|
renderLanguages(content) {
|
|
60
60
|
const langs = this.get("langs");
|
|
61
|
-
return promise_1.default(langs.toText(content));
|
|
61
|
+
return (0, promise_1.default)(langs.toText(content));
|
|
62
62
|
}
|
|
63
63
|
renderSummary(content) {
|
|
64
64
|
const summary = this.get("summary");
|
|
65
|
-
return promise_1.default(summary.toText(content));
|
|
65
|
+
return (0, promise_1.default)(summary.toText(content));
|
|
66
66
|
}
|
|
67
67
|
renderGlossary(content) {
|
|
68
68
|
const glossary = this.get("glossary");
|
|
69
|
-
return promise_1.default(glossary.toText(content));
|
|
69
|
+
return (0, promise_1.default)(glossary.toText(content));
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
Test if this parser matches an extension
|
|
@@ -132,9 +132,9 @@ class TemplateBlock extends immutable_1.default.Record({
|
|
|
132
132
|
});
|
|
133
133
|
const mainBlock = blocks.shift();
|
|
134
134
|
mainBlock.blocks = blocks;
|
|
135
|
-
promise_1.default()
|
|
135
|
+
(0, promise_1.default)()
|
|
136
136
|
.then(() => {
|
|
137
|
-
const ctx = extend_1.default({
|
|
137
|
+
const ctx = (0, extend_1.default)({
|
|
138
138
|
ctx: context,
|
|
139
139
|
}, mainContext || {});
|
|
140
140
|
return that.applyBlock(mainBlock, ctx);
|
|
@@ -190,7 +190,7 @@ class TemplateBlock extends immutable_1.default.Record({
|
|
|
190
190
|
let indexedKey;
|
|
191
191
|
const toIndex = !result.parse || result.post !== undefined;
|
|
192
192
|
if (toIndex) {
|
|
193
|
-
indexedKey = genKey_1.default();
|
|
193
|
+
indexedKey = (0, genKey_1.default)();
|
|
194
194
|
blocksOutput[indexedKey] = result;
|
|
195
195
|
}
|
|
196
196
|
// Parsable block, just return it
|
|
@@ -17,7 +17,7 @@ describe("addPlugin", () => {
|
|
|
17
17
|
});
|
|
18
18
|
test("should add the plugin to the list", () => {
|
|
19
19
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2.
|
|
20
|
-
const newConfig = addPlugin_1.default(config, "test");
|
|
20
|
+
const newConfig = (0, addPlugin_1.default)(config, "test");
|
|
21
21
|
const testDep = newConfig.getPluginDependency("test");
|
|
22
22
|
expect(testDep).toBeDefined();
|
|
23
23
|
expect(testDep.getVersion()).toEqual("*");
|
|
@@ -10,17 +10,17 @@ describe("removePlugin", () => {
|
|
|
10
10
|
plugins: ["hello", "world", "-disabled"],
|
|
11
11
|
});
|
|
12
12
|
test("should remove the plugin from the list", () => {
|
|
13
|
-
const newConfig = removePlugin_1.default(config, "hello");
|
|
13
|
+
const newConfig = (0, removePlugin_1.default)(config, "hello");
|
|
14
14
|
const testDep = newConfig.getPluginDependency("hello");
|
|
15
15
|
expect(testDep).toBeUndefined();
|
|
16
16
|
});
|
|
17
17
|
test("should remove the disabled plugin from the list", () => {
|
|
18
|
-
const newConfig = removePlugin_1.default(config, "disabled");
|
|
18
|
+
const newConfig = (0, removePlugin_1.default)(config, "disabled");
|
|
19
19
|
const testDep = newConfig.getPluginDependency("disabled");
|
|
20
20
|
expect(testDep).toBeUndefined();
|
|
21
21
|
});
|
|
22
22
|
test("should disable default plugin", () => {
|
|
23
|
-
const newConfig = removePlugin_1.default(config, "search");
|
|
23
|
+
const newConfig = (0, removePlugin_1.default)(config, "search");
|
|
24
24
|
const disabledDep = newConfig.getPluginDependency("search");
|
|
25
25
|
expect(disabledDep).toBeDefined();
|
|
26
26
|
expect(disabledDep.getVersion()).toEqual("*");
|
|
@@ -11,7 +11,7 @@ describe("togglePlugin", () => {
|
|
|
11
11
|
});
|
|
12
12
|
test("should enable plugin", () => {
|
|
13
13
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2.
|
|
14
|
-
const newConfig = togglePlugin_1.default(config, "disabled");
|
|
14
|
+
const newConfig = (0, togglePlugin_1.default)(config, "disabled");
|
|
15
15
|
const testDep = newConfig.getPluginDependency("disabled");
|
|
16
16
|
expect(testDep).toBeDefined();
|
|
17
17
|
expect(testDep.getVersion()).toEqual("*");
|
|
@@ -19,7 +19,7 @@ describe("togglePlugin", () => {
|
|
|
19
19
|
});
|
|
20
20
|
test("should disable plugin", () => {
|
|
21
21
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2.
|
|
22
|
-
const newConfig = togglePlugin_1.default(config, "world");
|
|
22
|
+
const newConfig = (0, togglePlugin_1.default)(config, "world");
|
|
23
23
|
const testDep = newConfig.getPluginDependency("world");
|
|
24
24
|
expect(testDep).toBeDefined();
|
|
25
25
|
expect(testDep.getVersion()).toEqual("*");
|
|
@@ -15,8 +15,8 @@ const isDefaultPlugin_1 = __importDefault(require("./isDefaultPlugin"));
|
|
|
15
15
|
*/
|
|
16
16
|
function addPlugin(config, pluginName, version) {
|
|
17
17
|
// For default plugin, we only ensure it is enabled
|
|
18
|
-
if (isDefaultPlugin_1.default(pluginName, version)) {
|
|
19
|
-
return togglePlugin_1.default(config, pluginName, true);
|
|
18
|
+
if ((0, isDefaultPlugin_1.default)(pluginName, version)) {
|
|
19
|
+
return (0, togglePlugin_1.default)(config, pluginName, true);
|
|
20
20
|
}
|
|
21
21
|
let deps = config.getPluginDependencies();
|
|
22
22
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'create' does not exist on type 'Class'.
|
|
@@ -12,6 +12,6 @@ const hasPlugin_1 = __importDefault(require("./hasPlugin"));
|
|
|
12
12
|
* @return {boolean}
|
|
13
13
|
*/
|
|
14
14
|
function isDefaultPlugin(pluginName, version) {
|
|
15
|
-
return hasPlugin_1.default(defaultPlugins_1.default, pluginName, version);
|
|
15
|
+
return (0, hasPlugin_1.default)(defaultPlugins_1.default, pluginName, version);
|
|
16
16
|
}
|
|
17
17
|
exports.default = isDefaultPlugin;
|
|
@@ -15,8 +15,8 @@ function removePlugin(config, pluginName) {
|
|
|
15
15
|
let deps = config.getPluginDependencies();
|
|
16
16
|
// For default plugin, we have to disable it instead of removing from the list
|
|
17
17
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
|
|
18
|
-
if (isDefaultPlugin_1.default(pluginName)) {
|
|
19
|
-
return togglePlugin_1.default(config, pluginName, false);
|
|
18
|
+
if ((0, isDefaultPlugin_1.default)(pluginName)) {
|
|
19
|
+
return (0, togglePlugin_1.default)(config, pluginName, false);
|
|
20
20
|
}
|
|
21
21
|
// Remove the dependency from the list
|
|
22
22
|
deps = deps.filterNot((dep) => {
|
|
@@ -17,7 +17,7 @@ function togglePlugin(config, pluginName, state) {
|
|
|
17
17
|
let deps = config.getPluginDependencies();
|
|
18
18
|
// For default plugin, we should ensure it's listed first
|
|
19
19
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
|
|
20
|
-
if (isDefaultPlugin_1.default(pluginName) && !hasPlugin_1.default(deps, pluginName)) {
|
|
20
|
+
if ((0, isDefaultPlugin_1.default)(pluginName) && !(0, hasPlugin_1.default)(deps, pluginName)) {
|
|
21
21
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'create' does not exist on type 'Class'.
|
|
22
22
|
deps = deps.push(pluginDependency_1.default.create(pluginName));
|
|
23
23
|
}
|
|
@@ -25,17 +25,17 @@ describe("editPartTitle", () => {
|
|
|
25
25
|
},
|
|
26
26
|
]);
|
|
27
27
|
test("should correctly set title of first part", () => {
|
|
28
|
-
const newSummary = editPartTitle_1.default(summary, 0, "Hello World");
|
|
28
|
+
const newSummary = (0, editPartTitle_1.default)(summary, 0, "Hello World");
|
|
29
29
|
const part = newSummary.getPart(0);
|
|
30
30
|
expect(part.getTitle()).toBe("Hello World");
|
|
31
31
|
});
|
|
32
32
|
test("should correctly set title of second part", () => {
|
|
33
|
-
const newSummary = editPartTitle_1.default(summary, 1, "Hello");
|
|
33
|
+
const newSummary = (0, editPartTitle_1.default)(summary, 1, "Hello");
|
|
34
34
|
const part = newSummary.getPart(1);
|
|
35
35
|
expect(part.getTitle()).toBe("Hello");
|
|
36
36
|
});
|
|
37
37
|
test("should not fail if part doesn't exist", () => {
|
|
38
|
-
const newSummary = editPartTitle_1.default(summary, 3, "Hello");
|
|
38
|
+
const newSummary = (0, editPartTitle_1.default)(summary, 3, "Hello");
|
|
39
39
|
expect(newSummary.getParts().size).toBe(2);
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -49,7 +49,7 @@ describe("insertArticle", () => {
|
|
|
49
49
|
const article = summaryArticle_1.default.create({
|
|
50
50
|
title: "Inserted",
|
|
51
51
|
}, "fake.level");
|
|
52
|
-
const newSummary = insertArticle_1.default(summary, article, "2.1.1");
|
|
52
|
+
const newSummary = (0, insertArticle_1.default)(summary, article, "2.1.1");
|
|
53
53
|
const inserted = newSummary.getByLevel("2.1.1");
|
|
54
54
|
const nextOne = newSummary.getByLevel("2.1.2");
|
|
55
55
|
expect(inserted.getTitle()).toBe("Inserted");
|
|
@@ -61,7 +61,7 @@ describe("insertArticle", () => {
|
|
|
61
61
|
const article = summaryArticle_1.default.create({
|
|
62
62
|
title: "Inserted",
|
|
63
63
|
}, "fake.level");
|
|
64
|
-
const newSummary = insertArticle_1.default(summary, article, "2.2");
|
|
64
|
+
const newSummary = (0, insertArticle_1.default)(summary, article, "2.2");
|
|
65
65
|
const inserted = newSummary.getByLevel("2.2");
|
|
66
66
|
const previousOne = newSummary.getByLevel("2.1");
|
|
67
67
|
expect(inserted.getTitle()).toBe("Inserted");
|
|
@@ -36,7 +36,7 @@ describe("insertPart", () => {
|
|
|
36
36
|
const part = summaryPart_1.default.create({
|
|
37
37
|
title: "Inserted",
|
|
38
38
|
}, "meaningless.level");
|
|
39
|
-
const newSummary = insertPart_1.default(summary, part, 1);
|
|
39
|
+
const newSummary = (0, insertPart_1.default)(summary, part, 1);
|
|
40
40
|
const inserted = newSummary.getPart(1);
|
|
41
41
|
expect(inserted.getTitle()).toBe("Inserted");
|
|
42
42
|
expect(newSummary.getParts().count()).toBe(3);
|
|
@@ -48,7 +48,7 @@ describe("insertPart", () => {
|
|
|
48
48
|
const part = summaryPart_1.default.create({
|
|
49
49
|
title: "Inserted",
|
|
50
50
|
}, "meaningless.level");
|
|
51
|
-
const newSummary = insertPart_1.default(summary, part, 2);
|
|
51
|
+
const newSummary = (0, insertPart_1.default)(summary, part, 2);
|
|
52
52
|
const inserted = newSummary.getPart(2);
|
|
53
53
|
expect(inserted.getTitle()).toBe("Inserted");
|
|
54
54
|
expect(newSummary.getParts().count()).toBe(3);
|
|
@@ -28,7 +28,7 @@ describe("mergeAtLevel", () => {
|
|
|
28
28
|
]);
|
|
29
29
|
test("should edit a part", () => {
|
|
30
30
|
const beforeChildren = summary.getByLevel("1").getArticles();
|
|
31
|
-
const newSummary = mergeAtLevel_1.default(summary, "1", { title: "Part O" });
|
|
31
|
+
const newSummary = (0, mergeAtLevel_1.default)(summary, "1", { title: "Part O" });
|
|
32
32
|
const edited = newSummary.getByLevel("1");
|
|
33
33
|
expect(edited.getTitle()).toBe("Part O");
|
|
34
34
|
// Same children
|
|
@@ -36,7 +36,7 @@ describe("mergeAtLevel", () => {
|
|
|
36
36
|
});
|
|
37
37
|
test("should edit a part", () => {
|
|
38
38
|
const beforePath = summary.getByLevel("1.2").getPath();
|
|
39
|
-
const newSummary = mergeAtLevel_1.default(summary, "1.2", { title: "Renamed article" });
|
|
39
|
+
const newSummary = (0, mergeAtLevel_1.default)(summary, "1.2", { title: "Renamed article" });
|
|
40
40
|
const edited = newSummary.getByLevel("1.2");
|
|
41
41
|
expect(edited.getTitle()).toBe("Renamed article");
|
|
42
42
|
// Same children
|
|
@@ -46,18 +46,18 @@ describe("moveArticle", () => {
|
|
|
46
46
|
},
|
|
47
47
|
]);
|
|
48
48
|
test("should move an article to the same place", () => {
|
|
49
|
-
const newSummary = moveArticle_1.default(summary, "2.1", "2.1");
|
|
49
|
+
const newSummary = (0, moveArticle_1.default)(summary, "2.1", "2.1");
|
|
50
50
|
expect(immutable_1.default.is(summary, newSummary)).toBe(true);
|
|
51
51
|
});
|
|
52
52
|
test("should move an article to an previous level", () => {
|
|
53
|
-
const newSummary = moveArticle_1.default(summary, "2.2", "2.1");
|
|
53
|
+
const newSummary = (0, moveArticle_1.default)(summary, "2.2", "2.1");
|
|
54
54
|
const moved = newSummary.getByLevel("2.1");
|
|
55
55
|
const other = newSummary.getByLevel("2.2");
|
|
56
56
|
expect(moved.getTitle()).toBe("2.2");
|
|
57
57
|
expect(other.getTitle()).toBe("2.1");
|
|
58
58
|
});
|
|
59
59
|
test("should move an article to a next level", () => {
|
|
60
|
-
const newSummary = moveArticle_1.default(summary, "2.1", "2.2");
|
|
60
|
+
const newSummary = (0, moveArticle_1.default)(summary, "2.1", "2.2");
|
|
61
61
|
const moved = newSummary.getByLevel("2.1");
|
|
62
62
|
const other = newSummary.getByLevel("2.2");
|
|
63
63
|
expect(moved.getTitle()).toBe("2.2");
|
|
@@ -46,28 +46,28 @@ describe("moveArticleAfter", () => {
|
|
|
46
46
|
},
|
|
47
47
|
]);
|
|
48
48
|
test("moving right after itself should be invariant", () => {
|
|
49
|
-
const newSummary = moveArticleAfter_1.default(summary, "2.1", "2.1");
|
|
49
|
+
const newSummary = (0, moveArticleAfter_1.default)(summary, "2.1", "2.1");
|
|
50
50
|
expect(immutable_1.default.is(summary, newSummary)).toBe(true);
|
|
51
51
|
});
|
|
52
52
|
test("moving after previous one should be invariant too", () => {
|
|
53
|
-
const newSummary = moveArticleAfter_1.default(summary, "2.1", "2.0");
|
|
53
|
+
const newSummary = (0, moveArticleAfter_1.default)(summary, "2.1", "2.0");
|
|
54
54
|
expect(immutable_1.default.is(summary, newSummary)).toBe(true);
|
|
55
55
|
});
|
|
56
56
|
test("should move an article after a previous level", () => {
|
|
57
|
-
const newSummary = moveArticleAfter_1.default(summary, "2.2", "2.0");
|
|
57
|
+
const newSummary = (0, moveArticleAfter_1.default)(summary, "2.2", "2.0");
|
|
58
58
|
const moved = newSummary.getByLevel("2.1");
|
|
59
59
|
expect(moved.getTitle()).toBe("2.2");
|
|
60
60
|
expect(newSummary.getByLevel("2.2").getTitle()).toBe("2.1");
|
|
61
61
|
});
|
|
62
62
|
test("should move an article after a previous and less deep level", () => {
|
|
63
|
-
const newSummary = moveArticleAfter_1.default(summary, "2.1.1", "2.0");
|
|
63
|
+
const newSummary = (0, moveArticleAfter_1.default)(summary, "2.1.1", "2.0");
|
|
64
64
|
const moved = newSummary.getByLevel("2.1");
|
|
65
65
|
expect(moved.getTitle()).toBe("2.1.1");
|
|
66
66
|
expect(newSummary.getByLevel("2.2.1").getTitle()).toBe("2.1.2");
|
|
67
67
|
expect(newSummary.getByLevel("2.2").getTitle()).toBe("2.1");
|
|
68
68
|
});
|
|
69
69
|
test("should move an article after a next level", () => {
|
|
70
|
-
const newSummary = moveArticleAfter_1.default(summary, "2.1", "2.2");
|
|
70
|
+
const newSummary = (0, moveArticleAfter_1.default)(summary, "2.1", "2.2");
|
|
71
71
|
const moved = newSummary.getByLevel("2.2");
|
|
72
72
|
expect(moved.getTitle()).toBe("2.1");
|
|
73
73
|
expect(newSummary.getByLevel("2.1").getTitle()).toBe("2.2");
|
|
@@ -45,7 +45,7 @@ describe("removeArticle", () => {
|
|
|
45
45
|
},
|
|
46
46
|
]);
|
|
47
47
|
test("should remove an article at a given level", () => {
|
|
48
|
-
const newSummary = removeArticle_1.default(summary, "2.1.1");
|
|
48
|
+
const newSummary = (0, removeArticle_1.default)(summary, "2.1.1");
|
|
49
49
|
const removed = newSummary.getByLevel("2.1.1");
|
|
50
50
|
const nextOne = newSummary.getByLevel("2.1.2");
|
|
51
51
|
expect(removed.getTitle()).toBe("2.1.2");
|
|
@@ -13,7 +13,7 @@ const mergeAtLevel_1 = __importDefault(require("./mergeAtLevel"));
|
|
|
13
13
|
@return {Summary}
|
|
14
14
|
*/
|
|
15
15
|
function editArticleRef(summary, level, newRef) {
|
|
16
|
-
return mergeAtLevel_1.default(summary, level, {
|
|
16
|
+
return (0, mergeAtLevel_1.default)(summary, level, {
|
|
17
17
|
ref: newRef,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -13,7 +13,7 @@ const mergeAtLevel_1 = __importDefault(require("./mergeAtLevel"));
|
|
|
13
13
|
@return {Summary}
|
|
14
14
|
*/
|
|
15
15
|
function editArticleTitle(summary, level, newTitle) {
|
|
16
|
-
return mergeAtLevel_1.default(summary, level, {
|
|
16
|
+
return (0, mergeAtLevel_1.default)(summary, level, {
|
|
17
17
|
title: newTitle,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -15,7 +15,7 @@ function indexPartLevels(part, index) {
|
|
|
15
15
|
const baseLevel = String(index + 1);
|
|
16
16
|
let articles = part.getArticles();
|
|
17
17
|
articles = articles.map((inner, i) => {
|
|
18
|
-
return indexArticleLevels_1.default(inner, `${baseLevel}.${i + 1}`);
|
|
18
|
+
return (0, indexArticleLevels_1.default)(inner, `${baseLevel}.${i + 1}`);
|
|
19
19
|
});
|
|
20
20
|
return part.merge({
|
|
21
21
|
level: baseLevel,
|
|
@@ -31,8 +31,8 @@ function insertArticle(summary, article, level) {
|
|
|
31
31
|
// Reindex the level from here
|
|
32
32
|
parent = parent.set("articles", articles);
|
|
33
33
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
|
|
34
|
-
parent = indexArticleLevels_1.default(parent);
|
|
35
|
-
return mergeAtLevel_1.default(summary, parent.getLevel(), parent);
|
|
34
|
+
parent = (0, indexArticleLevels_1.default)(parent);
|
|
35
|
+
return (0, mergeAtLevel_1.default)(summary, parent.getLevel(), parent);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
@param {string}
|
|
@@ -16,6 +16,6 @@ const indexLevels_1 = __importDefault(require("./indexLevels"));
|
|
|
16
16
|
function insertPart(summary, part, index) {
|
|
17
17
|
part = new summaryPart_1.default(part);
|
|
18
18
|
const parts = summary.getParts().insert(index, part);
|
|
19
|
-
return indexLevels_1.default(summary.set("parts", parts));
|
|
19
|
+
return (0, indexLevels_1.default)(summary.set("parts", parts));
|
|
20
20
|
}
|
|
21
21
|
exports.default = insertPart;
|
|
@@ -21,7 +21,7 @@ function moveArticle(summary, origin, target) {
|
|
|
21
21
|
const targetLevel = is_1.default.string(target) ? target : target.getLevel();
|
|
22
22
|
const article = summary.getByLevel(originLevel);
|
|
23
23
|
// Remove first
|
|
24
|
-
const removed = removeArticle_1.default(summary, originLevel);
|
|
25
|
-
return insertArticle_1.default(removed, article, targetLevel);
|
|
24
|
+
const removed = (0, removeArticle_1.default)(summary, originLevel);
|
|
25
|
+
return (0, insertArticle_1.default)(removed, article, targetLevel);
|
|
26
26
|
}
|
|
27
27
|
exports.default = moveArticle;
|
|
@@ -24,15 +24,15 @@ function moveArticleAfter(summary, origin, afterTarget) {
|
|
|
24
24
|
const targetLevel = increment(afterTargetLevel);
|
|
25
25
|
if (targetLevel < origin) {
|
|
26
26
|
// Remove first
|
|
27
|
-
const removed = removeArticle_1.default(summary, originLevel);
|
|
27
|
+
const removed = (0, removeArticle_1.default)(summary, originLevel);
|
|
28
28
|
// Insert then
|
|
29
|
-
return insertArticle_1.default(removed, article, targetLevel);
|
|
29
|
+
return (0, insertArticle_1.default)(removed, article, targetLevel);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
// Insert right after first
|
|
33
|
-
const inserted = insertArticle_1.default(summary, article, targetLevel);
|
|
33
|
+
const inserted = (0, insertArticle_1.default)(summary, article, targetLevel);
|
|
34
34
|
// Remove old one
|
|
35
|
-
return removeArticle_1.default(inserted, originLevel);
|
|
35
|
+
return (0, removeArticle_1.default)(inserted, originLevel);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -30,7 +30,7 @@ function removeArticle(summary, level) {
|
|
|
30
30
|
parent = parent.set("articles", articles);
|
|
31
31
|
// Reindex the level from here
|
|
32
32
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
|
|
33
|
-
parent = indexArticleLevels_1.default(parent);
|
|
34
|
-
return mergeAtLevel_1.default(summary, parent.getLevel(), parent);
|
|
33
|
+
parent = (0, indexArticleLevels_1.default)(parent);
|
|
34
|
+
return (0, mergeAtLevel_1.default)(summary, parent.getLevel(), parent);
|
|
35
35
|
}
|
|
36
36
|
exports.default = removeArticle;
|
|
@@ -13,6 +13,6 @@ const indexLevels_1 = __importDefault(require("./indexLevels"));
|
|
|
13
13
|
*/
|
|
14
14
|
function removePart(summary, index) {
|
|
15
15
|
const parts = summary.getParts().remove(index);
|
|
16
|
-
return indexLevels_1.default(summary.set("parts", parts));
|
|
16
|
+
return (0, indexLevels_1.default)(summary.set("parts", parts));
|
|
17
17
|
}
|
|
18
18
|
exports.default = removePart;
|