honkit 3.7.0 → 3.7.3

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.
Files changed (177) hide show
  1. package/lib/__tests__/init.js +1 -1
  2. package/lib/__tests__/snapshot-honkit.js +1 -1
  3. package/lib/api/decodeGlobal.js +1 -1
  4. package/lib/api/encodeConfig.js +0 -4
  5. package/lib/api/encodeGlobal.js +9 -9
  6. package/lib/api/encodeNavigation.js +0 -4
  7. package/lib/api/encodePage.js +1 -5
  8. package/lib/api/encodeProgress.js +1 -6
  9. package/lib/api/encodeSummary.js +3 -5
  10. package/lib/bin.js +1 -1
  11. package/lib/cli/build.js +3 -3
  12. package/lib/cli/buildEbook.js +2 -2
  13. package/lib/cli/getBook.js +1 -1
  14. package/lib/cli/index.js +1 -1
  15. package/lib/cli/init.js +1 -1
  16. package/lib/cli/parse.js +1 -1
  17. package/lib/cli/serve.js +7 -7
  18. package/lib/cli/server.js +3 -3
  19. package/lib/constants/__tests__/configSchema.js +7 -7
  20. package/lib/constants/configDefault.js +1 -1
  21. package/lib/constants/defaultFilters.js +2 -2
  22. package/lib/constants/defaultPlugins.js +1 -2
  23. package/lib/fs/__tests__/mock.js +1 -1
  24. package/lib/index.js +1 -1
  25. package/lib/init.js +1 -1
  26. package/lib/json/encodeBook.js +5 -5
  27. package/lib/json/encodeBookWithPage.js +3 -3
  28. package/lib/json/encodeGlossary.js +1 -1
  29. package/lib/json/encodeLanguages.js +1 -1
  30. package/lib/json/encodeOutput.js +1 -1
  31. package/lib/json/encodeOutputWithPage.js +3 -3
  32. package/lib/json/encodePage.js +9 -8
  33. package/lib/json/encodeReadme.js +1 -1
  34. package/lib/json/encodeSummary.js +1 -1
  35. package/lib/json/encodeSummaryArticle.js +8 -1
  36. package/lib/json/encodeSummaryArticleWithCache.js +36 -0
  37. package/lib/models/__tests__/plugin.js +24 -0
  38. package/lib/models/__tests__/summaryArticle.js +55 -0
  39. package/lib/models/__tests__/templateBlock.js +2 -2
  40. package/lib/models/book.js +1 -1
  41. package/lib/models/config.js +1 -1
  42. package/lib/models/fs.js +5 -5
  43. package/lib/models/glossaryEntry.js +1 -1
  44. package/lib/models/ignore.js +2 -2
  45. package/lib/models/output.js +1 -1
  46. package/lib/models/page.js +1 -1
  47. package/lib/models/parser.js +11 -11
  48. package/lib/models/plugin.js +7 -4
  49. package/lib/models/pluginDependency.js +1 -18
  50. package/lib/models/templateBlock.js +3 -3
  51. package/lib/modifiers/config/__tests__/addPlugin.js +1 -1
  52. package/lib/modifiers/config/__tests__/removePlugin.js +3 -3
  53. package/lib/modifiers/config/__tests__/togglePlugin.js +2 -2
  54. package/lib/modifiers/config/addPlugin.js +2 -3
  55. package/lib/modifiers/config/isDefaultPlugin.js +1 -1
  56. package/lib/modifiers/config/removePlugin.js +2 -2
  57. package/lib/modifiers/config/togglePlugin.js +1 -1
  58. package/lib/modifiers/summary/__tests__/editPartTitle.js +3 -3
  59. package/lib/modifiers/summary/__tests__/insertArticle.js +2 -2
  60. package/lib/modifiers/summary/__tests__/insertPart.js +2 -2
  61. package/lib/modifiers/summary/__tests__/mergeAtLevel.js +2 -2
  62. package/lib/modifiers/summary/__tests__/moveArticle.js +3 -3
  63. package/lib/modifiers/summary/__tests__/moveArticleAfter.js +5 -5
  64. package/lib/modifiers/summary/__tests__/removeArticle.js +1 -1
  65. package/lib/modifiers/summary/editArticleRef.js +1 -1
  66. package/lib/modifiers/summary/editArticleTitle.js +1 -1
  67. package/lib/modifiers/summary/indexPartLevels.js +1 -1
  68. package/lib/modifiers/summary/insertArticle.js +2 -2
  69. package/lib/modifiers/summary/insertPart.js +1 -1
  70. package/lib/modifiers/summary/moveArticle.js +2 -2
  71. package/lib/modifiers/summary/moveArticleAfter.js +4 -4
  72. package/lib/modifiers/summary/removeArticle.js +2 -2
  73. package/lib/modifiers/summary/removePart.js +1 -1
  74. package/lib/modifiers/summary/unshiftArticle.js +1 -1
  75. package/lib/output/Generator.js +2 -0
  76. package/lib/output/__tests__/ebook.js +1 -1
  77. package/lib/output/__tests__/json.js +3 -3
  78. package/lib/output/__tests__/plugin-hooks.js +3 -3
  79. package/lib/output/__tests__/website.js +8 -8
  80. package/lib/output/callHook.js +1 -1
  81. package/lib/output/callPageHook.js +1 -1
  82. package/lib/output/createTemplateEngine.js +1 -0
  83. package/lib/output/ebook/getConvertOptions.js +8 -8
  84. package/lib/output/ebook/getPDFTemplate.js +3 -1
  85. package/lib/output/ebook/index.js +1 -1
  86. package/lib/output/ebook/onFinish.js +3 -3
  87. package/lib/output/generateAssets.js +1 -1
  88. package/lib/output/generateBook.js +54 -46
  89. package/lib/output/generatePage.js +5 -5
  90. package/lib/output/generatePages.js +3 -3
  91. package/lib/output/getModifiers.js +2 -2
  92. package/lib/output/helper/fileToURL.js +1 -1
  93. package/lib/output/helper/resolveFileToURL.js +1 -1
  94. package/lib/output/index.js +0 -2
  95. package/lib/output/json/onFinish.js +1 -1
  96. package/lib/output/json/onPage.js +2 -2
  97. package/lib/output/modifiers/__tests__/addHeadingId.js +2 -2
  98. package/lib/output/modifiers/__tests__/annotateText.js +3 -3
  99. package/lib/output/modifiers/__tests__/fetchRemoteImages.js +2 -2
  100. package/lib/output/modifiers/__tests__/highlightCode.js +5 -5
  101. package/lib/output/modifiers/__tests__/inlinePng.js +1 -1
  102. package/lib/output/modifiers/__tests__/inlineSvg.js +2 -2
  103. package/lib/output/modifiers/__tests__/resolveImages.js +3 -3
  104. package/lib/output/modifiers/__tests__/resolveLinks.js +7 -7
  105. package/lib/output/modifiers/__tests__/svgToImg.js +2 -2
  106. package/lib/output/modifiers/addHeadingId.js +2 -2
  107. package/lib/output/modifiers/annotateText.js +1 -1
  108. package/lib/output/modifiers/fetchRemoteImages.js +1 -1
  109. package/lib/output/modifiers/highlightCode.js +2 -2
  110. package/lib/output/modifiers/inlineAssets.js +1 -1
  111. package/lib/output/modifiers/inlinePng.js +1 -1
  112. package/lib/output/modifiers/inlineSvg.js +1 -1
  113. package/lib/output/modifiers/resolveImages.js +1 -1
  114. package/lib/output/modifiers/resolveLinks.js +1 -1
  115. package/lib/output/modifiers/svgToImg.js +2 -2
  116. package/lib/output/preparePages.js +1 -1
  117. package/lib/output/preparePlugins.js +1 -1
  118. package/lib/output/testing/createMock.js +2 -2
  119. package/lib/output/testing/generateMock.js +3 -3
  120. package/lib/output/website/__tests__/i18n.js +6 -6
  121. package/lib/output/website/copyPluginAssets.js +4 -6
  122. package/lib/output/website/createTemplateEngine.js +7 -8
  123. package/lib/output/website/onFinish.js +3 -3
  124. package/lib/output/website/onInit.js +1 -1
  125. package/lib/output/website/onPage.js +5 -5
  126. package/lib/output/website/prepareI18n.js +2 -2
  127. package/lib/output/website/prepareResources.js +2 -2
  128. package/lib/output/website/state.js +1 -1
  129. package/lib/parse/__tests__/listAssets.js +6 -6
  130. package/lib/parse/__tests__/parseBook.js +6 -6
  131. package/lib/parse/__tests__/parseGlossary.js +4 -4
  132. package/lib/parse/__tests__/parseIgnore.js +2 -2
  133. package/lib/parse/__tests__/parsePageFromString.js +3 -3
  134. package/lib/parse/__tests__/parseReadme.js +5 -5
  135. package/lib/parse/__tests__/parseSummary.js +4 -4
  136. package/lib/parse/lookupStructureFile.js +1 -1
  137. package/lib/parse/parseBook.js +3 -3
  138. package/lib/parse/parseConfig.js +2 -2
  139. package/lib/parse/parseGlossary.js +1 -1
  140. package/lib/parse/parseIgnore.js +1 -1
  141. package/lib/parse/parseLanguages.js +1 -1
  142. package/lib/parse/parsePage.js +1 -1
  143. package/lib/parse/parsePageFromString.js +2 -2
  144. package/lib/parse/parsePagesList.js +2 -2
  145. package/lib/parse/parseReadme.js +1 -1
  146. package/lib/parse/parseStructureFile.js +1 -1
  147. package/lib/parse/parseSummary.js +1 -1
  148. package/lib/parse/validateConfig.js +2 -2
  149. package/lib/parse/walkSummary.js +1 -1
  150. package/lib/plugins/PluginResolver.js +5 -5
  151. package/lib/plugins/__tests__/listDependencies.js +6 -6
  152. package/lib/plugins/__tests__/sortDependencies.js +4 -4
  153. package/lib/plugins/__tests__/validatePlugin.js +3 -3
  154. package/lib/plugins/listDependencies.js +1 -1
  155. package/lib/plugins/listDepsForBook.js +1 -1
  156. package/lib/plugins/listResources.js +0 -3
  157. package/lib/plugins/loadForBook.js +2 -2
  158. package/lib/plugins/loadPlugin.js +2 -2
  159. package/lib/plugins/validateConfig.js +2 -2
  160. package/lib/plugins/validatePlugin.js +1 -1
  161. package/lib/templating/__tests__/conrefsLoader.js +11 -8
  162. package/lib/templating/__tests__/postRender.js +4 -4
  163. package/lib/templating/__tests__/replaceShortcuts.js +2 -2
  164. package/lib/templating/conrefsLoader.js +1 -1
  165. package/lib/templating/render.js +1 -1
  166. package/lib/templating/renderFile.js +2 -2
  167. package/lib/templating/replaceShortcuts.js +2 -2
  168. package/lib/templating/themesLoader.js +1 -1
  169. package/lib/utils/command.js +1 -33
  170. package/lib/utils/error.js +10 -10
  171. package/lib/utils/fs.js +6 -6
  172. package/lib/utils/git.js +4 -4
  173. package/lib/utils/promise.js +6 -6
  174. package/package.json +9 -8
  175. package/CHANGELOG.md +0 -448
  176. package/lib/plugins/__tests__/findInstalled.js +0 -25
  177. package/lib/plugins/findInstalled.js +0 -87
