@moritzwilksch/diffle 0.1.7 → 0.1.8

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 (82) hide show
  1. package/README.md +21 -0
  2. package/dist/client/assets/{angular-html-gsHTuMGB.js → angular-html-C3AR-WKY.js} +1 -1
  3. package/dist/client/assets/{angular-ts-xhBJShFG.js → angular-ts-bZzNmyh2.js} +1 -1
  4. package/dist/client/assets/{apl-nsC6ra4J.js → apl-DKjQ1uUu.js} +1 -1
  5. package/dist/client/assets/{astro-X5_I_ruP.js → astro-D6YBrldj.js} +1 -1
  6. package/dist/client/assets/{blade-BqlxrrkS.js → blade-QC3ty25r.js} +1 -1
  7. package/dist/client/assets/{c-DVgCXnBp.js → c-CEfiNUIv.js} +1 -1
  8. package/dist/client/assets/{chapel-LgKo5FoM.js → chapel-XvVgmIw8.js} +1 -1
  9. package/dist/client/assets/{cobol-BVkDOaHP.js → cobol-Cyvb7uZ8.js} +1 -1
  10. package/dist/client/assets/{coffee-BVuWHkH6.js → coffee-DKSUNEAJ.js} +1 -1
  11. package/dist/client/assets/{cpp-DnxElGuW.js → cpp-DvHlatt5.js} +1 -1
  12. package/dist/client/assets/{crystal-CC8Vxuob.js → crystal-BfxbaHfR.js} +1 -1
  13. package/dist/client/assets/{css-BBuKGmvC.js → css-CvzcDzFO.js} +1 -1
  14. package/dist/client/assets/{edge-CNOZBEfw.js → edge-rOBhrNV9.js} +1 -1
  15. package/dist/client/assets/{elixir-BG8NE-xg.js → elixir-D3B6PlMg.js} +1 -1
  16. package/dist/client/assets/{elm-Cyp6TnT_.js → elm-BnfJhLi3.js} +1 -1
  17. package/dist/client/assets/{erb-C58VxpfX.js → erb-CkLdBLG4.js} +1 -1
  18. package/dist/client/assets/{git-rebase-A6HkVJC_.js → git-rebase-wqI2zI5G.js} +1 -1
  19. package/dist/client/assets/{glimmer-js-CqR_jN8G.js → glimmer-js-CorAzX48.js} +1 -1
  20. package/dist/client/assets/{glimmer-ts-M3ExOO4n.js → glimmer-ts-DphgSML7.js} +1 -1
  21. package/dist/client/assets/{glsl--WIxeXSU.js → glsl-Mt2MgDCN.js} +1 -1
  22. package/dist/client/assets/{graphql-BXRMLGZY.js → graphql-CR58itij.js} +1 -1
  23. package/dist/client/assets/{hack-C8N7KWCY.js → hack-BYLE2FB3.js} +1 -1
  24. package/dist/client/assets/{haml-CxHPK-iA.js → haml-Bo5vpKMC.js} +1 -1
  25. package/dist/client/assets/{handlebars-BNjxS1qh.js → handlebars-Cd6w9Qte.js} +1 -1
  26. package/dist/client/assets/{html-CO9JbMOk.js → html-EAc4fezP.js} +1 -1
  27. package/dist/client/assets/{html-derivative-CD1w-J8T.js → html-derivative-BCmkEMhH.js} +1 -1
  28. package/dist/client/assets/{http-DvdIZe4B.js → http-dQXVRwNo.js} +1 -1
  29. package/dist/client/assets/{hurl-BPchDEWD.js → hurl-CTzL1YrB.js} +1 -1
  30. package/dist/client/assets/index-BkCL4UDj.css +2 -0
  31. package/dist/client/assets/{index-BcTYvSA1.js → index-DWcJ2X-_.js} +98 -98
  32. package/dist/client/assets/{java-Cw12dAwx.js → java-C6GmB9Ie.js} +1 -1
  33. package/dist/client/assets/{javascript-CVrIgFqG.js → javascript-C3Xp2ZJG.js} +1 -1
  34. package/dist/client/assets/{jinja-Dcw1Cb-z.js → jinja-Dm5uNF1A.js} +1 -1
  35. package/dist/client/assets/{jison-BCHOo1FF.js → jison-DWN1PAPH.js} +1 -1
  36. package/dist/client/assets/{json-BkfEJ7uD.js → json-CD4Jl2TN.js} +1 -1
  37. package/dist/client/assets/{jsx-CBE97uyR.js → jsx-Dk_mg_Sq.js} +1 -1
  38. package/dist/client/assets/{julia-Dt37WVZB.js → julia-ChQLeZ-J.js} +1 -1
  39. package/dist/client/assets/{just-DFHYF8cW.js → just-Dw1MNaQ7.js} +1 -1
  40. package/dist/client/assets/{latex-BtlIyAq9.js → latex-CHuqntlZ.js} +1 -1
  41. package/dist/client/assets/{liquid-PdbqGeMi.js → liquid-CdqvKBd5.js} +1 -1
  42. package/dist/client/assets/{lua-lhtz56hU.js → lua-DtCcLDnQ.js} +1 -1
  43. package/dist/client/assets/{marko-DPsaza10.js → marko-COZ6SLmm.js} +1 -1
  44. package/dist/client/assets/{mdc-DIH2Ec5y.js → mdc-BTrsC_q_.js} +1 -1
  45. package/dist/client/assets/{nginx-bHk_XM7O.js → nginx-B_JY_bIl.js} +1 -1
  46. package/dist/client/assets/{nim-BgUabkBA.js → nim-C7Boj9eE.js} +1 -1
  47. package/dist/client/assets/{org-PMkj4aaP.js → org-CYdh74lA.js} +1 -1
  48. package/dist/client/assets/{perl-B1ZCbepN.js → perl-CRiTh3Pi.js} +1 -1
  49. package/dist/client/assets/{php-Vj6Jmzuy.js → php-DSko-lNI.js} +1 -1
  50. package/dist/client/assets/{pug-B0ziVZ95.js → pug-BfUPln3e.js} +1 -1
  51. package/dist/client/assets/{qml--NUJOMX2.js → qml-2jRMRran.js} +1 -1
  52. package/dist/client/assets/{r-CCy6kg5Q.js → r-sDW5nKEb.js} +1 -1
  53. package/dist/client/assets/{razor-DBTJol_D.js → razor-Sa7GlYLb.js} +1 -1
  54. package/dist/client/assets/{regexp-B-0M8p3f.js → regexp-AWVIUt-C.js} +1 -1
  55. package/dist/client/assets/{rst-DVPZR2Zw.js → rst-D20G5Wbg.js} +1 -1
  56. package/dist/client/assets/{ruby-CY-1xRWL.js → ruby-DevA-y7a.js} +1 -1
  57. package/dist/client/assets/{sas-BfWvhRC7.js → sas-DRiLtfNK.js} +1 -1
  58. package/dist/client/assets/{scss-CDSNB-cI.js → scss-Ca4Dfxoe.js} +1 -1
  59. package/dist/client/assets/{shellscript-x3a-v0TL.js → shellscript-BNnaYtXN.js} +1 -1
  60. package/dist/client/assets/{shellsession-CBXmn1pk.js → shellsession-B0nV-fpO.js} +1 -1
  61. package/dist/client/assets/{soy-Dx9wgv4j.js → soy-CDZEZMSk.js} +1 -1
  62. package/dist/client/assets/{sql-GJE8dpQY.js → sql-s_6SuPDf.js} +1 -1
  63. package/dist/client/assets/{stata-Cu3eQvZM.js → stata-CaVdvC6P.js} +1 -1
  64. package/dist/client/assets/{surrealql-BSIyNQF3.js → surrealql-DZ5TdMgT.js} +1 -1
  65. package/dist/client/assets/{svelte-BC05E7SM.js → svelte-BkFQboE2.js} +1 -1
  66. package/dist/client/assets/{templ-BZb4iLGg.js → templ-QUoUDGUH.js} +1 -1
  67. package/dist/client/assets/{tex-BgSQdktB.js → tex-89lMVAG3.js} +1 -1
  68. package/dist/client/assets/{ts-tags-ByZvgo6s.js → ts-tags-B2u4oUPE.js} +1 -1
  69. package/dist/client/assets/{tsx-BkywoqnG.js → tsx-ftFKhLnx.js} +1 -1
  70. package/dist/client/assets/{twig-DT3o-XyD.js → twig-DQCCfpmq.js} +1 -1
  71. package/dist/client/assets/{typescript-Dc_VYLnG.js → typescript-DhCWy8LC.js} +1 -1
  72. package/dist/client/assets/{typst-Dufd3udg.js → typst-N-Gv0lEU.js} +1 -1
  73. package/dist/client/assets/{vue-CWow0PK2.js → vue-C7rUB8rE.js} +1 -1
  74. package/dist/client/assets/{vue-html-Dukrnida.js → vue-html-D-dp6lDI.js} +1 -1
  75. package/dist/client/assets/{vue-vine-DeFkcU4G.js → vue-vine-DEpfajiz.js} +1 -1
  76. package/dist/client/assets/{xml-w1QbHsNc.js → xml-BGDSWH1X.js} +1 -1
  77. package/dist/client/assets/{xsl-DQ1uA8pZ.js → xsl-D8Xmp-zV.js} +1 -1
  78. package/dist/client/assets/{yaml-Bt6SDR__.js → yaml-B3GKVR80.js} +1 -1
  79. package/dist/client/index.html +2 -2
  80. package/dist/server/main.js +170 -35
  81. package/package.json +16 -2
  82. package/dist/client/assets/index-B47iHZXu.css +0 -2
