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,398 +0,0 @@
|
|
|
1
|
-
# ofetch
|
|
2
|
-
|
|
3
|
-
<!-- automd:badges -->
|
|
4
|
-
|
|
5
|
-
[](https://npmjs.com/package/ofetch)
|
|
6
|
-
[](https://npm.chart.dev/ofetch)
|
|
7
|
-
|
|
8
|
-
<!-- /automd -->
|
|
9
|
-
|
|
10
|
-
A better fetch API. Works on node, browser, and workers.
|
|
11
|
-
|
|
12
|
-
> [!IMPORTANT]
|
|
13
|
-
> You are on v2 (alpha) development branch. See [v1](https://github.com/unjs/ofetch/tree/v1) for v1 docs.
|
|
14
|
-
|
|
15
|
-
<details>
|
|
16
|
-
<summary>Spoiler</summary>
|
|
17
|
-
<img src="https://media.giphy.com/media/Dn1QRA9hqMcoMz9zVZ/giphy.gif">
|
|
18
|
-
</details>
|
|
19
|
-
|
|
20
|
-
## 🚀 Quick Start
|
|
21
|
-
|
|
22
|
-
Install:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npx nypm i ofetch
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Import:
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
import { ofetch } from "ofetch";
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## ✔️ Parsing Response
|
|
35
|
-
|
|
36
|
-
`ofetch` smartly parse JSON responses.
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
const { users } = await ofetch("/api/users");
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
For binary content types, `ofetch` will instead return a `Blob` object.
|
|
43
|
-
|
|
44
|
-
You can optionally provide a different parser than `JSON.parse`, or specify `blob`, `arrayBuffer`, `text` or `stream` to force parsing the body with the respective `FetchResponse` method.
|
|
45
|
-
|
|
46
|
-
```js
|
|
47
|
-
// Return text as is
|
|
48
|
-
await ofetch("/movie?lang=en", { parseResponse: (txt) => txt });
|
|
49
|
-
|
|
50
|
-
// Get the blob version of the response
|
|
51
|
-
await ofetch("/api/generate-image", { responseType: "blob" });
|
|
52
|
-
|
|
53
|
-
// Get the stream version of the response
|
|
54
|
-
await ofetch("/api/generate-image", { responseType: "stream" });
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## ✔️ JSON Body
|
|
58
|
-
|
|
59
|
-
If an object or a class with a `.toJSON()` method is passed to the `body` option, `ofetch` automatically stringifies it.
|
|
60
|
-
|
|
61
|
-
`ofetch` utilizes `JSON.stringify()` to convert the passed object. Classes without a `.toJSON()` method have to be converted into a string value in advance before being passed to the `body` option.
|
|
62
|
-
|
|
63
|
-
For `PUT`, `PATCH`, and `POST` request methods, when a string or object body is set, `ofetch` adds the default `"content-type": "application/json"` and `accept: "application/json"` headers (which you can always override).
|
|
64
|
-
|
|
65
|
-
Additionally, `ofetch` supports binary responses with `Buffer`, `ReadableStream`, `Stream`, and [compatible body types](https://developer.mozilla.org/en-US/docs/Web/API/fetch#body). `ofetch` will automatically set the `duplex: "half"` option for streaming support!
|
|
66
|
-
|
|
67
|
-
**Example:**
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
const { users } = await ofetch("/api/users", {
|
|
71
|
-
method: "POST",
|
|
72
|
-
body: { some: "json" },
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## ✔️ Handling Errors
|
|
77
|
-
|
|
78
|
-
`ofetch` Automatically throws errors when `response.ok` is `false` with a friendly error message and compact stack (hiding internals).
|
|
79
|
-
|
|
80
|
-
A parsed error body is available with `error.data`. You may also use `FetchError` type.
|
|
81
|
-
|
|
82
|
-
```ts
|
|
83
|
-
await ofetch("https://google.com/404");
|
|
84
|
-
// FetchError: [GET] "https://google/404": 404 Not Found
|
|
85
|
-
// at async main (/project/playground.ts:4:3)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
To catch error response:
|
|
89
|
-
|
|
90
|
-
```ts
|
|
91
|
-
await ofetch("/url").catch((error) => error.data);
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
To bypass status error catching you can set `ignoreResponseError` option:
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
await ofetch("/url", { ignoreResponseError: true });
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## ✔️ Auto Retry
|
|
101
|
-
|
|
102
|
-
`ofetch` Automatically retries the request if an error happens and if the response status code is included in `retryStatusCodes` list:
|
|
103
|
-
|
|
104
|
-
**Retry status codes:**
|
|
105
|
-
|
|
106
|
-
- `408` - Request Timeout
|
|
107
|
-
- `409` - Conflict
|
|
108
|
-
- `425` - Too Early ([Experimental](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Early-Data))
|
|
109
|
-
- `429` - Too Many Requests
|
|
110
|
-
- `500` - Internal Server Error
|
|
111
|
-
- `502` - Bad Gateway
|
|
112
|
-
- `503` - Service Unavailable
|
|
113
|
-
- `504` - Gateway Timeout
|
|
114
|
-
|
|
115
|
-
You can specify the amount of retry and delay between them using `retry` and `retryDelay` options and also pass a custom array of codes using `retryStatusCodes` option.
|
|
116
|
-
|
|
117
|
-
The default for `retry` is `1` retry, except for `POST`, `PUT`, `PATCH`, and `DELETE` methods where `ofetch` does not retry by default to avoid introducing side effects. If you set a custom value for `retry` it will **always retry** for all requests.
|
|
118
|
-
|
|
119
|
-
The default for `retryDelay` is `0` ms.
|
|
120
|
-
|
|
121
|
-
```ts
|
|
122
|
-
await ofetch("http://google.com/404", {
|
|
123
|
-
retry: 3,
|
|
124
|
-
retryDelay: 500, // ms
|
|
125
|
-
retryStatusCodes: [404, 500], // response status codes to retry
|
|
126
|
-
});
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## ✔️ Timeout
|
|
130
|
-
|
|
131
|
-
You can specify `timeout` in milliseconds to automatically abort a request after a timeout (default is disabled).
|
|
132
|
-
|
|
133
|
-
```ts
|
|
134
|
-
await ofetch("http://google.com/404", {
|
|
135
|
-
timeout: 3000, // Timeout after 3 seconds
|
|
136
|
-
});
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## ✔️ Type Friendly
|
|
140
|
-
|
|
141
|
-
The response can be type assisted:
|
|
142
|
-
|
|
143
|
-
```ts
|
|
144
|
-
const article = await ofetch<Article>(`/api/article/${id}`);
|
|
145
|
-
// Auto complete working with article.id
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## ✔️ Adding `baseURL`
|
|
149
|
-
|
|
150
|
-
By using `baseURL` option, `ofetch` prepends it for trailing/leading slashes and query search params for baseURL using [ufo](https://github.com/unjs/ufo):
|
|
151
|
-
|
|
152
|
-
```js
|
|
153
|
-
await ofetch("/config", { baseURL });
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## ✔️ Adding Query Search Params
|
|
157
|
-
|
|
158
|
-
By using `query` option (or `params` as alias), `ofetch` adds query search params to the URL by preserving the query in the request itself using [ufo](https://github.com/unjs/ufo):
|
|
159
|
-
|
|
160
|
-
```js
|
|
161
|
-
await ofetch("/movie?lang=en", { query: { id: 123 } });
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## ✔️ Interceptors
|
|
165
|
-
|
|
166
|
-
Providing async interceptors to hook into lifecycle events of `ofetch` call is possible.
|
|
167
|
-
|
|
168
|
-
You might want to use `ofetch.create` to set shared interceptors.
|
|
169
|
-
|
|
170
|
-
### `onRequest({ request, options })`
|
|
171
|
-
|
|
172
|
-
`onRequest` is called as soon as `ofetch` is called, allowing you to modify options or do simple logging.
|
|
173
|
-
|
|
174
|
-
```js
|
|
175
|
-
await ofetch("/api", {
|
|
176
|
-
async onRequest({ request, options }) {
|
|
177
|
-
// Log request
|
|
178
|
-
console.log("[fetch request]", request, options);
|
|
179
|
-
|
|
180
|
-
// Add `?t=1640125211170` to query search params
|
|
181
|
-
options.query = options.query || {};
|
|
182
|
-
options.query.t = new Date();
|
|
183
|
-
},
|
|
184
|
-
});
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### `onRequestError({ request, options, error })`
|
|
188
|
-
|
|
189
|
-
`onRequestError` will be called when the fetch request fails.
|
|
190
|
-
|
|
191
|
-
```js
|
|
192
|
-
await ofetch("/api", {
|
|
193
|
-
async onRequestError({ request, options, error }) {
|
|
194
|
-
// Log error
|
|
195
|
-
console.log("[fetch request error]", request, error);
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### `onResponse({ request, options, response })`
|
|
201
|
-
|
|
202
|
-
`onResponse` will be called after `fetch` call and parsing body.
|
|
203
|
-
|
|
204
|
-
```js
|
|
205
|
-
await ofetch("/api", {
|
|
206
|
-
async onResponse({ request, response, options }) {
|
|
207
|
-
// Log response
|
|
208
|
-
console.log("[fetch response]", request, response.status, response.body);
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### `onResponseError({ request, options, response })`
|
|
214
|
-
|
|
215
|
-
`onResponseError` is the same as `onResponse` but will be called when fetch happens but `response.ok` is not `true`.
|
|
216
|
-
|
|
217
|
-
```js
|
|
218
|
-
await ofetch("/api", {
|
|
219
|
-
async onResponseError({ request, response, options }) {
|
|
220
|
-
// Log error
|
|
221
|
-
console.log(
|
|
222
|
-
"[fetch response error]",
|
|
223
|
-
request,
|
|
224
|
-
response.status,
|
|
225
|
-
response.body
|
|
226
|
-
);
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### Passing array of interceptors
|
|
232
|
-
|
|
233
|
-
If necessary, it's also possible to pass an array of function that will be called sequentially.
|
|
234
|
-
|
|
235
|
-
```js
|
|
236
|
-
await ofetch("/api", {
|
|
237
|
-
onRequest: [
|
|
238
|
-
() => {
|
|
239
|
-
/* Do something */
|
|
240
|
-
},
|
|
241
|
-
() => {
|
|
242
|
-
/* Do something else */
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
});
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## ✔️ Create fetch with default options
|
|
249
|
-
|
|
250
|
-
This utility is useful if you need to use common options across several fetch calls.
|
|
251
|
-
|
|
252
|
-
**Note:** Defaults will be cloned at one level and inherited. Be careful about nested options like `headers`.
|
|
253
|
-
|
|
254
|
-
```js
|
|
255
|
-
const apiFetch = ofetch.create({ baseURL: "/api" });
|
|
256
|
-
|
|
257
|
-
apiFetch("/test"); // Same as ofetch('/test', { baseURL: '/api' })
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
## 💡 Adding headers
|
|
261
|
-
|
|
262
|
-
By using `headers` option, `ofetch` adds extra headers in addition to the request default headers:
|
|
263
|
-
|
|
264
|
-
```js
|
|
265
|
-
await ofetch("/movies", {
|
|
266
|
-
headers: {
|
|
267
|
-
Accept: "application/json",
|
|
268
|
-
"Cache-Control": "no-cache",
|
|
269
|
-
},
|
|
270
|
-
});
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
## 🍣 Access to Raw Response
|
|
274
|
-
|
|
275
|
-
If you need to access raw response (for headers, etc), you can use `ofetch.raw`:
|
|
276
|
-
|
|
277
|
-
```js
|
|
278
|
-
const response = await ofetch.raw("/sushi");
|
|
279
|
-
|
|
280
|
-
// response._data
|
|
281
|
-
// response.headers
|
|
282
|
-
// ...
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
## 🌿 Using Native Fetch
|
|
286
|
-
|
|
287
|
-
As a shortcut, you can use `ofetch.native` that provides native `fetch` API
|
|
288
|
-
|
|
289
|
-
```js
|
|
290
|
-
const json = await ofetch.native("/sushi").then((r) => r.json());
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
## 📡 SSE
|
|
294
|
-
|
|
295
|
-
**Example:** Handle SSE response:
|
|
296
|
-
|
|
297
|
-
```js
|
|
298
|
-
const stream = await ofetch("/sse");
|
|
299
|
-
const reader = stream.getReader();
|
|
300
|
-
const decoder = new TextDecoder();
|
|
301
|
-
while (true) {
|
|
302
|
-
const { done, value } = await reader.read();
|
|
303
|
-
if (done) break;
|
|
304
|
-
// Here is the chunked text of the SSE response.
|
|
305
|
-
const text = decoder.decode(value);
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
## 🕵️ Adding HTTP(S) Agent
|
|
310
|
-
|
|
311
|
-
In Node.js (>= 18) environments, you can provide a custom dispatcher to intercept requests and support features such as Proxy and self-signed certificates. This feature is enabled by [undici](https://undici.nodejs.org/) built-in Node.js. [read more](https://undici.nodejs.org/#/docs/api/Dispatcher) about the Dispatcher API.
|
|
312
|
-
|
|
313
|
-
Some available agents:
|
|
314
|
-
|
|
315
|
-
- `ProxyAgent`: A Proxy Agent class that implements the Agent API. It allows the connection through a proxy in a simple way. ([docs](https://undici.nodejs.org/#/docs/api/ProxyAgent))
|
|
316
|
-
- `MockAgent`: A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. ([docs](https://undici.nodejs.org/#/docs/api/MockAgent))
|
|
317
|
-
- `Agent`: Agent allows dispatching requests against multiple different origins. ([docs](https://undici.nodejs.org/#/docs/api/Agent))
|
|
318
|
-
|
|
319
|
-
**Example:** Set a proxy agent for one request:
|
|
320
|
-
|
|
321
|
-
```ts
|
|
322
|
-
import { ProxyAgent } from "undici";
|
|
323
|
-
import { ofetch } from "ofetch";
|
|
324
|
-
|
|
325
|
-
const proxyAgent = new ProxyAgent("http://localhost:3128");
|
|
326
|
-
const data = await ofetch("https://icanhazip.com", { dispatcher: proxyAgent });
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
**Example:** Create a custom fetch instance that has proxy enabled:
|
|
330
|
-
|
|
331
|
-
```ts
|
|
332
|
-
import { ProxyAgent, setGlobalDispatcher } from "undici";
|
|
333
|
-
import { ofetch } from "ofetch";
|
|
334
|
-
|
|
335
|
-
const proxyAgent = new ProxyAgent("http://localhost:3128");
|
|
336
|
-
const fetchWithProxy = ofetch.create({ dispatcher: proxyAgent });
|
|
337
|
-
|
|
338
|
-
const data = await fetchWithProxy("https://icanhazip.com");
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
**Example:** Set a proxy agent for all requests:
|
|
342
|
-
|
|
343
|
-
```ts
|
|
344
|
-
import { ProxyAgent, setGlobalDispatcher } from "undici";
|
|
345
|
-
import { ofetch } from "ofetch";
|
|
346
|
-
|
|
347
|
-
const proxyAgent = new ProxyAgent("http://localhost:3128");
|
|
348
|
-
setGlobalDispatcher(proxyAgent);
|
|
349
|
-
|
|
350
|
-
const data = await ofetch("https://icanhazip.com");
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
**Example:** Allow self-signed certificates (USE AT YOUR OWN RISK!)
|
|
354
|
-
|
|
355
|
-
```ts
|
|
356
|
-
import { Agent } from "undici";
|
|
357
|
-
import { ofetch } from "ofetch";
|
|
358
|
-
|
|
359
|
-
// Note: This makes fetch unsecure against MITM attacks. USE AT YOUR OWN RISK!
|
|
360
|
-
const unsecureAgent = new Agent({ connect: { rejectUnauthorized: false } });
|
|
361
|
-
const unsecureFetch = ofetch.create({ dispatcher: unsecureAgent });
|
|
362
|
-
|
|
363
|
-
const data = await unsecureFetch("https://www.squid-cache.org/");
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### 💪 Augment `FetchOptions` interface
|
|
367
|
-
|
|
368
|
-
You can augment the `FetchOptions` interface to add custom properties.
|
|
369
|
-
|
|
370
|
-
```ts
|
|
371
|
-
// Place this in any `.ts` or `.d.ts` file.
|
|
372
|
-
// Ensure it's included in the project's tsconfig.json "files".
|
|
373
|
-
declare module "ofetch" {
|
|
374
|
-
interface FetchOptions {
|
|
375
|
-
// Custom properties
|
|
376
|
-
requiresAuth?: boolean;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export {};
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
This lets you pass and use those properties with full type safety throughout `ofetch` calls.
|
|
384
|
-
|
|
385
|
-
```ts
|
|
386
|
-
const myFetch = ofetch.create({
|
|
387
|
-
onRequest(context) {
|
|
388
|
-
// ^? { ..., options: {..., requiresAuth?: boolean }}
|
|
389
|
-
console.log(context.options.requiresAuth);
|
|
390
|
-
},
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
myFetch("/foo", { requiresAuth: true });
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
## License
|
|
397
|
-
|
|
398
|
-
💛 Published under the [MIT](https://github.com/h3js/rou3/blob/main/LICENSE) license.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# pathslash
|
|
2
|
-
|
|
3
|
-
> `node:path`, platform-correct, with forward-slash output.
|
|
4
|
-
|
|
5
|
-
`pathslash` is a tiny wrapper around `node:path` that always outputs forward slashes (`/`) while keeping the correct per-platform semantics. It never reimplements path logic. Every function delegates to `node:path` and only flips the separators in the result.
|
|
6
|
-
|
|
7
|
-
## Why
|
|
8
|
-
|
|
9
|
-
- **Forward slashes everywhere.** On Windows, the `win32` functions output `/` instead of `\`, which is what bundlers, route maps, and URLs expect.
|
|
10
|
-
- **Correct semantics for free.** Drive letters, UNC paths, and case-insensitive `relative` behave exactly as in `node:path`, because they _are_ `node:path`.
|
|
11
|
-
- **POSIX-safe.** On POSIX, a backslash is a valid filename character, so it is never rewritten there.
|
|
12
|
-
- **A typed drop-in.** Same API and types as `node:path`.
|
|
13
|
-
|
|
14
|
-
## Install
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
npm i pathslash
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
The default export and the top-level named exports follow the host platform, exactly like `node:path`:
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
import path, { join } from "pathslash";
|
|
26
|
-
|
|
27
|
-
join("src", "a.ts"); // 'src/a.ts'
|
|
28
|
-
path.sep; // '/'
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
To force a specific platform, use the `win32` and `posix` namespaces. They work on any host OS:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
import { win32, posix } from "pathslash";
|
|
35
|
-
|
|
36
|
-
win32.join("C:\\a", "b"); // 'C:/a/b' (forward slashes)
|
|
37
|
-
win32.normalize("C:\\a\\..\\b"); // 'C:/b'
|
|
38
|
-
win32.relative("C:/Foo/Bar", "C:/foo/baz"); // '../baz' (case-insensitive)
|
|
39
|
-
|
|
40
|
-
posix.join("a", "b\\c"); // 'a/b\\c' (backslash kept)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### `toSlash(path)`
|
|
44
|
-
|
|
45
|
-
Safely normalizes separators to `/`. On Windows it converts `\` to `/`. On POSIX it returns the path unchanged, because a backslash is a valid filename character there and rewriting it would corrupt the path. Use it for paths that come from outside this package, such as `process.cwd()`:
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
import { toSlash } from "pathslash";
|
|
49
|
-
|
|
50
|
-
toSlash("C:\\a\\b"); // 'C:/a/b' on Windows, unchanged on POSIX
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Notes
|
|
54
|
-
|
|
55
|
-
- `win32.sep` is `"/"` instead of `"\\"`, and `win32.delimiter` stays `";"`.
|
|
56
|
-
- `\\?\` (extended-length) paths stay verbatim. `toSlash` and every `win32.*` function leave them untouched, because a forward slash is a literal character there, not a separator.
|
|
57
|
-
- `toNamespacedPath` always returns a native, backslash path, since `\\?\` paths are only valid with backslashes.
|
|
58
|
-
- `matchesGlob` mirrors `node:path`. It exists only on Node versions that ship it (22.5+) and is `undefined` on older ones.
|
|
59
|
-
- The types are a drop-in too: `import type { ParsedPath, FormatInputPathObject, PlatformPath } from "pathslash"`.
|
|
60
|
-
- Everything else matches `node:path`, separators aside.
|
|
61
|
-
|
|
62
|
-
## License
|
|
63
|
-
|
|
64
|
-
[MIT](./LICENSE)
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# node-postgres
|
|
2
|
-
|
|
3
|
-
[](http://travis-ci.org/brianc/node-postgres)
|
|
4
|
-
<span class="badge-npmversion"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/v/pg.svg" alt="NPM version" /></a></span>
|
|
5
|
-
<span class="badge-npmdownloads"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/pg.svg" alt="NPM downloads" /></a></span>
|
|
6
|
-
|
|
7
|
-
Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
$ npm install pg
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## :star: [Documentation](https://node-postgres.com) :star:
|
|
18
|
-
|
|
19
|
-
### Features
|
|
20
|
-
|
|
21
|
-
- [Fastest PostgreSQL client for Node.js](https://github.com/nigrosimone/postgres-benchmarks)
|
|
22
|
-
- Pure JavaScript client and native libpq bindings share _the same API_
|
|
23
|
-
- Connection pooling
|
|
24
|
-
- Extensible JS ↔ PostgreSQL data-type coercion
|
|
25
|
-
- Supported PostgreSQL features
|
|
26
|
-
- Parameterized queries
|
|
27
|
-
- Named statements with query plan caching
|
|
28
|
-
- Async notifications with `LISTEN/NOTIFY`
|
|
29
|
-
- Bulk import & export with `COPY TO/COPY FROM`
|
|
30
|
-
|
|
31
|
-
### Extras
|
|
32
|
-
|
|
33
|
-
node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture.
|
|
34
|
-
The entire list can be found on our [wiki](https://github.com/brianc/node-postgres/wiki/Extras).
|
|
35
|
-
|
|
36
|
-
## Support
|
|
37
|
-
|
|
38
|
-
node-postgres is free software. If you encounter a bug with the library please open an issue on the [GitHub repo](https://github.com/brianc/node-postgres). If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better!
|
|
39
|
-
|
|
40
|
-
When you open an issue please provide:
|
|
41
|
-
|
|
42
|
-
- version of Node
|
|
43
|
-
- version of Postgres
|
|
44
|
-
- smallest possible snippet of code to reproduce the problem
|
|
45
|
-
|
|
46
|
-
You can also follow me [@brianc](https://bsky.app/profile/brianc.bsky.social) on bluesky if that's your thing for updates on node-postgres with nearly zero non node-postgres content. My old twitter/x account is no longer used.
|
|
47
|
-
|
|
48
|
-
## Sponsorship :two_hearts:
|
|
49
|
-
|
|
50
|
-
node-postgres's continued development has been made possible in part by generous financial support from [the community](https://github.com/brianc/node-postgres/blob/master/SPONSORS.md).
|
|
51
|
-
|
|
52
|
-
If you or your company are benefiting from node-postgres and would like to help keep the project financially sustainable [please consider supporting](https://github.com/sponsors/brianc) its development.
|
|
53
|
-
|
|
54
|
-
### Featured sponsor
|
|
55
|
-
|
|
56
|
-
Special thanks to [medplum](https://medplum.com) for their generous and thoughtful support of node-postgres!
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
## Contributing
|
|
61
|
-
|
|
62
|
-
**:heart: contributions!**
|
|
63
|
-
|
|
64
|
-
I will **happily** accept your pull request if it:
|
|
65
|
-
|
|
66
|
-
- **has tests**
|
|
67
|
-
- looks reasonable
|
|
68
|
-
- does not break backwards compatibility
|
|
69
|
-
|
|
70
|
-
If your change involves breaking backwards compatibility please please point that out in the pull request & we can discuss & plan when and how to release it and what type of documentation or communicate it will require.
|
|
71
|
-
|
|
72
|
-
## Troubleshooting and FAQ
|
|
73
|
-
|
|
74
|
-
The causes and solutions to common errors can be found among the [Frequently Asked Questions (FAQ)](https://github.com/brianc/node-postgres/wiki/FAQ)
|
|
75
|
-
|
|
76
|
-
## License
|
|
77
|
-
|
|
78
|
-
Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com)
|
|
79
|
-
|
|
80
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
81
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
82
|
-
in the Software without restriction, including without limitation the rights
|
|
83
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
84
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
85
|
-
furnished to do so, subject to the following conditions:
|
|
86
|
-
|
|
87
|
-
The above copyright notice and this permission notice shall be included in
|
|
88
|
-
all copies or substantial portions of the Software.
|
|
89
|
-
|
|
90
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
91
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
92
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
93
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
94
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
95
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
96
|
-
THE SOFTWARE.
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# Wire Protocol Server for PGlite
|
|
2
|
-
|
|
3
|
-
> [!TIP]
|
|
4
|
-
> If you are looking for more versatile and feature-rich solution, check [`pg-gateway`](https://github.com/supabase-community/pg-gateway) from [Supabase](https://supabase.com/) instead.
|
|
5
|
-
|
|
6
|
-
A spare-time attempt to understand Postgres Wire Protocol and expose a TCP server,
|
|
7
|
-
that can be used to redirect all client requests to [PGlite](https://github.com/electric-sql/pglite) instance.
|
|
8
|
-
|
|
9
|
-
This can be used to connect to a running instance via `pgsql` or in the future,
|
|
10
|
-
run a https://postgrest.org/ on top of said `PGlite` instance and automatically create a temporary, in-memory API endpoints.
|
|
11
|
-
|
|
12
|
-
- https://www.postgresql.org/docs/current/protocol.html
|
|
13
|
-
- https://www.postgresql.org/docs/current/protocol-message-formats.html
|
|
14
|
-
|
|
15
|
-
It intercepts `SSLRequest` and `StartupMessage` messages to fake authentication flow and redirects all remaining packets directly to `PGlite` instance.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
npm install pglite-server
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
import { PGlite } from "@electric-sql/pglite";
|
|
25
|
-
import { createServer } from "pglite-server";
|
|
26
|
-
|
|
27
|
-
const db = new PGlite();
|
|
28
|
-
await db.waitReady;
|
|
29
|
-
|
|
30
|
-
await db.exec(`
|
|
31
|
-
create table if not exists test (id serial primary key, name text);
|
|
32
|
-
insert into test (name) values ('foo'), ('bar'), ('baz');
|
|
33
|
-
`);
|
|
34
|
-
|
|
35
|
-
const PORT = 5432;
|
|
36
|
-
const pgServer = createServer(db);
|
|
37
|
-
|
|
38
|
-
pgServer.listen(PORT, () => {
|
|
39
|
-
console.log(`Server bound to port ${PORT}`);
|
|
40
|
-
});
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
$ psql -h localhost -p 5432 -U postgres
|
|
45
|
-
postgres=> select * from test;
|
|
46
|
-
postgres=> \q
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
or without `db.exec` used above
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
$ psql -h localhost -p 5432 -U postgres
|
|
53
|
-
postgres=> create table if not exists test (id serial primary key, name text);
|
|
54
|
-
postgres=> insert into test (name) values ('foo'), ('bar'), ('baz');
|
|
55
|
-
postgres=> select * from test;
|
|
56
|
-
postgres=> \q
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Using with `pg` client
|
|
60
|
-
|
|
61
|
-
See `test/main.ts` for more detailed example, but here's a quick excerpt:
|
|
62
|
-
|
|
63
|
-
```ts
|
|
64
|
-
import { PGlite } from "@electric-sql/pglite";
|
|
65
|
-
import { Client } from "pg";
|
|
66
|
-
import { createServer } from "pglite-server";
|
|
67
|
-
|
|
68
|
-
const PORT = 5432;
|
|
69
|
-
const db = new PGlite();
|
|
70
|
-
await db.waitReady;
|
|
71
|
-
await db.exec(`
|
|
72
|
-
create table if not exists test (id serial primary key, name text);
|
|
73
|
-
insert into test (name) values ('foo'), ('bar'), ('baz');
|
|
74
|
-
`);
|
|
75
|
-
|
|
76
|
-
const pgServer = createServer(db);
|
|
77
|
-
|
|
78
|
-
pgServer.listen(PORT, async () => {
|
|
79
|
-
const client = new Client({
|
|
80
|
-
host: "localhost",
|
|
81
|
-
port: PORT,
|
|
82
|
-
database: "postgres",
|
|
83
|
-
user: "postgres",
|
|
84
|
-
});
|
|
85
|
-
await client.connect();
|
|
86
|
-
const res = await client.query("select * from test");
|
|
87
|
-
console.log(res.rows);
|
|
88
|
-
});
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Options
|
|
92
|
-
|
|
93
|
-
If you want to see all debug output of the network communication, set `logLevel` to `Debug`:
|
|
94
|
-
|
|
95
|
-
```ts
|
|
96
|
-
import { createServer, LogLevel } from "pglite-server";
|
|
97
|
-
|
|
98
|
-
const pgServer = createServer(db, {
|
|
99
|
-
logLevel: LogLevel.Debug,
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
pgServer.listen();
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Developing
|
|
106
|
-
|
|
107
|
-
This repo uses https://bun.sh/ because I don't want to spend time fighting with Node and TypeScript tooling.
|
|
108
|
-
|
|
109
|
-
Make sure that it's available before running tests, or write your own ts-loader config, ts-node, or whatever people use these days.
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
bun run test
|
|
113
|
-
bun run build
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Debugging
|
|
117
|
-
|
|
118
|
-
Debugging network traffic with `tshark` - https://zignar.net/2022/09/24/using-tshark-to-monitor-pg-traffic/
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
brew install wireshark
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
```sh
|
|
125
|
-
tshark -i lo -f 'tcp port 5432' -d tcp.port==5432,pgsql -T fields -e pgsql.length -e pgsql.type -e pgsql.query
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Publishing
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
npm version <patch|minor|major>
|
|
132
|
-
git push
|
|
133
|
-
bun run build
|
|
134
|
-
npm publish
|
|
135
|
-
```
|