package/CHANGELOG.md DELETED
@@ -1,448 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # 3.7.0 (2021-04-14)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * **honkit:** call "page" and "page:before" if honkit has the cache ([3742225](https://github.com/honkit/honkit/commit/374222514c41d6164ca1c1804f4c18169c466daa))
12
- * **honkit:** fix --reload options ([bb5149f](https://github.com/honkit/honkit/commit/bb5149f6cb1a13459aca5f646eada8faa08ecf07)), closes [#59](https://github.com/honkit/honkit/issues/59)
13
- * **honkit:** fix empty publish ([92aabd6](https://github.com/honkit/honkit/commit/92aabd68063b3d5079665e5d863b433e13613548))
14
- * **honkit:** fix next/prev button on anchor article ([#110](https://github.com/honkit/honkit/issues/110)) ([fc54b71](https://github.com/honkit/honkit/commit/fc54b71221cf209ffd5916383aafb948741f13fd))
15
- * **honkit:** fix to load @scope/honkit-plugin-name ([#69](https://github.com/honkit/honkit/issues/69)) ([5c93524](https://github.com/honkit/honkit/commit/5c9352452fb3c15347d91c9fc30ad1d54e9fafc3))
16
- * **honkit:** replace gitbook-plugin-highlight with @honkit/honkit-plugin-highlight ([6e322b7](https://github.com/honkit/honkit/commit/6e322b7b17583502ea72d359ed604af48777bb9c))
17
- * **honkit:** return if src is null or undefined in resolveImages ([#103](https://github.com/honkit/honkit/issues/103)) ([bedbf56](https://github.com/honkit/honkit/commit/bedbf565b885e03c74e7a7f4ee419f437f3c1622))
18
- * **honkit:** update snapshots ([c52d598](https://github.com/honkit/honkit/commit/c52d598fa5fdf3ae311f290abb3148d08e0c47fd))
19
- * **honkit:** use @honkit/markdown-legacy instead of @honkit/markdown ([e8549d5](https://github.com/honkit/honkit/commit/e8549d573603becc9f145a7c9cef5fd4ff013262))
20
- * add prepublish script ([810fcc7](https://github.com/honkit/honkit/commit/810fcc7f45f3b1ab8d9527e8738f9861fdbe2c31))
21
- * **honkit:** use ^ semver for deps ([#185](https://github.com/honkit/honkit/issues/185)) ([f0d1ef9](https://github.com/honkit/honkit/commit/f0d1ef94f2ad5ba3b898a62212f47d4a2e23d9e3))
22
- * **honkit:** use require for avoiding copy package.json ([50e8e4c](https://github.com/honkit/honkit/commit/50e8e4c0855dd1784912ebd59915f30f5cdc7dc4))
23
- * **honkit/theme-default:** fix first scroll position ([4fb9cd3](https://github.com/honkit/honkit/commit/4fb9cd361d0ae3b40394b632050d77f248ca051d))
24
- * **hontkit:** update to urijs@^1.19.6 ([ff00810](https://github.com/honkit/honkit/commit/ff00810e98df735b8f3b11eda89476037c9797a9))
25
- * **markdown-legacy:** fix new line encoding on Windows ([a5fa2fb](https://github.com/honkit/honkit/commit/a5fa2fbda1e5b725eaace2c17d396185e767a7b3))
26
- * **theme-default:** add .honkit-cloak ([77feada](https://github.com/honkit/honkit/commit/77feada7106e73a120e5ebd8c23f8546812fff9d))
27
- * **theme-default:** fix blank page on mobile ([6401745](https://github.com/honkit/honkit/commit/64017459d94a6ebf04635b5f1b544bc939014e21))
28
- * **theme-default:** remove unnecessary meta tag ([#173](https://github.com/honkit/honkit/issues/173)) ([220031c](https://github.com/honkit/honkit/commit/220031ccff3a90ee47980a17ca332de0623531a6))
29
-
30
-
31
- ### Features
32
-
33
- * **cli:** --version option ([#79](https://github.com/honkit/honkit/issues/79)) ([d68beaf](https://github.com/honkit/honkit/commit/d68beafd9f247e73c9d9ceb52bb40b1ef797a447))
34
- * **ebook:** embed PDF fonts ([#62](https://github.com/honkit/honkit/issues/62)) ([fce5b18](https://github.com/honkit/honkit/commit/fce5b1890ff9e54052f81c23f3b9678ce97c7fee))
35
- * **honkit:** Add publisher, producer, series, and author sort config options ([#108](https://github.com/honkit/honkit/issues/108)) ([fd7b05b](https://github.com/honkit/honkit/commit/fd7b05b6459885379962b00000bf6825bde3c1d2)), closes [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107)
36
-
37
-
38
-
39
-
40
-
41
- ## [3.6.19](https://github.com/honkit/honkit/compare/v3.6.18...v3.6.19) (2021-03-27)
42
-
43
- **Note:** Version bump only for package honkit
44
-
45
-
46
-
47
-
48
-
49
- ## [3.6.18](https://github.com/honkit/honkit/compare/v3.6.17...v3.6.18) (2021-03-27)
50
-
51
- **Note:** Version bump only for package honkit
52
-
53
-
54
-
55
-
56
-
57
- ## [3.6.17](https://github.com/honkit/honkit/compare/v3.6.16...v3.6.17) (2021-02-15)
58
-
59
-
60
- ### Bug Fixes
61
-
62
- * **honkit:** use ^ semver for deps ([#185](https://github.com/honkit/honkit/issues/185)) ([f0d1ef9](https://github.com/honkit/honkit/commit/f0d1ef94f2ad5ba3b898a62212f47d4a2e23d9e3))
63
- * **hontkit:** update to urijs@^1.19.6 ([ff00810](https://github.com/honkit/honkit/commit/ff00810e98df735b8f3b11eda89476037c9797a9))
64
-
65
-
66
-
67
-
68
-
69
- ## 3.6.16 (2020-12-15)
70
-
71
- **Note:** Version bump only for package honkit
72
-
73
-
74
-
75
-
76
-
77
- ## 3.6.15 (2020-12-05)
78
-
79
- **Note:** Version bump only for package honkit
80
-
81
-
82
-
83
-
84
-
85
- ## 3.6.14 (2020-11-29)
86
-
87
- **Note:** Version bump only for package honkit
88
-
89
-
90
-
91
-
92
-
93
- ## 3.6.13 (2020-11-17)
94
-
95
-
96
- ### Bug Fixes
97
-
98
- * **honkit:** browser print layout in default theme ([#159](https://github.com/honkit/honkit/issues/159)) ([672cb9c](https://github.com/honkit/honkit/commit/672cb9c92f90dd154793b7a36d4dbf2654e7aec4))
99
-
100
-
101
-
102
-
103
-
104
- ## 3.6.12 (2020-11-13)
105
-
106
- **Note:** Version bump only for package honkit
107
-
108
-
109
-
110
-
111
-
112
- ## [3.6.11](https://github.com/honkit/honkit/compare/v3.6.10...v3.6.11) (2020-11-10)
113
-
114
- **Note:** Version bump only for package honkit
115
-
116
-
117
-
118
-
119
-
120
- ## [3.6.10](https://github.com/honkit/honkit/compare/v3.6.8...v3.6.10) (2020-11-10)
121
-
122
-
123
- ### Bug Fixes
124
-
125
- * **honkit/theme-default:** fix first scroll position ([4fb9cd3](https://github.com/honkit/honkit/commit/4fb9cd361d0ae3b40394b632050d77f248ca051d))
126
- * **theme-default:** add .honkit-cloak ([77feada](https://github.com/honkit/honkit/commit/77feada7106e73a120e5ebd8c23f8546812fff9d))
127
- * **theme-default:** fix blank page on mobile ([6401745](https://github.com/honkit/honkit/commit/64017459d94a6ebf04635b5f1b544bc939014e21))
128
-
129
-
130
-
131
-
132
-
133
- ## [3.6.9](https://github.com/honkit/honkit/compare/v3.6.8...v3.6.9) (2020-11-10)
134
-
135
-
136
- ### Bug Fixes
137
-
138
- * **honkit/theme-default:** fix first scroll position ([4fb9cd3](https://github.com/honkit/honkit/commit/4fb9cd361d0ae3b40394b632050d77f248ca051d))
139
- * **theme-default:** add .honkit-cloak ([77feada](https://github.com/honkit/honkit/commit/77feada7106e73a120e5ebd8c23f8546812fff9d))
140
-
141
-
142
-
143
-
144
-
145
- ## [3.6.8](https://github.com/honkit/honkit/compare/v3.6.6...v3.6.8) (2020-10-22)
146
-
147
-
148
- ### Bug Fixes
149
-
150
- * **honkit:** call "page" and "page:before" if honkit has the cache ([3742225](https://github.com/honkit/honkit/commit/374222514c41d6164ca1c1804f4c18169c466daa))
151
-
152
-
153
-
154
-
155
-
156
- ## [3.6.7](https://github.com/honkit/honkit/compare/v3.6.6...v3.6.7) (2020-10-22)
157
-
158
-
159
- ### Bug Fixes
160
-
161
- * **honkit:** call "page" and "page:before" if honkit has the cache ([3742225](https://github.com/honkit/honkit/commit/374222514c41d6164ca1c1804f4c18169c466daa))
162
-
163
-
164
-
165
-
166
-
167
- ## [3.6.6](https://github.com/honkit/honkit/compare/v3.6.5...v3.6.6) (2020-09-05)
168
-
169
- **Note:** Version bump only for package honkit
170
-
171
-
172
-
173
-
174
-
175
- ## [3.6.5](https://github.com/honkit/honkit/compare/v3.6.4...v3.6.5) (2020-08-31)
176
-
177
-
178
- ### Bug Fixes
179
-
180
- * **honkit:** fix empty publish ([92aabd6](https://github.com/honkit/honkit/commit/92aabd68063b3d5079665e5d863b433e13613548))
181
-
182
-
183
-
184
-
185
-
186
- ## [3.6.4](https://github.com/honkit/honkit/compare/v3.6.3...v3.6.4) (2020-08-31)
187
-
188
- **Note:** Version bump only for package honkit
189
-
190
-
191
-
192
-
193
-
194
- ## [3.6.3](https://github.com/honkit/honkit/compare/v3.6.1...v3.6.3) (2020-08-31)
195
-
196
- **Note:** Version bump only for package honkit
197
-
198
-
199
-
200
-
201
-
202
- ## [3.6.2](https://github.com/honkit/honkit/compare/v3.6.1...v3.6.2) (2020-08-31)
203
-
204
- **Note:** Version bump only for package honkit
205
-
206
-
207
-
208
-
209
-
210
- ## [3.6.1](https://github.com/honkit/honkit/compare/v3.6.0...v3.6.1) (2020-08-15)
211
-
212
-
213
- ### Bug Fixes
214
-
215
- * **honkit:** fix next/prev button on anchor article ([#110](https://github.com/honkit/honkit/issues/110)) ([fc54b71](https://github.com/honkit/honkit/commit/fc54b71221cf209ffd5916383aafb948741f13fd))
216
-
217
-
218
-
219
-
220
-
221
- # [3.6.0](https://github.com/honkit/honkit/compare/v3.5.5...v3.6.0) (2020-08-06)
222
-
223
-
224
- ### Features
225
-
226
- * **honkit:** Add publisher, producer, series, and author sort config options ([#108](https://github.com/honkit/honkit/issues/108)) ([fd7b05b](https://github.com/honkit/honkit/commit/fd7b05b6459885379962b00000bf6825bde3c1d2)), closes [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107) [#107](https://github.com/honkit/honkit/issues/107)
227
-
228
-
229
-
230
-
231
-
232
- ## [3.5.5](https://github.com/honkit/honkit/compare/v3.5.4...v3.5.5) (2020-08-02)
233
-
234
- **Note:** Version bump only for package honkit
235
-
236
-
237
-
238
-
239
-
240
- ## [3.5.4](https://github.com/honkit/honkit/compare/v3.5.3...v3.5.4) (2020-08-01)
241
-
242
-
243
- ### Bug Fixes
244
-
245
- * add prepublish script ([810fcc7](https://github.com/honkit/honkit/commit/810fcc7f45f3b1ab8d9527e8738f9861fdbe2c31))
246
-
247
-
248
-
249
-
250
-
251
- ## [3.5.3](https://github.com/honkit/honkit/compare/v3.5.2...v3.5.3) (2020-07-31)
252
-
253
-
254
- ### Bug Fixes
255
-
256
- * **honkit:** return if src is null or undefined in resolveImages ([#103](https://github.com/honkit/honkit/issues/103)) ([bedbf56](https://github.com/honkit/honkit/commit/bedbf565b885e03c74e7a7f4ee419f437f3c1622))
257
-
258
-
259
-
260
-
261
-
262
- ## [3.5.2](https://github.com/honkit/honkit/compare/v3.5.1...v3.5.2) (2020-07-05)
263
-
264
- **Note:** Version bump only for package honkit
265
-
266
-
267
-
268
-
269
-
270
- ## [3.5.1](https://github.com/honkit/honkit/compare/v3.5.0...v3.5.1) (2020-07-04)
271
-
272
-
273
- ### Bug Fixes
274
-
275
- * **honkit:** use @honkit/markdown-legacy instead of @honkit/markdown ([e8549d5](https://github.com/honkit/honkit/commit/e8549d573603becc9f145a7c9cef5fd4ff013262))
276
- * **markdown-legacy:** fix new line encoding on Windows ([a5fa2fb](https://github.com/honkit/honkit/commit/a5fa2fbda1e5b725eaace2c17d396185e767a7b3))
277
-
278
-
279
-
280
-
281
-
282
- # [3.5.0](https://github.com/honkit/honkit/compare/v3.4.1...v3.5.0) (2020-07-02)
283
-
284
-
285
- ### Features
286
-
287
- * **cli:** --version option ([#79](https://github.com/honkit/honkit/issues/79)) ([d68beaf](https://github.com/honkit/honkit/commit/d68beafd9f247e73c9d9ceb52bb40b1ef797a447))
288
-
289
-
290
-
291
-
292
-
293
- ## [3.4.1](https://github.com/honkit/honkit/compare/v3.4.0...v3.4.1) (2020-06-29)
294
-
295
-
296
- ### Bug Fixes
297
-
298
- * **honkit:** fix to load @scope/honkit-plugin-name ([#69](https://github.com/honkit/honkit/issues/69)) ([5c93524](https://github.com/honkit/honkit/commit/5c9352452fb3c15347d91c9fc30ad1d54e9fafc3))
299
-
300
-
301
-
302
-
303
-
304
- # [3.4.0](https://github.com/honkit/honkit/compare/v3.3.11...v3.4.0) (2020-06-27)
305
-
306
-
307
- ### Features
308
-
309
- * **ebook:** embed PDF fonts ([#62](https://github.com/honkit/honkit/issues/62)) ([fce5b18](https://github.com/honkit/honkit/commit/fce5b1890ff9e54052f81c23f3b9678ce97c7fee))
310
-
311
-
312
-
313
-
314
-
315
- ## [3.3.11](https://github.com/honkit/honkit/compare/v3.3.10...v3.3.11) (2020-06-27)
316
-
317
-
318
- ### Bug Fixes
319
-
320
- * **honkit:** fix --reload options ([bb5149f](https://github.com/honkit/honkit/commit/bb5149f6cb1a13459aca5f646eada8faa08ecf07)), closes [#59](https://github.com/honkit/honkit/issues/59)
321
-
322
-
323
-
324
-
325
-
326
- ## [3.3.10](https://github.com/honkit/honkit/compare/v3.3.9...v3.3.10) (2020-06-20)
327
-
328
-
329
- ### Bug Fixes
330
-
331
- * **honkit:** relax "gitbook" engine version check ([d3850a9](https://github.com/honkit/honkit/commit/d3850a9f21f7a01bf39b0ba94101629b69d376e8))
332
-
333
-
334
-
335
-
336
-
337
- ## [3.3.9](https://github.com/honkit/honkit/compare/v3.3.8...v3.3.9) (2020-06-18)
338
-
339
- **Note:** Version bump only for package honkit
340
-
341
-
342
-
343
-
344
-
345
- ## [3.3.8](https://github.com/honkit/honkit/compare/v3.3.7...v3.3.8) (2020-06-18)
346
-
347
- **Note:** Version bump only for package honkit
348
-
349
-
350
-
351
-
352
-
353
- ## [3.3.7](https://github.com/honkit/honkit/compare/v3.3.6...v3.3.7) (2020-06-18)
354
-
355
- **Note:** Version bump only for package honkit
356
-
357
-
358
-
359
-
360
-
361
- ## [3.3.6](https://github.com/honkit/honkit/compare/v3.3.5...v3.3.6) (2020-06-18)
362
-
363
- **Note:** Version bump only for package honkit
364
-
365
-
366
-
367
-
368
-
369
- ## [3.3.5](https://github.com/honkit/honkit/compare/v3.3.4...v3.3.5) (2020-06-18)
370
-
371
- **Note:** Version bump only for package honkit
372
-
373
-
374
-
375
-
376
-
377
- ## [3.3.4](https://github.com/honkit/honkit/compare/v3.3.3...v3.3.4) (2020-06-17)
378
-
379
-
380
- ### Bug Fixes
381
-
382
- * **honkit:** disable confirm on copyDir ([008d66f](https://github.com/honkit/honkit/commit/008d66f29b5488a37b456a4ba6bc426c9ff23a94))
383
- * **honkit:** ignore symlink ([662028a](https://github.com/honkit/honkit/commit/662028a696f962d306da58ee71a8e8bcb61f5287))
384
- * **honkit:** use Buffer.from instead of Buffer constructor ([1d4fe84](https://github.com/honkit/honkit/commit/1d4fe848a80c2bbe052ea5e847cb07529d5087e5)), closes [#26](https://github.com/honkit/honkit/issues/26)
385
- * **honkit:** use lstat instead of stat ([bbe0e41](https://github.com/honkit/honkit/commit/bbe0e410032a2c17d1596f29db65154a6626788c))
386
-
387
-
388
-
389
-
390
-
391
- ## [3.3.3](https://github.com/honkit/honkit/compare/v3.3.2...v3.3.3) (2020-06-16)
392
-
393
- **Note:** Version bump only for package honkit
394
-
395
-
396
-
397
-
398
-
399
- ## [3.3.2](https://github.com/honkit/honkit/compare/v3.3.1...v3.3.2) (2020-06-16)
400
-
401
-
402
- ### Bug Fixes
403
-
404
- * **honkit:** / is os specific ([2e28891](https://github.com/honkit/honkit/commit/2e288917eff1eecaa6f8034361e3ef1fa5f55293))
405
- * **honkit:** support @honkit/honkit-plugin-theme-default as special ([2adca8d](https://github.com/honkit/honkit/commit/2adca8daa70f1731846672160646ca5a74794bc0))
406
- * **honkit:** validatePlugin ([8a03bcb](https://github.com/honkit/honkit/commit/8a03bcb4e96c3b754e8460e46997447e413bcad6))
407
-
408
-
409
- ### Performance Improvements
410
-
411
- * **honkit:** refactor plugin loading ([3e0d841](https://github.com/honkit/honkit/commit/3e0d84133cc8770a2664ddc4f5647fab707a36e0))
412
-
413
-
414
-
415
-
416
-
417
- ## [3.3.1](https://github.com/honkit/honkit/compare/v3.3.0...v3.3.1) (2020-06-15)
418
-
419
-
420
- ### Bug Fixes
421
-
422
- * **markdown:** fix markdown parser ([2a1d670](https://github.com/honkit/honkit/commit/2a1d6705521da848233b3518b5adab871a8dc5fb))
423
-
424
-
425
-
426
-
427
-
428
- # 3.3.0 (2020-06-14)
429
-
430
-
431
- ### Bug Fixes
432
-
433
- * remove unused var ([b23b372](https://github.com/honkit/honkit/commit/b23b3728a204323129e57593665f6542dade9a03))
434
- * **fs:** no use util ([2a9b299](https://github.com/honkit/honkit/commit/2a9b2993358978b1a419cb1cc12c568fb01bf779))
435
- * **generate:** Promise.all should handle array ([7e59857](https://github.com/honkit/honkit/commit/7e598574fbf295b93c4d971ac583ed4b937a36a5))
436
- * remove install, <type> ([fffe2d8](https://github.com/honkit/honkit/commit/fffe2d8043f90eacd68e65d01584270c3ec1ce80))
437
-
438
-
439
- ### Features
440
-
441
- * **serve:** support incremental build ([88937fd](https://github.com/honkit/honkit/commit/88937fd47c62d0c05a038b07aae95496ba59730a))
442
-
443
-
444
- ### Performance Improvements
445
-
446
- * **build:** add cache ([9b1eac6](https://github.com/honkit/honkit/commit/9b1eac6205f5e6479fd1f9f6b33a2674415468d2))
447
- * memorize getArticleByPath ([4cb1a1c](https://github.com/honkit/honkit/commit/4cb1a1c17bc99d3ab325b88b23da42b4e1e79df9))
448
- * use Promise.all on building ([b3e61f5](https://github.com/honkit/honkit/commit/b3e61f5bcbdb1585375016cf65e99702b522be27))
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = __importDefault(require("path"));
7
- const immutable_1 = __importDefault(require("immutable"));
8
- const findInstalled_1 = __importDefault(require("../findInstalled"));
9
- describe("findInstalled", () => {
10
- test.skip("must list default plugins for gitbook directory", () => {
11
- // Read gitbook-plugins from package.json
12
- const pkg = require(path_1.default.resolve(__dirname, "../../../package.json"));
13
- const gitbookPlugins = immutable_1.default.Seq(pkg.dependencies)
14
- .filter((v, k) => {
15
- return k.indexOf("gitbook-plugin") === 0;
16
- })
17
- // @ts-expect-error
18
- .cacheResult();
19
- return findInstalled_1.default(path_1.default.resolve(__dirname, "../../../")).then((plugins) => {
20
- expect(plugins.size >= gitbookPlugins.size).toBeTruthy();
21
- expect(plugins.has("fontsettings")).toBe(true);
22
- expect(plugins.has("search")).toBe(true);
23
- });
24
- });
25
- });
@@ -1,87 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const read_installed_1 = __importDefault(require("read-installed"));
7
- const immutable_1 = __importDefault(require("immutable"));
8
- const path_1 = __importDefault(require("path"));
9
- const promise_1 = __importDefault(require("../utils/promise"));
10
- const fs_1 = __importDefault(require("../utils/fs"));
11
- const plugin_1 = __importDefault(require("../models/plugin"));
12
- const pluginPrefix_1 = __importDefault(require("../constants/pluginPrefix"));
13
- /**
14
- * Validate if a package name is a GitBook/HonKit plugin
15
- *
16
- * @return {boolean}
17
- */
18
- function validateId(name) {
19
- return name && name.indexOf(pluginPrefix_1.default) === 0;
20
- }
21
- /**
22
- * List all packages installed inside a folder
23
- *
24
- * @param {string} folder
25
- * @return {OrderedMap<String:Plugin>}
26
- */
27
- function findInstalled(folder) {
28
- const options = {
29
- dev: false,
30
- log: function () { },
31
- depth: 4,
32
- };
33
- let results = immutable_1.default.OrderedMap();
34
- function onPackage(pkg, parent) {
35
- if (!pkg.name)
36
- return;
37
- const name = pkg.name;
38
- const version = pkg.version;
39
- const pkgPath = pkg.realPath;
40
- const depth = pkg.depth;
41
- const dependencies = pkg.dependencies;
42
- const pluginName = name.slice(pluginPrefix_1.default.length);
43
- if (!validateId(name)) {
44
- if (parent)
45
- return;
46
- }
47
- else {
48
- results = results.set(pluginName, new plugin_1.default({
49
- name: pluginName,
50
- version: version,
51
- path: pkgPath,
52
- depth: depth,
53
- parent: parent,
54
- }));
55
- }
56
- immutable_1.default.Map(dependencies).forEach((dep) => {
57
- onPackage(dep, pluginName);
58
- });
59
- }
60
- // Search for gitbook-plugins in node_modules folder
61
- const node_modules = path_1.default.join(folder, "node_modules");
62
- // List all folders in node_modules
63
- return fs_1.default
64
- .readdir(node_modules)
65
- .fail(() => {
66
- return promise_1.default([]);
67
- })
68
- .then((modules) => {
69
- return promise_1.default.serie(modules, (module) => {
70
- // Not a gitbook-plugin
71
- if (!validateId(module)) {
72
- return promise_1.default();
73
- }
74
- // Read gitbook-plugin package details
75
- const module_folder = path_1.default.join(node_modules, module);
76
- return promise_1.default.nfcall(read_installed_1.default, module_folder, options).then((data) => {
77
- // @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
78
- onPackage(data);
79
- });
80
- });
81
- })
82
- .then(() => {
83
- // Return installed plugins
84
- return results;
85
- });
86
- }
87
- exports.default = findInstalled;