@@ -1 +1 @@
1
- import{t as e}from"./index-BcTYvSA1.js";import{t}from"./java-Cw12dAwx.js";var n=e({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t,r];export{n,i as t};
1
+ import{t as e}from"./index-DWcJ2X-_.js";import{t}from"./java-C6GmB9Ie.js";var n=e({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t,r];export{n,i as t};
@@ -1 +1 @@
1
- import{t as e}from"./xml-w1QbHsNc.js";var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e,t];export{n as default};
1
+ import{t as e}from"./xml-BGDSWH1X.js";var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e,t];export{n as default};
@@ -1 +1 @@
1
- import{t as e}from"./index-BcTYvSA1.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];export{t as n,n as t};
1
+ import{t as e}from"./index-DWcJ2X-_.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];export{t as n,n as t};
@@ -14,8 +14,8 @@
14
14
  </script>
15
15
  <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
16
16
  <title>diffle</title>
17
- <script type="module" crossorigin src="./assets/index-BcTYvSA1.js"></script>
18
- <link rel="stylesheet" crossorigin href="./assets/index-B47iHZXu.css">
17
+ <script type="module" crossorigin src="./assets/index-DWcJ2X-_.js"></script>
18
+ <link rel="stylesheet" crossorigin href="./assets/index-BkCL4UDj.css">
19
19
  </head>
