@techdocs/cli 1.1.3 → 1.2.0-next.2

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 (267) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/{PublisherConfig-7a0dc71c.cjs.js → PublisherConfig-0ea58467.cjs.js} +9 -3
  3. package/dist/cjs/{PublisherConfig-7a0dc71c.cjs.js.map → PublisherConfig-0ea58467.cjs.js.map} +1 -1
  4. package/dist/cjs/{generate-e530be0d.cjs.js → generate-b897bd89.cjs.js} +5 -3
  5. package/dist/cjs/{generate-e530be0d.cjs.js.map → generate-b897bd89.cjs.js.map} +1 -1
  6. package/dist/cjs/{migrate-122ec4bf.cjs.js → migrate-62035c68.cjs.js} +6 -4
  7. package/dist/cjs/{migrate-122ec4bf.cjs.js.map → migrate-62035c68.cjs.js.map} +1 -1
  8. package/dist/cjs/{mkdocs-3c3898e8.cjs.js → mkdocs-1501e940.cjs.js} +4 -3
  9. package/dist/cjs/{mkdocs-3c3898e8.cjs.js.map → mkdocs-1501e940.cjs.js.map} +1 -1
  10. package/dist/cjs/{mkdocsServer-0af6527d.cjs.js → mkdocsServer-99ec8af2.cjs.js} +31 -24
  11. package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -0
  12. package/dist/cjs/{publish-efa348a5.cjs.js → publish-af5607e2.cjs.js} +3 -3
  13. package/dist/cjs/{publish-efa348a5.cjs.js.map → publish-af5607e2.cjs.js.map} +1 -1
  14. package/dist/cjs/{serve-48337ec4.cjs.js → serve-176119a3.cjs.js} +48 -31
  15. package/dist/cjs/{serve-48337ec4.cjs.js.map → serve-176119a3.cjs.js.map} +1 -1
  16. package/dist/cjs/{utility-51f4a306.cjs.js → utility-647ad232.cjs.js} +4 -2
  17. package/dist/cjs/{utility-51f4a306.cjs.js.map → utility-647ad232.cjs.js.map} +1 -1
  18. package/dist/embedded-app/.config-schema.json +10 -0
  19. package/dist/embedded-app/index.html +1 -1
  20. package/dist/embedded-app/static/1553.c2a9eb50.chunk.js.map +1 -1
  21. package/dist/embedded-app/static/2426.32fc1ca1.chunk.js.map +1 -1
  22. package/dist/embedded-app/static/{3555.4d83af5a.chunk.js → 3555.f3a9371e.chunk.js} +1 -1
  23. package/dist/embedded-app/static/3555.f3a9371e.chunk.js.map +1 -0
  24. package/dist/embedded-app/static/390.74a27040.chunk.js.map +1 -1
  25. package/dist/embedded-app/static/4022.ca590614.chunk.js.map +1 -1
  26. package/dist/embedded-app/static/4949.bffcfed7.chunk.js.map +1 -1
  27. package/dist/embedded-app/static/5162.95e4bb5d.chunk.js +3 -0
  28. package/dist/embedded-app/static/5162.95e4bb5d.chunk.js.map +1 -0
  29. package/dist/embedded-app/static/6235.61c00d19.chunk.js.map +1 -1
  30. package/dist/embedded-app/static/{6583.0b42ebbe.chunk.js → 6583.492e5219.chunk.js} +1 -1
  31. package/dist/embedded-app/static/6583.492e5219.chunk.js.map +1 -0
  32. package/dist/embedded-app/static/{7110.135c2721.chunk.js → 7110.766c71fc.chunk.js} +1 -1
  33. package/dist/embedded-app/static/7110.766c71fc.chunk.js.map +1 -0
  34. package/dist/embedded-app/static/8061.f5e20bb7.chunk.js.map +1 -1
  35. package/dist/embedded-app/static/{8718.bd799167.chunk.js → 8718.2becf372.chunk.js} +1 -1
  36. package/dist/embedded-app/static/8718.2becf372.chunk.js.map +1 -0
  37. package/dist/embedded-app/static/8792.6f60e67c.chunk.js.map +1 -1
  38. package/dist/embedded-app/static/9028.1e31ab6a.chunk.js.map +1 -1
  39. package/dist/embedded-app/static/main.1f269f7a.js +492 -0
  40. package/dist/embedded-app/static/main.1f269f7a.js.map +1 -0
  41. package/dist/embedded-app/static/module-ajv.f2ae340e.js.map +1 -1
  42. package/dist/embedded-app/static/module-date-fns.667c4862.js.map +1 -1
  43. package/dist/embedded-app/static/module-hot-loader.baa19dda.js.map +1 -1
  44. package/dist/embedded-app/static/module-jss.df150ef8.js.map +1 -1
  45. package/dist/embedded-app/static/module-lodash.32f2edbb.js.map +1 -1
  46. package/dist/embedded-app/static/module-luxon.ee0def5d.js.map +1 -1
  47. package/dist/embedded-app/static/module-material-table.cd3af251.js.map +1 -1
  48. package/dist/embedded-app/static/module-material-ui.cd8dff4a.js.map +1 -1
  49. package/dist/embedded-app/static/module-react-beautiful-dnd.6085a9b0.js.map +1 -1
  50. package/dist/embedded-app/static/{module-yaml.0874c6f8.js → module-yaml.cef9da5e.js} +2 -2
  51. package/dist/embedded-app/static/module-yaml.cef9da5e.js.map +1 -0
  52. package/dist/embedded-app/static/module-zod.206c7997.js +3 -0
  53. package/dist/embedded-app/static/module-zod.206c7997.js.map +1 -0
  54. package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.6d99819e.chunk.js.map +1 -1
  55. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_abnf.e39098ec.chunk.js.map +1 -1
  56. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_accesslog.f0866c63.chunk.js.map +1 -1
  57. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_actionscript.07a8cb8b.chunk.js.map +1 -1
  58. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ada.cabf0da1.chunk.js.map +1 -1
  59. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_angelscript.a3a8277d.chunk.js.map +1 -1
  60. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_apache.ca80f87c.chunk.js.map +1 -1
  61. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_applescript.135bfeaa.chunk.js.map +1 -1
  62. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arcade.26715cf0.chunk.js.map +1 -1
  63. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_arduino.222eae4d.chunk.js.map +1 -1
  64. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_armasm.36438d34.chunk.js.map +1 -1
  65. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_asciidoc.2f5b7895.chunk.js.map +1 -1
  66. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_aspectj.2b57cc97.chunk.js.map +1 -1
  67. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autohotkey.e3c8bfdd.chunk.js.map +1 -1
  68. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_autoit.147f6883.chunk.js.map +1 -1
  69. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_avrasm.1c4bfd59.chunk.js.map +1 -1
  70. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_awk.ac969aa7.chunk.js.map +1 -1
  71. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_axapta.fd64947c.chunk.js.map +1 -1
  72. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bash.0b9ed769.chunk.js.map +1 -1
  73. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_basic.eccb9aa9.chunk.js.map +1 -1
  74. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_bnf.fe69e953.chunk.js.map +1 -1
  75. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_brainfuck.ee6d6d18.chunk.js.map +1 -1
  76. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_c.3c6326f1.chunk.js.map +1 -1
  77. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cLike.3e97e143.chunk.js.map +1 -1
  78. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cal.4e11b53a.chunk.js.map +1 -1
  79. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_capnproto.85379200.chunk.js.map +1 -1
  80. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ceylon.4a7a71f8.chunk.js.map +1 -1
  81. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clean.387c63bc.chunk.js.map +1 -1
  82. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojure.0dceed35.chunk.js.map +1 -1
  83. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_clojureRepl.9dabb11c.chunk.js.map +1 -1
  84. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cmake.db17d430.chunk.js.map +1 -1
  85. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coffeescript.f6d8e1a0.chunk.js.map +1 -1
  86. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_coq.9042b6b2.chunk.js.map +1 -1
  87. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cos.e50bcc7d.chunk.js.map +1 -1
  88. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_cpp.82d44ead.chunk.js.map +1 -1
  89. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crmsh.d381eca6.chunk.js.map +1 -1
  90. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_crystal.272a9559.chunk.js.map +1 -1
  91. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csharp.d3c472c1.chunk.js.map +1 -1
  92. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_csp.d4ccbf98.chunk.js.map +1 -1
  93. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_css.0a9e5a1c.chunk.js.map +1 -1
  94. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_d.94da0b62.chunk.js.map +1 -1
  95. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dart.3786913e.chunk.js.map +1 -1
  96. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_delphi.94507fa8.chunk.js.map +1 -1
  97. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_diff.c75af221.chunk.js.map +1 -1
  98. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_django.c900f58e.chunk.js.map +1 -1
  99. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dns.1dd8382b.chunk.js.map +1 -1
  100. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dockerfile.a72872c7.chunk.js.map +1 -1
  101. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dos.fa8d03f3.chunk.js.map +1 -1
  102. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dsconfig.c5c47576.chunk.js.map +1 -1
  103. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dts.7b510c64.chunk.js.map +1 -1
  104. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_dust.8c2deb45.chunk.js.map +1 -1
  105. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ebnf.11d9c7cc.chunk.js.map +1 -1
  106. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elixir.3904fcdc.chunk.js.map +1 -1
  107. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_elm.eba0f5f3.chunk.js.map +1 -1
  108. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erb.e8306333.chunk.js.map +1 -1
  109. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlang.bd9dfabc.chunk.js.map +1 -1
  110. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_erlangRepl.81bf896d.chunk.js.map +1 -1
  111. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_excel.11a999a4.chunk.js.map +1 -1
  112. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fix.8fa1382d.chunk.js.map +1 -1
  113. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_flix.f9581318.chunk.js.map +1 -1
  114. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fortran.82f42614.chunk.js.map +1 -1
  115. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_fsharp.1ab23dc7.chunk.js.map +1 -1
  116. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gams.f8848957.chunk.js.map +1 -1
  117. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gauss.dc02450b.chunk.js.map +1 -1
  118. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gcode.2898dc2c.chunk.js.map +1 -1
  119. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gherkin.d1d5658b.chunk.js.map +1 -1
  120. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_glsl.3293da06.chunk.js.map +1 -1
  121. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gml.9e71221f.chunk.js.map +1 -1
  122. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_go.8db77f58.chunk.js.map +1 -1
  123. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_golo.f5a950c4.chunk.js.map +1 -1
  124. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gradle.e2abba03.chunk.js.map +1 -1
  125. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_groovy.b688ce0f.chunk.js.map +1 -1
  126. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haml.7c96773e.chunk.js.map +1 -1
  127. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_handlebars.2b1aa2f3.chunk.js.map +1 -1
  128. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haskell.391c5d81.chunk.js.map +1 -1
  129. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_haxe.c3248588.chunk.js.map +1 -1
  130. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hsp.7c51613c.chunk.js.map +1 -1
  131. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_htmlbars.29ebeff4.chunk.js.map +1 -1
  132. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_http.0d666e71.chunk.js.map +1 -1
  133. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_hy.a7c3ac6d.chunk.js.map +1 -1
  134. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_inform7.8b3a856c.chunk.js.map +1 -1
  135. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ini.ecdd651d.chunk.js.map +1 -1
  136. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_irpf90.fb690b85.chunk.js.map +1 -1
  137. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_isbl.00db46b1.chunk.js.map +1 -1
  138. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_java.9a95a2be.chunk.js.map +1 -1
  139. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_javascript.9dce5c58.chunk.js.map +1 -1
  140. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_jbossCli.5c16ea99.chunk.js.map +1 -1
  141. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_json.15050774.chunk.js.map +1 -1
  142. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_julia.838f4b42.chunk.js.map +1 -1
  143. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_juliaRepl.fe1b93bd.chunk.js.map +1 -1
  144. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_kotlin.e1b0b375.chunk.js.map +1 -1
  145. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lasso.802249c5.chunk.js.map +1 -1
  146. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_latex.bc3d17c7.chunk.js.map +1 -1
  147. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ldif.bbef1e04.chunk.js.map +1 -1
  148. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_leaf.5bd76867.chunk.js.map +1 -1
  149. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_less.7deafe1c.chunk.js.map +1 -1
  150. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lisp.d6ae9322.chunk.js.map +1 -1
  151. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livecodeserver.86c42558.chunk.js.map +1 -1
  152. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_livescript.e488203b.chunk.js.map +1 -1
  153. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_llvm.c255e5d7.chunk.js.map +1 -1
  154. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lsl.6a316349.chunk.js.map +1 -1
  155. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_lua.c95335ca.chunk.js.map +1 -1
  156. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_makefile.f2c5bd60.chunk.js.map +1 -1
  157. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_markdown.6464cedd.chunk.js.map +1 -1
  158. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mathematica.2e443797.chunk.js.map +1 -1
  159. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_matlab.4b560b02.chunk.js.map +1 -1
  160. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_maxima.69619b02.chunk.js.map +1 -1
  161. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mel.9b354734.chunk.js.map +1 -1
  162. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mercury.5613c599.chunk.js.map +1 -1
  163. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mipsasm.7281c70c.chunk.js.map +1 -1
  164. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mizar.d4e16722.chunk.js.map +1 -1
  165. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_mojolicious.dcd5722f.chunk.js.map +1 -1
  166. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_monkey.7ef13093.chunk.js.map +1 -1
  167. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_moonscript.2d227b16.chunk.js.map +1 -1
  168. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_n1ql.dc787036.chunk.js.map +1 -1
  169. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nginx.2c25fa32.chunk.js.map +1 -1
  170. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nim.b7cc093e.chunk.js.map +1 -1
  171. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nix.14ee6a41.chunk.js.map +1 -1
  172. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nodeRepl.e51239c3.chunk.js.map +1 -1
  173. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_nsis.42bd0ec6.chunk.js.map +1 -1
  174. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_objectivec.4d2b6b78.chunk.js.map +1 -1
  175. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ocaml.71bd6857.chunk.js.map +1 -1
  176. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oneC.6e9bd373.chunk.js.map +1 -1
  177. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_openscad.049274c0.chunk.js.map +1 -1
  178. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_oxygene.55cfb5e8.chunk.js.map +1 -1
  179. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_parser3.d2c708be.chunk.js.map +1 -1
  180. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_perl.8c1aa06b.chunk.js.map +1 -1
  181. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pf.0223cc81.chunk.js.map +1 -1
  182. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pgsql.77178bf9.chunk.js.map +1 -1
  183. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_php.bad25c03.chunk.js.map +1 -1
  184. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_phpTemplate.d7121bcf.chunk.js.map +1 -1
  185. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_plaintext.6313f5e4.chunk.js.map +1 -1
  186. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pony.e09a7a8f.chunk.js.map +1 -1
  187. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_powershell.d5b5c33d.chunk.js.map +1 -1
  188. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_processing.65e160b6.chunk.js.map +1 -1
  189. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_profile.f852c59d.chunk.js.map +1 -1
  190. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_prolog.f397de12.chunk.js.map +1 -1
  191. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_properties.fd1db466.chunk.js.map +1 -1
  192. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_protobuf.8ab8a533.chunk.js.map +1 -1
  193. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_puppet.537bb714.chunk.js.map +1 -1
  194. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_purebasic.1d7e0865.chunk.js.map +1 -1
  195. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_python.4824cc5a.chunk.js.map +1 -1
  196. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_pythonRepl.ae681e7d.chunk.js.map +1 -1
  197. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_q.35cb97bc.chunk.js.map +1 -1
  198. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_qml.2cbe5345.chunk.js.map +1 -1
  199. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_r.7b8f8566.chunk.js.map +1 -1
  200. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_reasonml.740d48de.chunk.js.map +1 -1
  201. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rib.28f71cc9.chunk.js.map +1 -1
  202. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_roboconf.a3dfe5d0.chunk.js.map +1 -1
  203. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_routeros.b3d0aad6.chunk.js.map +1 -1
  204. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rsl.27f27574.chunk.js.map +1 -1
  205. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruby.45e641c6.chunk.js.map +1 -1
  206. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_ruleslanguage.cb817a76.chunk.js.map +1 -1
  207. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_rust.f82df236.chunk.js.map +1 -1
  208. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sas.111d6691.chunk.js.map +1 -1
  209. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scala.d6161773.chunk.js.map +1 -1
  210. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scheme.df9e0798.chunk.js.map +1 -1
  211. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scilab.0f5a4588.chunk.js.map +1 -1
  212. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_scss.98065d4c.chunk.js.map +1 -1
  213. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_shell.1528656a.chunk.js.map +1 -1
  214. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smali.3bf7bbf8.chunk.js.map +1 -1
  215. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_smalltalk.79718255.chunk.js.map +1 -1
  216. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sml.ff9a0389.chunk.js.map +1 -1
  217. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqf.7cf62869.chunk.js.map +1 -1
  218. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sql.80fd4019.chunk.js.map +1 -1
  219. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_sqlMore.3f7789bb.chunk.js.map +1 -1
  220. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stan.262d2dee.chunk.js.map +1 -1
  221. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stata.87f07d4d.chunk.js.map +1 -1
  222. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_step21.db98e52e.chunk.js.map +1 -1
  223. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_stylus.406058a9.chunk.js.map +1 -1
  224. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_subunit.ce1af113.chunk.js.map +1 -1
  225. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_swift.f2a2cdba.chunk.js.map +1 -1
  226. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_taggerscript.f4bc1bb5.chunk.js.map +1 -1
  227. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tap.367ea734.chunk.js.map +1 -1
  228. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tcl.802ccc02.chunk.js.map +1 -1
  229. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_thrift.10b7ec1d.chunk.js.map +1 -1
  230. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_tp.3646c41b.chunk.js.map +1 -1
  231. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_twig.f866e314.chunk.js.map +1 -1
  232. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_typescript.e4681d1d.chunk.js.map +1 -1
  233. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vala.4f6422d1.chunk.js.map +1 -1
  234. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbnet.dec3a738.chunk.js.map +1 -1
  235. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscript.612b911b.chunk.js.map +1 -1
  236. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vbscriptHtml.3c097556.chunk.js.map +1 -1
  237. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_verilog.914ae836.chunk.js.map +1 -1
  238. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vhdl.6f7c3028.chunk.js.map +1 -1
  239. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_vim.a3a567f0.chunk.js.map +1 -1
  240. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_x86asm.ac1eeb4d.chunk.js.map +1 -1
  241. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xl.dec26abf.chunk.js.map +1 -1
  242. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xml.befe59df.chunk.js.map +1 -1
  243. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_xquery.73a992c2.chunk.js.map +1 -1
  244. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_yaml.031487c1.chunk.js.map +1 -1
  245. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_zephir.14d469e9.chunk.js.map +1 -1
  246. package/dist/embedded-app/static/{runtime.a9307e40.js → runtime.1f269f7a.js} +2 -2
  247. package/dist/embedded-app/static/runtime.1f269f7a.js.map +1 -0
  248. package/dist/embedded-app/static/vendor.1f269f7a.js +102 -0
  249. package/dist/embedded-app/static/vendor.1f269f7a.js.map +1 -0
  250. package/dist/index.cjs.js +158 -6
  251. package/dist/index.cjs.js.map +1 -1
  252. package/package.json +6 -6
  253. package/dist/cjs/mkdocsServer-0af6527d.cjs.js.map +0 -1
  254. package/dist/embedded-app/static/3555.4d83af5a.chunk.js.map +0 -1
  255. package/dist/embedded-app/static/6583.0b42ebbe.chunk.js.map +0 -1
  256. package/dist/embedded-app/static/7110.135c2721.chunk.js.map +0 -1
  257. package/dist/embedded-app/static/7758.75aef2ae.chunk.js +0 -3
  258. package/dist/embedded-app/static/7758.75aef2ae.chunk.js.map +0 -1
  259. package/dist/embedded-app/static/8718.bd799167.chunk.js.map +0 -1
  260. package/dist/embedded-app/static/main.a9307e40.js +0 -487
  261. package/dist/embedded-app/static/main.a9307e40.js.map +0 -1
  262. package/dist/embedded-app/static/module-yaml.0874c6f8.js.map +0 -1
  263. package/dist/embedded-app/static/module-zod.53b5d347.js +0 -3
  264. package/dist/embedded-app/static/module-zod.53b5d347.js.map +0 -1
  265. package/dist/embedded-app/static/runtime.a9307e40.js.map +0 -1
  266. package/dist/embedded-app/static/vendor.a9307e40.js +0 -102
  267. package/dist/embedded-app/static/vendor.a9307e40.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @techdocs/cli
