@acryldev/blends 0.0.0-stage → 1.7.1
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/LICENSE +73 -0
- package/README.md +424 -2
- package/bin/acrylblends.js +12 -0
- package/dist/index.d.ts +231 -0
- package/dist/index.js +4505 -0
- package/dist/index.js.map +1 -0
- package/lib/accept-B13wFRkc.js +193 -0
- package/lib/accepts-BN4uue4T.js +52 -0
- package/lib/accepts.d.ts +33 -0
- package/lib/accepts.js +2 -0
- package/lib/acryl-base.d.ts +2 -0
- package/lib/acryl-base.js +2 -0
- package/lib/adapter-Wt9Ntyhx.js +37 -0
- package/lib/adapter.d.ts +12 -0
- package/lib/adapter.js +2 -0
- package/lib/app-CM-rDcw6.js +26 -0
- package/lib/app-DGqSNBSd.d.ts +21 -0
- package/lib/app-base-BwplqlWX.js +332 -0
- package/lib/audit-B2H3sUfg.d.ts +136 -0
- package/lib/base-N-QVQhMZ.d.ts +783 -0
- package/lib/base-kl8P-za0.js +722 -0
- package/lib/basic-auth-ByZGvWGz.js +95 -0
- package/lib/basic-auth-CzulvSad.js +20 -0
- package/lib/basic-auth.d.ts +72 -0
- package/lib/basic-auth.js +2 -0
- package/lib/bearer-auth-CfR6YNqy.js +94 -0
- package/lib/bearer-auth.d.ts +89 -0
- package/lib/bearer-auth.js +2 -0
- package/lib/body-BQ-J23GI.js +94 -0
- package/lib/body-limit-DyO82Wes.js +66 -0
- package/lib/body-limit.d.ts +42 -0
- package/lib/body-limit.js +2 -0
- package/lib/browser/client.js +307 -0
- package/lib/browser/jsx-dom.js +1432 -0
- package/lib/browser/read-sse.js +84 -0
- package/lib/buffer-CWpxJrvI.js +51 -0
- package/lib/bun.d.ts +75 -0
- package/lib/bun.js +134 -0
- package/lib/cache-DllEV7kz.js +169 -0
- package/lib/cache.d.ts +43 -0
- package/lib/cache.js +2 -0
- package/lib/cell-wEBQA3d0.d.ts +32 -0
- package/lib/client-BMFCUlHG.js +143 -0
- package/lib/client-modules-ChLgW0l9.js +267 -0
- package/lib/client.d.ts +3 -0
- package/lib/client.js +3 -0
- package/lib/color-C26GR4OI.js +37 -0
- package/lib/combine-rXRCRMJx.js +137 -0
- package/lib/combine.d.ts +85 -0
- package/lib/combine.js +2 -0
- package/lib/common-CaqP5LIh.d.ts +46 -0
- package/lib/components-BZ8vBk_7.js +268 -0
- package/lib/components-Cq4hcRbo.js +24 -0
- package/lib/compose-DbuvN1rE.js +50 -0
- package/lib/compress-C7QjZM5f.js +11 -0
- package/lib/compress-CdDuP9-S.d.ts +11 -0
- package/lib/compress-T36YxGla.js +79 -0
- package/lib/compress.d.ts +38 -0
- package/lib/compress.js +3 -0
- package/lib/concurrent-B7z-2cwF.js +30 -0
- package/lib/connection-CzRPq1RP.d.ts +25 -0
- package/lib/connection-DLPx5pxD.js +24 -0
- package/lib/conninfo-BbxlV2HK.d.ts +11 -0
- package/lib/conninfo-CNYXEtnA.js +19 -0
- package/lib/conninfo.d.ts +3 -0
- package/lib/conninfo.js +2 -0
- package/lib/constants-D914mQY7.js +7 -0
- package/lib/constants-nJj4XhwC.js +4 -0
- package/lib/constants-vv1oZD_p.js +9 -0
- package/lib/context-BVI2RzT7.js +365 -0
- package/lib/context-Ca3uX_bh.d.ts +1234 -0
- package/lib/context-Dre4P1UW.d.ts +250 -0
- package/lib/context-storage-ClUlVtCZ.js +52 -0
- package/lib/context-storage.d.ts +38 -0
- package/lib/context-storage.js +2 -0
- package/lib/cookie-BqeGZ43j.d.ts +40 -0
- package/lib/cookie-DktnJ0tJ.js +82 -0
- package/lib/cookie-uMH6wAF3.js +125 -0
- package/lib/cookie.d.ts +24 -0
- package/lib/cookie.js +2 -0
- package/lib/cordis/db-sqlite.d.ts +56 -0
- package/lib/cordis/db-sqlite.js +66 -0
- package/lib/cordis/db.d.ts +8 -0
- package/lib/cordis/db.js +1 -0
- package/lib/cordis/door.d.ts +404 -0
- package/lib/cordis/door.js +1812 -0
- package/lib/cordis/inspect.d.ts +77 -0
- package/lib/cordis/inspect.js +149 -0
- package/lib/cordis/kv-db.d.ts +16 -0
- package/lib/cordis/kv-db.js +18 -0
- package/lib/cordis/kv-json.d.ts +16 -0
- package/lib/cordis/kv-json.js +52 -0
- package/lib/cordis/kv.d.ts +8 -0
- package/lib/cordis/kv.js +1 -0
- package/lib/cordis/node-server.d.ts +155 -0
- package/lib/cordis/node-server.js +4 -0
- package/lib/cordis/router-http.d.ts +85 -0
- package/lib/cordis/router-http.js +206 -0
- package/lib/cordis/router.d.ts +7 -0
- package/lib/cordis/router.js +6 -0
- package/lib/cordis/state/react.d.ts +6 -0
- package/lib/cordis/state/react.js +11 -0
- package/lib/cordis/state.d.ts +34 -0
- package/lib/cordis/state.js +527 -0
- package/lib/core-4oDBzv4Q.js +19 -0
- package/lib/cors-C0qqZ-O-.js +106 -0
- package/lib/cors.d.ts +52 -0
- package/lib/cors.js +2 -0
- package/lib/crypto-ciSjk9n3.js +34 -0
- package/lib/csrf-rMr2nM2c.js +101 -0
- package/lib/csrf.d.ts +75 -0
- package/lib/csrf.js +2 -0
- package/lib/css-Bd6tj88A.js +320 -0
- package/lib/css-CLgKjBuO.js +134 -0
- package/lib/css.d.ts +82 -0
- package/lib/css.js +3 -0
- package/lib/database-CyKvumAn.d.ts +44 -0
- package/lib/db/conformance.d.ts +15 -0
- package/lib/db/conformance.js +279 -0
- package/lib/db/sqlite.d.ts +3 -0
- package/lib/db/sqlite.js +2 -0
- package/lib/db.d.ts +3 -0
- package/lib/db.js +2 -0
- package/lib/dev-h25puJmg.js +50 -0
- package/lib/dev.d.ts +19 -0
- package/lib/dev.js +2 -0
- package/lib/dom-MsnhZjjn.js +74 -0
- package/lib/door/host.d.ts +24 -0
- package/lib/door/host.js +2 -0
- package/lib/door/page.d.ts +160 -0
- package/lib/door/page.js +1257 -0
- package/lib/door/protocol.d.ts +2 -0
- package/lib/door/protocol.js +2 -0
- package/lib/drivers.d.ts +77 -0
- package/lib/drivers.js +16 -0
- package/lib/encode-BbgU91Gc.js +33 -0
- package/lib/etag-DevxEjyU.js +135 -0
- package/lib/etag.d.ts +40 -0
- package/lib/etag.js +2 -0
- package/lib/factory-d6WBwm2j.js +30 -0
- package/lib/factory.d.ts +35 -0
- package/lib/factory.js +2 -0
- package/lib/handler-DXCHa3NV.js +12 -0
- package/lib/headers-DbujLUIi.d.ts +11 -0
- package/lib/helpers-qmReU164.js +5 -0
- package/lib/hooks-Bs7lFRjW.js +762 -0
- package/lib/html-1jTa7KN1.js +103 -0
- package/lib/html-CNr9FLdV.d.ts +46 -0
- package/lib/html-CoWdxS1u.js +31 -0
- package/lib/html.d.ts +3 -0
- package/lib/html.js +3 -0
- package/lib/http-exception-BKMYq4x6.js +54 -0
- package/lib/http-exception-Cm8QD9Fl.d.ts +57 -0
- package/lib/http-exception.d.ts +2 -0
- package/lib/http-exception.js +2 -0
- package/lib/http-status-uBFmbzzM.d.ts +35 -0
- package/lib/index-B_g6ECnm.d.ts +57 -0
- package/lib/index-BaOiJMWK.d.ts +31 -0
- package/lib/index-C5RhEyXO.d.ts +45 -0
- package/lib/index-C8xOqNUW.d.ts +71 -0
- package/lib/index-D1HlwHSL.d.ts +129 -0
- package/lib/index-DUYLk7OD.d.ts +44 -0
- package/lib/index-DYBSr8yW.d.ts +156 -0
- package/lib/index-Dv4qFsro.d.ts +94 -0
- package/lib/index-jdWVs88B.d.ts +6 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -0
- package/lib/ip-restriction-C4TZKPKl.js +166 -0
- package/lib/ip-restriction.d.ts +68 -0
- package/lib/ip-restriction.js +2 -0
- package/lib/ipaddr-CTeN6kNw.js +238 -0
- package/lib/jsx/dom/client.d.ts +30 -0
- package/lib/jsx/dom/client.js +49 -0
- package/lib/jsx/dom/css.d.ts +84 -0
- package/lib/jsx/dom/css.js +2 -0
- package/lib/jsx/dom/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-dev-runtime.js +2 -0
- package/lib/jsx/dom/jsx-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-runtime.js +3 -0
- package/lib/jsx/dom/server.d.ts +105 -0
- package/lib/jsx/dom/server.js +37 -0
- package/lib/jsx/dom.d.ts +5 -0
- package/lib/jsx/dom.js +6 -0
- package/lib/jsx/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/jsx-dev-runtime.js +3 -0
- package/lib/jsx/jsx-runtime.d.ts +10 -0
- package/lib/jsx/jsx-runtime.js +30 -0
- package/lib/jsx/streaming.d.ts +2 -0
- package/lib/jsx/streaming.js +2 -0
- package/lib/jsx-C5-YJG0l.js +47 -0
- package/lib/jsx-dev-runtime-CPsrmbgy.d.ts +7 -0
- package/lib/jsx-dev-runtime-Cs-uV30u.js +14 -0
- package/lib/jsx-dev-runtime-DK4z4RD3.js +354 -0
- package/lib/jsx-dev-runtime-DSQ8vSCY.d.ts +6 -0
- package/lib/jsx-renderer-B2wHa9Y8.js +99 -0
- package/lib/jsx-renderer.d.ts +75 -0
- package/lib/jsx-renderer.js +2 -0
- package/lib/jsx-runtime-BVVgDSdq.d.ts +1 -0
- package/lib/jsx-runtime-brX0UliB.js +2 -0
- package/lib/jsx.d.ts +3 -0
- package/lib/jsx.js +6 -0
- package/lib/jwk-BbiXIYhg.js +117 -0
- package/lib/jwk.d.ts +52 -0
- package/lib/jwk.js +2 -0
- package/lib/jwt-BCS5hH1O.d.ts +51 -0
- package/lib/jwt-Culfq-8m.js +403 -0
- package/lib/jwt-DaOoWaF3.js +115 -0
- package/lib/jwt.d.ts +72 -0
- package/lib/jwt.js +3 -0
- package/lib/kv/conformance.d.ts +17 -0
- package/lib/kv/conformance.js +313 -0
- package/lib/kv/db.d.ts +3 -0
- package/lib/kv/db.js +2 -0
- package/lib/kv/json.d.ts +3 -0
- package/lib/kv/json.js +2 -0
- package/lib/kv-Kv6J9zqu.d.ts +39 -0
- package/lib/kv.d.ts +3 -0
- package/lib/kv.js +2 -0
- package/lib/language-anRiLd9a.js +198 -0
- package/lib/language.d.ts +88 -0
- package/lib/language.js +2 -0
- package/lib/linear-router-BUrYQxcv.js +96 -0
- package/lib/logger-CLvaB463.js +54 -0
- package/lib/logger.d.ts +22 -0
- package/lib/logger.js +2 -0
- package/lib/loopback-only-0nTL30Zt.js +131 -0
- package/lib/loopback-only.d.ts +73 -0
- package/lib/loopback-only.js +2 -0
- package/lib/method-not-allowed-B3nMAp1f.js +82 -0
- package/lib/method-not-allowed.d.ts +47 -0
- package/lib/method-not-allowed.js +2 -0
- package/lib/method-override-Dhd_EJD9.js +103 -0
- package/lib/method-override.d.ts +46 -0
- package/lib/method-override.js +2 -0
- package/lib/middleware-B8gJUDgl.js +12 -0
- package/lib/mime-B9GbsqnN.d.ts +72 -0
- package/lib/mime-C-r9WxjH.js +77 -0
- package/lib/mount-RGiNYj2l.js +67 -0
- package/lib/mount.d.ts +44 -0
- package/lib/mount.js +2 -0
- package/lib/node-server/conninfo.d.ts +2 -0
- package/lib/node-server/conninfo.js +2 -0
- package/lib/node-server/register.d.ts +1 -0
- package/lib/node-server/register.js +59 -0
- package/lib/node-server/serve-static.d.ts +2 -0
- package/lib/node-server/serve-static.js +2 -0
- package/lib/node-server.d.ts +134 -0
- package/lib/node-server.js +5 -0
- package/lib/open-BC_BGIQt.d.ts +12 -0
- package/lib/open-BpnCtiKf.js +224 -0
- package/lib/open-CEE2hyrs.d.ts +11 -0
- package/lib/open-CwA_ZiPl.js +57 -0
- package/lib/open-DFt0lT26.js +197 -0
- package/lib/open-DXxlFxS0.d.ts +27 -0
- package/lib/pattern-router-DlkDNR9e.js +41 -0
- package/lib/powered-by-B9ufDvKH.js +24 -0
- package/lib/powered-by.d.ts +28 -0
- package/lib/powered-by.js +2 -0
- package/lib/pretty-json-B_5MzYgk.js +39 -0
- package/lib/pretty-json.d.ts +40 -0
- package/lib/pretty-json.js +2 -0
- package/lib/protocol-8HjYa5OX.js +217 -0
- package/lib/protocol-DdQgl224.d.ts +160 -0
- package/lib/proxy-C02n8qaX.js +121 -0
- package/lib/proxy.d.ts +72 -0
- package/lib/proxy.js +2 -0
- package/lib/quick.d.ts +8 -0
- package/lib/quick.js +17 -0
- package/lib/read-sse.d.ts +33 -0
- package/lib/read-sse.js +84 -0
- package/lib/reg-exp-router-DT_H6W_j.js +363 -0
- package/lib/request-PoZjfrb4.js +323 -0
- package/lib/request-id-CWyCgzyD.js +34 -0
- package/lib/request-id.d.ts +45 -0
- package/lib/request-id.js +2 -0
- package/lib/request.d.ts +2 -0
- package/lib/request.js +2 -0
- package/lib/route-D1WQ4cOh.js +126 -0
- package/lib/route.d.ts +78 -0
- package/lib/route.js +2 -0
- package/lib/router/linear-router.d.ts +11 -0
- package/lib/router/linear-router.js +2 -0
- package/lib/router/pattern-router.d.ts +11 -0
- package/lib/router/pattern-router.js +2 -0
- package/lib/router/reg-exp-router.d.ts +35 -0
- package/lib/router/reg-exp-router.js +2 -0
- package/lib/router/smart-router.d.ts +15 -0
- package/lib/router/smart-router.js +2 -0
- package/lib/router/trie-router.d.ts +11 -0
- package/lib/router/trie-router.js +2 -0
- package/lib/router-0TlTAMdt.d.ts +99 -0
- package/lib/router-wWGf3FlK.js +35 -0
- package/lib/router.d.ts +2 -0
- package/lib/router.js +2 -0
- package/lib/schema-validator-DGAFbTcN.js +22 -0
- package/lib/schema-validator.d.ts +54 -0
- package/lib/schema-validator.js +2 -0
- package/lib/secure-headers-eLrZcjSr.js +163 -0
- package/lib/secure-headers.d.ts +125 -0
- package/lib/secure-headers.js +2 -0
- package/lib/serve-static-D97E4ERX.d.ts +18 -0
- package/lib/serve-static-YoUetEZ8.js +212 -0
- package/lib/serve-static-cnLZvaYu.js +77 -0
- package/lib/serve-static.d.ts +2 -0
- package/lib/serve-static.js +2 -0
- package/lib/smart-router-BF56Yf23.js +49 -0
- package/lib/snapshot-text-Cyl69OKv.js +597 -0
- package/lib/src-6T1gCSq3.js +427 -0
- package/lib/src-BycZ1HUQ.js +407 -0
- package/lib/src-CZ1JoBaO.js +90 -0
- package/lib/src-C_00jcuj.js +85 -0
- package/lib/ssg-D_StqyTO.js +389 -0
- package/lib/ssg.d.ts +2 -0
- package/lib/ssg.js +2 -0
- package/lib/stream-CJ_0BMG2.js +88 -0
- package/lib/stream-Oxo9JHC6.d.ts +34 -0
- package/lib/streaming-CL2i3hX_.js +96 -0
- package/lib/streaming.d.ts +23 -0
- package/lib/streaming.js +2 -0
- package/lib/testing-DnLmBGle.js +17 -0
- package/lib/testing.d.ts +10 -0
- package/lib/testing.js +2 -0
- package/lib/timeout-Bib1sxFc.js +42 -0
- package/lib/timeout.d.ts +30 -0
- package/lib/timeout.js +2 -0
- package/lib/timing-CkkBmV23.js +183 -0
- package/lib/timing.d.ts +130 -0
- package/lib/timing.js +2 -0
- package/lib/tiny.d.ts +8 -0
- package/lib/tiny.js +15 -0
- package/lib/trailing-slash-qJLAJrAH.js +85 -0
- package/lib/trailing-slash.d.ts +91 -0
- package/lib/trailing-slash.js +2 -0
- package/lib/transpile-Bc6rZPK-.js +105 -0
- package/lib/trie-router-DhF3wn5_.js +146 -0
- package/lib/types-Zy1OzMX7.d.ts +29 -0
- package/lib/types-akvg9vbH.d.ts +40 -0
- package/lib/types-cu7acft5.d.ts +195 -0
- package/lib/types-nO2Jov17.d.ts +114 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.js +4 -0
- package/lib/upgrade-hub-7og-sHcQ.d.ts +138 -0
- package/lib/upgrade-hub-B4hca91Y.js +1554 -0
- package/lib/url-Cyyh7Fiw.js +197 -0
- package/lib/utils/accept.d.ts +9 -0
- package/lib/utils/accept.js +2 -0
- package/lib/utils/basic-auth.d.ts +8 -0
- package/lib/utils/basic-auth.js +2 -0
- package/lib/utils/body.d.ts +2 -0
- package/lib/utils/body.js +2 -0
- package/lib/utils/buffer.d.ts +19 -0
- package/lib/utils/buffer.js +2 -0
- package/lib/utils/color.d.ts +24 -0
- package/lib/utils/color.js +2 -0
- package/lib/utils/compress.d.ts +2 -0
- package/lib/utils/compress.js +2 -0
- package/lib/utils/concurrent.d.ts +17 -0
- package/lib/utils/concurrent.js +2 -0
- package/lib/utils/constants.d.ts +7 -0
- package/lib/utils/constants.js +2 -0
- package/lib/utils/cookie.d.ts +2 -0
- package/lib/utils/cookie.js +2 -0
- package/lib/utils/crypto.d.ts +14 -0
- package/lib/utils/crypto.js +2 -0
- package/lib/utils/encode.d.ts +11 -0
- package/lib/utils/encode.js +2 -0
- package/lib/utils/filepath.d.ts +14 -0
- package/lib/utils/filepath.js +25 -0
- package/lib/utils/handler.d.ts +9 -0
- package/lib/utils/handler.js +2 -0
- package/lib/utils/headers.d.ts +2 -0
- package/lib/utils/headers.js +1 -0
- package/lib/utils/html.d.ts +2 -0
- package/lib/utils/html.js +2 -0
- package/lib/utils/http-status.d.ts +2 -0
- package/lib/utils/http-status.js +1 -0
- package/lib/utils/ipaddr.d.ts +56 -0
- package/lib/utils/ipaddr.js +2 -0
- package/lib/utils/jwt.d.ts +24 -0
- package/lib/utils/jwt.js +2 -0
- package/lib/utils/mime.d.ts +2 -0
- package/lib/utils/mime.js +2 -0
- package/lib/utils/stream.d.ts +2 -0
- package/lib/utils/stream.js +2 -0
- package/lib/utils/types.d.ts +2 -0
- package/lib/utils/types.js +1 -0
- package/lib/utils/url.d.ts +46 -0
- package/lib/utils/url.js +2 -0
- package/lib/utils-CYdUlhw1.js +125 -0
- package/lib/utils-CnUrxRO-.js +4 -0
- package/lib/validator-DkpCsiJC.js +65 -0
- package/lib/validator.d.ts +42 -0
- package/lib/validator.js +2 -0
- package/lib/vitest-binding-CctNu3jT.d.ts +15 -0
- package/lib/vitest-binding-CrH7rKg2.js +17 -0
- package/lib/websocket-Cy4jtqHv.js +56 -0
- package/lib/ws.d.ts +2 -0
- package/lib/ws.js +2 -0
- package/package.json +463 -3
- package/shared/AGENTS.core.md +84 -0
- package/shared/DEFAULTS.md +49 -0
- package/shared/library-history-versions.json +48 -0
- package/shared/library-history.json +786 -0
- package/shared/skills/acryl-add-ui/SKILL.md +19 -0
- package/shared/skills/acryl-app/SKILL.md +13 -0
- package/shared/skills/acryl-build-plugin/SKILL.md +22 -0
- package/shared/skills/acryl-change-plugin/SKILL.md +14 -0
- package/shared/skills/acryl-diagnose-plugin/SKILL.md +13 -0
- package/shared/skills/acryl-fix-plugin/SKILL.md +13 -0
- package/shared/skills/acryl-remove-plugin/SKILL.md +12 -0
- package/shared/skills/acryl-share-plugin/SKILL.md +16 -0
- package/shared/skills/cordis-plugin/SKILL.md +26 -0
- package/templates/agent/.gitattributes +2 -0
- package/templates/agent/AGENTS.md +20 -0
- package/templates/agent/Dockerfile +15 -0
- package/templates/agent/README.md +52 -0
- package/templates/agent/blend.yaml +71 -0
- package/templates/agent/dockerignore +3 -0
- package/templates/agent/gitignore +6 -0
- package/templates/agent/package.json +31 -0
- package/templates/agent/src/app.ts +293 -0
- package/templates/agent/src/frame.ts +17 -0
- package/templates/agent/src/main.ts +27 -0
- package/templates/agent/src/routes.ts +163 -0
- package/templates/agent/template.json +22 -0
- package/templates/agent/test/agent.test.ts +51 -0
- package/templates/agent/test/app.test.ts +270 -0
- package/templates/agent/test/builder.test.ts +210 -0
- package/templates/agent/test/model.test.ts +94 -0
- package/templates/agent/tsconfig.json +68 -0
- package/templates/blank/.gitattributes +2 -0
- package/templates/blank/AGENTS.md +6 -0
- package/templates/blank/README.md +26 -0
- package/templates/blank/blend.yaml +37 -0
- package/templates/blank/gitignore +6 -0
- package/templates/blank/package.json +31 -0
- package/templates/blank/src/about.tsx +14 -0
- package/templates/blank/src/app.ts +160 -0
- package/templates/blank/src/door.ts +7 -0
- package/templates/blank/src/first-page.ts +5 -0
- package/templates/blank/src/frame.ts +17 -0
- package/templates/blank/src/main.ts +20 -0
- package/templates/blank/src/routes.ts +79 -0
- package/templates/blank/template.json +15 -0
- package/templates/blank/test/app.test.ts +177 -0
- package/templates/blank/tsconfig.json +19 -0
- package/templates/chat/.gitattributes +2 -0
- package/templates/chat/AGENTS.md +16 -0
- package/templates/chat/blend.yaml +36 -0
- package/templates/chat/gitignore +9 -0
- package/templates/chat/migrations/001-chat.sql +12 -0
- package/templates/chat/package.json +35 -0
- package/templates/chat/src/access.ts +110 -0
- package/templates/chat/src/app.ts +165 -0
- package/templates/chat/src/chat-app.ts +120 -0
- package/templates/chat/src/client/chat.tsx +117 -0
- package/templates/chat/src/client/tsconfig.json +26 -0
- package/templates/chat/src/db.ts +43 -0
- package/templates/chat/src/door.ts +7 -0
- package/templates/chat/src/frame.ts +17 -0
- package/templates/chat/src/llm.ts +48 -0
- package/templates/chat/src/main.ts +23 -0
- package/templates/chat/src/page.tsx +42 -0
- package/templates/chat/src/routes.ts +29 -0
- package/templates/chat/src/runtime.ts +23 -0
- package/templates/chat/template.json +15 -0
- package/templates/chat/test/chat.test.ts +322 -0
- package/templates/chat/test/server.test.ts +92 -0
- package/templates/chat/tsconfig.json +20 -0
- package/templates/nodejs/.gitattributes +2 -0
- package/templates/nodejs/AGENTS.md +9 -0
- package/templates/nodejs/blend.yaml +33 -0
- package/templates/nodejs/gitignore +6 -0
- package/templates/nodejs/package.json +32 -0
- package/templates/nodejs/src/app.ts +158 -0
- package/templates/nodejs/src/client/counter.tsx +12 -0
- package/templates/nodejs/src/client/tsconfig.json +26 -0
- package/templates/nodejs/src/door.ts +7 -0
- package/templates/nodejs/src/frame.ts +17 -0
- package/templates/nodejs/src/main.ts +20 -0
- package/templates/nodejs/src/page.tsx +29 -0
- package/templates/nodejs/src/routes.ts +59 -0
- package/templates/nodejs/template.json +14 -0
- package/templates/nodejs/test/app.test.ts +112 -0
- package/templates/nodejs/test/server.test.ts +97 -0
- package/templates/nodejs/tsconfig.json +20 -0
- package/templates/notes/.gitattributes +2 -0
- package/templates/notes/AGENTS.md +26 -0
- package/templates/notes/blend.yaml +36 -0
- package/templates/notes/gitignore +9 -0
- package/templates/notes/migrations/001-notes.sql +18 -0
- package/templates/notes/package.json +35 -0
- package/templates/notes/src/app.ts +165 -0
- package/templates/notes/src/auth.ts +57 -0
- package/templates/notes/src/client/counter.tsx +21 -0
- package/templates/notes/src/client/tsconfig.json +26 -0
- package/templates/notes/src/db.ts +50 -0
- package/templates/notes/src/door.ts +7 -0
- package/templates/notes/src/frame.ts +17 -0
- package/templates/notes/src/main.ts +23 -0
- package/templates/notes/src/notes-app.ts +212 -0
- package/templates/notes/src/routes.ts +21 -0
- package/templates/notes/src/runtime.ts +23 -0
- package/templates/notes/src/schema.ts +38 -0
- package/templates/notes/src/views.tsx +145 -0
- package/templates/notes/template.json +15 -0
- package/templates/notes/test/notes.test.ts +318 -0
- package/templates/notes/test/server.test.ts +92 -0
- package/templates/notes/tsconfig.json +20 -0
- package/templates/todo/.gitattributes +2 -0
- package/templates/todo/AGENTS.md +5 -0
- package/templates/todo/README.md +27 -0
- package/templates/todo/blend.yaml +28 -0
- package/templates/todo/gitignore +6 -0
- package/templates/todo/package.json +31 -0
- package/templates/todo/src/app.ts +145 -0
- package/templates/todo/src/door.ts +7 -0
- package/templates/todo/src/frame.ts +17 -0
- package/templates/todo/src/main.ts +21 -0
- package/templates/todo/src/page.ts +35 -0
- package/templates/todo/src/todo.ts +137 -0
- package/templates/todo/template.json +14 -0
- package/templates/todo/test/todo.test.ts +228 -0
- package/templates/todo/tsconfig.json +19 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { n as UpgradeHub, t as UpgradeEmitter } from "../upgrade-hub-B4hca91Y.js";
|
|
2
|
+
import "../src-6T1gCSq3.js";
|
|
3
|
+
import { Readable } from "node:stream";
|
|
4
|
+
import { Service } from "@deepseek-ai/cordis";
|
|
5
|
+
import { pipeline } from "node:stream/promises";
|
|
6
|
+
//#region ../../../plugins/router-http/src/bridge.ts
|
|
7
|
+
const FALLBACK_ORIGIN = "http://localhost";
|
|
8
|
+
/** Build the Web `Request` for an incoming message. The body, when the method has one, is streamed, not buffered. */
|
|
9
|
+
function toRequest(req, signal) {
|
|
10
|
+
let url;
|
|
11
|
+
try {
|
|
12
|
+
url = new URL(req.url ?? "/", `http://${req.headers.host ?? "localhost"}`);
|
|
13
|
+
} catch {
|
|
14
|
+
url = new URL(req.url ?? "/", FALLBACK_ORIGIN);
|
|
15
|
+
}
|
|
16
|
+
const headers = new Headers();
|
|
17
|
+
for (const [key, value] of Object.entries(req.headers)) {
|
|
18
|
+
if (value === void 0) continue;
|
|
19
|
+
if (Array.isArray(value)) for (const item of value) headers.append(key, item);
|
|
20
|
+
else headers.set(key, value);
|
|
21
|
+
}
|
|
22
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
23
|
+
if (method === "GET" || method === "HEAD") return new Request(url, {
|
|
24
|
+
method,
|
|
25
|
+
headers,
|
|
26
|
+
signal
|
|
27
|
+
});
|
|
28
|
+
const init = {
|
|
29
|
+
method,
|
|
30
|
+
headers,
|
|
31
|
+
signal,
|
|
32
|
+
body: Readable.toWeb(req),
|
|
33
|
+
duplex: "half"
|
|
34
|
+
};
|
|
35
|
+
return new Request(url, init);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Write a Web `Response` to the node response: status, headers (repeated `set-cookie` kept separate) and the streamed body.
|
|
39
|
+
* A client that disconnects mid-stream ends the copy quietly; the caller's abort signal is what stops the handler.
|
|
40
|
+
*/
|
|
41
|
+
async function sendResponse(res, response, method) {
|
|
42
|
+
const headers = {};
|
|
43
|
+
response.headers.forEach((value, key) => {
|
|
44
|
+
if (key !== "set-cookie") headers[key] = value;
|
|
45
|
+
});
|
|
46
|
+
const cookies = response.headers.getSetCookie();
|
|
47
|
+
if (cookies.length > 0) headers["set-cookie"] = cookies;
|
|
48
|
+
res.writeHead(response.status, headers);
|
|
49
|
+
res.flushHeaders();
|
|
50
|
+
if (response.body === null || method === "HEAD") {
|
|
51
|
+
res.end();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
await pipeline(Readable.fromWeb(response.body), res);
|
|
56
|
+
} catch {
|
|
57
|
+
if (!res.writableEnded) res.destroy();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region ../../../plugins/router-http/src/serve.ts
|
|
62
|
+
/** How long a refusal waits for a request body the handler never read. */
|
|
63
|
+
const REQUEST_BODY_SETTLE_MS = 1e3;
|
|
64
|
+
/**
|
|
65
|
+
* Read and discard a request body the handler left unread (a guard's 403, a 415, a body over its limit), so the client can finish sending and
|
|
66
|
+
* read the answer. Ending a response while request data is still arriving makes Node close the socket with that data pending, and the peer sees a
|
|
67
|
+
* reset instead of the answer: reliably on Windows (the workspace git worktree test's read ECONNRESET) and on other systems under load. Bounded:
|
|
68
|
+
* a client that stops sending waits at most `ms`, then loses the socket as before.
|
|
69
|
+
*/
|
|
70
|
+
function settleRequestBody(req, ms = REQUEST_BODY_SETTLE_MS) {
|
|
71
|
+
if (req.readableEnded || req.destroyed) return Promise.resolve();
|
|
72
|
+
return new Promise((resolve) => {
|
|
73
|
+
let timer;
|
|
74
|
+
const done = () => {
|
|
75
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
76
|
+
req.off("end", done);
|
|
77
|
+
req.off("close", done);
|
|
78
|
+
req.off("error", done);
|
|
79
|
+
resolve();
|
|
80
|
+
};
|
|
81
|
+
timer = setTimeout(done, ms);
|
|
82
|
+
timer.unref?.();
|
|
83
|
+
req.once("end", done);
|
|
84
|
+
req.once("close", done);
|
|
85
|
+
req.once("error", done);
|
|
86
|
+
req.resume();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Serve one node request through the router and write the result. The request's abort signal fires when the client
|
|
91
|
+
* disconnects before the response finished; the socket's peer address and local port travel as connection info, never in the request.
|
|
92
|
+
*/
|
|
93
|
+
async function serve(router, req, res) {
|
|
94
|
+
const controller = new AbortController();
|
|
95
|
+
res.once("close", () => {
|
|
96
|
+
if (!res.writableFinished) controller.abort();
|
|
97
|
+
});
|
|
98
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
99
|
+
let response;
|
|
100
|
+
try {
|
|
101
|
+
response = await router.fetch(toRequest(req, controller.signal), {
|
|
102
|
+
remoteAddress: req.socket.remoteAddress,
|
|
103
|
+
localPort: req.socket.localPort
|
|
104
|
+
});
|
|
105
|
+
} catch {
|
|
106
|
+
response = new Response("Internal Server Error", { status: 500 });
|
|
107
|
+
}
|
|
108
|
+
if (method !== "GET" && method !== "HEAD") await settleRequestBody(req);
|
|
109
|
+
await sendResponse(res, response, method);
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region ../../../plugins/router-http/src/index.ts
|
|
113
|
+
/** Stable Cordis plugin name, equal to the package name and the Loader row id. */
|
|
114
|
+
const name = "acryl-router-http";
|
|
115
|
+
/** Hard requirements: both services must exist, otherwise this plugin stays PENDING. */
|
|
116
|
+
const inject = ["router", "webServer"];
|
|
117
|
+
const PREFIX_PATTERN = /^\/[A-Za-z0-9._~\-/]*[A-Za-z0-9._~-]$/;
|
|
118
|
+
var RouterHttp = class extends Service {
|
|
119
|
+
router;
|
|
120
|
+
web;
|
|
121
|
+
hub;
|
|
122
|
+
/** One upgrade helper per calling context: a fresh wrapper per call made every service event look like an owner change. */
|
|
123
|
+
upgradeHelpers = /* @__PURE__ */ new WeakMap();
|
|
124
|
+
/** A stable identity for this service instance's hub: a caller that must recognize the same owner across calls keys on this, not on a helper. */
|
|
125
|
+
hubIdentity = {};
|
|
126
|
+
/** The adapter's own context: the hub lives as long as the adapter, whichever plugin asked for it first (`this.ctx` is the caller's). */
|
|
127
|
+
home;
|
|
128
|
+
upgradesIn = new UpgradeEmitter();
|
|
129
|
+
constructor(ctx) {
|
|
130
|
+
super(ctx, "routerHttp");
|
|
131
|
+
this.home = ctx;
|
|
132
|
+
this.router = ctx.router;
|
|
133
|
+
this.web = ctx.get("webServer");
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Serve `prefix` and everything below it through the router. Returns a remover; the mount also goes away when the
|
|
137
|
+
* calling plugin unloads. A prefix another route already claims throws, as the webServer treats it as misconfiguration.
|
|
138
|
+
* `options.upgrade` names the exact paths that may be upgraded to a WebSocket: each must be inside the prefix, and each is one
|
|
139
|
+
* exact-path upgrade route of the web server, removed with the mount. No other path of the mount accepts an upgrade.
|
|
140
|
+
*/
|
|
141
|
+
mount(prefix, options = {}) {
|
|
142
|
+
if (!PREFIX_PATTERN.test(prefix)) throw new TypeError(`@acryldev/router-http: "${prefix}" is not a mountable path prefix`);
|
|
143
|
+
const upgrade = options.upgrade ?? [];
|
|
144
|
+
for (const path of upgrade) if (!PREFIX_PATTERN.test(path) || !(path === prefix || path.startsWith(`${prefix}/`))) throw new TypeError(`@acryldev/router-http: the upgrade path "${path}" is not inside the prefix "${prefix}"`);
|
|
145
|
+
if (upgrade.length > 0 && this.web.registerUpgrade === void 0) throw new TypeError("@acryldev/router-http: this web server cannot take WebSocket upgrades (it has no registerUpgrade)");
|
|
146
|
+
const removers = [];
|
|
147
|
+
try {
|
|
148
|
+
if (upgrade.length > 0) this.ensureHub();
|
|
149
|
+
for (const path of upgrade) removers.push(this.web.registerUpgrade({
|
|
150
|
+
path,
|
|
151
|
+
handler: (req, socket, head) => {
|
|
152
|
+
this.upgradesIn.emit("upgrade", req, socket, head);
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
removers.push(this.web.register({
|
|
156
|
+
kind: "prefix",
|
|
157
|
+
path: prefix,
|
|
158
|
+
handler: (req, res) => serve(this.router, req, res)
|
|
159
|
+
}));
|
|
160
|
+
} catch (error) {
|
|
161
|
+
for (const remove of removers) remove();
|
|
162
|
+
throw error;
|
|
163
|
+
}
|
|
164
|
+
const remove = () => {
|
|
165
|
+
for (const undo of removers.splice(0)) undo();
|
|
166
|
+
};
|
|
167
|
+
this.ctx.effect(() => () => {
|
|
168
|
+
remove();
|
|
169
|
+
}, `@acryldev/router-http: mount ${prefix}`);
|
|
170
|
+
return remove;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* `upgradeWebSocket` for the calling plugin: the sockets its routes accept are closed with 1001 when it unloads. Needs the `ws` package.
|
|
174
|
+
* The route must be on a path the plugin mounted with `upgrade: [path]`.
|
|
175
|
+
*/
|
|
176
|
+
/** Stable for this service's lifetime; a re-provided adapter has a new one, which is how a caller sees a new owner. */
|
|
177
|
+
hubToken() {
|
|
178
|
+
return this.hubIdentity;
|
|
179
|
+
}
|
|
180
|
+
upgrades() {
|
|
181
|
+
const owner = this.ctx;
|
|
182
|
+
const cached = this.upgradeHelpers.get(owner);
|
|
183
|
+
if (cached !== void 0) return cached;
|
|
184
|
+
const created = this.ensureHub().upgradeWebSocketFor(owner);
|
|
185
|
+
this.upgradeHelpers.set(owner, created);
|
|
186
|
+
return created;
|
|
187
|
+
}
|
|
188
|
+
/** How many WebSocket connections are open now. */
|
|
189
|
+
get sockets() {
|
|
190
|
+
return this.hub?.size ?? 0;
|
|
191
|
+
}
|
|
192
|
+
ensureHub() {
|
|
193
|
+
if (!this.hub) {
|
|
194
|
+
const hub = new UpgradeHub();
|
|
195
|
+
hub.attach(this.upgradesIn, this.router);
|
|
196
|
+
this.hub = hub;
|
|
197
|
+
this.home.effect(() => () => hub.close(), "@acryldev/router-http: WebSocket hub");
|
|
198
|
+
}
|
|
199
|
+
return this.hub;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
function apply(ctx) {
|
|
203
|
+
new RouterHttp(ctx);
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
export { RouterHttp, apply, inject, name, sendResponse, serve, toRequest };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { B as NotFoundHandler, L as MiddlewareHandler, O as Handler, Q as ValidationTargets, V as NotFoundResponse, X as ToSchema, Y as Schema, Z as TypedResponse, a as ExecutionContext, j as Input, n as ContextRenderer, r as ContextVariableMap, s as AcrylRequest, t as Context, v as Env, y as ErrorHandler, z as Next } from "../context-Ca3uX_bh.js";
|
|
2
|
+
import { c as StatusCode, n as ContentfulStatusCode } from "../http-status-uBFmbzzM.js";
|
|
3
|
+
import { a as getConnInfo, i as connectionOf, n as RouterBindings, r as RouterEnv, t as ConnectionInfo } from "../connection-CzRPq1RP.js";
|
|
4
|
+
import { t as Acryl } from "../app-DGqSNBSd.js";
|
|
5
|
+
import { a as TrailingSlash, i as RouterHttpService, n as MountableApp, o as apply, r as Router, s as name, t as Config } from "../index-D1HlwHSL.js";
|
|
6
|
+
import { t as HTTPException } from "../http-exception-Cm8QD9Fl.js";
|
|
7
|
+
export { Acryl, type AcrylRequest, Config, type ConnectionInfo, type ContentfulStatusCode, Context, type ContextRenderer, type ContextVariableMap, type Env, type ErrorHandler, type ExecutionContext, HTTPException, type Handler, type Input, type MiddlewareHandler, type MountableApp, type Next, type NotFoundHandler, type NotFoundResponse, Router, type RouterBindings, type RouterEnv, type RouterHttpService, type Schema, type StatusCode, type ToSchema, type TrailingSlash, type TypedResponse, type ValidationTargets, apply, connectionOf, getConnInfo, name };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { t as HTTPException } from "../http-exception-BKMYq4x6.js";
|
|
2
|
+
import { t as Context } from "../context-BVI2RzT7.js";
|
|
3
|
+
import { t as Acryl } from "../app-CM-rDcw6.js";
|
|
4
|
+
import { n as getConnInfo, t as connectionOf } from "../connection-DLPx5pxD.js";
|
|
5
|
+
import { i as name, n as Router, r as apply, t as Config } from "../src-BycZ1HUQ.js";
|
|
6
|
+
export { Acryl, Config, Context, HTTPException, Router, apply, connectionOf, getConnInfo, name };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
//#region ../../../plugins/state/src/react.ts
|
|
3
|
+
/**
|
|
4
|
+
* The React binding: one hook that reads a cell and re-renders when it changes. `useSyncExternalStore` is React's own
|
|
5
|
+
* contract for exactly this, so it is tear-free under concurrent rendering. Import from `@acryldev/state/react`.
|
|
6
|
+
*/
|
|
7
|
+
function useCell(cell) {
|
|
8
|
+
return useSyncExternalStore((listener) => cell.subscribe(listener), cell.get, cell.get);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useCell };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { t as Context$1 } from "../context-Ca3uX_bh.js";
|
|
2
|
+
import { a as createDerived, i as createCell, n as Listener, r as ReadonlyCell, t as Cell } from "../cell-wEBQA3d0.js";
|
|
3
|
+
import { Context, Service } from "@deepseek-ai/cordis";
|
|
4
|
+
|
|
5
|
+
//#region ../../../plugins/state/src/service.d.ts
|
|
6
|
+
declare module '@deepseek-ai/cordis' {
|
|
7
|
+
interface Context {
|
|
8
|
+
state: State;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** Stable Cordis plugin name, equal to the package name and the Loader row id. */
|
|
12
|
+
declare const name = "acryl-state";
|
|
13
|
+
declare class State extends Service {
|
|
14
|
+
private readonly cells;
|
|
15
|
+
constructor(ctx: Context);
|
|
16
|
+
private claim;
|
|
17
|
+
private report;
|
|
18
|
+
/** Create a writable cell owned by the calling plugin. The key must be new. */
|
|
19
|
+
cell<T>(key: string, initial: T): Cell<T>;
|
|
20
|
+
/** Create a read-only cell computed from other cells, owned by the calling plugin. */
|
|
21
|
+
derive<D extends readonly ReadonlyCell<unknown>[], T>(key: string, inputs: D, compute: (...values: { [K in keyof D]: D[K] extends ReadonlyCell<infer V> ? V : never }) => T): ReadonlyCell<T>;
|
|
22
|
+
/** A cell by key, if one is live. */
|
|
23
|
+
find<T = unknown>(key: string): ReadonlyCell<T> | undefined;
|
|
24
|
+
keys(): string[];
|
|
25
|
+
/**
|
|
26
|
+
* The current value of `key` as a server-sent event stream: the value now, then one event per change, until the client cancels or the router
|
|
27
|
+
* is disposed (both abort the stream). A comment line goes out every 15 seconds so proxies and browsers keep an idle stream open. A string value travels as it is; with `json`
|
|
28
|
+
* (the `?json=1` of the browser client) every value is JSON, so `"12"` and `12` can be told apart.
|
|
29
|
+
*/
|
|
30
|
+
stream(key: string, c: Context$1, json?: boolean): Response | undefined;
|
|
31
|
+
}
|
|
32
|
+
declare function apply(ctx: Context): void;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { type Cell, type Listener, type ReadonlyCell, State, apply, createCell, createDerived, name };
|