void 0.10.13 → 0.20.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/AGENTS_TEMPLATE.md +6 -0
- package/{skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md → LICENSE} +1 -1
- package/README.md +34 -8
- package/dist/{auth-qgMlYp7Z.d.mts → auth-DkcFflXV.d.mts} +10 -11
- package/dist/auth-W9WII-mN.mjs +630 -0
- package/dist/{auth-cmd-BqsdZJp5.mjs → auth-cmd-CAH62yDU.mjs} +4 -3
- package/dist/{auth-migrations-BTZ-ATvQ.mjs → auth-migrations-9vif1uj8.mjs} +53 -12
- package/dist/{better-auth-shared-BQooDxbw.mjs → better-auth-shared-CYw1T3k4.mjs} +7 -10
- package/dist/{better-auth-shared-DealXecJ.d.mts → better-auth-shared-DSCeohOK.d.mts} +10 -5
- package/dist/{build-cmd-Bujrv5q-.mjs → build-cmd-CJvZvPQO.mjs} +6 -4
- package/dist/{cache-C11V8Fxq.mjs → cache-BlNeQjuP.mjs} +9 -5
- package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-CmlAZ9P6.mjs} +3 -2
- package/dist/cf-access-AJ1ehiFR.mjs +42 -0
- package/dist/cf-access-DsSsZUPr.mjs +67 -0
- package/dist/cli/cli.d.mts +1 -1
- package/dist/cli/cli.mjs +1735 -165
- package/dist/cli/env-schema-probe.d.mts +48 -61
- package/dist/cli/env-schema-probe.mjs +10 -58
- package/dist/{client-Gb71-XkG.mjs → client-Clirrol3.mjs} +120 -463
- package/dist/cloudflare-auth-B1QtTO1b.mjs +217 -0
- package/dist/cloudflare-cmd-B6_OZx2V.mjs +62 -0
- package/dist/cloudflare-connect-j5D4hhrG.mjs +56 -0
- package/dist/cloudflare-operations-CPTpRW6d.mjs +566 -0
- package/dist/{config-qHGgPuWT.mjs → config-BQFq7QvD.mjs} +75 -41
- package/dist/{config-CutEMNGJ.mjs → config-NOG_U1aK.mjs} +10 -15
- package/dist/connect-C04Wdy_h.mjs +79 -0
- package/dist/{create-project-DsYvl3TB.mjs → create-project-ChGZ1DFd.mjs} +26 -16
- package/dist/database-provider.d.mts +21 -0
- package/dist/database-provider.mjs +6 -0
- package/dist/{db-C0i0sYMS.mjs → db-D2d_mUsB.mjs} +612 -117
- package/dist/{delete-mh6p-zkQ.mjs → delete-D8GigDk8.mjs} +9 -6
- package/dist/{deploy-jBJT1fUT.mjs → deploy-iXZ3F0N6.mjs} +3252 -1995
- package/dist/dev-inbox-DkgRWLkW.mjs +307 -0
- package/dist/{discover-CJHyvYfR.mjs → discover-xvfrgJeo.mjs} +3 -3
- package/dist/{magic-string.es-ZQjdJFFn.mjs → dist-BR1quN_w.mjs} +570 -216
- package/dist/{dist-DaKKDf8D.mjs → dist-BrsS7cai.mjs} +17 -2
- package/dist/{dist-BuiRJkTd.mjs → dist-m40_XgNh.mjs} +48 -33
- package/dist/{domain-DiaNQbrl.mjs → domain-B1VmoSr0.mjs} +41 -4
- package/dist/dotenv-VQxupEUv.mjs +181 -0
- package/dist/edge.d.mts +2 -0
- package/dist/edge.mjs +2 -0
- package/dist/email-Ce6SQq-i.mjs +182 -0
- package/dist/email-uKyQYUVY.mjs +1016 -0
- package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
- package/dist/env-BcQzYgoG.mjs +73 -0
- package/dist/env-D4Emu-M_.mjs +95 -0
- package/dist/env-helpers-CyKtOBpj.d.mts +22 -0
- package/dist/env-public-D_6u46fX.d.mts +135 -0
- package/dist/{env-types-QBj-ndax.mjs → env-types-BNPhro-M.mjs} +2 -2
- package/dist/{env-validation-Dea3v3ej.mjs → env-validation-ENpMy6Ez.mjs} +68 -122
- package/dist/{gen-BzXf3Jh2.mjs → gen-DI2YwdBM.mjs} +70 -15
- package/dist/generate-RTK8_kK1.mjs +47 -0
- package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-xItS5Zwf.mjs} +39 -31
- package/dist/{handler-Cjh8uM3Y.d.mts → handler-D1hLsObx.d.mts} +124 -122
- package/dist/{head-nmvOgFjd.d.mts → head-Do8P4puT.d.mts} +9 -8
- package/dist/{headers-ChAADPQu.mjs → headers-D8QfRX9Y.mjs} +12 -10
- package/dist/inbound-2d0zi2yS.mjs +706 -0
- package/dist/inbound-afAcWeQ9.d.mts +363 -0
- package/dist/index.d.mts +61 -34
- package/dist/index.mjs +1012 -293
- package/dist/{init-7JCAcKNQ.mjs → init-BD-9THgn.mjs} +329 -271
- package/dist/link-RMdgjF1v.mjs +52 -0
- package/dist/{list-CPwFDZ_c.mjs → list-3F52R_yO.mjs} +37 -5
- package/dist/{runner-kapo9aPs.mjs → local-d1-D2I6Ox5F.mjs} +116 -6
- package/dist/{login-BT3H8PN3.mjs → login-pV69H-ZO.mjs} +17 -15
- package/dist/{logs-Bt313ax7.mjs → logs-DFHHD6wE.mjs} +16 -2
- package/dist/mime-BJD7d_qL.mjs +1216 -0
- package/dist/neon-DHwd2zvC.mjs +54 -0
- package/dist/{node-pRg81HqV.mjs → node-Dk3H2jmU.mjs} +29 -8
- package/dist/operator-cmd-DYWRbWUA.mjs +348 -0
- package/dist/{agents-CtgBYqld.mjs → output-tFQLLj26.mjs} +676 -211
- package/dist/{package-json-Cx1osYo6.mjs → package-json-CPoWX79C.mjs} +1 -1
- package/dist/pages/client.d.mts +43 -41
- package/dist/pages/client.mjs +40 -33
- package/dist/pages/head-client.d.mts +10 -12
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +37 -14
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +25 -27
- package/dist/pages/islands-plugin.mjs +6 -4
- package/dist/pages/prefetch.d.mts +6 -7
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -1
- package/dist/pages/serialize.d.mts +7 -8
- package/dist/platform-cmd-DxJ2FRwR.mjs +123 -0
- package/dist/platform-domain-ChvbJkdy.mjs +228 -0
- package/dist/platform-lifecycle-DN4MzJF_.mjs +4450 -0
- package/dist/platform-management-Db2PXw0B.mjs +698 -0
- package/dist/platform-recovery-C_YO-tIs.mjs +99 -0
- package/dist/{plugin-inference-DMeavIJ6.mjs → plugin-inference-BDRfZngg.mjs} +35 -19
- package/dist/prepare-BfJvFUtJ.mjs +14 -0
- package/dist/{prepare-BvvgAz-3.mjs → prepare-CBetXvsN.mjs} +15 -24
- package/dist/{preset-BjyR3lzz.mjs → preset-lAy0B0BQ.mjs} +25 -212
- package/dist/{project-cmd-D_w-4w5B.mjs → project-cmd-Mo0V9yKS.mjs} +25 -12
- package/dist/{project-paths-BQd7OmIo.mjs → project-paths-SK8nMHPp.mjs} +3 -1
- package/dist/{project-tsconfig-B-QtXjLQ.mjs → project-tsconfig-Ql2XsSQp.mjs} +2 -2
- package/dist/{protocol-Bnb0LFp3.d.mts → protocol-C-pqYJjE.d.mts} +3 -4
- package/dist/{provision-CPx2ZxsH.mjs → provision-Blnstcm2.mjs} +78 -45
- package/dist/r2-conditions-D1Wk8i7b.mjs +30 -0
- package/dist/{requests-B8sZxaFM.mjs → requests-BcKOVpRg.mjs} +5 -3
- package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
- package/dist/rollback-Bx85-0xh.mjs +166 -0
- package/dist/{rolldown-runtime-DJK8HYOj.mjs → rolldown-runtime-rQ84J-ij.mjs} +1 -1
- package/dist/{route-types-z1jtHEi_.mjs → route-types-Da-DpyUp.mjs} +77 -25
- package/dist/routes-stub.d.mts +22 -23
- package/dist/runner-mysql-7BPUNGmL.mjs +61 -0
- package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-BkEza-dX.mjs} +18 -6
- package/dist/runtime/ai.d.mts +21 -14
- package/dist/runtime/ai.mjs +5 -4
- package/dist/runtime/auth-client-react.d.mts +3 -5
- package/dist/runtime/auth-client-solid.d.mts +3 -5
- package/dist/runtime/auth-client-svelte.d.mts +3 -5
- package/dist/runtime/auth-client-vue.d.mts +3 -5
- package/dist/runtime/auth-client.d.mts +3 -5
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +10 -0
- package/dist/runtime/better-auth-mysql.mjs +49 -0
- package/dist/runtime/better-auth-pg.d.mts +8 -9
- package/dist/runtime/better-auth-pg.mjs +2 -2
- package/dist/runtime/better-auth.d.mts +8 -9
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/db-mysql.d.mts +2 -0
- package/dist/runtime/db-mysql.mjs +1 -0
- package/dist/runtime/db.d.mts +10 -11
- package/dist/runtime/durable.d.mts +47 -0
- package/dist/runtime/durable.mjs +146 -0
- package/dist/runtime/email/testing.d.mts +112 -0
- package/dist/runtime/email/testing.mjs +283 -0
- package/dist/runtime/email.d.mts +30 -0
- package/dist/runtime/email.mjs +573 -0
- package/dist/runtime/env-helpers.d.mts +2 -2
- package/dist/runtime/env-helpers.mjs +5 -42
- package/dist/runtime/env-public-client.d.mts +10 -11
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +104 -49
- package/dist/runtime/env.d.mts +19 -18
- package/dist/runtime/env.mjs +15 -2
- package/dist/runtime/fetch-stream.d.mts +20 -21
- package/dist/runtime/fetch.d.mts +15 -16
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/isr.d.mts +21 -22
- package/dist/runtime/isr.mjs +26 -8
- package/dist/runtime/kv.d.mts +9 -10
- package/dist/runtime/live-client.d.mts +5 -7
- package/dist/runtime/live-client.mjs +9 -7
- package/dist/runtime/live-server.d.mts +4 -5
- package/dist/runtime/live.d.mts +22 -24
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +16 -17
- package/dist/runtime/migration-handler-mysql.d.mts +4 -0
- package/dist/runtime/migration-handler-mysql.mjs +81 -0
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler.d.mts +5 -6
- package/dist/runtime/migration-handler.mjs +4 -3
- package/dist/runtime/queues.d.mts +3 -4
- package/dist/runtime/queues.mjs +2 -1
- package/dist/runtime/remote/binding-handler.d.mts +10 -12
- package/dist/runtime/remote/binding-handler.mjs +24 -3
- package/dist/runtime/remote/index.d.mts +5 -6
- package/dist/runtime/remote/index.mjs +21 -18
- package/dist/runtime/response.d.mts +10 -11
- package/dist/runtime/sandbox.d.mts +56 -55
- package/dist/runtime/sandbox.mjs +57 -49
- package/dist/runtime/schema-mysql.d.mts +1 -0
- package/dist/runtime/schema-mysql.mjs +2 -0
- package/dist/runtime/seed.d.mts +14 -9
- package/dist/runtime/sse-client.d.mts +6 -7
- package/dist/runtime/sse.d.mts +11 -12
- package/dist/runtime/storage.d.mts +3 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +12 -12
- package/dist/runtime/ws-server.mjs +32 -4
- package/dist/runtime/ws.d.mts +19 -21
- package/dist/{scan-ChWt4pX1.mjs → scan-BMH4rzlv.mjs} +42 -19
- package/dist/{scan-NU4xKGci.mjs → scan-CpK-57ug.mjs} +5 -4
- package/dist/{secret-Dt32J6RI.mjs → secret-ByhJ9AMl.mjs} +62 -5
- package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
- package/dist/sqlite-validation-BzKMWnO4.mjs +25 -0
- package/dist/{standard-schema-DJ0HW7QP.d.mts → standard-schema-Fo_vCAZh.d.mts} +6 -6
- package/dist/{subcommand-prompt-BzV8iQZo.mjs → subcommand-prompt-WfySCQ7S.mjs} +67 -48
- package/dist/sveltekit.d.mts +12 -11
- package/dist/sveltekit.mjs +1 -1
- package/dist/types-BAp5AEBU.d.mts +79 -0
- package/dist/types-CKWnYgfy.d.mts +1 -0
- package/dist/{validate-Cw_RLeTj.mjs → validate-tBBN_dXH.mjs} +4 -3
- package/dist/wrangler--imS8n0d.mjs +1796 -0
- package/dist/{yarn-pnp-DJn3SAHF.mjs → yarn-pnp-DxSInkzL.mjs} +1 -1
- package/package.json +79 -65
- package/schema.json +22 -3
- package/skills/void/SKILL.md +59 -2
- package/skills/void/docs/guide/ai.md +32 -14
- package/skills/void/docs/guide/app-types.md +6 -6
- package/skills/void/docs/guide/auth.md +14 -16
- package/skills/void/docs/guide/database/d1.md +6 -0
- package/skills/void/docs/guide/database/mysql.md +60 -0
- package/skills/void/docs/guide/database/postgresql.md +14 -9
- package/skills/void/docs/guide/database.md +39 -26
- package/skills/void/docs/guide/deployment.md +99 -25
- package/skills/void/docs/guide/durable-state.md +140 -0
- package/skills/void/docs/guide/edge/headers.md +5 -5
- package/skills/void/docs/guide/edge/prerendering.md +2 -0
- package/skills/void/docs/guide/edge/revalidation.md +21 -6
- package/skills/void/docs/guide/edge/rewrites.md +18 -14
- package/skills/void/docs/guide/edge/static-assets.md +12 -10
- package/skills/void/docs/guide/email.md +640 -0
- package/skills/void/docs/guide/env-migration.md +109 -0
- package/skills/void/docs/guide/env-vars.md +70 -248
- package/skills/void/docs/guide/index.md +15 -17
- package/skills/void/docs/guide/jobs.md +8 -5
- package/skills/void/docs/guide/live.md +7 -15
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +8 -4
- package/skills/void/docs/guide/pages-routing/islands.md +3 -3
- package/skills/void/docs/guide/pages-routing/loaders.md +6 -4
- package/skills/void/docs/guide/pages-routing/overview.md +7 -7
- package/skills/void/docs/guide/platform-administration.md +212 -0
- package/skills/void/docs/guide/platform-development.md +264 -0
- package/skills/void/docs/guide/queues.md +10 -10
- package/skills/void/docs/guide/quickstart.md +46 -67
- package/skills/void/docs/guide/remote-dev.md +8 -6
- package/skills/void/docs/guide/sandboxes.md +33 -16
- package/skills/void/docs/guide/self-hosted-platform.md +553 -0
- package/skills/void/docs/guide/server-routing.md +5 -5
- package/skills/void/docs/guide/sse.md +4 -4
- package/skills/void/docs/guide/ssg.md +5 -3
- package/skills/void/docs/guide/storage.md +2 -2
- package/skills/void/docs/guide/websockets.md +15 -7
- package/skills/void/docs/index.md +3 -3
- package/skills/void/docs/integrations/agents.md +6 -64
- package/skills/void/docs/integrations/cloudflare.md +165 -146
- package/skills/void/docs/integrations/frameworks/analog.md +4 -4
- package/skills/void/docs/integrations/frameworks/astro.md +5 -5
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -5
- package/skills/void/docs/integrations/frameworks/overview.md +3 -3
- package/skills/void/docs/integrations/frameworks/react-router.md +3 -3
- package/skills/void/docs/integrations/frameworks/sveltekit.md +3 -3
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +2 -2
- package/skills/void/docs/integrations/nodejs-bun-deno.md +11 -4
- package/skills/void/docs/reference/api.md +42 -6
- package/skills/void/docs/reference/cli.md +665 -160
- package/skills/void/docs/reference/config.md +67 -27
- package/skills/void/docs/reference/resource-inference.md +13 -9
- package/skills/void/docs/reference/structure.md +9 -11
- package/AGENT_PROMPT.md +0 -19
- package/dist/cf-access-Bqw81xAf.mjs +0 -22
- package/dist/env-CZy5MorI.mjs +0 -299
- package/dist/env-helpers-z4stu8uc.d.mts +0 -52
- package/dist/env-mask-Dd47NbR6.mjs +0 -90
- package/dist/env-public-BfiLcMBk.d.mts +0 -140
- package/dist/link-CdGHSIy-.mjs +0 -45
- package/dist/mcp-DoM3_nhd.mjs +0 -377
- package/dist/project-paths-GpziKeQQ.d.mts +0 -25
- package/dist/providers-BNKRacMr.d.mts +0 -7
- package/dist/proxy-D-3_D-Gl.mjs +0 -5
- package/dist/rollback-CkvTFXx5.mjs +0 -90
- package/dist/runtime/isr-cache.d.mts +0 -207
- package/dist/runtime/isr-cache.mjs +0 -523
- package/dist/types-lLjNE9Qp.d.mts +0 -51
- package/getting-started-prompt.txt +0 -28
- package/skills/void/command/void.md +0 -7
- package/skills/void/docs/integrations/auth-providers.md +0 -0
- package/skills/void/docs/integrations/payment-processors.md +0 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +0 -408
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +0 -5
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +0 -103
- package/skills/void/docs/node_modules/oxc-minify/README.md +0 -78
- package/skills/void/docs/node_modules/reka-ui/README.md +0 -80
- package/skills/void/docs/node_modules/vitepress/README.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +0 -49
- package/skills/void/docs/node_modules/vitepress/template/index.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +0 -85
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +0 -101
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +0 -19
- package/skills/void/docs/node_modules/void/CLAUDE.md +0 -221
- package/skills/void/docs/node_modules/void/README.md +0 -90
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +0 -685
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +0 -396
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +0 -219
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +0 -37
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +0 -189
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +0 -143
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +0 -1272
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +0 -19
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +0 -22
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +0 -153
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +0 -565
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +0 -127
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +0 -600
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +0 -386
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +0 -95
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +0 -58
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +0 -32
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +0 -99
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +0 -79
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +0 -44
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +0 -65
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +0 -403
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +0 -48
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +0 -85
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +0 -452
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +0 -76
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +0 -325
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +0 -398
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +0 -96
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +0 -183
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +0 -94
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +0 -63
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +0 -191
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +0 -175
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +0 -76
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +0 -7
- package/skills/void/docs/node_modules/void/test/e2e/README.md +0 -85
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-rQ84J-ij.mjs";
|
|
1
2
|
import nodePath from "node:path";
|
|
2
3
|
//#region ../../node_modules/.pnpm/pathslash@0.1.0/node_modules/pathslash/dist/index.mjs
|
|
4
|
+
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
basename: () => basename,
|
|
6
|
+
default: () => path,
|
|
7
|
+
dirname: () => dirname,
|
|
8
|
+
extname: () => extname,
|
|
9
|
+
isAbsolute: () => isAbsolute,
|
|
10
|
+
join: () => join,
|
|
11
|
+
normalize: () => normalize,
|
|
12
|
+
posix: () => posix,
|
|
13
|
+
relative: () => relative,
|
|
14
|
+
resolve: () => resolve,
|
|
15
|
+
win32: () => win32
|
|
16
|
+
});
|
|
3
17
|
const BACKSLASH_RE = /\\/g;
|
|
4
18
|
const isWindows = process.platform === "win32";
|
|
5
19
|
/**
|
|
@@ -36,6 +50,7 @@ const win32 = {
|
|
|
36
50
|
const posix = { ...nodePath.posix };
|
|
37
51
|
posix.posix = win32.posix = posix;
|
|
38
52
|
posix.win32 = win32.win32 = win32;
|
|
39
|
-
const
|
|
53
|
+
const path = isWindows ? win32 : posix;
|
|
54
|
+
const { basename, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, parse, relative, resolve, sep, toNamespacedPath } = path;
|
|
40
55
|
//#endregion
|
|
41
|
-
export {
|
|
56
|
+
export { isAbsolute as a, relative as c, extname as i, resolve as l, dirname as n, join as o, dist_exports as r, normalize as s, basename as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-rQ84J-ij.mjs";
|
|
2
2
|
import * as nativeFs from "fs";
|
|
3
3
|
import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
|
|
4
4
|
import { basename, dirname, isAbsolute, normalize, posix, relative, resolve, sep } from "path";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
6
|
import { createRequire } from "module";
|
|
7
|
-
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.
|
|
7
|
+
//#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.7/node_modules/fdir/dist/index.mjs
|
|
8
8
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
9
|
function cleanPath(path) {
|
|
10
10
|
let normalized = normalize(path);
|
|
@@ -512,7 +512,7 @@ var Builder = class {
|
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
//#endregion
|
|
515
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
515
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/constants.js
|
|
516
516
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
517
517
|
const WIN_SLASH = "\\\\/";
|
|
518
518
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
@@ -567,7 +567,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
567
567
|
};
|
|
568
568
|
module.exports = {
|
|
569
569
|
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
570
|
-
MAX_LENGTH:
|
|
570
|
+
MAX_LENGTH: 65536,
|
|
571
571
|
POSIX_REGEX_SOURCE: {
|
|
572
572
|
__proto__: null,
|
|
573
573
|
alnum: "a-zA-Z0-9",
|
|
@@ -681,7 +681,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
681
681
|
};
|
|
682
682
|
}));
|
|
683
683
|
//#endregion
|
|
684
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
684
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/utils.js
|
|
685
685
|
var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
686
686
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
|
|
687
687
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -729,7 +729,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
729
729
|
};
|
|
730
730
|
}));
|
|
731
731
|
//#endregion
|
|
732
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
732
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/scan.js
|
|
733
733
|
var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
734
734
|
const utils = require_utils();
|
|
735
735
|
const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
|
|
@@ -758,7 +758,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
758
758
|
const scan = (input, options) => {
|
|
759
759
|
const opts = options || {};
|
|
760
760
|
const length = input.length - 1;
|
|
761
|
-
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
|
761
|
+
const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
|
|
762
762
|
const slashes = [];
|
|
763
763
|
const tokens = [];
|
|
764
764
|
const parts = [];
|
|
@@ -861,14 +861,18 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
861
861
|
finished = true;
|
|
862
862
|
if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
|
|
863
863
|
if (scanToEnd === true) {
|
|
864
|
+
let parens = 0;
|
|
864
865
|
while (eos() !== true && (code = advance())) {
|
|
865
866
|
if (code === CHAR_BACKWARD_SLASH) {
|
|
866
867
|
backslashes = token.backslashes = true;
|
|
867
|
-
|
|
868
|
+
advance();
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
872
|
+
parens++;
|
|
868
873
|
continue;
|
|
869
874
|
}
|
|
870
|
-
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
871
|
-
isGlob = token.isGlob = true;
|
|
875
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
872
876
|
finished = true;
|
|
873
877
|
break;
|
|
874
878
|
}
|
|
@@ -916,13 +920,18 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
916
920
|
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
|
|
917
921
|
isGlob = token.isGlob = true;
|
|
918
922
|
if (scanToEnd === true) {
|
|
923
|
+
let parens = 1;
|
|
919
924
|
while (eos() !== true && (code = advance())) {
|
|
920
|
-
if (code ===
|
|
925
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
921
926
|
backslashes = token.backslashes = true;
|
|
922
|
-
|
|
927
|
+
advance();
|
|
928
|
+
continue;
|
|
929
|
+
}
|
|
930
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
931
|
+
parens++;
|
|
923
932
|
continue;
|
|
924
933
|
}
|
|
925
|
-
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
934
|
+
if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
|
|
926
935
|
finished = true;
|
|
927
936
|
break;
|
|
928
937
|
}
|
|
@@ -985,7 +994,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
985
994
|
if (opts.parts === true || opts.tokens === true) {
|
|
986
995
|
let prevIndex;
|
|
987
996
|
for (let idx = 0; idx < slashes.length; idx++) {
|
|
988
|
-
const n = prevIndex ? prevIndex + 1 : start;
|
|
997
|
+
const n = prevIndex !== void 0 ? prevIndex + 1 : start;
|
|
989
998
|
const i = slashes[idx];
|
|
990
999
|
const value = input.slice(n, i);
|
|
991
1000
|
if (opts.tokens) {
|
|
@@ -996,18 +1005,19 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
996
1005
|
depth(tokens[idx]);
|
|
997
1006
|
state.maxDepth += tokens[idx].depth;
|
|
998
1007
|
}
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
if (prevIndex && prevIndex + 1 < input.length) {
|
|
1003
|
-
const value = input.slice(prevIndex + 1);
|
|
1004
|
-
parts.push(value);
|
|
1005
|
-
if (opts.tokens) {
|
|
1006
|
-
tokens[tokens.length - 1].value = value;
|
|
1007
|
-
depth(tokens[tokens.length - 1]);
|
|
1008
|
-
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
1008
|
+
if (i >= start) {
|
|
1009
|
+
parts.push(value);
|
|
1010
|
+
prevIndex = i;
|
|
1009
1011
|
}
|
|
1010
1012
|
}
|
|
1013
|
+
const n = prevIndex !== void 0 ? prevIndex + 1 : start;
|
|
1014
|
+
const value = input.slice(n);
|
|
1015
|
+
parts.push(value);
|
|
1016
|
+
if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
|
|
1017
|
+
tokens[tokens.length - 1].value = value;
|
|
1018
|
+
depth(tokens[tokens.length - 1]);
|
|
1019
|
+
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
1020
|
+
}
|
|
1011
1021
|
state.slashes = slashes;
|
|
1012
1022
|
state.parts = parts;
|
|
1013
1023
|
}
|
|
@@ -1016,7 +1026,7 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1016
1026
|
module.exports = scan;
|
|
1017
1027
|
}));
|
|
1018
1028
|
//#endregion
|
|
1019
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
1029
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/parse.js
|
|
1020
1030
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1021
1031
|
const constants = require_constants();
|
|
1022
1032
|
const utils = require_utils();
|
|
@@ -1446,10 +1456,12 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1446
1456
|
}
|
|
1447
1457
|
return esc ? m : `\\${m}`;
|
|
1448
1458
|
});
|
|
1449
|
-
if (backslashes === true)
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1459
|
+
if (backslashes === true) {
|
|
1460
|
+
if (opts.unescape === true) output = output.replace(/\\/g, "");
|
|
1461
|
+
else output = output.replace(/\\+/g, (m) => {
|
|
1462
|
+
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1453
1465
|
if (output === input && opts.contains === true) {
|
|
1454
1466
|
state.output = input;
|
|
1455
1467
|
return state;
|
|
@@ -1916,6 +1928,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1916
1928
|
rest = rest.slice(3);
|
|
1917
1929
|
consume("/**", 3);
|
|
1918
1930
|
}
|
|
1931
|
+
const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
|
|
1919
1932
|
if (prior.type === "bos" && eos()) {
|
|
1920
1933
|
prev.type = "globstar";
|
|
1921
1934
|
prev.value += value;
|
|
@@ -1925,7 +1938,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1925
1938
|
consume(value);
|
|
1926
1939
|
continue;
|
|
1927
1940
|
}
|
|
1928
|
-
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar &&
|
|
1941
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
|
|
1929
1942
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
1930
1943
|
prior.output = `(?:${prior.output}`;
|
|
1931
1944
|
prev.type = "globstar";
|
|
@@ -2090,7 +2103,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2090
2103
|
module.exports = parse;
|
|
2091
2104
|
}));
|
|
2092
2105
|
//#endregion
|
|
2093
|
-
//#region ../../node_modules/.pnpm/picomatch@4.0.
|
|
2106
|
+
//#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js
|
|
2094
2107
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2095
2108
|
const scan = require_scan();
|
|
2096
2109
|
const parse = require_parse();
|
|
@@ -2220,8 +2233,10 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2220
2233
|
output = format ? format(input) : input;
|
|
2221
2234
|
match = output === glob;
|
|
2222
2235
|
}
|
|
2223
|
-
if (match === false || opts.capture === true)
|
|
2224
|
-
|
|
2236
|
+
if (match === false || opts.capture === true) {
|
|
2237
|
+
if (opts.matchBase === true || opts.basename === true) match = picomatch.matchBase(input, regex, options, posix);
|
|
2238
|
+
else match = regex.exec(output);
|
|
2239
|
+
}
|
|
2225
2240
|
return {
|
|
2226
2241
|
isMatch: Boolean(match),
|
|
2227
2242
|
match,
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as
|
|
1
|
+
import { D as log, O as note, c as import_picocolors } from "./output-tFQLLj26.mjs";
|
|
2
|
+
import { b as readDeploymentPlatform, c as getToken, x as readProjectConfig } from "./auth-W9WII-mN.mjs";
|
|
3
|
+
import { n as PlatformClient } from "./client-Clirrol3.mjs";
|
|
3
4
|
//#region src/cli/domain.ts
|
|
4
5
|
async function runDomainCommand(root, args) {
|
|
6
|
+
const platform = readDeploymentPlatform(root);
|
|
7
|
+
if (platform === "cloudflare") return runCloudflareDomainCommand(root, args);
|
|
8
|
+
if (platform === "none") throw new Error("domain: Deployment is disabled. Run `void init` to choose a platform.");
|
|
5
9
|
const token = getToken(root);
|
|
6
10
|
if (!token) {
|
|
7
11
|
log.error("Not logged in. Run `void auth login` first.");
|
|
@@ -32,6 +36,38 @@ async function runDomainCommand(root, args) {
|
|
|
32
36
|
case "status": return domainStatus(client, projectId, args.hostname, args.verbose === true);
|
|
33
37
|
}
|
|
34
38
|
}
|
|
39
|
+
async function runCloudflareDomainCommand(root, args) {
|
|
40
|
+
if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
41
|
+
const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-CPTpRW6d.mjs").then((n) => n.t);
|
|
42
|
+
if (args.subcommand === "add") {
|
|
43
|
+
const result = await changeCloudflareDomain(root, args.hostname, "add");
|
|
44
|
+
log.success(result.modified ? `Domain ${args.hostname} added and activated on Cloudflare.` : `Domain ${args.hostname} is already configured.`);
|
|
45
|
+
note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (args.subcommand === "delete") {
|
|
49
|
+
if ((await changeCloudflareDomain(root, args.hostname, "delete")).modified) log.success(`Domain ${args.hostname} removed from Cloudflare.`);
|
|
50
|
+
else log.info(`Domain ${args.hostname} is not configured.`);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const domains = listCloudflareDomains(root);
|
|
54
|
+
if (args.subcommand === "list") {
|
|
55
|
+
if (domains.length === 0) {
|
|
56
|
+
log.info("No custom domains configured.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
note(domains.map((domain) => ` ${domain.pattern} ${import_picocolors.default.green("configured")}`).join("\n"), "Custom Domains");
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const domain = domains.find((entry) => entry.pattern === args.hostname);
|
|
63
|
+
if (!domain) {
|
|
64
|
+
log.error(`domain: Domain '${args.hostname}' is not configured for this Worker.`);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
const lines = [`Hostname: ${domain.pattern}`, "Status: configured locally — present in wrangler.jsonc; remote certificate state is managed by Cloudflare."];
|
|
68
|
+
if (args.verbose) lines.push("", "Details:", " Type: Cloudflare Custom Domain", " TLS: managed");
|
|
69
|
+
note(lines.join("\n"), "Domain Status");
|
|
70
|
+
}
|
|
35
71
|
async function domainAdd(client, projectId, hostname) {
|
|
36
72
|
const domain = await client.addDomain(projectId, hostname);
|
|
37
73
|
log.success(`Domain ${hostname} added (status: ${domain.status})`);
|
|
@@ -60,10 +96,11 @@ async function domainList(client, projectId) {
|
|
|
60
96
|
log.info("No custom domains configured.");
|
|
61
97
|
return;
|
|
62
98
|
}
|
|
63
|
-
|
|
99
|
+
const lines = domains.map((d) => {
|
|
64
100
|
const status = d.status === "active" ? import_picocolors.default.green("active") : import_picocolors.default.yellow(d.status);
|
|
65
101
|
return ` ${d.hostname} ${status}`;
|
|
66
|
-
})
|
|
102
|
+
});
|
|
103
|
+
note(lines.join("\n"), "Custom Domains");
|
|
67
104
|
}
|
|
68
105
|
function computeRollup(status) {
|
|
69
106
|
if (status.verification_errors && status.verification_errors.length > 0) return {
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
//#region src/shared/dotenv.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared dotenv parser + variable expander used by local `.env` consumers and
|
|
5
|
+
* explicit `void secret sync <file>` input. A single source of truth avoids drift when two
|
|
6
|
+
* hand-rolled parsers diverged on quoting / expansion semantics.
|
|
7
|
+
*
|
|
8
|
+
* Expansion supports `${VAR}` and `$VAR`, a `\$VAR` literal-escape, and
|
|
9
|
+
* transitive references across earlier entries in the same record. Cycles
|
|
10
|
+
* are detected and fall through to the raw literal rather than looping.
|
|
11
|
+
*
|
|
12
|
+
* Security note: expansion is deliberately scoped to the in-file record.
|
|
13
|
+
* We do NOT consult `process.env` the way `dotenv-expand` does — a shell
|
|
14
|
+
* env leaking into a parsed dotenv file would silently change its meaning
|
|
15
|
+
* across machines.
|
|
16
|
+
*
|
|
17
|
+
* This module is a leaf — it must not import from `../log` or any non-leaf
|
|
18
|
+
* module so that the prerender subprocess's worker bundle doesn't pick up
|
|
19
|
+
* unwanted transitive dependencies. Warnings are surfaced through the
|
|
20
|
+
* `onWarn` callback and left for the caller to route.
|
|
21
|
+
*/
|
|
22
|
+
/** Valid dotenv key — ASCII letter/underscore followed by letters/digits/underscore. */
|
|
23
|
+
const VALID_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
24
|
+
/**
|
|
25
|
+
* Parse a single `KEY=VALUE` line into `{ key, value }`, stripping matching
|
|
26
|
+
* single/double quotes around the value. Returns `null` for blanks, comments,
|
|
27
|
+
* and non-assignment lines.
|
|
28
|
+
*/
|
|
29
|
+
function parseDotenvLine(line) {
|
|
30
|
+
const trimmed = line.trim();
|
|
31
|
+
if (!trimmed || trimmed.startsWith("#")) return null;
|
|
32
|
+
const equalsIndex = trimmed.indexOf("=");
|
|
33
|
+
if (equalsIndex === -1) return null;
|
|
34
|
+
const key = trimmed.slice(0, equalsIndex).trim();
|
|
35
|
+
let value = trimmed.slice(equalsIndex + 1).trim();
|
|
36
|
+
if (value.startsWith("\"") && value.endsWith("\"") || value.startsWith("'") && value.endsWith("'")) value = value.slice(1, -1);
|
|
37
|
+
return {
|
|
38
|
+
key,
|
|
39
|
+
value
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Parse the raw contents of a dotenv file into a record, optionally
|
|
44
|
+
* expanding `${VAR}` / `$VAR` references against earlier entries.
|
|
45
|
+
*/
|
|
46
|
+
function parseDotenv(content, options = {}) {
|
|
47
|
+
const { expand: shouldExpand = true, skipInvalidKeys = true, onWarn } = options;
|
|
48
|
+
const env = {};
|
|
49
|
+
for (const line of content.split("\n")) {
|
|
50
|
+
const parsed = parseDotenvLine(line);
|
|
51
|
+
if (!parsed) continue;
|
|
52
|
+
if (!VALID_KEY.test(parsed.key)) {
|
|
53
|
+
if (skipInvalidKeys) continue;
|
|
54
|
+
throw new Error(`dotenv: Invalid key '${parsed.key}'.`);
|
|
55
|
+
}
|
|
56
|
+
env[parsed.key] = parsed.value;
|
|
57
|
+
}
|
|
58
|
+
return shouldExpand ? expandDotenv(env, { onWarn }) : env;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read and parse a dotenv file. Returns `{}` when the file is missing so
|
|
62
|
+
* callers can treat "no file" and "empty file" identically.
|
|
63
|
+
*/
|
|
64
|
+
function parseDotenvFile(filePath, options = {}) {
|
|
65
|
+
if (!existsSync(filePath)) return {};
|
|
66
|
+
return parseDotenv(readFileSync(filePath, "utf-8"), options);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Expand `${VAR}` / `$VAR` references in every value of a record against
|
|
70
|
+
* the other entries in that same record. Matches the surface of
|
|
71
|
+
* `dotenv-expand` minus the `process.env` fallback.
|
|
72
|
+
*
|
|
73
|
+
* Semantics:
|
|
74
|
+
* - `${VAR}` and `$VAR` both resolve (bare form stops at the first
|
|
75
|
+
* non-identifier character).
|
|
76
|
+
* - `\$VAR` stays literal; the backslash is consumed.
|
|
77
|
+
* - Nested refs resolve transitively — `A=${B}`, `B=${C}`, `C=v` → `A=v`.
|
|
78
|
+
* - Cycles are detected; the offending value keeps its raw literal and
|
|
79
|
+
* `onWarn` fires once per cycle seen.
|
|
80
|
+
* - Missing refs expand to the empty string, matching dotenv-expand.
|
|
81
|
+
*
|
|
82
|
+
* The input record is not mutated; a fresh object is returned.
|
|
83
|
+
*/
|
|
84
|
+
function expandDotenv(input, options = {}) {
|
|
85
|
+
const out = {};
|
|
86
|
+
const resolving = /* @__PURE__ */ new Set();
|
|
87
|
+
const warned = /* @__PURE__ */ new Set();
|
|
88
|
+
function resolveKey(key) {
|
|
89
|
+
if (!(key in input)) return "";
|
|
90
|
+
if (key in out) return out[key];
|
|
91
|
+
if (resolving.has(key)) {
|
|
92
|
+
if (!warned.has(key) && options.onWarn) {
|
|
93
|
+
warned.add(key);
|
|
94
|
+
options.onWarn(`dotenv expansion cycle detected at "${key}" — leaving raw value in place`);
|
|
95
|
+
}
|
|
96
|
+
return input[key];
|
|
97
|
+
}
|
|
98
|
+
resolving.add(key);
|
|
99
|
+
const expanded = expandValue(input[key], resolveKey);
|
|
100
|
+
resolving.delete(key);
|
|
101
|
+
out[key] = expanded;
|
|
102
|
+
return expanded;
|
|
103
|
+
}
|
|
104
|
+
for (const key of Object.keys(input)) resolveKey(key);
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Expand a single value string. `resolve` returns the fully-expanded value
|
|
109
|
+
* for a referenced key (or `''` when missing). Backslash-escapes (`\$VAR`,
|
|
110
|
+
* `\${VAR}`) keep the `$...` literal and consume the backslash.
|
|
111
|
+
*/
|
|
112
|
+
function expandValue(value, resolve) {
|
|
113
|
+
let result = "";
|
|
114
|
+
let cursor = 0;
|
|
115
|
+
while (cursor < value.length) {
|
|
116
|
+
const character = value[cursor];
|
|
117
|
+
if (character === "\\" && cursor + 1 < value.length && value[cursor + 1] === "$") {
|
|
118
|
+
result += "$";
|
|
119
|
+
cursor += 2;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (character !== "$") {
|
|
123
|
+
result += character;
|
|
124
|
+
cursor++;
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const next = value[cursor + 1];
|
|
128
|
+
if (next === "{") {
|
|
129
|
+
const endIndex = value.indexOf("}", cursor + 2);
|
|
130
|
+
if (endIndex === -1) {
|
|
131
|
+
result += character;
|
|
132
|
+
cursor++;
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
const key = value.slice(cursor + 2, endIndex);
|
|
136
|
+
if (VALID_KEY.test(key)) result += resolve(key);
|
|
137
|
+
else result += value.slice(cursor, endIndex + 1);
|
|
138
|
+
cursor = endIndex + 1;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (next && /[A-Za-z_]/.test(next)) {
|
|
142
|
+
let keyEndIndex = cursor + 1;
|
|
143
|
+
while (keyEndIndex < value.length && /[A-Za-z0-9_]/.test(value[keyEndIndex])) keyEndIndex++;
|
|
144
|
+
const key = value.slice(cursor + 1, keyEndIndex);
|
|
145
|
+
result += resolve(key);
|
|
146
|
+
cursor = keyEndIndex;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
result += character;
|
|
150
|
+
cursor++;
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Wrangler 4.131's bundled `dotenv` LINE regex (verbatim), used ONLY to detect the
|
|
156
|
+
* declared KEYS wrangler would load — including the OPTIONAL `export ` prefix, the `KEY: val`
|
|
157
|
+
* form, and single/double/backtick quoting — so a transport-redirect / config-override fence
|
|
158
|
+
* sees exactly what wrangler's per-command dotenv reload would. We read keys, never values.
|
|
159
|
+
*/
|
|
160
|
+
const WRANGLER_DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
161
|
+
/**
|
|
162
|
+
* The set of declared dotenv KEYS in `filePath`, parsed the way wrangler does.
|
|
163
|
+
* Lives in this leaf module (no `proper-lockfile` / lifecycle side effects) so both
|
|
164
|
+
* the provisioner's transport fence and the deploy orchestrator's config-override
|
|
165
|
+
* fence can read keys exactly as wrangler's per-command reload would, without either
|
|
166
|
+
* caller pulling in the provision lifecycle just to parse dotenv keys.
|
|
167
|
+
*/
|
|
168
|
+
function scanWranglerDotenvKeys(filePath) {
|
|
169
|
+
const keys = /* @__PURE__ */ new Set();
|
|
170
|
+
if (!existsSync(filePath)) return keys;
|
|
171
|
+
const content = readFileSync(filePath, "utf-8");
|
|
172
|
+
WRANGLER_DOTENV_LINE.lastIndex = 0;
|
|
173
|
+
let match;
|
|
174
|
+
while ((match = WRANGLER_DOTENV_LINE.exec(content)) !== null) {
|
|
175
|
+
if (match[1]) keys.add(match[1]);
|
|
176
|
+
if (match.index === WRANGLER_DOTENV_LINE.lastIndex) WRANGLER_DOTENV_LINE.lastIndex++;
|
|
177
|
+
}
|
|
178
|
+
return keys;
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { parseDotenvFile as n, scanWranglerDotenvKeys as r, expandDotenv as t };
|
package/dist/edge.d.mts
ADDED
package/dist/edge.mjs
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { o as join } from "./dist-BrsS7cai.mjs";
|
|
2
|
+
import { n as globSync, t as glob } from "./dist-m40_XgNh.mjs";
|
|
3
|
+
//#region src/router/email.ts
|
|
4
|
+
/**
|
|
5
|
+
* Scan `email/` for inbound email handlers.
|
|
6
|
+
*
|
|
7
|
+
* The `email/` directory sits at the project root alongside `crons/` and
|
|
8
|
+
* `queues/` — non-HTTP handlers all live at the top level, since each is
|
|
9
|
+
* wired into a separate worker export (`scheduled`, `queue`, `email`).
|
|
10
|
+
*
|
|
11
|
+
* email/<local-part>.ts per-recipient handler matched against the
|
|
12
|
+
* local-part of the To address
|
|
13
|
+
* email/<local-part>+[tag].ts same, with a `+suffix` capture exposed as
|
|
14
|
+
* `info.params.<tag>`
|
|
15
|
+
* email/[name].ts dynamic local-part — captures the whole
|
|
16
|
+
* local-part as `info.params.<name>`
|
|
17
|
+
* email/[name]+[tag].ts dynamic + tag
|
|
18
|
+
* email/_default.ts fallback when no per-address pattern matches
|
|
19
|
+
*
|
|
20
|
+
* Match precedence (most specific wins):
|
|
21
|
+
* static + tag → static → dynamic + tag → dynamic → _default
|
|
22
|
+
* Within a kind a literal tag beats a captured tag (`support+vip` before
|
|
23
|
+
* `support+[tag]`, `[user]+vip` before `[user]+[tag]`); the same shape sorts
|
|
24
|
+
* alphabetically. See `compareEmailRoutes`.
|
|
25
|
+
*
|
|
26
|
+
* Local-part matching is case-insensitive: the compiled patterns carry the `i`
|
|
27
|
+
* flag and run against the recipient in its original case, so a captured tag
|
|
28
|
+
* such as a ticket id keeps the case it arrived with. Nested folders are
|
|
29
|
+
* intentionally ignored — the recipient address is a single string, not a path.
|
|
30
|
+
*/
|
|
31
|
+
const EMAIL_EXTENSIONS = [
|
|
32
|
+
"ts",
|
|
33
|
+
"mts",
|
|
34
|
+
"js",
|
|
35
|
+
"mjs"
|
|
36
|
+
];
|
|
37
|
+
const PARAM_RE = /^\[([a-z][a-z0-9]*)\]$/;
|
|
38
|
+
const LITERAL_RE = /^[a-z0-9._-]+$/;
|
|
39
|
+
function compileSegment(part) {
|
|
40
|
+
const param = PARAM_RE.exec(part);
|
|
41
|
+
if (param) return {
|
|
42
|
+
kind: "param",
|
|
43
|
+
name: param[1]
|
|
44
|
+
};
|
|
45
|
+
if (!LITERAL_RE.test(part)) return null;
|
|
46
|
+
return {
|
|
47
|
+
kind: "literal",
|
|
48
|
+
value: part
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function escapeLiteral(value) {
|
|
52
|
+
return value.replace(/\./g, "\\.");
|
|
53
|
+
}
|
|
54
|
+
function segmentRegex(s) {
|
|
55
|
+
return s.kind === "literal" ? escapeLiteral(s.value) : "([^+@]+)";
|
|
56
|
+
}
|
|
57
|
+
function patternKind(prefix, tag) {
|
|
58
|
+
const prefixDynamic = prefix.kind === "param";
|
|
59
|
+
if (tag) return prefixDynamic ? "dynamic-tag" : "static-tag";
|
|
60
|
+
return prefixDynamic ? "dynamic" : "static";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Compile a basename like `support`, `support+[ticket]`, `[user]`, or
|
|
64
|
+
* `[user]+[tag]` into a match pattern, or return `null` if the basename
|
|
65
|
+
* uses characters or shapes outside the supported grammar.
|
|
66
|
+
*/
|
|
67
|
+
function compileEmailPattern(basename) {
|
|
68
|
+
const parts = basename.toLowerCase().split("+");
|
|
69
|
+
if (parts.length > 2) return null;
|
|
70
|
+
const prefix = compileSegment(parts[0] ?? "");
|
|
71
|
+
if (!prefix) return null;
|
|
72
|
+
let tag;
|
|
73
|
+
if (parts.length === 2) {
|
|
74
|
+
const compiled = compileSegment(parts[1] ?? "");
|
|
75
|
+
if (!compiled) return null;
|
|
76
|
+
tag = compiled;
|
|
77
|
+
}
|
|
78
|
+
const paramNames = [];
|
|
79
|
+
if (prefix.kind === "param") paramNames.push(prefix.name);
|
|
80
|
+
if (tag?.kind === "param") paramNames.push(tag.name);
|
|
81
|
+
if (new Set(paramNames).size !== paramNames.length) {
|
|
82
|
+
const dupes = paramNames.filter((n, i) => paramNames.indexOf(n) !== i);
|
|
83
|
+
throw new Error(`email handler "${basename}" has duplicate param names: ${dupes.join(", ")}. Each [name] segment must be unique within a single handler filename.`);
|
|
84
|
+
}
|
|
85
|
+
const segments = [segmentRegex(prefix)];
|
|
86
|
+
if (tag) segments.push("\\+", segmentRegex(tag));
|
|
87
|
+
return {
|
|
88
|
+
kind: patternKind(prefix, tag),
|
|
89
|
+
regexSource: `^${segments.join("")}$`,
|
|
90
|
+
paramNames
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Kind order: most specific first. static-tag beats static (more
|
|
95
|
+
* constraints), dynamic-tag beats dynamic. Matches the precedence list in
|
|
96
|
+
* the file header.
|
|
97
|
+
*/
|
|
98
|
+
const DISPATCH_ORDER = {
|
|
99
|
+
"static-tag": 0,
|
|
100
|
+
static: 1,
|
|
101
|
+
"dynamic-tag": 2,
|
|
102
|
+
dynamic: 3
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The ONE dispatch comparator. The generated `__emailHandler` and the
|
|
106
|
+
* `createInboundTestHarness` route table both return on the first pattern
|
|
107
|
+
* that matches, so whatever sorts first owns every address it matches.
|
|
108
|
+
*
|
|
109
|
+
* 1. kind, per `DISPATCH_ORDER`
|
|
110
|
+
* 2. fewer captures first — `support+vip` and `support+[tag]` are both
|
|
111
|
+
* `static-tag` and both match `support+vip@`; the literal tag must be
|
|
112
|
+
* tried first or the exact handler is dead code. Same for
|
|
113
|
+
* `[user]+vip` over `[user]+[tag]`.
|
|
114
|
+
* 3. alphabetical, so the table is deterministic across filesystems.
|
|
115
|
+
*
|
|
116
|
+
* Two patterns with the same regex source share a kind and a capture count,
|
|
117
|
+
* so the collision check below can still name the alphabetically-first one.
|
|
118
|
+
*/
|
|
119
|
+
function compareEmailRoutes(a, b) {
|
|
120
|
+
const kind = DISPATCH_ORDER[a.pattern.kind] - DISPATCH_ORDER[b.pattern.kind];
|
|
121
|
+
if (kind !== 0) return kind;
|
|
122
|
+
const captures = a.pattern.paramNames.length - b.pattern.paramNames.length;
|
|
123
|
+
if (captures !== 0) return captures;
|
|
124
|
+
return a.address.localeCompare(b.address);
|
|
125
|
+
}
|
|
126
|
+
function parseEmailFiles(files) {
|
|
127
|
+
const addresses = [];
|
|
128
|
+
let defaultHandler;
|
|
129
|
+
for (const filePath of files) {
|
|
130
|
+
if (filePath.includes("/")) continue;
|
|
131
|
+
const basename = filePath.replace(/\.[^.]+$/, "");
|
|
132
|
+
if (basename === "_default") {
|
|
133
|
+
if (defaultHandler !== void 0) throw new Error(`email handler "${filePath}" is a second default handler next to "${defaultHandler}" — keep exactly one email/_default.* file.`);
|
|
134
|
+
defaultHandler = filePath;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (basename.startsWith("_")) continue;
|
|
138
|
+
const pattern = compileEmailPattern(basename);
|
|
139
|
+
if (!pattern) continue;
|
|
140
|
+
addresses.push({
|
|
141
|
+
address: basename.toLowerCase(),
|
|
142
|
+
filePath,
|
|
143
|
+
pattern
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
addresses.sort(compareEmailRoutes);
|
|
147
|
+
const seenRegex = /* @__PURE__ */ new Map();
|
|
148
|
+
for (const def of addresses) {
|
|
149
|
+
const prior = seenRegex.get(def.pattern.regexSource);
|
|
150
|
+
if (prior !== void 0) throw new Error(`email handler "${def.filePath}" matches the same address shape as "${prior}" (both compile to ${def.pattern.regexSource}). Rename one of them — only the alphabetically-first would ever fire.`);
|
|
151
|
+
seenRegex.set(def.pattern.regexSource, def.filePath);
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
addresses,
|
|
155
|
+
defaultHandler
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async function scanEmailHandlers(root, emailDir = "email") {
|
|
159
|
+
const pattern = `*.{${EMAIL_EXTENSIONS.join(",")}}`;
|
|
160
|
+
return parseEmailFiles(await glob(pattern, {
|
|
161
|
+
cwd: join(root, emailDir),
|
|
162
|
+
absolute: false
|
|
163
|
+
}).catch(() => []));
|
|
164
|
+
}
|
|
165
|
+
function scanEmailHandlersSync(root, emailDir = "email") {
|
|
166
|
+
const pattern = `*.{${EMAIL_EXTENSIONS.join(",")}}`;
|
|
167
|
+
let files;
|
|
168
|
+
try {
|
|
169
|
+
files = globSync(pattern, {
|
|
170
|
+
cwd: join(root, emailDir),
|
|
171
|
+
absolute: false
|
|
172
|
+
});
|
|
173
|
+
} catch {
|
|
174
|
+
files = [];
|
|
175
|
+
}
|
|
176
|
+
return parseEmailFiles(files);
|
|
177
|
+
}
|
|
178
|
+
function hasEmailHandlers(scan) {
|
|
179
|
+
return scan.addresses.length > 0 || Boolean(scan.defaultHandler);
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { scanEmailHandlersSync as a, scanEmailHandlers as i, compileEmailPattern as n, hasEmailHandlers as r, compareEmailRoutes as t };
|