fix
This commit is contained in:
51
book/node_modules/honkit/lib/json/encodeBook.d.ts
generated
vendored
Normal file
51
book/node_modules/honkit/lib/json/encodeBook.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
Encode a book to JSON
|
||||
|
||||
@param {Book}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeBookToJson(book: any): {
|
||||
summary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
parts: any;
|
||||
};
|
||||
glossary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
entries: any;
|
||||
};
|
||||
readme: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
};
|
||||
config: any;
|
||||
languages: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
list: any;
|
||||
};
|
||||
gitbook: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
honkit: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
book: any;
|
||||
};
|
||||
export default encodeBookToJson;
|
||||
//# sourceMappingURL=encodeBook.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeBook.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeBook.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeBook.d.ts","sourceRoot":"","sources":["../../src/json/encodeBook.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B7B;AAED,eAAe,gBAAgB,CAAC"}
|
41
book/node_modules/honkit/lib/json/encodeBook.js
generated
vendored
Normal file
41
book/node_modules/honkit/lib/json/encodeBook.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const extend_1 = __importDefault(require("extend"));
|
||||
const honkit_1 = __importDefault(require("../honkit"));
|
||||
const encodeSummary_1 = __importDefault(require("./encodeSummary"));
|
||||
const encodeGlossary_1 = __importDefault(require("./encodeGlossary"));
|
||||
const encodeReadme_1 = __importDefault(require("./encodeReadme"));
|
||||
const encodeLanguages_1 = __importDefault(require("./encodeLanguages"));
|
||||
/**
|
||||
Encode a book to JSON
|
||||
|
||||
@param {Book}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeBookToJson(book) {
|
||||
const config = book.getConfig();
|
||||
const language = book.getLanguage();
|
||||
const variables = config.getValue("variables", {});
|
||||
return {
|
||||
summary: (0, encodeSummary_1.default)(book.getSummary()),
|
||||
glossary: (0, encodeGlossary_1.default)(book.getGlossary()),
|
||||
readme: (0, encodeReadme_1.default)(book.getReadme()),
|
||||
config: book.getConfig().getValues().toJS(),
|
||||
languages: book.isMultilingual() ? (0, encodeLanguages_1.default)(book.getLanguages()) : undefined,
|
||||
gitbook: {
|
||||
version: honkit_1.default.version,
|
||||
time: honkit_1.default.START_TIME
|
||||
},
|
||||
honkit: {
|
||||
version: honkit_1.default.version,
|
||||
time: honkit_1.default.START_TIME
|
||||
},
|
||||
book: (0, extend_1.default)({
|
||||
language: language ? language : undefined
|
||||
}, variables.toJS())
|
||||
};
|
||||
}
|
||||
exports.default = encodeBookToJson;
|
52
book/node_modules/honkit/lib/json/encodeBookWithPage.d.ts
generated
vendored
Normal file
52
book/node_modules/honkit/lib/json/encodeBookWithPage.d.ts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Return a JSON representation of a book with a specific file
|
||||
*
|
||||
* @param {Book} output
|
||||
* @param {Page} page
|
||||
* @return {Object}
|
||||
*/
|
||||
declare function encodeBookWithPage(book: any, page: any): {
|
||||
summary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
parts: any;
|
||||
};
|
||||
glossary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
entries: any;
|
||||
};
|
||||
readme: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
};
|
||||
config: any;
|
||||
languages: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
list: any;
|
||||
};
|
||||
gitbook: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
honkit: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
book: any;
|
||||
};
|
||||
export default encodeBookWithPage;
|
||||
//# sourceMappingURL=encodeBookWithPage.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeBookWithPage.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeBookWithPage.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeBookWithPage.d.ts","sourceRoot":"","sources":["../../src/json/encodeBookWithPage.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,iBAAS,kBAAkB,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrC;AAED,eAAe,kBAAkB,CAAC"}
|
25
book/node_modules/honkit/lib/json/encodeBookWithPage.js
generated
vendored
Normal file
25
book/node_modules/honkit/lib/json/encodeBookWithPage.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeBook_1 = __importDefault(require("./encodeBook"));
|
||||
const encodePage_1 = __importDefault(require("./encodePage"));
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
/**
|
||||
* Return a JSON representation of a book with a specific file
|
||||
*
|
||||
* @param {Book} output
|
||||
* @param {Page} page
|
||||
* @return {Object}
|
||||
*/
|
||||
function encodeBookWithPage(book, page) {
|
||||
const file = page.getFile();
|
||||
const result = (0, encodeBook_1.default)(book);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type '{ summary:... Remove this comment to see the full error message
|
||||
result.page = (0, encodePage_1.default)(page, book.getSummary());
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'file' does not exist on type '{ summary:... Remove this comment to see the full error message
|
||||
result.file = (0, encodeFile_1.default)(file);
|
||||
return result;
|
||||
}
|
||||
exports.default = encodeBookWithPage;
|
13
book/node_modules/honkit/lib/json/encodeFile.d.ts
generated
vendored
Normal file
13
book/node_modules/honkit/lib/json/encodeFile.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
Return a JSON representation of a file
|
||||
|
||||
@param {File} file
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeFileToJson(file: any): {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
export default encodeFileToJson;
|
||||
//# sourceMappingURL=encodeFile.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeFile.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeFile.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeFile.d.ts","sourceRoot":"","sources":["../../src/json/encodeFile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,IAAI,KAAA;;;;EAW7B;AAED,eAAe,gBAAgB,CAAC"}
|
20
book/node_modules/honkit/lib/json/encodeFile.js
generated
vendored
Normal file
20
book/node_modules/honkit/lib/json/encodeFile.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
Return a JSON representation of a file
|
||||
|
||||
@param {File} file
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeFileToJson(file) {
|
||||
const filePath = file.getPath();
|
||||
if (!filePath) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
path: filePath,
|
||||
mtime: file.getMTime(),
|
||||
type: file.getType()
|
||||
};
|
||||
}
|
||||
exports.default = encodeFileToJson;
|
16
book/node_modules/honkit/lib/json/encodeGlossary.d.ts
generated
vendored
Normal file
16
book/node_modules/honkit/lib/json/encodeGlossary.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
Encode a glossary to JSON
|
||||
|
||||
@param {Glossary}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeGlossary(glossary: any): {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
entries: any;
|
||||
};
|
||||
export default encodeGlossary;
|
||||
//# sourceMappingURL=encodeGlossary.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeGlossary.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeGlossary.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeGlossary.d.ts","sourceRoot":"","sources":["../../src/json/encodeGlossary.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,iBAAS,cAAc,CAAC,QAAQ,KAAA;;;;;;;EAQ/B;AAED,eAAe,cAAc,CAAC"}
|
22
book/node_modules/honkit/lib/json/encodeGlossary.js
generated
vendored
Normal file
22
book/node_modules/honkit/lib/json/encodeGlossary.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
const encodeGlossaryEntry_1 = __importDefault(require("./encodeGlossaryEntry"));
|
||||
/**
|
||||
Encode a glossary to JSON
|
||||
|
||||
@param {Glossary}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeGlossary(glossary) {
|
||||
const file = glossary.getFile();
|
||||
const entries = glossary.getEntries();
|
||||
return {
|
||||
file: (0, encodeFile_1.default)(file),
|
||||
entries: entries.map(encodeGlossaryEntry_1.default).toJS()
|
||||
};
|
||||
}
|
||||
exports.default = encodeGlossary;
|
13
book/node_modules/honkit/lib/json/encodeGlossaryEntry.d.ts
generated
vendored
Normal file
13
book/node_modules/honkit/lib/json/encodeGlossaryEntry.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {GlossaryEntry}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeGlossaryEntry(entry: any): {
|
||||
id: any;
|
||||
name: any;
|
||||
description: any;
|
||||
};
|
||||
export default encodeGlossaryEntry;
|
||||
//# sourceMappingURL=encodeGlossaryEntry.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeGlossaryEntry.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeGlossaryEntry.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeGlossaryEntry.d.ts","sourceRoot":"","sources":["../../src/json/encodeGlossaryEntry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,iBAAS,mBAAmB,CAAC,KAAK,KAAA;;;;EAMjC;AAED,eAAe,mBAAmB,CAAC"}
|
16
book/node_modules/honkit/lib/json/encodeGlossaryEntry.js
generated
vendored
Normal file
16
book/node_modules/honkit/lib/json/encodeGlossaryEntry.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {GlossaryEntry}
|
||||
@return {Object}
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function encodeGlossaryEntry(entry) {
|
||||
return {
|
||||
id: entry.getID(),
|
||||
name: entry.getName(),
|
||||
description: entry.getDescription()
|
||||
};
|
||||
}
|
||||
exports.default = encodeGlossaryEntry;
|
16
book/node_modules/honkit/lib/json/encodeLanguages.d.ts
generated
vendored
Normal file
16
book/node_modules/honkit/lib/json/encodeLanguages.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
Encode a languages listing to JSON
|
||||
|
||||
@param {Languages}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeLanguages(languages: any): {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
list: any;
|
||||
};
|
||||
export default encodeLanguages;
|
||||
//# sourceMappingURL=encodeLanguages.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeLanguages.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeLanguages.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeLanguages.d.ts","sourceRoot":"","sources":["../../src/json/encodeLanguages.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,iBAAS,eAAe,CAAC,SAAS,KAAA;;;;;;;EAgBjC;AAED,eAAe,eAAe,CAAC"}
|
29
book/node_modules/honkit/lib/json/encodeLanguages.js
generated
vendored
Normal file
29
book/node_modules/honkit/lib/json/encodeLanguages.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
/**
|
||||
Encode a languages listing to JSON
|
||||
|
||||
@param {Languages}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeLanguages(languages) {
|
||||
const file = languages.getFile();
|
||||
const list = languages.getList();
|
||||
return {
|
||||
file: (0, encodeFile_1.default)(file),
|
||||
list: list
|
||||
.valueSeq()
|
||||
.map((lang) => {
|
||||
return {
|
||||
id: lang.getID(),
|
||||
title: lang.getTitle()
|
||||
};
|
||||
})
|
||||
.toJS()
|
||||
};
|
||||
}
|
||||
exports.default = encodeLanguages;
|
51
book/node_modules/honkit/lib/json/encodeOutput.d.ts
generated
vendored
Normal file
51
book/node_modules/honkit/lib/json/encodeOutput.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Encode an output to JSON
|
||||
*
|
||||
* @param {Output}
|
||||
* @return {Object}
|
||||
*/
|
||||
declare function encodeOutputToJson(output: any): {
|
||||
summary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
parts: any;
|
||||
};
|
||||
glossary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
entries: any;
|
||||
};
|
||||
readme: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
};
|
||||
config: any;
|
||||
languages: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
list: any;
|
||||
};
|
||||
gitbook: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
honkit: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
book: any;
|
||||
};
|
||||
export default encodeOutputToJson;
|
||||
//# sourceMappingURL=encodeOutput.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeOutput.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeOutput.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeOutput.d.ts","sourceRoot":"","sources":["../../src/json/encodeOutput.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,MAAM,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBjC;AAED,eAAe,kBAAkB,CAAC"}
|
26
book/node_modules/honkit/lib/json/encodeOutput.js
generated
vendored
Normal file
26
book/node_modules/honkit/lib/json/encodeOutput.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeBook_1 = __importDefault(require("./encodeBook"));
|
||||
/**
|
||||
* Encode an output to JSON
|
||||
*
|
||||
* @param {Output}
|
||||
* @return {Object}
|
||||
*/
|
||||
function encodeOutputToJson(output) {
|
||||
const book = output.getBook();
|
||||
const generator = output.getGenerator();
|
||||
const options = output.getOptions();
|
||||
const result = (0, encodeBook_1.default)(book);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'output' does not exist on type '{ summar... Remove this comment to see the full error message
|
||||
result.output = {
|
||||
name: generator
|
||||
};
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'options' does not exist on type '{ summa... Remove this comment to see the full error message
|
||||
result.options = options.toJS();
|
||||
return result;
|
||||
}
|
||||
exports.default = encodeOutputToJson;
|
52
book/node_modules/honkit/lib/json/encodeOutputWithPage.d.ts
generated
vendored
Normal file
52
book/node_modules/honkit/lib/json/encodeOutputWithPage.d.ts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Return a JSON representation of a book with a specific file
|
||||
*
|
||||
* @param {Book} output
|
||||
* @param {Page} page
|
||||
* @return {Object}
|
||||
*/
|
||||
declare function encodeOutputWithPage(output: any, page: any): {
|
||||
summary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
parts: any;
|
||||
};
|
||||
glossary: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
entries: any;
|
||||
};
|
||||
readme: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
};
|
||||
config: any;
|
||||
languages: {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
list: any;
|
||||
};
|
||||
gitbook: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
honkit: {
|
||||
version: any;
|
||||
time: Date;
|
||||
};
|
||||
book: any;
|
||||
};
|
||||
export default encodeOutputWithPage;
|
||||
//# sourceMappingURL=encodeOutputWithPage.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeOutputWithPage.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeOutputWithPage.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeOutputWithPage.d.ts","sourceRoot":"","sources":["../../src/json/encodeOutputWithPage.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,MAAM,KAAA,EAAE,IAAI,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAazC;AAED,eAAe,oBAAoB,CAAC"}
|
26
book/node_modules/honkit/lib/json/encodeOutputWithPage.js
generated
vendored
Normal file
26
book/node_modules/honkit/lib/json/encodeOutputWithPage.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeOutput_1 = __importDefault(require("./encodeOutput"));
|
||||
const encodePage_1 = __importDefault(require("./encodePage"));
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
/**
|
||||
* Return a JSON representation of a book with a specific file
|
||||
*
|
||||
* @param {Book} output
|
||||
* @param {Page} page
|
||||
* @return {Object}
|
||||
*/
|
||||
function encodeOutputWithPage(output, page) {
|
||||
const file = page.getFile();
|
||||
const book = output.getBook();
|
||||
const result = (0, encodeOutput_1.default)(output);
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'page' does not exist on type '{ summary:... Remove this comment to see the full error message
|
||||
result.page = (0, encodePage_1.default)(page, book.getSummary());
|
||||
// @ts-expect-error ts-migrate(2339) FIXME: Property 'file' does not exist on type '{ summary:... Remove this comment to see the full error message
|
||||
result.file = (0, encodeFile_1.default)(file);
|
||||
return result;
|
||||
}
|
||||
exports.default = encodeOutputWithPage;
|
19
book/node_modules/honkit/lib/json/encodePage.d.ts
generated
vendored
Normal file
19
book/node_modules/honkit/lib/json/encodePage.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
import Page from "../models/page";
|
||||
import Summary from "../models/summary";
|
||||
import SummaryArticle from "../models/summaryArticle";
|
||||
export type EncodedPage = {
|
||||
content: string;
|
||||
dir: string;
|
||||
} & Partial<{
|
||||
title: string;
|
||||
level: number;
|
||||
depth: number;
|
||||
next: SummaryArticle;
|
||||
previous: SummaryArticle;
|
||||
}>;
|
||||
/**
|
||||
Return a JSON representation of a page
|
||||
*/
|
||||
declare function encodePage(page: Page, summary: Summary): EncodedPage;
|
||||
export default encodePage;
|
||||
//# sourceMappingURL=encodePage.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodePage.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodePage.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodePage.d.ts","sourceRoot":"","sources":["../../src/json/encodePage.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,cAAc,MAAM,0BAA0B,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC;CAC5B,CAAC,CAAC;AAEH;;GAEG;AACH,iBAAS,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,CAmC7D;AAED,eAAe,UAAU,CAAC"}
|
39
book/node_modules/honkit/lib/json/encodePage.js
generated
vendored
Normal file
39
book/node_modules/honkit/lib/json/encodePage.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeSummaryArticle_1 = __importDefault(require("./encodeSummaryArticle"));
|
||||
/**
|
||||
Return a JSON representation of a page
|
||||
*/
|
||||
function encodePage(page, summary) {
|
||||
const file = page.getFile();
|
||||
const attributes = page.getAttributes();
|
||||
const article = summary.getByPath(file.getPath());
|
||||
const result = attributes.toJS();
|
||||
if (article) {
|
||||
result.title = article.getTitle();
|
||||
result.level = article.getLevel();
|
||||
result.depth = article.getDepth();
|
||||
const nextArticle = summary.getNextArticle(article);
|
||||
if (nextArticle) {
|
||||
result.next = (0, encodeSummaryArticle_1.default)(nextArticle);
|
||||
}
|
||||
const prevArticle = summary.getPrevArticle(article);
|
||||
if (prevArticle) {
|
||||
result.previous = (0, encodeSummaryArticle_1.default)(prevArticle);
|
||||
}
|
||||
const articles = article
|
||||
.getArticles()
|
||||
.map((article) => (0, encodeSummaryArticle_1.default)(article))
|
||||
.toJS();
|
||||
if (articles.length > 0) {
|
||||
result.articles = articles;
|
||||
}
|
||||
}
|
||||
result.content = page.getContent();
|
||||
result.dir = page.getDir();
|
||||
return result;
|
||||
}
|
||||
exports.default = encodePage;
|
15
book/node_modules/honkit/lib/json/encodeReadme.d.ts
generated
vendored
Normal file
15
book/node_modules/honkit/lib/json/encodeReadme.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
Encode a readme to JSON
|
||||
|
||||
@param {Readme}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeReadme(readme: any): {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
};
|
||||
export default encodeReadme;
|
||||
//# sourceMappingURL=encodeReadme.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeReadme.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeReadme.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeReadme.d.ts","sourceRoot":"","sources":["../../src/json/encodeReadme.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,iBAAS,YAAY,CAAC,MAAM,KAAA;;;;;;EAM3B;AAED,eAAe,YAAY,CAAC"}
|
19
book/node_modules/honkit/lib/json/encodeReadme.js
generated
vendored
Normal file
19
book/node_modules/honkit/lib/json/encodeReadme.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
/**
|
||||
Encode a readme to JSON
|
||||
|
||||
@param {Readme}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeReadme(readme) {
|
||||
const file = readme.getFile();
|
||||
return {
|
||||
file: (0, encodeFile_1.default)(file)
|
||||
};
|
||||
}
|
||||
exports.default = encodeReadme;
|
16
book/node_modules/honkit/lib/json/encodeSummary.d.ts
generated
vendored
Normal file
16
book/node_modules/honkit/lib/json/encodeSummary.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
Encode a summary to JSON
|
||||
|
||||
@param {Summary}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeSummary(summary: any): {
|
||||
file: {
|
||||
path: any;
|
||||
mtime: any;
|
||||
type: any;
|
||||
};
|
||||
parts: any;
|
||||
};
|
||||
export default encodeSummary;
|
||||
//# sourceMappingURL=encodeSummary.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeSummary.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeSummary.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeSummary.d.ts","sourceRoot":"","sources":["../../src/json/encodeSummary.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,iBAAS,aAAa,CAAC,OAAO,KAAA;;;;;;;EAQ7B;AAED,eAAe,aAAa,CAAC"}
|
22
book/node_modules/honkit/lib/json/encodeSummary.js
generated
vendored
Normal file
22
book/node_modules/honkit/lib/json/encodeSummary.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
const encodeSummaryPart_1 = __importDefault(require("./encodeSummaryPart"));
|
||||
/**
|
||||
Encode a summary to JSON
|
||||
|
||||
@param {Summary}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeSummary(summary) {
|
||||
const file = summary.getFile();
|
||||
const parts = summary.getParts();
|
||||
return {
|
||||
file: (0, encodeFile_1.default)(file),
|
||||
parts: parts.map(encodeSummaryPart_1.default).toJS()
|
||||
};
|
||||
}
|
||||
exports.default = encodeSummary;
|
19
book/node_modules/honkit/lib/json/encodeSummaryArticle.d.ts
generated
vendored
Normal file
19
book/node_modules/honkit/lib/json/encodeSummaryArticle.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {SummaryArticle}
|
||||
@return {Object}
|
||||
*/
|
||||
import SummaryArticle from "../models/summaryArticle";
|
||||
declare function encodeSummaryArticle(article: SummaryArticle, recursive?: boolean): {
|
||||
title: string;
|
||||
level: string;
|
||||
depth: number;
|
||||
anchor: string;
|
||||
url: string;
|
||||
path: string;
|
||||
ref: string;
|
||||
articles: any;
|
||||
};
|
||||
export default encodeSummaryArticle;
|
||||
//# sourceMappingURL=encodeSummaryArticle.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeSummaryArticle.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeSummaryArticle.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeSummaryArticle.d.ts","sourceRoot":"","sources":["../../src/json/encodeSummaryArticle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,cAAc,MAAM,0BAA0B,CAAC;AAGtD,iBAAS,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,OAAO;;;;;;;;;EAmBzE;AAED,eAAe,oBAAoB,CAAC"}
|
32
book/node_modules/honkit/lib/json/encodeSummaryArticle.js
generated
vendored
Normal file
32
book/node_modules/honkit/lib/json/encodeSummaryArticle.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {SummaryArticle}
|
||||
@return {Object}
|
||||
*/
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeSummaryArticleWithCache_1 = __importDefault(require("./encodeSummaryArticleWithCache"));
|
||||
function encodeSummaryArticle(article, recursive) {
|
||||
let articles = undefined;
|
||||
if (recursive !== false) {
|
||||
articles = article
|
||||
.getArticles()
|
||||
.map((article) => (0, encodeSummaryArticleWithCache_1.default)(article))
|
||||
.toJS();
|
||||
}
|
||||
return {
|
||||
title: article.getTitle(),
|
||||
level: article.getLevel(),
|
||||
depth: article.getDepth(),
|
||||
anchor: article.getAnchor(),
|
||||
url: article.getUrl(),
|
||||
path: article.getPath(),
|
||||
ref: article.getRef(),
|
||||
articles: articles
|
||||
};
|
||||
}
|
||||
exports.default = encodeSummaryArticle;
|
20
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.d.ts
generated
vendored
Normal file
20
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {SummaryArticle}
|
||||
@return {Object}
|
||||
*/
|
||||
import SummaryArticle from "../models/summaryArticle";
|
||||
export type EncodedArticle = {
|
||||
title: string;
|
||||
level: string;
|
||||
depth: number;
|
||||
anchor: string;
|
||||
url: string;
|
||||
path: string;
|
||||
ref: string;
|
||||
articles: EncodedArticle[];
|
||||
};
|
||||
declare function encodeSummaryArticleWithCache(article: SummaryArticle, recursive?: boolean): EncodedArticle;
|
||||
export default encodeSummaryArticleWithCache;
|
||||
//# sourceMappingURL=encodeSummaryArticleWithCache.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeSummaryArticleWithCache.d.ts","sourceRoot":"","sources":["../../src/json/encodeSummaryArticleWithCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,cAAc,MAAM,0BAA0B,CAAC;AAMtD,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF,iBAAS,6BAA6B,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,cAAc,CA0BnG;AAED,eAAe,6BAA6B,CAAC"}
|
36
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.js
generated
vendored
Normal file
36
book/node_modules/honkit/lib/json/encodeSummaryArticleWithCache.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
/**
|
||||
Encode a SummaryArticle to JSON
|
||||
|
||||
@param {SummaryArticle}
|
||||
@return {Object}
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const lru_map_1 = require("lru_map");
|
||||
const LRU_MAP_LIMIT = 1000;
|
||||
const articleCacheMap = new lru_map_1.LRUMap(LRU_MAP_LIMIT);
|
||||
function encodeSummaryArticleWithCache(article, recursive) {
|
||||
if (articleCacheMap.has(article)) {
|
||||
return articleCacheMap.get(article);
|
||||
}
|
||||
let articles = undefined;
|
||||
if (recursive !== false) {
|
||||
articles = article
|
||||
.getArticles()
|
||||
.map((article) => encodeSummaryArticleWithCache(article))
|
||||
.toJS();
|
||||
}
|
||||
const encodedArticle = {
|
||||
title: article.getTitle(),
|
||||
level: article.getLevel(),
|
||||
depth: article.getDepth(),
|
||||
anchor: article.getAnchor(),
|
||||
url: article.getUrl(),
|
||||
path: article.getPath(),
|
||||
ref: article.getRef(),
|
||||
articles: articles
|
||||
};
|
||||
articleCacheMap.set(article, encodedArticle);
|
||||
return encodedArticle;
|
||||
}
|
||||
exports.default = encodeSummaryArticleWithCache;
|
12
book/node_modules/honkit/lib/json/encodeSummaryPart.d.ts
generated
vendored
Normal file
12
book/node_modules/honkit/lib/json/encodeSummaryPart.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
Encode a SummaryPart to JSON
|
||||
|
||||
@param {SummaryPart}
|
||||
@return {Object}
|
||||
*/
|
||||
declare function encodeSummaryPart(part: any): {
|
||||
title: any;
|
||||
articles: any;
|
||||
};
|
||||
export default encodeSummaryPart;
|
||||
//# sourceMappingURL=encodeSummaryPart.d.ts.map
|
1
book/node_modules/honkit/lib/json/encodeSummaryPart.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/encodeSummaryPart.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"encodeSummaryPart.d.ts","sourceRoot":"","sources":["../../src/json/encodeSummaryPart.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,iBAAS,iBAAiB,CAAC,IAAI,KAAA;;;EAK9B;AAED,eAAe,iBAAiB,CAAC"}
|
19
book/node_modules/honkit/lib/json/encodeSummaryPart.js
generated
vendored
Normal file
19
book/node_modules/honkit/lib/json/encodeSummaryPart.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeSummaryArticle_1 = __importDefault(require("./encodeSummaryArticle"));
|
||||
/**
|
||||
Encode a SummaryPart to JSON
|
||||
|
||||
@param {SummaryPart}
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeSummaryPart(part) {
|
||||
return {
|
||||
title: part.getTitle(),
|
||||
articles: part.getArticles().map(encodeSummaryArticle_1.default).toJS()
|
||||
};
|
||||
}
|
||||
exports.default = encodeSummaryPart;
|
24
book/node_modules/honkit/lib/json/index.d.ts
generated
vendored
Normal file
24
book/node_modules/honkit/lib/json/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import encodeOutput0 from "./encodeOutput";
|
||||
import encodeBookWithPage0 from "./encodeBookWithPage";
|
||||
import encodeOutputWithPage0 from "./encodeOutputWithPage";
|
||||
import encodeBook0 from "./encodeBook";
|
||||
import encodeFile0 from "./encodeFile";
|
||||
import encodePage0 from "./encodePage";
|
||||
import encodeSummary0 from "./encodeSummary";
|
||||
import encodeSummaryArticle0 from "./encodeSummaryArticle";
|
||||
import encodeReadme0 from "./encodeReadme";
|
||||
import encodeLanguages0 from "./encodeLanguages";
|
||||
declare const _default: {
|
||||
encodeOutput: typeof encodeOutput0;
|
||||
encodeBookWithPage: typeof encodeBookWithPage0;
|
||||
encodeOutputWithPage: typeof encodeOutputWithPage0;
|
||||
encodeBook: typeof encodeBook0;
|
||||
encodeFile: typeof encodeFile0;
|
||||
encodePage: typeof encodePage0;
|
||||
encodeSummary: typeof encodeSummary0;
|
||||
encodeSummaryArticle: typeof encodeSummaryArticle0;
|
||||
encodeReadme: typeof encodeReadme0;
|
||||
encodeLanguages: typeof encodeLanguages0;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
book/node_modules/honkit/lib/json/index.d.ts.map
generated
vendored
Normal file
1
book/node_modules/honkit/lib/json/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,mBAAmB,MAAM,sBAAsB,CAAC;AACvD,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;;;;;;;;;;;;;AAEjD,wBAWE"}
|
27
book/node_modules/honkit/lib/json/index.js
generated
vendored
Normal file
27
book/node_modules/honkit/lib/json/index.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const encodeOutput_1 = __importDefault(require("./encodeOutput"));
|
||||
const encodeBookWithPage_1 = __importDefault(require("./encodeBookWithPage"));
|
||||
const encodeOutputWithPage_1 = __importDefault(require("./encodeOutputWithPage"));
|
||||
const encodeBook_1 = __importDefault(require("./encodeBook"));
|
||||
const encodeFile_1 = __importDefault(require("./encodeFile"));
|
||||
const encodePage_1 = __importDefault(require("./encodePage"));
|
||||
const encodeSummary_1 = __importDefault(require("./encodeSummary"));
|
||||
const encodeSummaryArticle_1 = __importDefault(require("./encodeSummaryArticle"));
|
||||
const encodeReadme_1 = __importDefault(require("./encodeReadme"));
|
||||
const encodeLanguages_1 = __importDefault(require("./encodeLanguages"));
|
||||
exports.default = {
|
||||
encodeOutput: encodeOutput_1.default,
|
||||
encodeBookWithPage: encodeBookWithPage_1.default,
|
||||
encodeOutputWithPage: encodeOutputWithPage_1.default,
|
||||
encodeBook: encodeBook_1.default,
|
||||
encodeFile: encodeFile_1.default,
|
||||
encodePage: encodePage_1.default,
|
||||
encodeSummary: encodeSummary_1.default,
|
||||
encodeSummaryArticle: encodeSummaryArticle_1.default,
|
||||
encodeReadme: encodeReadme_1.default,
|
||||
encodeLanguages: encodeLanguages_1.default
|
||||
};
|
Reference in New Issue
Block a user