void 0.10.13 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-CYVhSNFy.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-CkVD1uOh.mjs} +6 -4
- package/dist/{cache-C11V8Fxq.mjs → cache-QcUfR-ff.mjs} +9 -5
- package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-DsvWKFTe.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 +1592 -153
- 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-CyCHWSO_.mjs} +61 -463
- package/dist/cloudflare-auth-DRkGe7-s.mjs +170 -0
- package/dist/cloudflare-cmd-D3ME2GAe.mjs +62 -0
- package/dist/cloudflare-connect-BivMefMA.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-D9Yr-T5f.mjs +79 -0
- package/dist/{create-project-DsYvl3TB.mjs → create-project-DMV-csEm.mjs} +26 -16
- package/dist/database-provider.d.mts +21 -0
- package/dist/database-provider.mjs +6 -0
- package/dist/{db-C0i0sYMS.mjs → db-BxoUWL0F.mjs} +600 -115
- package/dist/{delete-mh6p-zkQ.mjs → delete-iJOqxBz1.mjs} +9 -6
- package/dist/{deploy-jBJT1fUT.mjs → deploy-CcDoeBIf.mjs} +3249 -1990
- 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-gu_iaHmn.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-r6DHJyAB.mjs +262 -0
- package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
- package/dist/env-D4Emu-M_.mjs +95 -0
- package/dist/env-DmU2To0C.mjs +73 -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-BKw6qHIg.mjs} +70 -15
- package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-DJS5Ab-H.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-BJ70in1n.d.mts +354 -0
- package/dist/inbound-CNKxb3FY.mjs +694 -0
- package/dist/index.d.mts +61 -34
- package/dist/index.mjs +1010 -293
- package/dist/{init-7JCAcKNQ.mjs → init-Dx5cgKqK.mjs} +329 -271
- package/dist/link-D_rm5sRH.mjs +52 -0
- package/dist/{list-CPwFDZ_c.mjs → list-M8XShti7.mjs} +37 -5
- package/dist/{runner-kapo9aPs.mjs → local-d1-BE8KBbMy.mjs} +116 -6
- package/dist/{login-BT3H8PN3.mjs → login-C8-UuLnp.mjs} +17 -15
- package/dist/{logs-Bt313ax7.mjs → logs-DwFU7dMW.mjs} +16 -2
- package/dist/mime-BJD7d_qL.mjs +1216 -0
- package/dist/neon-DHwd2zvC.mjs +54 -0
- package/dist/{node-pRg81HqV.mjs → node-BkaXcpAc.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-BEOVv1PN.mjs +123 -0
- package/dist/platform-domain-BszUfiS8.mjs +228 -0
- package/dist/platform-lifecycle-CjSr6xf0.mjs +4450 -0
- package/dist/platform-management-W30iCaTL.mjs +698 -0
- package/dist/platform-recovery-pHHv4ZSg.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-DCpk1cDt.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-Dn8Vheh1.mjs} +5 -3
- package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
- package/dist/rollback-CtlPXEBi.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-CgRFl3s6.mjs +61 -0
- package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-DCkWPsWS.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-BqTxGqki.mjs} +62 -5
- package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
- 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-Bihr8WBi.mjs} +3 -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 +609 -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 +235 -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 +614 -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
package/dist/runtime/ws.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as StandardSchemaV1 } from "../standard-schema-
|
|
2
|
-
import { r as AuthUser } from "../auth-
|
|
3
|
-
import { a as CloudEnv } from "../handler-
|
|
1
|
+
import { t as StandardSchemaV1 } from "../standard-schema-Fo_vCAZh.mjs";
|
|
2
|
+
import { r as AuthUser } from "../auth-DkcFflXV.mjs";
|
|
3
|
+
import { a as CloudEnv } from "../handler-D1hLsObx.mjs";
|
|
4
4
|
import { WebSocketRouteMap } from "void/routes";
|
|
5
|
-
|
|
6
5
|
//#region src/runtime/ws.d.ts
|
|
7
6
|
type MaybePromise<T> = T | Promise<T>;
|
|
8
7
|
type ParamsRecord = Record<string, string>;
|
|
@@ -17,19 +16,19 @@ type ServerEventOf<P extends keyof WebSocketRouteMap> = WsEntry<P> extends {
|
|
|
17
16
|
server: infer T;
|
|
18
17
|
} ? T : never;
|
|
19
18
|
type HasParams<P extends keyof WebSocketRouteMap> = ParamsOf<P> extends Record<string, never> ? false : [keyof ParamsOf<P>] extends [never] ? false : true;
|
|
20
|
-
type WebSocketConnection<ServerEvent = unknown> = {
|
|
19
|
+
export type WebSocketConnection<ServerEvent = unknown> = {
|
|
21
20
|
readonly id: string;
|
|
22
21
|
readonly state: unknown;
|
|
23
22
|
send(event: ServerEvent): Promise<void>;
|
|
24
23
|
close(code?: number, reason?: string): void;
|
|
25
24
|
setState(data: unknown): void;
|
|
26
25
|
};
|
|
27
|
-
type RoomController<ServerEvent = unknown> = {
|
|
26
|
+
export type RoomController<ServerEvent = unknown> = {
|
|
28
27
|
broadcast(event: ServerEvent, excludeIds?: Array<string>): Promise<void>;
|
|
29
28
|
getConnections(): Iterable<WebSocketConnection<ServerEvent>>;
|
|
30
29
|
getConnection(id: string): WebSocketConnection<ServerEvent> | undefined;
|
|
31
30
|
};
|
|
32
|
-
type WebSocketBaseContext = {
|
|
31
|
+
export type WebSocketBaseContext = {
|
|
33
32
|
readonly id: string;
|
|
34
33
|
readonly params: ParamsRecord;
|
|
35
34
|
readonly user: AuthUser | null;
|
|
@@ -37,14 +36,14 @@ type WebSocketBaseContext = {
|
|
|
37
36
|
readonly env: CloudEnv["Bindings"];
|
|
38
37
|
readonly storage: DurableObjectStorage;
|
|
39
38
|
};
|
|
40
|
-
type RoomContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
39
|
+
export type RoomContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
41
40
|
readonly room: RoomController<ServerEvent>;
|
|
42
41
|
readonly connection: WebSocketConnection<ServerEvent>;
|
|
43
42
|
};
|
|
44
|
-
type SocketContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
43
|
+
export type SocketContext<ServerEvent = unknown> = WebSocketBaseContext & {
|
|
45
44
|
readonly socket: WebSocketConnection<ServerEvent>;
|
|
46
45
|
};
|
|
47
|
-
type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
46
|
+
export type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
48
47
|
readonly __kind: "room";
|
|
49
48
|
readonly messages: {
|
|
50
49
|
client: ClientSchema;
|
|
@@ -60,7 +59,7 @@ type RoomDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, Se
|
|
|
60
59
|
}) => MaybePromise<void>;
|
|
61
60
|
onRequest?: (ctx: RoomContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
62
61
|
};
|
|
63
|
-
type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
62
|
+
export type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1, ServerSchema extends StandardSchemaV1 = StandardSchemaV1> = {
|
|
64
63
|
readonly __kind: "socket";
|
|
65
64
|
readonly messages: {
|
|
66
65
|
client: ClientSchema;
|
|
@@ -76,15 +75,15 @@ type SocketDefinition<ClientSchema extends StandardSchemaV1 = StandardSchemaV1,
|
|
|
76
75
|
}) => MaybePromise<void>;
|
|
77
76
|
onRequest?: (ctx: SocketContext<StandardSchemaV1.InferInput<ServerSchema>>) => MaybePromise<Response>;
|
|
78
77
|
};
|
|
79
|
-
type AnyWebSocketDefinition = RoomDefinition | SocketDefinition;
|
|
80
|
-
declare function defineRoom<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<RoomDefinition<ClientSchema, ServerSchema>, "__kind">): RoomDefinition<ClientSchema, ServerSchema>;
|
|
81
|
-
declare function defineWebSocket<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<SocketDefinition<ClientSchema, ServerSchema>, "__kind">): SocketDefinition<ClientSchema, ServerSchema>;
|
|
82
|
-
type VoidSocketCloseEvent = {
|
|
78
|
+
export type AnyWebSocketDefinition = RoomDefinition | SocketDefinition;
|
|
79
|
+
export declare function defineRoom<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<RoomDefinition<ClientSchema, ServerSchema>, "__kind">): RoomDefinition<ClientSchema, ServerSchema>;
|
|
80
|
+
export declare function defineWebSocket<ClientSchema extends StandardSchemaV1, ServerSchema extends StandardSchemaV1>(definition: Omit<SocketDefinition<ClientSchema, ServerSchema>, "__kind">): SocketDefinition<ClientSchema, ServerSchema>;
|
|
81
|
+
export type VoidSocketCloseEvent = {
|
|
83
82
|
code?: number;
|
|
84
83
|
reason?: string;
|
|
85
84
|
wasClean?: boolean;
|
|
86
85
|
};
|
|
87
|
-
type ConnectCommonOptions = {
|
|
86
|
+
export type ConnectCommonOptions = {
|
|
88
87
|
baseURL?: string;
|
|
89
88
|
reconnect?: boolean;
|
|
90
89
|
reconnectDelayMs?: number;
|
|
@@ -102,7 +101,7 @@ type ListenerMap<ServerEvent> = {
|
|
|
102
101
|
close: (event: VoidSocketCloseEvent) => void;
|
|
103
102
|
error: (error: unknown) => void;
|
|
104
103
|
};
|
|
105
|
-
declare class VoidSocket<P extends keyof WebSocketRouteMap & string> {
|
|
104
|
+
export declare class VoidSocket<P extends keyof WebSocketRouteMap & string> {
|
|
106
105
|
private readonly url;
|
|
107
106
|
private readonly options;
|
|
108
107
|
private socket;
|
|
@@ -117,7 +116,6 @@ declare class VoidSocket<P extends keyof WebSocketRouteMap & string> {
|
|
|
117
116
|
close(code?: number, reason?: string): void;
|
|
118
117
|
on<K extends keyof ListenerMap<ServerEventOf<P>>>(type: K, handler: ListenerMap<ServerEventOf<P>>[K]): () => void;
|
|
119
118
|
}
|
|
120
|
-
declare function connect<P extends keyof WebSocketRouteMap & string>(path: HasParams<P> extends false ? P : never): VoidSocket<P>;
|
|
121
|
-
declare function connect<P extends keyof WebSocketRouteMap & string>(path: P, options: ConnectOptions<P>): VoidSocket<P>;
|
|
122
|
-
//#endregion
|
|
123
|
-
export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, connect, defineRoom, defineWebSocket };
|
|
119
|
+
export declare function connect<P extends keyof WebSocketRouteMap & string>(path: HasParams<P> extends false ? P : never): VoidSocket<P>;
|
|
120
|
+
export declare function connect<P extends keyof WebSocketRouteMap & string>(path: P, options: ConnectOptions<P>): VoidSocket<P>;
|
|
121
|
+
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { n as globSync, t as glob } from "./dist-
|
|
4
|
-
import { c as isIdentifier, d as isObjectExpression, l as isLiteral, s as isCallExpression } from "./entry-
|
|
5
|
-
import { c as parseWebSocketFilename, o as isRouteEnabledForEnvironment, s as parseRouteFilename, t as scanPages } from "./scan-
|
|
1
|
+
import { a as isAbsolute, o as join, t as basename } from "./dist-BrsS7cai.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-SK8nMHPp.mjs";
|
|
3
|
+
import { n as globSync, t as glob } from "./dist-m40_XgNh.mjs";
|
|
4
|
+
import { c as isIdentifier, d as isObjectExpression, l as isLiteral, s as isCallExpression } from "./entry-DU3oDoQ3.mjs";
|
|
5
|
+
import { c as parseWebSocketFilename, o as isRouteEnabledForEnvironment, s as parseRouteFilename, t as scanPages } from "./scan-CpK-57ug.mjs";
|
|
6
|
+
import { i as scanEmailHandlers } from "./email-Ce6SQq-i.mjs";
|
|
6
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
8
|
import { pathToFileURL } from "node:url";
|
|
8
9
|
import { parseSync } from "vite";
|
|
@@ -56,7 +57,8 @@ function resolveDir(root, dir) {
|
|
|
56
57
|
function parseJobFiles(root, jobsDir, files) {
|
|
57
58
|
const jobsDirPath = resolveDir(root, jobsDir);
|
|
58
59
|
return files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
|
|
59
|
-
const
|
|
60
|
+
const absPath = join(jobsDirPath, filePath);
|
|
61
|
+
const source = readFileSync(absPath, "utf-8");
|
|
60
62
|
return {
|
|
61
63
|
filePath,
|
|
62
64
|
name: extractJobName(filePath),
|
|
@@ -65,7 +67,8 @@ function parseJobFiles(root, jobsDir, files) {
|
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
69
|
async function scanJobs(root, jobsDir = "crons") {
|
|
68
|
-
|
|
70
|
+
const pattern = `**/*.{${JOB_EXTENSIONS.join(",")}}`;
|
|
71
|
+
return parseJobFiles(root, jobsDir, await glob(pattern, {
|
|
69
72
|
cwd: resolveDir(root, jobsDir),
|
|
70
73
|
absolute: false
|
|
71
74
|
}).catch(() => []));
|
|
@@ -92,9 +95,9 @@ const QUEUE_EXTENSIONS = [
|
|
|
92
95
|
"mjs"
|
|
93
96
|
];
|
|
94
97
|
function extractName(filePath) {
|
|
95
|
-
return filePath.replace(/\.[^.]+$/, "");
|
|
98
|
+
return filePath.replace(/\.[^.]+$/, "").replaceAll("/", "-");
|
|
96
99
|
}
|
|
97
|
-
function
|
|
100
|
+
function deriveQueueBindingName(name) {
|
|
98
101
|
return "QUEUE_" + name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
99
102
|
}
|
|
100
103
|
function extractConsumerOption(source, name) {
|
|
@@ -104,23 +107,39 @@ function extractConsumerOption(source, name) {
|
|
|
104
107
|
}
|
|
105
108
|
function parseQueueFiles(root, queuesDir, files) {
|
|
106
109
|
const queuesDirPath = isAbsolute(queuesDir) ? queuesDir : join(root, queuesDir);
|
|
107
|
-
|
|
108
|
-
const
|
|
110
|
+
const definitions = files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort().map((filePath) => {
|
|
111
|
+
const absPath = join(queuesDirPath, filePath);
|
|
112
|
+
const source = readFileSync(absPath, "utf-8");
|
|
109
113
|
const name = extractName(filePath);
|
|
110
114
|
return {
|
|
111
115
|
filePath,
|
|
112
116
|
name,
|
|
113
|
-
bindingName:
|
|
117
|
+
bindingName: deriveQueueBindingName(name),
|
|
114
118
|
maxBatchSize: extractConsumerOption(source, "maxBatchSize"),
|
|
115
119
|
maxBatchTimeout: extractConsumerOption(source, "maxBatchTimeout"),
|
|
116
120
|
maxRetries: extractConsumerOption(source, "maxRetries"),
|
|
117
121
|
retryDelay: extractConsumerOption(source, "retryDelay")
|
|
118
122
|
};
|
|
119
123
|
});
|
|
124
|
+
const filesByName = /* @__PURE__ */ new Map();
|
|
125
|
+
for (const definition of definitions) {
|
|
126
|
+
const matchingFiles = filesByName.get(definition.name) ?? [];
|
|
127
|
+
matchingFiles.push(definition.filePath);
|
|
128
|
+
filesByName.set(definition.name, matchingFiles);
|
|
129
|
+
}
|
|
130
|
+
const collisions = [...filesByName].filter(([, matchingFiles]) => matchingFiles.length > 1).sort(([leftName], [rightName]) => leftName < rightName ? -1 : leftName > rightName ? 1 : 0).map(([name, matchingFiles]) => ` ${JSON.stringify(name)}: ${matchingFiles.map((file) => JSON.stringify(file)).join(", ")}`);
|
|
131
|
+
if (collisions.length > 0) throw new Error([
|
|
132
|
+
"queue: Multiple queue files resolve to the same queue name:",
|
|
133
|
+
...collisions,
|
|
134
|
+
"Rename the conflicting files so each queue has a unique name."
|
|
135
|
+
].join("\n"));
|
|
136
|
+
return definitions;
|
|
120
137
|
}
|
|
121
138
|
async function scanQueues(root, queuesDir = "queues") {
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
const pattern = `**/*.{${QUEUE_EXTENSIONS.join(",")}}`;
|
|
140
|
+
const queuesDirPath = isAbsolute(queuesDir) ? queuesDir : join(root, queuesDir);
|
|
141
|
+
return parseQueueFiles(root, queuesDir, await glob(pattern, {
|
|
142
|
+
cwd: queuesDirPath,
|
|
124
143
|
absolute: false
|
|
125
144
|
}).catch(() => []));
|
|
126
145
|
}
|
|
@@ -128,8 +147,9 @@ function scanQueuesSync(root, queuesDir = "queues") {
|
|
|
128
147
|
const pattern = `**/*.{${QUEUE_EXTENSIONS.join(",")}}`;
|
|
129
148
|
let files;
|
|
130
149
|
try {
|
|
150
|
+
const queuesDirPath = isAbsolute(queuesDir) ? queuesDir : join(root, queuesDir);
|
|
131
151
|
files = globSync(pattern, {
|
|
132
|
-
cwd:
|
|
152
|
+
cwd: queuesDirPath,
|
|
133
153
|
absolute: false
|
|
134
154
|
});
|
|
135
155
|
} catch {
|
|
@@ -268,7 +288,8 @@ function parseWebSocketFiles(root, files, paths = readProjectPaths(root), enviro
|
|
|
268
288
|
});
|
|
269
289
|
}
|
|
270
290
|
async function scanWebSocketRoutes(root, paths = readProjectPaths(root), environment) {
|
|
271
|
-
|
|
291
|
+
const pattern = `**/*.{${HANDLER_EXTENSIONS.join(",")}}`;
|
|
292
|
+
return parseWebSocketFiles(root, await glob(pattern, {
|
|
272
293
|
cwd: paths.routesDir,
|
|
273
294
|
absolute: false
|
|
274
295
|
}).catch(() => []), paths, environment);
|
|
@@ -324,7 +345,7 @@ function compareRouteSpecificity(a, b) {
|
|
|
324
345
|
*/
|
|
325
346
|
async function scanRoutes(root, options) {
|
|
326
347
|
const paths = options?.paths ?? readProjectPaths(root);
|
|
327
|
-
const [routeFiles, websockets, middlewareFiles, jobs, queues, pages] = await Promise.all([
|
|
348
|
+
const [routeFiles, websockets, middlewareFiles, jobs, queues, pages, email] = await Promise.all([
|
|
328
349
|
glob(ROUTE_PATTERN, {
|
|
329
350
|
cwd: paths.routesDir,
|
|
330
351
|
absolute: false
|
|
@@ -339,7 +360,8 @@ async function scanRoutes(root, options) {
|
|
|
339
360
|
scanPages(root, {
|
|
340
361
|
output: options?.output,
|
|
341
362
|
paths
|
|
342
|
-
})
|
|
363
|
+
}),
|
|
364
|
+
scanEmailHandlers(paths.sourceRoot)
|
|
343
365
|
]);
|
|
344
366
|
const routesDir = paths.routesDir;
|
|
345
367
|
return {
|
|
@@ -351,7 +373,8 @@ async function scanRoutes(root, options) {
|
|
|
351
373
|
middleware: parseMiddlewareDefinitions(middlewareFiles),
|
|
352
374
|
jobs,
|
|
353
375
|
queues,
|
|
354
|
-
pages
|
|
376
|
+
pages,
|
|
377
|
+
email
|
|
355
378
|
};
|
|
356
379
|
}
|
|
357
380
|
function scanMiddlewareSync(root, paths = readProjectPaths(root)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { t as glob } from "./dist-
|
|
1
|
+
import { i as extname, n as dirname, o as join, t as basename } from "./dist-BrsS7cai.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-SK8nMHPp.mjs";
|
|
3
|
+
import { t as glob } from "./dist-m40_XgNh.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/router/parse-filename.ts
|
|
6
6
|
const EXTENSIONS = [
|
|
@@ -194,7 +194,8 @@ async function scanPages(root, options) {
|
|
|
194
194
|
layouts: [],
|
|
195
195
|
namedLayouts: []
|
|
196
196
|
};
|
|
197
|
-
const
|
|
197
|
+
const pattern = `**/*.{${COMPONENT_EXTENSIONS.join(",")}}`;
|
|
198
|
+
const files = await glob(pattern, {
|
|
198
199
|
cwd: pagesDir,
|
|
199
200
|
absolute: false
|
|
200
201
|
});
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as
|
|
3
|
-
import {
|
|
1
|
+
import { A as password, C as cancel, D as log, E as intro, F as isCancel, O as note, k as outro, r as cliTitle, w as confirm } from "./output-tFQLLj26.mjs";
|
|
2
|
+
import { b as readDeploymentPlatform, c as getToken, x as readProjectConfig } from "./auth-W9WII-mN.mjs";
|
|
3
|
+
import { m as validateSecretValues } from "./env-validation-ENpMy6Ez.mjs";
|
|
4
|
+
import { n as PlatformClient } from "./client-CyCHWSO_.mjs";
|
|
5
|
+
import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project--Vxawf7z.mjs";
|
|
4
6
|
import { readFileSync } from "node:fs";
|
|
5
7
|
//#region src/cli/secret.ts
|
|
6
8
|
async function runSecretCommand(root, args) {
|
|
7
9
|
console.log();
|
|
8
10
|
intro(cliTitle("secret"));
|
|
11
|
+
const platform = readDeploymentPlatform(root);
|
|
12
|
+
if (platform === "cloudflare") return runCloudflareSecretCommand(root, args);
|
|
13
|
+
if (platform === "none") throw new Error("secret: Deployment is disabled. Run `void init` to choose a platform.");
|
|
9
14
|
const token = getToken(root);
|
|
10
15
|
if (!token) {
|
|
11
16
|
log.error("Not logged in. Run `void auth login` first.");
|
|
@@ -15,7 +20,8 @@ async function runSecretCommand(root, args) {
|
|
|
15
20
|
const requestedProjectName = getRequestedProjectSlug({ projectSlug: args.projectName });
|
|
16
21
|
let projectId;
|
|
17
22
|
if (requestedProjectName) {
|
|
18
|
-
const
|
|
23
|
+
const projects = await client.listProjects();
|
|
24
|
+
const config = resolveProjectBySlug(projects, requestedProjectName);
|
|
19
25
|
if (!config) throw new Error(`secret: No project found with slug '${requestedProjectName}'.`);
|
|
20
26
|
projectId = config.projectId;
|
|
21
27
|
} else {
|
|
@@ -35,6 +41,10 @@ async function runSecretCommand(root, args) {
|
|
|
35
41
|
}
|
|
36
42
|
if (args.action === "put") {
|
|
37
43
|
const value = args.value ?? await readSecretValue();
|
|
44
|
+
await validateSecretValues(root, [{
|
|
45
|
+
name: args.name,
|
|
46
|
+
value
|
|
47
|
+
}]);
|
|
38
48
|
await client.setSecret(projectId, args.name, value);
|
|
39
49
|
outro(`Secret ${args.name} set.`);
|
|
40
50
|
return;
|
|
@@ -46,6 +56,7 @@ async function runSecretCommand(root, args) {
|
|
|
46
56
|
outro("Nothing to sync.");
|
|
47
57
|
return;
|
|
48
58
|
}
|
|
59
|
+
await validateSecretValues(root, secrets);
|
|
49
60
|
log.info(`Found ${secrets.length} secret(s):`);
|
|
50
61
|
for (const s of secrets) log.message(` ${s.name}`);
|
|
51
62
|
const proceed = await confirm({ message: `This will overwrite ${secrets.length} secret(s) in the remote environment. Continue?` });
|
|
@@ -63,6 +74,52 @@ async function runSecretCommand(root, args) {
|
|
|
63
74
|
await client.deleteSecret(projectId, args.name);
|
|
64
75
|
outro(`Secret ${args.name} deleted.`);
|
|
65
76
|
}
|
|
77
|
+
async function runCloudflareSecretCommand(root, args) {
|
|
78
|
+
if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
|
|
79
|
+
const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-CPTpRW6d.mjs").then((n) => n.t);
|
|
80
|
+
const context = resolveCloudflareOperationContext(root);
|
|
81
|
+
if (args.action === "list") {
|
|
82
|
+
const secrets = await listCloudflareSecrets(context);
|
|
83
|
+
if (secrets.length === 0) {
|
|
84
|
+
outro("No secrets set.");
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
note(secrets.map((name) => ` ${name}`).join("\n"), "Secrets");
|
|
88
|
+
outro(`${secrets.length} secret(s)`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (args.action === "put") {
|
|
92
|
+
const value = args.value ?? await readSecretValue();
|
|
93
|
+
await validateSecretValues(root, [{
|
|
94
|
+
name: args.name,
|
|
95
|
+
value
|
|
96
|
+
}]);
|
|
97
|
+
await putCloudflareSecret(context, args.name, value);
|
|
98
|
+
outro(`Secret ${args.name} set.`);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (args.action === "sync") {
|
|
102
|
+
const secrets = parseDotenvFile(args.file);
|
|
103
|
+
if (secrets.length === 0) {
|
|
104
|
+
log.warn("No secrets found in file.");
|
|
105
|
+
outro("Nothing to sync.");
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
await validateSecretValues(root, secrets);
|
|
109
|
+
log.info(`Found ${secrets.length} secret(s):`);
|
|
110
|
+
for (const secret of secrets) log.message(` ${secret.name}`);
|
|
111
|
+
const proceed = await confirm({ message: `This will overwrite ${secrets.length} secret(s) in the Cloudflare Worker. Continue?` });
|
|
112
|
+
if (isCancel(proceed) || !proceed) {
|
|
113
|
+
cancel("Secret sync cancelled.");
|
|
114
|
+
process.exit(0);
|
|
115
|
+
}
|
|
116
|
+
await syncCloudflareSecrets(context, secrets);
|
|
117
|
+
outro(`Synced ${secrets.length} secret(s).`);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
await deleteCloudflareSecret(context, args.name);
|
|
121
|
+
outro(`Secret ${args.name} deleted.`);
|
|
122
|
+
}
|
|
66
123
|
const SECRET_KEY_RE = /^[A-Z][A-Z0-9_]*$/;
|
|
67
124
|
function parseDotenvFile(filePath) {
|
|
68
125
|
const content = readFileSync(filePath, "utf-8");
|
|
@@ -95,7 +152,7 @@ async function readSecretValue() {
|
|
|
95
152
|
message: "Enter secret value:",
|
|
96
153
|
mask: "*"
|
|
97
154
|
});
|
|
98
|
-
if (isCancel(result)) {
|
|
155
|
+
if (isCancel(result) || typeof result === "symbol") {
|
|
99
156
|
cancel("Secret command cancelled.");
|
|
100
157
|
process.exit(0);
|
|
101
158
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as relative, o as join } from "./dist-BrsS7cai.mjs";
|
|
2
|
+
import { D as log, p as getPackageDir } from "./output-tFQLLj26.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, readdirSync, readlinkSync, symlinkSync } from "node:fs";
|
|
4
4
|
//#region src/cli/skills.ts
|
|
5
5
|
function parseSkills(skillsDir) {
|
|
@@ -28,7 +28,8 @@ function linkSkills(root, skillsDir, skills, agentSkillsDir) {
|
|
|
28
28
|
let linked = 0;
|
|
29
29
|
for (const skill of skills) {
|
|
30
30
|
const linkPath = join(targetDir, skill.dirName);
|
|
31
|
-
const
|
|
31
|
+
const sourcePath = join(skillsDir, skill.dirName);
|
|
32
|
+
const relativeTarget = relative(targetDir, sourcePath);
|
|
32
33
|
if (existsSync(linkPath)) {
|
|
33
34
|
try {
|
|
34
35
|
if (readlinkSync(linkPath) === relativeTarget) {
|
|
@@ -46,7 +47,8 @@ function linkSkills(root, skillsDir, skills, agentSkillsDir) {
|
|
|
46
47
|
return linked;
|
|
47
48
|
}
|
|
48
49
|
function linkSkillsForSpecificAgents(root, agents) {
|
|
49
|
-
const
|
|
50
|
+
const packageDir = getPackageDir();
|
|
51
|
+
const skillsDir = join(packageDir, "skills");
|
|
50
52
|
const skills = parseSkills(skillsDir);
|
|
51
53
|
if (skills.length === 0) return 0;
|
|
52
54
|
if (agents.length === 0) return 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/standard-schema.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Standard Schema V1 types, inlined from the spec.
|
|
4
|
-
* https://github.com/standard-schema/standard-schema
|
|
5
|
-
*
|
|
6
|
-
* Per the spec's design, libraries may copy these types directly
|
|
7
|
-
* to avoid requiring `@standard-schema/spec` as a dependency.
|
|
8
|
-
*/
|
|
3
|
+
* Standard Schema V1 types, inlined from the spec.
|
|
4
|
+
* https://github.com/standard-schema/standard-schema
|
|
5
|
+
*
|
|
6
|
+
* Per the spec's design, libraries may copy these types directly
|
|
7
|
+
* to avoid requiring `@standard-schema/spec` as a dependency.
|
|
8
|
+
*/
|
|
9
9
|
type StandardSchemaV1<Input = unknown, Output = Input> = {
|
|
10
10
|
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as wrapAnsi, S as S_STEP_SUBMIT, _ as S_CHECKBOX_INACTIVE, b as S_RADIO_INACTIVE, c as import_picocolors, g as S_CHECKBOX_ACTIVE, h as S_BAR_END, m as S_BAR, x as S_STEP_ACTIVE, y as S_RADIO_ACTIVE } from "./output-tFQLLj26.mjs";
|
|
2
2
|
//#region src/cli/subcommand-prompt.ts
|
|
3
3
|
function promptSubcommand(command, subcommands) {
|
|
4
4
|
return new Promise((resolve) => {
|
|
@@ -6,7 +6,7 @@ function promptSubcommand(command, subcommands) {
|
|
|
6
6
|
let phase = "select";
|
|
7
7
|
let cursor = 0;
|
|
8
8
|
let input = "";
|
|
9
|
-
let
|
|
9
|
+
let previousFrame = "";
|
|
10
10
|
let resolved = false;
|
|
11
11
|
let selectedSub = null;
|
|
12
12
|
let selectedArg;
|
|
@@ -20,9 +20,45 @@ function promptSubcommand(command, subcommands) {
|
|
|
20
20
|
stdin.resume();
|
|
21
21
|
stdout.write("\x1B[?25l");
|
|
22
22
|
function clear() {
|
|
23
|
-
if (
|
|
23
|
+
if (previousFrame) {
|
|
24
|
+
const rows = wrapAnsi(previousFrame, stdout.columns || 80, {
|
|
25
|
+
hard: true,
|
|
26
|
+
trim: false
|
|
27
|
+
}).split("\n").length;
|
|
28
|
+
stdout.write(`\x1B[${rows}A\r\x1B[0J`);
|
|
29
|
+
previousFrame = "";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function truncate(text, columns = (stdout.columns || 80) - 1, tail = false) {
|
|
33
|
+
const width = Math.max(1, columns - 1);
|
|
34
|
+
const wrap = (value) => wrapAnsi(value, width, {
|
|
35
|
+
hard: true,
|
|
36
|
+
trim: false
|
|
37
|
+
});
|
|
38
|
+
const lines = wrap(text).split("\n");
|
|
39
|
+
if (lines.length === 1) return lines[0];
|
|
40
|
+
if (tail) {
|
|
41
|
+
const suffix = Array.from(text).slice(-width);
|
|
42
|
+
while (wrap(suffix.join("")).includes("\n")) suffix.shift();
|
|
43
|
+
return `…${suffix.join("")}`;
|
|
44
|
+
}
|
|
45
|
+
return `${lines[0]}…`;
|
|
46
|
+
}
|
|
47
|
+
function writeFrame(header, options, footer) {
|
|
48
|
+
const count = Math.max(1, Math.min(7, (stdout.rows || 24) - footer.length - 5));
|
|
49
|
+
const start = Math.max(0, Math.min(cursor - Math.floor(count / 2), options.length - count));
|
|
50
|
+
previousFrame = [
|
|
51
|
+
truncate(header),
|
|
52
|
+
import_picocolors.default.gray(S_BAR),
|
|
53
|
+
...options.slice(start, start + count).map((option) => truncate(option)),
|
|
54
|
+
import_picocolors.default.gray(S_BAR),
|
|
55
|
+
...footer.map((line) => truncate(line)),
|
|
56
|
+
import_picocolors.default.gray(S_BAR_END)
|
|
57
|
+
].join("\n");
|
|
58
|
+
stdout.write(previousFrame + "\n");
|
|
24
59
|
}
|
|
25
60
|
function render() {
|
|
61
|
+
if (resolved) return;
|
|
26
62
|
clear();
|
|
27
63
|
if (phase === "select") renderSelect();
|
|
28
64
|
else if (phase === "flags") renderFlags();
|
|
@@ -37,8 +73,6 @@ function promptSubcommand(command, subcommands) {
|
|
|
37
73
|
function renderSelect() {
|
|
38
74
|
const lines = [];
|
|
39
75
|
const focused = subcommands[cursor];
|
|
40
|
-
lines.push(`${import_picocolors.default.cyan(S_STEP_ACTIVE)} ${import_picocolors.default.cyan(title)}`);
|
|
41
|
-
lines.push(import_picocolors.default.gray(S_BAR));
|
|
42
76
|
const maxName = Math.max(...subcommands.map((s) => s.name.length));
|
|
43
77
|
for (let i = 0; i < subcommands.length; i++) {
|
|
44
78
|
const sub = subcommands[i];
|
|
@@ -46,26 +80,24 @@ function promptSubcommand(command, subcommands) {
|
|
|
46
80
|
const radio = isFocused ? import_picocolors.default.green(S_RADIO_ACTIVE) : import_picocolors.default.dim(S_RADIO_INACTIVE);
|
|
47
81
|
const name = sub.name.padEnd(maxName);
|
|
48
82
|
let suffix = "";
|
|
49
|
-
if (sub.arg)
|
|
50
|
-
|
|
51
|
-
|
|
83
|
+
if (sub.arg) {
|
|
84
|
+
if (isFocused && input.length > 0) suffix = ` ${import_picocolors.default.cyan(truncate(input, (stdout.columns || 80) - maxName - 9, true))}`;
|
|
85
|
+
else suffix = ` ${import_picocolors.default.dim(sub.arg)}`;
|
|
86
|
+
} else if (sub.hint) suffix = ` ${import_picocolors.default.dim(sub.hint)}`;
|
|
52
87
|
if (isFocused) lines.push(`${import_picocolors.default.gray(S_BAR)} ${radio} ${import_picocolors.default.reset(name)}${suffix}`);
|
|
53
88
|
else lines.push(`${import_picocolors.default.gray(S_BAR)} ${radio} ${import_picocolors.default.dim(name)}${suffix}`);
|
|
54
89
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
prevLineCount = lines.length;
|
|
90
|
+
const footer = [`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(focused.description)}`];
|
|
91
|
+
if (focused.arg) {
|
|
92
|
+
if (focused.arg.startsWith("<")) footer.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(`Type ${focused.arg}, then press Enter`)}`);
|
|
93
|
+
else footer.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(`Type ${focused.arg}, then press Enter, or press Enter to skip`)}`);
|
|
94
|
+
}
|
|
95
|
+
writeFrame(`${import_picocolors.default.cyan(S_STEP_ACTIVE)} ${import_picocolors.default.cyan(title)}`, lines, footer);
|
|
62
96
|
}
|
|
63
97
|
function renderFlags() {
|
|
64
98
|
const flags = selectedSub.flags;
|
|
65
99
|
const focused = flags[cursor];
|
|
66
100
|
const lines = [];
|
|
67
|
-
lines.push(headerLine());
|
|
68
|
-
lines.push(import_picocolors.default.gray(S_BAR));
|
|
69
101
|
const maxFlag = Math.max(...flags.map((f) => f.name.length));
|
|
70
102
|
for (let i = 0; i < flags.length; i++) {
|
|
71
103
|
const flag = flags[i];
|
|
@@ -74,22 +106,20 @@ function promptSubcommand(command, subcommands) {
|
|
|
74
106
|
const checkbox = state.enabled ? import_picocolors.default.green(S_CHECKBOX_ACTIVE) : isFocused ? S_CHECKBOX_INACTIVE : import_picocolors.default.dim(S_CHECKBOX_INACTIVE);
|
|
75
107
|
const name = flag.name.padEnd(maxFlag);
|
|
76
108
|
let valueText = "";
|
|
77
|
-
if (flag.arg)
|
|
78
|
-
|
|
109
|
+
if (flag.arg) {
|
|
110
|
+
if (state.enabled && state.value.length > 0) {
|
|
111
|
+
const value = truncate(state.value, (stdout.columns || 80) - maxFlag - 9, true);
|
|
112
|
+
valueText = ` ${isFocused ? import_picocolors.default.cyan(value) : import_picocolors.default.dim(value)}`;
|
|
113
|
+
} else valueText = ` ${import_picocolors.default.dim(flag.arg)}`;
|
|
114
|
+
}
|
|
79
115
|
if (isFocused) lines.push(`${import_picocolors.default.gray(S_BAR)} ${checkbox} ${import_picocolors.default.reset(name)}${valueText}`);
|
|
80
116
|
else lines.push(`${import_picocolors.default.gray(S_BAR)} ${checkbox} ${import_picocolors.default.dim(name)}${valueText}`);
|
|
81
117
|
}
|
|
82
|
-
lines
|
|
83
|
-
lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(focused.description)}`);
|
|
84
|
-
lines.push(import_picocolors.default.gray(S_BAR_END));
|
|
85
|
-
stdout.write(lines.join("\n") + "\n");
|
|
86
|
-
prevLineCount = lines.length;
|
|
118
|
+
writeFrame(headerLine(), lines, [`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(focused.description)}`]);
|
|
87
119
|
}
|
|
88
120
|
function renderMultiSelect() {
|
|
89
121
|
const options = selectedSub.followUp.options;
|
|
90
122
|
const lines = [];
|
|
91
|
-
lines.push(headerLine());
|
|
92
|
-
lines.push(import_picocolors.default.gray(S_BAR));
|
|
93
123
|
const maxLabel = Math.max(...options.map((o) => o.label.length));
|
|
94
124
|
for (let i = 0; i < options.length; i++) {
|
|
95
125
|
const opt = options[i];
|
|
@@ -100,25 +130,16 @@ function promptSubcommand(command, subcommands) {
|
|
|
100
130
|
if (isFocused) lines.push(`${import_picocolors.default.gray(S_BAR)} ${checkbox} ${import_picocolors.default.reset(label)}`);
|
|
101
131
|
else lines.push(`${import_picocolors.default.gray(S_BAR)} ${checkbox} ${import_picocolors.default.dim(label)}`);
|
|
102
132
|
}
|
|
103
|
-
lines
|
|
104
|
-
lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim("space to toggle, enter to confirm")}`);
|
|
105
|
-
lines.push(import_picocolors.default.gray(S_BAR_END));
|
|
106
|
-
stdout.write(lines.join("\n") + "\n");
|
|
107
|
-
prevLineCount = lines.length;
|
|
133
|
+
writeFrame(headerLine(), lines, [`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim("space to toggle, enter to confirm")}`]);
|
|
108
134
|
}
|
|
109
135
|
function renderRepeatInput() {
|
|
110
136
|
const followUp = selectedSub.followUp;
|
|
111
137
|
const lines = [];
|
|
112
|
-
lines.push(headerLine());
|
|
113
|
-
lines.push(import_picocolors.default.gray(S_BAR));
|
|
114
138
|
for (const entry of repeatEntries) lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(entry)}`);
|
|
115
|
-
if (repeatInput.length > 0) lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.cyan(repeatInput)}`);
|
|
139
|
+
if (repeatInput.length > 0) lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.cyan(truncate(repeatInput, (stdout.columns || 80) - 4, true))}`);
|
|
116
140
|
else lines.push(`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim(followUp.placeholder)}`);
|
|
117
|
-
lines.
|
|
118
|
-
lines
|
|
119
|
-
lines.push(import_picocolors.default.gray(S_BAR_END));
|
|
120
|
-
stdout.write(lines.join("\n") + "\n");
|
|
121
|
-
prevLineCount = lines.length;
|
|
141
|
+
cursor = lines.length - 1;
|
|
142
|
+
writeFrame(headerLine(), lines, [`${import_picocolors.default.gray(S_BAR)} ${import_picocolors.default.dim("enter to add, empty to finish")}`]);
|
|
122
143
|
}
|
|
123
144
|
function cleanup() {
|
|
124
145
|
if (resolved) return;
|
|
@@ -126,6 +147,8 @@ function promptSubcommand(command, subcommands) {
|
|
|
126
147
|
stdin.setRawMode(wasRaw);
|
|
127
148
|
stdin.pause();
|
|
128
149
|
stdin.removeListener("data", onData);
|
|
150
|
+
stdout.removeListener("resize", render);
|
|
151
|
+
process.removeListener("exit", onExit);
|
|
129
152
|
stdout.write("\x1B[?25h");
|
|
130
153
|
}
|
|
131
154
|
function submit(result) {
|
|
@@ -200,7 +223,6 @@ function promptSubcommand(command, subcommands) {
|
|
|
200
223
|
if (focused.arg && focused.arg.startsWith("<") && input.length === 0) return;
|
|
201
224
|
selectedSub = focused;
|
|
202
225
|
selectedArg = focused.arg ? input || void 0 : void 0;
|
|
203
|
-
clear();
|
|
204
226
|
advancePhase();
|
|
205
227
|
return;
|
|
206
228
|
}
|
|
@@ -239,7 +261,6 @@ function promptSubcommand(command, subcommands) {
|
|
|
239
261
|
if (key === "\r" || key === "\n") {
|
|
240
262
|
for (let i = 0; i < flags.length; i++) if (flagStates[i].enabled && flags[i].arg && flagStates[i].value.length === 0) return;
|
|
241
263
|
for (let i = 0; i < flags.length; i++) if (flagStates[i].enabled) selectedFlags[flags[i].name] = flags[i].arg ? flagStates[i].value : true;
|
|
242
|
-
clear();
|
|
243
264
|
advancePhase();
|
|
244
265
|
return;
|
|
245
266
|
}
|
|
@@ -278,7 +299,6 @@ function promptSubcommand(command, subcommands) {
|
|
|
278
299
|
const selected = options.filter((_, i) => multiSelectStates[i]);
|
|
279
300
|
if (selected.length === 0) return;
|
|
280
301
|
selectedFlags[followUp.flag] = selected.map((o) => o.value).join(",");
|
|
281
|
-
clear();
|
|
282
302
|
finalize();
|
|
283
303
|
return;
|
|
284
304
|
}
|
|
@@ -289,10 +309,7 @@ function promptSubcommand(command, subcommands) {
|
|
|
289
309
|
repeatEntries.push(repeatInput);
|
|
290
310
|
repeatInput = "";
|
|
291
311
|
render();
|
|
292
|
-
} else
|
|
293
|
-
clear();
|
|
294
|
-
finalize();
|
|
295
|
-
}
|
|
312
|
+
} else finalize();
|
|
296
313
|
return;
|
|
297
314
|
}
|
|
298
315
|
if (key === "" || key === "\b") {
|
|
@@ -338,9 +355,11 @@ function promptSubcommand(command, subcommands) {
|
|
|
338
355
|
}
|
|
339
356
|
}
|
|
340
357
|
stdin.on("data", onData);
|
|
341
|
-
|
|
358
|
+
stdout.on("resize", render);
|
|
359
|
+
function onExit() {
|
|
342
360
|
if (!resolved) stdout.write("\x1B[?25h");
|
|
343
|
-
}
|
|
361
|
+
}
|
|
362
|
+
process.on("exit", onExit);
|
|
344
363
|
render();
|
|
345
364
|
});
|
|
346
365
|
}
|