honkit 4.0.8 → 5.0.0
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/BuildGenerator.d.ts +13 -0
- package/lib/BuildGenerator.d.ts.map +1 -0
- package/lib/__tests__/__fixtures__/honkit/book.d.ts +7 -0
- package/lib/__tests__/__fixtures__/honkit/book.d.ts.map +1 -0
- package/lib/__tests__/e2e.test.d.ts +2 -0
- package/lib/__tests__/e2e.test.d.ts.map +1 -0
- package/lib/__tests__/init.d.ts +2 -0
- package/lib/__tests__/init.d.ts.map +1 -0
- package/lib/__tests__/satisfies.d.ts +2 -0
- package/lib/__tests__/satisfies.d.ts.map +1 -0
- package/lib/__tests__/snapshot-asciidoc.d.ts +2 -0
- package/lib/__tests__/snapshot-asciidoc.d.ts.map +1 -0
- package/lib/__tests__/snapshot-asciidoc.js +48 -0
- package/lib/__tests__/snapshot-honkit.d.ts +2 -0
- package/lib/__tests__/snapshot-honkit.d.ts.map +1 -0
- package/lib/api/decodeConfig.d.ts +10 -0
- package/lib/api/decodeConfig.d.ts.map +1 -0
- package/lib/api/decodeGlobal.d.ts +11 -0
- package/lib/api/decodeGlobal.d.ts.map +1 -0
- package/lib/api/decodePage.d.ts +12 -0
- package/lib/api/decodePage.d.ts.map +1 -0
- package/lib/api/deprecate.d.ts +52 -0
- package/lib/api/deprecate.d.ts.map +1 -0
- package/lib/api/encodeConfig.d.ts +12 -0
- package/lib/api/encodeConfig.d.ts.map +1 -0
- package/lib/api/encodeGlobal.d.ts +165 -0
- package/lib/api/encodeGlobal.d.ts.map +1 -0
- package/lib/api/encodeGlobal.js +11 -9
- package/lib/api/encodeNavigation.d.ts +19 -0
- package/lib/api/encodeNavigation.d.ts.map +1 -0
- package/lib/api/encodePage.d.ts +16 -0
- package/lib/api/encodePage.d.ts.map +1 -0
- package/lib/api/encodeProgress.d.ts +25 -0
- package/lib/api/encodeProgress.d.ts.map +1 -0
- package/lib/api/encodeSummary.d.ts +49 -0
- package/lib/api/encodeSummary.d.ts.map +1 -0
- package/lib/api/index.d.ts +12 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/bin.d.ts +2 -0
- package/lib/bin.d.ts.map +1 -0
- package/lib/browser.d.ts +60 -0
- package/lib/browser.d.ts.map +1 -0
- package/lib/cli/build.d.ts +17 -0
- package/lib/cli/build.d.ts.map +1 -0
- package/lib/cli/buildEbook.d.ts +12 -0
- package/lib/cli/buildEbook.d.ts.map +1 -0
- package/lib/cli/getBook.d.ts +12 -0
- package/lib/cli/getBook.d.ts.map +1 -0
- package/lib/cli/getOutputFolder.d.ts +9 -0
- package/lib/cli/getOutputFolder.d.ts.map +1 -0
- package/lib/cli/index.d.ts +25 -0
- package/lib/cli/index.d.ts.map +1 -0
- package/lib/cli/init.d.ts +13 -0
- package/lib/cli/init.d.ts.map +1 -0
- package/lib/cli/options.d.ts +26 -0
- package/lib/cli/options.d.ts.map +1 -0
- package/lib/cli/parse.d.ts +13 -0
- package/lib/cli/parse.d.ts.map +1 -0
- package/lib/cli/serve.d.ts +25 -0
- package/lib/cli/serve.d.ts.map +1 -0
- package/lib/cli/server.d.ts +29 -0
- package/lib/cli/server.d.ts.map +1 -0
- package/lib/cli/watch.d.ts +10 -0
- package/lib/cli/watch.d.ts.map +1 -0
- package/lib/constants/__tests__/configSchema.d.ts +2 -0
- package/lib/constants/__tests__/configSchema.d.ts.map +1 -0
- package/lib/constants/configDefault.d.ts +3 -0
- package/lib/constants/configDefault.d.ts.map +1 -0
- package/lib/constants/configFiles.d.ts +3 -0
- package/lib/constants/configFiles.d.ts.map +1 -0
- package/lib/constants/configSchema.d.ts +221 -0
- package/lib/constants/configSchema.d.ts.map +1 -0
- package/lib/constants/defaultBlocks.d.ts +5 -0
- package/lib/constants/defaultBlocks.d.ts.map +1 -0
- package/lib/constants/defaultBlocks.js +8 -7
- package/lib/constants/defaultFilters.d.ts +4 -0
- package/lib/constants/defaultFilters.d.ts.map +1 -0
- package/lib/constants/defaultPlugins.d.ts +5 -0
- package/lib/constants/defaultPlugins.d.ts.map +1 -0
- package/lib/constants/extsAsciidoc.d.ts +3 -0
- package/lib/constants/extsAsciidoc.d.ts.map +1 -0
- package/lib/constants/extsMarkdown.d.ts +3 -0
- package/lib/constants/extsMarkdown.d.ts.map +1 -0
- package/lib/constants/ignoreFiles.d.ts +3 -0
- package/lib/constants/ignoreFiles.d.ts.map +1 -0
- package/lib/constants/pluginAssetsFolder.d.ts +3 -0
- package/lib/constants/pluginAssetsFolder.d.ts.map +1 -0
- package/lib/constants/pluginHooks.d.ts +3 -0
- package/lib/constants/pluginHooks.d.ts.map +1 -0
- package/lib/constants/pluginPrefix.d.ts +3 -0
- package/lib/constants/pluginPrefix.d.ts.map +1 -0
- package/lib/constants/pluginResources.d.ts +4 -0
- package/lib/constants/pluginResources.d.ts.map +1 -0
- package/lib/constants/templatesFolder.d.ts +3 -0
- package/lib/constants/templatesFolder.d.ts.map +1 -0
- package/lib/constants/themePrefix.d.ts +3 -0
- package/lib/constants/themePrefix.d.ts.map +1 -0
- package/lib/fs/__tests__/mock.d.ts +2 -0
- package/lib/fs/__tests__/mock.d.ts.map +1 -0
- package/lib/fs/mock.d.ts +9 -0
- package/lib/fs/mock.d.ts.map +1 -0
- package/lib/fs/node.d.ts +3 -0
- package/lib/fs/node.d.ts.map +1 -0
- package/lib/honkit.d.ts +15 -0
- package/lib/honkit.d.ts.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/init.d.ts +11 -0
- package/lib/init.d.ts.map +1 -0
- package/lib/json/encodeBook.d.ts +51 -0
- package/lib/json/encodeBook.d.ts.map +1 -0
- package/lib/json/encodeBookWithPage.d.ts +52 -0
- package/lib/json/encodeBookWithPage.d.ts.map +1 -0
- package/lib/json/encodeFile.d.ts +13 -0
- package/lib/json/encodeFile.d.ts.map +1 -0
- package/lib/json/encodeGlossary.d.ts +16 -0
- package/lib/json/encodeGlossary.d.ts.map +1 -0
- package/lib/json/encodeGlossaryEntry.d.ts +13 -0
- package/lib/json/encodeGlossaryEntry.d.ts.map +1 -0
- package/lib/json/encodeLanguages.d.ts +16 -0
- package/lib/json/encodeLanguages.d.ts.map +1 -0
- package/lib/json/encodeOutput.d.ts +51 -0
- package/lib/json/encodeOutput.d.ts.map +1 -0
- package/lib/json/encodeOutputWithPage.d.ts +52 -0
- package/lib/json/encodeOutputWithPage.d.ts.map +1 -0
- package/lib/json/encodePage.d.ts +19 -0
- package/lib/json/encodePage.d.ts.map +1 -0
- package/lib/json/encodeReadme.d.ts +15 -0
- package/lib/json/encodeReadme.d.ts.map +1 -0
- package/lib/json/encodeSummary.d.ts +16 -0
- package/lib/json/encodeSummary.d.ts.map +1 -0
- package/lib/json/encodeSummaryArticle.d.ts +19 -0
- package/lib/json/encodeSummaryArticle.d.ts.map +1 -0
- package/lib/json/encodeSummaryArticleWithCache.d.ts +20 -0
- package/lib/json/encodeSummaryArticleWithCache.d.ts.map +1 -0
- package/lib/json/encodeSummaryPart.d.ts +12 -0
- package/lib/json/encodeSummaryPart.d.ts.map +1 -0
- package/lib/json/index.d.ts +24 -0
- package/lib/json/index.d.ts.map +1 -0
- package/lib/models/__tests__/config.d.ts +2 -0
- package/lib/models/__tests__/config.d.ts.map +1 -0
- package/lib/models/__tests__/glossary.d.ts +2 -0
- package/lib/models/__tests__/glossary.d.ts.map +1 -0
- package/lib/models/__tests__/glossaryEntry.d.ts +2 -0
- package/lib/models/__tests__/glossaryEntry.d.ts.map +1 -0
- package/lib/models/__tests__/page.d.ts +2 -0
- package/lib/models/__tests__/page.d.ts.map +1 -0
- package/lib/models/__tests__/plugin.d.ts +2 -0
- package/lib/models/__tests__/plugin.d.ts.map +1 -0
- package/lib/models/__tests__/pluginDependency.d.ts +2 -0
- package/lib/models/__tests__/pluginDependency.d.ts.map +1 -0
- package/lib/models/__tests__/summary.d.ts +2 -0
- package/lib/models/__tests__/summary.d.ts.map +1 -0
- package/lib/models/__tests__/summaryArticle.d.ts +2 -0
- package/lib/models/__tests__/summaryArticle.d.ts.map +1 -0
- package/lib/models/__tests__/summaryPart.d.ts +2 -0
- package/lib/models/__tests__/summaryPart.d.ts.map +1 -0
- package/lib/models/__tests__/templateBlock.d.ts +2 -0
- package/lib/models/__tests__/templateBlock.d.ts.map +1 -0
- package/lib/models/__tests__/templateEngine.d.ts +2 -0
- package/lib/models/__tests__/templateEngine.d.ts.map +1 -0
- package/lib/models/book.d.ts +158 -0
- package/lib/models/book.d.ts.map +1 -0
- package/lib/models/config.d.ts +82 -0
- package/lib/models/config.d.ts.map +1 -0
- package/lib/models/file.d.ts +54 -0
- package/lib/models/file.d.ts.map +1 -0
- package/lib/models/file.js +11 -4
- package/lib/models/fs.d.ts +116 -0
- package/lib/models/fs.d.ts.map +1 -0
- package/lib/models/glossary.d.ts +42 -0
- package/lib/models/glossary.d.ts.map +1 -0
- package/lib/models/glossary.js +4 -4
- package/lib/models/glossaryEntry.d.ts +16 -0
- package/lib/models/glossaryEntry.d.ts.map +1 -0
- package/lib/models/hash.d.ts +4 -0
- package/lib/models/hash.d.ts.map +1 -0
- package/lib/models/ignore.d.ts +20 -0
- package/lib/models/ignore.d.ts.map +1 -0
- package/lib/models/language.d.ts +9 -0
- package/lib/models/language.d.ts.map +1 -0
- package/lib/models/languages.d.ts +35 -0
- package/lib/models/languages.d.ts.map +1 -0
- package/lib/models/output.d.ts +53 -0
- package/lib/models/output.d.ts.map +1 -0
- package/lib/models/page.d.ts +44 -0
- package/lib/models/page.d.ts.map +1 -0
- package/lib/models/parser.d.ts +44 -0
- package/lib/models/parser.d.ts.map +1 -0
- package/lib/models/parser.js +14 -14
- package/lib/models/plugin.d.ts +69 -0
- package/lib/models/plugin.d.ts.map +1 -0
- package/lib/models/pluginDependency.d.ts +47 -0
- package/lib/models/pluginDependency.d.ts.map +1 -0
- package/lib/models/readme.d.ts +21 -0
- package/lib/models/readme.d.ts.map +1 -0
- package/lib/models/summary.d.ts +83 -0
- package/lib/models/summary.d.ts.map +1 -0
- package/lib/models/summaryArticle.d.ts +93 -0
- package/lib/models/summaryArticle.d.ts.map +1 -0
- package/lib/models/summaryPart.d.ts +23 -0
- package/lib/models/summaryPart.d.ts.map +1 -0
- package/lib/models/templateBlock.d.ts +54 -0
- package/lib/models/templateBlock.d.ts.map +1 -0
- package/lib/models/templateEngine.d.ts +35 -0
- package/lib/models/templateEngine.d.ts.map +1 -0
- package/lib/models/templateOutput.d.ts +18 -0
- package/lib/models/templateOutput.d.ts.map +1 -0
- package/lib/models/templateShortcut.d.ts +28 -0
- package/lib/models/templateShortcut.d.ts.map +1 -0
- package/lib/models/templateShortcut.js +3 -3
- package/lib/modifiers/config/__tests__/addPlugin.d.ts +2 -0
- package/lib/modifiers/config/__tests__/addPlugin.d.ts.map +1 -0
- package/lib/modifiers/config/__tests__/removePlugin.d.ts +2 -0
- package/lib/modifiers/config/__tests__/removePlugin.d.ts.map +1 -0
- package/lib/modifiers/config/__tests__/togglePlugin.d.ts +2 -0
- package/lib/modifiers/config/__tests__/togglePlugin.d.ts.map +1 -0
- package/lib/modifiers/config/addPlugin.d.ts +10 -0
- package/lib/modifiers/config/addPlugin.d.ts.map +1 -0
- package/lib/modifiers/config/editPlugin.d.ts +10 -0
- package/lib/modifiers/config/editPlugin.d.ts.map +1 -0
- package/lib/modifiers/config/getPluginConfig.d.ts +9 -0
- package/lib/modifiers/config/getPluginConfig.d.ts.map +1 -0
- package/lib/modifiers/config/hasPlugin.d.ts +10 -0
- package/lib/modifiers/config/hasPlugin.d.ts.map +1 -0
- package/lib/modifiers/config/index.d.ts +18 -0
- package/lib/modifiers/config/index.d.ts.map +1 -0
- package/lib/modifiers/config/isDefaultPlugin.d.ts +9 -0
- package/lib/modifiers/config/isDefaultPlugin.d.ts.map +1 -0
- package/lib/modifiers/config/removePlugin.d.ts +9 -0
- package/lib/modifiers/config/removePlugin.d.ts.map +1 -0
- package/lib/modifiers/config/togglePlugin.d.ts +10 -0
- package/lib/modifiers/config/togglePlugin.d.ts.map +1 -0
- package/lib/modifiers/index.d.ts +25 -0
- package/lib/modifiers/index.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/editPartTitle.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/editPartTitle.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/insertArticle.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/insertArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/insertPart.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/insertPart.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/mergeAtLevel.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/moveArticle.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/moveArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/moveArticleAfter.d.ts.map +1 -0
- package/lib/modifiers/summary/__tests__/removeArticle.d.ts +2 -0
- package/lib/modifiers/summary/__tests__/removeArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/editArticleRef.d.ts +11 -0
- package/lib/modifiers/summary/editArticleRef.d.ts.map +1 -0
- package/lib/modifiers/summary/editArticleTitle.d.ts +11 -0
- package/lib/modifiers/summary/editArticleTitle.d.ts.map +1 -0
- package/lib/modifiers/summary/editPartTitle.d.ts +11 -0
- package/lib/modifiers/summary/editPartTitle.d.ts.map +1 -0
- package/lib/modifiers/summary/index.d.ts +24 -0
- package/lib/modifiers/summary/index.d.ts.map +1 -0
- package/lib/modifiers/summary/indexArticleLevels.d.ts +10 -0
- package/lib/modifiers/summary/indexArticleLevels.d.ts.map +1 -0
- package/lib/modifiers/summary/indexLevels.d.ts +9 -0
- package/lib/modifiers/summary/indexLevels.d.ts.map +1 -0
- package/lib/modifiers/summary/indexPartLevels.d.ts +10 -0
- package/lib/modifiers/summary/indexPartLevels.d.ts.map +1 -0
- package/lib/modifiers/summary/insertArticle.d.ts +12 -0
- package/lib/modifiers/summary/insertArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/insertPart.d.ts +13 -0
- package/lib/modifiers/summary/insertPart.d.ts.map +1 -0
- package/lib/modifiers/summary/mergeAtLevel.d.ts +11 -0
- package/lib/modifiers/summary/mergeAtLevel.d.ts.map +1 -0
- package/lib/modifiers/summary/moveArticle.d.ts +12 -0
- package/lib/modifiers/summary/moveArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/moveArticleAfter.d.ts +13 -0
- package/lib/modifiers/summary/moveArticleAfter.d.ts.map +1 -0
- package/lib/modifiers/summary/removeArticle.d.ts +10 -0
- package/lib/modifiers/summary/removeArticle.d.ts.map +1 -0
- package/lib/modifiers/summary/removePart.d.ts +10 -0
- package/lib/modifiers/summary/removePart.d.ts.map +1 -0
- package/lib/modifiers/summary/unshiftArticle.d.ts +10 -0
- package/lib/modifiers/summary/unshiftArticle.d.ts.map +1 -0
- package/lib/output/Generator.d.ts +14 -0
- package/lib/output/Generator.d.ts.map +1 -0
- package/lib/output/__tests__/ebook.d.ts +2 -0
- package/lib/output/__tests__/ebook.d.ts.map +1 -0
- package/lib/output/__tests__/json.d.ts +2 -0
- package/lib/output/__tests__/json.d.ts.map +1 -0
- package/lib/output/__tests__/plugin-hooks.d.ts +2 -0
- package/lib/output/__tests__/plugin-hooks.d.ts.map +1 -0
- package/lib/output/__tests__/website.d.ts +2 -0
- package/lib/output/__tests__/website.d.ts.map +1 -0
- package/lib/output/callHook.d.ts +12 -0
- package/lib/output/callHook.d.ts.map +1 -0
- package/lib/output/callPageHook.d.ts +11 -0
- package/lib/output/callPageHook.d.ts.map +1 -0
- package/lib/output/createTemplateEngine.d.ts +11 -0
- package/lib/output/createTemplateEngine.d.ts.map +1 -0
- package/lib/output/ebook/getConvertOptions.d.ts +9 -0
- package/lib/output/ebook/getConvertOptions.d.ts.map +1 -0
- package/lib/output/ebook/getCoverPath.d.ts +9 -0
- package/lib/output/ebook/getCoverPath.d.ts.map +1 -0
- package/lib/output/ebook/getPDFTemplate.d.ts +10 -0
- package/lib/output/ebook/getPDFTemplate.d.ts.map +1 -0
- package/lib/output/ebook/index.d.ts +3 -0
- package/lib/output/ebook/index.d.ts.map +1 -0
- package/lib/output/ebook/onFinish.d.ts +9 -0
- package/lib/output/ebook/onFinish.d.ts.map +1 -0
- package/lib/output/ebook/onPage.d.ts +9 -0
- package/lib/output/ebook/onPage.d.ts.map +1 -0
- package/lib/output/ebook/options.d.ts +4 -0
- package/lib/output/ebook/options.d.ts.map +1 -0
- package/lib/output/generateAssets.d.ts +10 -0
- package/lib/output/generateAssets.d.ts.map +1 -0
- package/lib/output/generateBook.d.ts +32 -0
- package/lib/output/generateBook.d.ts.map +1 -0
- package/lib/output/generatePage.d.ts +10 -0
- package/lib/output/generatePage.d.ts.map +1 -0
- package/lib/output/generatePage.js +12 -5
- package/lib/output/generatePages.d.ts +10 -0
- package/lib/output/generatePages.d.ts.map +1 -0
- package/lib/output/getModifiers.d.ts +9 -0
- package/lib/output/getModifiers.d.ts.map +1 -0
- package/lib/output/helper/fileToOutput.d.ts +10 -0
- package/lib/output/helper/fileToOutput.d.ts.map +1 -0
- package/lib/output/helper/fileToURL.d.ts +15 -0
- package/lib/output/helper/fileToURL.d.ts.map +1 -0
- package/lib/output/helper/index.d.ts +3 -0
- package/lib/output/helper/index.d.ts.map +1 -0
- package/lib/output/helper/resolveFileToURL.d.ts +10 -0
- package/lib/output/helper/resolveFileToURL.d.ts.map +1 -0
- package/lib/output/helper/writeFile.d.ts +11 -0
- package/lib/output/helper/writeFile.d.ts.map +1 -0
- package/lib/output/index.d.ts +13 -0
- package/lib/output/index.d.ts.map +1 -0
- package/lib/output/json/index.d.ts +10 -0
- package/lib/output/json/index.d.ts.map +1 -0
- package/lib/output/json/onFinish.d.ts +8 -0
- package/lib/output/json/onFinish.d.ts.map +1 -0
- package/lib/output/json/onPage.d.ts +9 -0
- package/lib/output/json/onPage.d.ts.map +1 -0
- package/lib/output/json/options.d.ts +4 -0
- package/lib/output/json/options.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/addHeadingId.d.ts +2 -0
- package/lib/output/modifiers/__tests__/addHeadingId.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/annotateText.d.ts +2 -0
- package/lib/output/modifiers/__tests__/annotateText.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts +2 -0
- package/lib/output/modifiers/__tests__/fetchRemoteImages.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/fetchRemoteImages.js +4 -2
- package/lib/output/modifiers/__tests__/highlightCode.d.ts +2 -0
- package/lib/output/modifiers/__tests__/highlightCode.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/inlinePng.d.ts +2 -0
- package/lib/output/modifiers/__tests__/inlinePng.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/inlineSvg.d.ts +2 -0
- package/lib/output/modifiers/__tests__/inlineSvg.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/resolveImages.d.ts +2 -0
- package/lib/output/modifiers/__tests__/resolveImages.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/resolveLinks.d.ts +2 -0
- package/lib/output/modifiers/__tests__/resolveLinks.d.ts.map +1 -0
- package/lib/output/modifiers/__tests__/svgToImg.d.ts +2 -0
- package/lib/output/modifiers/__tests__/svgToImg.d.ts.map +1 -0
- package/lib/output/modifiers/addHeadingId.d.ts +8 -0
- package/lib/output/modifiers/addHeadingId.d.ts.map +1 -0
- package/lib/output/modifiers/annotateText.d.ts +10 -0
- package/lib/output/modifiers/annotateText.d.ts.map +1 -0
- package/lib/output/modifiers/editHTMLElement.d.ts +6 -0
- package/lib/output/modifiers/editHTMLElement.d.ts.map +1 -0
- package/lib/output/modifiers/fetchRemoteImages.d.ts +7 -0
- package/lib/output/modifiers/fetchRemoteImages.d.ts.map +1 -0
- package/lib/output/modifiers/highlightCode.d.ts +10 -0
- package/lib/output/modifiers/highlightCode.d.ts.map +1 -0
- package/lib/output/modifiers/index.d.ts +22 -0
- package/lib/output/modifiers/index.d.ts.map +1 -0
- package/lib/output/modifiers/inlineAssets.d.ts +8 -0
- package/lib/output/modifiers/inlineAssets.d.ts.map +1 -0
- package/lib/output/modifiers/inlinePng.d.ts +10 -0
- package/lib/output/modifiers/inlinePng.d.ts.map +1 -0
- package/lib/output/modifiers/inlineSvg.d.ts +10 -0
- package/lib/output/modifiers/inlineSvg.d.ts.map +1 -0
- package/lib/output/modifiers/modifyHTML.d.ts +11 -0
- package/lib/output/modifiers/modifyHTML.d.ts.map +1 -0
- package/lib/output/modifiers/resolveImages.d.ts +10 -0
- package/lib/output/modifiers/resolveImages.d.ts.map +1 -0
- package/lib/output/modifiers/resolveLinks.d.ts +11 -0
- package/lib/output/modifiers/resolveLinks.d.ts.map +1 -0
- package/lib/output/modifiers/svgToImg.d.ts +9 -0
- package/lib/output/modifiers/svgToImg.d.ts.map +1 -0
- package/lib/output/page-cache.d.ts +3 -0
- package/lib/output/page-cache.d.ts.map +1 -0
- package/lib/output/prepareAssets.d.ts +9 -0
- package/lib/output/prepareAssets.d.ts.map +1 -0
- package/lib/output/preparePages.d.ts +9 -0
- package/lib/output/preparePages.d.ts.map +1 -0
- package/lib/output/preparePlugins.d.ts +9 -0
- package/lib/output/preparePlugins.d.ts.map +1 -0
- package/lib/output/testing/createMock.d.ts +13 -0
- package/lib/output/testing/createMock.d.ts.map +1 -0
- package/lib/output/testing/generateMock.d.ts +24 -0
- package/lib/output/testing/generateMock.d.ts.map +1 -0
- package/lib/output/website/__tests__/i18n.d.ts +2 -0
- package/lib/output/website/__tests__/i18n.d.ts.map +1 -0
- package/lib/output/website/copyPluginAssets.d.ts +11 -0
- package/lib/output/website/copyPluginAssets.d.ts.map +1 -0
- package/lib/output/website/createTemplateEngine.d.ts +12 -0
- package/lib/output/website/createTemplateEngine.d.ts.map +1 -0
- package/lib/output/website/index.d.ts +18 -0
- package/lib/output/website/index.d.ts.map +1 -0
- package/lib/output/website/listSearchPaths.d.ts +9 -0
- package/lib/output/website/listSearchPaths.d.ts.map +1 -0
- package/lib/output/website/onAsset.d.ts +9 -0
- package/lib/output/website/onAsset.d.ts.map +1 -0
- package/lib/output/website/onFinish.d.ts +9 -0
- package/lib/output/website/onFinish.d.ts.map +1 -0
- package/lib/output/website/onInit.d.ts +9 -0
- package/lib/output/website/onInit.d.ts.map +1 -0
- package/lib/output/website/onPage.d.ts +9 -0
- package/lib/output/website/onPage.d.ts.map +1 -0
- package/lib/output/website/options.d.ts +4 -0
- package/lib/output/website/options.d.ts.map +1 -0
- package/lib/output/website/prepareI18n.d.ts +9 -0
- package/lib/output/website/prepareI18n.d.ts.map +1 -0
- package/lib/output/website/prepareResources.d.ts +9 -0
- package/lib/output/website/prepareResources.d.ts.map +1 -0
- package/lib/output/website/state.d.ts +10 -0
- package/lib/output/website/state.d.ts.map +1 -0
- package/lib/parse/__tests__/listAssets.d.ts +2 -0
- package/lib/parse/__tests__/listAssets.d.ts.map +1 -0
- package/lib/parse/__tests__/parseBook.d.ts +2 -0
- package/lib/parse/__tests__/parseBook.d.ts.map +1 -0
- package/lib/parse/__tests__/parseGlossary.d.ts +2 -0
- package/lib/parse/__tests__/parseGlossary.d.ts.map +1 -0
- package/lib/parse/__tests__/parseIgnore.d.ts +2 -0
- package/lib/parse/__tests__/parseIgnore.d.ts.map +1 -0
- package/lib/parse/__tests__/parsePageFromString.d.ts +2 -0
- package/lib/parse/__tests__/parsePageFromString.d.ts.map +1 -0
- package/lib/parse/__tests__/parseReadme.d.ts +2 -0
- package/lib/parse/__tests__/parseReadme.d.ts.map +1 -0
- package/lib/parse/__tests__/parseSummary.d.ts +2 -0
- package/lib/parse/__tests__/parseSummary.d.ts.map +1 -0
- package/lib/parse/findParsableFile.d.ts +10 -0
- package/lib/parse/findParsableFile.d.ts.map +1 -0
- package/lib/parse/index.d.ts +28 -0
- package/lib/parse/index.d.ts.map +1 -0
- package/lib/parse/listAssets.d.ts +11 -0
- package/lib/parse/listAssets.d.ts.map +1 -0
- package/lib/parse/lookupStructureFile.d.ts +12 -0
- package/lib/parse/lookupStructureFile.d.ts.map +1 -0
- package/lib/parse/parseBook.d.ts +9 -0
- package/lib/parse/parseBook.d.ts.map +1 -0
- package/lib/parse/parseConfig.d.ts +9 -0
- package/lib/parse/parseConfig.d.ts.map +1 -0
- package/lib/parse/parseGlossary.d.ts +9 -0
- package/lib/parse/parseGlossary.d.ts.map +1 -0
- package/lib/parse/parseIgnore.d.ts +9 -0
- package/lib/parse/parseIgnore.d.ts.map +1 -0
- package/lib/parse/parseLanguages.d.ts +9 -0
- package/lib/parse/parseLanguages.d.ts.map +1 -0
- package/lib/parse/parsePage.d.ts +10 -0
- package/lib/parse/parsePage.d.ts.map +1 -0
- package/lib/parse/parsePageFromString.d.ts +10 -0
- package/lib/parse/parsePageFromString.d.ts.map +1 -0
- package/lib/parse/parsePagesList.d.ts +9 -0
- package/lib/parse/parsePagesList.d.ts.map +1 -0
- package/lib/parse/parseReadme.d.ts +9 -0
- package/lib/parse/parseReadme.d.ts.map +1 -0
- package/lib/parse/parseStructureFile.d.ts +11 -0
- package/lib/parse/parseStructureFile.d.ts.map +1 -0
- package/lib/parse/parseStructureFile.js +7 -5
- package/lib/parse/parseSummary.d.ts +10 -0
- package/lib/parse/parseSummary.d.ts.map +1 -0
- package/lib/parse/validateConfig.d.ts +10 -0
- package/lib/parse/validateConfig.d.ts.map +1 -0
- package/lib/parse/walkSummary.d.ts +10 -0
- package/lib/parse/walkSummary.d.ts.map +1 -0
- package/lib/parsers.d.ts +31 -0
- package/lib/parsers.d.ts.map +1 -0
- package/lib/parsers.js +5 -5
- package/lib/plugins/PluginResolver.d.ts +26 -0
- package/lib/plugins/PluginResolver.d.ts.map +1 -0
- package/lib/plugins/__tests__/listDependencies.d.ts +2 -0
- package/lib/plugins/__tests__/listDependencies.d.ts.map +1 -0
- package/lib/plugins/__tests__/sortDependencies.d.ts +2 -0
- package/lib/plugins/__tests__/sortDependencies.d.ts.map +1 -0
- package/lib/plugins/__tests__/validatePlugin.d.ts +2 -0
- package/lib/plugins/__tests__/validatePlugin.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +14 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/listBlocks.d.ts +9 -0
- package/lib/plugins/listBlocks.d.ts.map +1 -0
- package/lib/plugins/listDependencies.d.ts +10 -0
- package/lib/plugins/listDependencies.d.ts.map +1 -0
- package/lib/plugins/listDepsForBook.d.ts +11 -0
- package/lib/plugins/listDepsForBook.d.ts.map +1 -0
- package/lib/plugins/listFilters.d.ts +9 -0
- package/lib/plugins/listFilters.d.ts.map +1 -0
- package/lib/plugins/listResources.d.ts +9 -0
- package/lib/plugins/listResources.d.ts.map +1 -0
- package/lib/plugins/loadForBook.d.ts +9 -0
- package/lib/plugins/loadForBook.d.ts.map +1 -0
- package/lib/plugins/loadPlugin.d.ts +11 -0
- package/lib/plugins/loadPlugin.d.ts.map +1 -0
- package/lib/plugins/package-name-util.d.ts +13 -0
- package/lib/plugins/package-name-util.d.ts.map +1 -0
- package/lib/plugins/sortDependencies.d.ts +10 -0
- package/lib/plugins/sortDependencies.d.ts.map +1 -0
- package/lib/plugins/toNames.d.ts +9 -0
- package/lib/plugins/toNames.d.ts.map +1 -0
- package/lib/plugins/validateConfig.d.ts +11 -0
- package/lib/plugins/validateConfig.d.ts.map +1 -0
- package/lib/plugins/validatePlugin.d.ts +9 -0
- package/lib/plugins/validatePlugin.d.ts.map +1 -0
- package/lib/templating/__tests__/conrefsLoader.d.ts +2 -0
- package/lib/templating/__tests__/conrefsLoader.d.ts.map +1 -0
- package/lib/templating/__tests__/postRender.d.ts +2 -0
- package/lib/templating/__tests__/postRender.d.ts.map +1 -0
- package/lib/templating/__tests__/replaceShortcuts.d.ts +2 -0
- package/lib/templating/__tests__/replaceShortcuts.d.ts.map +1 -0
- package/lib/templating/conrefsLoader.d.ts +14 -0
- package/lib/templating/conrefsLoader.d.ts.map +1 -0
- package/lib/templating/conrefsLoader.js +3 -3
- package/lib/templating/index.d.ts +14 -0
- package/lib/templating/index.d.ts.map +1 -0
- package/lib/templating/listShortcuts.d.ts +11 -0
- package/lib/templating/listShortcuts.d.ts.map +1 -0
- package/lib/templating/postRender.d.ts +12 -0
- package/lib/templating/postRender.d.ts.map +1 -0
- package/lib/templating/render.d.ts +12 -0
- package/lib/templating/render.d.ts.map +1 -0
- package/lib/templating/renderFile.d.ts +11 -0
- package/lib/templating/renderFile.d.ts.map +1 -0
- package/lib/templating/replaceShortcuts.d.ts +11 -0
- package/lib/templating/replaceShortcuts.d.ts.map +1 -0
- package/lib/templating/themesLoader.d.ts +4 -0
- package/lib/templating/themesLoader.d.ts.map +1 -0
- package/lib/utils/__tests__/git.d.ts +2 -0
- package/lib/utils/__tests__/git.d.ts.map +1 -0
- package/lib/utils/__tests__/location.d.ts +2 -0
- package/lib/utils/__tests__/location.d.ts.map +1 -0
- package/lib/utils/__tests__/path.d.ts +2 -0
- package/lib/utils/__tests__/path.d.ts.map +1 -0
- package/lib/utils/command.d.ts +25 -0
- package/lib/utils/command.d.ts.map +1 -0
- package/lib/utils/error.d.ts +16 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/fs.d.ts +58 -0
- package/lib/utils/fs.d.ts.map +1 -0
- package/lib/utils/genKey.d.ts +3 -0
- package/lib/utils/genKey.d.ts.map +1 -0
- package/lib/utils/git.d.ts +11 -0
- package/lib/utils/git.d.ts.map +1 -0
- package/lib/utils/images.d.ts +6 -0
- package/lib/utils/images.d.ts.map +1 -0
- package/lib/utils/location.d.ts +62 -0
- package/lib/utils/location.d.ts.map +1 -0
- package/lib/utils/logger.d.ts +7 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/utils/mergeDefaults.d.ts +9 -0
- package/lib/utils/mergeDefaults.d.ts.map +1 -0
- package/lib/utils/path.d.ts +14 -0
- package/lib/utils/path.d.ts.map +1 -0
- package/lib/utils/promise.d.ts +52 -0
- package/lib/utils/promise.d.ts.map +1 -0
- package/lib/utils/reducedObject.d.ts +9 -0
- package/lib/utils/reducedObject.d.ts.map +1 -0
- package/lib/utils/timing.d.ts +20 -0
- package/lib/utils/timing.d.ts.map +1 -0
- package/package.json +9 -8
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import parseBook0 from "./parseBook";
|
|
2
|
+
import parseSummary0 from "./parseSummary";
|
|
3
|
+
import parseGlossary0 from "./parseGlossary";
|
|
4
|
+
import parseReadme0 from "./parseReadme";
|
|
5
|
+
import parseConfig0 from "./parseConfig";
|
|
6
|
+
import parsePagesList0 from "./parsePagesList";
|
|
7
|
+
import parseIgnore0 from "./parseIgnore";
|
|
8
|
+
import listAssets0 from "./listAssets";
|
|
9
|
+
import parseLanguages0 from "./parseLanguages";
|
|
10
|
+
import parsePage0 from "./parsePage";
|
|
11
|
+
import parsePageFromString0 from "./parsePageFromString";
|
|
12
|
+
import lookupStructureFile0 from "./lookupStructureFile";
|
|
13
|
+
declare const _default: {
|
|
14
|
+
parseBook: typeof parseBook0;
|
|
15
|
+
parseSummary: typeof parseSummary0;
|
|
16
|
+
parseGlossary: typeof parseGlossary0;
|
|
17
|
+
parseReadme: typeof parseReadme0;
|
|
18
|
+
parseConfig: typeof parseConfig0;
|
|
19
|
+
parsePagesList: typeof parsePagesList0;
|
|
20
|
+
parseIgnore: typeof parseIgnore0;
|
|
21
|
+
listAssets: typeof listAssets0;
|
|
22
|
+
parseLanguages: typeof parseLanguages0;
|
|
23
|
+
parsePage: typeof parsePage0;
|
|
24
|
+
parsePageFromString: typeof parsePageFromString0;
|
|
25
|
+
lookupStructureFile: typeof lookupStructureFile0;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parse/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;;;;;;;;;;;;;;;AAEzD,wBAaE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
List all assets in a book
|
|
3
|
+
Assets are file not ignored and not a page
|
|
4
|
+
|
|
5
|
+
@param {Book} book
|
|
6
|
+
@param {List<String>} pages
|
|
7
|
+
@param
|
|
8
|
+
*/
|
|
9
|
+
declare function listAssets(book: any, pages: any): any;
|
|
10
|
+
export default listAssets;
|
|
11
|
+
//# sourceMappingURL=listAssets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listAssets.d.ts","sourceRoot":"","sources":["../../src/parse/listAssets.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,iBAAS,UAAU,CAAC,IAAI,KAAA,EAAE,KAAK,KAAA,OA4B9B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Lookup a structure file (ex: SUMMARY.md, GLOSSARY.md) in a book. Uses
|
|
3
|
+
book's config to find it.
|
|
4
|
+
|
|
5
|
+
@param {Book} book
|
|
6
|
+
@param {string} type: one of ["glossary", "readme", "summary", "langs"]
|
|
7
|
+
@return {Promise<File | Undefined>} The path of the file found, relative
|
|
8
|
+
to the book content root.
|
|
9
|
+
*/
|
|
10
|
+
declare function lookupStructureFile(book: any, type: any): any;
|
|
11
|
+
export default lookupStructureFile;
|
|
12
|
+
//# sourceMappingURL=lookupStructureFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookupStructureFile.d.ts","sourceRoot":"","sources":["../../src/parse/lookupStructureFile.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,iBAAS,mBAAmB,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAMtC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseBook.d.ts","sourceRoot":"","sources":["../../src/parse/parseBook.ts"],"names":[],"mappings":"AAqDA;;;;;GAKG;AAEH,iBAAS,SAAS,CAAC,IAAI,KAAA,OAgBtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseConfig.d.ts","sourceRoot":"","sources":["../../src/parse/parseConfig.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,iBAAS,WAAW,CAAC,IAAI,KAAA,OAuCxB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseGlossary.d.ts","sourceRoot":"","sources":["../../src/parse/parseGlossary.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,iBAAS,aAAa,CAAC,IAAI,KAAA,OAa1B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseIgnore.d.ts","sourceRoot":"","sources":["../../src/parse/parseIgnore.ts"],"names":[],"mappings":"AAoBA;;;;;GAKG;AAEH,iBAAS,WAAW,CAAC,IAAI,KAAA,OAsBxB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseLanguages.d.ts","sourceRoot":"","sources":["../../src/parse/parseLanguages.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,iBAAS,cAAc,CAAC,IAAI,KAAA,OAe3B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a page, read its content and parse the YAMl header
|
|
3
|
+
*
|
|
4
|
+
* @param {Book} book
|
|
5
|
+
* @param {Page} page
|
|
6
|
+
* @return {Promise<Page>}
|
|
7
|
+
*/
|
|
8
|
+
declare function parsePage(book: any, page: any): any;
|
|
9
|
+
export default parsePage;
|
|
10
|
+
//# sourceMappingURL=parsePage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePage.d.ts","sourceRoot":"","sources":["../../src/parse/parsePage.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,iBAAS,SAAS,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAO5B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a page, its content and the YAMl header
|
|
3
|
+
*
|
|
4
|
+
* @param {Page} page
|
|
5
|
+
* @param {string} content
|
|
6
|
+
* @return {Page}
|
|
7
|
+
*/
|
|
8
|
+
declare function parsePageFromString(page: any, content: any): any;
|
|
9
|
+
export default parsePageFromString;
|
|
10
|
+
//# sourceMappingURL=parsePageFromString.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePageFromString.d.ts","sourceRoot":"","sources":["../../src/parse/parsePageFromString.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,iBAAS,mBAAmB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,OASzC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsePagesList.d.ts","sourceRoot":"","sources":["../../src/parse/parsePagesList.ts"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,iBAAS,cAAc,CAAC,IAAI,KAAA,OAmD3B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseReadme.d.ts","sourceRoot":"","sources":["../../src/parse/parseReadme.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,iBAAS,WAAW,CAAC,IAAI,KAAA,OAaxB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Parse a structure file (ex: SUMMARY.md, GLOSSARY.md).
|
|
3
|
+
It uses the configuration to find the specified file.
|
|
4
|
+
|
|
5
|
+
@param {Book} book
|
|
6
|
+
@param {string} type: one of ["glossary", "readme", "summary"]
|
|
7
|
+
@return {Promise<List|Map>}
|
|
8
|
+
*/
|
|
9
|
+
declare function parseStructureFile(book: any, type: any): any;
|
|
10
|
+
export default parseStructureFile;
|
|
11
|
+
//# sourceMappingURL=parseStructureFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseStructureFile.d.ts","sourceRoot":"","sources":["../../src/parse/parseStructureFile.ts"],"names":[],"mappings":"AA8CA;;;;;;;GAOG;AAEH,iBAAS,kBAAkB,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,OAQrC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const promise_1 = __importDefault(require("../utils/promise"));
|
|
7
7
|
const error_1 = __importDefault(require("../utils/error"));
|
|
8
8
|
const lookupStructureFile_1 = __importDefault(require("./lookupStructureFile"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
9
10
|
/**
|
|
10
11
|
Parse a ParsableFile using a specific method
|
|
11
12
|
|
|
@@ -19,23 +20,24 @@ function parseFile(fs, file, type) {
|
|
|
19
20
|
const parser = file.getParser();
|
|
20
21
|
if (!parser) {
|
|
21
22
|
return promise_1.default.reject(error_1.default.FileNotParsableError({
|
|
22
|
-
filename: filepath
|
|
23
|
+
filename: filepath
|
|
23
24
|
}));
|
|
24
25
|
}
|
|
26
|
+
const baseDirectory = path_1.default.dirname(filepath);
|
|
25
27
|
return fs
|
|
26
28
|
.readAsString(filepath)
|
|
27
29
|
.then((content) => {
|
|
28
30
|
if (type === "readme") {
|
|
29
|
-
return parser.parseReadme(content);
|
|
31
|
+
return parser.parseReadme(content, { baseDirectory });
|
|
30
32
|
}
|
|
31
33
|
else if (type === "glossary") {
|
|
32
|
-
return parser.parseGlossary(content);
|
|
34
|
+
return parser.parseGlossary(content, { baseDirectory });
|
|
33
35
|
}
|
|
34
36
|
else if (type === "summary") {
|
|
35
|
-
return parser.parseSummary(content);
|
|
37
|
+
return parser.parseSummary(content, { baseDirectory });
|
|
36
38
|
}
|
|
37
39
|
else if (type === "langs") {
|
|
38
|
-
return parser.parseLanguages(content);
|
|
40
|
+
return parser.parseLanguages(content, { baseDirectory });
|
|
39
41
|
}
|
|
40
42
|
else {
|
|
41
43
|
throw new Error(`Parsing invalid type "${type}"`);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Parse summary in a book, the summary can only be parsed
|
|
3
|
+
if the readme as be detected before.
|
|
4
|
+
|
|
5
|
+
@param {Book} book
|
|
6
|
+
@return {Promise<Book>}
|
|
7
|
+
*/
|
|
8
|
+
declare function parseSummary(book: any): any;
|
|
9
|
+
export default parseSummary;
|
|
10
|
+
//# sourceMappingURL=parseSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSummary.d.ts","sourceRoot":"","sources":["../../src/parse/parseSummary.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH,iBAAS,YAAY,CAAC,IAAI,KAAA,OA6BzB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Validate a book.json content
|
|
3
|
+
And return a mix with the default value
|
|
4
|
+
|
|
5
|
+
@param {Object} bookJson
|
|
6
|
+
@return {Object}
|
|
7
|
+
*/
|
|
8
|
+
declare function validateConfig(bookJson: any): any;
|
|
9
|
+
export default validateConfig;
|
|
10
|
+
//# sourceMappingURL=validateConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/parse/validateConfig.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH,iBAAS,cAAc,CAAC,QAAQ,KAAA,OAc/B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Walk over summary and execute "fn" on each article
|
|
3
|
+
|
|
4
|
+
@param {Summary} summary
|
|
5
|
+
@param {Function(article)}
|
|
6
|
+
@return {Promise}
|
|
7
|
+
*/
|
|
8
|
+
declare function walkSummary(summary: any, fn: any): any;
|
|
9
|
+
export default walkSummary;
|
|
10
|
+
//# sourceMappingURL=walkSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walkSummary.d.ts","sourceRoot":"","sources":["../../src/parse/walkSummary.ts"],"names":[],"mappings":"AAiBA;;;;;;GAMG;AAEH,iBAAS,WAAW,CAAC,OAAO,KAAA,EAAE,EAAE,KAAA,OAM/B;AAED,eAAe,WAAW,CAAC"}
|
package/lib/parsers.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Immutable from "immutable";
|
|
2
|
+
import Parser from "./models/parser";
|
|
3
|
+
/**
|
|
4
|
+
* Return a specific parser by its name
|
|
5
|
+
*
|
|
6
|
+
* @param {string} name
|
|
7
|
+
* @return {Parsers|undefined}
|
|
8
|
+
*/
|
|
9
|
+
declare function getParser(name: any): Parser;
|
|
10
|
+
/**
|
|
11
|
+
* Return a specific parser according to an extension
|
|
12
|
+
*
|
|
13
|
+
* @param {string} ext
|
|
14
|
+
* @return {Parsers|undefined}
|
|
15
|
+
*/
|
|
16
|
+
declare function getParserByExt(ext: any): Parser;
|
|
17
|
+
/**
|
|
18
|
+
* Return parser for a file
|
|
19
|
+
*
|
|
20
|
+
* @param {string} ext
|
|
21
|
+
* @return {Parsers|undefined}
|
|
22
|
+
*/
|
|
23
|
+
declare function getParserForFile(filename: any): Parser;
|
|
24
|
+
declare const _default: {
|
|
25
|
+
extensions: Immutable.Iterable<any, any>;
|
|
26
|
+
get: typeof getParser;
|
|
27
|
+
getByExt: typeof getParserByExt;
|
|
28
|
+
getForFile: typeof getParserForFile;
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=parsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,WAAW,CAAC;AAKlC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC;;;;;GAKG;AACH,iBAAS,SAAS,CAAC,IAAI,KAAA,UAItB;AAED;;;;;GAKG;AACH,iBAAS,cAAc,CAAC,GAAG,KAAA,UAI1B;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,QAAQ,KAAA,UAEjC;;;;;;;AASD,wBAKE"}
|
package/lib/parsers.js
CHANGED
|
@@ -13,13 +13,13 @@ const parser_1 = __importDefault(require("./models/parser"));
|
|
|
13
13
|
// This list is ordered by priority of parsers to use
|
|
14
14
|
const parsers = immutable_1.default.List([
|
|
15
15
|
parser_1.default.create("markdown", extsMarkdown_1.default, markdown_legacy_1.default),
|
|
16
|
-
parser_1.default.create("asciidoc", extsAsciidoc_1.default, asciidoc_1.default)
|
|
16
|
+
parser_1.default.create("asciidoc", extsAsciidoc_1.default, asciidoc_1.default)
|
|
17
17
|
]);
|
|
18
18
|
/**
|
|
19
19
|
* Return a specific parser by its name
|
|
20
20
|
*
|
|
21
21
|
* @param {string} name
|
|
22
|
-
* @return {
|
|
22
|
+
* @return {Parsers|undefined}
|
|
23
23
|
*/
|
|
24
24
|
function getParser(name) {
|
|
25
25
|
return parsers.find((parser) => {
|
|
@@ -30,7 +30,7 @@ function getParser(name) {
|
|
|
30
30
|
* Return a specific parser according to an extension
|
|
31
31
|
*
|
|
32
32
|
* @param {string} ext
|
|
33
|
-
* @return {
|
|
33
|
+
* @return {Parsers|undefined}
|
|
34
34
|
*/
|
|
35
35
|
function getParserByExt(ext) {
|
|
36
36
|
return parsers.find((parser) => {
|
|
@@ -41,7 +41,7 @@ function getParserByExt(ext) {
|
|
|
41
41
|
* Return parser for a file
|
|
42
42
|
*
|
|
43
43
|
* @param {string} ext
|
|
44
|
-
* @return {
|
|
44
|
+
* @return {Parsers|undefined}
|
|
45
45
|
*/
|
|
46
46
|
function getParserForFile(filename) {
|
|
47
47
|
return getParserByExt(path_1.default.extname(filename));
|
|
@@ -56,5 +56,5 @@ exports.default = {
|
|
|
56
56
|
extensions: extensions,
|
|
57
57
|
get: getParser,
|
|
58
58
|
getByExt: getParserByExt,
|
|
59
|
-
getForFile: getParserForFile
|
|
59
|
+
getForFile: getParserForFile
|
|
60
60
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class aim to resolve honkit's package name and get the module path.
|
|
3
|
+
*
|
|
4
|
+
* Define
|
|
5
|
+
*
|
|
6
|
+
* - `package` is npm package
|
|
7
|
+
* - `module` is package's main module
|
|
8
|
+
*
|
|
9
|
+
* ## Support
|
|
10
|
+
*
|
|
11
|
+
* - honkit-plugin-*
|
|
12
|
+
* - gitbook-plugin-*
|
|
13
|
+
*/
|
|
14
|
+
export declare class PluginResolver {
|
|
15
|
+
baseDirectory: string;
|
|
16
|
+
constructor(config?: {
|
|
17
|
+
baseDirectory?: string;
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Take package name, and return path to module.
|
|
21
|
+
* @param {string} packageName
|
|
22
|
+
* @returns {string} return path to module
|
|
23
|
+
*/
|
|
24
|
+
resolvePluginPackageName(packageName: any): any;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=PluginResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PluginResolver.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginResolver.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AAEH,qBAAa,cAAc;IACvB,aAAa,EAAE,MAAM,CAAC;gBAEV,MAAM,GAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO;IAOnD;;;;OAIG;IACH,wBAAwB,CAAC,WAAW,KAAA;CAyBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/listDependencies.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortDependencies.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/sortDependencies.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatePlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/__tests__/validatePlugin.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import loadForBook0 from "./loadForBook";
|
|
2
|
+
import validateConfig0 from "./validateConfig";
|
|
3
|
+
import listResources0 from "./listResources";
|
|
4
|
+
import listBlocks0 from "./listBlocks";
|
|
5
|
+
import listFilters0 from "./listFilters";
|
|
6
|
+
declare const _default: {
|
|
7
|
+
loadForBook: typeof loadForBook0;
|
|
8
|
+
validateConfig: typeof validateConfig0;
|
|
9
|
+
listResources: typeof listResources0;
|
|
10
|
+
listBlocks: typeof listBlocks0;
|
|
11
|
+
listFilters: typeof listFilters0;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,YAAY,MAAM,eAAe,CAAC;;;;;;;;AACzC,wBAME"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listBlocks.d.ts","sourceRoot":"","sources":["../../src/plugins/listBlocks.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,OAAO,KAAA,OAK1B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List all dependencies for a book, including default plugins.
|
|
3
|
+
* It returns a concat with default plugins and remove disabled ones.
|
|
4
|
+
*
|
|
5
|
+
* @param {List<PluginDependency>} deps
|
|
6
|
+
* @return {List<PluginDependency>}
|
|
7
|
+
*/
|
|
8
|
+
declare function listDependencies(deps: any): any;
|
|
9
|
+
export default listDependencies;
|
|
10
|
+
//# sourceMappingURL=listDependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDependencies.d.ts","sourceRoot":"","sources":["../../src/plugins/listDependencies.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,iBAAS,gBAAgB,CAAC,IAAI,KAAA,OAoB7B;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List all plugin requirements for a book.
|
|
3
|
+
* It can be different from the final list of plugins,
|
|
4
|
+
* since plugins can have their own dependencies
|
|
5
|
+
*
|
|
6
|
+
* @param {Book}
|
|
7
|
+
* @return {List<PluginDependency>}
|
|
8
|
+
*/
|
|
9
|
+
declare function listDepsForBook(book: any): any;
|
|
10
|
+
export default listDepsForBook;
|
|
11
|
+
//# sourceMappingURL=listDepsForBook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listDepsForBook.d.ts","sourceRoot":"","sources":["../../src/plugins/listDepsForBook.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,iBAAS,eAAe,CAAC,IAAI,KAAA,OAK5B;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listFilters.d.ts","sourceRoot":"","sources":["../../src/plugins/listFilters.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,iBAAS,WAAW,CAAC,OAAO,KAAA,OAI3B;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Immutable from "immutable";
|
|
2
|
+
import Plugin from "../models/plugin";
|
|
3
|
+
/**
|
|
4
|
+
List all resources from a list of plugins
|
|
5
|
+
@return {Map<String:List<{url, path}>}
|
|
6
|
+
*/
|
|
7
|
+
declare function listResources(plugins: Plugin[], resources: any): Immutable.Map<string, any>;
|
|
8
|
+
export default listResources;
|
|
9
|
+
//# sourceMappingURL=listResources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listResources.d.ts","sourceRoot":"","sources":["../../src/plugins/listResources.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;;GAGG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,KAAA,8BA6BlD;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadForBook.d.ts","sourceRoot":"","sources":["../../src/plugins/loadForBook.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,iBAAS,WAAW,CAAC,IAAI,KAAA,kBA4BxB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Load a plugin in a book
|
|
3
|
+
|
|
4
|
+
@param {Book} book
|
|
5
|
+
@param {PluginDependency[]} plugin
|
|
6
|
+
@param {string} pkgPath (optional)
|
|
7
|
+
@return {Promise<Plugin>}
|
|
8
|
+
*/
|
|
9
|
+
declare function loadPlugin(book: any, plugin: any): any;
|
|
10
|
+
export { loadPlugin };
|
|
11
|
+
//# sourceMappingURL=loadPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/loadPlugin.ts"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,iBAAS,UAAU,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,OAkE/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remove `prefix` from `text`.
|
|
3
|
+
*/
|
|
4
|
+
declare const removePrefixFromPackageName: (prefixList: any, packageName: any) => any;
|
|
5
|
+
/**
|
|
6
|
+
* Create full package name and return
|
|
7
|
+
* @param {string} prefix
|
|
8
|
+
* @param {string} name
|
|
9
|
+
* @returns {string}
|
|
10
|
+
*/
|
|
11
|
+
declare const createFullPackageName: (prefix: any, name: any) => any;
|
|
12
|
+
export { createFullPackageName, removePrefixFromPackageName };
|
|
13
|
+
//# sourceMappingURL=package-name-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-name-util.d.ts","sourceRoot":"","sources":["../../src/plugins/package-name-util.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,2BAA2B,4CAmBhC,CAAC;AACF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,iCAa1B,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sort the list of dependencies to match list in book.json
|
|
3
|
+
* The themes should always be loaded after the plugins
|
|
4
|
+
*
|
|
5
|
+
* @param {List<PluginDependency>} deps
|
|
6
|
+
* @return {List<PluginDependency>}
|
|
7
|
+
*/
|
|
8
|
+
declare function sortDependencies(plugins: any): any;
|
|
9
|
+
export default sortDependencies;
|
|
10
|
+
//# sourceMappingURL=sortDependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortDependencies.d.ts","sourceRoot":"","sources":["../../src/plugins/sortDependencies.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AAEH,iBAAS,gBAAgB,CAAC,OAAO,KAAA,OAIhC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return list of plugin names. This method is nly used in unit tests.
|
|
3
|
+
*
|
|
4
|
+
* @param {OrderedMap<String:Plugin} plugins
|
|
5
|
+
* @return {Array<String>}
|
|
6
|
+
*/
|
|
7
|
+
declare function toNames(plugins: any): any;
|
|
8
|
+
export default toNames;
|
|
9
|
+
//# sourceMappingURL=toNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toNames.d.ts","sourceRoot":"","sources":["../../src/plugins/toNames.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,iBAAS,OAAO,CAAC,OAAO,KAAA,OAMvB;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Validate a book configuration for plugins and
|
|
3
|
+
returns an update configuration with default values.
|
|
4
|
+
|
|
5
|
+
@param {Book}
|
|
6
|
+
@param {OrderedMap<String:Plugin>}
|
|
7
|
+
@return {Promise<Book>}
|
|
8
|
+
*/
|
|
9
|
+
declare function validateConfig(book: any, plugins: any): any;
|
|
10
|
+
export default validateConfig;
|
|
11
|
+
//# sourceMappingURL=validateConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/plugins/validateConfig.ts"],"names":[],"mappings":"AAmDA;;;;;;;GAOG;AAEH,iBAAS,cAAc,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,OAQpC;AAED,eAAe,cAAc,CAAC"}
|