void 0.1.6 → 0.7.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/AGENT_PROMPT.md +15 -0
- package/README.md +62 -123
- package/dist/auth-BdsJ0Aff.d.mts +43 -0
- package/dist/auth-cmd-Dx8oPKZC.mjs +43 -0
- package/dist/auth-migrations-BAtAck2g.mjs +117 -0
- package/dist/better-auth-shared-C9_GHSkR.d.mts +71 -0
- package/dist/better-auth-shared-CdYmQGry.mjs +163 -0
- package/dist/cache-W82I8ihI.mjs +47 -0
- package/dist/cancel-deploy-BOBTqqh0.mjs +59 -0
- package/dist/cf-access-Dee5cXxL.mjs +22 -0
- package/dist/chunk-DJd-R1mw.mjs +34 -0
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.mjs +1807 -0
- package/dist/client-snXOjrp1.mjs +565 -0
- package/dist/collect-CjeZgz5D.mjs +55 -0
- package/dist/config-BIa9HwVX.mjs +573 -0
- package/dist/config-BzM9Dy7T.mjs +37 -0
- package/dist/config-CvHtTM0q.mjs +30 -0
- package/dist/create-project-BIA15W7z.mjs +90 -0
- package/dist/db-DsRoMcfN.mjs +895 -0
- package/dist/defer-DcxEsVH1.mjs +49 -0
- package/dist/delete-DAP6yDc7.mjs +64 -0
- package/dist/deploy-BPKblFx6.mjs +2424 -0
- package/dist/discover-B7FkXBLB.mjs +40 -0
- package/dist/dist-DUyXJLkq.mjs +2667 -0
- package/dist/dist-Dayj3gCK.mjs +1287 -0
- package/dist/domain-BGofcQ6I.mjs +79 -0
- package/dist/dotenv-DwO4ti0Z.mjs +173 -0
- package/dist/drizzle-NnudE_UN.mjs +232 -0
- package/dist/env-CyG3tvU0.mjs +301 -0
- package/dist/env-helpers-Dr9Y7RnE.d.mts +52 -0
- package/dist/env-raw-BDL4TvdN.mjs +32 -0
- package/dist/env-types-DknSA4SO.mjs +64 -0
- package/dist/env-validation-DJKjR_8q.mjs +163 -0
- package/dist/fetch-error-BQ8sZ5Nd.mjs +266 -0
- package/dist/fetch-error-CVZ5CGA-.d.mts +20 -0
- package/dist/gen-U0Ktr4Zd.mjs +761 -0
- package/dist/handler-B0ds0OHJ.d.mts +269 -0
- package/dist/head-P-egrtFE.d.mts +45 -0
- package/dist/headers-DCXc7mDs.mjs +279 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.mjs +4695 -0
- package/dist/init-C7wS5iGP.mjs +2625 -0
- package/dist/link-p2R6NbgN.mjs +49 -0
- package/dist/list-Bfel-QLc.mjs +113 -0
- package/dist/log-DXdqnmhF.mjs +26 -0
- package/dist/login-CkcXUiIu.mjs +72 -0
- package/dist/logs-DmkrRvx6.mjs +98 -0
- package/dist/magic-string.es-D6g9UnIy.mjs +1011 -0
- package/dist/mcp-CaQzfeUi.mjs +373 -0
- package/dist/node-DDfXj10V.mjs +54 -0
- package/dist/output-BwlcIYSR.mjs +139 -0
- package/dist/pages/client.d.mts +198 -0
- package/dist/pages/client.mjs +980 -0
- package/dist/pages/head-client.d.mts +15 -0
- package/dist/pages/head-client.mjs +90 -0
- package/dist/pages/head.d.mts +2 -0
- package/dist/pages/head.mjs +112 -0
- package/dist/pages/index.d.mts +38 -0
- package/dist/pages/index.mjs +76 -0
- package/dist/pages/islands-plugin.d.mts +50 -0
- package/dist/pages/islands-plugin.mjs +195 -0
- package/dist/pages/prefetch.d.mts +31 -0
- package/dist/pages/prefetch.mjs +90 -0
- package/dist/pages/protocol.d.mts +3 -0
- package/dist/pages/protocol.mjs +193 -0
- package/dist/pages/serialize.d.mts +10 -0
- package/dist/pages/serialize.mjs +14 -0
- package/dist/pathe.M-eThtNZ-D-kmWkCS.mjs +150 -0
- package/dist/plugin-inference-oZ6Ybu2_.mjs +2447 -0
- package/dist/prepare-BAtWufvm.mjs +99 -0
- package/dist/preset-D4I73kT4.mjs +221 -0
- package/dist/project-TqORyHn8.mjs +72 -0
- package/dist/project-cmd-B7lQp3F3.mjs +67 -0
- package/dist/project-slug-CKam8lF9.mjs +11 -0
- package/dist/project-tsconfig-DfkESbDL.mjs +63 -0
- package/dist/protocol-BWzXs2A2.d.mts +34 -0
- package/dist/providers-B3aMxWzP.mjs +67 -0
- package/dist/resolve-project-Br5BR03U.mjs +29 -0
- package/dist/rollback-gyC59l7U.mjs +92 -0
- package/dist/route-types-DReF1gUY.mjs +255 -0
- package/dist/routes-stub.d.mts +55 -0
- package/dist/routes-stub.mjs +1 -0
- package/dist/runner-6Ep3fNQu.mjs +123 -0
- package/dist/runner-pg-D0wWHYnr.mjs +57 -0
- package/dist/runtime/ai.d.mts +127 -0
- package/dist/runtime/ai.mjs +348 -0
- package/dist/runtime/auth-client-react.d.mts +8 -0
- package/dist/runtime/auth-client-react.mjs +6 -0
- package/dist/runtime/auth-client-solid.d.mts +8 -0
- package/dist/runtime/auth-client-solid.mjs +6 -0
- package/dist/runtime/auth-client-svelte.d.mts +8 -0
- package/dist/runtime/auth-client-svelte.mjs +6 -0
- package/dist/runtime/auth-client-vue.d.mts +8 -0
- package/dist/runtime/auth-client-vue.mjs +6 -0
- package/dist/runtime/auth-client.d.mts +8 -0
- package/dist/runtime/auth-client.mjs +6 -0
- package/dist/runtime/auth.d.mts +2 -0
- package/dist/runtime/auth.mjs +22 -0
- package/dist/runtime/better-auth-pg.d.mts +11 -0
- package/dist/runtime/better-auth-pg.mjs +51 -0
- package/dist/runtime/better-auth.d.mts +11 -0
- package/dist/runtime/better-auth.mjs +33 -0
- package/dist/runtime/client.d.mts +6 -0
- package/dist/runtime/client.mjs +5 -0
- package/dist/runtime/db-pg.d.mts +2 -0
- package/dist/runtime/db-pg.mjs +1 -0
- package/dist/runtime/db.d.mts +17 -0
- package/dist/runtime/db.mjs +30 -0
- package/dist/runtime/drizzle-arktype.d.mts +1 -0
- package/dist/runtime/drizzle-arktype.mjs +2 -0
- package/dist/runtime/drizzle-valibot.d.mts +1 -0
- package/dist/runtime/drizzle-valibot.mjs +2 -0
- package/dist/runtime/drizzle-zod.d.mts +1 -0
- package/dist/runtime/drizzle-zod.mjs +2 -0
- package/dist/runtime/env-helpers.d.mts +2 -0
- package/dist/runtime/env-helpers.mjs +173 -0
- package/dist/runtime/env-public-client.d.mts +22 -0
- package/dist/runtime/env-public-client.mjs +54 -0
- package/dist/runtime/env-public.d.mts +143 -0
- package/dist/runtime/env-public.mjs +366 -0
- package/dist/runtime/env.d.mts +13 -0
- package/dist/runtime/env.mjs +51 -0
- package/dist/runtime/fetch-stream.d.mts +51 -0
- package/dist/runtime/fetch-stream.mjs +81 -0
- package/dist/runtime/fetch.d.mts +59 -0
- package/dist/runtime/fetch.mjs +18 -0
- package/dist/runtime/handler.d.mts +3 -0
- package/dist/runtime/handler.mjs +85 -0
- package/dist/runtime/isr.d.mts +26 -0
- package/dist/runtime/isr.mjs +43 -0
- package/dist/runtime/kv.d.mts +48 -0
- package/dist/runtime/kv.mjs +106 -0
- package/dist/runtime/log.d.mts +24 -0
- package/dist/runtime/log.mjs +31 -0
- package/dist/runtime/migration-handler-pg.d.mts +6 -0
- package/dist/runtime/migration-handler-pg.mjs +85 -0
- package/dist/runtime/migration-handler.d.mts +19 -0
- package/dist/runtime/migration-handler.mjs +92 -0
- package/dist/runtime/queues.d.mts +7 -0
- package/dist/runtime/queues.mjs +8 -0
- package/dist/runtime/remote/binding-handler.d.mts +15 -0
- package/dist/runtime/remote/binding-handler.mjs +208 -0
- package/dist/runtime/remote/index.d.mts +8 -0
- package/dist/runtime/remote/index.mjs +461 -0
- package/dist/runtime/response.d.mts +14 -0
- package/dist/runtime/response.mjs +30 -0
- package/dist/runtime/sandbox.d.mts +17 -0
- package/dist/runtime/sandbox.mjs +19 -0
- package/dist/runtime/schema-d1.d.mts +1 -0
- package/dist/runtime/schema-d1.mjs +2 -0
- package/dist/runtime/schema-pg.d.mts +1 -0
- package/dist/runtime/schema-pg.mjs +2 -0
- package/dist/runtime/seed.d.mts +30 -0
- package/dist/runtime/seed.mjs +6 -0
- package/dist/runtime/storage.d.mts +7 -0
- package/dist/runtime/storage.mjs +14 -0
- package/dist/runtime/validator.d.mts +2 -0
- package/dist/runtime/validator.mjs +72 -0
- package/dist/runtime/ws-server.d.mts +26 -0
- package/dist/runtime/ws-server.mjs +296 -0
- package/dist/runtime/ws.d.mts +123 -0
- package/dist/runtime/ws.mjs +103 -0
- package/dist/scan-Ba4hFwlH.mjs +324 -0
- package/dist/scan-C6HMEIdW.mjs +318 -0
- package/dist/secret-CeRSukgM.mjs +109 -0
- package/dist/skills-ipldjlKE.mjs +62 -0
- package/dist/standard-schema-9CRjx-uR.d.mts +42 -0
- package/dist/subcommand-prompt-BKjuNAPb.mjs +349 -0
- package/dist/sveltekit.d.mts +20 -0
- package/dist/sveltekit.mjs +61 -0
- package/dist/types-mHOEwpW4.d.mts +57 -0
- package/dist/validate-CaMavMxu.mjs +146 -0
- package/dist/yarn-pnp-BFqMV_bl.mjs +196 -0
- package/getting-started-prompt.txt +26 -0
- package/package.json +322 -30
- package/schema.json +364 -0
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/SKILL.md +75 -0
- package/skills/void/command/void.md +7 -0
- package/skills/void/docs/guide/ai.md +235 -0
- package/skills/void/docs/guide/app-types.md +103 -0
- package/skills/void/docs/guide/auth.md +257 -0
- package/skills/void/docs/guide/database/d1.md +106 -0
- package/skills/void/docs/guide/database/postgresql.md +106 -0
- package/skills/void/docs/guide/database.md +418 -0
- package/skills/void/docs/guide/deployment.md +98 -0
- package/skills/void/docs/guide/edge/headers.md +79 -0
- package/skills/void/docs/guide/edge/prerendering.md +83 -0
- package/skills/void/docs/guide/edge/redirects.md +116 -0
- package/skills/void/docs/guide/edge/revalidation.md +131 -0
- package/skills/void/docs/guide/edge/rewrites.md +354 -0
- package/skills/void/docs/guide/edge/static-assets.md +72 -0
- package/skills/void/docs/guide/env-vars.md +298 -0
- package/skills/void/docs/guide/index.md +80 -0
- package/skills/void/docs/guide/jobs.md +91 -0
- package/skills/void/docs/guide/kv.md +107 -0
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +419 -0
- package/skills/void/docs/guide/pages-routing/head.md +130 -0
- package/skills/void/docs/guide/pages-routing/islands.md +405 -0
- package/skills/void/docs/guide/pages-routing/layouts.md +362 -0
- package/skills/void/docs/guide/pages-routing/loaders.md +267 -0
- package/skills/void/docs/guide/pages-routing/markdown.md +625 -0
- package/skills/void/docs/guide/pages-routing/overview.md +236 -0
- package/skills/void/docs/guide/pages-routing/view-transitions.md +140 -0
- package/skills/void/docs/guide/queues.md +140 -0
- package/skills/void/docs/guide/quickstart.md +233 -0
- package/skills/void/docs/guide/remote-dev.md +67 -0
- package/skills/void/docs/guide/sandboxes.md +82 -0
- package/skills/void/docs/guide/server-routing.md +246 -0
- package/skills/void/docs/guide/ssg.md +74 -0
- package/skills/void/docs/guide/ssr.md +105 -0
- package/skills/void/docs/guide/storage.md +67 -0
- package/skills/void/docs/guide/type-safety.md +179 -0
- package/skills/void/docs/guide/typed-fetch.md +113 -0
- package/skills/void/docs/guide/websockets.md +190 -0
- package/skills/void/docs/index.md +48 -0
- package/skills/void/docs/integrations/agents.md +84 -0
- package/skills/void/docs/integrations/cloudflare.md +284 -0
- package/skills/void/docs/integrations/frameworks/analog.md +182 -0
- package/skills/void/docs/integrations/frameworks/astro.md +197 -0
- package/skills/void/docs/integrations/frameworks/nuxt.md +164 -0
- package/skills/void/docs/integrations/frameworks/overview.md +136 -0
- package/skills/void/docs/integrations/frameworks/react-router.md +137 -0
- package/skills/void/docs/integrations/frameworks/sveltekit.md +191 -0
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +140 -0
- package/skills/void/docs/integrations/hono.md +97 -0
- package/skills/void/docs/integrations/nodejs-bun-deno.md +210 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +408 -0
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +5 -0
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +103 -0
- package/skills/void/docs/node_modules/oxc-minify/README.md +78 -0
- package/skills/void/docs/node_modules/reka-ui/README.md +80 -0
- package/skills/void/docs/node_modules/vitepress/README.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +49 -0
- package/skills/void/docs/node_modules/vitepress/template/index.md +28 -0
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +85 -0
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +101 -0
- package/skills/void/docs/node_modules/void/AGENTS.md +204 -0
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +15 -0
- package/skills/void/docs/node_modules/void/README.md +89 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +591 -0
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +375 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +174 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +37 -0
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +189 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +143 -0
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +1272 -0
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +19 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +22 -0
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +69 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +152 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +24 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +565 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +124 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +600 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +386 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +101 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +15 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +58 -0
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +165 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +32 -0
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +99 -0
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +108 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +79 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +44 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +51 -0
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +65 -0
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +390 -0
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +48 -0
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +85 -0
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +452 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/{LICENSE → skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md} +21 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +364 -0
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +325 -0
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +398 -0
- package/skills/void/docs/node_modules/void/node_modules/pathe/README.md +73 -0
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +95 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +135 -0
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +21 -0
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +25 -0
- package/skills/void/docs/node_modules/void/node_modules/tsdown/README.md +55 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +9 -0
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +94 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/LICENSE.md +2230 -0
- package/skills/void/docs/node_modules/void/node_modules/vite/README.md +20 -0
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +63 -0
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +191 -0
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +175 -0
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +75 -0
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +7 -0
- package/skills/void/docs/reference/api.md +917 -0
- package/skills/void/docs/reference/cli.md +561 -0
- package/skills/void/docs/reference/config.md +408 -0
- package/skills/void/docs/reference/resource-inference.md +149 -0
- package/skills/void/docs/reference/structure.md +176 -0
- package/.npmignore +0 -29
- package/.travis.yml +0 -9
- package/favicon.ico +0 -0
- package/index.js +0 -14
- package/lib/Job.js +0 -150
- package/lib/Void.js +0 -99
- package/lib/scan.js +0 -19
- package/test/credentials.js +0 -20
- package/test/job.js +0 -64
- package/test/static/dir1/test6.html +0 -0
- package/test/static/dir2/test7.html +0 -0
- package/test/static/dir2/test8.html +0 -0
- package/test/static/dir2/test9.html +0 -0
- package/test/static/test1.html +0 -0
- package/test/static/test2.html +0 -0
- package/test/static/test3.html +0 -0
- package/test/void.js +0 -31
- /package/{test/static/dir1/test4.html → skills/void/docs/integrations/auth-providers.md} +0 -0
- /package/{test/static/dir1/test5.html → skills/void/docs/integrations/payment-processors.md} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# picocolors
|
|
2
|
+
|
|
3
|
+
The tiniest and the fastest library for terminal output formatting with ANSI colors.
|
|
4
|
+
|
|
5
|
+
```javascript
|
|
6
|
+
import pc from "picocolors"
|
|
7
|
+
|
|
8
|
+
console.log(
|
|
9
|
+
pc.green(`How are ${pc.italic(`you`)} doing?`)
|
|
10
|
+
)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- **No dependencies.**
|
|
14
|
+
- **14 times** smaller and **2 times** faster than chalk.
|
|
15
|
+
- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
|
|
16
|
+
- Node.js v6+ & browsers support. Support for both CJS and ESM projects.
|
|
17
|
+
- TypeScript type declarations included.
|
|
18
|
+
- [`NO_COLOR`](https://no-color.org/) friendly.
|
|
19
|
+
|
|
20
|
+
## Docs
|
|
21
|
+
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# tinyglobby
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/tinyglobby)
|
|
4
|
+
[](https://npmjs.com/package/tinyglobby)
|
|
5
|
+
|
|
6
|
+
A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
|
|
7
|
+
|
|
8
|
+
Both globby and fast-glob present some behavior no other globbing lib has,
|
|
9
|
+
which makes it hard to manually replace with something smaller and better.
|
|
10
|
+
|
|
11
|
+
This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@16.2.0)
|
|
12
|
+
and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3).
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { glob, globSync } from 'tinyglobby';
|
|
18
|
+
|
|
19
|
+
await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
|
|
20
|
+
globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
Visit https://superchupu.dev/tinyglobby to read the full documentation.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<img src="./docs/public/og-image.svg" alt="tsdown" width="100%" /><br>
|
|
2
|
+
|
|
3
|
+
# tsdown
|
|
4
|
+
|
|
5
|
+
[![Open on npmx][npmx-version-src]][npmx-href]
|
|
6
|
+
[![npm downloads][npmx-downloads-src]][npmx-href]
|
|
7
|
+
[![Unit Test][unit-test-src]][unit-test-href]
|
|
8
|
+
[![tsdown Starter StackBlitz][tsdown-starter-stackblitz-src]][tsdown-starter-stackblitz-href]
|
|
9
|
+
|
|
10
|
+
✨ The elegant bundler for libraries powered by [Rolldown](https://github.com/rolldown/rolldown).
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- 🚀 **Blazing fast**: Build and generate declaration files powered by Oxc and Rolldown, incredibly fast!
|
|
15
|
+
- ♻️ **Powerful ecosystem**: Support Rollup, Rolldown, unplugin plugins, and some Vite plugins.
|
|
16
|
+
- ️🛠️ **Easy to use**: tsdown preconfigures everything you need to get started, so you can focus on writing code.
|
|
17
|
+
- 🔄 **Seamless migration**: Compatible with tsup's main options and features, ensuring a smooth transition.
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
For full documentation, visit [tsdown.dev](https://tsdown.dev).
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm i -D tsdown
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx tsdown
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Sponsors
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg">
|
|
39
|
+
<img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>
|
|
40
|
+
</a>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
## Licenses
|
|
44
|
+
|
|
45
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
46
|
+
|
|
47
|
+
<!-- Badges -->
|
|
48
|
+
|
|
49
|
+
[npmx-version-src]: https://npmx.dev/api/registry/badge/version/tsdown
|
|
50
|
+
[npmx-downloads-src]: https://npmx.dev/api/registry/badge/downloads-month/tsdown
|
|
51
|
+
[npmx-href]: https://npmx.dev/tsdown
|
|
52
|
+
[unit-test-src]: https://github.com/rolldown/tsdown/actions/workflows/unit-test.yml/badge.svg
|
|
53
|
+
[unit-test-href]: https://github.com/rolldown/tsdown/actions/workflows/unit-test.yml
|
|
54
|
+
[tsdown-starter-stackblitz-src]: https://developer.stackblitz.com/img/open_in_stackblitz_small.svg
|
|
55
|
+
[tsdown-starter-stackblitz-href]: https://stackblitz.com/github/rolldown/tsdown-starter-stackblitz
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Fabian Hiller
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Valibot
|
|
4
|
+
|
|
5
|
+
[![License: MIT][license-image]][license-url]
|
|
6
|
+
[![CI][ci-image]][ci-url]
|
|
7
|
+
[![NPM version][npm-image]][npm-url]
|
|
8
|
+
[![Downloads][downloads-image]][npm-url]
|
|
9
|
+
[![JSR version][jsr-image]][jsr-url]
|
|
10
|
+
[![Discord][discord-image]][discord-url]
|
|
11
|
+
|
|
12
|
+
Hello, I am Valibot and I would like to help you validate data easily using a schema. No matter if it is incoming data on a server, a form or even configuration files. I have no dependencies and can run in any JavaScript environment.
|
|
13
|
+
|
|
14
|
+
> I highly recommend you read the [announcement post](https://www.builder.io/blog/introducing-valibot), and if you are a nerd like me, the [bachelor's thesis](https://valibot.dev/thesis.pdf) I am based on.
|
|
15
|
+
|
|
16
|
+
## Highlights
|
|
17
|
+
|
|
18
|
+
- Fully type safe with static type inference
|
|
19
|
+
- Small bundle size starting at less than 700 bytes
|
|
20
|
+
- Validate everything from strings to complex objects
|
|
21
|
+
- Open source and fully tested with 100 % coverage
|
|
22
|
+
- Many transformation and validation actions included
|
|
23
|
+
- Well structured source code without dependencies
|
|
24
|
+
- Minimal, readable and well thought out API
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
First you create a schema that describes a structured data set. A schema can be compared to a type definition in TypeScript. The big difference is that TypeScript types are "not executed" and are more or less a DX feature. A schema on the other hand, apart from the inferred type definition, can also be executed at runtime to guarantee the type safety of unknown data.
|
|
29
|
+
|
|
30
|
+
<!-- prettier-ignore -->
|
|
31
|
+
```ts
|
|
32
|
+
import * as v from 'valibot'; // 1.31 kB
|
|
33
|
+
|
|
34
|
+
// Create login schema with email and password
|
|
35
|
+
const LoginSchema = v.object({
|
|
36
|
+
email: v.pipe(v.string(), v.email()),
|
|
37
|
+
password: v.pipe(v.string(), v.minLength(8)),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Infer output TypeScript type of login schema as
|
|
41
|
+
// { email: string; password: string }
|
|
42
|
+
type LoginData = v.InferOutput<typeof LoginSchema>;
|
|
43
|
+
|
|
44
|
+
// Throws error for email and password
|
|
45
|
+
const output1 = v.parse(LoginSchema, { email: '', password: '' });
|
|
46
|
+
|
|
47
|
+
// Returns data as { email: string; password: string }
|
|
48
|
+
const output2 = v.parse(LoginSchema, {
|
|
49
|
+
email: 'jane@example.com',
|
|
50
|
+
password: '12345678',
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Apart from `parse` I also offer a non-exception-based API with `safeParse` and a type guard function with `is`. You can read more about it [here](https://valibot.dev/guides/parse-data/).
|
|
55
|
+
|
|
56
|
+
## Comparison
|
|
57
|
+
|
|
58
|
+
Instead of relying on a few large functions with many methods, my API design and source code is based on many small and independent functions, each with just a single task. This modular design has several advantages.
|
|
59
|
+
|
|
60
|
+
For example, this allows a bundler to use the import statements to remove code that is not needed. This way, only the code that is actually used gets into your production build. This can reduce the bundle size by up to 95 % compared to [Zod](https://zod.dev/).
|
|
61
|
+
|
|
62
|
+
In addition, it allows you to easily extend my functionality with external code and makes my source code more robust and secure because the functionality of the individual functions can be tested much more easily through unit tests.
|
|
63
|
+
|
|
64
|
+
> Coming from [Zod](https://zod.dev/)? Read our [migration article](https://valibot.dev/blog/why-migrate-to-valibot/) to see the benefits of Valibot, and use our [migration guide](https://valibot.dev/guides/migrate-from-zod/) to migrate your schemas with confidence.
|
|
65
|
+
|
|
66
|
+
## Partners
|
|
67
|
+
|
|
68
|
+
Thanks to our partners who support my development! [Join them](https://github.com/sponsors/fabian-hiller) and contribute to the sustainability of open source software!
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
## Credits
|
|
73
|
+
|
|
74
|
+
My friend [Fabian](https://github.com/fabian-hiller) created me as part of his [bachelor thesis](https://valibot.dev/thesis.pdf) at [Stuttgart Media University](https://www.hdm-stuttgart.de/en/), supervised by Walter Kriha, [Miško Hevery](https://github.com/mhevery) and [Ryan Carniato](https://github.com/ryansolid). My role models also include [Colin McDonnell](https://github.com/colinhacks), who had a big influence on my API design with [Zod](https://zod.dev/).
|
|
75
|
+
|
|
76
|
+
## Feedback
|
|
77
|
+
|
|
78
|
+
Find a bug or have an idea how to improve my code? Please fill out an [issue](https://github.com/open-circle/valibot/issues/new). Together we can make the library even better!
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
I am completely free and licensed under the [MIT license](https://github.com/open-circle/valibot/blob/main/LICENSE.md). But if you like, you can feed me with a star on [GitHub](https://github.com/open-circle/valibot).
|
|
83
|
+
|
|
84
|
+
[license-image]: https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square
|
|
85
|
+
[license-url]: https://opensource.org/licenses/MIT
|
|
86
|
+
[ci-image]: https://img.shields.io/github/actions/workflow/status/open-circle/valibot/ci.yml?branch=main&logo=github&style=flat-square
|
|
87
|
+
[ci-url]: https://github.com/open-circle/valibot/actions/workflows/ci.yml
|
|
88
|
+
[npm-image]: https://img.shields.io/npm/v/valibot.svg?style=flat-square
|
|
89
|
+
[npm-url]: https://npmjs.org/package/valibot
|
|
90
|
+
[downloads-image]: https://img.shields.io/npm/dm/valibot.svg?style=flat-square
|
|
91
|
+
[jsr-image]: https://jsr.io/badges/@valibot/valibot?style=flat-square
|
|
92
|
+
[jsr-url]: https://jsr.io/@valibot/valibot
|
|
93
|
+
[discord-image]: https://img.shields.io/discord/1252985447273992222?label=Discord&style=flat-square
|
|
94
|
+
[discord-url]: https://discord.gg/tkMjQACf2P
|