watch-tail 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/build/client/_app/immutable/assets/{0.BQQ1YLPc.css → 0.Dfts6BC4.css} +1 -1
- package/build/client/_app/immutable/assets/0.Dfts6BC4.css.br +0 -0
- package/build/client/_app/immutable/assets/0.Dfts6BC4.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{D-JtVVAo.js → Amq8zxdJ.js} +1 -1
- package/build/client/_app/immutable/chunks/Amq8zxdJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/Amq8zxdJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B6nyufJR.js → B3p3umIY.js} +1 -1
- package/build/client/_app/immutable/chunks/B3p3umIY.js.br +0 -0
- package/build/client/_app/immutable/chunks/B3p3umIY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DJDlf6lC.js → B43Eeyih.js} +1 -1
- package/build/client/_app/immutable/chunks/B43Eeyih.js.br +0 -0
- package/build/client/_app/immutable/chunks/B43Eeyih.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CoEFQJcr.js → B5q6rkQ-.js} +1 -1
- package/build/client/_app/immutable/chunks/B5q6rkQ-.js.br +0 -0
- package/build/client/_app/immutable/chunks/B5q6rkQ-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BR7qH0F5.js → BAynhd7i.js} +1 -1
- package/build/client/_app/immutable/chunks/BAynhd7i.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAynhd7i.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DQi7bc16.js → BDlvDAqe.js} +1 -1
- package/build/client/_app/immutable/chunks/BDlvDAqe.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDlvDAqe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{PYzEcuyd.js → BGmgUZMc.js} +5 -5
- package/build/client/_app/immutable/chunks/BGmgUZMc.js.br +0 -0
- package/build/client/_app/immutable/chunks/BGmgUZMc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DJLYkl5w.js → BJpWBbAS.js} +1 -1
- package/build/client/_app/immutable/chunks/BJpWBbAS.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJpWBbAS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dp8S9ymS.js → BOT2hFMn.js} +1 -1
- package/build/client/_app/immutable/chunks/BOT2hFMn.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOT2hFMn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bp63j1zN.js → BZFYtRPj.js} +1 -1
- package/build/client/_app/immutable/chunks/BZFYtRPj.js.br +0 -0
- package/build/client/_app/immutable/chunks/BZFYtRPj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js +5 -0
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BjxZ_neZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DkyYNO4U.js → BsH4MNzX.js} +1 -1
- package/build/client/_app/immutable/chunks/BsH4MNzX.js.br +0 -0
- package/build/client/_app/immutable/chunks/BsH4MNzX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DmRhEzIa.js → ByhwhtiG.js} +1 -1
- package/build/client/_app/immutable/chunks/ByhwhtiG.js.br +0 -0
- package/build/client/_app/immutable/chunks/ByhwhtiG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CDbeYGlD.js → C1lycbEF.js} +1 -1
- package/build/client/_app/immutable/chunks/C1lycbEF.js.br +0 -0
- package/build/client/_app/immutable/chunks/C1lycbEF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DslUcEd-.js → CEU4ihsz.js} +1 -1
- package/build/client/_app/immutable/chunks/CEU4ihsz.js.br +0 -0
- package/build/client/_app/immutable/chunks/CEU4ihsz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DVTgeA2y.js → CG6rRxUy.js} +1 -1
- package/build/client/_app/immutable/chunks/CG6rRxUy.js.br +0 -0
- package/build/client/_app/immutable/chunks/CG6rRxUy.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{AUlz4-kZ.js → CM5sQDq_.js} +1 -1
- package/build/client/_app/immutable/chunks/CM5sQDq_.js.br +0 -0
- package/build/client/_app/immutable/chunks/CM5sQDq_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{UySfXNq7.js → CT_NYh_-.js} +1 -1
- package/build/client/_app/immutable/chunks/CT_NYh_-.js.br +0 -0
- package/build/client/_app/immutable/chunks/CT_NYh_-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DPKdNiYi.js → CZIk93qi.js} +1 -1
- package/build/client/_app/immutable/chunks/CZIk93qi.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZIk93qi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B1t8v2wP.js → C_aXFBl3.js} +1 -1
- package/build/client/_app/immutable/chunks/C_aXFBl3.js.br +0 -0
- package/build/client/_app/immutable/chunks/C_aXFBl3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CqWPu3PG.js +1 -0
- package/build/client/_app/immutable/chunks/CqWPu3PG.js.br +1 -0
- package/build/client/_app/immutable/chunks/CqWPu3PG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CJFHBop_.js → CyncJW0D.js} +1 -1
- package/build/client/_app/immutable/chunks/CyncJW0D.js.br +0 -0
- package/build/client/_app/immutable/chunks/CyncJW0D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Bmk_Voz6.js → D4sC5v3c.js} +1 -1
- package/build/client/_app/immutable/chunks/D4sC5v3c.js.br +0 -0
- package/build/client/_app/immutable/chunks/D4sC5v3c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{dbhDrJmm.js → D76YLq-2.js} +1 -1
- package/build/client/_app/immutable/chunks/D76YLq-2.js.br +0 -0
- package/build/client/_app/immutable/chunks/D76YLq-2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C20WvNRq.js → D8H_ivbb.js} +1 -1
- package/build/client/_app/immutable/chunks/D8H_ivbb.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8H_ivbb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Di37PX72.js → DU0OQtdJ.js} +1 -1
- package/build/client/_app/immutable/chunks/DU0OQtdJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/DU0OQtdJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CYw9ugj1.js → Yk6ZJZnu.js} +1 -1
- package/build/client/_app/immutable/chunks/Yk6ZJZnu.js.br +0 -0
- package/build/client/_app/immutable/chunks/Yk6ZJZnu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BwntJtbK.js → jO4fmY1N.js} +1 -1
- package/build/client/_app/immutable/chunks/jO4fmY1N.js.br +0 -0
- package/build/client/_app/immutable/chunks/jO4fmY1N.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Dt_Zd6U2.js → snfmbqby.js} +1 -1
- package/build/client/_app/immutable/chunks/snfmbqby.js.br +0 -0
- package/build/client/_app/immutable/chunks/snfmbqby.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{_Zq76xnA.js → wx-wtMGx.js} +1 -1
- package/build/client/_app/immutable/chunks/wx-wtMGx.js.br +0 -0
- package/build/client/_app/immutable/chunks/wx-wtMGx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BkXArOra.js → zHL7lw4G.js} +1 -1
- package/build/client/_app/immutable/chunks/zHL7lw4G.js.br +0 -0
- package/build/client/_app/immutable/chunks/zHL7lw4G.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.vMZB8_Zr.js → app.DFSifnlU.js} +2 -2
- package/build/client/_app/immutable/entry/app.DFSifnlU.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DFSifnlU.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.2H5s3Lol.js +1 -0
- package/build/client/_app/immutable/entry/start.2H5s3Lol.js.br +1 -0
- package/build/client/_app/immutable/entry/start.2H5s3Lol.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.zcN3R_zF.js → 1.Djdw1GzA.js} +1 -1
- package/build/client/_app/immutable/nodes/{1.zcN3R_zF.js.br → 1.Djdw1GzA.js.br} +0 -0
- package/build/client/_app/immutable/nodes/1.Djdw1GzA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CjvaJDQJ.js +4 -0
- package/build/client/_app/immutable/nodes/2.CjvaJDQJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CjvaJDQJ.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{EventScatter.js-DqCMPeHG.js → EventScatter.js-D3Jaw_Cw.js} +7 -3
- package/build/server/chunks/chunks/{EventScatter.js-DqCMPeHG.js.map → EventScatter.js-D3Jaw_Cw.js.map} +1 -1
- package/build/server/chunks/chunks/{archive.js-C6rz09rJ.js → archive.js-C2D-5edp.js} +258 -19
- package/build/server/chunks/chunks/archive.js-C2D-5edp.js.map +1 -0
- package/build/server/chunks/chunks/{internal2.js-DDcktblR.js → internal2.js-BPo5dcDi.js} +2 -2
- package/build/server/chunks/chunks/{internal2.js-DDcktblR.js.map → internal2.js-BPo5dcDi.js.map} +1 -1
- package/build/server/chunks/chunks/{level-filter.js-H_AdNbCw.js → level-filter.js-B3o2hyWD.js} +32 -16
- package/build/server/chunks/chunks/level-filter.js-B3o2hyWD.js.map +1 -0
- package/build/server/chunks/chunks/{log-buffer.js-CpI7gyom.js → log-buffer.js-BI_gQOls.js} +118 -2
- package/build/server/chunks/chunks/log-buffer.js-BI_gQOls.js.map +1 -0
- package/build/server/chunks/chunks/series-buckets.js-BjigySff.js +290 -0
- package/build/server/chunks/chunks/series-buckets.js-BjigySff.js.map +1 -0
- package/build/server/chunks/chunks/{state.js-Dves8H8h.js → state.js-DgkwfYFo.js} +2 -2
- package/build/server/chunks/chunks/{state.js-Dves8H8h.js.map → state.js-DgkwfYFo.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/archive/{_server.ts.js-sNd3lS0y.js → _server.ts.js-83Ch7djd.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/archive/{_server.ts.js-sNd3lS0y.js.map → _server.ts.js-83Ch7djd.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/log-groups/{_server.ts.js-BGyWbj78.js → _server.ts.js-drLgUdvB.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/log-groups/{_server.ts.js-BGyWbj78.js.map → _server.ts.js-drLgUdvB.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/series/{_server.ts.js-DjGMqXKo.js → _server.ts.js-DOvBhEDU.js} +39 -8
- package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DOvBhEDU.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/stream/{_server.ts.js-C-XDemlx.js → _server.ts.js-BWRHawY8.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-BWRHawY8.js.map +1 -0
- package/build/server/chunks/entries/fallbacks/{error.svelte.js-DdUYlUJV.js → error.svelte.js-CsCL5PMW.js} +3 -3
- package/build/server/chunks/entries/fallbacks/{error.svelte.js-DdUYlUJV.js.map → error.svelte.js-CsCL5PMW.js.map} +1 -1
- package/build/server/chunks/entries/pages/{_page.svelte.js-B-kVwiNh.js → _page.svelte.js-qqtU0apo.js} +191 -28
- package/build/server/chunks/entries/pages/_page.svelte.js-qqtU0apo.js.map +1 -0
- package/build/server/chunks/{handler-BHf-eLnl.js → handler-DlfTB05m.js} +3 -3
- package/build/server/chunks/{handler-BHf-eLnl.js.map → handler-DlfTB05m.js.map} +1 -1
- package/build/server/chunks/{index.js-D6Auup1Z.js → index.js-BMrd9hfO.js} +2 -2
- package/build/server/chunks/{index.js-D6Auup1Z.js.map → index.js-BMrd9hfO.js.map} +1 -1
- package/build/server/chunks/{manifest.js-B3Q7n9I6.js → manifest.js-D1kCuVe5.js} +9 -9
- package/build/server/chunks/{manifest.js-B3Q7n9I6.js.map → manifest.js-D1kCuVe5.js.map} +1 -1
- package/build/server/chunks/nodes/{0.js-BMP_Yttt.js → 0.js-CNFDDPj5.js} +3 -3
- package/build/server/chunks/nodes/{0.js-BMP_Yttt.js.map → 0.js-CNFDDPj5.js.map} +1 -1
- package/build/server/chunks/nodes/{1.js-2HQHUOse.js → 1.js-B5FPLYnf.js} +3 -3
- package/build/server/chunks/nodes/{1.js-2HQHUOse.js.map → 1.js-B5FPLYnf.js.map} +1 -1
- package/build/server/chunks/nodes/{2.js-7RtHpiHN.js → 2.js-BEuxzw6b.js} +3 -3
- package/build/server/chunks/nodes/{2.js-7RtHpiHN.js.map → 2.js-BEuxzw6b.js.map} +1 -1
- package/dist/cli/index.js +127 -104
- package/dist/cli/ui.js +18 -3
- package/dist/lib/log-buffer.js +129 -0
- package/package.json +1 -1
- package/build/client/_app/immutable/assets/0.BQQ1YLPc.css.br +0 -0
- package/build/client/_app/immutable/assets/0.BQQ1YLPc.css.gz +0 -0
- package/build/client/_app/immutable/chunks/AUlz4-kZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/AUlz4-kZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B1t8v2wP.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1t8v2wP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B6nyufJR.js.br +0 -0
- package/build/client/_app/immutable/chunks/B6nyufJR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BR7qH0F5.js.br +0 -0
- package/build/client/_app/immutable/chunks/BR7qH0F5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BkXArOra.js.br +0 -0
- package/build/client/_app/immutable/chunks/BkXArOra.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bmk_Voz6.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bmk_Voz6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bp63j1zN.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bp63j1zN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BwntJtbK.js.br +0 -0
- package/build/client/_app/immutable/chunks/BwntJtbK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C20WvNRq.js.br +0 -0
- package/build/client/_app/immutable/chunks/C20WvNRq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CDbeYGlD.js.br +0 -0
- package/build/client/_app/immutable/chunks/CDbeYGlD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CJFHBop_.js.br +0 -0
- package/build/client/_app/immutable/chunks/CJFHBop_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CYw9ugj1.js.br +0 -0
- package/build/client/_app/immutable/chunks/CYw9ugj1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CjJd0uRB.js +0 -1
- package/build/client/_app/immutable/chunks/CjJd0uRB.js.br +0 -1
- package/build/client/_app/immutable/chunks/CjJd0uRB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CoEFQJcr.js.br +0 -0
- package/build/client/_app/immutable/chunks/CoEFQJcr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D-JtVVAo.js.br +0 -0
- package/build/client/_app/immutable/chunks/D-JtVVAo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DJDlf6lC.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJDlf6lC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DJLYkl5w.js.br +0 -0
- package/build/client/_app/immutable/chunks/DJLYkl5w.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DPKdNiYi.js.br +0 -0
- package/build/client/_app/immutable/chunks/DPKdNiYi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DQi7bc16.js.br +0 -0
- package/build/client/_app/immutable/chunks/DQi7bc16.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DVTgeA2y.js.br +0 -0
- package/build/client/_app/immutable/chunks/DVTgeA2y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Di37PX72.js.br +0 -0
- package/build/client/_app/immutable/chunks/Di37PX72.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkyYNO4U.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkyYNO4U.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DmRhEzIa.js.br +0 -0
- package/build/client/_app/immutable/chunks/DmRhEzIa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dp8S9ymS.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dp8S9ymS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DslUcEd-.js.br +0 -0
- package/build/client/_app/immutable/chunks/DslUcEd-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dt_Zd6U2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dt_Zd6U2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DwezeuNE.js +0 -5
- package/build/client/_app/immutable/chunks/DwezeuNE.js.br +0 -0
- package/build/client/_app/immutable/chunks/DwezeuNE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/PYzEcuyd.js.br +0 -0
- package/build/client/_app/immutable/chunks/PYzEcuyd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/UySfXNq7.js.br +0 -0
- package/build/client/_app/immutable/chunks/UySfXNq7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_Zq76xnA.js.br +0 -0
- package/build/client/_app/immutable/chunks/_Zq76xnA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/dbhDrJmm.js.br +0 -0
- package/build/client/_app/immutable/chunks/dbhDrJmm.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.vMZB8_Zr.js.br +0 -0
- package/build/client/_app/immutable/entry/app.vMZB8_Zr.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.pM5lNk_5.js +0 -1
- package/build/client/_app/immutable/entry/start.pM5lNk_5.js.br +0 -0
- package/build/client/_app/immutable/entry/start.pM5lNk_5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.zcN3R_zF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DxevVqut.js +0 -2
- package/build/client/_app/immutable/nodes/2.DxevVqut.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DxevVqut.js.gz +0 -0
- package/build/server/chunks/chunks/archive.js-C6rz09rJ.js.map +0 -1
- package/build/server/chunks/chunks/level-filter.js-H_AdNbCw.js.map +0 -1
- package/build/server/chunks/chunks/log-buffer.js-CpI7gyom.js.map +0 -1
- package/build/server/chunks/chunks/series-buckets.js-CX_rWCeH.js +0 -123
- package/build/server/chunks/chunks/series-buckets.js-CX_rWCeH.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DjGMqXKo.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-C-XDemlx.js.map +0 -1
- package/build/server/chunks/entries/pages/_page.svelte.js-B-kVwiNh.js.map +0 -1
- /package/build/client/_app/immutable/nodes/{0.CZO0sIxX.js → 0.BN3NguWs.js} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CZO0sIxX.js.br → 0.BN3NguWs.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CZO0sIxX.js.gz → 0.BN3NguWs.js.gz} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as detectLevelWithSource, i as isLogLevel } from './log-buffer.js-
|
|
1
|
+
import { d as detectRequestId, a as detectLevelWithSource, i as isLogLevel, L as LEVEL_RANK } from './log-buffer.js-BI_gQOls.js';
|
|
2
2
|
import { mkdirSync, statSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { join, dirname } from 'node:path';
|
|
@@ -14,6 +14,13 @@ import { createHash } from 'node:crypto';
|
|
|
14
14
|
* tested without the driver. Column order matters: {@link ARCHIVE_INSERT_COLUMNS}
|
|
15
15
|
* is the contract with {@link toArchiveParams}, and the `SELECT` in
|
|
16
16
|
* {@link buildPageQuery} uses the same names as {@link rowsToPage}.
|
|
17
|
+
*
|
|
18
|
+
* `level` and `request_id` are both derived from the message on the way in, and
|
|
19
|
+
* both may be NULL in an archive written by an older build. NULL does not mean
|
|
20
|
+
* the same thing for the two columns: for `level` it is a verdict ("this line
|
|
21
|
+
* carries no level"), while for `request_id` it means "not looked at yet", since
|
|
22
|
+
* the client can still detect an id in the message it renders. {@link rowsToPage}
|
|
23
|
+
* and the request-id backfill below are written from that difference.
|
|
17
24
|
*/
|
|
18
25
|
/**
|
|
19
26
|
* Statements that bring a database file up to the current schema.
|
|
@@ -35,11 +42,14 @@ var ARCHIVE_SCHEMA = [
|
|
|
35
42
|
message VARCHAR NOT NULL,
|
|
36
43
|
level VARCHAR,
|
|
37
44
|
level_source VARCHAR,
|
|
45
|
+
request_id VARCHAR,
|
|
38
46
|
seq BIGINT NOT NULL DEFAULT nextval('log_events_seq'),
|
|
39
47
|
archived_at TIMESTAMP NOT NULL DEFAULT now()
|
|
40
48
|
)`,
|
|
41
49
|
`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level VARCHAR`,
|
|
42
50
|
`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level_source VARCHAR`,
|
|
51
|
+
`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS request_id VARCHAR`,
|
|
52
|
+
`CREATE TABLE IF NOT EXISTS archive_meta (key VARCHAR PRIMARY KEY, value VARCHAR)`,
|
|
43
53
|
`CREATE UNIQUE INDEX IF NOT EXISTS log_events_unique ON log_events (region, log_group, event_key)`,
|
|
44
54
|
`CREATE INDEX IF NOT EXISTS log_events_time ON log_events (region, log_group, timestamp_ms)`
|
|
45
55
|
];
|
|
@@ -54,7 +64,8 @@ var ARCHIVE_INSERT_COLUMNS = [
|
|
|
54
64
|
"ingestion_time_ms",
|
|
55
65
|
"message",
|
|
56
66
|
"level",
|
|
57
|
-
"level_source"
|
|
67
|
+
"level_source",
|
|
68
|
+
"request_id"
|
|
58
69
|
];
|
|
59
70
|
/** Escape character used with `LIKE`/`ILIKE` so user input cannot inject wildcards. */
|
|
60
71
|
var LIKE_ESCAPE = "\\";
|
|
@@ -70,7 +81,7 @@ function archiveEventKey(event) {
|
|
|
70
81
|
if (event.id !== null && event.id.length > 0) return event.id;
|
|
71
82
|
return `h:${createHash("sha256").update(`${event.timestamp}\u0000${event.streamName ?? ""}\u0000${event.message}`).digest("hex").slice(0, 32)}`;
|
|
72
83
|
}
|
|
73
|
-
/** Renders `count` placeholder rows of
|
|
84
|
+
/** Renders `count` placeholder rows, one group of columns per row. */
|
|
74
85
|
function placeholderRows(count) {
|
|
75
86
|
const row = `(${ARCHIVE_INSERT_COLUMNS.map(() => "?").join(", ")})`;
|
|
76
87
|
return Array.from({ length: count }, () => row).join(", ");
|
|
@@ -83,17 +94,22 @@ function buildInsertSql(rowCount) {
|
|
|
83
94
|
if (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);
|
|
84
95
|
return `INSERT OR IGNORE INTO log_events (${ARCHIVE_INSERT_COLUMNS.join(", ")}) VALUES ${placeholderRows(rowCount)}`;
|
|
85
96
|
}
|
|
86
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Flattens events into the parameter list {@link buildInsertSql} expects.
|
|
99
|
+
*
|
|
100
|
+
* The request id is detected here, exactly like the level, so the archive holds
|
|
101
|
+
* what a reader of the line would see rather than whatever a writer claimed.
|
|
102
|
+
*/
|
|
87
103
|
function toArchiveParams(region, logGroup, events) {
|
|
88
104
|
const params = [];
|
|
89
105
|
for (const event of events) {
|
|
90
106
|
const detected = detectLevelWithSource(event.message);
|
|
91
|
-
params.push(region, logGroup, event.streamName ?? null, archiveEventKey(event), event.id ?? null, BigInt(Math.round(event.timestamp)), event.ingestionTime === void 0 ? null : BigInt(Math.round(event.ingestionTime)), event.message, detected.level, detected.source);
|
|
107
|
+
params.push(region, logGroup, event.streamName ?? null, archiveEventKey(event), event.id ?? null, BigInt(Math.round(event.timestamp)), event.ingestionTime === void 0 ? null : BigInt(Math.round(event.ingestionTime)), event.message, detected.level, detected.source, detectRequestId(event.message));
|
|
92
108
|
}
|
|
93
109
|
return params;
|
|
94
110
|
}
|
|
95
111
|
/** Column list shared by {@link buildPageQuery} and {@link rowsToPage}. */
|
|
96
|
-
var PAGE_COLUMNS = `region, log_group, log_stream, event_key, event_id, timestamp_ms, ingestion_time_ms, message, level, level_source, seq`;
|
|
112
|
+
var PAGE_COLUMNS = `region, log_group, log_stream, event_key, event_id, timestamp_ms, ingestion_time_ms, message, level, level_source, request_id, seq`;
|
|
97
113
|
/** Escapes `LIKE` metacharacters so a search term is matched literally. */
|
|
98
114
|
function escapeLike(value) {
|
|
99
115
|
return value.replace(/[\\%_]/g, (match) => `${LIKE_ESCAPE}${match}`);
|
|
@@ -188,6 +204,8 @@ function rowsToPage(rows) {
|
|
|
188
204
|
level: isLogLevel(rawLevel) ? rawLevel : null
|
|
189
205
|
};
|
|
190
206
|
if (group !== null) event.group = group;
|
|
207
|
+
const requestId = toNullableString(pick(row, "request_id"));
|
|
208
|
+
if (requestId !== null) event.requestId = requestId;
|
|
191
209
|
const streamName = toNullableString(pick(row, "log_stream"));
|
|
192
210
|
if (streamName !== null) event.streamName = streamName;
|
|
193
211
|
const ingestionTime = toNumber(pick(row, "ingestion_time_ms"));
|
|
@@ -248,30 +266,174 @@ function rowsToGroups(rows) {
|
|
|
248
266
|
return groups;
|
|
249
267
|
}
|
|
250
268
|
/**
|
|
269
|
+
* Row budget of one request-id backfill pass.
|
|
270
|
+
*
|
|
271
|
+
* The pass runs on every open, so it has to stay cheap. 20000 messages is a
|
|
272
|
+
* fraction of a second of regex work, and an archive with more than that scans
|
|
273
|
+
* the rest on the next open, because the watermark moves.
|
|
274
|
+
*/
|
|
275
|
+
var REQUEST_ID_BACKFILL_LIMIT = 2e4;
|
|
276
|
+
/** `archive_meta` key holding the request-id backfill watermark. */
|
|
277
|
+
var REQUEST_ID_BACKFILL_KEY = "request_id_backfill";
|
|
278
|
+
/** Highest `seq` in the archive: the ceiling of a backfill pass. */
|
|
279
|
+
var ARCHIVE_MAX_SEQ_SQL = `SELECT max(seq) AS maxSeq FROM log_events`;
|
|
280
|
+
/** Reads the single row of {@link ARCHIVE_MAX_SEQ_SQL}; `null` for an empty archive. */
|
|
281
|
+
function rowToMaxSeq(row) {
|
|
282
|
+
return row === void 0 ? null : toNumber(pick(row, "maxSeq"));
|
|
283
|
+
}
|
|
284
|
+
/** Statement that reads the backfill watermark; no row means it never ran. */
|
|
285
|
+
function buildRequestIdBackfillStateQuery() {
|
|
286
|
+
return `SELECT value FROM archive_meta WHERE key = '${REQUEST_ID_BACKFILL_KEY}'`;
|
|
287
|
+
}
|
|
288
|
+
/** Statement that stores the backfill watermark, which is the highest scanned `seq`. */
|
|
289
|
+
function buildRequestIdBackfillStateWrite() {
|
|
290
|
+
return `INSERT OR REPLACE INTO archive_meta (key, value) VALUES ('${REQUEST_ID_BACKFILL_KEY}', ?)`;
|
|
291
|
+
}
|
|
292
|
+
/** Reads the watermark row; an absent row or junk means "scan from the start". */
|
|
293
|
+
function rowToBackfillWatermark(row) {
|
|
294
|
+
const value = row === void 0 ? null : toNumber(pick(row, "value"));
|
|
295
|
+
return value === null || value < 0 ? null : value;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Builds the scan that finds rows archived before `request_id` existed.
|
|
299
|
+
*
|
|
300
|
+
* `seq` is selected although the update does not need it: the caller stores
|
|
301
|
+
* where the pass stopped. `afterSeq` skips the range a previous pass already
|
|
302
|
+
* looked at, which is what lets a capped pass resume - a message with no request
|
|
303
|
+
* id stays NULL for ever, so without the lower bound every pass would start on
|
|
304
|
+
* the same id-less rows and never reach the rows above them.
|
|
305
|
+
*/
|
|
306
|
+
function buildRequestIdBackfillQuery(request) {
|
|
307
|
+
const limit = Math.max(1, Math.round(request.limit));
|
|
308
|
+
const scanned = request.afterSeq ?? 0;
|
|
309
|
+
const after = scanned > 0 ? " AND seq > ?" : "";
|
|
310
|
+
const params = [BigInt(Math.round(request.maxSeq))];
|
|
311
|
+
if (scanned > 0) params.push(BigInt(Math.round(scanned)));
|
|
312
|
+
params.push(BigInt(limit));
|
|
313
|
+
return {
|
|
314
|
+
sql: `SELECT event_key, log_group, region, message, seq FROM log_events WHERE seq <= ?${after} AND request_id IS NULL ORDER BY seq LIMIT ?`,
|
|
315
|
+
params
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
/** Maps the rows of {@link buildRequestIdBackfillQuery}, dropping unusable ones. */
|
|
319
|
+
function rowsToBackfillCandidates(rows) {
|
|
320
|
+
const candidates = [];
|
|
321
|
+
for (const row of rows) {
|
|
322
|
+
const seq = toNumber(pick(row, "seq"));
|
|
323
|
+
const region = pick(row, "region");
|
|
324
|
+
const logGroup = pick(row, "log_group");
|
|
325
|
+
const eventKey = pick(row, "event_key");
|
|
326
|
+
const message = pick(row, "message");
|
|
327
|
+
if (seq === null || typeof region !== "string" || typeof logGroup !== "string" || typeof eventKey !== "string" || typeof message !== "string") continue;
|
|
328
|
+
candidates.push({
|
|
329
|
+
seq,
|
|
330
|
+
region,
|
|
331
|
+
logGroup,
|
|
332
|
+
eventKey,
|
|
333
|
+
message
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return candidates;
|
|
337
|
+
}
|
|
338
|
+
/** Highest `seq` of a scanned set, or `null` when nothing was scanned. */
|
|
339
|
+
function maxSeqOf(candidates) {
|
|
340
|
+
let highest = null;
|
|
341
|
+
for (const candidate of candidates) if (highest === null || candidate.seq > highest) highest = candidate.seq;
|
|
342
|
+
return highest;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Detects the request id of every candidate.
|
|
346
|
+
*
|
|
347
|
+
* A message that yields no id is dropped rather than written as an empty string:
|
|
348
|
+
* it is a finished row, not a failure, and the watermark moves past it so it is
|
|
349
|
+
* never looked at again.
|
|
350
|
+
*/
|
|
351
|
+
function planRequestIdBackfill(candidates) {
|
|
352
|
+
const updates = [];
|
|
353
|
+
for (const candidate of candidates) {
|
|
354
|
+
const requestId = detectRequestId(candidate.message);
|
|
355
|
+
if (requestId === null) continue;
|
|
356
|
+
updates.push({
|
|
357
|
+
region: candidate.region,
|
|
358
|
+
logGroup: candidate.logGroup,
|
|
359
|
+
eventKey: candidate.eventKey,
|
|
360
|
+
requestId
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
return updates;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Builds one `UPDATE ... FROM (VALUES ...)` that writes many ids at once.
|
|
367
|
+
*
|
|
368
|
+
* One statement per chunk instead of one per row keeps a 20000-row pass down to
|
|
369
|
+
* a handful of statements, and the predicate is an exact row match on the unique
|
|
370
|
+
* index (`region`, `log_group`, `event_key`).
|
|
371
|
+
*/
|
|
372
|
+
function buildRequestIdBackfillUpdate(rowCount) {
|
|
373
|
+
if (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);
|
|
374
|
+
return `UPDATE log_events SET request_id = v.request_id FROM (VALUES ${Array.from({ length: rowCount }, () => "(?, ?, ?, ?)").join(", ")}) AS v(region, log_group, event_key, request_id) WHERE log_events.region = v.region AND log_events.log_group = v.log_group AND log_events.event_key = v.event_key`;
|
|
375
|
+
}
|
|
376
|
+
/** Flattens updates into the parameter list {@link buildRequestIdBackfillUpdate} expects. */
|
|
377
|
+
function toRequestIdBackfillParams(updates) {
|
|
378
|
+
const params = [];
|
|
379
|
+
for (const update of updates) params.push(update.region, update.logGroup, update.eventKey, update.requestId);
|
|
380
|
+
return params;
|
|
381
|
+
}
|
|
382
|
+
/** Levels and their rank, highest first; `unknown` is left to the `ELSE` branch. */
|
|
383
|
+
function rankArms() {
|
|
384
|
+
return Object.entries(LEVEL_RANK).filter(([level]) => level !== "unknown");
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* SQL `CASE` that turns a level into its severity rank.
|
|
388
|
+
*
|
|
389
|
+
* Generated from {@link LEVEL_RANK} so the ranks have one source of truth: the
|
|
390
|
+
* statement and the UI cannot disagree about which level is worse.
|
|
391
|
+
*/
|
|
392
|
+
function levelRankCase(expression) {
|
|
393
|
+
return `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN '${level}' THEN ${rank}`).join(" ")} ELSE ${LEVEL_RANK.unknown} END`;
|
|
394
|
+
}
|
|
395
|
+
/** SQL `CASE` that turns a severity rank back into a level name. */
|
|
396
|
+
function levelNameCase(expression) {
|
|
397
|
+
return `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN ${rank} THEN '${level}'`).join(" ")} ELSE 'unknown' END`;
|
|
398
|
+
}
|
|
399
|
+
/** The `WHERE` clause both series forms share: one region, one window, one or more groups. */
|
|
400
|
+
function seriesScope(request, groups) {
|
|
401
|
+
return {
|
|
402
|
+
where: [
|
|
403
|
+
"region = ?",
|
|
404
|
+
`log_group IN (${groups.map(() => "?").join(", ")})`,
|
|
405
|
+
"timestamp_ms >= ?",
|
|
406
|
+
"timestamp_ms <= ?"
|
|
407
|
+
],
|
|
408
|
+
params: [
|
|
409
|
+
request.region,
|
|
410
|
+
...groups,
|
|
411
|
+
BigInt(Math.round(request.startTime)),
|
|
412
|
+
BigInt(Math.round(request.endTime))
|
|
413
|
+
]
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
251
417
|
* Builds the bucketed counts behind the chart.
|
|
252
418
|
*
|
|
253
419
|
* One statement returns every series. The bucket is plain integer arithmetic on
|
|
254
420
|
* `timestamp_ms`, so it cannot drift with a time zone; NULL levels are reported
|
|
255
421
|
* as `unknown` rather than dropped; and a level filter matches only rows that
|
|
256
422
|
* carry one of the requested levels.
|
|
423
|
+
*
|
|
424
|
+
* `by: 'request'` selects the request form below; `by: 'event'` (the default)
|
|
425
|
+
* keeps the event form unchanged.
|
|
257
426
|
*/
|
|
258
427
|
function buildSeriesQuery(request) {
|
|
259
428
|
const bucketMs = Math.max(1, Math.round(request.bucketMs));
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
"region = ?",
|
|
263
|
-
`log_group IN (${groups.map(() => "?").join(", ")})`,
|
|
264
|
-
"timestamp_ms >= ?",
|
|
265
|
-
"timestamp_ms <= ?"
|
|
266
|
-
];
|
|
429
|
+
const scope = seriesScope(request, request.logGroups.length > 0 ? request.logGroups : [""]);
|
|
430
|
+
if (request.by === "request") return buildRequestSeriesQuery(request, bucketMs, scope.where, scope.params);
|
|
267
431
|
const params = [
|
|
268
432
|
BigInt(bucketMs),
|
|
269
433
|
BigInt(bucketMs),
|
|
270
|
-
|
|
271
|
-
...groups,
|
|
272
|
-
BigInt(Math.round(request.startTime)),
|
|
273
|
-
BigInt(Math.round(request.endTime))
|
|
434
|
+
...scope.params
|
|
274
435
|
];
|
|
436
|
+
const where = scope.where.slice();
|
|
275
437
|
const levels = request.levels ?? [];
|
|
276
438
|
if (levels.length > 0) {
|
|
277
439
|
where.push(`level IN (${levels.map(() => "?").join(", ")})`);
|
|
@@ -282,6 +444,42 @@ function buildSeriesQuery(request) {
|
|
|
282
444
|
params
|
|
283
445
|
};
|
|
284
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* Builds the request form: one mark per request instead of one per line.
|
|
449
|
+
*
|
|
450
|
+
* `coalesce(request_id, event_key)` makes a line with no request id a request of
|
|
451
|
+
* its own, so no line is dropped. A request is placed at its FIRST line
|
|
452
|
+
* (`min(timestamp_ms)`) and counted once, and it takes the WORST level of its
|
|
453
|
+
* lines (`max` of the ranks). A level filter selects on that same worst level in
|
|
454
|
+
* the `HAVING`: asking for errors keeps every request that logged one, whatever
|
|
455
|
+
* else it logged, and drops the requests that stayed below it.
|
|
456
|
+
*
|
|
457
|
+
* BIND ORDER: DuckDB binds `?` positionally in statement text order, and the CTE
|
|
458
|
+
* comes first, so the parameters are the scope ones, then one rank per requested
|
|
459
|
+
* level (the RANKS, not the level names), and the bucket width LAST - the
|
|
460
|
+
* opposite of the event form above.
|
|
461
|
+
*/
|
|
462
|
+
function buildRequestSeriesQuery(request, bucketMs, where, scopeParams) {
|
|
463
|
+
const levels = request.levels ?? [];
|
|
464
|
+
const having = levels.length > 0 ? ` HAVING level_rank IN (${levels.map(() => "?").join(", ")})` : "";
|
|
465
|
+
const params = [
|
|
466
|
+
...scopeParams,
|
|
467
|
+
...levels.map((level) => LEVEL_RANK[level]),
|
|
468
|
+
BigInt(bucketMs),
|
|
469
|
+
BigInt(bucketMs)
|
|
470
|
+
];
|
|
471
|
+
return {
|
|
472
|
+
sql: [
|
|
473
|
+
"WITH requests AS (",
|
|
474
|
+
`SELECT coalesce(request_id, event_key) AS request_key, log_group, min(timestamp_ms) AS start_ms, max(${levelRankCase(`coalesce(level, 'unknown')`)}) AS level_rank`,
|
|
475
|
+
`FROM log_events WHERE ${where.join(" AND ")}`,
|
|
476
|
+
`GROUP BY request_key, log_group${having})`,
|
|
477
|
+
`SELECT CAST(floor(start_ms / ?) * ? AS BIGINT) AS bucket, log_group, ${levelNameCase("level_rank")} AS level, count(*) AS events`,
|
|
478
|
+
"FROM requests GROUP BY bucket, log_group, level ORDER BY bucket, log_group, level"
|
|
479
|
+
].join(" "),
|
|
480
|
+
params
|
|
481
|
+
};
|
|
482
|
+
}
|
|
285
483
|
/** Maps the rows of {@link buildSeriesQuery} onto chart points. */
|
|
286
484
|
function rowsToSeries(rows) {
|
|
287
485
|
const points = [];
|
|
@@ -411,6 +609,8 @@ var LogArchive = class LogArchive {
|
|
|
411
609
|
*
|
|
412
610
|
* Statements are executed in order: the sequence first, then the table, then
|
|
413
611
|
* the indexes, so an existing file from an older build is upgraded in place.
|
|
612
|
+
* The request-id backfill runs last, inside the same serialised path, and
|
|
613
|
+
* cannot fail the open.
|
|
414
614
|
*/
|
|
415
615
|
static async open(options) {
|
|
416
616
|
const archive = new LogArchive(options.path);
|
|
@@ -424,6 +624,7 @@ var LogArchive = class LogArchive {
|
|
|
424
624
|
for (const statement of ARCHIVE_SCHEMA) await connection.run(statement);
|
|
425
625
|
archive.#connection = connection;
|
|
426
626
|
archive.#available = true;
|
|
627
|
+
await archive.#backfillRequestIds();
|
|
427
628
|
break;
|
|
428
629
|
} catch (error) {
|
|
429
630
|
if (attempt >= 3 || !isLockError(error)) throw error;
|
|
@@ -474,6 +675,39 @@ var LogArchive = class LogArchive {
|
|
|
474
675
|
});
|
|
475
676
|
}
|
|
476
677
|
/**
|
|
678
|
+
* Migrates the request id of rows written before the column existed.
|
|
679
|
+
*
|
|
680
|
+
* It runs inside {@link LogArchive.#guard}, so it shares the serialised
|
|
681
|
+
* statement queue with every other write and reports a failure on `error`
|
|
682
|
+
* instead of letting it escape `open`. The watermark is the highest `seq` the
|
|
683
|
+
* migration has looked at, so a capped or interrupted pass carries on from
|
|
684
|
+
* there on the next open and no row is scanned twice; a row whose message
|
|
685
|
+
* holds no id stays NULL, which is the archive's answer for that row.
|
|
686
|
+
*/
|
|
687
|
+
async #backfillRequestIds() {
|
|
688
|
+
await this.#guard(void 0, async () => {
|
|
689
|
+
const connection = this.#connection;
|
|
690
|
+
if (connection === null) return;
|
|
691
|
+
const ceiling = rowToMaxSeq((await connection.runAndReadAll(ARCHIVE_MAX_SEQ_SQL)).getRowObjects()[0]);
|
|
692
|
+
if (ceiling === null) return;
|
|
693
|
+
const watermark = rowToBackfillWatermark((await connection.runAndReadAll(buildRequestIdBackfillStateQuery())).getRowObjects()[0]);
|
|
694
|
+
if (watermark !== null && watermark >= ceiling) return;
|
|
695
|
+
const { sql, params } = buildRequestIdBackfillQuery({
|
|
696
|
+
maxSeq: ceiling,
|
|
697
|
+
afterSeq: watermark,
|
|
698
|
+
limit: REQUEST_ID_BACKFILL_LIMIT
|
|
699
|
+
});
|
|
700
|
+
const candidates = rowsToBackfillCandidates((await connection.runAndReadAll(sql, params)).getRowObjects());
|
|
701
|
+
const updates = planRequestIdBackfill(candidates);
|
|
702
|
+
for (let start = 0; start < updates.length; start += 500) {
|
|
703
|
+
const chunk = updates.slice(start, start + 500);
|
|
704
|
+
await connection.run(buildRequestIdBackfillUpdate(chunk.length), toRequestIdBackfillParams(chunk));
|
|
705
|
+
}
|
|
706
|
+
const scanned = candidates.length < 2e4 ? ceiling : maxSeqOf(candidates);
|
|
707
|
+
await connection.run(buildRequestIdBackfillStateWrite(), [String(scanned ?? ceiling)]);
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
477
711
|
* Writes one batch of streamed events.
|
|
478
712
|
*
|
|
479
713
|
* Batches are split into chunks of {@link ARCHIVE_INSERT_CHUNK} rows, and
|
|
@@ -507,7 +741,12 @@ var LogArchive = class LogArchive {
|
|
|
507
741
|
return rowsToPage((await connection.runAndReadAll(sql, params)).getRowObjects());
|
|
508
742
|
});
|
|
509
743
|
}
|
|
510
|
-
/**
|
|
744
|
+
/**
|
|
745
|
+
* Bucketed counts for the chart, per group and level.
|
|
746
|
+
*
|
|
747
|
+
* The request is forwarded as it arrives: it carries the grouping that says
|
|
748
|
+
* whether a mark counts an event or a request.
|
|
749
|
+
*/
|
|
511
750
|
async seriesQuery(request) {
|
|
512
751
|
return this.#guard([], async () => {
|
|
513
752
|
const connection = this.#connection;
|
|
@@ -581,4 +820,4 @@ function getArchive(env, load) {
|
|
|
581
820
|
}
|
|
582
821
|
|
|
583
822
|
export { getArchive as g };
|
|
584
|
-
//# sourceMappingURL=archive.js-
|
|
823
|
+
//# sourceMappingURL=archive.js-C2D-5edp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive.js-C2D-5edp.js","sources":["../../../../.svelte-kit/output/server/chunks/archive.js"],"sourcesContent":["import { a as detectLevelWithSource, d as isLogLevel, n as LEVEL_RANK, o as detectRequestId } from \"./log-buffer.js\";\nimport { mkdirSync, statSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport { setTimeout } from \"node:timers/promises\";\nimport { createHash } from \"node:crypto\";\n//#region src/lib/server/archive-sql.ts\n/**\n* SQL and row mapping for the local DuckDB archive.\n*\n* DuckDB is a native dependency and is loaded lazily by `archive.ts`; everything\n* in this file is plain text and pure functions so the archive can be unit\n* tested without the driver. Column order matters: {@link ARCHIVE_INSERT_COLUMNS}\n* is the contract with {@link toArchiveParams}, and the `SELECT` in\n* {@link buildPageQuery} uses the same names as {@link rowsToPage}.\n*\n* `level` and `request_id` are both derived from the message on the way in, and\n* both may be NULL in an archive written by an older build. NULL does not mean\n* the same thing for the two columns: for `level` it is a verdict (\"this line\n* carries no level\"), while for `request_id` it means \"not looked at yet\", since\n* the client can still detect an id in the message it renders. {@link rowsToPage}\n* and the request-id backfill below are written from that difference.\n*/\n/**\n* Statements that bring a database file up to the current schema.\n*\n* Every statement is idempotent so an existing archive can be opened by a newer\n* build without a migration step. `seq` orders events by arrival, which keeps\n* paging stable when many events share a millisecond timestamp.\n*/\nvar ARCHIVE_SCHEMA = [\n\t`CREATE SEQUENCE IF NOT EXISTS log_events_seq`,\n\t`CREATE TABLE IF NOT EXISTS log_events (\n\t\tregion VARCHAR NOT NULL,\n\t\tlog_group VARCHAR NOT NULL,\n\t\tlog_stream VARCHAR,\n\t\tevent_key VARCHAR NOT NULL,\n\t\tevent_id VARCHAR,\n\t\ttimestamp_ms BIGINT NOT NULL,\n\t\tingestion_time_ms BIGINT,\n\t\tmessage VARCHAR NOT NULL,\n\t\tlevel VARCHAR,\n\t\tlevel_source VARCHAR,\n\t\trequest_id VARCHAR,\n\t\tseq BIGINT NOT NULL DEFAULT nextval('log_events_seq'),\n\t\tarchived_at TIMESTAMP NOT NULL DEFAULT now()\n\t)`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level VARCHAR`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS level_source VARCHAR`,\n\t`ALTER TABLE log_events ADD COLUMN IF NOT EXISTS request_id VARCHAR`,\n\t`CREATE TABLE IF NOT EXISTS archive_meta (key VARCHAR PRIMARY KEY, value VARCHAR)`,\n\t`CREATE UNIQUE INDEX IF NOT EXISTS log_events_unique ON log_events (region, log_group, event_key)`,\n\t`CREATE INDEX IF NOT EXISTS log_events_time ON log_events (region, log_group, timestamp_ms)`\n];\n/** Columns written by {@link buildInsertSql}, in binding order. */\nvar ARCHIVE_INSERT_COLUMNS = [\n\t\"region\",\n\t\"log_group\",\n\t\"log_stream\",\n\t\"event_key\",\n\t\"event_id\",\n\t\"timestamp_ms\",\n\t\"ingestion_time_ms\",\n\t\"message\",\n\t\"level\",\n\t\"level_source\",\n\t\"request_id\"\n];\n/** Escape character used with `LIKE`/`ILIKE` so user input cannot inject wildcards. */\nvar LIKE_ESCAPE = \"\\\\\";\n/**\n* Stable identity of an event inside one log group.\n*\n* CloudWatch event ids are unique per log group and are reused as the key;\n* events without an id (floci and LocalStack omit them) get a deterministic\n* hash of timestamp, stream and message, so re-scanning the same window is\n* idempotent instead of duplicating rows.\n*/\nfunction archiveEventKey(event) {\n\tif (event.id !== null && event.id.length > 0) return event.id;\n\treturn `h:${createHash(\"sha256\").update(`${event.timestamp}\\u0000${event.streamName ?? \"\"}\\u0000${event.message}`).digest(\"hex\").slice(0, 32)}`;\n}\n/** Renders `count` placeholder rows, one group of columns per row. */\nfunction placeholderRows(count) {\n\tconst row = `(${ARCHIVE_INSERT_COLUMNS.map(() => \"?\").join(\", \")})`;\n\treturn Array.from({ length: count }, () => row).join(\", \");\n}\n/**\n* Builds a multi-row `INSERT OR IGNORE`, so events already archived are skipped\n* by the unique index instead of raising.\n*/\nfunction buildInsertSql(rowCount) {\n\tif (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);\n\treturn `INSERT OR IGNORE INTO log_events (${ARCHIVE_INSERT_COLUMNS.join(\", \")}) VALUES ${placeholderRows(rowCount)}`;\n}\n/**\n* Flattens events into the parameter list {@link buildInsertSql} expects.\n*\n* The request id is detected here, exactly like the level, so the archive holds\n* what a reader of the line would see rather than whatever a writer claimed.\n*/\nfunction toArchiveParams(region, logGroup, events) {\n\tconst params = [];\n\tfor (const event of events) {\n\t\tconst detected = detectLevelWithSource(event.message);\n\t\tparams.push(region, logGroup, event.streamName ?? null, archiveEventKey(event), event.id ?? null, BigInt(Math.round(event.timestamp)), event.ingestionTime === void 0 ? null : BigInt(Math.round(event.ingestionTime)), event.message, detected.level, detected.source, detectRequestId(event.message));\n\t}\n\treturn params;\n}\n/** Column list shared by {@link buildPageQuery} and {@link rowsToPage}. */\nvar PAGE_COLUMNS = `region, log_group, log_stream, event_key, event_id, timestamp_ms, ingestion_time_ms, message, level, level_source, request_id, seq`;\n/** Escapes `LIKE` metacharacters so a search term is matched literally. */\nfunction escapeLike(value) {\n\treturn value.replace(/[\\\\%_]/g, (match) => `${LIKE_ESCAPE}${match}`);\n}\n/**\n* Builds one keyset page of archived events.\n*\n* Ordering is `(timestamp_ms, seq)`, and the cursor compares the same tuple, so\n* pages never repeat or skip a row even when thousands of events share a\n* timestamp.\n*/\nfunction buildPageQuery(request) {\n\tconst limit = Math.max(1, Math.round(request.limit));\n\tconst groups = request.logGroups.length > 0 ? request.logGroups : [\"\"];\n\tconst where = [\n\t\t\"region = ?\",\n\t\t`log_group IN (${groups.map(() => \"?\").join(\", \")})`,\n\t\t\"timestamp_ms >= ?\",\n\t\t\"timestamp_ms <= ?\"\n\t];\n\tconst params = [\n\t\trequest.region,\n\t\t...groups,\n\t\tBigInt(Math.round(request.startTime)),\n\t\tBigInt(Math.round(request.endTime))\n\t];\n\tconst search = request.search?.trim() ?? \"\";\n\tif (search.length > 0) {\n\t\twhere.push(`message ILIKE ? ESCAPE '${LIKE_ESCAPE}'`);\n\t\tparams.push(`%${escapeLike(search)}%`);\n\t}\n\tconst prefix = request.streamPrefix?.trim() ?? \"\";\n\tif (prefix.length > 0) {\n\t\twhere.push(`log_stream LIKE ? ESCAPE '${LIKE_ESCAPE}'`);\n\t\tparams.push(`${escapeLike(prefix)}%`);\n\t}\n\tconst levels = request.levels ?? [];\n\tif (levels.length > 0) {\n\t\twhere.push(`level IN (${levels.map(() => \"?\").join(\", \")})`);\n\t\tparams.push(...levels);\n\t}\n\tconst after = request.after ?? null;\n\tif (after !== null) {\n\t\twhere.push(\"(timestamp_ms > ? OR (timestamp_ms = ? AND seq > ?))\");\n\t\tparams.push(BigInt(Math.round(after.timestamp)), BigInt(Math.round(after.timestamp)), BigInt(Math.round(after.seq)));\n\t}\n\tparams.push(BigInt(limit));\n\treturn {\n\t\tsql: `SELECT ${PAGE_COLUMNS} FROM log_events WHERE ${where.join(\" AND \")} ORDER BY timestamp_ms, seq LIMIT ?`,\n\t\tparams\n\t};\n}\n/** Converts a DuckDB value (which may be a bigint) into a JS number. */\nfunction toNumber(value) {\n\tif (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n\tif (typeof value === \"bigint\") return Number(value);\n\tif (typeof value === \"string\" && value.trim().length > 0) {\n\t\tconst parsed = Number(value);\n\t\treturn Number.isFinite(parsed) ? parsed : null;\n\t}\n\treturn null;\n}\n/** Converts a nullable DuckDB string column into `string` or `null`. */\nfunction toNullableString(value) {\n\tif (typeof value === \"string\") return value.length > 0 ? value : null;\n\treturn null;\n}\n/** Reads one column from a row object, tolerating case differences. */\nfunction pick(row, column) {\n\tif (column in row) return row[column];\n\tconst upper = column.toUpperCase();\n\tif (upper in row) return row[upper];\n}\n/**\n* Maps query rows onto wire events plus the cursor of the last row.\n*\n* Rows without a usable timestamp are dropped rather than rendered as 1970.\n*/\nfunction rowsToPage(rows) {\n\tconst events = [];\n\tlet last = null;\n\tfor (const row of rows) {\n\t\tconst timestamp = toNumber(pick(row, \"timestamp_ms\"));\n\t\tconst seq = toNumber(pick(row, \"seq\"));\n\t\tif (timestamp === null || seq === null) continue;\n\t\tconst rawLevel = pick(row, \"level\");\n\t\tconst group = toNullableString(pick(row, \"log_group\"));\n\t\tconst event = {\n\t\t\tid: toNullableString(pick(row, \"event_key\")),\n\t\t\ttimestamp,\n\t\t\tmessage: typeof pick(row, \"message\") === \"string\" ? pick(row, \"message\") : \"\",\n\t\t\tlevel: isLogLevel(rawLevel) ? rawLevel : null\n\t\t};\n\t\tif (group !== null) event.group = group;\n\t\tconst requestId = toNullableString(pick(row, \"request_id\"));\n\t\tif (requestId !== null) event.requestId = requestId;\n\t\tconst streamName = toNullableString(pick(row, \"log_stream\"));\n\t\tif (streamName !== null) event.streamName = streamName;\n\t\tconst ingestionTime = toNumber(pick(row, \"ingestion_time_ms\"));\n\t\tif (ingestionTime !== null) event.ingestionTime = ingestionTime;\n\t\tevents.push(event);\n\t\tlast = {\n\t\t\ttimestamp,\n\t\t\tseq\n\t\t};\n\t}\n\treturn {\n\t\tevents,\n\t\tlast\n\t};\n}\n/** Aggregate query behind {@link ArchiveTotals}. */\nvar ARCHIVE_TOTALS_SQL = `SELECT count(*) AS rows, count(DISTINCT log_group) AS groups, count(DISTINCT region) AS regions, min(timestamp_ms) AS oldest, max(timestamp_ms) AS newest FROM log_events`;\n/** Log groups held by the archive, optionally limited to one region. */\nfunction buildGroupsQuery(region) {\n\tconst where = region === null || region.length === 0 ? \"\" : \"WHERE region = ?\";\n\treturn {\n\t\tsql: `SELECT region, log_group, count(*) AS events, min(timestamp_ms) AS oldest, max(timestamp_ms) AS newest FROM log_events ${where} GROUP BY region, log_group ORDER BY region, log_group`,\n\t\tparams: where === \"\" ? [] : [region]\n\t};\n}\n/** Maps the single row of {@link ARCHIVE_TOTALS_SQL}. */\nfunction rowToTotals(row) {\n\tif (row === void 0) return {\n\t\trows: 0,\n\t\tgroups: 0,\n\t\tregions: 0,\n\t\toldest: null,\n\t\tnewest: null\n\t};\n\treturn {\n\t\trows: toNumber(pick(row, \"rows\")) ?? 0,\n\t\tgroups: toNumber(pick(row, \"groups\")) ?? 0,\n\t\tregions: toNumber(pick(row, \"regions\")) ?? 0,\n\t\toldest: toNumber(pick(row, \"oldest\")),\n\t\tnewest: toNumber(pick(row, \"newest\"))\n\t};\n}\n/** Maps the rows of {@link buildGroupsQuery}. */\nfunction rowsToGroups(rows) {\n\tconst groups = [];\n\tfor (const row of rows) {\n\t\tconst region = pick(row, \"region\");\n\t\tconst logGroup = pick(row, \"log_group\");\n\t\tif (typeof region !== \"string\" || typeof logGroup !== \"string\") continue;\n\t\tgroups.push({\n\t\t\tregion,\n\t\t\tlogGroup,\n\t\t\tevents: toNumber(pick(row, \"events\")) ?? 0,\n\t\t\toldest: toNumber(pick(row, \"oldest\")),\n\t\t\tnewest: toNumber(pick(row, \"newest\"))\n\t\t});\n\t}\n\treturn groups;\n}\n/**\n* Row budget of one request-id backfill pass.\n*\n* The pass runs on every open, so it has to stay cheap. 20000 messages is a\n* fraction of a second of regex work, and an archive with more than that scans\n* the rest on the next open, because the watermark moves.\n*/\nvar REQUEST_ID_BACKFILL_LIMIT = 2e4;\n/** `archive_meta` key holding the request-id backfill watermark. */\nvar REQUEST_ID_BACKFILL_KEY = \"request_id_backfill\";\n/** Highest `seq` in the archive: the ceiling of a backfill pass. */\nvar ARCHIVE_MAX_SEQ_SQL = `SELECT max(seq) AS maxSeq FROM log_events`;\n/** Reads the single row of {@link ARCHIVE_MAX_SEQ_SQL}; `null` for an empty archive. */\nfunction rowToMaxSeq(row) {\n\treturn row === void 0 ? null : toNumber(pick(row, \"maxSeq\"));\n}\n/** Statement that reads the backfill watermark; no row means it never ran. */\nfunction buildRequestIdBackfillStateQuery() {\n\treturn `SELECT value FROM archive_meta WHERE key = '${REQUEST_ID_BACKFILL_KEY}'`;\n}\n/** Statement that stores the backfill watermark, which is the highest scanned `seq`. */\nfunction buildRequestIdBackfillStateWrite() {\n\treturn `INSERT OR REPLACE INTO archive_meta (key, value) VALUES ('${REQUEST_ID_BACKFILL_KEY}', ?)`;\n}\n/** Reads the watermark row; an absent row or junk means \"scan from the start\". */\nfunction rowToBackfillWatermark(row) {\n\tconst value = row === void 0 ? null : toNumber(pick(row, \"value\"));\n\treturn value === null || value < 0 ? null : value;\n}\n/**\n* Builds the scan that finds rows archived before `request_id` existed.\n*\n* `seq` is selected although the update does not need it: the caller stores\n* where the pass stopped. `afterSeq` skips the range a previous pass already\n* looked at, which is what lets a capped pass resume - a message with no request\n* id stays NULL for ever, so without the lower bound every pass would start on\n* the same id-less rows and never reach the rows above them.\n*/\nfunction buildRequestIdBackfillQuery(request) {\n\tconst limit = Math.max(1, Math.round(request.limit));\n\tconst scanned = request.afterSeq ?? 0;\n\tconst after = scanned > 0 ? \" AND seq > ?\" : \"\";\n\tconst params = [BigInt(Math.round(request.maxSeq))];\n\tif (scanned > 0) params.push(BigInt(Math.round(scanned)));\n\tparams.push(BigInt(limit));\n\treturn {\n\t\tsql: `SELECT event_key, log_group, region, message, seq FROM log_events WHERE seq <= ?${after} AND request_id IS NULL ORDER BY seq LIMIT ?`,\n\t\tparams\n\t};\n}\n/** Maps the rows of {@link buildRequestIdBackfillQuery}, dropping unusable ones. */\nfunction rowsToBackfillCandidates(rows) {\n\tconst candidates = [];\n\tfor (const row of rows) {\n\t\tconst seq = toNumber(pick(row, \"seq\"));\n\t\tconst region = pick(row, \"region\");\n\t\tconst logGroup = pick(row, \"log_group\");\n\t\tconst eventKey = pick(row, \"event_key\");\n\t\tconst message = pick(row, \"message\");\n\t\tif (seq === null || typeof region !== \"string\" || typeof logGroup !== \"string\" || typeof eventKey !== \"string\" || typeof message !== \"string\") continue;\n\t\tcandidates.push({\n\t\t\tseq,\n\t\t\tregion,\n\t\t\tlogGroup,\n\t\t\teventKey,\n\t\t\tmessage\n\t\t});\n\t}\n\treturn candidates;\n}\n/** Highest `seq` of a scanned set, or `null` when nothing was scanned. */\nfunction maxSeqOf(candidates) {\n\tlet highest = null;\n\tfor (const candidate of candidates) if (highest === null || candidate.seq > highest) highest = candidate.seq;\n\treturn highest;\n}\n/**\n* Detects the request id of every candidate.\n*\n* A message that yields no id is dropped rather than written as an empty string:\n* it is a finished row, not a failure, and the watermark moves past it so it is\n* never looked at again.\n*/\nfunction planRequestIdBackfill(candidates) {\n\tconst updates = [];\n\tfor (const candidate of candidates) {\n\t\tconst requestId = detectRequestId(candidate.message);\n\t\tif (requestId === null) continue;\n\t\tupdates.push({\n\t\t\tregion: candidate.region,\n\t\t\tlogGroup: candidate.logGroup,\n\t\t\teventKey: candidate.eventKey,\n\t\t\trequestId\n\t\t});\n\t}\n\treturn updates;\n}\n/**\n* Builds one `UPDATE ... FROM (VALUES ...)` that writes many ids at once.\n*\n* One statement per chunk instead of one per row keeps a 20000-row pass down to\n* a handful of statements, and the predicate is an exact row match on the unique\n* index (`region`, `log_group`, `event_key`).\n*/\nfunction buildRequestIdBackfillUpdate(rowCount) {\n\tif (!Number.isInteger(rowCount) || rowCount < 1) throw new RangeError(`rowCount must be a positive integer, received ${String(rowCount)}`);\n\treturn `UPDATE log_events SET request_id = v.request_id FROM (VALUES ${Array.from({ length: rowCount }, () => \"(?, ?, ?, ?)\").join(\", \")}) AS v(region, log_group, event_key, request_id) WHERE log_events.region = v.region AND log_events.log_group = v.log_group AND log_events.event_key = v.event_key`;\n}\n/** Flattens updates into the parameter list {@link buildRequestIdBackfillUpdate} expects. */\nfunction toRequestIdBackfillParams(updates) {\n\tconst params = [];\n\tfor (const update of updates) params.push(update.region, update.logGroup, update.eventKey, update.requestId);\n\treturn params;\n}\n/** Levels and their rank, highest first; `unknown` is left to the `ELSE` branch. */\nfunction rankArms() {\n\treturn Object.entries(LEVEL_RANK).filter(([level]) => level !== \"unknown\");\n}\n/**\n* SQL `CASE` that turns a level into its severity rank.\n*\n* Generated from {@link LEVEL_RANK} so the ranks have one source of truth: the\n* statement and the UI cannot disagree about which level is worse.\n*/\nfunction levelRankCase(expression) {\n\treturn `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN '${level}' THEN ${rank}`).join(\" \")} ELSE ${LEVEL_RANK.unknown} END`;\n}\n/** SQL `CASE` that turns a severity rank back into a level name. */\nfunction levelNameCase(expression) {\n\treturn `CASE ${expression} ${rankArms().map(([level, rank]) => `WHEN ${rank} THEN '${level}'`).join(\" \")} ELSE 'unknown' END`;\n}\n/** The `WHERE` clause both series forms share: one region, one window, one or more groups. */\nfunction seriesScope(request, groups) {\n\treturn {\n\t\twhere: [\n\t\t\t\"region = ?\",\n\t\t\t`log_group IN (${groups.map(() => \"?\").join(\", \")})`,\n\t\t\t\"timestamp_ms >= ?\",\n\t\t\t\"timestamp_ms <= ?\"\n\t\t],\n\t\tparams: [\n\t\t\trequest.region,\n\t\t\t...groups,\n\t\t\tBigInt(Math.round(request.startTime)),\n\t\t\tBigInt(Math.round(request.endTime))\n\t\t]\n\t};\n}\n/**\n* Builds the bucketed counts behind the chart.\n*\n* One statement returns every series. The bucket is plain integer arithmetic on\n* `timestamp_ms`, so it cannot drift with a time zone; NULL levels are reported\n* as `unknown` rather than dropped; and a level filter matches only rows that\n* carry one of the requested levels.\n*\n* `by: 'request'` selects the request form below; `by: 'event'` (the default)\n* keeps the event form unchanged.\n*/\nfunction buildSeriesQuery(request) {\n\tconst bucketMs = Math.max(1, Math.round(request.bucketMs));\n\tconst scope = seriesScope(request, request.logGroups.length > 0 ? request.logGroups : [\"\"]);\n\tif (request.by === \"request\") return buildRequestSeriesQuery(request, bucketMs, scope.where, scope.params);\n\tconst params = [\n\t\tBigInt(bucketMs),\n\t\tBigInt(bucketMs),\n\t\t...scope.params\n\t];\n\tconst where = scope.where.slice();\n\tconst levels = request.levels ?? [];\n\tif (levels.length > 0) {\n\t\twhere.push(`level IN (${levels.map(() => \"?\").join(\", \")})`);\n\t\tparams.push(...levels);\n\t}\n\treturn {\n\t\tsql: `SELECT CAST(floor(timestamp_ms / ?) * ? AS BIGINT) AS bucket, log_group, coalesce(level, 'unknown') AS level, count(*) AS events FROM log_events WHERE ${where.join(\" AND \")} GROUP BY bucket, log_group, level ORDER BY bucket, log_group, level`,\n\t\tparams\n\t};\n}\n/**\n* Builds the request form: one mark per request instead of one per line.\n*\n* `coalesce(request_id, event_key)` makes a line with no request id a request of\n* its own, so no line is dropped. A request is placed at its FIRST line\n* (`min(timestamp_ms)`) and counted once, and it takes the WORST level of its\n* lines (`max` of the ranks). A level filter selects on that same worst level in\n* the `HAVING`: asking for errors keeps every request that logged one, whatever\n* else it logged, and drops the requests that stayed below it.\n*\n* BIND ORDER: DuckDB binds `?` positionally in statement text order, and the CTE\n* comes first, so the parameters are the scope ones, then one rank per requested\n* level (the RANKS, not the level names), and the bucket width LAST - the\n* opposite of the event form above.\n*/\nfunction buildRequestSeriesQuery(request, bucketMs, where, scopeParams) {\n\tconst levels = request.levels ?? [];\n\tconst having = levels.length > 0 ? ` HAVING level_rank IN (${levels.map(() => \"?\").join(\", \")})` : \"\";\n\tconst params = [\n\t\t...scopeParams,\n\t\t...levels.map((level) => LEVEL_RANK[level]),\n\t\tBigInt(bucketMs),\n\t\tBigInt(bucketMs)\n\t];\n\treturn {\n\t\tsql: [\n\t\t\t\"WITH requests AS (\",\n\t\t\t`SELECT coalesce(request_id, event_key) AS request_key, log_group, min(timestamp_ms) AS start_ms, max(${levelRankCase(`coalesce(level, 'unknown')`)}) AS level_rank`,\n\t\t\t`FROM log_events WHERE ${where.join(\" AND \")}`,\n\t\t\t`GROUP BY request_key, log_group${having})`,\n\t\t\t`SELECT CAST(floor(start_ms / ?) * ? AS BIGINT) AS bucket, log_group, ${levelNameCase(\"level_rank\")} AS level, count(*) AS events`,\n\t\t\t\"FROM requests GROUP BY bucket, log_group, level ORDER BY bucket, log_group, level\"\n\t\t].join(\" \"),\n\t\tparams\n\t};\n}\n/** Maps the rows of {@link buildSeriesQuery} onto chart points. */\nfunction rowsToSeries(rows) {\n\tconst points = [];\n\tfor (const row of rows) {\n\t\tconst t = toNumber(pick(row, \"bucket\"));\n\t\tconst group = pick(row, \"log_group\");\n\t\tconst level = pick(row, \"level\");\n\t\tif (t === null || typeof group !== \"string\") continue;\n\t\tpoints.push({\n\t\t\tt,\n\t\t\tgroup,\n\t\t\tlevel: typeof level === \"string\" && level.length > 0 ? level : \"unknown\",\n\t\t\tevents: toNumber(pick(row, \"events\")) ?? 0\n\t\t});\n\t}\n\treturn points;\n}\n//#endregion\n//#region src/lib/server/archive.ts\n/**\n* Local DuckDB archive of the events the app has streamed.\n*\n* The driver (`@duckdb/node-api` plus its per-platform native binding) is an\n* optional dependency: it is imported lazily, on the first request that needs\n* it, and every failure is turned into an unavailable archive instead of an\n* error. The rest of the app therefore works unchanged on platforms where the\n* binding is missing.\n*\n* One process owns the file: DuckDB allows a single writer, and the SvelteKit\n* server is that writer. Statements are serialised through an internal queue so\n* a stream writing while another request reads cannot interleave on the\n* connection.\n*/\n/** Package name of the optional DuckDB driver. */\nvar DUCKDB_MODULE = \"@duckdb/node-api\";\n/** Directory name used under the platform data directory. */\nvar ARCHIVE_DIR_NAME = \"watch-tail\";\n/** File name of the archive inside {@link ARCHIVE_DIR_NAME}. */\nvar ARCHIVE_FILE_NAME = \"archive.duckdb\";\n/**\n* Imports the optional DuckDB driver.\n*\n* The specifier is held in a variable on purpose: bundlers must leave the\n* import alone so Node resolves it at run time, where a missing binding can be\n* reported as an unavailable archive rather than a build error.\n*/\nasync function loadDuckDbDriver() {\n\tconst loaded = await import(DUCKDB_MODULE);\n\tif (typeof loaded.DuckDBInstance?.create !== \"function\") throw new Error(`${DUCKDB_MODULE} did not expose DuckDBInstance.create`);\n\treturn loaded;\n}\nvar DISABLED_VALUES = /* @__PURE__ */ new Set([\n\t\"0\",\n\t\"false\",\n\t\"no\",\n\t\"off\"\n]);\n/** True when an environment value means \"off\". */\nfunction isDisabled(value) {\n\treturn value !== void 0 && DISABLED_VALUES.has(value.trim().toLowerCase());\n}\n/**\n* True when this process is a test runner.\n*\n* Vitest sets `VITEST`, and `NODE_ENV=test` covers other harnesses. Tests must\n* not append to the archive of the machine they run on, so the archive is off\n* unless a test asks for it through `WATCH_STREAM_ARCHIVE_DB` or\n* `WATCH_STREAM_ARCHIVE=on`.\n*/\nfunction isTestProcess(env) {\n\treturn env.VITEST !== void 0 || env.NODE_ENV === \"test\";\n}\n/**\n* Resolves the archive file path.\n*\n* `WATCH_STREAM_ARCHIVE_DB` wins; otherwise the file lives in the platform's\n* data directory (`XDG_DATA_HOME`, `%LOCALAPPDATA%` or\n* `~/Library/Application Support`), never in the current directory, so history\n* survives running the CLI from a different folder.\n*/\nfunction resolveArchiveConfig(env, platform = process.platform, home = homedir()) {\n\tconst path = env.WATCH_STREAM_ARCHIVE_DB?.trim() ?? \"\";\n\tconst dataDir = env.XDG_DATA_HOME?.trim() ?? (platform === \"darwin\" ? join(home, \"Library\", \"Application Support\") : platform === \"win32\" ? env.LOCALAPPDATA?.trim() ?? join(home, \"AppData\", \"Local\") : join(home, \".local\", \"share\"));\n\tconst requested = env.WATCH_STREAM_ARCHIVE?.trim() ?? \"\";\n\treturn {\n\t\tenabled: isDisabled(requested) ? false : path.length > 0 || requested.length > 0 ? true : !isTestProcess(env),\n\t\tpath: path.length > 0 ? path : join(dataDir, ARCHIVE_DIR_NAME, ARCHIVE_FILE_NAME)\n\t};\n}\n/**\n* A short, non-throwing description of an unknown failure.\n*\n* A conflicting lock is the one failure a user can act on, and DuckDB's own\n* message buries the reason in a pid and a documentation link, so it is\n* reported as what it means for this app.\n*/\nfunction describeOpenError(error, path) {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tif (/Could not set lock|Conflicting lock/i.test(message)) return `the archive file ${path} is locked by another process (another watch-tail is using it); use --db to keep a separate file`;\n\treturn message;\n}\n/** True when the failure is the exclusive file lock. */\nfunction isLockError(error) {\n\tconst message = error instanceof Error ? error.message : String(error);\n\treturn /Could not set lock|Conflicting lock/i.test(message);\n}\n/**\n* One DuckDB file holding every event the app has streamed.\n*\n* `open` never throws: a missing driver, a locked file or a corrupt database all\n* produce an instance with `available === false` and the reason on `error`. The\n* read and write methods then behave as no-ops, so callers never have to guard\n* their happy path.\n*/\nvar LogArchive = class LogArchive {\n\t/** Database file this archive uses. */\n\tpath;\n\t#connection = null;\n\t#available = false;\n\t#error = null;\n\t#queue = Promise.resolve();\n\tconstructor(path) {\n\t\tthis.path = path;\n\t}\n\t/**\n\t* Opens (and creates) the archive.\n\t*\n\t* Statements are executed in order: the sequence first, then the table, then\n\t* the indexes, so an existing file from an older build is upgraded in place.\n\t* The request-id backfill runs last, inside the same serialised path, and\n\t* cannot fail the open.\n\t*/\n\tstatic async open(options) {\n\t\tconst archive = new LogArchive(options.path);\n\t\tconst load = options.load ?? loadDuckDbDriver;\n\t\tconst ensureDir = options.ensureDir ?? ((dir) => mkdirSync(dir, { recursive: true }));\n\t\ttry {\n\t\t\tensureDir(dirname(options.path));\n\t\t\tconst driver = await load();\n\t\t\tfor (let attempt = 1;; attempt += 1) try {\n\t\t\t\tconst connection = await (await driver.DuckDBInstance.create(options.path)).connect();\n\t\t\t\tfor (const statement of ARCHIVE_SCHEMA) await connection.run(statement);\n\t\t\t\tarchive.#connection = connection;\n\t\t\t\tarchive.#available = true;\n\t\t\t\tawait archive.#backfillRequestIds();\n\t\t\t\tbreak;\n\t\t\t} catch (error) {\n\t\t\t\tif (attempt >= 3 || !isLockError(error)) throw error;\n\t\t\t\tawait setTimeout(150);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tarchive.#available = false;\n\t\t\tarchive.#error = describeOpenError(error, options.path);\n\t\t}\n\t\treturn archive;\n\t}\n\t/**\n\t* An archive that is off by configuration or could not be opened.\n\t*\n\t* Every method degrades to a no-op, so callers can use one code path for\n\t* \"no DuckDB on this machine\" and \"the user asked for no archive\".\n\t*/\n\tstatic unavailable(path, error = null) {\n\t\tconst archive = new LogArchive(path);\n\t\tarchive.#available = false;\n\t\tarchive.#error = error;\n\t\treturn archive;\n\t}\n\t/** True when the archive can be read and written. */\n\tget available() {\n\t\treturn this.#available;\n\t}\n\t/** Why the archive is unavailable, or the last failure, or `null`. */\n\tget error() {\n\t\treturn this.#error;\n\t}\n\t/** Runs one task after every task queued before it. */\n\t#enqueue(task) {\n\t\tconst next = this.#queue.then(task, task);\n\t\tthis.#queue = next.then(() => void 0, () => void 0);\n\t\treturn next;\n\t}\n\t/** Runs a statement, returning the failure instead of throwing. */\n\tasync #guard(fallback, task) {\n\t\tif (this.#connection === null) return fallback;\n\t\treturn this.#enqueue(async () => {\n\t\t\ttry {\n\t\t\t\treturn await task();\n\t\t\t} catch (error) {\n\t\t\t\tthis.#error = error instanceof Error ? error.message : String(error);\n\t\t\t\treturn fallback;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Migrates the request id of rows written before the column existed.\n\t*\n\t* It runs inside {@link LogArchive.#guard}, so it shares the serialised\n\t* statement queue with every other write and reports a failure on `error`\n\t* instead of letting it escape `open`. The watermark is the highest `seq` the\n\t* migration has looked at, so a capped or interrupted pass carries on from\n\t* there on the next open and no row is scanned twice; a row whose message\n\t* holds no id stays NULL, which is the archive's answer for that row.\n\t*/\n\tasync #backfillRequestIds() {\n\t\tawait this.#guard(void 0, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return;\n\t\t\tconst ceiling = rowToMaxSeq((await connection.runAndReadAll(ARCHIVE_MAX_SEQ_SQL)).getRowObjects()[0]);\n\t\t\tif (ceiling === null) return;\n\t\t\tconst watermark = rowToBackfillWatermark((await connection.runAndReadAll(buildRequestIdBackfillStateQuery())).getRowObjects()[0]);\n\t\t\tif (watermark !== null && watermark >= ceiling) return;\n\t\t\tconst { sql, params } = buildRequestIdBackfillQuery({\n\t\t\t\tmaxSeq: ceiling,\n\t\t\t\tafterSeq: watermark,\n\t\t\t\tlimit: REQUEST_ID_BACKFILL_LIMIT\n\t\t\t});\n\t\t\tconst candidates = rowsToBackfillCandidates((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t\tconst updates = planRequestIdBackfill(candidates);\n\t\t\tfor (let start = 0; start < updates.length; start += 500) {\n\t\t\t\tconst chunk = updates.slice(start, start + 500);\n\t\t\t\tawait connection.run(buildRequestIdBackfillUpdate(chunk.length), toRequestIdBackfillParams(chunk));\n\t\t\t}\n\t\t\tconst scanned = candidates.length < 2e4 ? ceiling : maxSeqOf(candidates);\n\t\t\tawait connection.run(buildRequestIdBackfillStateWrite(), [String(scanned ?? ceiling)]);\n\t\t});\n\t}\n\t/**\n\t* Writes one batch of streamed events.\n\t*\n\t* Batches are split into chunks of {@link ARCHIVE_INSERT_CHUNK} rows, and\n\t* `INSERT OR IGNORE` plus the unique index make a repeated scan idempotent.\n\t* Failures never propagate: a full disk must not interrupt a log stream.\n\t*/\n\tasync record(region, logGroup, events) {\n\t\tif (events.length === 0) return 0;\n\t\treturn this.#guard(0, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return 0;\n\t\t\tlet written = 0;\n\t\t\tfor (let start = 0; start < events.length; start += 500) {\n\t\t\t\tconst chunk = events.slice(start, start + 500);\n\t\t\t\tawait connection.run(buildInsertSql(chunk.length), toArchiveParams(region, logGroup, chunk));\n\t\t\t\twritten += chunk.length;\n\t\t\t}\n\t\t\treturn written;\n\t\t});\n\t}\n\t/** Reads one page of archived events. */\n\tasync page(request) {\n\t\tconst empty = {\n\t\t\tevents: [],\n\t\t\tlast: null\n\t\t};\n\t\treturn this.#guard(empty, async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return empty;\n\t\t\tconst { sql, params } = buildPageQuery(request);\n\t\t\treturn rowsToPage((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/**\n\t* Bucketed counts for the chart, per group and level.\n\t*\n\t* The request is forwarded as it arrives: it carries the grouping that says\n\t* whether a mark counts an event or a request.\n\t*/\n\tasync seriesQuery(request) {\n\t\treturn this.#guard([], async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return [];\n\t\t\tconst { sql, params } = buildSeriesQuery(request);\n\t\t\treturn rowsToSeries((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/** Aggregate row count and time bounds. */\n\tasync totals() {\n\t\treturn this.#guard(rowToTotals(void 0), async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return rowToTotals(void 0);\n\t\t\treturn rowToTotals((await connection.runAndReadAll(ARCHIVE_TOTALS_SQL)).getRowObjects()[0]);\n\t\t});\n\t}\n\t/** Log groups held by the archive, optionally limited to one region. */\n\tasync groups(region = null) {\n\t\treturn this.#guard([], async () => {\n\t\t\tconst connection = this.#connection;\n\t\t\tif (connection === null) return [];\n\t\t\tconst { sql, params } = buildGroupsQuery(region);\n\t\t\treturn rowsToGroups((await connection.runAndReadAll(sql, params)).getRowObjects());\n\t\t});\n\t}\n\t/** Status for `GET /api/archive`, including the file size on disk. */\n\tasync status() {\n\t\tconst totals = await this.totals();\n\t\tlet bytes = null;\n\t\tif (this.#available) try {\n\t\t\tbytes = statSync(this.path).size;\n\t\t} catch {\n\t\t\tbytes = null;\n\t\t}\n\t\treturn {\n\t\t\tpath: this.path,\n\t\t\tavailable: this.#available,\n\t\t\terror: this.#error,\n\t\t\tbytes,\n\t\t\ttotals\n\t\t};\n\t}\n\t/** Closes the connection. Safe to call twice. */\n\tasync close() {\n\t\tconst connection = this.#connection;\n\t\tthis.#connection = null;\n\t\tthis.#available = false;\n\t\tif (connection?.closeSync === void 0) return;\n\t\tawait this.#enqueue(async () => {\n\t\t\tconnection.closeSync?.();\n\t\t});\n\t}\n};\n/** The archive for the running server, opened once per process. */\nvar sharedArchive = null;\n/**\n* Returns the process-wide archive for `env`, opening it on first use.\n*\n* The same file is never opened twice per process; a disabled archive\n* (`WATCH_STREAM_ARCHIVE=off`) is remembered so no driver import is attempted.\n*/\nfunction getArchive(env, load) {\n\tif (sharedArchive === null) {\n\t\tconst config = resolveArchiveConfig(env);\n\t\tsharedArchive = config.enabled ? LogArchive.open({\n\t\t\tpath: config.path,\n\t\t\t...load === void 0 ? {} : { load }\n\t\t}) : Promise.resolve(LogArchive.unavailable(config.path));\n\t}\n\treturn sharedArchive;\n}\n//#endregion\nexport { getArchive as t };\n"],"names":[],"mappings":";;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,c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C;AAC1C,EAAE,aAAa,GAAG,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC;AACnD,GAAG,IAAI,EAAE,MAAM,CAAC,IAAI;AACpB,GAAG,GAAqB,EAAE;AAC1B,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AACD,CAAC,OAAO,aAAa;AACrB;;"}
|
|
@@ -163,7 +163,7 @@ var options = {
|
|
|
163
163
|
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"text-scale\" content=\"scale\" />\n <meta name=\"theme-color\" content=\"#0a0a0a\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
|
|
164
164
|
error: error_template_default
|
|
165
165
|
},
|
|
166
|
-
version_hash: "
|
|
166
|
+
version_hash: "owmmlz"
|
|
167
167
|
};
|
|
168
168
|
async function get_hooks() {
|
|
169
169
|
let handle;
|
|
@@ -185,4 +185,4 @@ async function get_hooks() {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
export { get_hooks as g, options as o, read_implementation as r, set_read_implementation as s };
|
|
188
|
-
//# sourceMappingURL=internal2.js-
|
|
188
|
+
//# sourceMappingURL=internal2.js-BPo5dcDi.js.map
|
package/build/server/chunks/chunks/{internal2.js-DDcktblR.js.map → internal2.js-BPo5dcDi.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal2.js-DDcktblR.js","sources":["../../../../.svelte-kit/output/server/chunks/internal2.js"],"sourcesContent":["import \"./index-server.js\";\nimport \"./internal.js\";\nimport { S as setContext, o as derived, u as render, vt as async_mode_flag } from \"./server.js\";\nimport { t as asClassComponent$1 } from \"./legacy-client.js\";\n//#region \\0virtual:__sveltekit/server\nvar read_implementation = null;\nfunction set_read_implementation(fn) {\n\tread_implementation = fn;\n}\nfunction set_manifest(_) {}\n//#endregion\n//#region node_modules/.pnpm/svelte@5.57.0/node_modules/svelte/src/legacy/legacy-server.js\n/** @import { SvelteComponent } from '../index.js' */\n/** @import { Csp } from '../server/public.js' */\n/** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */\n/**\n* Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.\n*\n* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n*\n* @template {Record<string, any>} Props\n* @template {Record<string, any>} Exports\n* @template {Record<string, any>} Events\n* @template {Record<string, any>} Slots\n*\n* @param {SvelteComponent<Props, Events, Slots>} component\n* @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}\n*/\nfunction asClassComponent(component) {\n\tconst component_constructor = asClassComponent$1(component);\n\t/** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */\n\tconst _render = (props, { context, csp, transformError } = {}) => {\n\t\tconst result = render(component, {\n\t\t\tprops,\n\t\t\tcontext,\n\t\t\tcsp,\n\t\t\ttransformError\n\t\t});\n\t\tconst munged = Object.defineProperties({}, {\n\t\t\tcss: { value: {\n\t\t\t\tcode: \"\",\n\t\t\t\tmap: null\n\t\t\t} },\n\t\t\thead: { get: () => result.head },\n\t\t\thtml: { get: () => result.body },\n\t\t\tthen: { \n\t\t\t/**\n\t\t\t* this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.\n\t\t\t*\n\t\t\t* @template TResult1\n\t\t\t* @template [TResult2=never]\n\t\t\t* @param { (value: LegacyRenderResult) => TResult1 } onfulfilled\n\t\t\t* @param { (reason: unknown) => TResult2 } onrejected\n\t\t\t*/\nvalue: (onfulfilled, onrejected) => {\n\t\t\t\tif (!async_mode_flag) {\n\t\t\t\t\tconst user_result = onfulfilled({\n\t\t\t\t\t\tcss: munged.css,\n\t\t\t\t\t\thead: munged.head,\n\t\t\t\t\t\thtml: munged.html\n\t\t\t\t\t});\n\t\t\t\t\treturn Promise.resolve(user_result);\n\t\t\t\t}\n\t\t\t\treturn result.then((result) => {\n\t\t\t\t\treturn onfulfilled({\n\t\t\t\t\t\tcss: munged.css,\n\t\t\t\t\t\thead: result.head,\n\t\t\t\t\t\thtml: result.body,\n\t\t\t\t\t\thashes: result.hashes\n\t\t\t\t\t});\n\t\t\t\t}, onrejected);\n\t\t\t} }\n\t\t});\n\t\treturn munged;\n\t};\n\tcomponent_constructor.render = _render;\n\treturn component_constructor;\n}\n//#endregion\n//#region .svelte-kit/generated/root.svelte\nfunction Root($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\tlet { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;\n\t\tsetContext(\"__svelte__\", stores);\n\t\tstores.page.set(page);\n\t\tconst Pyramid_1 = derived(() => constructors[1]);\n\t\tif (constructors[1]) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\tconst Pyramid_0 = constructors[0];\n\t\t\tif (Pyramid_0) {\n\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\tPyramid_0($$renderer, {\n\t\t\t\t\tdata: data_0,\n\t\t\t\t\tform,\n\t\t\t\t\tparams: page.params,\n\t\t\t\t\tchildren: ($$renderer) => {\n\t\t\t\t\t\tif (Pyramid_1()) {\n\t\t\t\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\t\t\t\tPyramid_1()($$renderer, {\n\t\t\t\t\t\t\t\tdata: data_1,\n\t\t\t\t\t\t\t\tform,\n\t\t\t\t\t\t\t\tparams: page.params\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t$$slots: { default: true }\n\t\t\t\t});\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t} else {\n\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t}\n\t\t} else {\n\t\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t\tconst Pyramid_0 = constructors[0];\n\t\t\tif (Pyramid_0) {\n\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\tPyramid_0($$renderer, {\n\t\t\t\t\tdata: data_0,\n\t\t\t\t\tform,\n\t\t\t\t\tparams: page.params\n\t\t\t\t});\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t} else {\n\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t}\n\t\t}\n\t\t$$renderer.push(`<!--]--> `);\n\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]-->`);\n\t});\n}\n//#endregion\n//#region .svelte-kit/generated/root.js\nvar root_default = asClassComponent(Root);\n//#endregion\n//#region .svelte-kit/generated/shared/error-template.js\nvar error_template_default = ({ status, message }) => \"<!doctype html>\\n<html lang=\\\"en\\\">\\n\t<head>\\n\t\t<meta charset=\\\"utf-8\\\" />\\n\t\t<title>\" + message + \"</title>\\n\\n\t\t<style>\\n\t\t\tbody {\\n\t\t\t\t--bg: white;\\n\t\t\t\t--fg: #222;\\n\t\t\t\t--divider: #ccc;\\n\t\t\t\tbackground: var(--bg);\\n\t\t\t\tcolor: var(--fg);\\n\t\t\t\tfont-family:\\n\t\t\t\t\tsystem-ui,\\n\t\t\t\t\t-apple-system,\\n\t\t\t\t\tBlinkMacSystemFont,\\n\t\t\t\t\t'Segoe UI',\\n\t\t\t\t\tRoboto,\\n\t\t\t\t\tOxygen,\\n\t\t\t\t\tUbuntu,\\n\t\t\t\t\tCantarell,\\n\t\t\t\t\t'Open Sans',\\n\t\t\t\t\t'Helvetica Neue',\\n\t\t\t\t\tsans-serif;\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t\tjustify-content: center;\\n\t\t\t\theight: 100vh;\\n\t\t\t\tmargin: 0;\\n\t\t\t}\\n\\n\t\t\t.error {\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t\tmax-width: 32rem;\\n\t\t\t\tmargin: 0 1rem;\\n\t\t\t}\\n\\n\t\t\t.status {\\n\t\t\t\tfont-weight: 200;\\n\t\t\t\tfont-size: 3rem;\\n\t\t\t\tline-height: 1;\\n\t\t\t\tposition: relative;\\n\t\t\t\ttop: -0.05rem;\\n\t\t\t}\\n\\n\t\t\t.message {\\n\t\t\t\tborder-left: 1px solid var(--divider);\\n\t\t\t\tpadding: 0 0 0 1rem;\\n\t\t\t\tmargin: 0 0 0 1rem;\\n\t\t\t\tmin-height: 2.5rem;\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t}\\n\\n\t\t\t.message h1 {\\n\t\t\t\tfont-weight: 400;\\n\t\t\t\tfont-size: 1em;\\n\t\t\t\tmargin: 0;\\n\t\t\t}\\n\\n\t\t\t@media (prefers-color-scheme: dark) {\\n\t\t\t\tbody {\\n\t\t\t\t\t--bg: #222;\\n\t\t\t\t\t--fg: #ddd;\\n\t\t\t\t\t--divider: #666;\\n\t\t\t\t}\\n\t\t\t}\\n\t\t</style>\\n\t</head>\\n\t<body>\\n\t\t<div class=\\\"error\\\">\\n\t\t\t<span class=\\\"status\\\">\" + status + \"</span>\\n\t\t\t<div class=\\\"message\\\">\\n\t\t\t\t<h1>\" + message + \"</h1>\\n\t\t\t</div>\\n\t\t</div>\\n\t</body>\\n</html>\\n\";\n//#endregion\n//#region .svelte-kit/generated/server/internal.js\nvar options = {\n\tapp_template_contains_nonce: false,\n\tasync: false,\n\tcsp: {\n\t\t\"mode\": \"auto\",\n\t\t\"directives\": {\n\t\t\t\"upgrade-insecure-requests\": false,\n\t\t\t\"block-all-mixed-content\": false\n\t\t},\n\t\t\"reportOnly\": {\n\t\t\t\"upgrade-insecure-requests\": false,\n\t\t\t\"block-all-mixed-content\": false\n\t\t}\n\t},\n\tcsrf_check_origin: true,\n\tcsrf_trusted_origins: [],\n\tembedded: false,\n\tenv_public_prefix: \"PUBLIC_\",\n\tenv_private_prefix: \"\",\n\thash_routing: false,\n\thooks: null,\n\tpreload_strategy: \"modulepreload\",\n\troot: root_default,\n\tservice_worker: false,\n\tservice_worker_options: void 0,\n\tserver_error_boundaries: false,\n\ttemplates: {\n\t\tapp: ({ head, body, assets, nonce, env }) => \"<!doctype html>\\n<html lang=\\\"en\\\">\\n\t<head>\\n\t\t<meta charset=\\\"utf-8\\\" />\\n\t\t<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\" />\\n\t\t<meta name=\\\"text-scale\\\" content=\\\"scale\\\" />\\n\t\t<meta name=\\\"theme-color\\\" content=\\\"#0a0a0a\\\" />\\n\t\t\" + head + \"\\n\t</head>\\n\t<body data-sveltekit-preload-data=\\\"hover\\\">\\n\t\t<div style=\\\"display: contents\\\">\" + body + \"</div>\\n\t</body>\\n</html>\\n\",\n\t\terror: error_template_default\n\t},\n\tversion_hash: \"bxtmu4\"\n};\nasync function get_hooks() {\n\tlet handle;\n\tlet handleFetch;\n\tlet handleError;\n\tlet handleValidationError;\n\tlet init;\n\tlet reroute;\n\tlet transport;\n\treturn {\n\t\thandle,\n\t\thandleFetch,\n\t\thandleError,\n\t\thandleValidationError,\n\t\tinit,\n\t\treroute,\n\t\ttransport\n\t};\n}\n//#endregion\nexport { set_read_implementation as a, set_manifest as i, options as n, read_implementation as r, get_hooks as t };\n"],"names":[],"mappings":";;;AAIA;AACG,IAAC,mBAAmB,GAAG;AAC1B,SAAS,uBAAuB,CAAC,EAAE,EAAE;AACrC,C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;AACT,CAAC,IAAI,OAAO;AACZ,CAAC,IAAI,SAAS;AACd,CAAC,OAAO;AACR,EAAE,MAAM;AACR,EAAE,WAAW;AACb,EAAE,WAAW;AACb,EAAE,qBAAqB;AACvB,EAAE,IAAI;AACN,EAAE,OAAO;AACT,EAAE;AACF,EAAE;AACF;;"}
|
|
1
|
+
{"version":3,"file":"internal2.js-BPo5dcDi.js","sources":["../../../../.svelte-kit/output/server/chunks/internal2.js"],"sourcesContent":["import \"./index-server.js\";\nimport \"./internal.js\";\nimport { S as setContext, o as derived, u as render, vt as async_mode_flag } from \"./server.js\";\nimport { t as asClassComponent$1 } from \"./legacy-client.js\";\n//#region \\0virtual:__sveltekit/server\nvar read_implementation = null;\nfunction set_read_implementation(fn) {\n\tread_implementation = fn;\n}\nfunction set_manifest(_) {}\n//#endregion\n//#region node_modules/.pnpm/svelte@5.57.0/node_modules/svelte/src/legacy/legacy-server.js\n/** @import { SvelteComponent } from '../index.js' */\n/** @import { Csp } from '../server/public.js' */\n/** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */\n/**\n* Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.\n*\n* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.\n*\n* @template {Record<string, any>} Props\n* @template {Record<string, any>} Exports\n* @template {Record<string, any>} Events\n* @template {Record<string, any>} Slots\n*\n* @param {SvelteComponent<Props, Events, Slots>} component\n* @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}\n*/\nfunction asClassComponent(component) {\n\tconst component_constructor = asClassComponent$1(component);\n\t/** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */\n\tconst _render = (props, { context, csp, transformError } = {}) => {\n\t\tconst result = render(component, {\n\t\t\tprops,\n\t\t\tcontext,\n\t\t\tcsp,\n\t\t\ttransformError\n\t\t});\n\t\tconst munged = Object.defineProperties({}, {\n\t\t\tcss: { value: {\n\t\t\t\tcode: \"\",\n\t\t\t\tmap: null\n\t\t\t} },\n\t\t\thead: { get: () => result.head },\n\t\t\thtml: { get: () => result.body },\n\t\t\tthen: { \n\t\t\t/**\n\t\t\t* this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.\n\t\t\t*\n\t\t\t* @template TResult1\n\t\t\t* @template [TResult2=never]\n\t\t\t* @param { (value: LegacyRenderResult) => TResult1 } onfulfilled\n\t\t\t* @param { (reason: unknown) => TResult2 } onrejected\n\t\t\t*/\nvalue: (onfulfilled, onrejected) => {\n\t\t\t\tif (!async_mode_flag) {\n\t\t\t\t\tconst user_result = onfulfilled({\n\t\t\t\t\t\tcss: munged.css,\n\t\t\t\t\t\thead: munged.head,\n\t\t\t\t\t\thtml: munged.html\n\t\t\t\t\t});\n\t\t\t\t\treturn Promise.resolve(user_result);\n\t\t\t\t}\n\t\t\t\treturn result.then((result) => {\n\t\t\t\t\treturn onfulfilled({\n\t\t\t\t\t\tcss: munged.css,\n\t\t\t\t\t\thead: result.head,\n\t\t\t\t\t\thtml: result.body,\n\t\t\t\t\t\thashes: result.hashes\n\t\t\t\t\t});\n\t\t\t\t}, onrejected);\n\t\t\t} }\n\t\t});\n\t\treturn munged;\n\t};\n\tcomponent_constructor.render = _render;\n\treturn component_constructor;\n}\n//#endregion\n//#region .svelte-kit/generated/root.svelte\nfunction Root($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\tlet { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;\n\t\tsetContext(\"__svelte__\", stores);\n\t\tstores.page.set(page);\n\t\tconst Pyramid_1 = derived(() => constructors[1]);\n\t\tif (constructors[1]) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\tconst Pyramid_0 = constructors[0];\n\t\t\tif (Pyramid_0) {\n\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\tPyramid_0($$renderer, {\n\t\t\t\t\tdata: data_0,\n\t\t\t\t\tform,\n\t\t\t\t\tparams: page.params,\n\t\t\t\t\tchildren: ($$renderer) => {\n\t\t\t\t\t\tif (Pyramid_1()) {\n\t\t\t\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\t\t\t\tPyramid_1()($$renderer, {\n\t\t\t\t\t\t\t\tdata: data_1,\n\t\t\t\t\t\t\t\tform,\n\t\t\t\t\t\t\t\tparams: page.params\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t$$slots: { default: true }\n\t\t\t\t});\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t} else {\n\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t}\n\t\t} else {\n\t\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t\tconst Pyramid_0 = constructors[0];\n\t\t\tif (Pyramid_0) {\n\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\tPyramid_0($$renderer, {\n\t\t\t\t\tdata: data_0,\n\t\t\t\t\tform,\n\t\t\t\t\tparams: page.params\n\t\t\t\t});\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t} else {\n\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t}\n\t\t}\n\t\t$$renderer.push(`<!--]--> `);\n\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]-->`);\n\t});\n}\n//#endregion\n//#region .svelte-kit/generated/root.js\nvar root_default = asClassComponent(Root);\n//#endregion\n//#region .svelte-kit/generated/shared/error-template.js\nvar error_template_default = ({ status, message }) => \"<!doctype html>\\n<html lang=\\\"en\\\">\\n\t<head>\\n\t\t<meta charset=\\\"utf-8\\\" />\\n\t\t<title>\" + message + \"</title>\\n\\n\t\t<style>\\n\t\t\tbody {\\n\t\t\t\t--bg: white;\\n\t\t\t\t--fg: #222;\\n\t\t\t\t--divider: #ccc;\\n\t\t\t\tbackground: var(--bg);\\n\t\t\t\tcolor: var(--fg);\\n\t\t\t\tfont-family:\\n\t\t\t\t\tsystem-ui,\\n\t\t\t\t\t-apple-system,\\n\t\t\t\t\tBlinkMacSystemFont,\\n\t\t\t\t\t'Segoe UI',\\n\t\t\t\t\tRoboto,\\n\t\t\t\t\tOxygen,\\n\t\t\t\t\tUbuntu,\\n\t\t\t\t\tCantarell,\\n\t\t\t\t\t'Open Sans',\\n\t\t\t\t\t'Helvetica Neue',\\n\t\t\t\t\tsans-serif;\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t\tjustify-content: center;\\n\t\t\t\theight: 100vh;\\n\t\t\t\tmargin: 0;\\n\t\t\t}\\n\\n\t\t\t.error {\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t\tmax-width: 32rem;\\n\t\t\t\tmargin: 0 1rem;\\n\t\t\t}\\n\\n\t\t\t.status {\\n\t\t\t\tfont-weight: 200;\\n\t\t\t\tfont-size: 3rem;\\n\t\t\t\tline-height: 1;\\n\t\t\t\tposition: relative;\\n\t\t\t\ttop: -0.05rem;\\n\t\t\t}\\n\\n\t\t\t.message {\\n\t\t\t\tborder-left: 1px solid var(--divider);\\n\t\t\t\tpadding: 0 0 0 1rem;\\n\t\t\t\tmargin: 0 0 0 1rem;\\n\t\t\t\tmin-height: 2.5rem;\\n\t\t\t\tdisplay: flex;\\n\t\t\t\talign-items: center;\\n\t\t\t}\\n\\n\t\t\t.message h1 {\\n\t\t\t\tfont-weight: 400;\\n\t\t\t\tfont-size: 1em;\\n\t\t\t\tmargin: 0;\\n\t\t\t}\\n\\n\t\t\t@media (prefers-color-scheme: dark) {\\n\t\t\t\tbody {\\n\t\t\t\t\t--bg: #222;\\n\t\t\t\t\t--fg: #ddd;\\n\t\t\t\t\t--divider: #666;\\n\t\t\t\t}\\n\t\t\t}\\n\t\t</style>\\n\t</head>\\n\t<body>\\n\t\t<div class=\\\"error\\\">\\n\t\t\t<span class=\\\"status\\\">\" + status + \"</span>\\n\t\t\t<div class=\\\"message\\\">\\n\t\t\t\t<h1>\" + message + \"</h1>\\n\t\t\t</div>\\n\t\t</div>\\n\t</body>\\n</html>\\n\";\n//#endregion\n//#region .svelte-kit/generated/server/internal.js\nvar options = {\n\tapp_template_contains_nonce: false,\n\tasync: false,\n\tcsp: {\n\t\t\"mode\": \"auto\",\n\t\t\"directives\": {\n\t\t\t\"upgrade-insecure-requests\": false,\n\t\t\t\"block-all-mixed-content\": false\n\t\t},\n\t\t\"reportOnly\": {\n\t\t\t\"upgrade-insecure-requests\": false,\n\t\t\t\"block-all-mixed-content\": false\n\t\t}\n\t},\n\tcsrf_check_origin: true,\n\tcsrf_trusted_origins: [],\n\tembedded: false,\n\tenv_public_prefix: \"PUBLIC_\",\n\tenv_private_prefix: \"\",\n\thash_routing: false,\n\thooks: null,\n\tpreload_strategy: \"modulepreload\",\n\troot: root_default,\n\tservice_worker: false,\n\tservice_worker_options: void 0,\n\tserver_error_boundaries: false,\n\ttemplates: {\n\t\tapp: ({ head, body, assets, nonce, env }) => \"<!doctype html>\\n<html lang=\\\"en\\\">\\n\t<head>\\n\t\t<meta charset=\\\"utf-8\\\" />\\n\t\t<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\" />\\n\t\t<meta name=\\\"text-scale\\\" content=\\\"scale\\\" />\\n\t\t<meta name=\\\"theme-color\\\" content=\\\"#0a0a0a\\\" />\\n\t\t\" + head + \"\\n\t</head>\\n\t<body data-sveltekit-preload-data=\\\"hover\\\">\\n\t\t<div style=\\\"display: contents\\\">\" + body + \"</div>\\n\t</body>\\n</html>\\n\",\n\t\terror: error_template_default\n\t},\n\tversion_hash: \"owmmlz\"\n};\nasync function get_hooks() {\n\tlet handle;\n\tlet handleFetch;\n\tlet handleError;\n\tlet handleValidationError;\n\tlet init;\n\tlet reroute;\n\tlet transport;\n\treturn {\n\t\thandle,\n\t\thandleFetch,\n\t\thandleError,\n\t\thandleValidationError,\n\t\tinit,\n\t\treroute,\n\t\ttransport\n\t};\n}\n//#endregion\nexport { set_read_implementation as a, set_manifest as i, options as n, read_implementation as r, get_hooks as t };\n"],"names":[],"mappings":";;;AAIA;AACG,IAAC,mBAAmB,GAAG;AAC1B,SAAS,uBAAuB,CAAC,EAAE,EAAE;AACrC,CAAC,mBAAmB,GAAG,EAAE;AACzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAgB,CAAC,SAAS,EAAE;AACrC,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAC5D;AACA,CAAC,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK;AACnE,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE;AACnC,GAAG,KAAK;AACR,GAAG,OAAO;AACV,GAAG,GAAG;AACN,GAAG;AACH,GAAG,CAAC;AACJ,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;AAC7C,GAAG,GAAG,EAAE,EAAE,KAAK,EAAE;AACjB,IAAI,IAAI,EAAE,EAAE;AACZ,IAAI,GAAG,EAAE;AACT,IAAI,EAAE;AACN,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC,IAAI,EAAE;AACnC,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC,IAAI,EAAE;AACnC,GAAG,IAAI,EAAE;AACT;AACA;AACA;AACA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