@punks/cli 0.1.16 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +10 -0
- package/README.md +64 -0
- package/dist/data/AGENTS.md +123 -0
- package/dist/data/catalog/lint.ts +349 -0
- package/dist/data/catalog/packs.ts +44 -0
- package/dist/data/catalog/skills.ts +47 -0
- package/dist/data/catalog/tools.ts +22 -0
- package/dist/data/hooks/format-edited-file.mjs +554 -0
- package/dist/data/hooks/format-edited-file.py +157 -0
- package/dist/data/hooks/format-edited-file.sh +37 -0
- package/dist/data/hooks/require-tests-for-pr.mjs +144 -0
- package/dist/data/scripts/sync-subagents.mjs +420 -0
- package/dist/data/subagents/manifest.mjs +253 -0
- package/dist/index.js +46415 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +50 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +167 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/SKILL.md +49 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/references/strategy-matrix.md +34 -0
- package/dist/skills/agnostic/backend/backend-recoverable-actions/references/test-matrix.md +34 -0
- package/dist/skills/agnostic/docs/docs-maintenance/SKILL.md +193 -0
- package/dist/skills/agnostic/docs/docs-maintenance/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/docs-maintenance/references/concept-pages.md +48 -0
- package/dist/skills/agnostic/docs/docs-maintenance/references/flow-pages.md +41 -0
- package/dist/skills/agnostic/frontend/agent-browser/.clawdhub/origin.json +7 -0
- package/dist/skills/agnostic/frontend/agent-browser/SKILL.md +229 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/authentication.md +202 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/commands.md +259 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/proxy-support.md +188 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/session-management.md +193 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/snapshot-refs.md +194 -0
- package/dist/skills/agnostic/frontend/agent-browser/references/video-recording.md +173 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/authenticated-session.sh +97 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/capture-workflow.sh +69 -0
- package/dist/skills/agnostic/frontend/agent-browser/templates/form-automation.sh +62 -0
- package/dist/skills/agnostic/frontend/design-taste-frontend/SKILL.md +226 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/SKILL.md +55 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/react/structure.md +102 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/structure.md +257 -0
- package/dist/skills/agnostic/frontend/gpt-taste/SKILL.md +74 -0
- package/dist/skills/agnostic/frontend/image-taste-frontend/SKILL.md +1102 -0
- package/dist/skills/agnostic/frontend/redesign-existing-projects/SKILL.md +178 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +37 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +69 -0
- package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +44 -0
- package/dist/skills/agnostic/planning/create-plan/references/grill-phase.md +86 -0
- package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +66 -0
- package/dist/skills/agnostic/planning/create-plan/references/planner-phase.md +39 -0
- package/dist/skills/agnostic/planning/create-plan/references/stop-conditions.md +18 -0
- package/dist/skills/agnostic/planning/create-plan/references/tdd-phase.md +26 -0
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +57 -0
- package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +91 -0
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +44 -0
- package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +27 -0
- package/dist/skills/agnostic/planning/create-spec/references/handoff.md +47 -0
- package/dist/skills/agnostic/planning/create-spec/references/questioning.md +41 -0
- package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +58 -0
- package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +26 -0
- package/dist/skills/agnostic/planning/grill-me/SKILL.md +28 -0
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +72 -0
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +47 -0
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +149 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-orchestration.md +102 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel-worker-brief.md +65 -0
- package/dist/skills/agnostic/planning/implement-spec/references/parallel.md +56 -0
- package/dist/skills/agnostic/planning/implement-spec/references/sequential.md +28 -0
- package/dist/skills/agnostic/planning/swarm-planner/SKILL.md +179 -0
- package/dist/skills/agnostic/quality/simplify/SKILL.md +14 -0
- package/dist/skills/agnostic/quality/tdd/SKILL.md +107 -0
- package/dist/skills/agnostic/quality/tdd/deep-modules.md +33 -0
- package/dist/skills/agnostic/quality/tdd/interface-design.md +31 -0
- package/dist/skills/agnostic/quality/tdd/mocking.md +59 -0
- package/dist/skills/agnostic/quality/tdd/refactoring.md +10 -0
- package/dist/skills/agnostic/quality/tdd/tests.md +61 -0
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +42 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +73 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +57 -0
- package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +94 -0
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +67 -0
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +253 -0
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +69 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +66 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +63 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-issues-create-payload.md +48 -0
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +76 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/REFERENCE.md +78 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/SKILL.md +76 -0
- package/dist/skills/agnostic/research/parallel-research/SKILL.md +68 -0
- package/dist/skills/agnostic/research/parallel-research/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/subagents/swarm-planner/SKILL.md +179 -0
- package/dist/skills/agnostic/write-a-skill/SKILL.md +117 -0
- package/dist/skills/frameworks/better-auth/better-auth-best-practices/SKILL.md +166 -0
- package/dist/skills/frameworks/better-auth/better-auth-security-best-practices/SKILL.MD +432 -0
- package/dist/skills/frameworks/effect/effect-authoring/SKILL.md +116 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/branded-types.md +98 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/effect-atom-patterns.md +257 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/effect-primitives.md +144 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/error-patterns.md +156 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/otel-patterns.md +113 -0
- package/dist/skills/frameworks/effect/effect-authoring/references/test-patterns.md +146 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +96 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +4 -0
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +68 -0
- package/dist/skills/frameworks/effect/effect-best-practices/SKILL.md +517 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/anti-patterns.md +392 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/effect-atom-patterns.md +653 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/error-patterns.md +464 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/language-server.md +287 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/layer-patterns.md +495 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/observability-patterns.md +342 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/rpc-cluster-patterns.md +418 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/schema-patterns.md +353 -0
- package/dist/skills/frameworks/effect/effect-best-practices/references/service-patterns.md +299 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/SKILL.md +65 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/agents/openai.yaml +4 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/flow-examples.md +154 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/source-backed-primitives.md +104 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/strategy-matrix.md +34 -0
- package/dist/skills/frameworks/effect/effect-recoverable-actions/references/test-matrix.md +36 -0
- package/dist/skills/frameworks/elysia/elysiajs/SKILL.md +475 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/basic.ts +9 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/body-parser.ts +33 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/complex.ts +112 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/cookie.ts +45 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/error.ts +38 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/file.ts +10 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/guard.ts +34 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/map-response.ts +15 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/redirect.ts +6 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/rename.ts +32 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/schema.ts +61 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/state.ts +6 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/upload-file.ts +20 -0
- package/dist/skills/frameworks/elysia/elysiajs/examples/websocket.ts +25 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/ai-sdk.md +92 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/astro.md +59 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/better-auth.md +117 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/cloudflare-worker.md +95 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/deno.md +34 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/drizzle.md +258 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/expo.md +95 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nextjs.md +103 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nodejs.md +64 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/nuxt.md +67 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/prisma.md +93 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/react-email.md +134 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/sveltekit.md +53 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/tanstack-start.md +87 -0
- package/dist/skills/frameworks/elysia/elysiajs/integrations/vercel.md +55 -0
- package/dist/skills/frameworks/elysia/elysiajs/patterns/mvc.md +380 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/bearer.md +30 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/cors.md +141 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/cron.md +265 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/graphql-apollo.md +90 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/graphql-yoga.md +87 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/html.md +188 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/jwt.md +197 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/openapi.md +246 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/opentelemetry.md +167 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/server-timing.md +71 -0
- package/dist/skills/frameworks/elysia/elysiajs/plugins/static.md +84 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/bun-fullstack-dev-server.md +129 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/cookie.md +187 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/deployment.md +413 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/eden.md +158 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/lifecycle.md +198 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/macro.md +83 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/plugin.md +207 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/route.md +331 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/testing.md +385 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/validation.md +491 -0
- package/dist/skills/frameworks/elysia/elysiajs/references/websocket.md +250 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.github/workflows/branch-protection.yml +24 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.github/workflows/deploy.yml +61 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/AGENTS.md +5958 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/SKILL.md +130 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-dto-serialization.md +182 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-interceptors.md +202 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-use-pipes.md +205 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/api-versioning.md +191 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-avoid-circular-deps.md +80 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-feature-modules.md +82 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-module-sharing.md +141 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-single-responsibility.md +106 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-use-events.md +108 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/arch-use-repository-pattern.md +97 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-avoid-n-plus-one.md +139 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-use-migrations.md +129 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/db-use-transactions.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-graceful-shutdown.md +222 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-use-config-module.md +167 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/devops-use-logging.md +232 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-avoid-service-locator.md +104 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-interface-segregation.md +165 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-liskov-substitution.md +221 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-prefer-constructor-injection.md +86 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-scope-awareness.md +94 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/di-use-interfaces-tokens.md +101 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-handle-async-errors.md +125 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-throw-http-exceptions.md +114 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/error-use-exception-filters.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-health-checks.md +226 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-patterns.md +167 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/micro-use-queues.md +252 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-async-hooks.md +109 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-lazy-loading.md +121 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-optimize-database.md +131 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/perf-use-caching.md +128 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-auth-jwt.md +146 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-rate-limiting.md +125 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-sanitize-output.md +139 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-use-guards.md +135 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/security-validate-all-input.md +150 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-e2e-supertest.md +178 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-mock-external-services.md +179 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/rules/test-use-testing-module.md +153 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/build-agents.ts +299 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/build.sh +16 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/package-lock.json +237 -0
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/scripts/package.json +15 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/SKILL.md +208 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/authentication.md +166 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/controllers-routing.md +111 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/dtos-validation.md +153 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/migration-from-express.md +1237 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/services-di.md +140 -0
- package/dist/skills/frameworks/nestjs/nestjs-expert/references/testing-patterns.md +186 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/SKILL.md +153 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/async-patterns.md +87 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/bundling.md +180 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/data-patterns.md +297 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/debug-tricks.md +105 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/directives.md +73 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/error-handling.md +227 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/file-conventions.md +140 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/font.md +245 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/functions.md +108 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/hydration-error.md +91 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/image.md +173 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/metadata.md +301 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/parallel-routes.md +287 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/route-handlers.md +146 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/rsc-boundaries.md +159 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/runtime-selection.md +39 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/scripts.md +141 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/self-hosting.md +371 -0
- package/dist/skills/frameworks/nextjs/next-best-practices/suspense-boundaries.md +67 -0
- package/dist/skills/frameworks/nextjs/next-cache-components/SKILL.md +360 -0
- package/dist/skills/frameworks/react/async-react-patterns/SKILL.md +78 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/AGENTS.md +946 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/SKILL.md +89 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/dist/skills/frameworks/react/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/AGENTS.md +3750 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/SKILL.md +148 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-defer-await.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-barrel-imports.md +60 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-flatmap-filter.md +60 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-request-idle-callback.md +105 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-resource-hints.md +85 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-script-defer-async.md +68 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-no-inline-components.md +82 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-hoist-static-io.md +149 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-no-shared-module-state.md +50 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
- package/dist/skills/frameworks/react/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/SKILL.md +1058 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/assets/example-template.txt +14 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +304 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/common-patterns.md +271 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/example-reference.md +26 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/testing.md +282 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/top-errors.md +332 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/typescript-patterns.md +291 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/rules/tanstack-query.md +126 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/scripts/example-script.sh +15 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/error-boundary.tsx +243 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/package.json +31 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/provider-setup.tsx +50 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/query-client-config.ts +72 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/dist/skills/frameworks/tanstack-query/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/dist/skills/frameworks/trpc/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/dist/skills/frameworks/trpc/tanstack-query/SKILL.md +1058 -0
- package/dist/skills/frameworks/trpc/tanstack-query/assets/example-template.txt +14 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/best-practices.md +304 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/common-patterns.md +271 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/example-reference.md +26 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/testing.md +282 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/top-errors.md +332 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/typescript-patterns.md +291 -0
- package/dist/skills/frameworks/trpc/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/dist/skills/frameworks/trpc/tanstack-query/rules/tanstack-query.md +126 -0
- package/dist/skills/frameworks/trpc/tanstack-query/scripts/example-script.sh +15 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/error-boundary.tsx +243 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/package.json +31 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/provider-setup.tsx +50 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/query-client-config.ts +72 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/dist/skills/frameworks/trpc/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/dist/skills/frameworks/turborepo/turborepo/SKILL.md +914 -0
- package/dist/skills/frameworks/turborepo/turborepo/command/turborepo.md +70 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/RULE.md +241 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/dependencies.md +246 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/packages.md +335 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/best-practices/structure.md +270 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/boundaries/RULE.md +126 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/RULE.md +107 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/gotchas.md +169 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/caching/remote-cache.md +127 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/RULE.md +79 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/github-actions.md +162 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/patterns.md +145 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/ci/vercel.md +103 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/cli/RULE.md +100 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/cli/commands.md +297 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/RULE.md +211 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/global-options.md +187 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/gotchas.md +348 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/configuration/tasks.md +285 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/RULE.md +96 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/gotchas.md +141 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/environment/modes.md +101 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/filtering/RULE.md +148 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/filtering/patterns.md +152 -0
- package/dist/skills/frameworks/turborepo/turborepo/references/watch/RULE.md +99 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/README.md +20 -0
- package/docs/reference/dp-requirements.md +210 -0
- package/docs/runbooks/dp-cli-scaffolding.md +187 -0
- package/package.json +24 -50
- package/.eslintignore +0 -4
- package/.eslintrc +0 -127
- package/.prettierignore +0 -4
- package/.prettierrc +0 -7
- package/bin/abstractions/builder.d.ts +0 -4
- package/bin/abstractions/builder.js +0 -7
- package/bin/builders/dotnet/base.d.ts +0 -18
- package/bin/builders/dotnet/base.js +0 -47
- package/bin/builders/dotnet/entity-configuration/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-configuration/index.js +0 -29
- package/bin/builders/dotnet/entity-converter/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-converter/index.js +0 -29
- package/bin/builders/dotnet/entity-model-create/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-model-create/index.js +0 -29
- package/bin/builders/dotnet/entity-model-dto/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-model-dto/index.js +0 -29
- package/bin/builders/dotnet/entity-model-list-item-dto/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-model-list-item-dto/index.js +0 -29
- package/bin/builders/dotnet/entity-model-update/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-model-update/index.js +0 -29
- package/bin/builders/dotnet/entity-search-parameters/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-search-parameters/index.js +0 -29
- package/bin/builders/dotnet/entity-search-query-builder/index.d.ts +0 -8
- package/bin/builders/dotnet/entity-search-query-builder/index.js +0 -29
- package/bin/builders/dotnet/firestore-connector/index.d.ts +0 -8
- package/bin/builders/dotnet/firestore-connector/index.js +0 -29
- package/bin/builders/dotnet/firestore-mapper/index.d.ts +0 -8
- package/bin/builders/dotnet/firestore-mapper/index.js +0 -29
- package/bin/builders/dotnet/types.d.ts +0 -10
- package/bin/builders/dotnet/types.js +0 -3
- package/bin/commands/entity-add/__test__/dotnet/common.d.ts +0 -2
- package/bin/commands/entity-add/__test__/dotnet/common.js +0 -11
- package/bin/commands/entity-add/__test__/dotnet/render.configuration.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.configuration.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.converter.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.converter.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.firestore-connector.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.firestore-connector.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.firestore-mapper.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.firestore-mapper.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.model-create.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.model-create.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.model-dto.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.model-dto.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.model-list-item-dto.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.model-list-item-dto.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.model-update.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.model-update.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.search-parameters.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.search-parameters.spec.js +0 -22
- package/bin/commands/entity-add/__test__/dotnet/render.search-query.spec.d.ts +0 -1
- package/bin/commands/entity-add/__test__/dotnet/render.search-query.spec.js +0 -22
- package/bin/commands/entity-add/index.d.ts +0 -26
- package/bin/commands/entity-add/index.js +0 -44
- package/bin/logging/index.d.ts +0 -8
- package/bin/logging/index.js +0 -28
- package/bin/providers/rendering/base.d.ts +0 -3
- package/bin/providers/rendering/base.js +0 -7
- package/bin/providers/rendering/factory.d.ts +0 -5
- package/bin/providers/rendering/factory.js +0 -16
- package/bin/providers/rendering/handlebars.d.ts +0 -4
- package/bin/providers/rendering/handlebars.js +0 -16
- package/bin/renderer/index.d.ts +0 -6
- package/bin/renderer/index.js +0 -27
- package/bin/run.d.ts +0 -2
- package/bin/run.js +0 -70
- package/bin/services/folders.d.ts +0 -1
- package/bin/services/folders.js +0 -31
- package/bin/types/commands.d.ts +0 -5
- package/bin/types/commands.js +0 -3
- package/bin/utils/collections.d.ts +0 -1
- package/bin/utils/collections.js +0 -6
- package/bin/utils/files.d.ts +0 -3
- package/bin/utils/files.js +0 -19
- package/bin/utils/strings.d.ts +0 -4
- package/bin/utils/strings.js +0 -22
- package/bin/utils/text.d.ts +0 -1
- package/bin/utils/text.js +0 -8
- package/em-cli +0 -0
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.configuration.spec.ts.snap +0 -49
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.converter.spec.ts.snap +0 -53
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.firestore-connector.spec.ts.snap +0 -20
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.firestore-mapper.spec.ts.snap +0 -29
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.model-create.spec.ts.snap +0 -10
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.model-dto.spec.ts.snap +0 -9
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.model-list-item-dto.spec.ts.snap +0 -11
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.model-update.spec.ts.snap +0 -11
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.search-parameters.spec.ts.snap +0 -29
- package/src/commands/entity-add/__test__/dotnet/__snapshots__/render.search-query.spec.ts.snap +0 -42
- package/templates/dotnet/NewEntity/Configuration/<PluralizedEntity>Configuration.cs.template +0 -48
- package/templates/dotnet/NewEntity/Connectors/<PluralizedEntity>FirestoreConnector.cs.template +0 -15
- package/templates/dotnet/NewEntity/Converters/<PluralizedEntity>Converter.cs.template +0 -48
- package/templates/dotnet/NewEntity/Mappers/<PluralizedEntity>FirestoreMapper.cs.template +0 -25
- package/templates/dotnet/NewEntity/Models/<Entity>CreateInput.cs.template +0 -6
- package/templates/dotnet/NewEntity/Models/<Entity>Dto.cs.template +0 -5
- package/templates/dotnet/NewEntity/Models/<Entity>ListItemDto.cs.template +0 -6
- package/templates/dotnet/NewEntity/Models/<Entity>UpdateInput.cs.template +0 -6
- package/templates/dotnet/NewEntity/Search/<PluralizedEntity>QueryBuilder.cs.template +0 -38
- package/templates/dotnet/NewEntity/Search/<PluralizedEntity>SearchParameters.cs.template +0 -24
- package/tsconfig.json +0 -25
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
# Deployment
|
|
2
|
+
|
|
3
|
+
## Production Build
|
|
4
|
+
|
|
5
|
+
### Compile to Binary (Recommended)
|
|
6
|
+
```bash
|
|
7
|
+
bun build \
|
|
8
|
+
--compile \
|
|
9
|
+
--minify-whitespace \
|
|
10
|
+
--minify-syntax \
|
|
11
|
+
--target bun \
|
|
12
|
+
--outfile server \
|
|
13
|
+
src/index.ts
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Benefits:**
|
|
17
|
+
- No runtime needed on deployment server
|
|
18
|
+
- Smaller memory footprint (2-3x reduction)
|
|
19
|
+
- Faster startup
|
|
20
|
+
- Single portable executable
|
|
21
|
+
|
|
22
|
+
**Run the binary:**
|
|
23
|
+
```bash
|
|
24
|
+
./server
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Compile to JavaScript
|
|
28
|
+
```bash
|
|
29
|
+
bun build \
|
|
30
|
+
--minify-whitespace \
|
|
31
|
+
--minify-syntax \
|
|
32
|
+
--outfile ./dist/index.js \
|
|
33
|
+
src/index.ts
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Run:**
|
|
37
|
+
```bash
|
|
38
|
+
NODE_ENV=production bun ./dist/index.js
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Docker
|
|
42
|
+
|
|
43
|
+
### Basic Dockerfile
|
|
44
|
+
```dockerfile
|
|
45
|
+
FROM oven/bun:1 AS build
|
|
46
|
+
|
|
47
|
+
WORKDIR /app
|
|
48
|
+
|
|
49
|
+
# Cache dependencies
|
|
50
|
+
COPY package.json bun.lock ./
|
|
51
|
+
RUN bun install
|
|
52
|
+
|
|
53
|
+
COPY ./src ./src
|
|
54
|
+
|
|
55
|
+
ENV NODE_ENV=production
|
|
56
|
+
|
|
57
|
+
RUN bun build \
|
|
58
|
+
--compile \
|
|
59
|
+
--minify-whitespace \
|
|
60
|
+
--minify-syntax \
|
|
61
|
+
--outfile server \
|
|
62
|
+
src/index.ts
|
|
63
|
+
|
|
64
|
+
FROM gcr.io/distroless/base
|
|
65
|
+
|
|
66
|
+
WORKDIR /app
|
|
67
|
+
|
|
68
|
+
COPY --from=build /app/server server
|
|
69
|
+
|
|
70
|
+
ENV NODE_ENV=production
|
|
71
|
+
|
|
72
|
+
CMD ["./server"]
|
|
73
|
+
|
|
74
|
+
EXPOSE 3000
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Build and Run
|
|
78
|
+
```bash
|
|
79
|
+
docker build -t my-elysia-app .
|
|
80
|
+
docker run -p 3000:3000 my-elysia-app
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### With Environment Variables
|
|
84
|
+
```dockerfile
|
|
85
|
+
FROM gcr.io/distroless/base
|
|
86
|
+
|
|
87
|
+
WORKDIR /app
|
|
88
|
+
|
|
89
|
+
COPY --from=build /app/server server
|
|
90
|
+
|
|
91
|
+
ENV NODE_ENV=production
|
|
92
|
+
ENV PORT=3000
|
|
93
|
+
ENV DATABASE_URL=""
|
|
94
|
+
ENV JWT_SECRET=""
|
|
95
|
+
|
|
96
|
+
CMD ["./server"]
|
|
97
|
+
|
|
98
|
+
EXPOSE 3000
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Cluster Mode (Multiple CPU Cores)
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
// src/index.ts
|
|
105
|
+
import cluster from 'node:cluster'
|
|
106
|
+
import os from 'node:os'
|
|
107
|
+
import process from 'node:process'
|
|
108
|
+
|
|
109
|
+
if (cluster.isPrimary) {
|
|
110
|
+
for (let i = 0; i < os.availableParallelism(); i++) {
|
|
111
|
+
cluster.fork()
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
await import('./server')
|
|
115
|
+
console.log(`Worker ${process.pid} started`)
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
// src/server.ts
|
|
121
|
+
import { Elysia } from 'elysia'
|
|
122
|
+
|
|
123
|
+
new Elysia()
|
|
124
|
+
.get('/', () => 'Hello World!')
|
|
125
|
+
.listen(3000)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Environment Variables
|
|
129
|
+
|
|
130
|
+
### .env File
|
|
131
|
+
```env
|
|
132
|
+
NODE_ENV=production
|
|
133
|
+
PORT=3000
|
|
134
|
+
DATABASE_URL=postgresql://user:password@localhost:5432/db
|
|
135
|
+
JWT_SECRET=your-secret-key
|
|
136
|
+
CORS_ORIGIN=https://example.com
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Load in App
|
|
140
|
+
```typescript
|
|
141
|
+
import { Elysia } from 'elysia'
|
|
142
|
+
|
|
143
|
+
const app = new Elysia()
|
|
144
|
+
.get('/env', () => ({
|
|
145
|
+
env: process.env.NODE_ENV,
|
|
146
|
+
port: process.env.PORT
|
|
147
|
+
}))
|
|
148
|
+
.listen(parseInt(process.env.PORT || '3000'))
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Platform-Specific Deployments
|
|
152
|
+
|
|
153
|
+
### Railway
|
|
154
|
+
```typescript
|
|
155
|
+
// Railway assigns random PORT via env variable
|
|
156
|
+
new Elysia()
|
|
157
|
+
.get('/', () => 'Hello Railway')
|
|
158
|
+
.listen(process.env.PORT ?? 3000)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Vercel
|
|
162
|
+
```typescript
|
|
163
|
+
// src/index.ts
|
|
164
|
+
import { Elysia } from 'elysia'
|
|
165
|
+
|
|
166
|
+
export default new Elysia()
|
|
167
|
+
.get('/', () => 'Hello Vercel')
|
|
168
|
+
|
|
169
|
+
export const GET = app.fetch
|
|
170
|
+
export const POST = app.fetch
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
// vercel.json
|
|
175
|
+
{
|
|
176
|
+
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
177
|
+
"bunVersion": "1.x"
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Cloudflare Workers
|
|
182
|
+
```typescript
|
|
183
|
+
import { Elysia } from 'elysia'
|
|
184
|
+
import { CloudflareAdapter } from 'elysia/adapter/cloudflare-worker'
|
|
185
|
+
|
|
186
|
+
export default new Elysia({
|
|
187
|
+
adapter: CloudflareAdapter
|
|
188
|
+
})
|
|
189
|
+
.get('/', () => 'Hello Cloudflare!')
|
|
190
|
+
.compile()
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
```toml
|
|
194
|
+
# wrangler.toml
|
|
195
|
+
name = "elysia-app"
|
|
196
|
+
main = "src/index.ts"
|
|
197
|
+
compatibility_date = "2025-06-01"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Node.js Adapter
|
|
201
|
+
```typescript
|
|
202
|
+
import { Elysia } from 'elysia'
|
|
203
|
+
import { node } from '@elysiajs/node'
|
|
204
|
+
|
|
205
|
+
const app = new Elysia({ adapter: node() })
|
|
206
|
+
.get('/', () => 'Hello Node.js')
|
|
207
|
+
.listen(3000)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Performance Optimization
|
|
211
|
+
|
|
212
|
+
### Enable AoT Compilation
|
|
213
|
+
```typescript
|
|
214
|
+
new Elysia({
|
|
215
|
+
aot: true // Ahead-of-time compilation
|
|
216
|
+
})
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Use Native Static Response
|
|
220
|
+
```typescript
|
|
221
|
+
new Elysia({
|
|
222
|
+
nativeStaticResponse: true
|
|
223
|
+
})
|
|
224
|
+
.get('/version', 1) // Optimized for Bun.serve.static
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Precompile Routes
|
|
228
|
+
```typescript
|
|
229
|
+
new Elysia({
|
|
230
|
+
precompile: true // Compile all routes ahead of time
|
|
231
|
+
})
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Health Checks
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
new Elysia()
|
|
238
|
+
.get('/health', () => ({
|
|
239
|
+
status: 'ok',
|
|
240
|
+
timestamp: Date.now()
|
|
241
|
+
}))
|
|
242
|
+
.get('/ready', ({ db }) => {
|
|
243
|
+
// Check database connection
|
|
244
|
+
const isDbReady = checkDbConnection()
|
|
245
|
+
|
|
246
|
+
if (!isDbReady) {
|
|
247
|
+
return status(503, { status: 'not ready' })
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return { status: 'ready' }
|
|
251
|
+
})
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Graceful Shutdown
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
import { Elysia } from 'elysia'
|
|
258
|
+
|
|
259
|
+
const app = new Elysia()
|
|
260
|
+
.get('/', () => 'Hello')
|
|
261
|
+
.listen(3000)
|
|
262
|
+
|
|
263
|
+
process.on('SIGTERM', () => {
|
|
264
|
+
console.log('SIGTERM received, shutting down gracefully')
|
|
265
|
+
app.stop()
|
|
266
|
+
process.exit(0)
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
process.on('SIGINT', () => {
|
|
270
|
+
console.log('SIGINT received, shutting down gracefully')
|
|
271
|
+
app.stop()
|
|
272
|
+
process.exit(0)
|
|
273
|
+
})
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Monitoring
|
|
277
|
+
|
|
278
|
+
### OpenTelemetry
|
|
279
|
+
```typescript
|
|
280
|
+
import { opentelemetry } from '@elysiajs/opentelemetry'
|
|
281
|
+
|
|
282
|
+
new Elysia()
|
|
283
|
+
.use(opentelemetry({
|
|
284
|
+
serviceName: 'my-service',
|
|
285
|
+
endpoint: 'http://localhost:4318'
|
|
286
|
+
}))
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Custom Logging
|
|
290
|
+
```typescript
|
|
291
|
+
.onRequest(({ request }) => {
|
|
292
|
+
console.log(`[${new Date().toISOString()}] ${request.method} ${request.url}`)
|
|
293
|
+
})
|
|
294
|
+
.onAfterResponse(({ request, set }) => {
|
|
295
|
+
console.log(`[${new Date().toISOString()}] ${request.method} ${request.url} - ${set.status}`)
|
|
296
|
+
})
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## SSL/TLS (HTTPS)
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
import { Elysia, file } from 'elysia'
|
|
303
|
+
|
|
304
|
+
new Elysia({
|
|
305
|
+
serve: {
|
|
306
|
+
tls: {
|
|
307
|
+
cert: file('cert.pem'),
|
|
308
|
+
key: file('key.pem')
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
})
|
|
312
|
+
.get('/', () => 'Hello HTTPS')
|
|
313
|
+
.listen(3000)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Best Practices
|
|
317
|
+
|
|
318
|
+
1. **Always compile to binary for production**
|
|
319
|
+
- Reduces memory usage
|
|
320
|
+
- Smaller deployment size
|
|
321
|
+
- No runtime needed
|
|
322
|
+
|
|
323
|
+
2. **Use environment variables**
|
|
324
|
+
- Never hardcode secrets
|
|
325
|
+
- Use different configs per environment
|
|
326
|
+
|
|
327
|
+
3. **Enable health checks**
|
|
328
|
+
- Essential for load balancers
|
|
329
|
+
- K8s/Docker orchestration
|
|
330
|
+
|
|
331
|
+
4. **Implement graceful shutdown**
|
|
332
|
+
- Handle SIGTERM/SIGINT
|
|
333
|
+
- Close connections properly
|
|
334
|
+
|
|
335
|
+
5. **Use cluster mode**
|
|
336
|
+
- Utilize all CPU cores
|
|
337
|
+
- Better performance under load
|
|
338
|
+
|
|
339
|
+
6. **Monitor your app**
|
|
340
|
+
- Use OpenTelemetry
|
|
341
|
+
- Log requests/responses
|
|
342
|
+
- Track errors
|
|
343
|
+
|
|
344
|
+
## Example Production Setup
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
// src/server.ts
|
|
348
|
+
import { Elysia } from 'elysia'
|
|
349
|
+
import { cors } from '@elysiajs/cors'
|
|
350
|
+
import { opentelemetry } from '@elysiajs/opentelemetry'
|
|
351
|
+
|
|
352
|
+
export const app = new Elysia({
|
|
353
|
+
aot: true,
|
|
354
|
+
nativeStaticResponse: true
|
|
355
|
+
})
|
|
356
|
+
.use(cors({
|
|
357
|
+
origin: process.env.CORS_ORIGIN || 'http://localhost:3000'
|
|
358
|
+
}))
|
|
359
|
+
.use(opentelemetry({
|
|
360
|
+
serviceName: 'my-service'
|
|
361
|
+
}))
|
|
362
|
+
.get('/health', () => ({ status: 'ok' }))
|
|
363
|
+
.get('/', () => 'Hello Production')
|
|
364
|
+
.listen(parseInt(process.env.PORT || '3000'))
|
|
365
|
+
|
|
366
|
+
// Graceful shutdown
|
|
367
|
+
process.on('SIGTERM', () => {
|
|
368
|
+
app.stop()
|
|
369
|
+
process.exit(0)
|
|
370
|
+
})
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
// src/index.ts (cluster)
|
|
375
|
+
import cluster from 'node:cluster'
|
|
376
|
+
import os from 'node:os'
|
|
377
|
+
|
|
378
|
+
if (cluster.isPrimary) {
|
|
379
|
+
for (let i = 0; i < os.availableParallelism(); i++) {
|
|
380
|
+
cluster.fork()
|
|
381
|
+
}
|
|
382
|
+
} else {
|
|
383
|
+
await import('./server')
|
|
384
|
+
}
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
```dockerfile
|
|
388
|
+
# Dockerfile
|
|
389
|
+
FROM oven/bun:1 AS build
|
|
390
|
+
|
|
391
|
+
WORKDIR /app
|
|
392
|
+
|
|
393
|
+
COPY package.json bun.lock ./
|
|
394
|
+
RUN bun install
|
|
395
|
+
|
|
396
|
+
COPY ./src ./src
|
|
397
|
+
|
|
398
|
+
ENV NODE_ENV=production
|
|
399
|
+
|
|
400
|
+
RUN bun build --compile --outfile server src/index.ts
|
|
401
|
+
|
|
402
|
+
FROM gcr.io/distroless/base
|
|
403
|
+
|
|
404
|
+
WORKDIR /app
|
|
405
|
+
|
|
406
|
+
COPY --from=build /app/server server
|
|
407
|
+
|
|
408
|
+
ENV NODE_ENV=production
|
|
409
|
+
|
|
410
|
+
CMD ["./server"]
|
|
411
|
+
|
|
412
|
+
EXPOSE 3000
|
|
413
|
+
```
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Eden Treaty
|
|
2
|
+
e2e type safe RPC client for share type from backend to frontend.
|
|
3
|
+
|
|
4
|
+
## What It Is
|
|
5
|
+
Type-safe object representation for Elysia server. Auto-completion + error handling.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
```bash
|
|
9
|
+
bun add @elysiajs/eden
|
|
10
|
+
bun add -d elysia
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Export Elysia server type:
|
|
14
|
+
```typescript
|
|
15
|
+
const app = new Elysia()
|
|
16
|
+
.get('/', () => 'Hi Elysia')
|
|
17
|
+
.get('/id/:id', ({ params: { id } }) => id)
|
|
18
|
+
.post('/mirror', ({ body }) => body, {
|
|
19
|
+
body: t.Object({
|
|
20
|
+
id: t.Number(),
|
|
21
|
+
name: t.String()
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
.listen(3000)
|
|
25
|
+
|
|
26
|
+
export type App = typeof app
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Consume on client side:
|
|
30
|
+
```typescript
|
|
31
|
+
import { treaty } from '@elysiajs/eden'
|
|
32
|
+
import type { App } from './server'
|
|
33
|
+
|
|
34
|
+
const client = treaty<App>('localhost:3000')
|
|
35
|
+
|
|
36
|
+
// response: Hi Elysia
|
|
37
|
+
const { data: index } = await client.get()
|
|
38
|
+
|
|
39
|
+
// response: 1895
|
|
40
|
+
const { data: id } = await client.id({ id: 1895 }).get()
|
|
41
|
+
|
|
42
|
+
// response: { id: 1895, name: 'Skadi' }
|
|
43
|
+
const { data: nendoroid } = await client.mirror.post({
|
|
44
|
+
id: 1895,
|
|
45
|
+
name: 'Skadi'
|
|
46
|
+
})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Common Errors & Fixes
|
|
50
|
+
- **Strict mode**: Enable in tsconfig
|
|
51
|
+
- **Version mismatch**: `npm why elysia` - must match server/client
|
|
52
|
+
- **TypeScript**: Min 5.0
|
|
53
|
+
- **Method chaining**: Required on server
|
|
54
|
+
- **Bun types**: `bun add -d @types/bun` if using Bun APIs
|
|
55
|
+
- **Path alias**: Must resolve same on frontend/backend
|
|
56
|
+
|
|
57
|
+
### Monorepo Path Alias
|
|
58
|
+
Must resolve to same file on frontend/backend
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
// tsconfig.json at root
|
|
62
|
+
{
|
|
63
|
+
"compilerOptions": {
|
|
64
|
+
"baseUrl": ".",
|
|
65
|
+
"paths": {
|
|
66
|
+
"@client/*": ["./<client-root>/src/*"],
|
|
67
|
+
"@server/*": ["./<server-root>/src/*"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Syntax Mapping
|
|
74
|
+
| Path | Method | Treaty |
|
|
75
|
+
|----------------|--------|-------------------------------|
|
|
76
|
+
| / | GET | `.get()` |
|
|
77
|
+
| /hi | GET | `.hi.get()` |
|
|
78
|
+
| /deep/nested | POST | `.deep.nested.post()` |
|
|
79
|
+
| /item/:name | GET | `.item({ name: 'x' }).get()` |
|
|
80
|
+
|
|
81
|
+
## Parameters
|
|
82
|
+
|
|
83
|
+
### With body (POST/PUT/PATCH/DELETE):
|
|
84
|
+
```typescript
|
|
85
|
+
.user.post(
|
|
86
|
+
{ name: 'Elysia' }, // body
|
|
87
|
+
{ headers: {}, query: {}, fetch: {} } // optional
|
|
88
|
+
)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### No body (GET/HEAD):
|
|
92
|
+
```typescript
|
|
93
|
+
.hello.get({ headers: {}, query: {}, fetch: {} })
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Empty body with query/headers:
|
|
97
|
+
```typescript
|
|
98
|
+
.user.post(null, { query: { name: 'Ely' } })
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Fetch options:
|
|
102
|
+
```typescript
|
|
103
|
+
.hello.get({ fetch: { signal: controller.signal } })
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### File upload:
|
|
107
|
+
```typescript
|
|
108
|
+
// Accepts: File | File[] | FileList | Blob
|
|
109
|
+
.image.post({
|
|
110
|
+
title: 'Title',
|
|
111
|
+
image: fileInput.files!
|
|
112
|
+
})
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Response
|
|
116
|
+
```typescript
|
|
117
|
+
const { data, error, response, status, headers } = await api.user.post({ name: 'x' })
|
|
118
|
+
|
|
119
|
+
if (error) {
|
|
120
|
+
switch (error.status) {
|
|
121
|
+
case 400: throw error.value
|
|
122
|
+
default: throw error.value
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// data unwrapped after error handling
|
|
126
|
+
return data
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
status >= 300 → `data = null`, `error` has value
|
|
130
|
+
|
|
131
|
+
## Stream/SSE
|
|
132
|
+
Interpreted as `AsyncGenerator`:
|
|
133
|
+
```typescript
|
|
134
|
+
const { data, error } = await treaty(app).ok.get()
|
|
135
|
+
if (error) throw error
|
|
136
|
+
|
|
137
|
+
for await (const chunk of data) console.log(chunk)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Utility Types
|
|
141
|
+
```typescript
|
|
142
|
+
import { Treaty } from '@elysiajs/eden'
|
|
143
|
+
|
|
144
|
+
type UserData = Treaty.Data<typeof api.user.post>
|
|
145
|
+
type UserError = Treaty.Error<typeof api.user.post>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## WebSocket
|
|
149
|
+
```typescript
|
|
150
|
+
const chat = api.chat.subscribe()
|
|
151
|
+
|
|
152
|
+
chat.subscribe((message) => console.log('got', message))
|
|
153
|
+
chat.on('open', () => chat.send('hello'))
|
|
154
|
+
|
|
155
|
+
// Native access: chat.raw
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
`.subscribe()` accepts same params as `get`/`head`
|