20
20
  <body>
21
21
  <div id="root"></div>
@@ -3951,7 +3951,7 @@ function generateCompletion(program, { shell, executable = program.name() }) {
3951
3951
  }
3952
3952
  //#endregion
3953
3953
  //#region package.json
3954
- var version$1 = "0.1.7";
3954
+ var version$1 = "0.1.8";
3955
3955
  //#endregion
3956
3956
  //#region src/server/comments/anchor.ts
3957
3957
  function splitLines(contents) {
@@ -4369,7 +4369,7 @@ var GitRepo = class GitRepo {
4369
4369
  }
4370
4370
  /**
4371
4371
  * Changed files between two revs, or a rev and the worktree (incl. untracked).
4372
- * One diff call yields status, line counts and, against a commit, the new-side
4372
+ * One diff call yields status, line counts and, against a commit, each side's
4373
4373
  * blob; the worktree's blobs are hashed from disk.
4374
4374
  */
4375
4375
  async numstat(oldRev, newRev) {
@@ -4395,6 +4395,7 @@ var GitRepo = class GitRepo {
4395
4395
  deletions: 0,
4396
4396
  binary: false,
4397
4397
  blob: "",
4398
+ oldBlob: "",
4398
4399
  generated: false
4399
4400
  };
4400
4401
  const st = await lstat(resolve(this.root, path)).catch(() => null);
@@ -4411,44 +4412,68 @@ var GitRepo = class GitRepo {
4411
4412
  return file;
4412
4413
  });
4413
4414
  const all = [...files, ...extra].sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
4414
- if (newRev === "worktree") await this.hashWorktree(all.filter((f) => f.status !== "D"));
4415
+ if (newRev === "worktree") {
4416
+ const present = all.filter((f) => f.status !== "D");
4417
+ (await this.hashWorktree(present)).forEach((sha, i) => present[i].blob = sha);
4418
+ }
4419
+ if (reverse) {
4420
+ const present = all.filter((f) => f.status !== "A");
4421
+ const entries = present.map((f) => ({
4422
+ path: f.oldPath ?? f.path,
4423
+ submodule: f.submodule
4424
+ }));
4425
+ (await this.hashWorktree(entries)).forEach((sha, i) => present[i].oldBlob = sha);
4426
+ }
4415
4427
  return all;
4416
4428
  }
