@self-review/serve 1.45.0 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/README.md +84 -17
  2. package/dist/cli.js +209 -196
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/assets/abnfDiagram-VCTEODGH-CRvWpEsk.js +1 -0
  5. package/dist/client/assets/{arc-LxCcHggQ.js → arc-PsXBAWZS.js} +1 -1
  6. package/dist/client/assets/architectureDiagram-5GKGNRK7-C3DgmaC3.js +36 -0
  7. package/dist/client/assets/blockDiagram-I7D4REHJ-BUrTsHao.js +129 -0
  8. package/dist/client/assets/c4Diagram-7LVT6UL2-CpZNs6lz.js +38 -0
  9. package/dist/client/assets/channel-mzvzhynH.js +1 -0
  10. package/dist/client/assets/{chunk-QZHKN3VN-GT04-vw7.js → chunk-2Q5K7J3B-BcKcR0LE.js} +1 -1
  11. package/dist/client/assets/{chunk-FMBD7UC4-tB9OepVI.js → chunk-5VM5RSS4-C7oHjssV.js} +1 -1
  12. package/dist/client/assets/chunk-F27PBJKO-BlPczT9-.js +1 -0
  13. package/dist/client/assets/chunk-IMKFNOWR-JWhBhxWO.js +231 -0
  14. package/dist/client/assets/{chunk-4BX2VUAB-D2GfUqwd.js → chunk-JWPE2WC7-BHqPUvha.js} +1 -1
  15. package/dist/client/assets/chunk-POPQ4Y6H-F7oDRNF5.js +1 -0
  16. package/dist/client/assets/chunk-SVP7TREG-BXZpN96Q.js +88 -0
  17. package/dist/client/assets/chunk-TICWLB2K-DNvFXi10.js +206 -0
  18. package/dist/client/assets/{chunk-55IACEB6-C68L7s0h.js → chunk-XXDRQBXY-DOvXkBHK.js} +1 -1
  19. package/dist/client/assets/classDiagram-ZZMXUADV-BAE1ijM-.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BAE1ijM-.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-Ds41oEbD.js → cose-bilkent-JH36ORCC-DPJK_EQL.js} +1 -1
  22. package/dist/client/assets/cynefin-OW5HDTMX-JBAmnTQp.js +166 -0
  23. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CsYygsrr.js +62 -0
  24. package/dist/client/assets/cytoscape.esm-BB4DxJjf.js +321 -0
  25. package/dist/client/assets/dagre-GXQ25YYZ-Dbz4M33p.js +4 -0
  26. package/dist/client/assets/diagram-S7CK7UJ4-Biv-Q_jb.js +30 -0
  27. package/dist/client/assets/diagram-UQ7AKVKN-JRvoicym.js +41 -0
  28. package/dist/client/assets/diagram-VSXAHHWV-VAXOLPk0.js +3 -0
  29. package/dist/client/assets/diagram-VX7I27RA-DRmE-ol9.js +24 -0
  30. package/dist/client/assets/diagram-Z3DM3KII-CavqQl_8.js +24 -0
  31. package/dist/client/assets/ebnfDiagram-PWID7BFC-70cdWXxf.js +1 -0
  32. package/dist/client/assets/erDiagram-RLTQ6QDP-Ha04LW0x.js +99 -0
  33. package/dist/client/assets/flowDiagram-HODETNUW-BRLi1S7q.js +168 -0
  34. package/dist/client/assets/ganttDiagram-EL5Y4UJY-BfBVCQ3A.js +292 -0
  35. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-D-GiQOxC.js +106 -0
  36. package/dist/client/assets/index-hcoT-WH0.css +1 -0
  37. package/dist/client/assets/index-vUb9LsiF.js +285 -0
  38. package/dist/client/assets/infoDiagram-27XIBGKW-KEMBoX9p.js +2 -0
  39. package/dist/client/assets/ishikawaDiagram-5VMMS53U-CBS0T3w-.js +70 -0
  40. package/dist/client/assets/journeyDiagram-3NMN7TZE-AN4puIAJ.js +139 -0
  41. package/dist/client/assets/{kanban-definition-3W4ZIXB7-D-BINTOt.js → kanban-definition-UXKFOSKX-BWQivApD.js} +8 -8
  42. package/dist/client/assets/katex-HP8lGamR.js +257 -0
  43. package/dist/client/assets/layout-B7etliRi.js +1 -0
  44. package/dist/client/assets/{linear-CNmY37sq.js → linear-DYVJ9r-o.js} +1 -1
  45. package/dist/client/assets/mermaid.core-B9m3791z.js +310 -0
  46. package/dist/client/assets/mindmap-definition-YA3MSWOX-BwhaRhOg.js +96 -0
  47. package/dist/client/assets/pegDiagram-XKGWAZYB-B6zVpKjE.js +1 -0
  48. package/dist/client/assets/pieDiagram-E7YTZNPT-DGmD4H1L.js +39 -0
  49. package/dist/client/assets/quadrantDiagram-AXDQQJYC-CrKpGbBm.js +7 -0
  50. package/dist/client/assets/railroadDiagram-O6MQD6OU-DLcnTQsv.js +1 -0
  51. package/dist/client/assets/requirementDiagram-BXWQKSXE-bqG-UOfq.js +84 -0
  52. package/dist/client/assets/sankeyDiagram-P5KCCOFB-DGRQqw-s.js +40 -0
  53. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CW-ivDp5.js +162 -0
  54. package/dist/client/assets/sizeCapture-INFHLROL-BbHjPnUF.js +1 -0
  55. package/dist/client/assets/stateDiagram-D77RDMKH-BproWKBe.js +1 -0
  56. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-Ck8yo6ic.js +1 -0
  57. package/dist/client/assets/swimlanes-42K2YHIH-OG2jZQn8.js +1 -0
  58. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CgYw65ZN.js +8 -0
  59. package/dist/client/assets/timeline-definition-24CTP7MA-DQeIsWHU.js +120 -0
  60. package/dist/client/assets/vennDiagram-4TSXK5OY-CzLpoCxP.js +34 -0
  61. package/dist/client/assets/wardleyDiagram-VM6X3IG4-Bga8iF2e.js +78 -0
  62. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BMPq9UWm.js +7 -0
  63. package/dist/client/index.html +2 -2
  64. package/package.json +3 -3
  65. package/dist/client/assets/_basePickBy-DzL66huQ.js +0 -1
  66. package/dist/client/assets/_baseUniq-D_kA9hnK.js +0 -1
  67. package/dist/client/assets/architectureDiagram-VXUJARFQ-BmSW2FCh.js +0 -36
  68. package/dist/client/assets/blockDiagram-VD42YOAC-Duz6oS5b.js +0 -122
  69. package/dist/client/assets/c4Diagram-YG6GDRKO-Bv4P72yB.js +0 -10
  70. package/dist/client/assets/channel-ydExFSqY.js +0 -1
  71. package/dist/client/assets/chunk-B4BG7PRW-BtVwfswM.js +0 -165
  72. package/dist/client/assets/chunk-DI55MBZ5-BDdO91wt.js +0 -220
  73. package/dist/client/assets/chunk-QN33PNHL-HjKgp1PB.js +0 -1
  74. package/dist/client/assets/chunk-TZMSLE5B-DpxXSXMp.js +0 -1
  75. package/dist/client/assets/classDiagram-2ON5EDUG-Dg8dmmRD.js +0 -1
  76. package/dist/client/assets/classDiagram-v2-WZHVMYZB-Dg8dmmRD.js +0 -1
  77. package/dist/client/assets/clone-Bq6xpRgi.js +0 -1
  78. package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +0 -321
  79. package/dist/client/assets/dagre-6UL2VRFP-DZiEousR.js +0 -4
  80. package/dist/client/assets/diagram-PSM6KHXK-0_alnUMs.js +0 -24
  81. package/dist/client/assets/diagram-QEK2KX5R-KFaKVdU8.js +0 -43
  82. package/dist/client/assets/diagram-S2PKOQOG-C2Dy10VG.js +0 -24
  83. package/dist/client/assets/erDiagram-Q2GNP2WA-_P7rrcgu.js +0 -60
  84. package/dist/client/assets/flowDiagram-NV44I4VS-BvC6gSn5.js +0 -162
  85. package/dist/client/assets/ganttDiagram-JELNMOA3-DjzuVPeB.js +0 -267
  86. package/dist/client/assets/gitGraphDiagram-V2S2FVAM-B9fPDqqA.js +0 -65
  87. package/dist/client/assets/graph-BqLQdgDA.js +0 -1
  88. package/dist/client/assets/index-CAXQd1OO.js +0 -286
  89. package/dist/client/assets/index-CmSvc3Wo.css +0 -1
  90. package/dist/client/assets/infoDiagram-HS3SLOUP-DiMCwlkY.js +0 -2
  91. package/dist/client/assets/journeyDiagram-XKPGCS4Q-Dn5WdzPP.js +0 -139
  92. package/dist/client/assets/katex-DhXJpUyf.js +0 -261
  93. package/dist/client/assets/layout-Bo5pDIcD.js +0 -1
  94. package/dist/client/assets/mermaid.core-DfADLZQ1.js +0 -250
  95. package/dist/client/assets/mindmap-definition-VGOIOE7T-H5HwEwuX.js +0 -68
  96. package/dist/client/assets/pieDiagram-ADFJNKIX-RiZa5XQN.js +0 -30
  97. package/dist/client/assets/quadrantDiagram-AYHSOK5B-CFFX55h2.js +0 -7
  98. package/dist/client/assets/requirementDiagram-UZGBJVZJ-B6JBcV1I.js +0 -64
  99. package/dist/client/assets/sankeyDiagram-TZEHDZUN-GZT80dnc.js +0 -10
  100. package/dist/client/assets/sequenceDiagram-WL72ISMW-CbUqoUma.js +0 -145
  101. package/dist/client/assets/stateDiagram-FKZM4ZOC-LEb-ZQVV.js +0 -1
  102. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BYGHA8iw.js +0 -1
  103. package/dist/client/assets/timeline-definition-IT6M3QCI-Cm1Kd50N.js +0 -61
  104. package/dist/client/assets/treemap-GDKQZRPO-CWXk-dEb.js +0 -160
  105. package/dist/client/assets/xychartDiagram-PRI3JC2R-BUllxp6G.js +0 -7
  106. package/dist/core/src/apply-suggestion.d.ts +0 -76
  107. package/dist/core/src/apply-suggestion.d.ts.map +0 -1
  108. package/dist/core/src/apply-suggestion.js +0 -109
  109. package/dist/core/src/apply-suggestion.js.map +0 -1
  110. package/dist/core/src/config.d.ts +0 -3
  111. package/dist/core/src/config.d.ts.map +0 -1
  112. package/dist/core/src/config.js +0 -196
  113. package/dist/core/src/config.js.map +0 -1
  114. package/dist/core/src/diff-parser.d.ts +0 -3
  115. package/dist/core/src/diff-parser.d.ts.map +0 -1
  116. package/dist/core/src/diff-parser.js +0 -236
  117. package/dist/core/src/diff-parser.js.map +0 -1
  118. package/dist/core/src/directory-scanner.d.ts +0 -18
  119. package/dist/core/src/directory-scanner.d.ts.map +0 -1
  120. package/dist/core/src/directory-scanner.js +0 -99
  121. package/dist/core/src/directory-scanner.js.map +0 -1
  122. package/dist/core/src/fetch-comments.d.ts +0 -69
  123. package/dist/core/src/fetch-comments.d.ts.map +0 -1
  124. package/dist/core/src/fetch-comments.js +0 -180
  125. package/dist/core/src/fetch-comments.js.map +0 -1
  126. package/dist/core/src/file-type-utils.d.ts +0 -16
  127. package/dist/core/src/file-type-utils.d.ts.map +0 -1
  128. package/dist/core/src/file-type-utils.js +0 -106
  129. package/dist/core/src/file-type-utils.js.map +0 -1
  130. package/dist/core/src/forge-provider.d.ts +0 -123
  131. package/dist/core/src/forge-provider.d.ts.map +0 -1
  132. package/dist/core/src/forge-provider.js +0 -68
  133. package/dist/core/src/forge-provider.js.map +0 -1
  134. package/dist/core/src/fs-utils.d.ts +0 -7
  135. package/dist/core/src/fs-utils.d.ts.map +0 -1
  136. package/dist/core/src/fs-utils.js +0 -20
  137. package/dist/core/src/fs-utils.js.map +0 -1
  138. package/dist/core/src/git-diff-args.d.ts +0 -38
  139. package/dist/core/src/git-diff-args.d.ts.map +0 -1
  140. package/dist/core/src/git-diff-args.js +0 -170
  141. package/dist/core/src/git-diff-args.js.map +0 -1
  142. package/dist/core/src/git-diff-loader.d.ts +0 -14
  143. package/dist/core/src/git-diff-loader.d.ts.map +0 -1
  144. package/dist/core/src/git-diff-loader.js +0 -30
  145. package/dist/core/src/git-diff-loader.js.map +0 -1
  146. package/dist/core/src/git.d.ts +0 -52
  147. package/dist/core/src/git.d.ts.map +0 -1
  148. package/dist/core/src/git.js +0 -191
  149. package/dist/core/src/git.js.map +0 -1
  150. package/dist/core/src/github-provider.d.ts +0 -7
  151. package/dist/core/src/github-provider.d.ts.map +0 -1
  152. package/dist/core/src/github-provider.js +0 -151
  153. package/dist/core/src/github-provider.js.map +0 -1
  154. package/dist/core/src/gitlab-provider.d.ts +0 -10
  155. package/dist/core/src/gitlab-provider.d.ts.map +0 -1
  156. package/dist/core/src/gitlab-provider.js +0 -207
  157. package/dist/core/src/gitlab-provider.js.map +0 -1
  158. package/dist/core/src/guide-loader.d.ts +0 -23
  159. package/dist/core/src/guide-loader.d.ts.map +0 -1
  160. package/dist/core/src/guide-loader.js +0 -95
  161. package/dist/core/src/guide-loader.js.map +0 -1
  162. package/dist/core/src/guide-parser.d.ts +0 -34
  163. package/dist/core/src/guide-parser.d.ts.map +0 -1
  164. package/dist/core/src/guide-parser.js +0 -136
  165. package/dist/core/src/guide-parser.js.map +0 -1
  166. package/dist/core/src/guide-schema.d.ts +0 -2
  167. package/dist/core/src/guide-schema.d.ts.map +0 -1
  168. package/dist/core/src/guide-schema.js +0 -202
  169. package/dist/core/src/guide-schema.js.map +0 -1
  170. package/dist/core/src/ignore-filter.d.ts +0 -8
  171. package/dist/core/src/ignore-filter.d.ts.map +0 -1
  172. package/dist/core/src/ignore-filter.js +0 -16
  173. package/dist/core/src/ignore-filter.js.map +0 -1
  174. package/dist/core/src/index.d.ts +0 -38
  175. package/dist/core/src/index.d.ts.map +0 -1
  176. package/dist/core/src/index.js +0 -54
  177. package/dist/core/src/index.js.map +0 -1
  178. package/dist/core/src/materializer.d.ts +0 -60
  179. package/dist/core/src/materializer.d.ts.map +0 -1
  180. package/dist/core/src/materializer.js +0 -255
  181. package/dist/core/src/materializer.js.map +0 -1
  182. package/dist/core/src/payload-sizing.d.ts +0 -20
  183. package/dist/core/src/payload-sizing.d.ts.map +0 -1
  184. package/dist/core/src/payload-sizing.js +0 -74
  185. package/dist/core/src/payload-sizing.js.map +0 -1
  186. package/dist/core/src/remote-mode.d.ts +0 -89
  187. package/dist/core/src/remote-mode.d.ts.map +0 -1
  188. package/dist/core/src/remote-mode.js +0 -193
  189. package/dist/core/src/remote-mode.js.map +0 -1
  190. package/dist/core/src/review-handlers.d.ts +0 -160
  191. package/dist/core/src/review-handlers.d.ts.map +0 -1
  192. package/dist/core/src/review-handlers.js +0 -463
  193. package/dist/core/src/review-handlers.js.map +0 -1
  194. package/dist/core/src/staged-untracked.d.ts +0 -12
  195. package/dist/core/src/staged-untracked.d.ts.map +0 -1
  196. package/dist/core/src/staged-untracked.js +0 -21
  197. package/dist/core/src/staged-untracked.js.map +0 -1
  198. package/dist/core/src/startup-mode.d.ts +0 -6
  199. package/dist/core/src/startup-mode.d.ts.map +0 -1
  200. package/dist/core/src/startup-mode.js +0 -73
  201. package/dist/core/src/startup-mode.js.map +0 -1
  202. package/dist/core/src/synthetic-diff.d.ts +0 -21
  203. package/dist/core/src/synthetic-diff.d.ts.map +0 -1
  204. package/dist/core/src/synthetic-diff.js +0 -104
  205. package/dist/core/src/synthetic-diff.js.map +0 -1
  206. package/dist/core/src/thread-mapper.d.ts +0 -39
  207. package/dist/core/src/thread-mapper.d.ts.map +0 -1
  208. package/dist/core/src/thread-mapper.js +0 -217
  209. package/dist/core/src/thread-mapper.js.map +0 -1
  210. package/dist/core/src/types.d.ts +0 -2
  211. package/dist/core/src/types.d.ts.map +0 -1
  212. package/dist/core/src/types.js +0 -2
  213. package/dist/core/src/types.js.map +0 -1
  214. package/dist/core/src/xml-parser.d.ts +0 -15
  215. package/dist/core/src/xml-parser.d.ts.map +0 -1
  216. package/dist/core/src/xml-parser.js +0 -237
  217. package/dist/core/src/xml-parser.js.map +0 -1
  218. package/dist/core/src/xml-serializer.d.ts +0 -4
  219. package/dist/core/src/xml-serializer.d.ts.map +0 -1
  220. package/dist/core/src/xml-serializer.js +0 -923
  221. package/dist/core/src/xml-serializer.js.map +0 -1
  222. package/dist/react/src/ReviewPanel.d.ts +0 -72
  223. package/dist/react/src/ReviewPanel.d.ts.map +0 -1
  224. package/dist/react/src/ReviewPanel.js +0 -51
  225. package/dist/react/src/ReviewPanel.js.map +0 -1
  226. package/dist/react/src/SingleFileReview.d.ts +0 -49
  227. package/dist/react/src/SingleFileReview.d.ts.map +0 -1
  228. package/dist/react/src/SingleFileReview.js +0 -41
  229. package/dist/react/src/SingleFileReview.js.map +0 -1
  230. package/dist/react/src/adapter.d.ts +0 -72
  231. package/dist/react/src/adapter.d.ts.map +0 -1
  232. package/dist/react/src/adapter.js +0 -2
  233. package/dist/react/src/adapter.js.map +0 -1
  234. package/dist/react/src/components/Comments/AttachmentDropZone.d.ts +0 -10
  235. package/dist/react/src/components/Comments/AttachmentDropZone.d.ts.map +0 -1
  236. package/dist/react/src/components/Comments/AttachmentDropZone.js +0 -52
  237. package/dist/react/src/components/Comments/AttachmentDropZone.js.map +0 -1
  238. package/dist/react/src/components/Comments/AttachmentImage.d.ts +0 -6
  239. package/dist/react/src/components/Comments/AttachmentImage.d.ts.map +0 -1
  240. package/dist/react/src/components/Comments/AttachmentImage.js +0 -50
  241. package/dist/react/src/components/Comments/AttachmentImage.js.map +0 -1
  242. package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts +0 -6
  243. package/dist/react/src/components/Comments/AttachmentThumbnail.d.ts.map +0 -1
  244. package/dist/react/src/components/Comments/AttachmentThumbnail.js +0 -16
  245. package/dist/react/src/components/Comments/AttachmentThumbnail.js.map +0 -1
  246. package/dist/react/src/components/Comments/CategorySelector.d.ts +0 -6
  247. package/dist/react/src/components/Comments/CategorySelector.d.ts.map +0 -1
  248. package/dist/react/src/components/Comments/CategorySelector.js +0 -27
  249. package/dist/react/src/components/Comments/CategorySelector.js.map +0 -1
  250. package/dist/react/src/components/Comments/CommentDisplay.d.ts +0 -7
  251. package/dist/react/src/components/Comments/CommentDisplay.d.ts.map +0 -1
  252. package/dist/react/src/components/Comments/CommentDisplay.js +0 -103
  253. package/dist/react/src/components/Comments/CommentDisplay.js.map +0 -1
  254. package/dist/react/src/components/Comments/CommentInput.d.ts +0 -11
  255. package/dist/react/src/components/Comments/CommentInput.d.ts.map +0 -1
  256. package/dist/react/src/components/Comments/CommentInput.js +0 -81
  257. package/dist/react/src/components/Comments/CommentInput.js.map +0 -1
  258. package/dist/react/src/components/Comments/ComposerCore.d.ts +0 -49
  259. package/dist/react/src/components/Comments/ComposerCore.d.ts.map +0 -1
  260. package/dist/react/src/components/Comments/ComposerCore.js +0 -91
  261. package/dist/react/src/components/Comments/ComposerCore.js.map +0 -1
  262. package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts +0 -14
  263. package/dist/react/src/components/Comments/EmojiAutocomplete.d.ts.map +0 -1
  264. package/dist/react/src/components/Comments/EmojiAutocomplete.js +0 -19
  265. package/dist/react/src/components/Comments/EmojiAutocomplete.js.map +0 -1
  266. package/dist/react/src/components/Comments/ReplyDisplay.d.ts +0 -22
  267. package/dist/react/src/components/Comments/ReplyDisplay.d.ts.map +0 -1
  268. package/dist/react/src/components/Comments/ReplyDisplay.js +0 -38
  269. package/dist/react/src/components/Comments/ReplyDisplay.js.map +0 -1
  270. package/dist/react/src/components/Comments/ReplyInput.d.ts +0 -9
  271. package/dist/react/src/components/Comments/ReplyInput.d.ts.map +0 -1
  272. package/dist/react/src/components/Comments/ReplyInput.js +0 -47
  273. package/dist/react/src/components/Comments/ReplyInput.js.map +0 -1
  274. package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts +0 -27
  275. package/dist/react/src/components/Comments/SuggestionApplyControl.d.ts.map +0 -1
  276. package/dist/react/src/components/Comments/SuggestionApplyControl.js +0 -103
  277. package/dist/react/src/components/Comments/SuggestionApplyControl.js.map +0 -1
  278. package/dist/react/src/components/Comments/SuggestionBlock.d.ts +0 -26
  279. package/dist/react/src/components/Comments/SuggestionBlock.d.ts.map +0 -1
  280. package/dist/react/src/components/Comments/SuggestionBlock.js +0 -33
  281. package/dist/react/src/components/Comments/SuggestionBlock.js.map +0 -1
  282. package/dist/react/src/components/Comments/SuggestionPanel.d.ts +0 -8
  283. package/dist/react/src/components/Comments/SuggestionPanel.d.ts.map +0 -1
  284. package/dist/react/src/components/Comments/SuggestionPanel.js +0 -12
  285. package/dist/react/src/components/Comments/SuggestionPanel.js.map +0 -1
  286. package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts +0 -35
  287. package/dist/react/src/components/DiffViewer/DiffContentArea.d.ts.map +0 -1
  288. package/dist/react/src/components/DiffViewer/DiffContentArea.js +0 -40
  289. package/dist/react/src/components/DiffViewer/DiffContentArea.js.map +0 -1
  290. package/dist/react/src/components/DiffViewer/DiffViewer.d.ts +0 -4
  291. package/dist/react/src/components/DiffViewer/DiffViewer.d.ts.map +0 -1
  292. package/dist/react/src/components/DiffViewer/DiffViewer.js +0 -110
  293. package/dist/react/src/components/DiffViewer/DiffViewer.js.map +0 -1
  294. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts +0 -6
  295. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.d.ts.map +0 -1
  296. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js +0 -18
  297. package/dist/react/src/components/DiffViewer/EmptyDiffMessage.js.map +0 -1
  298. package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts +0 -2
  299. package/dist/react/src/components/DiffViewer/EmptyLinePane.d.ts.map +0 -1
  300. package/dist/react/src/components/DiffViewer/EmptyLinePane.js +0 -5
  301. package/dist/react/src/components/DiffViewer/EmptyLinePane.js.map +0 -1
  302. package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts +0 -10
  303. package/dist/react/src/components/DiffViewer/ExpandContextBar.d.ts.map +0 -1
  304. package/dist/react/src/components/DiffViewer/ExpandContextBar.js +0 -16
  305. package/dist/react/src/components/DiffViewer/ExpandContextBar.js.map +0 -1
  306. package/dist/react/src/components/DiffViewer/FileSection.d.ts +0 -9
  307. package/dist/react/src/components/DiffViewer/FileSection.d.ts.map +0 -1
  308. package/dist/react/src/components/DiffViewer/FileSection.js +0 -137
  309. package/dist/react/src/components/DiffViewer/FileSection.js.map +0 -1
  310. package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts +0 -13
  311. package/dist/react/src/components/DiffViewer/FileSectionBody.d.ts.map +0 -1
  312. package/dist/react/src/components/DiffViewer/FileSectionBody.js +0 -8
  313. package/dist/react/src/components/DiffViewer/FileSectionBody.js.map +0 -1
  314. package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts +0 -16
  315. package/dist/react/src/components/DiffViewer/FileSectionHeader.d.ts.map +0 -1
  316. package/dist/react/src/components/DiffViewer/FileSectionHeader.js +0 -53
  317. package/dist/react/src/components/DiffViewer/FileSectionHeader.js.map +0 -1
  318. package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts +0 -6
  319. package/dist/react/src/components/DiffViewer/FrontMatterTable.d.ts.map +0 -1
  320. package/dist/react/src/components/DiffViewer/FrontMatterTable.js +0 -30
  321. package/dist/react/src/components/DiffViewer/FrontMatterTable.js.map +0 -1
  322. package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts +0 -20
  323. package/dist/react/src/components/DiffViewer/GuideChapterDivider.d.ts.map +0 -1
  324. package/dist/react/src/components/DiffViewer/GuideChapterDivider.js +0 -27
  325. package/dist/react/src/components/DiffViewer/GuideChapterDivider.js.map +0 -1
  326. package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts +0 -16
  327. package/dist/react/src/components/DiffViewer/GuideOverviewContent.d.ts.map +0 -1
  328. package/dist/react/src/components/DiffViewer/GuideOverviewContent.js +0 -56
  329. package/dist/react/src/components/DiffViewer/GuideOverviewContent.js.map +0 -1
  330. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts +0 -12
  331. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.d.ts.map +0 -1
  332. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js +0 -13
  333. package/dist/react/src/components/DiffViewer/GuideOverviewDialog.js.map +0 -1
  334. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts +0 -8
  335. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.d.ts.map +0 -1
  336. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js +0 -16
  337. package/dist/react/src/components/DiffViewer/GuideOverviewPanel.js.map +0 -1
  338. package/dist/react/src/components/DiffViewer/HunkHeader.d.ts +0 -5
  339. package/dist/react/src/components/DiffViewer/HunkHeader.d.ts.map +0 -1
  340. package/dist/react/src/components/DiffViewer/HunkHeader.js +0 -5
  341. package/dist/react/src/components/DiffViewer/HunkHeader.js.map +0 -1
  342. package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts +0 -18
  343. package/dist/react/src/components/DiffViewer/InlineCommentSlot.d.ts.map +0 -1
  344. package/dist/react/src/components/DiffViewer/InlineCommentSlot.js +0 -13
  345. package/dist/react/src/components/DiffViewer/InlineCommentSlot.js.map +0 -1
  346. package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts +0 -9
  347. package/dist/react/src/components/DiffViewer/MarkdownCode.d.ts.map +0 -1
  348. package/dist/react/src/components/DiffViewer/MarkdownCode.js +0 -24
  349. package/dist/react/src/components/DiffViewer/MarkdownCode.js.map +0 -1
  350. package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts +0 -4
  351. package/dist/react/src/components/DiffViewer/MermaidBlock.d.ts.map +0 -1
  352. package/dist/react/src/components/DiffViewer/MermaidBlock.js +0 -51
  353. package/dist/react/src/components/DiffViewer/MermaidBlock.js.map +0 -1
  354. package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts +0 -8
  355. package/dist/react/src/components/DiffViewer/RenderedImageView.d.ts.map +0 -1
  356. package/dist/react/src/components/DiffViewer/RenderedImageView.js +0 -46
  357. package/dist/react/src/components/DiffViewer/RenderedImageView.js.map +0 -1
  358. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts +0 -16
  359. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.d.ts.map +0 -1
  360. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js +0 -324
  361. package/dist/react/src/components/DiffViewer/RenderedMarkdownView.js.map +0 -1
  362. package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts +0 -7
  363. package/dist/react/src/components/DiffViewer/RenderedSvgView.d.ts.map +0 -1
  364. package/dist/react/src/components/DiffViewer/RenderedSvgView.js +0 -21
  365. package/dist/react/src/components/DiffViewer/RenderedSvgView.js.map +0 -1
  366. package/dist/react/src/components/DiffViewer/SplitView.d.ts +0 -23
  367. package/dist/react/src/components/DiffViewer/SplitView.d.ts.map +0 -1
  368. package/dist/react/src/components/DiffViewer/SplitView.js +0 -137
  369. package/dist/react/src/components/DiffViewer/SplitView.js.map +0 -1
  370. package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts +0 -49
  371. package/dist/react/src/components/DiffViewer/SyntaxLine.d.ts.map +0 -1
  372. package/dist/react/src/components/DiffViewer/SyntaxLine.js +0 -73
  373. package/dist/react/src/components/DiffViewer/SyntaxLine.js.map +0 -1
  374. package/dist/react/src/components/DiffViewer/UnifiedView.d.ts +0 -23
  375. package/dist/react/src/components/DiffViewer/UnifiedView.d.ts.map +0 -1
  376. package/dist/react/src/components/DiffViewer/UnifiedView.js +0 -96
  377. package/dist/react/src/components/DiffViewer/UnifiedView.js.map +0 -1
  378. package/dist/react/src/components/DiffViewer/diff-utils.d.ts +0 -31
  379. package/dist/react/src/components/DiffViewer/diff-utils.d.ts.map +0 -1
  380. package/dist/react/src/components/DiffViewer/diff-utils.js +0 -134
  381. package/dist/react/src/components/DiffViewer/diff-utils.js.map +0 -1
  382. package/dist/react/src/components/DiffViewer/useDragSelection.d.ts +0 -25
  383. package/dist/react/src/components/DiffViewer/useDragSelection.d.ts.map +0 -1
  384. package/dist/react/src/components/DiffViewer/useDragSelection.js +0 -210
  385. package/dist/react/src/components/DiffViewer/useDragSelection.js.map +0 -1
  386. package/dist/react/src/components/DiffViewer/useExpandContext.d.ts +0 -15
  387. package/dist/react/src/components/DiffViewer/useExpandContext.d.ts.map +0 -1
  388. package/dist/react/src/components/DiffViewer/useExpandContext.js +0 -209
  389. package/dist/react/src/components/DiffViewer/useExpandContext.js.map +0 -1
  390. package/dist/react/src/components/FileTree.d.ts +0 -2
  391. package/dist/react/src/components/FileTree.d.ts.map +0 -1
  392. package/dist/react/src/components/FileTree.js +0 -93
  393. package/dist/react/src/components/FileTree.js.map +0 -1
  394. package/dist/react/src/components/FileTreeEntry.d.ts +0 -13
  395. package/dist/react/src/components/FileTreeEntry.d.ts.map +0 -1
  396. package/dist/react/src/components/FileTreeEntry.js +0 -21
  397. package/dist/react/src/components/FileTreeEntry.js.map +0 -1
  398. package/dist/react/src/components/FileTreeToggle.d.ts +0 -15
  399. package/dist/react/src/components/FileTreeToggle.d.ts.map +0 -1
  400. package/dist/react/src/components/FileTreeToggle.js +0 -16
  401. package/dist/react/src/components/FileTreeToggle.js.map +0 -1
  402. package/dist/react/src/components/GuideRouteHud.d.ts +0 -10
  403. package/dist/react/src/components/GuideRouteHud.d.ts.map +0 -1
  404. package/dist/react/src/components/GuideRouteHud.js +0 -43
  405. package/dist/react/src/components/GuideRouteHud.js.map +0 -1
  406. package/dist/react/src/components/GuideRouteMap.d.ts +0 -20
  407. package/dist/react/src/components/GuideRouteMap.d.ts.map +0 -1
  408. package/dist/react/src/components/GuideRouteMap.js +0 -58
  409. package/dist/react/src/components/GuideRouteMap.js.map +0 -1
  410. package/dist/react/src/components/GuideStation.d.ts +0 -28
  411. package/dist/react/src/components/GuideStation.d.ts.map +0 -1
  412. package/dist/react/src/components/GuideStation.js +0 -24
  413. package/dist/react/src/components/GuideStation.js.map +0 -1
  414. package/dist/react/src/components/HintOverlay.d.ts +0 -13
  415. package/dist/react/src/components/HintOverlay.d.ts.map +0 -1
  416. package/dist/react/src/components/HintOverlay.js +0 -27
  417. package/dist/react/src/components/HintOverlay.js.map +0 -1
  418. package/dist/react/src/components/KeyboardNavigationManager.d.ts +0 -2
  419. package/dist/react/src/components/KeyboardNavigationManager.d.ts.map +0 -1
  420. package/dist/react/src/components/KeyboardNavigationManager.js +0 -8
  421. package/dist/react/src/components/KeyboardNavigationManager.js.map +0 -1
  422. package/dist/react/src/components/Layout.d.ts +0 -2
  423. package/dist/react/src/components/Layout.d.ts.map +0 -1
  424. package/dist/react/src/components/Layout.js +0 -63
  425. package/dist/react/src/components/Layout.js.map +0 -1
  426. package/dist/react/src/components/ReviewProgress.d.ts +0 -2
  427. package/dist/react/src/components/ReviewProgress.d.ts.map +0 -1
  428. package/dist/react/src/components/ReviewProgress.js +0 -25
  429. package/dist/react/src/components/ReviewProgress.js.map +0 -1
  430. package/dist/react/src/components/Toolbar.d.ts +0 -6
  431. package/dist/react/src/components/Toolbar.d.ts.map +0 -1
  432. package/dist/react/src/components/Toolbar.js +0 -61
  433. package/dist/react/src/components/Toolbar.js.map +0 -1
  434. package/dist/react/src/components/TruncatedPath.d.ts +0 -7
  435. package/dist/react/src/components/TruncatedPath.d.ts.map +0 -1
  436. package/dist/react/src/components/TruncatedPath.js +0 -15
  437. package/dist/react/src/components/TruncatedPath.js.map +0 -1
  438. package/dist/react/src/components/ui/badge.d.ts +0 -10
  439. package/dist/react/src/components/ui/badge.d.ts.map +0 -1
  440. package/dist/react/src/components/ui/badge.js +0 -21
  441. package/dist/react/src/components/ui/badge.js.map +0 -1
  442. package/dist/react/src/components/ui/button.d.ts +0 -11
  443. package/dist/react/src/components/ui/button.d.ts.map +0 -1
  444. package/dist/react/src/components/ui/button.js +0 -32
  445. package/dist/react/src/components/ui/button.js.map +0 -1
  446. package/dist/react/src/components/ui/dialog.d.ts +0 -12
  447. package/dist/react/src/components/ui/dialog.d.ts.map +0 -1
  448. package/dist/react/src/components/ui/dialog.js +0 -23
  449. package/dist/react/src/components/ui/dialog.js.map +0 -1
  450. package/dist/react/src/components/ui/input.d.ts +0 -4
  451. package/dist/react/src/components/ui/input.d.ts.map +0 -1
  452. package/dist/react/src/components/ui/input.js +0 -9
  453. package/dist/react/src/components/ui/input.js.map +0 -1
  454. package/dist/react/src/components/ui/separator.d.ts +0 -6
  455. package/dist/react/src/components/ui/separator.d.ts.map +0 -1
  456. package/dist/react/src/components/ui/separator.js +0 -8
  457. package/dist/react/src/components/ui/separator.js.map +0 -1
  458. package/dist/react/src/components/ui/table.d.ts +0 -11
  459. package/dist/react/src/components/ui/table.d.ts.map +0 -1
  460. package/dist/react/src/components/ui/table.js +0 -21
  461. package/dist/react/src/components/ui/table.js.map +0 -1
  462. package/dist/react/src/components/ui/textarea.d.ts +0 -4
  463. package/dist/react/src/components/ui/textarea.d.ts.map +0 -1
  464. package/dist/react/src/components/ui/textarea.js +0 -9
  465. package/dist/react/src/components/ui/textarea.js.map +0 -1
  466. package/dist/react/src/components/ui/toggle-group.d.ts +0 -22
  467. package/dist/react/src/components/ui/toggle-group.d.ts.map +0 -1
  468. package/dist/react/src/components/ui/toggle-group.js +0 -48
  469. package/dist/react/src/components/ui/toggle-group.js.map +0 -1
  470. package/dist/react/src/components/ui/tooltip.d.ts +0 -16
  471. package/dist/react/src/components/ui/tooltip.d.ts.map +0 -1
  472. package/dist/react/src/components/ui/tooltip.js +0 -21
  473. package/dist/react/src/components/ui/tooltip.js.map +0 -1
  474. package/dist/react/src/context/ConfigContext.d.ts +0 -26
  475. package/dist/react/src/context/ConfigContext.d.ts.map +0 -1
  476. package/dist/react/src/context/ConfigContext.js +0 -150
  477. package/dist/react/src/context/ConfigContext.js.map +0 -1
  478. package/dist/react/src/context/DiffNavigationContext.d.ts +0 -16
  479. package/dist/react/src/context/DiffNavigationContext.d.ts.map +0 -1
  480. package/dist/react/src/context/DiffNavigationContext.js +0 -79
  481. package/dist/react/src/context/DiffNavigationContext.js.map +0 -1
  482. package/dist/react/src/context/GuideContext.d.ts +0 -28
  483. package/dist/react/src/context/GuideContext.d.ts.map +0 -1
  484. package/dist/react/src/context/GuideContext.js +0 -64
  485. package/dist/react/src/context/GuideContext.js.map +0 -1
  486. package/dist/react/src/context/ReviewAdapterContext.d.ts +0 -9
  487. package/dist/react/src/context/ReviewAdapterContext.d.ts.map +0 -1
  488. package/dist/react/src/context/ReviewAdapterContext.js +0 -10
  489. package/dist/react/src/context/ReviewAdapterContext.js.map +0 -1
  490. package/dist/react/src/context/ReviewContext.d.ts +0 -60
  491. package/dist/react/src/context/ReviewContext.d.ts.map +0 -1
  492. package/dist/react/src/context/ReviewContext.js +0 -233
  493. package/dist/react/src/context/ReviewContext.js.map +0 -1
  494. package/dist/react/src/hooks/useDiffNavigation.d.ts +0 -4
  495. package/dist/react/src/hooks/useDiffNavigation.d.ts.map +0 -1
  496. package/dist/react/src/hooks/useDiffNavigation.js +0 -5
  497. package/dist/react/src/hooks/useDiffNavigation.js.map +0 -1
  498. package/dist/react/src/hooks/useEmojiAutocomplete.d.ts +0 -24
  499. package/dist/react/src/hooks/useEmojiAutocomplete.d.ts.map +0 -1
  500. package/dist/react/src/hooks/useEmojiAutocomplete.js +0 -175
  501. package/dist/react/src/hooks/useEmojiAutocomplete.js.map +0 -1
  502. package/dist/react/src/hooks/useKeyboardNavigation.d.ts +0 -15
  503. package/dist/react/src/hooks/useKeyboardNavigation.d.ts.map +0 -1
  504. package/dist/react/src/hooks/useKeyboardNavigation.js +0 -227
  505. package/dist/react/src/hooks/useKeyboardNavigation.js.map +0 -1
  506. package/dist/react/src/hooks/useReviewBridge.d.ts +0 -15
  507. package/dist/react/src/hooks/useReviewBridge.d.ts.map +0 -1
  508. package/dist/react/src/hooks/useReviewBridge.js +0 -43
  509. package/dist/react/src/hooks/useReviewBridge.js.map +0 -1
  510. package/dist/react/src/hooks/useReviewState.d.ts +0 -16
  511. package/dist/react/src/hooks/useReviewState.d.ts.map +0 -1
  512. package/dist/react/src/hooks/useReviewState.js +0 -101
  513. package/dist/react/src/hooks/useReviewState.js.map +0 -1
  514. package/dist/react/src/index.d.ts +0 -25
  515. package/dist/react/src/index.d.ts.map +0 -1
  516. package/dist/react/src/index.js +0 -22
  517. package/dist/react/src/index.js.map +0 -1
  518. package/dist/react/src/lib/utils.d.ts +0 -3
  519. package/dist/react/src/lib/utils.d.ts.map +0 -1
  520. package/dist/react/src/lib/utils.js +0 -6
  521. package/dist/react/src/lib/utils.js.map +0 -1
  522. package/dist/react/src/utils/category-utils.d.ts +0 -17
  523. package/dist/react/src/utils/category-utils.d.ts.map +0 -1
  524. package/dist/react/src/utils/category-utils.js +0 -23
  525. package/dist/react/src/utils/category-utils.js.map +0 -1
  526. package/dist/react/src/utils/comment-anchors.d.ts +0 -4
  527. package/dist/react/src/utils/comment-anchors.d.ts.map +0 -1
  528. package/dist/react/src/utils/comment-anchors.js +0 -17
  529. package/dist/react/src/utils/comment-anchors.js.map +0 -1
  530. package/dist/react/src/utils/diff-styles.d.ts +0 -12
  531. package/dist/react/src/utils/diff-styles.d.ts.map +0 -1
  532. package/dist/react/src/utils/diff-styles.js +0 -46
  533. package/dist/react/src/utils/diff-styles.js.map +0 -1
  534. package/dist/react/src/utils/emoji-data.d.ts +0 -8
  535. package/dist/react/src/utils/emoji-data.d.ts.map +0 -1
  536. package/dist/react/src/utils/emoji-data.js +0 -43
  537. package/dist/react/src/utils/emoji-data.js.map +0 -1
  538. package/dist/react/src/utils/file-type-utils.d.ts +0 -20
  539. package/dist/react/src/utils/file-type-utils.d.ts.map +0 -1
  540. package/dist/react/src/utils/file-type-utils.js +0 -110
  541. package/dist/react/src/utils/file-type-utils.js.map +0 -1
  542. package/dist/react/src/utils/front-matter.d.ts +0 -14
  543. package/dist/react/src/utils/front-matter.d.ts.map +0 -1
  544. package/dist/react/src/utils/front-matter.js +0 -40
  545. package/dist/react/src/utils/front-matter.js.map +0 -1
  546. package/dist/react/src/utils/guide-accents.d.ts +0 -46
  547. package/dist/react/src/utils/guide-accents.d.ts.map +0 -1
  548. package/dist/react/src/utils/guide-accents.js +0 -100
  549. package/dist/react/src/utils/guide-accents.js.map +0 -1
  550. package/dist/react/src/utils/guide-display.d.ts +0 -48
  551. package/dist/react/src/utils/guide-display.d.ts.map +0 -1
  552. package/dist/react/src/utils/guide-display.js +0 -75
  553. package/dist/react/src/utils/guide-display.js.map +0 -1
  554. package/dist/react/src/utils/image-utils.d.ts +0 -3
  555. package/dist/react/src/utils/image-utils.d.ts.map +0 -1
  556. package/dist/react/src/utils/image-utils.js +0 -33
  557. package/dist/react/src/utils/image-utils.js.map +0 -1
  558. package/dist/react/src/utils/passive-content.d.ts +0 -9
  559. package/dist/react/src/utils/passive-content.d.ts.map +0 -1
  560. package/dist/react/src/utils/passive-content.js +0 -135
  561. package/dist/react/src/utils/passive-content.js.map +0 -1
  562. package/dist/react/src/utils/remark-emoji.d.ts +0 -3
  563. package/dist/react/src/utils/remark-emoji.d.ts.map +0 -1
  564. package/dist/react/src/utils/remark-emoji.js +0 -38
  565. package/dist/react/src/utils/remark-emoji.js.map +0 -1
  566. package/dist/serve/src/args.d.ts +0 -15
  567. package/dist/serve/src/args.d.ts.map +0 -1
  568. package/dist/serve/src/args.js +0 -65
  569. package/dist/serve/src/args.js.map +0 -1
  570. package/dist/serve/src/cli.d.ts +0 -3
  571. package/dist/serve/src/cli.d.ts.map +0 -1
  572. package/dist/serve/src/cli.js +0 -81
  573. package/dist/serve/src/cli.js.map +0 -1
  574. package/dist/serve/src/client/adapter.d.ts +0 -25
  575. package/dist/serve/src/client/adapter.d.ts.map +0 -1
  576. package/dist/serve/src/client/adapter.js +0 -190
  577. package/dist/serve/src/client/adapter.js.map +0 -1
  578. package/dist/serve/src/client/index.d.ts +0 -2
  579. package/dist/serve/src/client/index.d.ts.map +0 -1
  580. package/dist/serve/src/client/index.js +0 -135
  581. package/dist/serve/src/client/index.js.map +0 -1
  582. package/dist/serve/src/lifecycle.d.ts +0 -27
  583. package/dist/serve/src/lifecycle.d.ts.map +0 -1
  584. package/dist/serve/src/lifecycle.js +0 -73
  585. package/dist/serve/src/lifecycle.js.map +0 -1
  586. package/dist/serve/src/server.d.ts +0 -34
  587. package/dist/serve/src/server.d.ts.map +0 -1
  588. package/dist/serve/src/server.js +0 -430
  589. package/dist/serve/src/server.js.map +0 -1
  590. package/dist/serve/src/startup.d.ts +0 -19
  591. package/dist/serve/src/startup.d.ts.map +0 -1
  592. package/dist/serve/src/startup.js +0 -117
  593. package/dist/serve/src/startup.js.map +0 -1
  594. package/dist/serve/src/validate.d.ts +0 -44
  595. package/dist/serve/src/validate.d.ts.map +0 -1
  596. package/dist/serve/src/validate.js +0 -295
  597. package/dist/serve/src/validate.js.map +0 -1
  598. package/dist/types/src/index.d.ts +0 -417
  599. package/dist/types/src/index.d.ts.map +0 -1
  600. package/dist/types/src/index.js +0 -5
  601. package/dist/types/src/index.js.map +0 -1
