konoha-mcp 2.1.3 → 2.1.4
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 +3 -3
- package/apps/web/build/adapter-node.js +11 -0
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.br +2 -0
- package/apps/web/build/client/_app/immutable/chunks/BH86Md_X.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/BaNbYf_w.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.br +1 -0
- package/apps/web/build/client/_app/immutable/chunks/C3-t9btS.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{Bv85lp2r.js → CBY268r4.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.br +3 -0
- package/apps/web/build/client/_app/immutable/chunks/CBY268r4.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.br +4 -0
- package/apps/web/build/client/_app/immutable/chunks/Cg3pm-K7.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/D-Kujhko.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js +1 -0
- package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Dek69VGa.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{CP4ze5kR.js → Dzm74gVd.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Dzm74gVd.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js +2 -0
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Lb3VuXoN.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js +3 -0
- package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/PrdhfbrQ.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/{tFx9Vkzn.js → fbrtLByB.js} +1 -1
- package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/fbrtLByB.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js +2 -0
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js +2 -0
- package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CNV5BTCO.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{0.BV_U6rd9.js → 0.5uSjyTy0.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.5uSjyTy0.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{1.317ei_PM.js → 1.BZu6jsAH.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/1.BZu6jsAH.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{10.C9BHUF6_.js → 10.CZKScTFN.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.CZKScTFN.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{11._7rmywnA.js → 11.DFglFW_i.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11.DFglFW_i.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{12.B_UJh_Cw.js → 12.CSShcv5z.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.CSShcv5z.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{13.FtUj7AO8.js → 13.jWUWoBcs.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.jWUWoBcs.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{14.CsMWcbH2.js → 14.H-jSqqen.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.H-jSqqen.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{15.DbSoDlZF.js → 15.CpAoyhzV.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.CpAoyhzV.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{16.BcMZYQJR.js → 16.DT_-MxCT.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.DT_-MxCT.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js +1 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Dr646Vs5.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{3.Co5hy99T.js → 3.Cgc-xN3x.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.Cgc-xN3x.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{4.Ckjmv74-.js → 4.CYJQ4bWz.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.CYJQ4bWz.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{5.jG4rh5-7.js → 5.DbHL-3Es.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.DbHL-3Es.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{6.am-4Bf0e.js → 6.BvWH2qas.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.BvWH2qas.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{7.DpWtqqaL.js → 7.CmbiPMU3.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.CmbiPMU3.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{8.CbbKDJTU.js → 8.B9897Zm9.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.B9897Zm9.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{9.CB21-Q9D.js → 9.CVBlvZqX.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.gz +0 -0
- package/apps/web/build/client/_app/version.json +1 -1
- package/apps/web/build/client/_app/version.json.br +0 -0
- package/apps/web/build/client/_app/version.json.gz +0 -0
- package/apps/web/build/handler.js +1 -2
- package/apps/web/build/index.js +1 -74
- package/apps/web/build/server/.vite/manifest.json +419 -0
- package/apps/web/build/server/_app/immutable/assets/_layout.CsjxL1aa.css +2 -0
- package/apps/web/build/server/adapter-env.js +2 -0
- package/apps/web/build/server/adapter-index.js +74 -0
- package/apps/web/build/server/adapter-index.js.map +1 -0
- package/apps/web/build/server/{chunks/env-RhfAqpCd.js → adapter-node-env.js} +28 -7
- package/apps/web/build/server/adapter-node-env.js.map +1 -0
- package/apps/web/build/server/adapter-node-handler.js +584 -0
- package/apps/web/build/server/adapter-node-handler.js.map +1 -0
- package/apps/web/build/server/chunks/api.js +81 -0
- package/apps/web/build/server/chunks/api.js.map +1 -0
- package/apps/web/build/server/chunks/{env-DU2WieJy.js → config.js} +2 -2
- package/apps/web/build/server/chunks/config.js.map +1 -0
- package/apps/web/build/server/chunks/exports.js +625 -0
- package/apps/web/build/server/chunks/exports.js.map +1 -0
- package/apps/web/build/server/chunks/functions.js +30 -0
- package/apps/web/build/server/chunks/functions.js.map +1 -0
- package/apps/web/build/server/chunks/index-server.js +2 -0
- package/apps/web/build/server/chunks/instance.js +3600 -0
- package/apps/web/build/server/chunks/instance.js.map +1 -0
- package/apps/web/build/server/chunks/internal.js +2849 -0
- package/apps/web/build/server/chunks/internal.js.map +1 -0
- package/apps/web/build/server/chunks/scrollLock.svelte.js +7 -0
- package/apps/web/build/server/chunks/scrollLock.svelte.js.map +1 -0
- package/apps/web/build/server/chunks/server-errors.js +489 -0
- package/apps/web/build/server/chunks/server-errors.js.map +1 -0
- package/apps/web/build/server/chunks/server.js +9 -0
- package/apps/web/build/server/chunks/server.js.map +1 -0
- package/apps/web/build/server/chunks/{server2-xUKEUzWG.js → server2.js} +140 -718
- package/apps/web/build/server/chunks/server2.js.map +1 -0
- package/apps/web/build/server/chunks/shared.js +84 -0
- package/apps/web/build/server/chunks/shared.js.map +1 -0
- package/apps/web/build/server/chunks/{state-C6VH2NAw.js → state.js} +5 -4
- package/apps/web/build/server/chunks/state.js.map +1 -0
- package/apps/web/build/server/chunks/{sweetAlert.svelte-BKTpmvHp.js → sweetAlert.svelte.js} +3 -3
- package/apps/web/build/server/chunks/sweetAlert.svelte.js.map +1 -0
- package/apps/web/build/server/chunks/{uiState.svelte-NgyZk5Jz.js → uiState.svelte.js} +3 -3
- package/apps/web/build/server/chunks/uiState.svelte.js.map +1 -0
- package/apps/web/build/server/chunks/uneval.js +645 -0
- package/apps/web/build/server/chunks/uneval.js.map +1 -0
- package/apps/web/build/server/entries/fallbacks/error.svelte.js +12 -0
- package/apps/web/build/server/entries/fallbacks/error.svelte.js.map +1 -0
- package/apps/web/build/server/entries/hooks.server.js +8 -0
- package/apps/web/build/server/entries/hooks.server.js.map +1 -0
- package/apps/web/build/server/entries/pages/_layout.js +7 -0
- package/apps/web/build/server/entries/pages/_layout.js.map +1 -0
- package/apps/web/build/server/{chunks/_layout.svelte-FKDEmK4m.js → entries/pages/_layout.svelte.js} +15 -8
- package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -0
- package/apps/web/build/server/entries/pages/_page.js +9 -0
- package/apps/web/build/server/entries/pages/_page.js.map +1 -0
- package/apps/web/build/server/entries/pages/_page.svelte.js +7 -0
- package/apps/web/build/server/entries/pages/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-K0WRgefN.js → entries/pages/agents/_page.svelte.js} +8 -5
- package/apps/web/build/server/entries/pages/agents/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-BKU-UjQ2.js → entries/pages/bridges/_page.svelte.js} +9 -6
- package/apps/web/build/server/entries/pages/bridges/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-DBQMj6O8.js → entries/pages/clients/_page.svelte.js} +8 -5
- package/apps/web/build/server/entries/pages/clients/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-BQP0Z2mg.js → entries/pages/context/_page.svelte.js} +9 -6
- package/apps/web/build/server/entries/pages/context/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-D_bQaPtJ.js → entries/pages/dashboard/_page.svelte.js} +7 -4
- package/apps/web/build/server/entries/pages/dashboard/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-CxxsZeRm.js → entries/pages/detector/_page.svelte.js} +5 -3
- package/apps/web/build/server/entries/pages/detector/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-DJp9fAk8.js → entries/pages/docs/_page.svelte.js} +7 -4
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-DFBbcBLc.js → entries/pages/doctor/_page.svelte.js} +8 -5
- package/apps/web/build/server/entries/pages/doctor/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-yXv2Aj6-.js → entries/pages/persona/_page.svelte.js} +9 -6
- package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-CvH3pIDb.js → entries/pages/savings/_page.svelte.js} +7 -4
- package/apps/web/build/server/entries/pages/savings/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-FUbd8bWv.js → entries/pages/search/_page.svelte.js} +9 -6
- package/apps/web/build/server/entries/pages/search/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-Bu5RfcD4.js → entries/pages/semble/_page.svelte.js} +8 -5
- package/apps/web/build/server/entries/pages/semble/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-B4DKG2sO.js → entries/pages/skills/_page.svelte.js} +10 -7
- package/apps/web/build/server/entries/pages/skills/_page.svelte.js.map +1 -0
- package/apps/web/build/server/{chunks/_page.svelte-D1yHfBBh.js → entries/pages/tasks/_page.svelte.js} +8 -83
- package/apps/web/build/server/entries/pages/tasks/_page.svelte.js.map +1 -0
- package/apps/web/build/{env.js → server/env.js} +1 -1
- package/apps/web/build/server/handler.js +2 -0
- package/apps/web/build/server/index.js +68 -0
- package/apps/web/build/server/index.js.map +1 -0
- package/apps/web/build/server/manifest-full.js +149 -0
- package/apps/web/build/server/manifest.js +149 -0
- package/apps/web/build/server/nodes/0.js +10 -0
- package/apps/web/build/server/nodes/1.js +8 -0
- package/apps/web/build/server/nodes/10.js +8 -0
- package/apps/web/build/server/nodes/11.js +8 -0
- package/apps/web/build/server/nodes/12.js +8 -0
- package/apps/web/build/server/nodes/13.js +8 -0
- package/apps/web/build/server/nodes/14.js +8 -0
- package/apps/web/build/server/nodes/15.js +8 -0
- package/apps/web/build/server/nodes/16.js +8 -0
- package/apps/web/build/server/nodes/2.js +10 -0
- package/apps/web/build/server/nodes/3.js +8 -0
- package/apps/web/build/server/nodes/4.js +8 -0
- package/apps/web/build/server/nodes/5.js +8 -0
- package/apps/web/build/server/nodes/6.js +8 -0
- package/apps/web/build/server/nodes/7.js +8 -0
- package/apps/web/build/server/nodes/8.js +8 -0
- package/apps/web/build/server/nodes/9.js +8 -0
- package/apps/web/build/server/remote-entry.js +1565 -0
- package/apps/web/build/server/remote-entry.js.map +1 -0
- package/apps/web/build/server/server.js +151 -0
- package/apps/web/package.json +10 -9
- package/bin/cli.js +3 -3
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.4_2026-10-06.md +77 -0
- package/package.json +9 -7
- package/apps/web/build/adapter-env.js +0 -2
- package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js +0 -3
- package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Ae0obco1.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.br +0 -1
- package/apps/web/build/client/_app/immutable/chunks/BUgOhUo6.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.br +0 -3
- package/apps/web/build/client/_app/immutable/chunks/Bv85lp2r.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js +0 -2
- package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CP0LAeYI.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CP4ze5kR.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/CV8VO5Jt.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.br +0 -2
- package/apps/web/build/client/_app/immutable/chunks/DNVgNyBC.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/DVr7DrHY.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js +0 -1
- package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/HclGiUj8.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.br +0 -0
- package/apps/web/build/client/_app/immutable/chunks/tFx9Vkzn.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js +0 -2
- package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.qpZh6bSp.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js +0 -2
- package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.br +0 -2
- package/apps/web/build/client/_app/immutable/entry/start.CUhKN6Eq.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/0.BV_U6rd9.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.br +0 -1
- package/apps/web/build/client/_app/immutable/nodes/1.317ei_PM.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/10.C9BHUF6_.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/11._7rmywnA.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/12.B_UJh_Cw.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/13.FtUj7AO8.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/14.CsMWcbH2.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/15.DbSoDlZF.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/16.BcMZYQJR.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js +0 -1
- package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/2.Bs0YCKXY.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/3.Co5hy99T.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/4.Ckjmv74-.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/5.jG4rh5-7.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/6.am-4Bf0e.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/7.DpWtqqaL.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/8.CbbKDJTU.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CB21-Q9D.js.gz +0 -0
- package/apps/web/build/dir.js +0 -8
- package/apps/web/build/dir.js.map +0 -1
- package/apps/web/build/index.js.map +0 -1
- package/apps/web/build/server/chunks/0-D09zEpvl.js +0 -31
- package/apps/web/build/server/chunks/0-D09zEpvl.js.map +0 -1
- package/apps/web/build/server/chunks/1-2My56RES.js +0 -17
- package/apps/web/build/server/chunks/1-2My56RES.js.map +0 -1
- package/apps/web/build/server/chunks/10-M1HtRrZp.js +0 -17
- package/apps/web/build/server/chunks/10-M1HtRrZp.js.map +0 -1
- package/apps/web/build/server/chunks/11-BDyQuE2U.js +0 -18
- package/apps/web/build/server/chunks/11-BDyQuE2U.js.map +0 -1
- package/apps/web/build/server/chunks/12-DR3YohxS.js +0 -16
- package/apps/web/build/server/chunks/12-DR3YohxS.js.map +0 -1
- package/apps/web/build/server/chunks/13-BJri0QNV.js +0 -18
- package/apps/web/build/server/chunks/13-BJri0QNV.js.map +0 -1
- package/apps/web/build/server/chunks/14-DJhiE2DY.js +0 -17
- package/apps/web/build/server/chunks/14-DJhiE2DY.js.map +0 -1
- package/apps/web/build/server/chunks/15-CJUlxcu3.js +0 -19
- package/apps/web/build/server/chunks/15-CJUlxcu3.js.map +0 -1
- package/apps/web/build/server/chunks/16-BCncPEHV.js +0 -17
- package/apps/web/build/server/chunks/16-BCncPEHV.js.map +0 -1
- package/apps/web/build/server/chunks/2-B_JPNlak.js +0 -26
- package/apps/web/build/server/chunks/2-B_JPNlak.js.map +0 -1
- package/apps/web/build/server/chunks/3-BSOfGnYr.js +0 -17
- package/apps/web/build/server/chunks/3-BSOfGnYr.js.map +0 -1
- package/apps/web/build/server/chunks/4-DUmAi2o6.js +0 -18
- package/apps/web/build/server/chunks/4-DUmAi2o6.js.map +0 -1
- package/apps/web/build/server/chunks/5-DSM_rY93.js +0 -17
- package/apps/web/build/server/chunks/5-DSM_rY93.js.map +0 -1
- package/apps/web/build/server/chunks/6-CquXfuY3.js +0 -18
- package/apps/web/build/server/chunks/6-CquXfuY3.js.map +0 -1
- package/apps/web/build/server/chunks/7-CBNvUHPu.js +0 -16
- package/apps/web/build/server/chunks/7-CBNvUHPu.js.map +0 -1
- package/apps/web/build/server/chunks/8-BlIFjRiQ.js +0 -16
- package/apps/web/build/server/chunks/8-BlIFjRiQ.js.map +0 -1
- package/apps/web/build/server/chunks/9-sa0-Zgfq.js +0 -16
- package/apps/web/build/server/chunks/9-sa0-Zgfq.js.map +0 -1
- package/apps/web/build/server/chunks/_layout.svelte-FKDEmK4m.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-B4DKG2sO.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-BKU-UjQ2.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-BQP0Z2mg.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-Bu5RfcD4.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-CvH3pIDb.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-CxxsZeRm.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-D1yHfBBh.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-DBQMj6O8.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-DFBbcBLc.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-DJp9fAk8.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-D_bQaPtJ.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-FUbd8bWv.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-K0WRgefN.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js +0 -7
- package/apps/web/build/server/chunks/_page.svelte-LJxJVjMb.js.map +0 -1
- package/apps/web/build/server/chunks/_page.svelte-yXv2Aj6-.js.map +0 -1
- package/apps/web/build/server/chunks/env-DU2WieJy.js.map +0 -1
- package/apps/web/build/server/chunks/env-RhfAqpCd.js.map +0 -1
- package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js +0 -12
- package/apps/web/build/server/chunks/error.svelte-CNqmrJIT.js.map +0 -1
- package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js +0 -327
- package/apps/web/build/server/chunks/exports-DzZ-4-Dy.js.map +0 -1
- package/apps/web/build/server/chunks/handler-CNvIc1cp.js +0 -7301
- package/apps/web/build/server/chunks/handler-CNvIc1cp.js.map +0 -1
- package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js +0 -8
- package/apps/web/build/server/chunks/hooks.server-DqbY7q70.js.map +0 -1
- package/apps/web/build/server/chunks/index-server-ULRIL6sb.js +0 -2
- package/apps/web/build/server/chunks/rolldown-runtime-D7D4PA-g.js +0 -13
- package/apps/web/build/server/chunks/scrollLock.svelte-ULRIL6sb.js +0 -2
- package/apps/web/build/server/chunks/server2-xUKEUzWG.js.map +0 -1
- package/apps/web/build/server/chunks/state-C6VH2NAw.js.map +0 -1
- package/apps/web/build/server/chunks/sweetAlert.svelte-BKTpmvHp.js.map +0 -1
- package/apps/web/build/server/chunks/uiState.svelte-NgyZk5Jz.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-index.js","names":[],"sources":["../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/index.js"],"sourcesContent":["import http from 'node:http';\nimport fs from 'node:fs';\nimport process from 'node:process';\nimport { handler } from './handler.js';\nimport { env, timeout_env } from './env.js';\nimport { rm } from 'node:fs/promises';\nimport { format_listening_address } from './utils.js';\n\nexport const path = env('SOCKET_PATH', false);\nexport const host = env('HOST', '0.0.0.0');\nexport const port = env('PORT', !path && '3000');\n\nconst shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));\nconst idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));\nconst listen_pid = parseInt(env('LISTEN_PID', '0'));\nconst listen_fds = parseInt(env('LISTEN_FDS', '0'));\n// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html\nconst SD_LISTEN_FDS_START = 3;\n\nif (listen_pid !== 0 && listen_pid !== process.pid) {\n\tthrow new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);\n}\nif (listen_fds > 1) {\n\tthrow new Error(\n\t\t`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`\n\t);\n}\n\nconst socket_activation = listen_pid === process.pid && listen_fds === 1;\n\nlet requests = 0;\n/** @type {NodeJS.Timeout | void} */\nlet shutdown_timeout_id;\n/** @type {NodeJS.Timeout | void} */\nlet idle_timeout_id;\n\nconst httpServer = http.createServer();\n\nconst keep_alive_timeout = timeout_env('KEEP_ALIVE_TIMEOUT');\nif (keep_alive_timeout !== undefined) {\n\t// Convert the keep-alive timeout from seconds to milliseconds (the unit Node.js expects).\n\thttpServer.keepAliveTimeout = keep_alive_timeout * 1000;\n}\n\nconst headers_timeout = timeout_env('HEADERS_TIMEOUT');\nif (headers_timeout !== undefined) {\n\t// Convert the headers timeout from seconds to milliseconds (the unit Node.js expects).\n\thttpServer.headersTimeout = headers_timeout * 1000;\n}\n\nhttpServer.on('request', (req, res) => {\n\trequests++;\n\n\tif (socket_activation && idle_timeout_id) {\n\t\tidle_timeout_id = clearTimeout(idle_timeout_id);\n\t}\n\n\treq.on('close', () => {\n\t\trequests--;\n\n\t\tif (shutdown_timeout_id) {\n\t\t\t// close connections as soon as they become idle, so they don't accept new requests\n\t\t\thttpServer.closeIdleConnections();\n\t\t}\n\t\tif (requests === 0 && socket_activation && idle_timeout) {\n\t\t\tidle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);\n\t\t}\n\t});\n\n\treturn handler(req, res, () => {\n\t\tres.statusCode = 404;\n\t\tres.end();\n\t});\n});\n\nif (socket_activation) {\n\thttpServer.listen({ fd: SD_LISTEN_FDS_START }, () => {\n\t\tconsole.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);\n\t});\n} else {\n\tif (path) {\n\t\ttry {\n\t\t\tif (fs.statSync(path).size === 0) {\n\t\t\t\tawait rm(path);\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\thttpServer.listen({ path, host, port }, () => {\n\t\tconsole.log(`Listening on ${format_listening_address(path, host, port, httpServer.address())}`);\n\t});\n}\n\n/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */\nfunction graceful_shutdown(reason) {\n\tif (shutdown_timeout_id) return;\n\n\t// If a connection was opened with a keep-alive header close() will wait for the connection to\n\t// time out rather than close it even if it is not handling any requests, so call this first\n\thttpServer.closeIdleConnections();\n\n\thttpServer.close((error) => {\n\t\t// occurs if the server is already closed\n\t\tif (error) return;\n\n\t\tif (shutdown_timeout_id) {\n\t\t\tclearTimeout(shutdown_timeout_id);\n\t\t}\n\t\tif (idle_timeout_id) {\n\t\t\tclearTimeout(idle_timeout_id);\n\t\t}\n\n\t\t// @ts-expect-error custom events cannot be typed\n\t\tprocess.emit('sveltekit:shutdown', reason);\n\t});\n\n\tshutdown_timeout_id = setTimeout(() => httpServer.closeAllConnections(), shutdown_timeout * 1000);\n}\n\nprocess.on('SIGTERM', graceful_shutdown);\nprocess.on('SIGINT', graceful_shutdown);\n\nexport { httpServer as server };\n"],"ignoreList":[0],"mappings":";;;;;;;AAQA,IAAa,OAAO,IAAI,eAAe,KAAK;AAC5C,IAAa,OAAO,IAAI,QAAQ,SAAS;AACzC,IAAa,OAAO,IAAI,QAAQ,CAAC,QAAQ,MAAM;AAE/C,IAAM,mBAAmB,SAAS,IAAI,oBAAoB,IAAI,CAAC;AAC/D,IAAM,eAAe,SAAS,IAAI,gBAAgB,GAAG,CAAC;AACtD,IAAM,aAAa,SAAS,IAAI,cAAc,GAAG,CAAC;AAClD,IAAM,aAAa,SAAS,IAAI,cAAc,GAAG,CAAC;AAElD,IAAM,sBAAsB;AAE5B,IAAI,eAAe,KAAK,eAAe,QAAQ,KAC9C,MAAM,IAAI,MAAM,uBAAuB,WAAW,6BAA6B,QAAQ,KAAK;AAE7F,IAAI,aAAa,GAChB,MAAM,IAAI,MACT,+EAA+E,YAChF;AAGD,IAAM,oBAAoB,eAAe,QAAQ,OAAO,eAAe;AAEvE,IAAI,WAAW;;AAEf,IAAI;;AAEJ,IAAI;AAEJ,IAAM,aAAa,KAAK,aAAa;AAErC,IAAM,qBAAqB,YAAY,oBAAoB;AAC3D,IAAI,uBAAuB,KAAA,GAE1B,WAAW,mBAAmB,qBAAqB;AAGpD,IAAM,kBAAkB,YAAY,iBAAiB;AACrD,IAAI,oBAAoB,KAAA,GAEvB,WAAW,iBAAiB,kBAAkB;AAG/C,WAAW,GAAG,YAAY,KAAK,QAAQ;CACtC;CAEA,IAAI,qBAAqB,iBACxB,kBAAkB,aAAa,eAAe;CAG/C,IAAI,GAAG,eAAe;EACrB;EAEA,IAAI,qBAEH,WAAW,qBAAqB;EAEjC,IAAI,aAAa,KAAK,qBAAqB,cAC1C,kBAAkB,iBAAiB,kBAAkB,MAAM,GAAG,eAAe,GAAI;CAEnF,CAAC;CAED,OAAO,QAAQ,KAAK,WAAW;EAC9B,IAAI,aAAa;EACjB,IAAI,IAAI;CACT,CAAC;AACF,CAAC;AAED,IAAI,mBACH,WAAW,OAAO,EAAE,IAAI,oBAAoB,SAAS;CACpD,QAAQ,IAAI,gCAAgC,qBAAqB;AAClE,CAAC;KACK;CACN,IAAI,MACH,IAAI;EACH,IAAI,GAAG,SAAS,IAAI,CAAC,CAAC,SAAS,GAC9B,MAAM,GAAG,IAAI;CAEf,QAAQ,CAER;CAGD,WAAW,OAAO;EAAE;EAAM;EAAM;CAAK,SAAS;EAC7C,QAAQ,IAAI,gBAAgB,yBAAyB,MAAM,MAAM,MAAM,WAAW,QAAQ,CAAC,GAAG;CAC/F,CAAC;AACF;;AAGA,SAAS,kBAAkB,QAAQ;CAClC,IAAI,qBAAqB;CAIzB,WAAW,qBAAqB;CAEhC,WAAW,OAAO,UAAU;EAE3B,IAAI,OAAO;EAEX,IAAI,qBACH,aAAa,mBAAmB;EAEjC,IAAI,iBACH,aAAa,eAAe;EAI7B,QAAQ,KAAK,sBAAsB,MAAM;CAC1C,CAAC;CAED,sBAAsB,iBAAiB,WAAW,oBAAoB,GAAG,mBAAmB,GAAI;AACjG;AAEA,QAAQ,GAAG,WAAW,iBAAiB;AACvC,QAAQ,GAAG,UAAU,iBAAiB"}
|
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { env_prefix } from "../adapter-node.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/env.js
|
|
4
|
+
var expected = /* @__PURE__ */ new Set([
|
|
5
|
+
"SOCKET_PATH",
|
|
6
|
+
"HOST",
|
|
7
|
+
"PORT",
|
|
8
|
+
"XFF_DEPTH",
|
|
9
|
+
"ADDRESS_HEADER",
|
|
10
|
+
"PROTOCOL_HEADER",
|
|
11
|
+
"HOST_HEADER",
|
|
12
|
+
"PORT_HEADER",
|
|
13
|
+
"BODY_SIZE_LIMIT",
|
|
14
|
+
"SHUTDOWN_TIMEOUT",
|
|
15
|
+
"IDLE_TIMEOUT",
|
|
16
|
+
"KEEP_ALIVE_TIMEOUT",
|
|
17
|
+
"HEADERS_TIMEOUT"
|
|
18
|
+
]);
|
|
19
|
+
var expected_unprefixed = /* @__PURE__ */ new Set(["LISTEN_PID", "LISTEN_FDS"]);
|
|
20
|
+
if (env_prefix) {
|
|
21
|
+
for (const name in process.env) if (name.startsWith(env_prefix)) {
|
|
22
|
+
const unprefixed = name.slice(env_prefix.length);
|
|
23
|
+
if (!expected.has(unprefixed)) throw new Error(`You should change envPrefix (${env_prefix}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
5
26
|
/**
|
|
6
27
|
* @param {string} name
|
|
7
28
|
* @param {any} [fallback]
|
|
8
29
|
*/
|
|
9
30
|
function env(name, fallback) {
|
|
10
|
-
const prefixed = (expected_unprefixed.has(name) ? "" :
|
|
31
|
+
const prefixed = (expected_unprefixed.has(name) ? "" : env_prefix) + name;
|
|
11
32
|
return prefixed in process.env ? process.env[prefixed] : fallback;
|
|
12
33
|
}
|
|
13
|
-
|
|
34
|
+
var integer_regexp = /^\d+$/;
|
|
14
35
|
/**
|
|
15
36
|
* Throw a consistently-structured parsing error for environment variables.
|
|
16
37
|
* @param {string} name
|
|
@@ -37,6 +58,6 @@ function timeout_env(name, fallback) {
|
|
|
37
58
|
return parsed;
|
|
38
59
|
}
|
|
39
60
|
//#endregion
|
|
40
|
-
export {
|
|
61
|
+
export { timeout_env as n, env as t };
|
|
41
62
|
|
|
42
|
-
//# sourceMappingURL=env
|
|
63
|
+
//# sourceMappingURL=adapter-node-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-node-env.js","names":[],"sources":["../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/env.js"],"sourcesContent":["import process from 'node:process';\nimport { env_prefix } from '#@sveltejs/adapter-node';\n\nconst expected = new Set([\n\t'SOCKET_PATH',\n\t'HOST',\n\t'PORT',\n\t'XFF_DEPTH',\n\t'ADDRESS_HEADER',\n\t'PROTOCOL_HEADER',\n\t'HOST_HEADER',\n\t'PORT_HEADER',\n\t'BODY_SIZE_LIMIT',\n\t'SHUTDOWN_TIMEOUT',\n\t'IDLE_TIMEOUT',\n\t'KEEP_ALIVE_TIMEOUT',\n\t'HEADERS_TIMEOUT'\n]);\n\nconst expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);\n\nif (env_prefix) {\n\tfor (const name in process.env) {\n\t\tif (name.startsWith(env_prefix)) {\n\t\t\tconst unprefixed = name.slice(env_prefix.length);\n\t\t\tif (!expected.has(unprefixed)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`You should change envPrefix (${env_prefix}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @param {string} name\n * @param {any} [fallback]\n */\nexport function env(name, fallback) {\n\tconst prefix = expected_unprefixed.has(name) ? '' : env_prefix;\n\tconst prefixed = prefix + name;\n\treturn prefixed in process.env ? process.env[prefixed] : fallback;\n}\n\nconst integer_regexp = /^\\d+$/;\n\n/**\n * Throw a consistently-structured parsing error for environment variables.\n * @param {string} name\n * @param {any} value\n * @param {string} description\n * @returns {never}\n */\nfunction parsing_error(name, value, description) {\n\tthrow new Error(\n\t\t`Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`\n\t);\n}\n\n/**\n * Check the environment for a timeout value (non-negative integer) in seconds.\n * @param {string} name\n * @param {number} [fallback]\n * @returns {number | undefined}\n */\nexport function timeout_env(name, fallback) {\n\tconst raw = env(name, fallback);\n\tif (!raw) {\n\t\treturn fallback;\n\t}\n\n\tif (!integer_regexp.test(raw)) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\tconst parsed = Number.parseInt(raw, 10);\n\n\t// We don't technically need to check `Number.isNaN` because the value already passed the regexp test.\n\t// However, just in case there's some new codepath introduced somewhere down the line, it's probably good\n\t// to stick this in here.\n\tif (Number.isNaN(parsed)) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\tif (parsed < 0) {\n\t\tparsing_error(name, raw, 'should be a non-negative integer');\n\t}\n\n\treturn parsed;\n}\n"],"ignoreList":[0],"mappings":";;;AAGA,IAAM,2BAAW,IAAI,IAAI;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAED,IAAM,sCAAsB,IAAI,IAAI,CAAC,cAAc,YAAY,CAAC;AAEhE,IAAI,YACE;MAAA,MAAM,QAAQ,QAAQ,KAC1B,IAAI,KAAK,WAAW,UAAU,GAAG;EAChC,MAAM,aAAa,KAAK,MAAM,WAAW,MAAM;EAC/C,IAAI,CAAC,SAAS,IAAI,UAAU,GAC3B,MAAM,IAAI,MACT,gCAAgC,WAAW,8EAA8E,MAC1H;CAEF;;;;;;AAQF,SAAgB,IAAI,MAAM,UAAU;CAEnC,MAAM,YADS,oBAAoB,IAAI,IAAI,IAAI,KAAK,cAC1B;CAC1B,OAAO,YAAY,QAAQ,MAAM,QAAQ,IAAI,YAAY;AAC1D;AAEA,IAAM,iBAAiB;;;;;;;;AASvB,SAAS,cAAc,MAAM,OAAO,aAAa;CAChD,MAAM,IAAI,MACT,0CAA0C,KAAK,IAAI,KAAK,UAAU,KAAK,EAAE,IAAI,YAAY,EAC1F;AACD;;;;;;;AAQA,SAAgB,YAAY,MAAM,UAAU;CAC3C,MAAM,MAAM,IAAI,MAAM,QAAQ;CAC9B,IAAI,CAAC,KACJ,OAAO;CAGR,IAAI,CAAC,eAAe,KAAK,GAAG,GAC3B,cAAc,MAAM,KAAK,kCAAkC;CAG5D,MAAM,SAAS,OAAO,SAAS,KAAK,EAAE;CAKtC,IAAI,OAAO,MAAM,MAAM,GACtB,cAAc,MAAM,KAAK,kCAAkC;CAG5D,IAAI,SAAS,GACZ,cAAc,MAAM,KAAK,kCAAkC;CAG5D,OAAO;AACR"}
|
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { a as SvelteKitError } from "./chunks/shared.js";
|
|
2
|
+
import { n as noop } from "./chunks/functions.js";
|
|
3
|
+
import { t as env } from "./adapter-node-env.js";
|
|
4
|
+
import fs, { createReadStream } from "node:fs";
|
|
5
|
+
import process from "node:process";
|
|
6
|
+
import { Readable, pipeline } from "node:stream";
|
|
7
|
+
import { app_path, assets, base, dir, env_prefix, mime_types, origin, prerendered_assets, server } from "../adapter-node.js";
|
|
8
|
+
import { format } from "node:url";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/exports/node/index.js
|
|
11
|
+
/** @type {WeakMap<import('http').IncomingMessage, (chunk: Buffer) => void>} */
|
|
12
|
+
var body_data_listeners = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
/**
|
|
14
|
+
* @param {import('http').IncomingMessage} req
|
|
15
|
+
* @param {number} [body_size_limit]
|
|
16
|
+
*/
|
|
17
|
+
function get_raw_body(req, body_size_limit) {
|
|
18
|
+
const h = req.headers;
|
|
19
|
+
const content_length = Number(h["content-length"]);
|
|
20
|
+
const has_content_length = Number.isFinite(content_length);
|
|
21
|
+
if (req.httpVersionMajor === 1 && !has_content_length && h["transfer-encoding"] == null || content_length === 0) return null;
|
|
22
|
+
if (req.destroyed) {
|
|
23
|
+
const readable = new ReadableStream();
|
|
24
|
+
readable.cancel();
|
|
25
|
+
return readable;
|
|
26
|
+
}
|
|
27
|
+
let size = 0;
|
|
28
|
+
let cancelled = false;
|
|
29
|
+
return new ReadableStream({
|
|
30
|
+
start(controller) {
|
|
31
|
+
if (body_size_limit !== void 0 && has_content_length && content_length > body_size_limit) {
|
|
32
|
+
const error = new SvelteKitError(413, "Payload Too Large", `Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`);
|
|
33
|
+
controller.error(error);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
/** @param {Error} error */
|
|
37
|
+
const on_error = (error) => {
|
|
38
|
+
cancelled = true;
|
|
39
|
+
controller.error(error);
|
|
40
|
+
};
|
|
41
|
+
const on_end = () => {
|
|
42
|
+
if (cancelled) return;
|
|
43
|
+
controller.close();
|
|
44
|
+
};
|
|
45
|
+
/** @param {Buffer} chunk */
|
|
46
|
+
const on_data = (chunk) => {
|
|
47
|
+
if (cancelled) return;
|
|
48
|
+
size += chunk.length;
|
|
49
|
+
if (body_size_limit !== void 0 && size > body_size_limit) {
|
|
50
|
+
cancelled = true;
|
|
51
|
+
const message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`;
|
|
52
|
+
const error = new SvelteKitError(413, "Payload Too Large", message);
|
|
53
|
+
controller.error(error);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (has_content_length && size > content_length) {
|
|
57
|
+
cancelled = true;
|
|
58
|
+
const message = `request body size exceeded content-length of ${content_length}`;
|
|
59
|
+
const error = new SvelteKitError(413, "Payload Too Large", message);
|
|
60
|
+
controller.error(error);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
controller.enqueue(chunk);
|
|
64
|
+
if (controller.desiredSize === null || controller.desiredSize <= 0) req.pause();
|
|
65
|
+
};
|
|
66
|
+
req.on("error", on_error);
|
|
67
|
+
req.on("end", on_end);
|
|
68
|
+
req.on("data", on_data);
|
|
69
|
+
body_data_listeners.set(req, on_data);
|
|
70
|
+
},
|
|
71
|
+
pull() {
|
|
72
|
+
req.resume();
|
|
73
|
+
},
|
|
74
|
+
cancel(reason) {
|
|
75
|
+
cancelled = true;
|
|
76
|
+
req.destroy(reason);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @param {{
|
|
82
|
+
* request: import('http').IncomingMessage;
|
|
83
|
+
* response?: import('http').ServerResponse;
|
|
84
|
+
* base: string;
|
|
85
|
+
* bodySizeLimit?: number;
|
|
86
|
+
* }} options
|
|
87
|
+
* @returns {Request}
|
|
88
|
+
*/
|
|
89
|
+
function getRequest({ request, response, base, bodySizeLimit }) {
|
|
90
|
+
let headers = request.headers;
|
|
91
|
+
if (request.httpVersionMajor >= 2) {
|
|
92
|
+
headers = Object.assign({}, headers);
|
|
93
|
+
if (headers[":authority"]) headers.host = headers[":authority"];
|
|
94
|
+
delete headers[":authority"];
|
|
95
|
+
delete headers[":method"];
|
|
96
|
+
delete headers[":path"];
|
|
97
|
+
delete headers[":scheme"];
|
|
98
|
+
}
|
|
99
|
+
const controller = new AbortController();
|
|
100
|
+
request.once("close", () => {
|
|
101
|
+
if (request.readableAborted) controller.abort();
|
|
102
|
+
});
|
|
103
|
+
response?.once("close", () => {
|
|
104
|
+
if (!response.writableEnded) controller.abort();
|
|
105
|
+
});
|
|
106
|
+
return new Request(base + request.url, {
|
|
107
|
+
duplex: "half",
|
|
108
|
+
method: request.method,
|
|
109
|
+
headers: Object.entries(headers),
|
|
110
|
+
signal: controller.signal,
|
|
111
|
+
body: request.method === "GET" || request.method === "HEAD" ? void 0 : get_raw_body(request, bodySizeLimit)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Drains any unconsumed request body once the response has been sent. When a
|
|
116
|
+
* route doesn't read the request body (for example a page route receiving a
|
|
117
|
+
* POST), the unread bytes remain buffered in the socket. On keep-alive
|
|
118
|
+
* connections Node's HTTP parser then reads those leftover bytes as the next
|
|
119
|
+
* request, fails to parse them, and resets the connection — losing any
|
|
120
|
+
* pipelined request. Resuming the request discards the bytes so the connection
|
|
121
|
+
* stays usable.
|
|
122
|
+
*
|
|
123
|
+
* Because `get_raw_body` attaches a `data` listener, Node marks the request as
|
|
124
|
+
* being consumed (`req._consuming`) and skips its own automatic drain, so we
|
|
125
|
+
* have to do it ourselves. The whole remaining body is read and discarded; this
|
|
126
|
+
* is the intended trade-off (keeping the connection reusable) over destroying it.
|
|
127
|
+
* @see https://github.com/sveltejs/kit/issues/14916
|
|
128
|
+
* @see https://github.com/sveltejs/kit/issues/15526
|
|
129
|
+
* @param {import('http').ServerResponse} res
|
|
130
|
+
*/
|
|
131
|
+
function drain_request(res) {
|
|
132
|
+
const req = res.req;
|
|
133
|
+
if (!req || req.readableEnded || req.destroyed) return;
|
|
134
|
+
const on_data = body_data_listeners.get(req);
|
|
135
|
+
if (on_data) {
|
|
136
|
+
req.removeListener("data", on_data);
|
|
137
|
+
body_data_listeners.delete(req);
|
|
138
|
+
}
|
|
139
|
+
req.resume();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @param {import('http').ServerResponse} res
|
|
143
|
+
* @param {Response} response
|
|
144
|
+
* @returns {void}
|
|
145
|
+
*/
|
|
146
|
+
function setResponse(res, response) {
|
|
147
|
+
res.once("finish", () => drain_request(res));
|
|
148
|
+
res.once("close", () => drain_request(res));
|
|
149
|
+
for (const [key, value] of response.headers) try {
|
|
150
|
+
res.setHeader(key, key === "set-cookie" ? response.headers.getSetCookie() : value);
|
|
151
|
+
} catch (error) {
|
|
152
|
+
res.getHeaderNames().forEach((name) => res.removeHeader(name));
|
|
153
|
+
res.writeHead(500).end(String(error));
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (!response.body) {
|
|
157
|
+
res.writeHead(response.status);
|
|
158
|
+
res.end();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (response.body.locked) {
|
|
162
|
+
res.writeHead(response.status);
|
|
163
|
+
res.end("Fatal error: Response body is locked. This can happen when the response was already read (for example through 'response.json()' or 'response.text()').");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const reader = response.body.getReader();
|
|
167
|
+
if (res.destroyed) {
|
|
168
|
+
reader.cancel();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const cancel = (error) => {
|
|
172
|
+
res.off("close", cancel);
|
|
173
|
+
res.off("error", cancel);
|
|
174
|
+
reader.cancel(error).catch(noop);
|
|
175
|
+
if (error) res.destroy(error);
|
|
176
|
+
};
|
|
177
|
+
res.on("close", cancel);
|
|
178
|
+
res.on("error", cancel);
|
|
179
|
+
/** @type {Uint8Array<ArrayBuffer>[]} */
|
|
180
|
+
const buffered = [];
|
|
181
|
+
/** @type {ReturnType<typeof reader.read> | null} */
|
|
182
|
+
let pending = null;
|
|
183
|
+
probe();
|
|
184
|
+
async function probe() {
|
|
185
|
+
try {
|
|
186
|
+
/** @type {Promise<undefined>} */
|
|
187
|
+
const deadline = new Promise((fulfil) => setImmediate(() => fulfil(void 0)));
|
|
188
|
+
while (buffered.length < 2) {
|
|
189
|
+
pending = reader.read();
|
|
190
|
+
const result = await Promise.race([pending, deadline]);
|
|
191
|
+
if (!result) break;
|
|
192
|
+
pending = null;
|
|
193
|
+
if (result.done) {
|
|
194
|
+
if (!res.hasHeader("content-length") && !res.hasHeader("transfer-encoding")) res.setHeader("content-length", buffered.reduce((total, chunk) => total + chunk.byteLength, 0));
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
buffered.push(result.value);
|
|
198
|
+
}
|
|
199
|
+
if (res.destroyed) return;
|
|
200
|
+
res.writeHead(response.status);
|
|
201
|
+
await next();
|
|
202
|
+
} catch (error) {
|
|
203
|
+
if (!res.headersSent) res.writeHead(response.status);
|
|
204
|
+
cancel(error instanceof Error ? error : new Error(String(error)));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async function next() {
|
|
208
|
+
try {
|
|
209
|
+
for (;;) {
|
|
210
|
+
/** @type {Awaited<ReturnType<typeof reader.read>>} */
|
|
211
|
+
let result;
|
|
212
|
+
if (buffered.length > 0) result = {
|
|
213
|
+
done: false,
|
|
214
|
+
value: buffered.shift()
|
|
215
|
+
};
|
|
216
|
+
else if (pending) {
|
|
217
|
+
result = await pending;
|
|
218
|
+
pending = null;
|
|
219
|
+
} else result = await reader.read();
|
|
220
|
+
const { done, value } = result;
|
|
221
|
+
if (done) break;
|
|
222
|
+
if (!res.write(value)) {
|
|
223
|
+
res.once("drain", next);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
res.end();
|
|
228
|
+
} catch (error) {
|
|
229
|
+
cancel(error instanceof Error ? error : new Error(String(error)));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Converts a file on disk to a readable stream
|
|
235
|
+
* @param {string} file
|
|
236
|
+
* @returns {ReadableStream}
|
|
237
|
+
* @since 2.4.0
|
|
238
|
+
*/
|
|
239
|
+
function createReadableStream(file) {
|
|
240
|
+
return Readable.toWeb(createReadStream(file));
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/utils.js
|
|
244
|
+
/**
|
|
245
|
+
* Parses the given value into number of bytes.
|
|
246
|
+
*
|
|
247
|
+
* @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G).
|
|
248
|
+
* @returns {number}
|
|
249
|
+
*/
|
|
250
|
+
function parse_as_bytes(value) {
|
|
251
|
+
const multiplier = {
|
|
252
|
+
K: 1024,
|
|
253
|
+
M: 1048576,
|
|
254
|
+
G: 1073741824
|
|
255
|
+
}[value[value.length - 1]?.toUpperCase()] ?? 1;
|
|
256
|
+
return Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Formats the address the server is listening on.
|
|
260
|
+
*
|
|
261
|
+
* @param {string | false} path
|
|
262
|
+
* @param {string} host
|
|
263
|
+
* @param {string | false} port
|
|
264
|
+
* @param {import('node:net').AddressInfo | string | null} address
|
|
265
|
+
* @returns {string}
|
|
266
|
+
*/
|
|
267
|
+
function format_listening_address(path, host, port, address) {
|
|
268
|
+
if (path) return path;
|
|
269
|
+
if (address && typeof address === "object") return format({
|
|
270
|
+
protocol: "http:",
|
|
271
|
+
hostname: address.address,
|
|
272
|
+
port: address.port
|
|
273
|
+
});
|
|
274
|
+
return format({
|
|
275
|
+
protocol: "http:",
|
|
276
|
+
hostname: host,
|
|
277
|
+
port: String(port)
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/static.js
|
|
282
|
+
/** @import { IncomingMessage, ServerResponse } from 'node:http' */
|
|
283
|
+
/**
|
|
284
|
+
* @typedef {(req: IncomingMessage, res: ServerResponse, next: () => void | Promise<void>) => void | Promise<void>} Middleware
|
|
285
|
+
* @typedef {AssetEntry & { type?: string, cache_control?: string }} Asset
|
|
286
|
+
* @typedef {Asset | { location: string }} Entry
|
|
287
|
+
*/
|
|
288
|
+
/**
|
|
289
|
+
* Splits `req.url` into a decoded pathname and the search string.
|
|
290
|
+
* Decoding follows kit's router: reserved characters such as `%2F` stay
|
|
291
|
+
* encoded. An undecodable pathname is returned as-is, so it misses the
|
|
292
|
+
* asset table and falls through to SvelteKit's 400
|
|
293
|
+
* @param {import('node:http').IncomingMessage} req
|
|
294
|
+
*/
|
|
295
|
+
function split_url(req) {
|
|
296
|
+
let pathname = req.url;
|
|
297
|
+
let search = "";
|
|
298
|
+
const query_index = pathname.indexOf("?");
|
|
299
|
+
if (query_index !== -1) {
|
|
300
|
+
search = pathname.slice(query_index);
|
|
301
|
+
pathname = pathname.slice(0, query_index);
|
|
302
|
+
}
|
|
303
|
+
if (pathname.includes("%")) try {
|
|
304
|
+
pathname = pathname.split("%25").map(decodeURI).join("%25");
|
|
305
|
+
} catch {}
|
|
306
|
+
return {
|
|
307
|
+
pathname,
|
|
308
|
+
search
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Relative reference from `from` to `to`, which must differ only by a trailing slash.
|
|
313
|
+
* Keep in sync with the copy in `packages/kit/src/utils/url.js`
|
|
314
|
+
* @param {string} from
|
|
315
|
+
* @param {string} to
|
|
316
|
+
* @returns {string}
|
|
317
|
+
*/
|
|
318
|
+
function relative_pathname(from, to) {
|
|
319
|
+
const segment = to.replace(/\/$/, "").split("/").at(-1);
|
|
320
|
+
return from.endsWith("/") ? `../${segment}` : `./${segment}/`;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Parses `Accept-Encoding` and picks the preferred variant that exists
|
|
324
|
+
* @param {string | undefined} header
|
|
325
|
+
* @param {Asset} asset
|
|
326
|
+
* @returns {'br' | 'gz' | undefined}
|
|
327
|
+
*/
|
|
328
|
+
function negotiate(header, asset) {
|
|
329
|
+
if (!header || !(asset.br || asset.gz)) return;
|
|
330
|
+
/** @type {Map<string, number>} */
|
|
331
|
+
const weights = /* @__PURE__ */ new Map();
|
|
332
|
+
for (const part of header.toLowerCase().split(",")) {
|
|
333
|
+
const [coding, ...params] = part.split(";");
|
|
334
|
+
let weight = 1;
|
|
335
|
+
for (const param of params) {
|
|
336
|
+
const [name, value] = param.split("=");
|
|
337
|
+
if (name.trim() === "q") weight = parseFloat(value) || 0;
|
|
338
|
+
}
|
|
339
|
+
weights.set(coding.trim(), weight);
|
|
340
|
+
}
|
|
341
|
+
/** @param {string} coding */
|
|
342
|
+
const weight = (coding) => weights.get(coding) ?? weights.get("*") ?? 0;
|
|
343
|
+
const br = asset.br ? weight("br") : 0;
|
|
344
|
+
if ((asset.gz ? weight("gzip") : 0) > br) return "gz";
|
|
345
|
+
if (br > 0) return "br";
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Whether an `If-None-Match` value matches `etag`, using weak comparison
|
|
349
|
+
* @param {string | undefined} header
|
|
350
|
+
* @param {string} etag
|
|
351
|
+
*/
|
|
352
|
+
function etag_matches(header, etag) {
|
|
353
|
+
if (!header) return false;
|
|
354
|
+
if (header.trim() === "*") return true;
|
|
355
|
+
return header.split(",").some((tag) => tag.trim().replace(/^W\//, "") === etag);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Absolute file paths and content types for one table
|
|
359
|
+
* @param {string} dir
|
|
360
|
+
* @param {AssetTable} table
|
|
361
|
+
* @param {Record<string, string>} mime_types
|
|
362
|
+
* @returns {Map<string, Asset>}
|
|
363
|
+
*/
|
|
364
|
+
function resolve(dir, table, mime_types) {
|
|
365
|
+
/** @type {Map<string, Asset>} */
|
|
366
|
+
const files = /* @__PURE__ */ new Map();
|
|
367
|
+
for (const [key, entry] of table.entries) {
|
|
368
|
+
let type = mime_types[entry.file.slice(entry.file.lastIndexOf("."))];
|
|
369
|
+
if (type === "text/html") type += ";charset=utf-8";
|
|
370
|
+
files.set(key, {
|
|
371
|
+
...entry,
|
|
372
|
+
file: path.join(dir, entry.file),
|
|
373
|
+
type
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
for (const [alias, key] of table.aliases) files.set(alias, files.get(key));
|
|
377
|
+
return files;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* One lookup for every request, decided at boot: client assets (immutable below
|
|
381
|
+
* `app_path`), prerendered pages, and a 308 from the non-canonical trailing-slash
|
|
382
|
+
* form of a prerendered path to the canonical one. Client assets win a collision
|
|
383
|
+
* @param {{
|
|
384
|
+
* dir: string,
|
|
385
|
+
* base: string,
|
|
386
|
+
* app_path: string,
|
|
387
|
+
* mime_types: Record<string, string>,
|
|
388
|
+
* assets: AssetTable,
|
|
389
|
+
* prerendered_assets: AssetTable
|
|
390
|
+
* }} opts
|
|
391
|
+
* @returns {Map<string, Entry>}
|
|
392
|
+
*/
|
|
393
|
+
function create_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets }) {
|
|
394
|
+
/** @type {Map<string, Entry>} */
|
|
395
|
+
const files = resolve(`${dir}/client${base}`, assets, mime_types);
|
|
396
|
+
const immutable = `/${app_path}/immutable/`;
|
|
397
|
+
for (const [key, asset] of files) if (key.startsWith(immutable))
|
|
398
|
+
/** @type {Asset} */ asset.cache_control = "public,max-age=31536000,immutable";
|
|
399
|
+
const prerendered = resolve(`${dir}/prerendered${base}`, prerendered_assets, mime_types);
|
|
400
|
+
for (const [key, asset] of prerendered) if (!files.has(key)) files.set(key, asset);
|
|
401
|
+
for (const key of prerendered.keys()) {
|
|
402
|
+
const inverted = key.at(-1) === "/" ? key.slice(0, -1) : key + "/";
|
|
403
|
+
if (inverted && !files.has(inverted)) files.set(inverted, { location: relative_pathname(inverted, key) });
|
|
404
|
+
}
|
|
405
|
+
return files;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Serves the closed set of files recorded at adapt time. Everything about a
|
|
409
|
+
* response is decided before the first request, so a request is one map
|
|
410
|
+
* lookup, header negotiation and a stream
|
|
411
|
+
* @param {Map<string, Entry>} files
|
|
412
|
+
* @returns {Middleware}
|
|
413
|
+
*/
|
|
414
|
+
function serve_static(files) {
|
|
415
|
+
return (req, res, next) => {
|
|
416
|
+
const { pathname, search } = split_url(req);
|
|
417
|
+
const asset = files.get(pathname);
|
|
418
|
+
if (!asset) return next();
|
|
419
|
+
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
420
|
+
res.writeHead(405, { allow: "GET, HEAD" }).end();
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
if ("location" in asset) {
|
|
424
|
+
res.writeHead(308, { location: asset.location + search }).end();
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
let file = asset.file;
|
|
428
|
+
let size = asset.size;
|
|
429
|
+
let etag = `"${asset.etag}"`;
|
|
430
|
+
const variant = negotiate(req.headers["accept-encoding"], asset);
|
|
431
|
+
if (variant) {
|
|
432
|
+
size = asset[variant];
|
|
433
|
+
file += `.${variant}`;
|
|
434
|
+
etag = `"${asset.etag}.${variant}"`;
|
|
435
|
+
}
|
|
436
|
+
/** @type {Record<string, string | number>} */
|
|
437
|
+
const headers = { etag };
|
|
438
|
+
if (asset.br || asset.gz) headers.vary = "Accept-Encoding";
|
|
439
|
+
if (asset.cache_control) headers["cache-control"] = asset.cache_control;
|
|
440
|
+
if (etag_matches(req.headers["if-none-match"], etag)) {
|
|
441
|
+
res.writeHead(304, headers).end();
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
headers["content-length"] = size;
|
|
445
|
+
headers["accept-ranges"] = "bytes";
|
|
446
|
+
if (asset.type) headers["content-type"] = asset.type;
|
|
447
|
+
if (variant) headers["content-encoding"] = variant === "gz" ? "gzip" : "br";
|
|
448
|
+
/** @type {{ start?: number, end?: number }} */
|
|
449
|
+
const range = {};
|
|
450
|
+
let status = 200;
|
|
451
|
+
const if_range = req.headers["if-range"];
|
|
452
|
+
if (req.headers.range && (!if_range || if_range === etag)) {
|
|
453
|
+
const match = /^bytes=(\d*)-(\d*)$/.exec(req.headers.range);
|
|
454
|
+
if (match && (match[1] || match[2])) {
|
|
455
|
+
let start = match[1] ? parseInt(match[1], 10) : NaN;
|
|
456
|
+
let end = match[2] ? parseInt(match[2], 10) : size - 1;
|
|
457
|
+
if (isNaN(start)) {
|
|
458
|
+
start = Math.max(size - end, 0);
|
|
459
|
+
end = size - 1;
|
|
460
|
+
} else end = Math.min(end, size - 1);
|
|
461
|
+
if (start >= size || start > end) {
|
|
462
|
+
res.writeHead(416, { "content-range": `bytes */${size}` }).end();
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
status = 206;
|
|
466
|
+
headers["content-range"] = `bytes ${start}-${end}/${size}`;
|
|
467
|
+
headers["content-length"] = end - start + 1;
|
|
468
|
+
range.start = start;
|
|
469
|
+
range.end = end;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
res.writeHead(status, headers);
|
|
473
|
+
if (req.method === "HEAD") {
|
|
474
|
+
res.end();
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
pipeline(fs.createReadStream(file, range), res, () => {});
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
//#endregion
|
|
481
|
+
//#region ../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.0_@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_sve_e839fe67ee9ed548cafd3a2d2016388d/node_modules/@sveltejs/adapter-node/src/handler.js
|
|
482
|
+
/** @import { IncomingHttpHeaders } from 'node:http' */
|
|
483
|
+
/** @import { Middleware } from './static.js' */
|
|
484
|
+
var xff_depth = parseInt(env("XFF_DEPTH", "1"));
|
|
485
|
+
var address_header = env("ADDRESS_HEADER", "").toLowerCase();
|
|
486
|
+
var protocol_header = env("PROTOCOL_HEADER", "").toLowerCase();
|
|
487
|
+
var host_header = env("HOST_HEADER", "").toLowerCase();
|
|
488
|
+
var port_header = env("PORT_HEADER", "").toLowerCase();
|
|
489
|
+
var body_size_limit = parse_as_bytes(env("BODY_SIZE_LIMIT", "512K"));
|
|
490
|
+
if (isNaN(body_size_limit)) throw new Error(`Invalid BODY_SIZE_LIMIT: '${env("BODY_SIZE_LIMIT")}'. Please provide a numeric value.`);
|
|
491
|
+
var asset_dir = `${dir}/client${base}`;
|
|
492
|
+
await server.init({
|
|
493
|
+
env: process.env,
|
|
494
|
+
read: (file) => createReadableStream(`${asset_dir}/${file}`)
|
|
495
|
+
});
|
|
496
|
+
/** @type {Middleware} */
|
|
497
|
+
var ssr = async (req, res) => {
|
|
498
|
+
/** @type {Request} */
|
|
499
|
+
let request;
|
|
500
|
+
let request_origin = origin;
|
|
501
|
+
if (!request_origin) try {
|
|
502
|
+
request_origin = get_origin(req.headers);
|
|
503
|
+
} catch (error) {
|
|
504
|
+
console.error(`Could not determine request origin: ${error instanceof Error ? error.message : String(error)}`);
|
|
505
|
+
res.statusCode = 400;
|
|
506
|
+
res.end("Bad Request");
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
try {
|
|
510
|
+
request = getRequest({
|
|
511
|
+
base: request_origin,
|
|
512
|
+
request: req,
|
|
513
|
+
response: res,
|
|
514
|
+
bodySizeLimit: body_size_limit
|
|
515
|
+
});
|
|
516
|
+
} catch {
|
|
517
|
+
res.statusCode = 400;
|
|
518
|
+
res.end("Bad Request");
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const response = await server.respond(request, {
|
|
522
|
+
platform: { req },
|
|
523
|
+
getClientAddress: () => {
|
|
524
|
+
if (address_header) {
|
|
525
|
+
if (!(address_header in req.headers)) throw new Error(`Address header was specified with ${env_prefix + "ADDRESS_HEADER"}=${address_header} but is absent from request`);
|
|
526
|
+
const value = req.headers[address_header] || "";
|
|
527
|
+
if (address_header === "x-forwarded-for") {
|
|
528
|
+
const addresses = value.split(",");
|
|
529
|
+
if (xff_depth < 1) throw new Error(`${env_prefix + "XFF_DEPTH"} must be a positive integer`);
|
|
530
|
+
if (xff_depth > addresses.length) throw new Error(`${env_prefix + "XFF_DEPTH"} is ${xff_depth}, but only found ${addresses.length} addresses`);
|
|
531
|
+
return addresses[addresses.length - xff_depth].trim();
|
|
532
|
+
}
|
|
533
|
+
return value;
|
|
534
|
+
}
|
|
535
|
+
return req.connection?.remoteAddress || req.connection?.socket?.remoteAddress || req.socket?.remoteAddress || req.info?.remoteAddress;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
if (response.headers.get("content-type") === "text/event-stream") response.headers.set("x-accel-buffering", "no");
|
|
539
|
+
setResponse(res, response);
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* @param {string} name
|
|
543
|
+
* @param {string | string[] | undefined} value
|
|
544
|
+
* @returns {string | undefined}
|
|
545
|
+
*/
|
|
546
|
+
function normalise_header(name, value) {
|
|
547
|
+
if (!name) return void 0;
|
|
548
|
+
if (Array.isArray(value)) {
|
|
549
|
+
if (value.length === 0) return void 0;
|
|
550
|
+
if (value.length === 1) return value[0];
|
|
551
|
+
throw new Error(`Multiple values provided for ${name} header where only one expected: ${value}`);
|
|
552
|
+
}
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* @param {IncomingHttpHeaders} headers
|
|
557
|
+
* @returns {string}
|
|
558
|
+
*/
|
|
559
|
+
function get_origin(headers) {
|
|
560
|
+
const protocol = decodeURIComponent(normalise_header(protocol_header, headers[protocol_header]) || "https");
|
|
561
|
+
if (protocol.includes(":")) throw new Error(`The ${protocol_header} header specified ${protocol} which is an invalid because it includes \`:\`. It should only contain the protocol scheme (e.g. \`https\`)`);
|
|
562
|
+
const host = normalise_header(host_header, headers[host_header]) || normalise_header("host", headers["host"]);
|
|
563
|
+
if (!host) {
|
|
564
|
+
const header_names = host_header ? `${host_header} or host headers` : "host header";
|
|
565
|
+
throw new Error(`Could not determine host. The request must have a value provided by the ${header_names}`);
|
|
566
|
+
}
|
|
567
|
+
const port = normalise_header(port_header, headers[port_header]);
|
|
568
|
+
if (port && isNaN(+port)) throw new Error(`The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)`);
|
|
569
|
+
return port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;
|
|
570
|
+
}
|
|
571
|
+
var serve = serve_static(create_file_map({
|
|
572
|
+
dir,
|
|
573
|
+
base,
|
|
574
|
+
app_path,
|
|
575
|
+
mime_types,
|
|
576
|
+
assets,
|
|
577
|
+
prerendered_assets
|
|
578
|
+
}));
|
|
579
|
+
/** @type {Middleware} */
|
|
580
|
+
var handler = (req, res, next) => serve(req, res, () => ssr(req, res, next));
|
|
581
|
+
//#endregion
|
|
582
|
+
export { format_listening_address as n, handler as t };
|
|
583
|
+
|
|
584
|
+
//# sourceMappingURL=adapter-node-handler.js.map
|