4417
4429
  /**
4418
- * Sets `blob` to what git would store for each worktree entry: the file's
4430
+ * What git would store for each worktree entry, in order: the file's
4419
4431
  * blob, a symlink's target blob, a submodule's checked-out commit. Regular
4420
4432
  * files go to one `hash-object --stdin-paths` call; everything else is hashed
4421
4433
  * on its own, so a gitlink, a broken link or an unreadable path never fails
4422
4434
  * the batch. A path containing a newline cannot ride the stdin list either.
4423
- * A path that cannot be hashed keeps an empty blob.
4435
+ * A path that cannot be hashed gets an empty blob.
4424
4436
  */
4425
4437
  async hashWorktree(files) {
4438
+ const shas = files.map(() => "");
4426
4439
  const regular = [];
4427
- await mapLimit(files, READ_CONCURRENCY$1, async (f) => {
4428
- f.blob = "";
4429
- if (f.submodule) {
4430
- f.blob = await this.submoduleHead(f.path);
4440
+ await mapLimit([...files.keys()], READ_CONCURRENCY$1, async (i) => {
4441
+ const { path, submodule } = files[i];
4442
+ if (submodule) {
4443
+ shas[i] = await this.submoduleHead(path);
4431
4444
  return;
4432
4445
  }
4433
- const st = await lstat(resolve(this.root, f.path)).catch(() => null);
4434
- if (st?.isSymbolicLink()) f.blob = blobSha(Buffer.from(await readlink(resolve(this.root, f.path)), "utf8"));
4435
- else if (st?.isFile()) regular.push(f);
4446
+ const st = await lstat(resolve(this.root, path)).catch(() => null);
4447
+ if (st?.isSymbolicLink()) shas[i] = blobSha(Buffer.from(await readlink(resolve(this.root, path)), "utf8"));
4448
+ else if (st?.isFile()) regular.push(i);
4436
4449
  });
4437
- const batch = regular.filter((f) => !f.path.includes("\n"));
4438
- const single = regular.filter((f) => f.path.includes("\n"));
4450
+ const batch = regular.filter((i) => !files[i].path.includes("\n"));
4451
+ const single = regular.filter((i) => files[i].path.includes("\n"));
4439
4452
  if (batch.length) try {
4440
- const shas = (await this.text(["hash-object", "--stdin-paths"], { input: batch.map((f) => f.path).join("\n") + "\n" })).trim().split("\n");
4441
- batch.forEach((f, i) => f.blob = shas[i] ?? "");
4453
+ const lines = (await this.text(["hash-object", "--stdin-paths"], { input: batch.map((i) => files[i].path).join("\n") + "\n" })).trim().split("\n");
4454
+ batch.forEach((i, j) => shas[i] = lines[j] ?? "");
4442
4455
  } catch {
4443
4456
  single.push(...batch);
4444
4457
  }
4445
- await mapLimit(single, READ_CONCURRENCY$1, async (f) => {
4446
- f.blob = await this.text([
4458
+ await mapLimit(single, READ_CONCURRENCY$1, async (i) => {
4459
+ shas[i] = await this.text([
4447
4460
  "hash-object",
4448
4461
  "--",
4449
- f.path
4462
+ files[i].path
4450
4463
  ]).then((s) => s.trim()).catch(() => "");
4451
4464
  });
4465
+ return shas;
4466
+ }
4467
+ /**
4468
+ * What git would store for `content` at worktree `path`, its clean filters applied: equals the
4469
+ * snapshot's blob for a worktree file whose bytes are still the snapshot's.
4470
+ */
4471
+ async hashObject(content, path) {
4472
+ return (await this.text([
4473
+ "hash-object",
4474
+ "--stdin",
4475
+ `--path=${path}`
4476
+ ], { input: content })).trim();
4452
4477
  }
4453
4478
  /** The commit a checked-out submodule is at, or '' if it is not a repository. */
4454
4479
  async submoduleHead(path) {
@@ -5048,8 +5073,8 @@ function splitZ(buf) {
5048
5073
  * `-z -M --raw --no-abbrev --numstat`: the raw records come first, then the numstat records,
5049
5074
  * each path-terminated by NUL. Raw: ":mode mode sha sha X\0path\0", renames and
5050
5075
  * copies "R100\0old\0new\0". Numstat: "add\tdel\tpath\0", renames "add\tdel\t\0old\0new\0".
5051
- * Binary files count as "-\t-". The dst sha is the new-side blob against a
5052
- * commit; against the worktree it is zeros and the caller hashes the file.
5076
+ * Binary files count as "-\t-". The src and dst shas are each side's blob
5077
+ * against a commit; against the worktree, or where a side is absent, they are zeros.
5053
5078
  * Mode 160000 on either side marks a gitlink, which no file operation may touch.
5054
5079
  */
5055
5080
  function parseRawNumstat(buf) {
@@ -5057,7 +5082,7 @@ function parseRawNumstat(buf) {
5057
5082
  const byPath = /* @__PURE__ */ new Map();
5058
5083
  let i = 0;
5059
5084
  for (; i < parts.length && parts[i].startsWith(":"); i++) {
5060
- const [srcMode = "", dstMode = "", , dstSha = "", code = ""] = parts[i].split(" ");
5085
+ const [srcMode = "", dstMode = "", srcSha = "", dstSha = "", code = ""] = parts[i].split(" ");
5061
5086
  const status = code[0];
5062
5087
  const oldPath = status === "R" || status === "C" ? parts[++i] : void 0;
5063
5088
  const path = parts[++i];
@@ -5068,6 +5093,7 @@ function parseRawNumstat(buf) {
5068
5093
  deletions: 0,
5069
5094
  binary: false,
5070
5095
  blob: /^0+$/.test(dstSha) ? "" : dstSha,
5096
+ oldBlob: /^0+$/.test(srcSha) ? "" : srcSha,
5071
5097
  generated: false
5072
5098
  };
5073
5099
  if (oldPath != null) file.oldPath = oldPath;
@@ -12135,6 +12161,8 @@ const ChangedFileSchema = object({
12135
12161
  binary: boolean(),
12136
12162
  /** New-side blob sha. '' for deletions. Keys the viewed state. */
12137
12163
  blob: string(),
12164
+ /** Old-side blob sha. '' for additions. A worktree side's blob, like `blob`, is '' when the file cannot be hashed. */
12165
+ oldBlob: string(),
12138
12166
  /** The `linguist-generated` gitattribute, a path pattern or a content sniff said this file is generated. Feeds auto-collapse and risk ranking. */
12139
12167
  generated: boolean(),
12140
12168
  /** A gitlink (mode 160000): `blob` is the recorded commit, the patch shows the commit-id change, and there is no file to open. */
@@ -12498,6 +12526,21 @@ const FileQuerySchema = object({
12498
12526
  path: string().min(1),
12499
12527
  rev: SideSchema
12500
12528
  });
12529
+ /**
12530
+ * `GET /api/image`: one side of a file as image bytes. The server answers 404 unless `key` is that side's
12531
+ * `imageKey` in its current snapshot, the bytes are still the ones the key names, and they are a raster image.
12532
+ */
12533
+ const ImageQuerySchema = FileQuerySchema.extend({ key: string().min(1) });
12534
+ /**
12535
+ * Names the bytes of one side of `path`, or null when the side has no name: a changed file's blob on that
12536
+ * side, else the commit of a side that is one, since an unchanged path is alike on both. What a key names
12537
+ * never changes, so an image served under it may be cached for good.
12538
+ */
12539
+ function imageKey(snap, path, side) {
12540
+ const file = snap.changed.find((f) => f.path === path);
12541
+ if (file) return (side === "new" ? file.blob : file.oldBlob) || null;
12542
+ return [snap.newSha, snap.oldSha].find((rev) => rev !== "worktree") ?? null;
12543
+ }
12501
12544
  const offsetSchema = string().regex(/^[0-9]+$/).transform(Number).pipe(number().int().nonnegative());
12502
12545
  const LastCommitsQuerySchema = object({
12503
12546
  oldOffset: offsetSchema,
@@ -16766,7 +16809,7 @@ const LOOPBACK = /* @__PURE__ */ new Set([
16766
16809
  "::1",
16767
16810
  "localhost"
16768
16811
  ]);
16769
- const HINT = "if a reverse proxy sent it, trust that origin with --allowed-origin";
16812
+ const UNCONFIGURED = "if a reverse proxy sent it, trust that origin with --allowed-origin";
16770
16813
  /**
16771
16814
  * Restricts API and WebSocket requests to local hosts and the configured public origin.
16772
16815
  * Proxies may preserve the public Host or rewrite it to an allowed upstream Host.
@@ -16780,15 +16823,16 @@ function requestGuard(bindHost, names = ownNames(), allowedOrigin) {
16780
16823
  ...names.map((n) => n.toLowerCase())
16781
16824
  ]);
16782
16825
  const publicHost = allowedOrigin == null ? void 0 : new URL(allowedOrigin).host;
16826
+ const hint = allowedOrigin == null ? UNCONFIGURED : `allowed origin is "${allowedOrigin}"`;
16783
16827
  return ({ host, origin }) => {
16784
16828
  if (!host) return "missing Host header";
16785
16829
  const name = hostnameOf(host).toLowerCase();
16786
16830
  const localHost = loopback ? LOOPBACK.has(name) : isIP(name) !== 0 || allowed.has(name);
16787
16831
  const proxyHost = publicHost != null && host.toLowerCase() === publicHost;
16788
- if (!localHost && !proxyHost) return `forbidden Host "${host}"; ${HINT}`;
16832
+ if (!localHost && !proxyHost) return `forbidden Host "${host}"; ${hint}`;
16789
16833
  if (origin == null || allowedOrigin != null && origin === allowedOrigin) return null;
16790
16834
  if (!proxyHost && parseHost(origin) === host) return null;
16791
- return `forbidden Origin "${origin}" for Host "${host}"; ${HINT}`;
16835
+ return `forbidden Origin "${origin}" for Host "${host}"; ${hint}`;
16792
16836
  };
16793
16837
  }
16794
16838
  /** The host of a syntactically valid origin; undefined for `null` and other non-URLs. */
@@ -17285,6 +17329,67 @@ function migrateV1(v1) {
17285
17329
  };
17286
17330
  }
17287
17331
  //#endregion
17332
+ //#region src/server/image.ts
17333
+ /** Leading bytes of the raster formats browsers display; `null` matches any byte. */
17334
+ const SIGNATURES = [
17335
+ ["image/png", [
17336
+ 137,
17337
+ 80,
17338
+ 78,
17339
+ 71,
17340
+ 13,
17341
+ 10,
17342
+ 26,
17343
+ 10
17344
+ ]],
17345
+ ["image/jpeg", [
17346
+ 255,
17347
+ 216,
17348
+ 255
17349
+ ]],
17350
+ ["image/gif", ascii("GIF8")],
17351
+ ["image/webp", [
17352
+ ...ascii("RIFF"),
17353
+ null,
17354
+ null,
17355
+ null,
17356
+ null,
17357
+ ...ascii("WEBP")
17358
+ ]],
17359
+ ["image/avif", [
17360
+ null,
17361
+ null,
17362
+ null,
17363
+ null,
17364
+ ...ascii("ftypavif")
17365
+ ]],
17366
+ ["image/avif", [
17367
+ null,
17368
+ null,
17369
+ null,
17370
+ null,
17371
+ ...ascii("ftypavis")
17372
+ ]],
17373
+ ["image/bmp", ascii("BM")],
17374
+ ["image/x-icon", [
17375
+ 0,
17376
+ 0,
17377
+ 1,
17378
+ 0
17379
+ ]]
17380
+ ];
17381
+ function ascii(s) {
17382
+ return [...s].map((ch) => ch.charCodeAt(0));
17383
+ }
17384
+ /**
17385
+ * The media type of a raster image, read from its leading bytes; null for anything else. The
17386
+ * extension is not consulted: only bytes that are an image get served as one.
17387
+ */
17388
+ function imageType(buf) {
17389
+ for (const [type, magic] of SIGNATURES) if (buf.length >= magic.length && magic.every((b, i) => b == null || buf[i] === b)) return type;
17390
+ return null;
17391
+ }
17392
+ //#endregion
17288
17393
  //#region src/server/routes.ts
17289
17394
  /** Invalid JSON is a request error; failures after parsing still propagate. */
17290
17395
  async function readJson(c) {
@@ -17350,6 +17455,18 @@ function createApi(deps) {
17350
17455
  };
17351
17456
  return c.json(body);
17352
17457
  });
17458
+ app.get("/api/image", async (c) => {
17459
+ const { path, rev, key } = ImageQuerySchema.parse(c.req.query());
17460
+ const buf = await session.readImage(await session.snapshotter.current(), path, rev, key);
17461
+ const type = buf && imageType(buf);
17462
+ if (!type) return c.json({ error: "no image under that key" }, 404);
17463
+ return c.body(new Uint8Array(buf), 200, {
17464
+ "content-type": type,
17465
+ "cache-control": "private, max-age=31536000, immutable",
17466
+ "x-content-type-options": "nosniff",
17467
+ "cross-origin-resource-policy": "same-origin"
17468
+ });
17469
+ });
17353
17470
  app.get("/api/search", async (c) => {
17354
17471
  const query = SearchQuerySchema.parse(c.req.query());
17355
17472
  const { q, scope } = query;
@@ -18634,10 +18751,17 @@ var Session = class {
18634
18751
  console.error("[diffle] snapshot listener failed:", e);
18635
18752
  }
18636
18753
  }
18637
- /** First mode. Rejects `ready()` on failure so early requests error out. */
18638
- async start(req) {
18754
+ /**
18755
+ * Resolves a request into a review without activating it, so a caller can reject
18756
+ * invalid input before serving. Queued, so `close()` waits for a PR fetch.
18757
+ */
18758
+ resolve(req) {
18759
+ return this.run(() => resolveReview(req, this.repo, this.opts.github));
18760
+ }
18761
+ /** First mode, from `resolve`. Rejects `ready()` on failure so early requests error out. */
18762
+ async start(review) {
18639
18763
  try {
18640
- const snap = await this.enter(req);
18764
+ const snap = await this.run(() => this.activate(review));
18641
18765
  this.resolveReady();
18642
18766
  return snap;
18643
18767
  } catch (e) {
@@ -18647,7 +18771,7 @@ var Session = class {
18647
18771
  }
18648
18772
  /** Switch modes at runtime. Broadcasts a snapshot bump on success. */
18649
18773
  async switchMode(req) {
18650
- const snap = await this.enter(req);
18774
+ const snap = await this.run(async () => this.activate(await resolveReview(req, this.repo, this.opts.github)));
18651
18775
  this.hub.broadcast({
18652
18776
  type: "snapshot",
18653
18777
  version: snap.version
@@ -18663,11 +18787,7 @@ var Session = class {
18663
18787
  this.queue = r.catch(() => {});
18664
18788
  return r;
18665
18789
  }
18666
- enter(req) {
18667
- return this.run(() => this.transition(req));
18668
- }
18669
- async transition(req) {
18670
- const { mode, prUrl } = await resolveReview(req, this.repo, this.opts.github);
18790
+ async activate({ mode, prUrl }) {
18671
18791
  const snapshotter = new Snapshotter(this.repo, mode, ++this.version, this.opts.context);
18672
18792
  const [comments, snap] = await Promise.all([CommentStore.open(this.repo.gitDir, mode.commentKey), snapshotter.current()]);
18673
18793
  const next = {
@@ -18760,6 +18880,18 @@ var Session = class {
18760
18880
  if (side === "new") return snap.newSha === "worktree" ? this.repo.readWorktree(target) : this.repo.show(snap.newSha, target);
18761
18881
  return snap.oldSha === "worktree" ? this.repo.readWorktree(target) : this.repo.show(snap.oldSha, target);
18762
18882
  }
18883
+ /**
18884
+ * The bytes `key` names on one side of `path`, or null unless `key` is that side's `imageKey` in `snap`.
18885
+ * A worktree file that changed since `snap` reads as null too, so a key never serves other bytes.
18886
+ */
18887
+ async readImage(snap, path, side, key) {
18888
+ if (key !== imageKey(snap, path, side)) return null;
18889
+ if (!snap.changed.some((f) => f.path === path)) return this.readSide(snap, path, key === snap.newSha ? "new" : "old");
18890
+ const buf = await this.readSide(snap, path, side);
18891
+ if (buf == null || (side === "new" ? snap.newSha : snap.oldSha) !== "worktree") return buf;
18892
+ const target = sidePath(this.readablePaths(snap), path, side);
18893
+ return target != null && await this.repo.hashObject(buf, target) === key ? buf : null;
18894
+ }
18763
18895
  /** Whether `readSide` would find `path` on `side`: the allowlist alone, no read. */
18764
18896
  hasSide(snap, path, side) {
18765
18897
  return sidePath(this.readablePaths(snap), path, side) != null;
@@ -22917,6 +23049,9 @@ async function serve(req, opts, repo, closeRepo, config, github, timing) {
22917
23049
  process.on("SIGTERM", shutdown);
22918
23050
  stopBrowserWatch = watchBrowserLifetime(hub, opts.open && !opts.keepAlive, shutdown);
22919
23051
  try {
23052
+ const review = await session.resolve(req);
23053
+ timing.mark("resolve");
23054
+ if (closing) return;
22920
23055
  const url = await server.listen();
22921
23056
  timing.mark("listen");
22922
23057
  if (opts.open) {
@@ -22928,7 +23063,7 @@ async function serve(req, opts, repo, closeRepo, config, github, timing) {
22928
23063
  console.error(`📂 ${c.dim("repo")} ${repo.root}`);
22929
23064
  if (github.client) console.error(`🐙 ${c.dim("github")} ${c.dim(`token from ${github.source}`)}`);
22930
23065
  else console.error(`🐙 ${c.dim("github")} ${c.dim("off: no token in GITHUB_TOKEN, GH_TOKEN or gh auth token")}`);
22931
- const snap = await session.start(req);
23066
+ const snap = await session.start(review);
22932
23067
  timing.mark("snapshot");
22933
23068
  const n = snap.changed.length;
22934
23069
  const adds = snap.changed.reduce((a, f) => a + f.additions, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moritzwilksch/diffle",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Local git diff reviewer in the browser with line comments exported as agent prompts",
5
5
  "keywords": [
6
6
  "agent",
@@ -33,14 +33,24 @@
33
33
  },
34
34
  "scripts": {
35
35
  "dev": "tsx src/cli/main.ts",
36
+ "fixture": "tsx scripts/fixture-repo.ts",
36
37
  "build": "npm run build:client && npm run build:server",
37
38
  "build:client": "vite build",
38
39
  "build:server": "tsdown",
39
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
40
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit && tsc -p tsconfig.e2e.json --noEmit",
40
41
  "lint": "oxlint",
41
42
  "format": "oxfmt",
42
43
  "format:check": "oxfmt --check",
43
44
  "test": "vitest run",
45
+ "test:e2e": "playwright test",
46
+ "test:e2e:install": "playwright install chromium",
47
+ "test:e2e:install-deps": "playwright install-deps chromium",
48
+ "screenshot": "tsx",
49
+ "test:e2e:docker": "node scripts/e2e-docker.mjs",
50
+ "test:e2e:docker:update": "node scripts/e2e-docker.mjs --update-snapshots",
51
+ "test:e2e:report": "playwright show-report playwright-report",
52
+ "test:e2e:update": "playwright test --update-snapshots",
53
+ "snapshot-report": "tsx scripts/snapshot-report.ts",
44
54
  "prepack": "npm run build"
45
55
  },
46
56
  "dependencies": {
@@ -67,10 +77,12 @@
67
77
  "devDependencies": {
68
78
  "@fontsource-variable/inter": "^5.3.0",
69
79
  "@fontsource-variable/jetbrains-mono": "^5.3.0",
80
+ "@playwright/test": "1.63.0",
70
81
  "@tailwindcss/vite": "^4.3.3",
71
82
  "@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
72
83
  "@types/node": "^22",
73
84
  "@types/picomatch": "^4.0.3",
85
+ "@types/pngjs": "^6.0.5",
74
86
  "@types/react": "^19",
75
87
  "@types/react-dom": "^19",
76
88
  "@types/ws": "^8",
@@ -79,6 +91,8 @@
79
91
  "jsdom": "^30.0.1",
80
92
  "oxfmt": "^0.67.0",
81
93
  "oxlint": "^1.82.0",
94
+ "pixelmatch": "^7.2.0",
95
+ "pngjs": "^7.0.0",
82
96
  "tailwindcss": "^4.3.3",
83
97
  "tree-sitter-wasms": "^0.1.13",
84
98
  "tsdown": "^0.22.14",