theokit 0.48.13 → 0.50.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 +1 -0
- package/dist/{actions-virtual-module-YQXRSSMW.js → actions-virtual-module-5WBVSDOM.js} +22 -12
- package/dist/actions-virtual-module-5WBVSDOM.js.map +1 -0
- package/dist/{actions-virtual-module-LB4NGONI.js → actions-virtual-module-ZYLMNW6K.js} +13 -8
- package/dist/{actions-virtual-module-LB4NGONI.js.map → actions-virtual-module-ZYLMNW6K.js.map} +1 -1
- package/dist/adapters/agent-mount.d.ts +127 -0
- package/dist/adapters/agent-mount.js +24 -0
- package/dist/adapters/security-headers.d.ts +132 -0
- package/dist/adapters/security-headers.js +64 -0
- package/dist/adapters/security-headers.js.map +1 -0
- package/dist/adapters/web-shim.d.ts +100 -13
- package/dist/adapters/web-shim.js +158 -54
- package/dist/adapters/web-shim.js.map +1 -1
- package/dist/agent-GKUEL6OH.js +15 -0
- package/dist/agent-scan-BZa-pagG.d.ts +16 -0
- package/dist/{app-typed-client-GHO3EWZK.js → app-typed-client-4LAIEGFX.js} +23 -13
- package/dist/app-typed-client-4LAIEGFX.js.map +1 -0
- package/dist/{app-typed-client-G3J5G7E5.js → app-typed-client-DQM3Y6YY.js} +14 -9
- package/dist/app-typed-client-DQM3Y6YY.js.map +1 -0
- package/dist/aws-lambda-VKMYUMP2.js +261 -0
- package/dist/aws-lambda-VKMYUMP2.js.map +1 -0
- package/dist/{build-WU6AKKIB.js → build-FLX6VF7Q.js} +71 -26
- package/dist/build-FLX6VF7Q.js.map +1 -0
- package/dist/{bun-33RD6K7O.js → bun-L7PP6ID5.js} +105 -13
- package/dist/bun-L7PP6ID5.js.map +1 -0
- package/dist/{check-45NKUVSQ.js → check-GIPZBFTX.js} +2 -2
- package/dist/{chunk-KD5G3YXI.js → chunk-2AMLGJJA.js} +35 -9
- package/dist/chunk-2AMLGJJA.js.map +1 -0
- package/dist/chunk-3PBAN2YE.js +146 -0
- package/dist/chunk-3PBAN2YE.js.map +1 -0
- package/dist/{chunk-HBU2GIMZ.js → chunk-3QPVEJ7D.js} +15 -9
- package/dist/chunk-3QPVEJ7D.js.map +1 -0
- package/dist/{chunk-47CINLWF.js → chunk-44J2ANQC.js} +2 -2
- package/dist/{chunk-IEES3CHD.js → chunk-47MM2JUK.js} +8 -2
- package/dist/chunk-47MM2JUK.js.map +1 -0
- package/dist/chunk-4X6H2BXP.js +108 -0
- package/dist/chunk-4X6H2BXP.js.map +1 -0
- package/dist/{chunk-A7JBF5FO.js → chunk-5K4TDLRG.js} +8 -5
- package/dist/chunk-5K4TDLRG.js.map +1 -0
- package/dist/chunk-5YPXXSYY.js +181 -0
- package/dist/chunk-5YPXXSYY.js.map +1 -0
- package/dist/{chunk-YGAXV5HR.js → chunk-6J4JWHDJ.js} +191 -112
- package/dist/chunk-6J4JWHDJ.js.map +1 -0
- package/dist/chunk-72DMJBXI.js +424 -0
- package/dist/chunk-72DMJBXI.js.map +1 -0
- package/dist/chunk-7PM6K5EV.js +513 -0
- package/dist/chunk-7PM6K5EV.js.map +1 -0
- package/dist/{chunk-MTEWLGVY.js → chunk-BPYMC7SU.js} +4 -48
- package/dist/chunk-BPYMC7SU.js.map +1 -0
- package/dist/chunk-BU6RJPPJ.js +421 -0
- package/dist/chunk-BU6RJPPJ.js.map +1 -0
- package/dist/{chunk-FB2HBNIC.js → chunk-BX6EUYHU.js} +6 -2
- package/dist/chunk-BX6EUYHU.js.map +1 -0
- package/dist/{chunk-BIVCP6X5.js → chunk-C62IZEJI.js} +465 -202
- package/dist/chunk-C62IZEJI.js.map +1 -0
- package/dist/chunk-D4VP2QPR.js +16 -0
- package/dist/chunk-D4VP2QPR.js.map +1 -0
- package/dist/{chunk-J5MXCGKA.js → chunk-DHAD2O3S.js} +6 -6
- package/dist/chunk-DHAD2O3S.js.map +1 -0
- package/dist/chunk-E43VJ3E5.js +188 -0
- package/dist/chunk-E43VJ3E5.js.map +1 -0
- package/dist/chunk-EVZKNA2W.js +110 -0
- package/dist/chunk-EVZKNA2W.js.map +1 -0
- package/dist/chunk-FD4ZDTQ6.js +181 -0
- package/dist/chunk-FD4ZDTQ6.js.map +1 -0
- package/dist/chunk-FDOOBTXJ.js +17 -0
- package/dist/chunk-FDOOBTXJ.js.map +1 -0
- package/dist/chunk-FH3SQR6P.js +275 -0
- package/dist/chunk-FH3SQR6P.js.map +1 -0
- package/dist/chunk-HJHGTFEJ.js +23 -0
- package/dist/chunk-HJHGTFEJ.js.map +1 -0
- package/dist/{chunk-LXAESF4Y.js → chunk-HK4AZBKX.js} +7 -4
- package/dist/chunk-HK4AZBKX.js.map +1 -0
- package/dist/{chunk-T5C46IIU.js → chunk-HWBRS4DZ.js} +28 -269
- package/dist/chunk-HWBRS4DZ.js.map +1 -0
- package/dist/chunk-IRQGAC4L.js +52 -0
- package/dist/chunk-IRQGAC4L.js.map +1 -0
- package/dist/{chunk-FNTLKHZ7.js → chunk-JDN5SAAD.js} +7 -4
- package/dist/chunk-JDN5SAAD.js.map +1 -0
- package/dist/{chunk-GXEX4CBH.js → chunk-JIKNR5LX.js} +673 -484
- package/dist/chunk-JIKNR5LX.js.map +1 -0
- package/dist/{chunk-GRI4XHBJ.js → chunk-JWRCZIA4.js} +266 -108
- package/dist/chunk-JWRCZIA4.js.map +1 -0
- package/dist/{chunk-E576KYYT.js → chunk-KI4DOTN4.js} +25 -2
- package/dist/chunk-KI4DOTN4.js.map +1 -0
- package/dist/{chunk-ZB7D62OA.js → chunk-KUZVRJ7M.js} +3 -3
- package/dist/chunk-L4VFNFDL.js +248 -0
- package/dist/chunk-L4VFNFDL.js.map +1 -0
- package/dist/chunk-M2WC5MF7.js +127 -0
- package/dist/chunk-M2WC5MF7.js.map +1 -0
- package/dist/{chunk-O3JIAU3V.js → chunk-MCTC6HSE.js} +157 -103
- package/dist/chunk-MCTC6HSE.js.map +1 -0
- package/dist/{chunk-PXFXSFJL.js → chunk-NZ5JU6D3.js} +9 -9
- package/dist/{chunk-YRBR424R.js → chunk-OAUI273L.js} +338 -165
- package/dist/chunk-OAUI273L.js.map +1 -0
- package/dist/chunk-OGLS76RN.js +43 -0
- package/dist/chunk-OGLS76RN.js.map +1 -0
- package/dist/{chunk-7LVM22VG.js → chunk-OQCRCXCP.js} +6 -6
- package/dist/chunk-OQCRCXCP.js.map +1 -0
- package/dist/{chunk-OLGPYOLO.js → chunk-P6OS7652.js} +5 -2
- package/dist/chunk-P6OS7652.js.map +1 -0
- package/dist/chunk-Q5L5EGWZ.js +26 -0
- package/dist/chunk-Q5L5EGWZ.js.map +1 -0
- package/dist/{chunk-S433N3CT.js → chunk-QTHVHNJJ.js} +6 -36
- package/dist/chunk-QTHVHNJJ.js.map +1 -0
- package/dist/chunk-RPET332G.js +84 -0
- package/dist/chunk-RPET332G.js.map +1 -0
- package/dist/{chunk-646CA6RV.js → chunk-RQW5YMH7.js} +12 -4
- package/dist/chunk-RQW5YMH7.js.map +1 -0
- package/dist/{chunk-XALU5LCU.js → chunk-RWNYIU6A.js} +550 -146
- package/dist/chunk-RWNYIU6A.js.map +1 -0
- package/dist/chunk-SL7YUHPV.js +111 -0
- package/dist/chunk-SL7YUHPV.js.map +1 -0
- package/dist/chunk-U5PWXS3J.js +39 -0
- package/dist/chunk-U5PWXS3J.js.map +1 -0
- package/dist/chunk-ULDCFL2O.js +273 -0
- package/dist/chunk-ULDCFL2O.js.map +1 -0
- package/dist/{chunk-RWNSW4FM.js → chunk-UMNXCU3K.js} +12 -6
- package/dist/{chunk-RWNSW4FM.js.map → chunk-UMNXCU3K.js.map} +1 -1
- package/dist/chunk-VI7ZANB3.js +193 -0
- package/dist/chunk-VI7ZANB3.js.map +1 -0
- package/dist/chunk-VQPHPQ5L.js +14 -0
- package/dist/chunk-VQPHPQ5L.js.map +1 -0
- package/dist/chunk-WNJTJRM6.js +147 -0
- package/dist/chunk-WNJTJRM6.js.map +1 -0
- package/dist/chunk-WOBSEO75.js +790 -0
- package/dist/chunk-WOBSEO75.js.map +1 -0
- package/dist/{chunk-BMHS4WAN.js → chunk-XS7EX55U.js} +156 -42
- package/dist/chunk-XS7EX55U.js.map +1 -0
- package/dist/chunk-YN4W7LCX.js +31 -0
- package/dist/chunk-YN4W7LCX.js.map +1 -0
- package/dist/chunk-YSJOZEI6.js +1 -0
- package/dist/{chunk-JA2ZAT5Q.js → chunk-Z4PJMZLM.js} +2 -2
- package/dist/chunk-Z4PJMZLM.js.map +1 -0
- package/dist/{chunk-7VPQHEAJ.js → chunk-ZNZISJDZ.js} +6 -2
- package/dist/chunk-ZNZISJDZ.js.map +1 -0
- package/dist/chunk-ZWN3AODA.js +11 -0
- package/dist/chunk-ZWN3AODA.js.map +1 -0
- package/dist/cli/index.js +25 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/client/core.d.ts +1 -1
- package/dist/client/core.js +2 -0
- package/dist/client/core.js.map +1 -1
- package/dist/client/index.d.ts +44 -10
- package/dist/client/index.js +35 -0
- package/dist/client/index.js.map +1 -1
- package/dist/cloudflare-SIG42OIW.js +335 -0
- package/dist/cloudflare-SIG42OIW.js.map +1 -0
- package/dist/config-support-WQHQIJTA.js +104 -0
- package/dist/config-support-WQHQIJTA.js.map +1 -0
- package/dist/{csrf-BBrEZSBW.d.ts → csrf-Dgot9qSM.d.ts} +1 -1
- package/dist/deno-deploy-LQAYOOPW.js +196 -0
- package/dist/deno-deploy-LQAYOOPW.js.map +1 -0
- package/dist/{dev-MUWJAZRD.js → dev-ANDSEVLB.js} +28 -18
- package/dist/dev-ANDSEVLB.js.map +1 -0
- package/dist/{dev-emit-GWD6IXV7.js → dev-emit-BFNMDCPB.js} +5 -5
- package/dist/{dev-emit-NBT6JD7R.js → dev-emit-MVAJAFGX.js} +5 -3
- package/dist/dev-emit-MVAJAFGX.js.map +1 -0
- package/dist/engine-singleton-X4R7AZBJ.js +315 -0
- package/dist/engine-singleton-X4R7AZBJ.js.map +1 -0
- package/dist/{generate-Y3GWM57K.js → generate-EN6EDITF.js} +43 -4
- package/dist/generate-EN6EDITF.js.map +1 -0
- package/dist/index-CzxtQcnp.d.ts +1058 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/dist/{info-XW7HGUPH.js → info-Y55RWS42.js} +8 -6
- package/dist/{info-XW7HGUPH.js.map → info-Y55RWS42.js.map} +1 -1
- package/dist/{internal-api-V5L65YSJ.js → internal-api-IP35YU3G.js} +22 -12
- package/dist/{internal-api-WEOSTMSN.js → internal-api-OPU456AT.js} +30 -16
- package/dist/internal-api-OPU456AT.js.map +1 -0
- package/dist/load-config-4ATXQUN3.js +16 -0
- package/dist/match-DmGgxjIU.d.ts +44 -0
- package/dist/{mcp-ULUFJNSZ.js → mcp-5LLNAGKA.js} +7 -7
- package/dist/netlify-C2IRCZKI.js +245 -0
- package/dist/netlify-C2IRCZKI.js.map +1 -0
- package/dist/node-OSVPYQ3D.js +10 -0
- package/dist/nonce-BXt7Qu_C.d.ts +31 -0
- package/dist/observability-bootstrap-MZMSOE66.js +15 -0
- package/dist/{openapi-HZXR335W.js → openapi-VFPEZSRI.js} +13 -11
- package/dist/{openapi-HZXR335W.js.map → openapi-VFPEZSRI.js.map} +1 -1
- package/dist/{plugin-runner-BFEcgtmJ.d.ts → plugin-runner-BVMOSxvb.d.ts} +1 -1
- package/dist/{plugin-types-D69-lJZ9.d.ts → plugin-types-BUVfUQ0V.d.ts} +13 -1
- package/dist/preview-GHPT2EQ5.js +23 -0
- package/dist/preview-GHPT2EQ5.js.map +1 -0
- package/dist/provider-resolver-Dx6QuWrw.d.ts +128 -0
- package/dist/registry-KBZDCFVQ.js +23 -0
- package/dist/route-config-Cm_ZMA1C.d.ts +72 -0
- package/dist/route-policy-BxOycCDq.d.ts +65 -0
- package/dist/router/element-scroll-restoration.d.ts +28 -0
- package/dist/router/element-scroll-restoration.js +96 -0
- package/dist/router/element-scroll-restoration.js.map +1 -0
- package/dist/{routes-OLNQX7CT.js → routes-BPLU3ISV.js} +11 -9
- package/dist/{routes-OLNQX7CT.js.map → routes-BPLU3ISV.js.map} +1 -1
- package/dist/{scan-7MJC6PYU.js → scan-YJEE4KQK.js} +2 -2
- package/dist/{schema-ZO3OSWVG.js → schema-SOAD43RQ.js} +7 -5
- package/dist/schemas-4AXHQMV3.js +25 -0
- package/dist/schemas-4AXHQMV3.js.map +1 -0
- package/dist/security-headers-Ccj7ncNx.d.ts +129 -0
- package/dist/server/agent/index.d.ts +2 -90
- package/dist/server/agent/index.js +1 -1
- package/dist/server/auth/index.d.ts +2 -21
- package/dist/server/auth/index.js +3 -2
- package/dist/server/cron/index.js +4 -3
- package/dist/server/define/index.d.ts +51 -57
- package/dist/server/define/index.js +10 -1
- package/dist/server/http/index.d.ts +7 -5
- package/dist/server/http/index.js +56 -12
- package/dist/server/index.d.ts +47 -439
- package/dist/server/index.js +119 -201
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs/index.js +4 -3
- package/dist/server/observability/index.d.ts +109 -35
- package/dist/server/observability/index.js +10 -7
- package/dist/server/plugins/index.d.ts +3 -3
- package/dist/server/scan/index.d.ts +47 -12
- package/dist/server/scan/index.js +13 -4
- package/dist/server/security/index.d.ts +61 -103
- package/dist/server/security/index.js +15 -6
- package/dist/server/webhook/index.d.ts +90 -3
- package/dist/server/webhook/index.js +12 -2
- package/dist/server-boundary-6B4ZQUY7.js +148 -0
- package/dist/server-boundary-6B4ZQUY7.js.map +1 -0
- package/dist/server-boundary-7VZQRPPX.js +133 -0
- package/dist/server-boundary-7VZQRPPX.js.map +1 -0
- package/dist/{services-typed-client-PSAGRPFF.js → services-typed-client-XGT5SUUN.js} +2 -2
- package/dist/{start-KR2JJR7K.js → start-UZDMOT7I.js} +342 -111
- package/dist/start-UZDMOT7I.js.map +1 -0
- package/dist/{static-M2W4HUWS.js → static-SVDWIOXJ.js} +24 -13
- package/dist/static-SVDWIOXJ.js.map +1 -0
- package/dist/{theo-cloud-XAHWOUFK.js → theo-cloud-3ET4G5T6.js} +9 -2
- package/dist/theo-cloud-3ET4G5T6.js.map +1 -0
- package/dist/vercel-BMCQKCWE.js +277 -0
- package/dist/vercel-BMCQKCWE.js.map +1 -0
- package/dist/vite-plugin/index.js +24 -13
- package/dist/vite-plugin-VKCT2LF2.js +42 -0
- package/dist/vite-plugin-VKCT2LF2.js.map +1 -0
- package/package.json +19 -6
- package/dist/actions-virtual-module-YQXRSSMW.js.map +0 -1
- package/dist/agent-7JJW3TPB.js +0 -15
- package/dist/app-typed-client-G3J5G7E5.js.map +0 -1
- package/dist/app-typed-client-GHO3EWZK.js.map +0 -1
- package/dist/aws-lambda-CYNDGU5O.js +0 -172
- package/dist/aws-lambda-CYNDGU5O.js.map +0 -1
- package/dist/build-WU6AKKIB.js.map +0 -1
- package/dist/bun-33RD6K7O.js.map +0 -1
- package/dist/chunk-646CA6RV.js.map +0 -1
- package/dist/chunk-6E5WKMDS.js +0 -67
- package/dist/chunk-6E5WKMDS.js.map +0 -1
- package/dist/chunk-6GGWS7J3.js +0 -91
- package/dist/chunk-6GGWS7J3.js.map +0 -1
- package/dist/chunk-7LVM22VG.js.map +0 -1
- package/dist/chunk-7VPQHEAJ.js.map +0 -1
- package/dist/chunk-A7JBF5FO.js.map +0 -1
- package/dist/chunk-AM3QABW5.js +0 -161
- package/dist/chunk-AM3QABW5.js.map +0 -1
- package/dist/chunk-BIVCP6X5.js.map +0 -1
- package/dist/chunk-BMHS4WAN.js.map +0 -1
- package/dist/chunk-E576KYYT.js.map +0 -1
- package/dist/chunk-FB2HBNIC.js.map +0 -1
- package/dist/chunk-FNTLKHZ7.js.map +0 -1
- package/dist/chunk-GRI4XHBJ.js.map +0 -1
- package/dist/chunk-GVW5EKEU.js +0 -422
- package/dist/chunk-GVW5EKEU.js.map +0 -1
- package/dist/chunk-GXEX4CBH.js.map +0 -1
- package/dist/chunk-HBU2GIMZ.js.map +0 -1
- package/dist/chunk-IEES3CHD.js.map +0 -1
- package/dist/chunk-J5MXCGKA.js.map +0 -1
- package/dist/chunk-JA2ZAT5Q.js.map +0 -1
- package/dist/chunk-KD5G3YXI.js.map +0 -1
- package/dist/chunk-LNVMHQ2Z.js +0 -54
- package/dist/chunk-LNVMHQ2Z.js.map +0 -1
- package/dist/chunk-LXAESF4Y.js.map +0 -1
- package/dist/chunk-MTEWLGVY.js.map +0 -1
- package/dist/chunk-O3JIAU3V.js.map +0 -1
- package/dist/chunk-OJLL4YD6.js +0 -403
- package/dist/chunk-OJLL4YD6.js.map +0 -1
- package/dist/chunk-OLGPYOLO.js.map +0 -1
- package/dist/chunk-S433N3CT.js.map +0 -1
- package/dist/chunk-T5C46IIU.js.map +0 -1
- package/dist/chunk-U267AOWS.js +0 -28
- package/dist/chunk-U267AOWS.js.map +0 -1
- package/dist/chunk-UW2TEAGR.js +0 -77
- package/dist/chunk-UW2TEAGR.js.map +0 -1
- package/dist/chunk-WPJOTQA5.js +0 -1
- package/dist/chunk-XALU5LCU.js.map +0 -1
- package/dist/chunk-XR74JD4M.js +0 -457
- package/dist/chunk-XR74JD4M.js.map +0 -1
- package/dist/chunk-YGAXV5HR.js.map +0 -1
- package/dist/chunk-YRBR424R.js.map +0 -1
- package/dist/cloudflare-KYUWCEPL.js +0 -122
- package/dist/cloudflare-KYUWCEPL.js.map +0 -1
- package/dist/deno-deploy-CCTB7HGS.js +0 -107
- package/dist/deno-deploy-CCTB7HGS.js.map +0 -1
- package/dist/dev-MUWJAZRD.js.map +0 -1
- package/dist/dev-emit-NBT6JD7R.js.map +0 -1
- package/dist/generate-Y3GWM57K.js.map +0 -1
- package/dist/index-BEtEv6ZH.d.ts +0 -575
- package/dist/load-config-VKD6LKWU.js +0 -14
- package/dist/match-CfbEFRG4.d.ts +0 -26
- package/dist/netlify-AFMDNKT4.js +0 -150
- package/dist/netlify-AFMDNKT4.js.map +0 -1
- package/dist/node-ZJQEJSP3.js +0 -10
- package/dist/registry-GKR3EWRW.js +0 -23
- package/dist/start-KR2JJR7K.js.map +0 -1
- package/dist/static-M2W4HUWS.js.map +0 -1
- package/dist/theo-cloud-XAHWOUFK.js.map +0 -1
- package/dist/vercel-SRS2DH6O.js +0 -133
- package/dist/vercel-SRS2DH6O.js.map +0 -1
- package/dist/vite-plugin-VPJFD4HK.js +0 -36
- /package/dist/{chunk-WPJOTQA5.js.map → adapters/agent-mount.js.map} +0 -0
- /package/dist/{agent-7JJW3TPB.js.map → agent-GKUEL6OH.js.map} +0 -0
- /package/dist/{check-45NKUVSQ.js.map → check-GIPZBFTX.js.map} +0 -0
- /package/dist/{chunk-47CINLWF.js.map → chunk-44J2ANQC.js.map} +0 -0
- /package/dist/{chunk-ZB7D62OA.js.map → chunk-KUZVRJ7M.js.map} +0 -0
- /package/dist/{chunk-PXFXSFJL.js.map → chunk-NZ5JU6D3.js.map} +0 -0
- /package/dist/{internal-api-WEOSTMSN.js.map → chunk-YSJOZEI6.js.map} +0 -0
- /package/dist/{dev-emit-GWD6IXV7.js.map → dev-emit-BFNMDCPB.js.map} +0 -0
- /package/dist/{internal-api-V5L65YSJ.js.map → internal-api-IP35YU3G.js.map} +0 -0
- /package/dist/{load-config-VKD6LKWU.js.map → load-config-4ATXQUN3.js.map} +0 -0
- /package/dist/{mcp-ULUFJNSZ.js.map → mcp-5LLNAGKA.js.map} +0 -0
- /package/dist/{node-ZJQEJSP3.js.map → node-OSVPYQ3D.js.map} +0 -0
- /package/dist/{scan-7MJC6PYU.js.map → observability-bootstrap-MZMSOE66.js.map} +0 -0
- /package/dist/{registry-GKR3EWRW.js.map → registry-KBZDCFVQ.js.map} +0 -0
- /package/dist/{schema-ZO3OSWVG.js.map → scan-YJEE4KQK.js.map} +0 -0
- /package/dist/{vite-plugin-VPJFD4HK.js.map → schema-SOAD43RQ.js.map} +0 -0
- /package/dist/{services-typed-client-PSAGRPFF.js.map → services-typed-client-XGT5SUUN.js.map} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import "../chunk-XTHN6JBX.js";
|
|
2
|
+
|
|
3
|
+
// src/router/element-scroll-restoration.tsx
|
|
4
|
+
import { useLayoutEffect, useRef } from "react";
|
|
5
|
+
import { useLocation } from "react-router";
|
|
6
|
+
|
|
7
|
+
// src/router/scroll-restoration.ts
|
|
8
|
+
var SCROLL_CONTAINER_ATTRIBUTE = "data-theo-scroll";
|
|
9
|
+
function storageKey(locationKey) {
|
|
10
|
+
return `theokit:scroll:${locationKey}`;
|
|
11
|
+
}
|
|
12
|
+
function createScrollRestorer(store) {
|
|
13
|
+
return {
|
|
14
|
+
save(locationKey, targets) {
|
|
15
|
+
const offsets = {};
|
|
16
|
+
for (const target of targets) offsets[target.id] = target.scrollTop;
|
|
17
|
+
try {
|
|
18
|
+
store.set(storageKey(locationKey), JSON.stringify(offsets));
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
restore(locationKey, targets) {
|
|
23
|
+
const offsets = readOffsets(store, locationKey);
|
|
24
|
+
if (offsets === void 0) return;
|
|
25
|
+
for (const target of targets) {
|
|
26
|
+
const offset = offsets[target.id];
|
|
27
|
+
if (typeof offset === "number") target.scrollTop = offset;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function readOffsets(store, locationKey) {
|
|
33
|
+
const raw = store.get(storageKey(locationKey));
|
|
34
|
+
if (raw === null) return void 0;
|
|
35
|
+
try {
|
|
36
|
+
const parsed = JSON.parse(raw);
|
|
37
|
+
return parsed !== null && typeof parsed === "object" ? parsed : void 0;
|
|
38
|
+
} catch {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/router/element-scroll-restoration.tsx
|
|
44
|
+
function ElementScrollRestoration() {
|
|
45
|
+
const location = useLocation();
|
|
46
|
+
const previousKey = useRef(void 0);
|
|
47
|
+
useLayoutEffect(() => {
|
|
48
|
+
const restorer = createScrollRestorer(sessionScrollStore());
|
|
49
|
+
const leaving = previousKey.current;
|
|
50
|
+
if (leaving !== void 0) restorer.save(leaving, scrollTargets());
|
|
51
|
+
previousKey.current = location.key;
|
|
52
|
+
restorer.restore(location.key, scrollTargets());
|
|
53
|
+
const onHide = () => {
|
|
54
|
+
createScrollRestorer(sessionScrollStore()).save(location.key, scrollTargets());
|
|
55
|
+
};
|
|
56
|
+
window.addEventListener("pagehide", onHide);
|
|
57
|
+
return () => {
|
|
58
|
+
window.removeEventListener("pagehide", onHide);
|
|
59
|
+
};
|
|
60
|
+
}, [location.key]);
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function scrollTargets() {
|
|
64
|
+
return [...document.querySelectorAll(`[${SCROLL_CONTAINER_ATTRIBUTE}]`)].flatMap((element) => {
|
|
65
|
+
const id = element.getAttribute(SCROLL_CONTAINER_ATTRIBUTE);
|
|
66
|
+
if (id === null || id === "") return [];
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
id,
|
|
70
|
+
get scrollTop() {
|
|
71
|
+
return element.scrollTop;
|
|
72
|
+
},
|
|
73
|
+
set scrollTop(value) {
|
|
74
|
+
element.scrollTop = value;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
];
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function sessionScrollStore() {
|
|
81
|
+
try {
|
|
82
|
+
const storage = window.sessionStorage;
|
|
83
|
+
return {
|
|
84
|
+
get: (key) => storage.getItem(key),
|
|
85
|
+
set: (key, value) => {
|
|
86
|
+
storage.setItem(key, value);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
} catch {
|
|
90
|
+
return { get: () => null, set: () => void 0 };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
ElementScrollRestoration
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=element-scroll-restoration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/router/element-scroll-restoration.tsx","../../src/router/scroll-restoration.ts"],"mappings":";;;AAAA,SAAS,iBAAiB,cAAc;AACxC,SAAS,mBAAmB;;;ACiDrB,IAAM,6BAA6B;AAG1C,SAAS,WAAW,aAA6B;AAC/C,SAAO,kBAAkB,WAAW;AACtC;AASO,SAAS,qBAAqB,OAAoC;AACvE,SAAO;AAAA,IACL,KAAK,aAAa,SAAS;AACzB,YAAM,UAAkC,CAAC;AACzC,iBAAW,UAAU,QAAS,SAAQ,OAAO,EAAE,IAAI,OAAO;AAC1D,UAAI;AACF,cAAM,IAAI,WAAW,WAAW,GAAG,KAAK,UAAU,OAAO,CAAC;AAAA,MAC5D,QAAQ;AAAA,MAGR;AAAA,IACF;AAAA,IAEA,QAAQ,aAAa,SAAS;AAC5B,YAAM,UAAU,YAAY,OAAO,WAAW;AAC9C,UAAI,YAAY,OAAW;AAC3B,iBAAW,UAAU,SAAS;AAC5B,cAAM,SAAS,QAAQ,OAAO,EAAE;AAGhC,YAAI,OAAO,WAAW,SAAU,QAAO,YAAY;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,YAAY,OAAoB,aAA0D;AACjG,QAAM,MAAM,MAAM,IAAI,WAAW,WAAW,CAAC;AAC7C,MAAI,QAAQ,KAAM,QAAO;AACzB,MAAI;AACF,UAAM,SAAkB,KAAK,MAAM,GAAG;AAGtC,WAAO,WAAW,QAAQ,OAAO,WAAW,WACvC,SACD;AAAA,EACN,QAAQ;AACN,WAAO;AAAA,EACT;AACF;;;ADpEO,SAAS,2BAAiC;AAC/C,QAAM,WAAW,YAAY;AAC7B,QAAM,cAAc,OAA2B,MAAS;AAExD,kBAAgB,MAAM;AACpB,UAAM,WAAW,qBAAqB,mBAAmB,CAAC;AAC1D,UAAM,UAAU,YAAY;AAC5B,QAAI,YAAY,OAAW,UAAS,KAAK,SAAS,cAAc,CAAC;AACjE,gBAAY,UAAU,SAAS;AAC/B,aAAS,QAAQ,SAAS,KAAK,cAAc,CAAC;AAI9C,UAAM,SAAS,MAAY;AACzB,2BAAqB,mBAAmB,CAAC,EAAE,KAAK,SAAS,KAAK,cAAc,CAAC;AAAA,IAC/E;AACA,WAAO,iBAAiB,YAAY,MAAM;AAC1C,WAAO,MAAM;AACX,aAAO,oBAAoB,YAAY,MAAM;AAAA,IAC/C;AAAA,EACF,GAAG,CAAC,SAAS,GAAG,CAAC;AAEjB,SAAO;AACT;AAWA,SAAS,gBAAgC;AACvC,SAAO,CAAC,GAAG,SAAS,iBAAiB,IAAI,0BAA0B,GAAG,CAAC,EAAE,QAAQ,CAAC,YAAY;AAC5F,UAAM,KAAK,QAAQ,aAAa,0BAA0B;AAC1D,QAAI,OAAO,QAAQ,OAAO,GAAI,QAAO,CAAC;AACtC,WAAO;AAAA,MACL;AAAA,QACE;AAAA,QACA,IAAI,YAAoB;AACtB,iBAAO,QAAQ;AAAA,QACjB;AAAA,QACA,IAAI,UAAU,OAAe;AAC3B,kBAAQ,YAAY;AAAA,QACtB;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAQA,SAAS,qBAAkC;AACzC,MAAI;AACF,UAAM,UAAU,OAAO;AACvB,WAAO;AAAA,MACL,KAAK,CAAC,QAAQ,QAAQ,QAAQ,GAAG;AAAA,MACjC,KAAK,CAAC,KAAK,UAAU;AACnB,gBAAQ,QAAQ,KAAK,KAAK;AAAA,MAC5B;AAAA,IACF;AAAA,EACF,QAAQ;AACN,WAAO,EAAE,KAAK,MAAM,MAAM,KAAK,MAAM,OAAU;AAAA,EACjD;AACF;","names":[]}
|
|
@@ -3,18 +3,20 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
validateProjectStructure
|
|
5
5
|
} from "./chunk-GEQJAFSV.js";
|
|
6
|
-
import {
|
|
7
|
-
loadConfig
|
|
8
|
-
} from "./chunk-S433N3CT.js";
|
|
9
|
-
import "./chunk-HBU2GIMZ.js";
|
|
10
|
-
import "./chunk-GVW5EKEU.js";
|
|
11
|
-
import "./chunk-7VPQHEAJ.js";
|
|
12
6
|
import {
|
|
13
7
|
scanServerActions,
|
|
14
8
|
scanServerRoutes,
|
|
15
9
|
scanWebSocketRoutes
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-XS7EX55U.js";
|
|
11
|
+
import "./chunk-FD4ZDTQ6.js";
|
|
12
|
+
import {
|
|
13
|
+
loadConfig
|
|
14
|
+
} from "./chunk-QTHVHNJJ.js";
|
|
15
|
+
import "./chunk-3QPVEJ7D.js";
|
|
16
|
+
import "./chunk-U5PWXS3J.js";
|
|
17
|
+
import "./chunk-FH3SQR6P.js";
|
|
18
|
+
import "./chunk-ZNZISJDZ.js";
|
|
19
|
+
import "./chunk-VI7ZANB3.js";
|
|
18
20
|
|
|
19
21
|
// src/cli/commands/routes.ts
|
|
20
22
|
import { resolve, relative } from "path";
|
|
@@ -62,4 +64,4 @@ async function routesCommand() {
|
|
|
62
64
|
export {
|
|
63
65
|
routesCommand
|
|
64
66
|
};
|
|
65
|
-
//# sourceMappingURL=routes-
|
|
67
|
+
//# sourceMappingURL=routes-BPLU3ISV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/routes.ts"],"sourcesContent":["import { resolve, relative } from 'node:path'\n\nimport { loadConfig } from '../../config/load-config.js'\nimport { validateProjectStructure } from '../../config/validate-structure.js'\nimport { scanServerActions } from '../../server/scan/action-scan.js'\nimport { scanServerRoutes } from '../../server/scan/scan.js'\nimport { scanWebSocketRoutes } from '../../server/scan/ws-scan.js'\n\nexport async function routesCommand(): Promise<void> {\n const cwd = process.cwd()\n const config = await loadConfig(cwd)\n // #95 — honor config.appDir so a custom frontend dir (e.g. apps/web) passes the structure gate.\n validateProjectStructure(cwd, config.appDir)\n\n const serverDir = resolve(cwd, config.serverDir)\n\n const apiRoutes = scanServerRoutes(serverDir)\n const actions = scanServerActions(serverDir)\n const wsRoutes = scanWebSocketRoutes(serverDir)\n\n const totalCount = apiRoutes.length + actions.length + wsRoutes.length\n\n if (totalCount === 0) {\n console.log('\\n No routes found.\\n')\n return\n }\n\n // API Routes\n if (apiRoutes.length > 0) {\n console.log('\\n API Routes')\n console.log(' ' + '─'.repeat(60))\n for (const route of apiRoutes) {\n const rel = relative(cwd, route.filePath)\n console.log(` GET/POST ${route.routePath.padEnd(30)} ${rel}`)\n }\n }\n\n // Actions\n if (actions.length > 0) {\n console.log('\\n Actions')\n console.log(' ' + '─'.repeat(60))\n for (const action of actions) {\n const rel = relative(cwd, action.filePath)\n console.log(` POST /api/__actions/${action.actionPath.padEnd(18)} ${rel}`)\n }\n }\n\n // WebSocket\n if (wsRoutes.length > 0) {\n console.log('\\n WebSocket')\n console.log(' ' + '─'.repeat(60))\n for (const route of wsRoutes) {\n const rel = relative(cwd, route.filePath)\n console.log(` WS ${route.wsPath.padEnd(30)} ${rel}`)\n }\n }\n\n console.log(`\\n Total: ${totalCount} endpoints\\n`)\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli/commands/routes.ts"],"sourcesContent":["import { resolve, relative } from 'node:path'\n\nimport { loadConfig } from '../../config/load-config.js'\nimport { validateProjectStructure } from '../../config/validate-structure.js'\nimport { scanServerActions } from '../../server/scan/action-scan.js'\nimport { scanServerRoutes } from '../../server/scan/scan.js'\nimport { scanWebSocketRoutes } from '../../server/scan/ws-scan.js'\n\nexport async function routesCommand(): Promise<void> {\n const cwd = process.cwd()\n const config = await loadConfig(cwd)\n // #95 — honor config.appDir so a custom frontend dir (e.g. apps/web) passes the structure gate.\n validateProjectStructure(cwd, config.appDir)\n\n const serverDir = resolve(cwd, config.serverDir)\n\n const apiRoutes = scanServerRoutes(serverDir)\n const actions = scanServerActions(serverDir)\n const wsRoutes = scanWebSocketRoutes(serverDir)\n\n const totalCount = apiRoutes.length + actions.length + wsRoutes.length\n\n if (totalCount === 0) {\n console.log('\\n No routes found.\\n')\n return\n }\n\n // API Routes\n if (apiRoutes.length > 0) {\n console.log('\\n API Routes')\n console.log(' ' + '─'.repeat(60))\n for (const route of apiRoutes) {\n const rel = relative(cwd, route.filePath)\n console.log(` GET/POST ${route.routePath.padEnd(30)} ${rel}`)\n }\n }\n\n // Actions\n if (actions.length > 0) {\n console.log('\\n Actions')\n console.log(' ' + '─'.repeat(60))\n for (const action of actions) {\n const rel = relative(cwd, action.filePath)\n console.log(` POST /api/__actions/${action.actionPath.padEnd(18)} ${rel}`)\n }\n }\n\n // WebSocket\n if (wsRoutes.length > 0) {\n console.log('\\n WebSocket')\n console.log(' ' + '─'.repeat(60))\n for (const route of wsRoutes) {\n const rel = relative(cwd, route.filePath)\n console.log(` WS ${route.wsPath.padEnd(30)} ${rel}`)\n }\n }\n\n console.log(`\\n Total: ${totalCount} endpoints\\n`)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS,gBAAgB;AAQlC,eAAsB,gBAA+B;AACnD,QAAM,MAAM,QAAQ,IAAI;AACxB,QAAM,SAAS,MAAM,WAAW,GAAG;AAEnC,2BAAyB,KAAK,OAAO,MAAM;AAE3C,QAAM,YAAY,QAAQ,KAAK,OAAO,SAAS;AAE/C,QAAM,YAAY,iBAAiB,SAAS;AAC5C,QAAM,UAAU,kBAAkB,SAAS;AAC3C,QAAM,WAAW,oBAAoB,SAAS;AAE9C,QAAM,aAAa,UAAU,SAAS,QAAQ,SAAS,SAAS;AAEhE,MAAI,eAAe,GAAG;AACpB,YAAQ,IAAI,wBAAwB;AACpC;AAAA,EACF;AAGA,MAAI,UAAU,SAAS,GAAG;AACxB,YAAQ,IAAI,gBAAgB;AAC5B,YAAQ,IAAI,OAAO,SAAI,OAAO,EAAE,CAAC;AACjC,eAAW,SAAS,WAAW;AAC7B,YAAM,MAAM,SAAS,KAAK,MAAM,QAAQ;AACxC,cAAQ,IAAI,eAAe,MAAM,UAAU,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE;AAAA,IAChE;AAAA,EACF;AAGA,MAAI,QAAQ,SAAS,GAAG;AACtB,YAAQ,IAAI,aAAa;AACzB,YAAQ,IAAI,OAAO,SAAI,OAAO,EAAE,CAAC;AACjC,eAAW,UAAU,SAAS;AAC5B,YAAM,MAAM,SAAS,KAAK,OAAO,QAAQ;AACzC,cAAQ,IAAI,8BAA8B,OAAO,WAAW,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE;AAAA,IACjF;AAAA,EACF;AAGA,MAAI,SAAS,SAAS,GAAG;AACvB,YAAQ,IAAI,eAAe;AAC3B,YAAQ,IAAI,OAAO,SAAI,OAAO,EAAE,CAAC;AACjC,eAAW,SAAS,UAAU;AAC5B,YAAM,MAAM,SAAS,KAAK,MAAM,QAAQ;AACxC,cAAQ,IAAI,eAAe,MAAM,OAAO,OAAO,EAAE,CAAC,IAAI,GAAG,EAAE;AAAA,IAC7D;AAAA,EACF;AAEA,UAAQ,IAAI;AAAA,WAAc,UAAU;AAAA,CAAc;AACpD;","names":[]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "tsx/esm";
|
|
3
|
+
import {
|
|
4
|
+
theoConfigSchema
|
|
5
|
+
} from "./chunk-FH3SQR6P.js";
|
|
6
|
+
import "./chunk-ZNZISJDZ.js";
|
|
3
7
|
import {
|
|
4
8
|
cacheSchema,
|
|
5
9
|
corsSchema,
|
|
6
10
|
securityHeadersSchema,
|
|
7
|
-
storageSchema
|
|
8
|
-
|
|
9
|
-
} from "./chunk-GVW5EKEU.js";
|
|
10
|
-
import "./chunk-7VPQHEAJ.js";
|
|
11
|
+
storageSchema
|
|
12
|
+
} from "./chunk-VI7ZANB3.js";
|
|
11
13
|
export {
|
|
12
14
|
cacheSchema,
|
|
13
15
|
corsSchema,
|
|
@@ -15,4 +17,4 @@ export {
|
|
|
15
17
|
storageSchema,
|
|
16
18
|
theoConfigSchema
|
|
17
19
|
};
|
|
18
|
-
//# sourceMappingURL=schema-
|
|
20
|
+
//# sourceMappingURL=schema-SOAD43RQ.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "tsx/esm";
|
|
3
|
+
import {
|
|
4
|
+
cacheSchema,
|
|
5
|
+
corsSchema,
|
|
6
|
+
loggingSchema,
|
|
7
|
+
observabilitySchema,
|
|
8
|
+
rateLimitSchema,
|
|
9
|
+
securityHeadersSchema,
|
|
10
|
+
securitySchema,
|
|
11
|
+
storageSchema,
|
|
12
|
+
uploadSchema
|
|
13
|
+
} from "./chunk-VI7ZANB3.js";
|
|
14
|
+
export {
|
|
15
|
+
cacheSchema,
|
|
16
|
+
corsSchema,
|
|
17
|
+
loggingSchema,
|
|
18
|
+
observabilitySchema,
|
|
19
|
+
rateLimitSchema,
|
|
20
|
+
securityHeadersSchema,
|
|
21
|
+
securitySchema,
|
|
22
|
+
storageSchema,
|
|
23
|
+
uploadSchema
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=schemas-4AXHQMV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The security-header baseline, as a pure function of configuration.
|
|
3
|
+
*
|
|
4
|
+
* It lives in `core/contracts/` because **every** target needs it and none of it
|
|
5
|
+
* is transport-specific: `buildSecurityHeaders` takes a config object and
|
|
6
|
+
* returns `Record<string, string>`. `theokit start` writes that map onto a Node
|
|
7
|
+
* `ServerResponse` (`server/security/security-headers.ts`); the six Web deploy
|
|
8
|
+
* adapters write it onto a `Response` (`adapters/security-headers.ts`). Putting
|
|
9
|
+
* it under `server/` made the second group import across a boundary the
|
|
10
|
+
* dependency graph forbids — `adapters → server` is not a declared edge in
|
|
11
|
+
* ADR-0001 v3 — and the fix is not to widen the rule but to notice that this
|
|
12
|
+
* code was never server code.
|
|
13
|
+
*
|
|
14
|
+
* `core/contracts/<file>.ts` is the declared exception to the deep-import rule,
|
|
15
|
+
* so both callers reach it directly and there is still exactly ONE definition of
|
|
16
|
+
* what a configured header set means.
|
|
17
|
+
*
|
|
18
|
+
* Phase 6 — Default Security Headers (D4 / EC-2).
|
|
19
|
+
*
|
|
20
|
+
* Per-response security baseline. The framework applies these BEFORE the
|
|
21
|
+
* route handler runs so a handler can still override via `res.setHeader`.
|
|
22
|
+
*
|
|
23
|
+
* EC-2 backward-compatibility: CSP ships in `report-only` mode by default
|
|
24
|
+
* for 0.2.0. Existing apps with inline scripts or third-party CDN scripts
|
|
25
|
+
* keep working but consumers see violation reports via their CSP report
|
|
26
|
+
* collector (or browser DevTools). 0.3.0 will flip the default to
|
|
27
|
+
* `enforce` after a release of visibility.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Default Content-Security-Policy. Conservative-but-not-paralyzing:
|
|
31
|
+
*
|
|
32
|
+
* - default-src 'self' — every fetch falls back to same-origin
|
|
33
|
+
* - script-src 'self' — T6.1 (0.3.0): `'unsafe-inline'`
|
|
34
|
+
* dropped. The SSR pipeline issues a
|
|
35
|
+
* per-request nonce that REPLACES
|
|
36
|
+
* this directive at runtime
|
|
37
|
+
* (`'nonce-<token>'`). For static /
|
|
38
|
+
* non-SSR contexts where no nonce is
|
|
39
|
+
* available, the policy is strict-
|
|
40
|
+
* no-inline — user inline scripts
|
|
41
|
+
* must be migrated to external
|
|
42
|
+
* `<script src="...">` or threaded
|
|
43
|
+
* through `ctx.nonce`.
|
|
44
|
+
* - style-src 'self' 'unsafe-inline' — Tailwind + TheoUI use style attrs
|
|
45
|
+
* in animation directives
|
|
46
|
+
* - img-src 'self' data: blob: — supports inline data URIs, blobs
|
|
47
|
+
* from canvas exports
|
|
48
|
+
* - font-src 'self' data: — Geist fonts inline-base64
|
|
49
|
+
* - connect-src 'self' ws: wss: — WebSocket dev HMR + agent streams
|
|
50
|
+
* - frame-ancestors 'none' — clickjacking defense
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* T5.1 — default CSP includes the built-in report endpoint so violations
|
|
54
|
+
* are visible without extra config. Apps that ship a custom `csp` string
|
|
55
|
+
* override the report-uri.
|
|
56
|
+
*/
|
|
57
|
+
declare const DEFAULT_CSP: string;
|
|
58
|
+
/**
|
|
59
|
+
* T1.1 — Default Permissions-Policy header (default-deny stance).
|
|
60
|
+
*
|
|
61
|
+
* Disables sensitive Web APIs that the vast majority of apps don't use.
|
|
62
|
+
* Apps that DO need any of these opt in by overriding `permissionsPolicy`
|
|
63
|
+
* in `config.security.headers`.
|
|
64
|
+
*
|
|
65
|
+
* The seven features listed are the most-abused for: tracking
|
|
66
|
+
* (geolocation, accelerometer, gyroscope), spyware (camera, microphone),
|
|
67
|
+
* fraud (payment), and hardware exfiltration (usb).
|
|
68
|
+
*
|
|
69
|
+
* Aligns with Mozilla baseline + OWASP Secure Headers + Lighthouse PWA.
|
|
70
|
+
*/
|
|
71
|
+
declare const DEFAULT_PERMISSIONS_POLICY = "geolocation=(), camera=(), microphone=(), payment=(), usb=(), accelerometer=(), gyroscope=()";
|
|
72
|
+
type CspMode = 'enforce' | 'report-only' | 'off';
|
|
73
|
+
interface SecurityHeadersConfig {
|
|
74
|
+
/**
|
|
75
|
+
* Custom CSP policy string. When set, replaces the default verbatim.
|
|
76
|
+
* Pass `false` to disable CSP entirely (alias for `cspMode: 'off'`).
|
|
77
|
+
*/
|
|
78
|
+
csp?: string | false;
|
|
79
|
+
/**
|
|
80
|
+
* Enforcement mode for CSP. Default `report-only` for 0.2.0 (EC-2).
|
|
81
|
+
* 0.3.0 will default to `enforce`.
|
|
82
|
+
*/
|
|
83
|
+
cspMode?: CspMode;
|
|
84
|
+
/**
|
|
85
|
+
* Strict-Transport-Security value. Defaults to
|
|
86
|
+
* `max-age=31536000; includeSubDomains` in production. Pass `false` to
|
|
87
|
+
* suppress (e.g. internal LANs without TLS).
|
|
88
|
+
*/
|
|
89
|
+
hsts?: string | false;
|
|
90
|
+
/** X-Frame-Options. Default DENY. */
|
|
91
|
+
frameOptions?: 'DENY' | 'SAMEORIGIN';
|
|
92
|
+
/** X-Content-Type-Options. Default `nosniff`. */
|
|
93
|
+
contentTypeOptions?: 'nosniff';
|
|
94
|
+
/** Referrer-Policy. Default `strict-origin-when-cross-origin`. */
|
|
95
|
+
referrerPolicy?: string;
|
|
96
|
+
/**
|
|
97
|
+
* T1.1 — Permissions-Policy directive string. When set, replaces the
|
|
98
|
+
* default verbatim (no merge — see ADR-EC-12). Pass `false` to disable
|
|
99
|
+
* the header entirely. Schema-level refinement rejects any string
|
|
100
|
+
* containing CR/LF (EC-3 — CWE-113 HTTP Response Splitting mitigation).
|
|
101
|
+
*/
|
|
102
|
+
permissionsPolicy?: string | false;
|
|
103
|
+
}
|
|
104
|
+
interface SecurityEnv {
|
|
105
|
+
production: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* T4.1 — Per-request options passed by the SSR pipeline.
|
|
109
|
+
*
|
|
110
|
+
* - `nonce`: when set, the framework substitutes the `'unsafe-inline'`
|
|
111
|
+
* token in `script-src` with `'nonce-<nonce>'`. EC-3 forces
|
|
112
|
+
* `Cache-Control: private, no-store` so a CDN cannot cache the HTML
|
|
113
|
+
* (carrying one nonce) and re-serve it with a freshly-generated CSP
|
|
114
|
+
* header (carrying a different nonce).
|
|
115
|
+
* - `prerender`: when true, the nonce is IGNORED. Prerendered HTML is
|
|
116
|
+
* generated at build time with no nonce in the script tags; mixing a
|
|
117
|
+
* runtime nonce in the header would block every script. EC-4.
|
|
118
|
+
*/
|
|
119
|
+
interface SecurityHeadersOptions {
|
|
120
|
+
nonce?: string;
|
|
121
|
+
prerender?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Build the security headers map for a given config + env. Pure function —
|
|
125
|
+
* returned object can be inspected, logged, or applied to a response.
|
|
126
|
+
*/
|
|
127
|
+
declare function buildSecurityHeaders(config: SecurityHeadersConfig, env: SecurityEnv, options?: SecurityHeadersOptions): Record<string, string>;
|
|
128
|
+
|
|
129
|
+
export { type CspMode as C, DEFAULT_CSP as D, type SecurityHeadersConfig as S, DEFAULT_PERMISSIONS_POLICY as a, buildSecurityHeaders as b, type SecurityEnv as c, type SecurityHeadersOptions as d };
|
|
@@ -4,95 +4,7 @@ import { AcpTransport } from '@theokit/agents';
|
|
|
4
4
|
export { InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
|
|
5
5
|
import { CustomTool as CustomTool$1 } from '@theokit/sdk';
|
|
6
6
|
import { V as VerifyFn } from '../../webhook-types-DGIjjcaI.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Provider Resolver — Strategy + Registry pattern (FAANG-grade).
|
|
10
|
-
*
|
|
11
|
-
* Inspiration: Dapr Conversation Registry (`dapr/pkg/components/conversation/registry.go`)
|
|
12
|
-
* + Encore Manager provider array (`encore/runtimes/go/pubsub/manager_internal.go`).
|
|
13
|
-
*
|
|
14
|
-
* Principle: provider routing is the FRAMEWORK's responsibility, not the consumer's.
|
|
15
|
-
* The consumer template uses a plain `model: { id: 'gpt-4o-mini' }` — no conditionals.
|
|
16
|
-
*
|
|
17
|
-
* Wire protocol: OpenAI Chat Completions (universal — implemented by every
|
|
18
|
-
* os providers: OpenRouter, Groq, Mistral, Together, Anthropic via proxy, etc).
|
|
19
|
-
*
|
|
20
|
-
* Resolution by priority (FIRST match wins):
|
|
21
|
-
* 1. OPENROUTER_API_KEY → baseUrl=openrouter.ai (multi-model gateway)
|
|
22
|
-
* 2. OPENAI_API_KEY → baseUrl=api.openai.com
|
|
23
|
-
* 3. ANTHROPIC_API_KEY → direct Anthropic (Messages API, not OpenAI-compat)
|
|
24
|
-
*
|
|
25
|
-
* Escape hatch: an explicit `options.apiKey` OVERRIDES auto-resolution
|
|
26
|
-
* (the consumer can force a specific provider if it wants to).
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* Provider configuration descriptor — Registry entry shape.
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
interface ProviderDescriptor {
|
|
34
|
-
/** Stable name used internally — not exposed on the wire. */
|
|
35
|
-
name: string;
|
|
36
|
-
/** Environment variable that holds the API key for this provider. */
|
|
37
|
-
envKey: string;
|
|
38
|
-
/** Base URL for the provider's OpenAI-compatible (or native) API. */
|
|
39
|
-
baseUrl: string;
|
|
40
|
-
/** Resolution priority (lower = higher priority). FIRST match wins. */
|
|
41
|
-
priority: number;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Resolved provider configuration — output of `resolveProvider()`.
|
|
45
|
-
*
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
interface ResolvedProvider {
|
|
49
|
-
name: string;
|
|
50
|
-
apiKey: string;
|
|
51
|
-
baseUrl: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Register a new provider (Registry pattern — runtime extension point).
|
|
55
|
-
* Useful for self-hosted endpoints or custom providers without touching theokit src.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* registerProvider({
|
|
59
|
-
* name: 'self-hosted',
|
|
60
|
-
* envKey: 'SELF_HOSTED_API_KEY',
|
|
61
|
-
* baseUrl: 'https://llm.internal.acme.com/v1',
|
|
62
|
-
* priority: 0, // highest priority
|
|
63
|
-
* })
|
|
64
|
-
*
|
|
65
|
-
* @public
|
|
66
|
-
*/
|
|
67
|
-
declare function registerProvider(descriptor: ProviderDescriptor): void;
|
|
68
|
-
/**
|
|
69
|
-
* Reset registry to DEFAULT_REGISTRY (test-only / dev escape hatch).
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
declare function resetProviderRegistry(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Get current registry snapshot (read-only — inspection).
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
declare function listProviders(): readonly ProviderDescriptor[];
|
|
80
|
-
/**
|
|
81
|
-
* Resolve provider from env vars by priority. FIRST env var found wins.
|
|
82
|
-
*
|
|
83
|
-
* @returns ResolvedProvider with apiKey + baseUrl + name
|
|
84
|
-
* @throws Error if NO provider env var is set (actionable message)
|
|
85
|
-
*
|
|
86
|
-
* @public
|
|
87
|
-
*/
|
|
88
|
-
declare function resolveProvider(): ResolvedProvider;
|
|
89
|
-
/**
|
|
90
|
-
* Try to resolve — does NOT throw. Returns null if no provider available.
|
|
91
|
-
* Useful for graceful degradation (e.g., mock mode).
|
|
92
|
-
*
|
|
93
|
-
* @public
|
|
94
|
-
*/
|
|
95
|
-
declare function tryResolveProvider(): ResolvedProvider | null;
|
|
7
|
+
export { P as ProviderDescriptor, R as ResolvedProvider, l as listProviders, a as registerProvider, b as resetProviderRegistry, r as resolveProvider, t as tryResolveProvider } from '../../provider-resolver-Dx6QuWrw.js';
|
|
96
8
|
|
|
97
9
|
/**
|
|
98
10
|
* M26 (ADR-0041) — `createWorkflowTool`: wrap an SDK `Workflow` as a `CustomTool`.
|
|
@@ -409,4 +321,4 @@ interface StdioStreams {
|
|
|
409
321
|
*/
|
|
410
322
|
declare function serveMcpStdio(mod: unknown, name: string, appResources: readonly AppResource[], streams: StdioStreams): Promise<void>;
|
|
411
323
|
|
|
412
|
-
export { type AcpToolConfig, type AppResource, type AppResourceInput, type ChannelMessage, type ChannelWebhookConfig, type CodeModeApi, type CodeModeConfig, type CodeModePermission, CodeModePermissionDeniedError, type McpResourceContents, type McpResourceDescriptor, NodeAcpTransport, type
|
|
324
|
+
export { type AcpToolConfig, type AppResource, type AppResourceInput, type ChannelMessage, type ChannelWebhookConfig, type CodeModeApi, type CodeModeConfig, type CodeModePermission, CodeModePermissionDeniedError, type McpResourceContents, type McpResourceDescriptor, NodeAcpTransport, type Sandbox, type StdioStreams, type VendorAgentClient, type VendorAgentToolConfig, type WorkflowLike, type WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio };
|
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
export { g as generateNonce } from '../../nonce-BXt7Qu_C.js';
|
|
2
3
|
import { R as RateLimitStore } from '../../rate-limit-store-BEJnhWdw.js';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* T4.1 — Per-request CSP nonce generation.
|
|
6
|
-
*
|
|
7
|
-
* Returns a 22–24 character base64-encoded string carrying 16 bytes of
|
|
8
|
-
* cryptographic entropy. Used by the SSR pipeline to nonce the inline
|
|
9
|
-
* hydration data script so the default CSP can drop `'unsafe-inline'`
|
|
10
|
-
* from `script-src` in 0.3.0.
|
|
11
|
-
*
|
|
12
|
-
* Runtime portability: prefers Web Crypto (`globalThis.crypto`) because
|
|
13
|
-
* it is available on every target runtime (Node 19+, Bun, Deno, Vercel
|
|
14
|
-
* Edge, Cloudflare Workers). Falls back to `node:crypto` for older Node
|
|
15
|
-
* builds where `globalThis.crypto` is absent.
|
|
16
|
-
*
|
|
17
|
-
* NOT a security primitive in the cryptographic sense — the nonce is a
|
|
18
|
-
* one-shot, single-request value that defeats trivial XSS injection by
|
|
19
|
-
* making the attacker guess a 128-bit string per request. It is NOT
|
|
20
|
-
* suitable for signing or session tokens.
|
|
21
|
-
*/
|
|
22
|
-
declare function generateNonce(): string;
|
|
23
|
-
|
|
24
5
|
declare class AuthRequiredError extends Error {
|
|
25
6
|
code: "AUTH_REQUIRED";
|
|
26
7
|
status: number;
|
|
@@ -416,4 +397,4 @@ declare function clearOidcCache(): void;
|
|
|
416
397
|
*/
|
|
417
398
|
declare function discoverOidcProvider(issuer: string | URL): Promise<OidcMetadata>;
|
|
418
399
|
|
|
419
|
-
export { AuthRequiredError, type BackupCode, type BackupCodeOptions, type OidcMetadata, type PkceChallenge, type SessionConfig, type SessionManager, type SessionManagerWeb, type SessionMeta, type ThrottleOptions, type ThrottleState, type TotpAlgorithm, type TotpOptions, type TotpUriOptions, type VerifyTotpOptions, _resetKeyCacheForTests, assertProductionSecret, checkThrottle, clearOidcCache, createSessionManager, createSessionManagerWeb, decrypt, discoverOidcProvider, encrypt, generateBackupCodes,
|
|
400
|
+
export { AuthRequiredError, type BackupCode, type BackupCodeOptions, type OidcMetadata, type PkceChallenge, type SessionConfig, type SessionManager, type SessionManagerWeb, type SessionMeta, type ThrottleOptions, type ThrottleState, type TotpAlgorithm, type TotpOptions, type TotpUriOptions, type VerifyTotpOptions, _resetKeyCacheForTests, assertProductionSecret, checkThrottle, clearOidcCache, createSessionManager, createSessionManagerWeb, decrypt, discoverOidcProvider, encrypt, generateBackupCodes, generateOAuthState, generatePkceChallenge, generateTotp, generateTotpSecret, pkceChallengeFromVerifier, recordAttempt, requireAuth, rotateIfNeeded, rotateIfNeededWeb, totpUri, verifyBackupCode, verifyOAuthState, verifyTotp };
|
|
@@ -23,11 +23,12 @@ import {
|
|
|
23
23
|
verifyBackupCode,
|
|
24
24
|
verifyOAuthState,
|
|
25
25
|
verifyTotp
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-RQW5YMH7.js";
|
|
27
27
|
import "../../chunk-4FWBKX6G.js";
|
|
28
|
+
import "../../chunk-YSJOZEI6.js";
|
|
28
29
|
import {
|
|
29
30
|
generateNonce
|
|
30
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-Z4PJMZLM.js";
|
|
31
32
|
import "../../chunk-XTHN6JBX.js";
|
|
32
33
|
export {
|
|
33
34
|
AuthRequiredError,
|
|
@@ -14,11 +14,12 @@ import {
|
|
|
14
14
|
translateCronToVercel,
|
|
15
15
|
validateCronSchedule,
|
|
16
16
|
writeCronManifest
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-HK4AZBKX.js";
|
|
18
18
|
import "../../chunk-VZTYCAO6.js";
|
|
19
|
-
import "../../chunk-
|
|
19
|
+
import "../../chunk-UMNXCU3K.js";
|
|
20
20
|
import "../../chunk-52PDWL5S.js";
|
|
21
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-5K4TDLRG.js";
|
|
22
|
+
import "../../chunk-ZWN3AODA.js";
|
|
22
23
|
import "../../chunk-XTHN6JBX.js";
|
|
23
24
|
export {
|
|
24
25
|
CRON_MANIFEST_SCHEMA_VERSION,
|