2
2
 
3
+ ## 1.2.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 855952db53: Added CLI option `--docker-option` to allow passing additional options to the `docker run` command executed my `serve` and `serve:mkdocs`.
8
+
9
+ ## 1.1.4-next.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ - @backstage/backend-common@0.15.0-next.1
15
+ - @backstage/plugin-techdocs-node@1.3.0-next.1
16
+
17
+ ## 1.1.4-next.0
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @backstage/backend-common@0.15.0-next.0
23
+ - @backstage/plugin-techdocs-node@1.2.1-next.0
24
+
3
25
  ## 1.1.3
4
26
 
5
27
  ### Patch Changes
@@ -41,7 +41,9 @@ const _PublisherConfig = class {
41
41
  }
42
42
  static getValidAzureConfig(opts) {
43
43
  if (!opts.azureAccountName) {
44
- throw new Error(`azureBlobStorage requires --azureAccountName to be specified`);
44
+ throw new Error(
45
+ `azureBlobStorage requires --azureAccountName to be specified`
46
+ );
45
47
  }
46
48
  return {
47
49
  type: "azureBlobStorage",
@@ -73,7 +75,11 @@ const _PublisherConfig = class {
73
75
  "osSwiftUrl"
74
76
  ].filter((param) => !opts[param]);
75
77
  if (missingParams.length) {
76
- throw new Error(`openStackSwift requires the following params to be specified: ${missingParams.join(", ")}`);
78
+ throw new Error(
79
+ `openStackSwift requires the following params to be specified: ${missingParams.join(
80
+ ", "
81
+ )}`
82
+ );
77
83
  }
78
84
  return {
79
85
  type: "openStackSwift",
@@ -98,4 +104,4 @@ PublisherConfig.configFactories = {
98
104
  };
99
105
 
100
106
  exports.PublisherConfig = PublisherConfig;
101
- //# sourceMappingURL=PublisherConfig-7a0dc71c.cjs.js.map
107
+ //# sourceMappingURL=PublisherConfig-0ea58467.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PublisherConfig-7a0dc71c.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof typeof PublisherConfig['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof typeof PublisherConfig['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credentials: {\n id: opts.osCredentialId,\n secret: opts.osSecret,\n },\n authUrl: opts.osAuthUrl,\n swiftUrl: opts.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;AACA,MAAM,gBAAgB,GAAG,MAAM;AAC/B,EAAE,OAAO,cAAc,CAAC,IAAI,EAAE;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AAI,KAAK,CAAC,CAAC,8DAA8D,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnH,KAAK;AACL,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,gBAAgB;AAC5B,MAAM,cAAc,EAAE;AACtB,QAAQ,aAAa,EAAE,IAAI,CAAC,WAAW;AACvC,QAAQ,WAAW,EAAE;AACrB,UAAU,EAAE,EAAE,IAAI,CAAC,cAAc;AACjC,UAAU,MAAM,EAAE,IAAI,CAAC,QAAQ;AAC/B,SAAS;AACT,QAAQ,OAAO,EAAE,IAAI,CAAC,SAAS;AAC/B,QAAQ,QAAQ,EAAE,IAAI,CAAC,UAAU;AACjC,OAAO;AACP,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;AACQ,IAAC,eAAe,GAAG,iBAAiB;AAC9C,eAAe,CAAC,eAAe,GAAG;AAClC,EAAE,KAAK,EAAE,gBAAgB,CAAC,mBAAmB;AAC7C,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,mBAAmB;AACxD,EAAE,SAAS,EAAE,gBAAgB,CAAC,uBAAuB;AACrD,EAAE,cAAc,EAAE,gBAAgB,CAAC,4BAA4B;AAC/D,CAAC;;;;"}
1
+ {"version":3,"file":"PublisherConfig-0ea58467.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof typeof PublisherConfig['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof typeof PublisherConfig['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credentials: {\n id: opts.osCredentialId,\n secret: opts.osSecret,\n },\n authUrl: opts.osAuthUrl,\n swiftUrl: opts.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;AACA,MAAM,gBAAgB,GAAG,MAAM;AAC/B,EAAE,OAAO,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;AAC7C,IAAI,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE;AAC3D,MAAM,MAAM,IAAI,KAAK,CAAC,CAAC,uBAAuB,EAAE,IAAI,CAAC,aAAa,CAAC,CA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EAAE;AACtB,QAAQ,aAAa,EAAE,IAAI,CAAC,WAAW;AACvC,QAAQ,WAAW,EAAE;AACrB,UAAU,EAAE,EAAE,IAAI,CAAC,cAAc;AACjC,UAAU,MAAM,EAAE,IAAI,CAAC,QAAQ;AAC/B,SAAS;AACT,QAAQ,OAAO,EAAE,IAAI,CAAC,SAAS;AAC/B,QAAQ,QAAQ,EAAE,IAAI,CAAC,UAAU;AACjC,OAAO;AACP,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;AACQ,IAAC,eAAe,GAAG,iBAAiB;AAC9C,eAAe,CAAC,eAAe,GAAG;AAClC,EAAE,KAAK,EAAE,gBAAgB,CAAC,mBAAmB;AAC7C,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,mBAAmB;AACxD,EAAE,SAAS,EAAE,gBAAgB,CAAC,uBAAuB;AACrD,EAAE,cAAc,EAAE,gBAAgB,CAAC,4BAA4B;AAC/D,CAAC;;;;"}
@@ -6,7 +6,7 @@ var Docker = require('dockerode');
6
6
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
7
7
  var backendCommon = require('@backstage/backend-common');
8
8
  var config = require('@backstage/config');
9
- var utility = require('./utility-51f4a306.cjs.js');
9
+ var utility = require('./utility-647ad232.cjs.js');
10
10
  var process$1 = require('process');
11
11
  require('winston');
12
12
 
@@ -45,7 +45,9 @@ async function generate(opts) {
45
45
  let parsedLocationAnnotation = {};
46
46
  if (opts.techdocsRef) {
47
47
  try {
48
- parsedLocationAnnotation = utility.convertTechDocsRefToLocationAnnotation(opts.techdocsRef);
48
+ parsedLocationAnnotation = utility.convertTechDocsRefToLocationAnnotation(
49
+ opts.techdocsRef
50
+ );
49
51
  } catch (err) {
50
52
  logger.error(err.message);
51
53
  }
@@ -69,4 +71,4 @@ async function generate(opts) {
69
71
  }
70
72
 
71
73
  exports["default"] = generate;
72
- //# sourceMappingURL=generate-e530be0d.cjs.js.map
74
+ //# sourceMappingURL=generate-b897bd89.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-e530be0d.cjs.js","sources":["../../src/commands/generate/generate.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport fs from 'fs-extra';\nimport Docker from 'dockerode';\nimport {\n TechdocsGenerator,\n ParsedLocationAnnotation,\n} from '@backstage/plugin-techdocs-node';\nimport { DockerContainerRunner } from '@backstage/backend-common';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n} from '../../lib/utility';\nimport { stdout } from 'process';\n\nexport default async function generate(opts: OptionValues) {\n // Use techdocs-node package to generate docs. Keep consistency between Backstage and CI generating docs.\n // Docs can be prepared using actions/checkout or git clone, or similar paradigms on CI. The TechDocs CI workflow\n // will run on the CI pipeline containing the documentation files.\n\n const logger = createLogger({ verbose: opts.verbose });\n\n const sourceDir = resolve(opts.sourceDir);\n const outputDir = resolve(opts.outputDir);\n const omitTechdocsCorePlugin = opts.omitTechdocsCoreMkdocsPlugin;\n const dockerImage = opts.dockerImage;\n const pullImage = opts.pull;\n const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;\n\n logger.info(`Using source dir ${sourceDir}`);\n logger.info(`Will output generated files in ${outputDir}`);\n\n logger.verbose('Creating output directory if it does not exist.');\n\n await fs.ensureDir(outputDir);\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: opts.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n mkdocs: {\n legacyCopyReadmeMdToIndexMd,\n omitTechdocsCorePlugin,\n },\n },\n },\n });\n\n // Docker client (conditionally) used by the generators, based on techdocs.generators config.\n const dockerClient = new Docker();\n const containerRunner = new DockerContainerRunner({ dockerClient });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (opts.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n opts.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n // Generate docs using @backstage/plugin-techdocs-node\n const techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n containerRunner,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.run({\n inputDir: sourceDir,\n outputDir,\n ...(opts.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag: opts.etag,\n ...(process.env.LOG_LEVEL === 'debug' ? { logStream: stdout } : {}),\n });\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","fs","config","ConfigReader","Docker","DockerContainerRunner","convertTechDocsRefToLocationAnnotation","TechdocsGenerator","stdout"],"mappings":";;;;;;;;;;;;;;;;;AAae,eAAe,QAAQ,CAAC,IAAI,EAAE;AAC7C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,SAAS,GAAGC,YAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5C,EAAE,MAAM,SAAS,GAAGA,YAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5C,EAAE,MAAM,sBAAsB,GAAG,IAAI,CAAC,4BAA4B,CAAC;AACnE,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;AACvC,EAAE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;AAC9B,EAAE,MAAM,2BAA2B,GAAG,IAAI,CAAC,2BAA2B,CAAC;AACvE,EAAE,MAAM,CAAC,IAAI,CA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AAE,MAAM,iBAAiB,CAAC,GAAG,CAAC;AAC9B,IAAI,QAAQ,EAAE,SAAS;AACvB,IAAI,SAAS;AACb,IAAI,GAAG,IAAI,CAAC,WAAW,GAAG;AAC1B,MAAM,wBAAwB;AAC9B,KAAK,GAAG,EAAE;AACV,IAAI,MAAM;AACV,IAAI,IAAI,EAAE,IAAI,CAAC,IAAI;AACnB,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,OAAO,GAAG,EAAE,SAAS,EAAEM,gBAAM,EAAE,GAAG,EAAE;AACrE,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvB;;;;"}
1
+ {"version":3,"file":"generate-b897bd89.cjs.js","sources":["../../src/commands/generate/generate.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport fs from 'fs-extra';\nimport Docker from 'dockerode';\nimport {\n TechdocsGenerator,\n ParsedLocationAnnotation,\n} from '@backstage/plugin-techdocs-node';\nimport { DockerContainerRunner } from '@backstage/backend-common';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n} from '../../lib/utility';\nimport { stdout } from 'process';\n\nexport default async function generate(opts: OptionValues) {\n // Use techdocs-node package to generate docs. Keep consistency between Backstage and CI generating docs.\n // Docs can be prepared using actions/checkout or git clone, or similar paradigms on CI. The TechDocs CI workflow\n // will run on the CI pipeline containing the documentation files.\n\n const logger = createLogger({ verbose: opts.verbose });\n\n const sourceDir = resolve(opts.sourceDir);\n const outputDir = resolve(opts.outputDir);\n const omitTechdocsCorePlugin = opts.omitTechdocsCoreMkdocsPlugin;\n const dockerImage = opts.dockerImage;\n const pullImage = opts.pull;\n const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;\n\n logger.info(`Using source dir ${sourceDir}`);\n logger.info(`Will output generated files in ${outputDir}`);\n\n logger.verbose('Creating output directory if it does not exist.');\n\n await fs.ensureDir(outputDir);\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: opts.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n mkdocs: {\n legacyCopyReadmeMdToIndexMd,\n omitTechdocsCorePlugin,\n },\n },\n },\n });\n\n // Docker client (conditionally) used by the generators, based on techdocs.generators config.\n const dockerClient = new Docker();\n const containerRunner = new DockerContainerRunner({ dockerClient });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (opts.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n opts.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n // Generate docs using @backstage/plugin-techdocs-node\n const techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n containerRunner,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.run({\n inputDir: sourceDir,\n outputDir,\n ...(opts.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag: opts.etag,\n ...(process.env.LOG_LEVEL === 'debug' ? { logStream: stdout } : {}),\n });\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","fs","config","ConfigReader","Docker","DockerContainerRunner","convertTechDocsRefToLocationAnnotation","TechdocsGenerator","stdout"],"mappings":";;;;;;;;;;;;;;;;;AAae,eAAe,QAAQ,CAAC,IAAI,EAAE;AAC7C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,E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AAW,EAAE;AACxB,IAAI,IAAI;AACR,MAAM,wBAAwB,GAAGC,8CAAsC;AACvE,QAAQ,IAAI,CAAC,WAAW;AACxB,OAAO,CAAC;AACR,KAAK,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAChC,KAAK;AACL,GAAG;AACH,EAAE,MAAM,iBAAiB,GAAG,MAAMC,oCAAiB,CAAC,UAAU,CAACL,QAAM,EAAE;AACvE,IAAI,MAAM;AACV,IAAI,eAAe;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAC7C,EAAE,MAAM,iBAAiB,CAAC,GAAG,CAAC;AAC9B,IAAI,QAAQ,EAAE,SAAS;AACvB,IAAI,SAAS;AACb,IAAI,GAAG,IAAI,CAAC,WAAW,GAAG;AAC1B,MAAM,wBAAwB;AAC9B,KAAK,GAAG,EAAE;AACV,IAAI,MAAM;AACV,IAAI,IAAI,EAAE,IAAI,CAAC,IAAI;AACnB,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,OAAO,GAAG,EAAE,SAAS,EAAEM,gBAAM,EAAE,GAAG,EAAE;AACrE,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACvB;;;;"}
@@ -2,8 +2,8 @@
2
2
 
3
3
  var backendCommon = require('@backstage/backend-common');
4
4
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
5
- var utility = require('./utility-51f4a306.cjs.js');
6
- var PublisherConfig = require('./PublisherConfig-7a0dc71c.cjs.js');
5
+ var utility = require('./utility-647ad232.cjs.js');
6
+ var PublisherConfig = require('./PublisherConfig-0ea58467.cjs.js');
7
7
  require('winston');
8
8
  require('@backstage/config');
9
9
 
@@ -22,7 +22,9 @@ async function migrate(opts) {
22
22
  const removeOriginal = opts.removeOriginal;
23
23
  const numericConcurrency = parseInt(opts.concurrency, 10);
24
24
  if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {
25
- throw new Error(`Concurrency must be a number greater than 1. ${opts.concurrency} provided.`);
25
+ throw new Error(
26
+ `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`
27
+ );
26
28
  }
27
29
  await publisher.migrateDocsCase({
28
30
  concurrency: numericConcurrency,
@@ -31,4 +33,4 @@ async function migrate(opts) {
31
33
  }
32
34
 
33
35
  exports["default"] = migrate;
34
- //# sourceMappingURL=migrate-122ec4bf.cjs.js.map
36
+ //# sourceMappingURL=migrate-62035c68.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-122ec4bf.cjs.js","sources":["../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = SingleHostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher"],"mappings":";;;;;;;;;AAIe,eAAe,OAAO,CAAC,IAAI,EAAE;AAC5C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAGC,+BAAe,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACtD,EAAE,MAAM,SAAS,GAAGC,iCAAmB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3D,EAAE,MAAM,SAAS,GAAG,MAAMC,4BAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;AAClC,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC3E,GAAG;AACH,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC;AACzD,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,MAAM,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;AACxB,GAAG;AACH,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;AAC7C,EAAE,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC5D,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,IAAI,CAAC,EAAE;AACxE,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,6CAA6C,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;AAClG,GAAG;AACH,EAAE,MAAM,SAAS,CAAC,eAAe,CAAC;AAClC,IAAI,WAAW,EAAE,kBAAkB;AACnC,IAAI,cAAc;AAClB,GAAG,CAAC,CAAC;AACL;;;;"}
1
+ {"version":3,"file":"migrate-62035c68.cjs.js","sources":["../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = SingleHostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher"],"mappings":";;;;;;;;;AAIe,eAAe,OAAO,CAAC,IAAI,EAAE;AAC5C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAGC,+BAAe,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACtD,EAAE,MAAM,SAAS,GAAGC,iCAAmB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3D,EAAE,MAAM,SAAS,GAAG,MAAMC,4BAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;AAClC,IAAI,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC3E,GAAG;AACH,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC;AACzD,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,MAAM,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;AACxB,GAAG;AACH,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;AAC7C,EAAE,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAC5D,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,IAAI,CAAC,EAAE;AACxE,IAAI,MAAM,IAAI,KAAK;AACnB,MAAM,CAAC,6CAA6C,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;AAClF,KAAK,CAAC;AACN,GAAG;AACH,EAAE,MAAM,SAAS,CAAC,eAAe,CAAC;AAClC,IAAI,WAAW,EAAE,kBAAkB;AACnC,IAAI,cAAc;AAClB,GAAG,CAAC,CAAC;AACL;;;;"}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var openBrowser = require('react-dev-utils/openBrowser');
4
- var utility = require('./utility-51f4a306.cjs.js');
5
- var mkdocsServer = require('./mkdocsServer-0af6527d.cjs.js');
4
+ var utility = require('./utility-647ad232.cjs.js');
5
+ var mkdocsServer = require('./mkdocsServer-99ec8af2.cjs.js');
6
6
  require('winston');
7
7
  require('child_process');
8
8
 
@@ -37,6 +37,7 @@ Starting mkdocs server on ${localAddr}
37
37
  port: opts.port,
38
38
  dockerImage: opts.dockerImage,
39
39
  dockerEntrypoint: opts.dockerEntrypoint,
40
+ dockerOptions: opts.dockerOption,
40
41
  useDocker: opts.docker,
41
42
  stdoutLogFunc: logFunc,
42
43
  stderrLogFunc: logFunc
@@ -45,4 +46,4 @@ Starting mkdocs server on ${localAddr}
45
46
  }
46
47
 
47
48
  exports["default"] = serveMkdocs;
48
- //# sourceMappingURL=mkdocs-3c3898e8.cjs.js.map
49
+ //# sourceMappingURL=mkdocs-1501e940.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mkdocs-3c3898e8.cjs.js","sources":["../../src/commands/serve/mkdocs.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { createLogger } from '../../lib/utility';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\n\nexport default async function serveMkdocs(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const dockerAddr = `http://0.0.0.0:${opts.port}`;\n const localAddr = `http://127.0.0.1:${opts.port}`;\n const expectedDevAddr = opts.docker ? dockerAddr : localAddr;\n // We want to open browser only once based on a log.\n let boolOpenBrowserTriggered = false;\n\n const logFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line in between\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n // Logs from container is verbose.\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !boolOpenBrowserTriggered &&\n line.includes(`Serving on ${expectedDevAddr}`)\n ) {\n // Always open the local address, since 0.0.0.0 belongs to docker\n logger.info(`\\nStarting mkdocs server on ${localAddr}\\n`);\n openBrowser(localAddr);\n boolOpenBrowserTriggered = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n\n // Commander stores --no-docker in cmd.docker variable\n const childProcess = await runMkdocsServer({\n port: opts.port,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n useDocker: opts.docker,\n stdoutLogFunc: logFunc,\n stderrLogFunc: logFunc,\n });\n\n // Keep waiting for user to cancel the process\n await waitForSignal([childProcess]);\n}\n"],"names":["createLogger","openBrowser","runMkdocsServer","waitForSignal"],"mappings":";;;;;;;;;;;;AAIe,eAAe,WAAW,CAAC,IAAI,EAAE;AAChD,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OA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AI;AACnB,IAAI,WAAW,EAAE,IAAI,CAAC,WAAW;AACjC,IAAI,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;AAC3C,IAAI,SAAS,EAAE,IAAI,CAAC,MAAM;AAC1B,IAAI,aAAa,EAAE,OAAO;AAC1B,IAAI,aAAa,EAAE,OAAO;AAC1B,GAAG,CAAC,CAAC;AACL,EAAE,MAAMC,0BAAa,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;AACtC;;;;"}
1
+ {"version":3,"file":"mkdocs-1501e940.cjs.js","sources":["../../src/commands/serve/mkdocs.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { createLogger } from '../../lib/utility';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\n\nexport default async function serveMkdocs(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const dockerAddr = `http://0.0.0.0:${opts.port}`;\n const localAddr = `http://127.0.0.1:${opts.port}`;\n const expectedDevAddr = opts.docker ? dockerAddr : localAddr;\n // We want to open browser only once based on a log.\n let boolOpenBrowserTriggered = false;\n\n const logFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line in between\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n // Logs from container is verbose.\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !boolOpenBrowserTriggered &&\n line.includes(`Serving on ${expectedDevAddr}`)\n ) {\n // Always open the local address, since 0.0.0.0 belongs to docker\n logger.info(`\\nStarting mkdocs server on ${localAddr}\\n`);\n openBrowser(localAddr);\n boolOpenBrowserTriggered = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n\n // Commander stores --no-docker in cmd.docker variable\n const childProcess = await runMkdocsServer({\n port: opts.port,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n dockerOptions: opts.dockerOption,\n useDocker: opts.docker,\n stdoutLogFunc: logFunc,\n stderrLogFunc: logFunc,\n });\n\n // Keep waiting for user to cancel the process\n await waitForSignal([childProcess]);\n}\n"],"names":["createLogger","openBrowser","runMkdocsServer","waitForSignal"],"mappings":";;;;;;;;;;;;AAIe,eAAe,WAAW,CAAC,IAAI,EAAE;AAChD,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,UAAU,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACnD,EAAE,MAAM,SAAS,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACpD,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAC/D,EAAE,IAAI,wBAAwB,GAAG,KAAK,CAAC;AACvC,EAAE,MAAM,OAAO,GAAG,CAAC,IAAI,KAAK;AAC5B,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACjD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,iBAAiB,GAAG,UAAU,CAAC;AACnE,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC/B,MAAM,IAAI,IAAI,KAAK,EAAE,EAAE;AACvB,QAAQ,OAAO;AACf,OAAO;AACP,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,IAAI,CAAC,wBAAwB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE;AACvF,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;AACrB,0BAA0B,EAAE,SAAS,CAAC;AACtC,CAAC,CAAC,CAAC;AACH,QAAQC,+BAAW,CAAC,SAAS,CAAC,CAAC;AAC/B,QAAQ,wBAAwB,GAAG,IAAI,CAAC;AACxC,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,MAAM,YAAY,GAAG,MAAMC,4BAAe,CAAC;AAC7C,IAAI,IAAI,EAAE,IAAI,CAAC,IAAI;AACnB,IAAI,WAAW,EAAE,IAAI,CAAC,WAAW;AACjC,IAAI,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;AAC3C,IAAI,aAAa,EAAE,IAAI,CAAC,YAAY;AACpC,IAAI,SAAS,EAAE,IAAI,CAAC,MAAM;AAC1B,IAAI,aAAa,EAAE,OAAO;AAC1B,IAAI,aAAa,EAAE,OAAO;AAC1B,GAAG,CAAC,CAAC;AACL,EAAE,MAAMC,0BAAa,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;AACtC;;;;"}
@@ -44,10 +44,12 @@ async function waitForSignal(childProcesses) {
44
44
  }
45
45
  return;
46
46
  }
47
- promises.push(new Promise((resolve, reject) => {
48
- childProcess.once("error", reject);
49
- childProcess.once("exit", resolve);
50
- }));
47
+ promises.push(
48
+ new Promise((resolve, reject) => {
49
+ childProcess.once("error", reject);
50
+ childProcess.once("exit", resolve);
51
+ })
52
+ );
51
53
  });
52
54
  await Promise.all(promises);
53
55
  }
@@ -58,25 +60,30 @@ const runMkdocsServer = async (options) => {
58
60
  const useDocker = (_b = options.useDocker) != null ? _b : true;
59
61
  const dockerImage = (_c = options.dockerImage) != null ? _c : "spotify/techdocs";
60
62
  if (useDocker) {
61
- return await run("docker", [
62
- "run",
63
- "--rm",
64
- "-w",
65
- "/content",
66
- "-v",
67
- `${process.cwd()}:/content`,
68
- "-p",
69
- `${port}:${port}`,
70
- "-it",
71
- ...options.dockerEntrypoint ? ["--entrypoint", options.dockerEntrypoint] : [],
72
- dockerImage,
73
- "serve",
74
- "--dev-addr",
75
- `0.0.0.0:${port}`
76
- ], {
77
- stdoutLogFunc: options.stdoutLogFunc,
78
- stderrLogFunc: options.stderrLogFunc
79
- });
63
+ return await run(
64
+ "docker",
65
+ [
66
+ "run",
67
+ "--rm",
68
+ "-w",
69
+ "/content",
70
+ "-v",
71
+ `${process.cwd()}:/content`,
72
+ "-p",
73
+ `${port}:${port}`,
74
+ "-it",
75
+ ...options.dockerEntrypoint ? ["--entrypoint", options.dockerEntrypoint] : [],
76
+ ...options.dockerOptions || [],
77
+ dockerImage,
78
+ "serve",
79
+ "--dev-addr",
80
+ `0.0.0.0:${port}`
81
+ ],
82
+ {
83
+ stdoutLogFunc: options.stdoutLogFunc,
84
+ stderrLogFunc: options.stderrLogFunc
85
+ }
86
+ );
80
87
  }
81
88
  return await run("mkdocs", ["serve", "--dev-addr", `127.0.0.1:${port}`], {
82
89
  stdoutLogFunc: options.stdoutLogFunc,
@@ -86,4 +93,4 @@ const runMkdocsServer = async (options) => {
86
93
 
87
94
  exports.runMkdocsServer = runMkdocsServer;
88
95
  exports.waitForSignal = waitForSignal;
89
- //# sourceMappingURL=mkdocsServer-0af6527d.cjs.js.map
96
+ //# sourceMappingURL=mkdocsServer-99ec8af2.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mkdocsServer-99ec8af2.cjs.js","sources":["../../src/lib/run.ts","../../src/lib/mkdocsServer.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { spawn, SpawnOptions, ChildProcess } from 'child_process';\n\nexport type LogFunc = (data: Buffer | string) => void;\ntype SpawnOptionsPartialEnv = Omit<SpawnOptions, 'env'> & {\n env?: Partial<NodeJS.ProcessEnv>;\n // Pipe stdout to this log function\n stdoutLogFunc?: LogFunc;\n // Pipe stderr to this log function\n stderrLogFunc?: LogFunc;\n};\n\n// TODO: Accept log functions to pipe logs with.\n// Runs a child command, returning the child process instance.\n// Use it along with waitForSignal to run a long running process e.g. mkdocs serve\nexport const run = async (\n name: string,\n args: string[] = [],\n options: SpawnOptionsPartialEnv = {},\n): Promise<ChildProcess> => {\n const { stdoutLogFunc, stderrLogFunc } = options;\n\n const env: NodeJS.ProcessEnv = {\n ...process.env,\n FORCE_COLOR: 'true',\n ...(options.env ?? {}),\n };\n\n // Refer: https://nodejs.org/api/child_process.html#child_process_subprocess_stdio\n const stdio = [\n 'inherit',\n stdoutLogFunc ? 'pipe' : 'inherit',\n stderrLogFunc ? 'pipe' : 'inherit',\n ] as ('inherit' | 'pipe')[];\n\n const childProcess = spawn(name, args, {\n stdio: stdio,\n ...options,\n env,\n });\n\n if (stdoutLogFunc && childProcess.stdout) {\n childProcess.stdout.on('data', stdoutLogFunc);\n }\n if (stderrLogFunc && childProcess.stderr) {\n childProcess.stderr.on('data', stderrLogFunc);\n }\n\n return childProcess;\n};\n\n// Block indefinitely and wait for a signal to kill the child process(es)\n// Throw error if any child process errors\n// Resolves only when all processes exit with status code 0\nexport async function waitForSignal(\n childProcesses: Array<ChildProcess>,\n): Promise<void> {\n const promises: Array<Promise<void>> = [];\n\n for (const signal of ['SIGINT', 'SIGTERM'] as const) {\n process.on(signal, () => {\n childProcesses.forEach(childProcess => {\n childProcess.kill();\n });\n });\n }\n\n childProcesses.forEach(childProcess => {\n if (typeof childProcess.exitCode === 'number') {\n if (childProcess.exitCode) {\n throw new Error(`Non zero exit code from child process`);\n }\n return;\n }\n\n promises.push(\n new Promise<void>((resolve, reject) => {\n childProcess.once('error', reject);\n childProcess.once('exit', resolve);\n }),\n );\n });\n\n await Promise.all(promises);\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ChildProcess } from 'child_process';\nimport { run, LogFunc } from './run';\n\nexport const runMkdocsServer = async (options: {\n port?: string;\n useDocker?: boolean;\n dockerImage?: string;\n dockerEntrypoint?: string;\n dockerOptions?: string[];\n stdoutLogFunc?: LogFunc;\n stderrLogFunc?: LogFunc;\n}): Promise<ChildProcess> => {\n const port = options.port ?? '8000';\n const useDocker = options.useDocker ?? true;\n const dockerImage = options.dockerImage ?? 'spotify/techdocs';\n\n if (useDocker) {\n return await run(\n 'docker',\n [\n 'run',\n '--rm',\n '-w',\n '/content',\n '-v',\n `${process.cwd()}:/content`,\n '-p',\n `${port}:${port}`,\n '-it',\n ...(options.dockerEntrypoint\n ? ['--entrypoint', options.dockerEntrypoint]\n : []),\n ...(options.dockerOptions || []),\n dockerImage,\n 'serve',\n '--dev-addr',\n `0.0.0.0:${port}`,\n ],\n {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n },\n );\n }\n\n return await run('mkdocs', ['serve', '--dev-addr', `127.0.0.1:${port}`], {\n stdoutLogFunc: options.stdoutLogFunc,\n stderrLogFunc: options.stderrLogFunc,\n });\n};\n"],"names":["spawn"],"mappings":";;;;AACO,MAAM,GAAG,GAAG,OAAO,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,KAAK;AAC5D,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;AACnD,EAAE,MAAM,GAAG,GAAG;AACd,IAAI,GAAG,OAAO,CAAC,GAAG;AAClB,IAAI,WAAW,EAAE,MAAM;AACvB,IAAI,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,GAAG,EAAE;AAC3C,GAAG,CAAC;AACJ,EAAE,MAAM,KAAK,GAAG;AAChB,IAAI,SAAS;AACb,IAAI,aAAa,GAAG,MAAM,GAAG,SAAS;AACtC,IAAI,aAAa,GAAG,MAAM,GAAG,SAAS;AACtC,GAAG,CAAC;AACJ,EAAE,MAAM,YAAY,GAAGA,mBAAK,CAAC,IAAI,EAAE,IAAI,EAAE;AACzC,IAAI,KAAK;AACT,IAAI,GAAG,OAAO;AACd,IAAI,GAAG;AACP,GAAG,CAAC,CAAC;AACL,EAAE,IAAI,aAAa,IAAI,YAAY,CAAC,MAAM,EAAE;AAC5C,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAClD,GAAG;AACH,EAAE,IAAI,aAAa,IAAI,YAAY,CAAC,MAAM,EAAE;AAC5C,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAClD,GAAG;AACH,EAAE,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AACK,eAAe,aAAa,CAA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var utility = require('./utility-51f4a306.cjs.js');
4
+ var utility = require('./utility-647ad232.cjs.js');
5
5
  var backendCommon = require('@backstage/backend-common');
6
6
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
7
- var PublisherConfig = require('./PublisherConfig-7a0dc71c.cjs.js');
7
+ var PublisherConfig = require('./PublisherConfig-0ea58467.cjs.js');
8
8
  require('winston');
9
9
  require('@backstage/config');
10
10
 
@@ -31,4 +31,4 @@ async function publish(opts) {
31
31
  }
32
32
 
33
33
  exports["default"] = publish;
34
- //# sourceMappingURL=publish-efa348a5.cjs.js.map
34
+ //# sourceMappingURL=publish-af5607e2.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish-efa348a5.cjs.js","sources":["../../src/commands/publish/publish.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = SingleHostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher","resolve"],"mappings":";;;;;;;;;;AAKe,eAAe,OAAO,CAAC,IAAI,EAAE;AAC5C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAGC,+BAAe,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACtD,EAAE,MAAM,SAAS,GAAGC,iCAAmB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3D,EAAE,MAAM,SAAS,GAAG,MAAMC,4BAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC;AACzD,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACzC,GAAG;AACH,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,IAAI;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,SAAS;AACf,MAAM,IAAI;AACV,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,SAAS,GAAGC,YAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5C,EAAE,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AACjD,EAAE,OAAO,IAAI,CAAC;AACd;;;;"}
1
+ {"version":3,"file":"publish-af5607e2.cjs.js","sources":["../../src/commands/publish/publish.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = SingleHostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher","resolve"],"mappings":";;;;;;;;;;AAKe,eAAe,OAAO,CAAC,IAAI,EAAE;AAC5C,EAAE,MAAM,MAAM,GAAGA,oBAAY,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAGC,+BAAe,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACtD,EAAE,MAAM,SAAS,GAAGC,iCAAmB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3D,EAAE,MAAM,SAAS,GAAG,MAAMC,4BAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAC9E,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,SAAS,CAAC,YAAY,EAAE,CAAC;AACzD,EAAE,IAAI,CAAC,WAAW,EAAE;AACpB,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACzC,GAAG;AACH,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACzD,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,IAAI;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,SAAS;AACf,MAAM,IAAI;AACV,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,SAAS,GAAGC,YAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC5C,EAAE,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AACjD,EAAE,OAAO,IAAI,CAAC;AACd;;;;"}
@@ -6,8 +6,8 @@ var cliCommon = require('@backstage/cli-common');
6
6
  var serveHandler = require('serve-handler');
7
7
  var http = require('http');
8
8
  var httpProxy = require('http-proxy');
9
- var utility = require('./utility-51f4a306.cjs.js');
10
- var mkdocsServer = require('./mkdocsServer-0af6527d.cjs.js');
9
+ var utility = require('./utility-647ad232.cjs.js');
10
+ var mkdocsServer = require('./mkdocsServer-99ec8af2.cjs.js');
11
11
  require('winston');
12
12
  require('child_process');
13
13
 
@@ -41,34 +41,38 @@ class HTTPServer {
41
41
  async serve() {
42
42
  return new Promise((resolve, reject) => {
43
43
  const proxyHandler = this.createProxy();
44
- const server = http__default["default"].createServer((request, response) => {
45
- var _a;
46
- if ((_a = request.url) == null ? void 0 : _a.startsWith(this.proxyEndpoint)) {
47
- const [proxy, forwardPath] = proxyHandler(request);
48
- proxy.on("error", (error) => {
49
- reject(error);
44
+ const server = http__default["default"].createServer(
45
+ (request, response) => {
46
+ var _a;
47
+ if ((_a = request.url) == null ? void 0 : _a.startsWith(this.proxyEndpoint)) {
48
+ const [proxy, forwardPath] = proxyHandler(request);
49
+ proxy.on("error", (error) => {
50
+ reject(error);
51
+ });
52
+ response.setHeader("Access-Control-Allow-Origin", "*");
53
+ response.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
54
+ request.url = forwardPath;
55
+ proxy.web(request, response);
56
+ return;
57
+ }
58
+ if (request.url === "/.detect") {
59
+ response.setHeader("Content-Type", "text/plain");
60
+ response.end("techdocs-cli-server");
61
+ return;
62
+ }
63
+ serveHandler__default["default"](request, response, {
64
+ public: this.backstageBundleDir,
65
+ trailingSlash: true,
66
+ rewrites: [{ source: "**", destination: "index.html" }]
50
67
  });
51
- response.setHeader("Access-Control-Allow-Origin", "*");
52
- response.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
53
- request.url = forwardPath;
54
- proxy.web(request, response);
55
- return;
56
68
  }
57
- if (request.url === "/.detect") {
58
- response.setHeader("Content-Type", "text/plain");
59
- response.end("techdocs-cli-server");
60
- return;
61
- }
62
- serveHandler__default["default"](request, response, {
63
- public: this.backstageBundleDir,
64
- trailingSlash: true,
65
- rewrites: [{ source: "**", destination: "index.html" }]
66
- });
67
- });
69
+ );
68
70
  const logger = utility.createLogger({ verbose: false });
69
71
  server.listen(this.backstagePort, () => {
70
72
  if (this.verbose) {
71
- logger.info(`[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`);
73
+ logger.info(
74
+ `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`
75
+ );
72
76
  }
73
77
  resolve(server);
74
78
  });
@@ -81,7 +85,10 @@ class HTTPServer {
81
85
 
82
86
  function findPreviewBundlePath() {
83
87
  try {
84
- return path__default["default"].join(path__default["default"].dirname(require.resolve("techdocs-cli-embedded-app/package.json")), "dist");
88
+ return path__default["default"].join(
89
+ path__default["default"].dirname(require.resolve("techdocs-cli-embedded-app/package.json")),
90
+ "dist"
91
+ );
85
92
  } catch {
86
93
  return cliCommon.findPaths(__dirname).resolveOwn("dist/embedded-app");
87
94
  }
@@ -113,6 +120,7 @@ async function serve(opts) {
113
120
  port: opts.mkdocsPort,
114
121
  dockerImage: opts.dockerImage,
115
122
  dockerEntrypoint: opts.dockerEntrypoint,
123
+ dockerOptions: opts.dockerOption,
116
124
  useDocker: opts.docker,
117
125
  stdoutLogFunc: mkdocsLogFunc,
118
126
  stderrLogFunc: mkdocsLogFunc
@@ -125,21 +133,30 @@ async function serve(opts) {
125
133
  logger.info("Waiting for mkdocs server to start...");
126
134
  }
127
135
  if (!mkdocsServerHasStarted) {
128
- logger.error("mkdocs server did not start. Exiting. Try re-running command with -v option for more details.");
136
+ logger.error(
137
+ "mkdocs server did not start. Exiting. Try re-running command with -v option for more details."
138
+ );
129
139
  }
130
140
  const port = isDevMode ? backstageBackendPort : backstagePort;
131
- const httpServer = new HTTPServer(findPreviewBundlePath(), port, opts.mkdocsPort, opts.verbose);
141
+ const httpServer = new HTTPServer(
142
+ findPreviewBundlePath(),
143
+ port,
144
+ opts.mkdocsPort,
145
+ opts.verbose
146
+ );
132
147
  httpServer.serve().catch((err) => {
133
148
  logger.error(err);
134
149
  mkdocsChildProcess.kill();
135
150
  process.exit(1);
136
151
  }).then(() => {
137
152
  openBrowser__default["default"](`http://localhost:${port}/docs/default/component/local/`);
138
- logger.info(`Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/
139
- Opening browser.`);
153
+ logger.info(
154
+ `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/
155
+ Opening browser.`
156
+ );
140
157
  });
141
158
  await mkdocsServer.waitForSignal([mkdocsChildProcess]);
142
159
  }
143
160
 
144
161
  exports["default"] = serve;
145
- //# sourceMappingURL=serve-48337ec4.cjs.js.map
162
+ //# sourceMappingURL=serve-176119a3.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve-48337ec4.cjs.js","sources":["../../src/lib/httpServer.ts","../../src/commands/serve/serve.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport serveHandler from 'serve-handler';\nimport http from 'http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsPort: number;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsPort: number,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/techdocs/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsPort = mkdocsPort;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: `http://localhost:${this.mkdocsPort}`,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request path is prefixed with this.proxyEndpoint, remove it.\n const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, 'i');\n const forwardPath = request.url?.replace(proxyEndpointPath, '') || '';\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n if (request.url?.startsWith(this.proxyEndpoint)) {\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n proxy.web(request, response);\n return;\n }\n\n // This endpoint is used by the frontend to detect where the backend is running.\n if (request.url === '/.detect') {\n response.setHeader('Content-Type', 'text/plain');\n response.end('techdocs-cli-server');\n return;\n }\n\n serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\n });\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport path from 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { findPaths } from '@backstage/cli-common';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\nimport { createLogger } from '../../lib/utility';\n\nfunction findPreviewBundlePath(): string {\n try {\n return path.join(\n path.dirname(require.resolve('techdocs-cli-embedded-app/package.json')),\n 'dist',\n );\n } catch {\n // If the techdocs-cli-embedded-app package is not available it means we're\n // running a published package. For published packages the preview bundle is\n // copied to dist/embedded-app be the prepack script.\n //\n // This can be tested by running `yarn pack` and extracting the resulting tarball into a directory.\n // Within the extracted directory, run `npm install --only=prod`.\n // Once that's done you can test the CLI in any directory using `node <tmp-dir>/package <command>`.\n // eslint-disable-next-line no-restricted-syntax\n return findPaths(__dirname).resolveOwn('dist/embedded-app');\n }\n}\n\nexport default async function serve(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n // TODO: Backstage app port should also be configurable as a CLI option. However, since we bundle\n // a backstage app, we define app.baseUrl in the app-config.yaml.\n // Hence, it is complicated to make this configurable.\n const backstagePort = 3000;\n const backstageBackendPort = 7007;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${opts.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${opts.mkdocsPort}`;\n const mkdocsExpectedDevAddr = opts.docker\n ? mkdocsDockerAddr\n : mkdocsLocalAddr;\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = await runMkdocsServer({\n port: opts.mkdocsPort,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n useDocker: opts.docker,\n stdoutLogFunc: mkdocsLogFunc,\n stderrLogFunc: mkdocsLogFunc,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n const port = isDevMode ? backstageBackendPort : backstagePort;\n const httpServer = new HTTPServer(\n findPreviewBundlePath(),\n port,\n opts.mkdocsPort,\n opts.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error(err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await waitForSignal([mkdocsChildProcess]);\n}\n"],"names":["httpProxy","http","serveHandler","createLogger","path","findPaths","runMkdocsServer","openBrowser","waitForSignal"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIe,MAAM,UAAU,CAAC;AAChC,EAAE,WAAW,CAAC,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE;AACtE,IAAI,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;AAC1C,IAAI,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,IAAI,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,IAAI,IAAI,CAAC,UAAU,GAAG,UAAU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AAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;AACzD,GAAG;AACH,EAAE,IAAI,CAAC,sBAAsB,EAAE;AAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,+FAA+F,CAAC,CAAC;AAClH,GAAG;AACH,EAAE,MAAM,IAAI,GAAG,SAAS,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAChE,EAAE,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAClG,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK;AACpC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,IAAI,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM;AAChB,IAAIC,+BAAW,CAAC,CAAC,iBAAiB,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC1E,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,8CAA8C,EAAE,IAAI,CAAC;AACtE,gBAAgB,CAAC,CAAC,CAAC;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,MAAMC,0BAAa,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAC5C;;;;"}
1
+ {"version":3,"file":"serve-176119a3.cjs.js","sources":["../../src/lib/httpServer.ts","../../src/commands/serve/serve.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport serveHandler from 'serve-handler';\nimport http from 'http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsPort: number;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsPort: number,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/techdocs/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsPort = mkdocsPort;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: `http://localhost:${this.mkdocsPort}`,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request path is prefixed with this.proxyEndpoint, remove it.\n const proxyEndpointPath = new RegExp(`^${this.proxyEndpoint}`, 'i');\n const forwardPath = request.url?.replace(proxyEndpointPath, '') || '';\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n if (request.url?.startsWith(this.proxyEndpoint)) {\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n proxy.web(request, response);\n return;\n }\n\n // This endpoint is used by the frontend to detect where the backend is running.\n if (request.url === '/.detect') {\n response.setHeader('Content-Type', 'text/plain');\n response.end('techdocs-cli-server');\n return;\n }\n\n serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\n });\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport path from 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { findPaths } from '@backstage/cli-common';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\nimport { createLogger } from '../../lib/utility';\n\nfunction findPreviewBundlePath(): string {\n try {\n return path.join(\n path.dirname(require.resolve('techdocs-cli-embedded-app/package.json')),\n 'dist',\n );\n } catch {\n // If the techdocs-cli-embedded-app package is not available it means we're\n // running a published package. For published packages the preview bundle is\n // copied to dist/embedded-app be the prepack script.\n //\n // This can be tested by running `yarn pack` and extracting the resulting tarball into a directory.\n // Within the extracted directory, run `npm install --only=prod`.\n // Once that's done you can test the CLI in any directory using `node <tmp-dir>/package <command>`.\n // eslint-disable-next-line no-restricted-syntax\n return findPaths(__dirname).resolveOwn('dist/embedded-app');\n }\n}\n\nexport default async function serve(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n // TODO: Backstage app port should also be configurable as a CLI option. However, since we bundle\n // a backstage app, we define app.baseUrl in the app-config.yaml.\n // Hence, it is complicated to make this configurable.\n const backstagePort = 3000;\n const backstageBackendPort = 7007;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${opts.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${opts.mkdocsPort}`;\n const mkdocsExpectedDevAddr = opts.docker\n ? mkdocsDockerAddr\n : mkdocsLocalAddr;\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = await runMkdocsServer({\n port: opts.mkdocsPort,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n dockerOptions: opts.dockerOption,\n useDocker: opts.docker,\n stdoutLogFunc: mkdocsLogFunc,\n stderrLogFunc: mkdocsLogFunc,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n const port = isDevMode ? backstageBackendPort : backstagePort;\n const httpServer = new HTTPServer(\n findPreviewBundlePath(),\n port,\n opts.mkdocsPort,\n opts.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error(err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await waitForSignal([mkdocsChildProcess]);\n}\n"],"names":["httpProxy","http","serveHandler","createLogger","path","findPaths","runMkdocsServer","openBrowser","waitForSignal"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIe,MAAM,UAAU,CAAC;AAChC,EAAE,WAAW,CAAC,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE;AACtE,IAAI,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;AAC1C,IAAI,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,IAAI,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACvC,IAAI,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,IAAI,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,GAAG;AACH,EAAE,WAAW,GAAG;AAChB,IAAI,MAAM,KAAK,GAAGA,6BAAS,CAAC,iBAAiB,CAAC;AAC9C,MAAM,MAAM,EAAE,CAAC,iBAAiB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,CAAC,OAAO,KAAK;AACxB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,GAAG,OAAO,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AAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK;AACpC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,IAAI,kBAAkB,CAAC,IAAI,EAAE,CAAC;AAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM;AAChB,IAAIC,+BAAW,CAAC,CAAC,iBAAiB,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC1E,IAAI,MAAM,CAAC,IAAI;AACf,MAAM,CAAC,8CAA8C,EAAE,IAAI,CAAC;AAC5D,gBAAgB,CAAC;AACjB,KAAK,CAAC;AACN,GAAG,CAAC,CAAC;AACL,EAAE,MAAMC,0BAAa,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAC5C;;;;"}
@@ -25,7 +25,9 @@ var winston__namespace = /*#__PURE__*/_interopNamespace(winston);
25
25
  const convertTechDocsRefToLocationAnnotation = (techdocsRef) => {
26
26
  const [type, target] = techdocsRef.split(/:(.+)/);
27
27
  if (!type || !target) {
28
- throw new Error(`Can not parse --techdocs-ref ${techdocsRef}. Should be of type HOST:URL.`);
28
+ throw new Error(
29
+ `Can not parse --techdocs-ref ${techdocsRef}. Should be of type HOST:URL.`
30
+ );
29
31
  }
30
32
  return { type, target };
31
33
  };
@@ -43,4 +45,4 @@ const createLogger = ({
43
45
 
44
46
  exports.convertTechDocsRefToLocationAnnotation = convertTechDocsRefToLocationAnnotation;
45
47
  exports.createLogger = createLogger;
46
- //# sourceMappingURL=utility-51f4a306.cjs.js.map
48
+ //# sourceMappingURL=utility-647ad232.cjs.js.map