@@ -1,430 +0,0 @@
1
- // Eight JSON routes over one ReviewSession, each a thin wrapper over a function
2
- // core already exports, plus static serving for the client bundle. node:http,
3
- // no framework.
4
- //
5
- // Two properties are load-bearing: every route validates before core runs, and
6
- // the listener both binds to loopback and refuses requests that name anything
7
- // else. Binding alone is not enough — a web page can reach a loopback port, and
8
- // DNS rebinding would make it same-origin. There is no authentication.
9
- import * as fs from 'node:fs';
10
- import * as http from 'node:http';
11
- import * as path from 'node:path';
12
- import { fileURLToPath } from 'node:url';
13
- import { getDiffLoad, getConfigLoad, getResumeLoad, getFileHunks, loadImage, readAttachment, expandContext, submitReviewState, applySuggestionForSession, } from '@self-review/core';
14
- import { containPath, parseExpandContextBody, parseReviewStateBody, parseSuggestionApplyBody, } from './validate';
15
- /** `client/` next to this module, which is `dist/client/` once built. */
16
- export const CLIENT_DIR = fileURLToPath(new URL('./client/', import.meta.url));
17
- /** Upper bound on a `POST /api/expand-context` body: a path and an integer. */
18
- export const MAX_EXPAND_CONTEXT_BODY_BYTES = 64 * 1024;
19
- /** Generous but finite: an unbounded read is a trivial denial of service. */
20
- export const MAX_REVIEW_BODY_BYTES = 32 * 1024 * 1024;
21
- const CONTENT_TYPES = {
22
- '.html': 'text/html; charset=utf-8',
23
- '.js': 'text/javascript; charset=utf-8',
24
- '.mjs': 'text/javascript; charset=utf-8',
25
- '.css': 'text/css; charset=utf-8',
26
- '.map': 'application/json; charset=utf-8',
27
- '.json': 'application/json; charset=utf-8',
28
- '.svg': 'image/svg+xml',
29
- '.png': 'image/png',
30
- '.ico': 'image/x-icon',
31
- '.woff': 'font/woff',
32
- '.woff2': 'font/woff2',
33
- '.txt': 'text/plain; charset=utf-8',
34
- };
35
- /**
36
- * The page renders the diff under review, which is the least trusted input the
37
- * program handles. Rendered content is sanitized before it becomes elements;
38
- * this is the second line, for whatever gets past that.
39
- *
40
- * Inline styles are allowed because index.html carries a <style> block and
41
- * bundled libraries inject at runtime; blob: because attachments display
42
- * through createObjectURL.
43
- */
44
- const CSP = [
45
- "default-src 'self'",
46
- "script-src 'self'",
47
- "style-src 'self' 'unsafe-inline'",
48
- "img-src 'self' data: blob:",
49
- "font-src 'self' data:",
50
- "connect-src 'self'",
51
- "frame-src 'none'",
52
- "child-src 'none'",
53
- "object-src 'none'",
54
- "base-uri 'none'",
55
- "form-action 'none'",
56
- "frame-ancestors 'none'",
57
- ].join('; ');
58
- const SECURITY_HEADERS = {
59
- 'content-security-policy': CSP,
60
- 'x-content-type-options': 'nosniff',
61
- 'x-frame-options': 'DENY',
62
- 'referrer-policy': 'no-referrer',
63
- };
64
- /** A browser may resolve the printed URL either way, or prefer IPv6. */
65
- const LOOPBACK_HOSTNAMES = new Set(['127.0.0.1', 'localhost', '[::1]']);
66
- /** Lowercased, with an explicit `:80` dropped so it matches the bare host. */
67
- function normalizeHost(value) {
68
- const lowered = value.toLowerCase();
69
- return lowered.endsWith(':80') ? lowered.slice(0, -3) : lowered;
70
- }
71
- /**
72
- * A rebound request — an attacker's name re-resolved to 127.0.0.1 after the
73
- * page loads — still carries that name in `Host`, which is what distinguishes
74
- * it from a real one.
75
- *
76
- * The port is deliberately not compared against the bound port: an `ssh -L`
77
- * forward arrives carrying the forward's port, and refusing that would break
78
- * the use case this package exists for. It would buy nothing either, since a
79
- * rebound request fails on the hostname first.
80
- *
81
- * A duplicate `Host` is refused, not resolved: Node reads the first, and an
82
- * intermediary forwarding the last would be reading a different request.
83
- */
84
- function hostIsLoopback(req) {
85
- const host = req.headers.host;
86
- if (host === undefined)
87
- return false;
88
- let seen = 0;
89
- for (let i = 0; i < req.rawHeaders.length; i += 2) {
90
- if (req.rawHeaders[i].toLowerCase() === 'host')
91
- seen++;
92
- }
93
- if (seen !== 1)
94
- return false;
95
- // Split the optional port off, keeping an IPv6 literal's brackets.
96
- const match = /^(\[[^\]]*\]|[^:]*)(?::(\d+))?$/.exec(host);
97
- if (match === null)
98
- return false;
99
- return LOOPBACK_HOSTNAMES.has(match[1].toLowerCase());
100
- }
101
- /**
102
- * A missing `Origin` is allowed — navigations and curl send none. Rejected is
103
- * an `Origin` naming a different authority than `Host`, including the `null` a
104
- * sandboxed frame sends.
105
- *
106
- * Comparing against `Host` rather than a loopback allowlist is what survives a
107
- * port forward while still refusing another local page: a dev server on :3000
108
- * sends its own origin and this listener's host, and those differ.
109
- */
110
- function originMatchesHost(req) {
111
- const origin = req.headers.origin;
112
- if (origin === undefined)
113
- return true;
114
- const host = req.headers.host;
115
- if (host === undefined)
116
- return false;
117
- let parsed;
118
- try {
119
- parsed = new URL(origin);
120
- }
121
- catch {
122
- return false;
123
- }
124
- if (parsed.protocol !== 'http:')
125
- return false;
126
- // `new URL` parses away userinfo, paths and leading-zero ports, any of which
127
- // would compare equal to this authority. A browser sends none of them.
128
- if (origin !== `${parsed.protocol}//${parsed.host}`)
129
- return false;
130
- return normalizeHost(parsed.host) === normalizeHost(host);
131
- }
132
- /**
133
- * Set by the browser, unforgeable by page script. A cross-site *GET* — an <img>
134
- * aimed at this port — carries no `Origin`, so without this it would be served
135
- * and only the absence of CORS headers would stop the page reading it.
136
- *
137
- * Non-browser clients send no such header and are unaffected.
138
- */
139
- function fetchSiteIsSelf(req) {
140
- const site = req.headers['sec-fetch-site'];
141
- if (site === undefined)
142
- return true;
143
- return site === 'same-origin' || site === 'none';
144
- }
145
- function sendJson(res, status, value, headers = {}) {
146
- res.writeHead(status, {
147
- 'content-type': 'application/json; charset=utf-8',
148
- 'cache-control': 'no-store',
149
- ...SECURITY_HEADERS,
150
- ...headers,
151
- });
152
- // `JSON.stringify(undefined)` is undefined; a void core result becomes `null`.
153
- res.end(JSON.stringify(value ?? null));
154
- }
155
- function sendError(res, status, error) {
156
- // A body that blew the cap is not read further; close the connection rather
157
- // than let the rest of it be reinterpreted as a next request.
158
- sendJson(res, status, { error }, status === 413 ? { connection: 'close' } : {});
159
- }
160
- /**
161
- * Contain the `path` parameter under the repository root. Returns it both as
162
- * sent (core interprets it relative to the repository) and resolved (for a
163
- * handler reading disk directly), or answers 400 and returns null.
164
- */
165
- function requireContainedPath(ctx) {
166
- const raw = ctx.url.searchParams.get('path');
167
- const resolved = raw ? containPath(ctx.repositoryRoot, raw) : null;
168
- if (raw === null || resolved === null) {
169
- sendError(ctx.res, 400, 'path must be a file under the repository root');
170
- return null;
171
- }
172
- return { raw, resolved };
173
- }
174
- /**
175
- * The declared length is checked before a byte is read and the running total
176
- * during it, so a chunked body without a length is capped too.
177
- */
178
- function readJsonBody(req, maxBytes) {
179
- const contentType = req.headers['content-type'] ?? '';
180
- if (!contentType.toLowerCase().startsWith('application/json')) {
181
- return Promise.resolve({
182
- ok: false,
183
- status: 415,
184
- error: 'content-type must be application/json',
185
- });
186
- }
187
- const declared = Number(req.headers['content-length']);
188
- if (Number.isFinite(declared) && declared > maxBytes) {
189
- return Promise.resolve({ ok: false, status: 413, error: 'request body too large' });
190
- }
191
- return new Promise(resolve => {
192
- const chunks = [];
193
- let received = 0;
194
- req.on('data', (chunk) => {
195
- received += chunk.length;
196
- if (received > maxBytes) {
197
- chunks.length = 0;
198
- req.removeAllListeners('data');
199
- req.removeAllListeners('end');
200
- resolve({ ok: false, status: 413, error: 'request body too large' });
201
- return;
202
- }
203
- chunks.push(chunk);
204
- });
205
- req.on('end', () => {
206
- try {
207
- resolve({ ok: true, value: JSON.parse(Buffer.concat(chunks).toString('utf-8')) });
208
- }
209
- catch {
210
- resolve({ ok: false, status: 400, error: 'body must be valid JSON' });
211
- }
212
- });
213
- req.on('error', () => {
214
- resolve({ ok: false, status: 400, error: 'request body could not be read' });
215
- });
216
- });
217
- }
218
- // Each route validates, calls exactly one core function, and sends its result.
219
- const routes = {
220
- 'GET /api/diff': async ({ res, session }) => {
221
- // The guide rides with the diff, so the client needs no push channel.
222
- sendJson(res, 200, getDiffLoad(session));
223
- },
224
- 'GET /api/config': async ({ res, session }) => {
225
- sendJson(res, 200, getConfigLoad(session));
226
- },
227
- 'GET /api/resume': async ({ res, session }) => {
228
- sendJson(res, 200, getResumeLoad(session));
229
- },
230
- 'GET /api/file': async (ctx) => {
231
- const contained = requireContainedPath(ctx);
232
- if (contained === null)
233
- return;
234
- // Diff paths are repository-relative strings; core matches on them as sent.
235
- sendJson(ctx.res, 200, getFileHunks(ctx.session, contained.raw));
236
- },
237
- 'GET /api/image': async (ctx) => {
238
- const contained = requireContainedPath(ctx);
239
- if (contained === null)
240
- return;
241
- // Core resolves against the repository itself, so it gets the raw value.
242
- sendJson(ctx.res, 200, await loadImage(ctx.session, contained.raw));
243
- },
244
- 'GET /api/attachment': async (ctx) => {
245
- // A different namespace from diff paths, and a different root: review.xml
246
- // records these relative to the output file's directory. Rooting them at
247
- // the repository 404s every resumed image when -o points elsewhere.
248
- const assetRoot = ctx.session.outputPathInfo
249
- ? path.dirname(ctx.session.outputPathInfo.resolvedOutputPath)
250
- : ctx.repositoryRoot;
251
- const raw = ctx.url.searchParams.get('path');
252
- const resolved = raw ? containPath(assetRoot, raw) : null;
253
- if (resolved === null) {
254
- sendError(ctx.res, 400, 'path must be a file under the output directory');
255
- return;
256
- }
257
- // Core reads this path from disk directly, so it gets the contained real path.
258
- const data = await readAttachment(resolved);
259
- if (data === null) {
260
- sendError(ctx.res, 404, 'attachment not found');
261
- return;
262
- }
263
- const { res } = ctx;
264
- res.writeHead(200, {
265
- 'content-type': 'application/octet-stream',
266
- 'cache-control': 'no-store',
267
- ...SECURITY_HEADERS,
268
- });
269
- res.end(Buffer.from(data));
270
- },
271
- 'POST /api/expand-context': async ({ req, res, session, repositoryRoot }) => {
272
- const body = await readJsonBody(req, MAX_EXPAND_CONTEXT_BODY_BYTES);
273
- if (!body.ok) {
274
- sendError(res, body.status, body.error);
275
- return;
276
- }
277
- const parsed = parseExpandContextBody(body.value);
278
- if (!parsed.ok) {
279
- sendError(res, 400, parsed.error);
280
- return;
281
- }
282
- // Becomes a git pathspec; contain it, then pass it through as sent.
283
- if (containPath(repositoryRoot, parsed.value.filePath) === null) {
284
- sendError(res, 400, 'filePath must be a file under the repository root');
285
- return;
286
- }
287
- sendJson(res, 200, await expandContext(session, parsed.value));
288
- },
289
- // The one route that rewrites a file in the reviewed tree. Core refuses
290
- // unless the anchored lines still match the suggestion's recorded original
291
- // byte for byte, and resolves the destination itself; the path is contained
292
- // here so a request cannot even name a file outside the repository.
293
- 'POST /api/apply-suggestion': async ({ req, res, session, repositoryRoot }) => {
294
- const body = await readJsonBody(req, MAX_EXPAND_CONTEXT_BODY_BYTES);
295
- if (!body.ok) {
296
- sendError(res, body.status, body.error);
297
- return;
298
- }
299
- const parsed = parseSuggestionApplyBody(body.value);
300
- if (!parsed.ok) {
301
- sendError(res, 400, parsed.error);
302
- return;
303
- }
304
- if (containPath(repositoryRoot, parsed.value.filePath) === null) {
305
- sendError(res, 400, 'filePath must be a file under the repository root');
306
- return;
307
- }
308
- sendJson(res, 200, applySuggestionForSession(session, parsed.value));
309
- },
310
- 'POST /api/review': async ({ req, res, session }) => {
311
- const body = await readJsonBody(req, MAX_REVIEW_BODY_BYTES);
312
- if (!body.ok) {
313
- sendError(res, body.status, body.error);
314
- return;
315
- }
316
- const parsed = parseReviewStateBody(body.value);
317
- if (!parsed.ok) {
318
- sendError(res, 400, parsed.error);
319
- return;
320
- }
321
- submitReviewState(session, parsed.value);
322
- sendJson(res, 200, null);
323
- },
324
- };
325
- const ROUTE_PATHS = new Set(Object.keys(routes).map(key => key.split(' ')[1]));
326
- /**
327
- * `/` is index.html; everything else is contained under the client directory.
328
- * Anything that is not a regular file under it is a 404.
329
- */
330
- async function serveStatic(res, clientDir, pathname) {
331
- let decoded;
332
- try {
333
- decoded = decodeURIComponent(pathname);
334
- }
335
- catch {
336
- sendError(res, 404, 'not found');
337
- return;
338
- }
339
- const relative = decoded === '/' ? 'index.html' : decoded.replace(/^\/+/, '');
340
- const resolved = containPath(clientDir, relative);
341
- if (resolved === null) {
342
- sendError(res, 404, 'not found');
343
- return;
344
- }
345
- let data;
346
- try {
347
- const stat = await fs.promises.stat(resolved);
348
- if (!stat.isFile()) {
349
- sendError(res, 404, 'not found');
350
- return;
351
- }
352
- data = await fs.promises.readFile(resolved);
353
- }
354
- catch {
355
- sendError(res, 404, 'not found');
356
- return;
357
- }
358
- res.writeHead(200, {
359
- 'content-type': CONTENT_TYPES[path.extname(resolved).toLowerCase()] ?? 'application/octet-stream',
360
- 'content-length': data.length,
361
- ...SECURITY_HEADERS,
362
- });
363
- res.end(data);
364
- }
365
- /**
366
- * Taking the session explicitly rather than reading module state mirrors the
367
- * core handlers and lets a test drive this without a repository. Not yet
368
- * listening: bind it with `listenLoopback`.
369
- */
370
- export function createReviewServer(options) {
371
- const { session, repositoryRoot, clientDir = CLIENT_DIR } = options;
372
- return http.createServer(async (req, res) => {
373
- const method = req.method ?? 'GET';
374
- let url;
375
- try {
376
- url = new URL(req.url ?? '/', 'http://localhost');
377
- }
378
- catch {
379
- sendError(res, 400, 'malformed request URL');
380
- return;
381
- }
382
- // Before anything is routed: this listener answers only to itself.
383
- if (!hostIsLoopback(req) || !originMatchesHost(req) || !fetchSiteIsSelf(req)) {
384
- sendError(res, 403, 'forbidden');
385
- return;
386
- }
387
- try {
388
- const handler = routes[`${method} ${url.pathname}`];
389
- if (handler) {
390
- await handler({ req, res, url, session, repositoryRoot });
391
- }
392
- else if (ROUTE_PATHS.has(url.pathname)) {
393
- sendError(res, 405, 'method not allowed');
394
- }
395
- else if (url.pathname.startsWith('/api/')) {
396
- sendError(res, 404, 'not found');
397
- }
398
- else if (method === 'GET') {
399
- await serveStatic(res, clientDir, url.pathname);
400
- }
401
- else {
402
- sendError(res, 404, 'not found');
403
- }
404
- }
405
- catch (error) {
406
- console.error(`[serve] ${method} ${url.pathname} failed:`, error);
407
- if (!res.headersSent) {
408
- sendError(res, 500, 'internal error');
409
- }
410
- else {
411
- res.end();
412
- }
413
- }
414
- });
415
- }
416
- /**
417
- * The address is fixed here, not left to the caller: never `0.0.0.0`, never the
418
- * default. Port 0 asks the OS for an ephemeral one.
419
- */
420
- export function listenLoopback(server, port = 0) {
421
- return new Promise((resolve, reject) => {
422
- server.once('error', reject);
423
- server.listen(port, '127.0.0.1', () => {
424
- server.off('error', reject);
425
- const address = server.address();
426
- resolve({ port: address.port, url: `http://127.0.0.1:${address.port}/` });
427
- });
428
- });
429
- }
430
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/server.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,gBAAgB;AAChB,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,gFAAgF;AAChF,uEAAuE;AAEvE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAEpB,yEAAyE;AACzE,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAwBtD,MAAM,aAAa,GAA2B;IAC5C,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,gCAAgC;IACvC,MAAM,EAAE,gCAAgC;IACxC,MAAM,EAAE,yBAAyB;IACjC,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE,iCAAiC;IAC1C,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,WA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AAC,WAAW,MAAM,IAAI,GAAG,CAAC,QAAQ,UAAU,EAAE,KAAK,CAAC,CAAC;YAClE,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,IAAI,GAAG,CAAC;IAER,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE;YACpC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC5B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAiB,CAAC;YAChD,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,oBAAoB,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { ReviewSession } from '@self-review/core';
2
- import type { ServeArgs } from './args';
3
- export interface ServeStartup {
4
- /** The resolved session, complete: diff, guide, config and resume state. */
5
- session: ReviewSession;
6
- /**
7
- * Root every request-supplied path is contained under: the same value core
8
- * resolves against, since containment guarantees nothing unless they agree.
9
- */
10
- repositoryRoot: string;
11
- /** Absolute output path, fixed for the lifetime of the process. */
12
- outputPath: string;
13
- }
14
- /**
15
- * Resolve the session to serve. Throws when there is nothing to review or the
16
- * resume file cannot be read; the caller reports and exits.
17
- */
18
- export declare function resolveSession(args: ServeArgs): Promise<ServeStartup>;
19
- //# sourceMappingURL=startup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"startup.d.ts","sourceRoot":"","sources":["../../../src/startup.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAA8B,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,OAAO,EAAE,aAAa,CAAC;IACvB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;CACpB;AA6CD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAkF3E"}
@@ -1,117 +0,0 @@
1
- // Resolve one review session the way the desktop does. Each phase below cites
2
- // the phase of `initializeApp` (src/main/main.ts) it mirrors.
3
- //
4
- // Two orderings are load-bearing: everything resolves before the caller opens
5
- // the listener, so no request races a half-built session; and the guide lands
6
- // on the session during startup, since `GET /api/diff` answers from there.
7
- //
8
- // The desktop's large-payload prompt and directory picker are native dialogs
9
- // with no browser equivalent, so the first becomes automatic and the second
10
- // becomes a startup error.
11
- import { resolve } from 'node:path';
12
- import { applyStagedUntrackedDefault, checkWritability, computePayloadStats, countTotalLines, createIgnoreFilter, createReviewSession, determineMode, loadConfig, loadGitDiffWithUntracked, loadGuide, normalizeGitDiffArgs, parseReviewXml, scanDirectory, scanFile, } from '@self-review/core';
13
- /**
14
- * Mirrors main.ts phase 4. Welcome mode diverges: there is no directory picker
15
- * in a browser, so refusing beats serving an interface whose controls are dead.
16
- */
17
- async function loadDiffForMode(gitDiffArgs, config) {
18
- const mode = determineMode(gitDiffArgs);
19
- console.error(`[serve] Startup mode: ${mode}`);
20
- if (mode === 'git') {
21
- const { files, repository } = await loadGitDiffWithUntracked(gitDiffArgs);
22
- const shouldKeep = createIgnoreFilter(config.ignore);
23
- return {
24
- files: files.filter(f => shouldKeep(f.newPath || f.oldPath)),
25
- source: { type: 'git', gitDiffArgs: gitDiffArgs.join(' '), repository },
26
- };
27
- }
28
- if (mode === 'file') {
29
- const fileArg = gitDiffArgs.find(a => a !== '--' && !a.startsWith('-'));
30
- const sourcePath = resolve(process.cwd(), fileArg);
31
- return { files: await scanFile(sourcePath), source: { type: 'file', sourcePath } };
32
- }
33
- if (mode === 'directory') {
34
- const dirArg = gitDiffArgs.find(a => a !== '--' && !a.startsWith('-'));
35
- const sourcePath = resolve(process.cwd(), dirArg);
36
- return {
37
- files: await scanDirectory(sourcePath, config.ignore),
38
- source: { type: 'directory', sourcePath },
39
- };
40
- }
41
- throw new Error('Nothing to review: this is not a git repository and no path was given. ' +
42
- 'Run self-review-serve inside a git repository, or pass a directory or file to review.');
43
- }
44
- /** The root core resolves a diff path against — see `ServeStartup.repositoryRoot`. */
45
- function containmentRoot(payload) {
46
- return payload.source.type === 'git' ? payload.source.repository : process.cwd();
47
- }
48
- /**
49
- * Resolve the session to serve. Throws when there is nothing to review or the
50
- * resume file cannot be read; the caller reports and exits.
51
- */
52
- export async function resolveSession(args) {
53
- // Phase 2 (main.ts:163) — configuration and the output path. Fixed here
54
- // and never again: no route changes it.
55
- let config = loadConfig();
56
- const outputPath = resolve(process.cwd(), args.outputPath ?? config.outputFile);
57
- // The desktop offers a save dialog out of this; the browser has no such
58
- // control, so a reviewer would have no exit. Fail before the work, not after.
59
- if (!checkWritability(outputPath)) {
60
- throw new Error(`Output path is not writable: ${outputPath}. ` +
61
- 'Pass a writable path with --output, or set output-file in .self-review.yaml.');
62
- }
63
- console.error(`[serve] Output path: ${outputPath}`);
64
- // Phase 3 (main.ts:169) — git diff arguments, normalized so a path can
65
- // never be read as a revision, then the staged/untracked default.
66
- let gitDiffArgs = args.gitDiffArgs;
67
- if (gitDiffArgs.length === 0 && config.defaultDiffArgs) {
68
- gitDiffArgs = config.defaultDiffArgs.split(' ').filter(a => a.length > 0);
69
- }
70
- gitDiffArgs = normalizeGitDiffArgs(gitDiffArgs);
71
- config = applyStagedUntrackedDefault(config, gitDiffArgs);
72
- // Phase 4 (main.ts:189) — what to review.
73
- const diffData = await loadDiffForMode(gitDiffArgs, config);
74
- console.error(`[serve] Loaded ${diffData.files.length} files`);
75
- // Phase 4b (main.ts:264) — large payload. The desktop asks; there is
76
- // nobody to ask before the browser connects, so the threshold simply
77
- // turns on lazy per-file loading (GET /api/file) and says so.
78
- const stats = computePayloadStats(diffData.files.length, countTotalLines(diffData.files), config);
79
- if (stats.exceedsAny) {
80
- console.error(`[serve] Large payload: ${stats.fileCount} files, ${stats.totalLines} lines ` +
81
- `(thresholds ${config.maxFiles} files, ${config.maxTotalLines} lines) — ` +
82
- 'serving file contents on demand');
83
- diffData.isLargePayload = true;
84
- }
85
- // Phase 5 (main.ts:295) — resume a prior review.
86
- const session = createReviewSession();
87
- if (args.resumeFrom) {
88
- const resumePath = resolve(process.cwd(), args.resumeFrom);
89
- let parsed;
90
- try {
91
- parsed = parseReviewXml(resumePath);
92
- }
93
- catch (error) {
94
- throw new Error(`Could not read the resume file ${resumePath}: ` +
95
- (error instanceof Error ? error.message : String(error)));
96
- }
97
- session.resumeComments = parsed.comments;
98
- session.resumeViewedFiles = parsed.viewedFiles;
99
- console.error(`[serve] Resumed ${parsed.comments.length} comments and ` +
100
- `${parsed.viewedFiles.length} viewed files from ${resumePath}`);
101
- }
102
- // Phase 5b (main.ts:337) — the walkthrough guide sidecar, discovered next
103
- // to the output path. Tolerant by contract: loadGuide never throws.
104
- const guideData = await loadGuide(outputPath, config, diffData.files.map(f => f.newPath || f.oldPath));
105
- if (guideData) {
106
- console.error(`[serve] Walkthrough guide loaded: ${guideData.groups.length} groups`);
107
- }
108
- // Phase 6 (main.ts:350) — assemble. Everything the routes read is on the
109
- // session before the caller opens the listener.
110
- session.diffData = diffData;
111
- session.guideData = guideData;
112
- session.config = config;
113
- // Always writable: startup refused above if it was not.
114
- session.outputPathInfo = { resolvedOutputPath: outputPath, outputPathWritable: true };
115
- return { session, repositoryRoot: containmentRoot(diffData), outputPath };
116
- }
117
- //# sourceMappingURL=startup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"startup.js","sourceRoot":"","sources":["../../../src/startup.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,8DAA8D;AAC9D,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,2BAA2B;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,wBAAwB,EACxB,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAgB3B;;;GAGG;AACH,KAAK,UAAU,eAAe,CAAC,WAAqB,EAAE,MAAiB;IACrE,MAAM,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IACxC,OAAO,CAAC,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;IAE/C,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,wBAAwB,CAAC,WAAW,CAAC,CAAC;QAC1E,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;YAC5D,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,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E,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,CAChD,CAAC;IACF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,qCAAqC,SAAS,CAAC,MAAM,CAAC,MAAM,SAAS,CAAC,CAAC;IACvF,CAAC;IAED,yEAAyE;IACzE,gDAAgD;IAChD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC5B,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,wDAAwD;IACxD,OAAO,CAAC,cAAc,GAAG,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;IAEtF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;AAC5E,CAAC"}
@@ -1,44 +0,0 @@
1
- import type { ExpandContextRequest, ReviewState, SuggestionApplyRequest } from '@self-review/core';
2
- /**
3
- * Resolve `candidate` under `root`, or null if it escapes.
4
- *
5
- * Never decode here: callers pass a value `searchParams` already decoded once,
6
- * and decoding again turns `%2E%2E%2F` inside a filename into a real traversal.
7
- */
8
- export declare function containPath(root: string, candidate: string): string | null;
9
- /**
10
- * Reaches git as `-U${contextLines}`, so it must be bounded. Matches
11
- * `MAX_CONTEXT` in useExpandContext.ts; keep the two in step.
12
- */
13
- export declare const MAX_CONTEXT_LINES = 99999;
14
- export type ParseResult<T> = {
15
- ok: true;
16
- value: T;
17
- } | {
18
- ok: false;
19
- error: string;
20
- };
21
- /**
22
- * Accepts exactly `{ filePath, contextLines }`. Unknown keys are rejected, not
23
- * ignored. The route contains `filePath` with `containPath` before git sees it.
24
- */
25
- export declare function parseExpandContextBody(body: unknown): ParseResult<ExpandContextRequest>;
26
- /**
27
- * Validate the body of `POST /api/apply-suggestion`.
28
- *
29
- * This is the one route that rewrites a file in the reviewed tree, so the shape
30
- * is checked exactly rather than deferred. Core refuses anything whose anchored
31
- * lines do not still match `originalCode` byte for byte, but it should never be
32
- * asked a question this malformed in the first place.
33
- */
34
- export declare function parseSuggestionApplyBody(body: unknown): ParseResult<SuggestionApplyRequest>;
35
- /**
36
- * Accepts exactly `{ timestamp, source, files }`. Remote provenance is never
37
- * taken from the client; the process injects it after submission.
38
- *
39
- * Structural only — the XSD checks nested fields at serialization time. The
40
- * exception is `id`, checked below, because the serializer turns an id into a
41
- * file name *before* it validates anything.
42
- */
43
- export declare function parseReviewStateBody(body: unknown): ParseResult<ReviewState>;
44
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/validate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAqBnG;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoB1E;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAQnF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC,oBAAoB,CAAC,CA6BvF;AAMD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAqD3F;AAID;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,CA6B5E"}