skillfullstack 0.0.0-stage → 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/.skillsRegistry/catalog.json +231 -0
- package/AGENTS.md +89 -0
- package/README.md +210 -2
- package/bin/index.js +508 -0
- package/package.json +57 -4
- package/skills/backend/apiEngineering/SKILL.md +102 -0
- package/skills/backend/apiEngineering/evals/evalApiEngineering.py +81 -0
- package/skills/backend/apiEngineering/evals/fixtures/invalid/sampleInvalidOpenApi.json +40 -0
- package/skills/backend/apiEngineering/evals/fixtures/valid/sampleValidOpenApi.json +47 -0
- package/skills/backend/apiEngineering/policies/compatibility.md +42 -0
- package/skills/backend/apiEngineering/policies/mandatory.md +48 -0
- package/skills/backend/apiEngineering/policies/performance.md +39 -0
- package/skills/backend/apiEngineering/policies/security.md +36 -0
- package/skills/backend/apiEngineering/references/apiObservability.md +39 -0
- package/skills/backend/apiEngineering/references/apiReference.md +3 -0
- package/skills/backend/apiEngineering/references/apiSecurityOwasp.md +47 -0
- package/skills/backend/apiEngineering/references/contractCompatibility.md +26 -0
- package/skills/backend/apiEngineering/references/databaseTransactions.md +40 -0
- package/skills/backend/apiEngineering/references/distributedReliability.md +26 -0
- package/skills/backend/apiEngineering/references/multiTenancy.md +27 -0
- package/skills/backend/apiEngineering/references/openApi32Standards.md +58 -0
- package/skills/backend/apiEngineering/references/paginationVersioning.md +57 -0
- package/skills/backend/apiEngineering/references/responseStandards.md +94 -0
- package/skills/backend/apiEngineering/scripts/auditApiContract.py +123 -0
- package/skills/backend/apiEngineering/scripts/checkBreakingChanges.py +77 -0
- package/skills/backend/apiEngineering/scripts/generateResponseEnvelope.py +88 -0
- package/skills/backend/apiEngineering/templates/apiChecklist.md +27 -0
- package/skills/backend/apiEngineering/templates/openapi.yaml +125 -0
- package/skills/backend/apiEngineering/templates/problemDetails.json +44 -0
- package/skills/backend/databaseArchitecture/SKILL.md +118 -0
- package/skills/backend/databaseArchitecture/evals/evalDatabaseArchitecture.py +85 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/dangerousMigration.sql +4 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/invalidSchema.sql +23 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/safeMigration.sql +3 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/validSchema.sql +37 -0
- package/skills/backend/databaseArchitecture/policies/integrity.md +25 -0
- package/skills/backend/databaseArchitecture/policies/mandatory.md +32 -0
- package/skills/backend/databaseArchitecture/policies/migration.md +22 -0
- package/skills/backend/databaseArchitecture/policies/normalization.md +25 -0
- package/skills/backend/databaseArchitecture/policies/performance.md +26 -0
- package/skills/backend/databaseArchitecture/policies/recovery.md +23 -0
- package/skills/backend/databaseArchitecture/policies/security.md +26 -0
- package/skills/backend/databaseArchitecture/policies/tableCreationChecklist.md +70 -0
- package/skills/backend/databaseArchitecture/references/analyticsWarehousing.md +32 -0
- package/skills/backend/databaseArchitecture/references/apiReference.md +3 -0
- package/skills/backend/databaseArchitecture/references/backupDisasterRecovery.md +27 -0
- package/skills/backend/databaseArchitecture/references/dataModelingLifecycle.md +30 -0
- package/skills/backend/databaseArchitecture/references/databaseTaxonomy.md +32 -0
- package/skills/backend/databaseArchitecture/references/indexingOptimization.md +32 -0
- package/skills/backend/databaseArchitecture/references/normalizationTheory.md +61 -0
- package/skills/backend/databaseArchitecture/references/scalabilitySharding.md +37 -0
- package/skills/backend/databaseArchitecture/references/transactionConcurrency.md +39 -0
- package/skills/backend/databaseArchitecture/scripts/analyzeMigration.py +99 -0
- package/skills/backend/databaseArchitecture/scripts/auditDatabaseSchema.py +177 -0
- package/skills/backend/databaseArchitecture/scripts/inspectDatabaseIndexes.py +149 -0
- package/skills/backend/databaseArchitecture/templates/adrTemplate.md +32 -0
- package/skills/backend/databaseArchitecture/templates/databaseChecklist.md +29 -0
- package/skills/backend/databaseArchitecture/templates/migrationPlan.md +40 -0
- package/skills/backend/durableBackgroundJobs/SKILL.md +112 -0
- package/skills/backend/durableBackgroundJobs/evals/durableJobVerification.json +14 -0
- package/skills/backend/durableBackgroundJobs/references/apiReference.md +3 -0
- package/skills/backend/durableBackgroundJobs/references/durableStepPatterns.md +6 -0
- package/skills/backend/durableBackgroundJobs/references/idempotencyKeys.md +5 -0
- package/skills/backend/durableBackgroundJobs/scripts/testWorkflowDispatch.py +24 -0
- package/skills/backend/golangStandard/SKILL.md +155 -0
- package/skills/backend/golangStandard/evals/goVerification.json +14 -0
- package/skills/backend/golangStandard/references/apiReference.md +3 -0
- package/skills/backend/golangStandard/references/layoutGuide.md +26 -0
- package/skills/backend/golangStandard/references/slogPatterns.md +26 -0
- package/skills/backend/golangStandard/scripts/scaffoldGoModule.py +105 -0
- package/skills/backend/pythonStandard/SKILL.md +138 -0
- package/skills/backend/pythonStandard/evals/pythonVerification.json +14 -0
- package/skills/backend/pythonStandard/references/apiReference.md +3 -0
- package/skills/backend/pythonStandard/references/pydanticPatterns.md +16 -0
- package/skills/backend/pythonStandard/references/pyprojectSpecs.md +37 -0
- package/skills/backend/pythonStandard/scripts/scaffoldUvProject.py +79 -0
- package/skills/backend/upstash/SKILL.md +98 -0
- package/skills/backend/upstash/evals/upstashVerification.json +14 -0
- package/skills/backend/upstash/references/apiReference.md +3 -0
- package/skills/backend/upstash/references/qstashFlowControl.md +34 -0
- package/skills/backend/upstash/references/ratelimitPatterns.md +53 -0
- package/skills/backend/upstash/references/workflowPatterns.md +35 -0
- package/skills/backend/upstash/scripts/testRedisConnection.py +36 -0
- package/skills/cicdDevops/cicdPipeline/SKILL.md +148 -0
- package/skills/cicdDevops/cicdPipeline/evals/evalCicd.py +37 -0
- package/skills/cicdDevops/cicdPipeline/references/apiReference.md +3 -0
- package/skills/cicdDevops/cicdPipeline/references/cicdDeploymentPatterns.md +27 -0
- package/skills/cicdDevops/cicdPipeline/scripts/auditDockerfileSecurity.py +56 -0
- package/skills/dataAi/mcpServerDevelopment/SKILL.md +123 -0
- package/skills/dataAi/mcpServerDevelopment/evals/mcpVerification.json +14 -0
- package/skills/dataAi/mcpServerDevelopment/references/apiReference.md +3 -0
- package/skills/dataAi/mcpServerDevelopment/references/mcpClientConfigs.md +38 -0
- package/skills/dataAi/mcpServerDevelopment/references/toolSchemaDesign.md +6 -0
- package/skills/dataAi/mcpServerDevelopment/scripts/runFastMcpBoilerplate.py +36 -0
- package/skills/dataAi/ragPipelineProduction/SKILL.md +113 -0
- package/skills/dataAi/ragPipelineProduction/evals/ragVerification.json +14 -0
- package/skills/dataAi/ragPipelineProduction/references/apiReference.md +3 -0
- package/skills/dataAi/ragPipelineProduction/references/chunkingStrategies.md +10 -0
- package/skills/dataAi/ragPipelineProduction/references/rrfAlgorithm.md +13 -0
- package/skills/dataAi/ragPipelineProduction/scripts/runHybridRrfSearch.py +33 -0
- package/skills/devopsCloud/cloudflare/SKILL.md +282 -0
- package/skills/devopsCloud/cloudflare/assets/README.md +48 -0
- package/skills/devopsCloud/cloudflare/assets/ai/agents-sdk.md +118 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-gateway.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-search.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/ai/workers-ai.md +127 -0
- package/skills/devopsCloud/cloudflare/assets/cli/c3.md +292 -0
- package/skills/devopsCloud/cloudflare/assets/cli/cf-cli.md +90 -0
- package/skills/devopsCloud/cloudflare/assets/cli/wrangler.md +43 -0
- package/skills/devopsCloud/cloudflare/assets/compute/cron-triggers.md +486 -0
- package/skills/devopsCloud/cloudflare/assets/compute/service-bindings.md +251 -0
- package/skills/devopsCloud/cloudflare/assets/compute/smart-placement.md +435 -0
- package/skills/devopsCloud/cloudflare/assets/compute/static-assets.md +220 -0
- package/skills/devopsCloud/cloudflare/assets/compute/workers.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/d1.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/durable-objects.md +122 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/hyperdrive.md +210 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/kv.md +198 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/queues.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/r2.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/vectorize.md +97 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/workflows.md +141 -0
- package/skills/devopsCloud/cloudflare/assets/llms.txt +143 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/cache-cdn.md +109 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/dns.md +71 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/rate-limiting.md +130 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/tunnels.md +57 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/waf.md +143 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/1xxx-errors.md +209 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/5xx-errors.md +111 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/http-status-codes.md +38 -0
- package/skills/devopsCloud/cloudflare/evals/evals.json +75 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/dynamic-routing.md +15 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/features.md +22 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/sdk-integration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/troubleshooting.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/README.md +25 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/gotchas.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/bindings/README.md +16 -0
- package/skills/devopsCloud/cloudflare/references/bindings/api.md +19 -0
- package/skills/devopsCloud/cloudflare/references/bindings/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/bindings/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/bindings/patterns.md +20 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/README.md +18 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/api.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/configuration.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/patterns.md +12 -0
- package/skills/devopsCloud/cloudflare/references/cliComparison.md +93 -0
- package/skills/devopsCloud/cloudflare/references/containers/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/containers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/containers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/containers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/containers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/d1/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/frameworkCompatibility.md +110 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/README.md +28 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/api.md +26 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/configuration.md +34 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/gotchas.md +20 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/images/README.md +12 -0
- package/skills/devopsCloud/cloudflare/references/images/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/images/configuration.md +17 -0
- package/skills/devopsCloud/cloudflare/references/images/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/images/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/kv/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/kv/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/kv/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/patterns.md +19 -0
- package/skills/devopsCloud/cloudflare/references/observability/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/observability/api.md +20 -0
- package/skills/devopsCloud/cloudflare/references/observability/configuration.md +23 -0
- package/skills/devopsCloud/cloudflare/references/observability/gotchas.md +25 -0
- package/skills/devopsCloud/cloudflare/references/observability/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/pages/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/pages/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/productSelectionMatrix.md +54 -0
- package/skills/devopsCloud/cloudflare/references/queues/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/queues/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/queues/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/queues/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/queues/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/r2/README.md +26 -0
- package/skills/devopsCloud/cloudflare/references/r2/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/r2/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/r2/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/r2/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/configuration.md +25 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/patterns.md +27 -0
- package/skills/devopsCloud/cloudflare/references/skill-feedback.md +41 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/stream/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/stream/api-live.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/stream/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/patterns.md +22 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/api.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/networking.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/patterns.md +24 -0
- package/skills/devopsCloud/cloudflare/references/waf/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/waf/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/waf/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/waf/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/waf/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/workflows/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/workflows/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workflows/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/workflows/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/workflows/patterns.md +30 -0
- package/skills/devopsCloud/cloudflare/scripts/auditCloudflareProduction.py +95 -0
- package/skills/foundation/promptEvalTesting/SKILL.md +114 -0
- package/skills/foundation/promptEvalTesting/evals/promptEvalVerification.json +14 -0
- package/skills/foundation/promptEvalTesting/references/apiReference.md +3 -0
- package/skills/foundation/promptEvalTesting/references/evalMetricsCatalog.md +7 -0
- package/skills/foundation/promptEvalTesting/references/promptfooConfigSpecs.md +16 -0
- package/skills/foundation/promptEvalTesting/scripts/runPromptEvalSuite.py +29 -0
- package/skills/frontend/astro/SKILL.md +327 -0
- package/skills/frontend/astro/assets/README.md +71 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/content-collections.md +1061 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/data-fetching.md +109 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/images.md +719 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/markdown.md +725 -0
- package/skills/frontend/astro/assets/build-your-ui/components.md +402 -0
- package/skills/frontend/astro/assets/build-your-ui/fonts.md +437 -0
- package/skills/frontend/astro/assets/build-your-ui/front-end-frameworks.md +245 -0
- package/skills/frontend/astro/assets/build-your-ui/layouts.md +267 -0
- package/skills/frontend/astro/assets/build-your-ui/scripts-and-event-handling.md +229 -0
- package/skills/frontend/astro/assets/build-your-ui/styles-and-css.md +782 -0
- package/skills/frontend/astro/assets/build-your-ui/syntax-highlighting.md +269 -0
- package/skills/frontend/astro/assets/configuration/build-with-ai.md +389 -0
- package/skills/frontend/astro/assets/configuration/configuration-overview.md +122 -0
- package/skills/frontend/astro/assets/configuration/dev-toolbar.md +86 -0
- package/skills/frontend/astro/assets/configuration/editor-setup.md +166 -0
- package/skills/frontend/astro/assets/configuration/environment-variables.md +352 -0
- package/skills/frontend/astro/assets/configuration/typescript.md +379 -0
- package/skills/frontend/astro/assets/configuration/working-with-integrations.md +606 -0
- package/skills/frontend/astro/assets/reference/adapter-reference.md +1242 -0
- package/skills/frontend/astro/assets/reference/cli-reference.md +575 -0
- package/skills/frontend/astro/assets/reference/configuration-reference.md +3144 -0
- package/skills/frontend/astro/assets/reference/content-loader-reference.md +1682 -0
- package/skills/frontend/astro/assets/reference/directives-reference.md +324 -0
- package/skills/frontend/astro/assets/reference/image-service-reference.md +346 -0
- package/skills/frontend/astro/assets/reference/integrations-reference.md +2813 -0
- package/skills/frontend/astro/assets/reference/modules/astro-actions.md +604 -0
- package/skills/frontend/astro/assets/reference/modules/astro-app.md +460 -0
- package/skills/frontend/astro/assets/reference/modules/astro-assets.md +1657 -0
- package/skills/frontend/astro/assets/reference/modules/astro-config.md +395 -0
- package/skills/frontend/astro/assets/reference/modules/astro-content.md +720 -0
- package/skills/frontend/astro/assets/reference/modules/astro-env.md +46 -0
- package/skills/frontend/astro/assets/reference/modules/astro-fetch.md +346 -0
- package/skills/frontend/astro/assets/reference/modules/astro-hono.md +37 -0
- package/skills/frontend/astro/assets/reference/modules/astro-i18n.md +462 -0
- package/skills/frontend/astro/assets/reference/modules/astro-middleware.md +292 -0
- package/skills/frontend/astro/assets/reference/modules/astro-static-paths.md +74 -0
- package/skills/frontend/astro/assets/reference/modules/astro-transitions.md +595 -0
- package/skills/frontend/astro/assets/reference/modules/astro-zod.md +120 -0
- package/skills/frontend/astro/assets/reference/session-driver-reference.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/endpoints.md +251 -0
- package/skills/frontend/astro/assets/routing-and-navigation/internationalization.md +374 -0
- package/skills/frontend/astro/assets/routing-and-navigation/middleware.md +288 -0
- package/skills/frontend/astro/assets/routing-and-navigation/pages.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/prefetch.md +273 -0
- package/skills/frontend/astro/assets/routing-and-navigation/routing.md +760 -0
- package/skills/frontend/astro/assets/routing-and-navigation/view-transitions.md +792 -0
- package/skills/frontend/astro/assets/server-rendering/actions.md +770 -0
- package/skills/frontend/astro/assets/server-rendering/caching.md +255 -0
- package/skills/frontend/astro/assets/server-rendering/on-demand-rendering.md +289 -0
- package/skills/frontend/astro/assets/server-rendering/server-islands.md +126 -0
- package/skills/frontend/astro/assets/server-rendering/sessions.md +270 -0
- package/skills/frontend/astro/assets/start-a-new-project/develop-and-build.md +147 -0
- package/skills/frontend/astro/assets/start-a-new-project/installation.md +342 -0
- package/skills/frontend/astro/assets/start-a-new-project/project-structure.md +137 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/testing.md +412 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/troubleshooting.md +229 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/upgrade-astro.md +205 -0
- package/skills/frontend/astro/assets/welcome/courses.md +46 -0
- package/skills/frontend/astro/assets/welcome/islands-architecture.md +135 -0
- package/skills/frontend/astro/assets/welcome/why-astro.md +90 -0
- package/skills/frontend/astro/evals/evals.json +66 -0
- package/skills/frontend/astro/references/contentCollections.md +164 -0
- package/skills/frontend/astro/references/islandsArchitecture.md +128 -0
- package/skills/frontend/astro/references/serverIslandsAndActions.md +187 -0
- package/skills/frontend/astro/scripts/auditAstroProduction.py +78 -0
- package/skills/frontend/generativeUi/SKILL.md +128 -0
- package/skills/frontend/generativeUi/evals/generativeUiVerification.json +14 -0
- package/skills/frontend/generativeUi/references/apiReference.md +3 -0
- package/skills/frontend/generativeUi/references/clientToolComponentMapping.md +8 -0
- package/skills/frontend/generativeUi/references/dataStreamProtocol.md +10 -0
- package/skills/frontend/generativeUi/scripts/generateUiComponentStub.py +46 -0
- package/skills/frontend/nextjs/SKILL.md +138 -0
- package/skills/frontend/nextjs/assets/README.md +67 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/create-next-app.md +210 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/next.md +484 -0
- package/skills/frontend/nextjs/assets/api-reference/components/font.md +952 -0
- package/skills/frontend/nextjs/assets/api-reference/components/form.md +387 -0
- package/skills/frontend/nextjs/assets/api-reference/components/image.md +1372 -0
- package/skills/frontend/nextjs/assets/api-reference/components/link.md +954 -0
- package/skills/frontend/nextjs/assets/api-reference/components/script.md +421 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-private.md +211 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-remote.md +652 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache.md +848 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-client.md +149 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-server.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/edge-runtime.md +188 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/default.md +80 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/dynamic-routes.md +417 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/error.md +361 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/forbidden.md +75 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation-client.md +308 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation.md +177 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/intercepting-routes.md +78 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/layout.md +803 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/loading.md +209 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/mdx-components.md +84 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/app-icons.md +302 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/manifest.md +90 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/opengraph-image.md +580 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/robots.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/sitemap.md +459 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/not-found.md +278 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/page.md +283 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/parallel-routes.md +517 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/proxy.md +857 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/public-folder.md +47 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-groups.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/dynamicParams.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/ensureStatic.md +195 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/instant.md +204 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/maxDuration.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/preferredRegion.md +55 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/prefetch.md +113 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/runtime.md +43 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route.md +772 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/src-folder.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/template.md +174 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/unauthorized.md +143 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/after.md +332 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheLife.md +642 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheTag.md +272 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/catchError.md +267 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/connection.md +114 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cookies.md +349 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/draft-mode.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/fetch.md +141 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/forbidden.md +327 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-image-metadata.md +311 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-metadata.md +1510 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-sitemaps.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-static-params.md +606 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-viewport.md +347 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/headers.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/image-response.md +225 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/io.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/navigation.md +220 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-request.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-response.md +219 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-root-params.md +479 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/not-found.md +269 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/permanentRedirect.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/prefetch.md +202 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/redirect.md +255 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/refresh.md +91 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidatePath.md +248 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidateTag.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unauthorized.md +389 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_cache.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_noStore.md +61 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_rethrow.md +79 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/updateTag.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-link-status.md +268 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-offline.md +222 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-params.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-pathname.md +189 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-report-web-vitals.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-router.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-search-params.md +416 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segment.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segments.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-server-inserted-html.md +145 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/userAgent.md +95 -0
- package/skills/frontend/nextjs/assets/api-reference/turbopack.md +552 -0
- package/skills/frontend/nextjs/assets/architecture/accessibility.md +47 -0
- package/skills/frontend/nextjs/assets/architecture/fast-refresh.md +122 -0
- package/skills/frontend/nextjs/assets/architecture/nextjs-compiler.md +376 -0
- package/skills/frontend/nextjs/assets/architecture/supported-browsers.md +146 -0
- package/skills/frontend/nextjs/assets/community/contribution-guide.md +459 -0
- package/skills/frontend/nextjs/assets/community/rspack.md +25 -0
- package/skills/frontend/nextjs/assets/getting-started/caching.md +626 -0
- package/skills/frontend/nextjs/assets/getting-started/css.md +336 -0
- package/skills/frontend/nextjs/assets/getting-started/deploying.md +115 -0
- package/skills/frontend/nextjs/assets/getting-started/error-handling.md +485 -0
- package/skills/frontend/nextjs/assets/getting-started/fetching-data.md +743 -0
- package/skills/frontend/nextjs/assets/getting-started/fonts.md +232 -0
- package/skills/frontend/nextjs/assets/getting-started/images.md +272 -0
- package/skills/frontend/nextjs/assets/getting-started/installation.md +446 -0
- package/skills/frontend/nextjs/assets/getting-started/layouts-and-pages.md +386 -0
- package/skills/frontend/nextjs/assets/getting-started/linking-and-navigating.md +475 -0
- package/skills/frontend/nextjs/assets/getting-started/metadata-and-og-images.md +370 -0
- package/skills/frontend/nextjs/assets/getting-started/mutating-data.md +679 -0
- package/skills/frontend/nextjs/assets/getting-started/project-structure.md +290 -0
- package/skills/frontend/nextjs/assets/getting-started/proxy.md +107 -0
- package/skills/frontend/nextjs/assets/getting-started/revalidating.md +241 -0
- package/skills/frontend/nextjs/assets/getting-started/route-handlers.md +233 -0
- package/skills/frontend/nextjs/assets/getting-started/server-and-client-components.md +683 -0
- package/skills/frontend/nextjs/assets/getting-started/upgrading.md +137 -0
- package/skills/frontend/nextjs/assets/glossary.md +315 -0
- package/skills/frontend/nextjs/evals/nextjsVerification.json +14 -0
- package/skills/frontend/nextjs/references/apiReference.md +3 -0
- package/skills/frontend/nextjs/references/dataAccessLayer.md +39 -0
- package/skills/frontend/nextjs/references/nextjsFeatureMap.md +276 -0
- package/skills/frontend/nextjs/references/productionChecklist.md +49 -0
- package/skills/frontend/nextjs/references/securityHeadersCsp.md +44 -0
- package/skills/frontend/nextjs/scripts/auditProductionReadiness.py +85 -0
- package/skills/frontend/shadcn-ui/SKILL.md +102 -0
- package/skills/frontend/shadcn-ui/assets/README.md +82 -0
- package/skills/frontend/shadcn-ui/assets/advanced/javascript.md +44 -0
- package/skills/frontend/shadcn-ui/assets/advanced/monorepo.md +254 -0
- package/skills/frontend/shadcn-ui/assets/advanced/react-19.md +166 -0
- package/skills/frontend/shadcn-ui/assets/advanced/tailwind-v4.md +333 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chain-of-thought.md +519 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chat.md +581 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/checkpoint.md +243 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/confirmation.md +382 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/context.md +188 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/file-tree.md +248 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/index.md +307 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/inline-citation.md +219 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/message.md +298 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/model-selector.md +368 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/plan.md +398 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/prompt-input.md +403 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/queue.md +517 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/reasoning.md +349 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/sources.md +303 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/stack-trace.md +514 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/subagent.md +551 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/suggestion.md +246 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/task.md +380 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/terminal.md +463 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/test-results.md +641 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/tool.md +915 -0
- package/skills/frontend/shadcn-ui/assets/components/accordion.md +490 -0
- package/skills/frontend/shadcn-ui/assets/components/alert-dialog.md +520 -0
- package/skills/frontend/shadcn-ui/assets/components/alert.md +351 -0
- package/skills/frontend/shadcn-ui/assets/components/aspect-ratio.md +206 -0
- package/skills/frontend/shadcn-ui/assets/components/attachment.md +715 -0
- package/skills/frontend/shadcn-ui/assets/components/avatar.md +581 -0
- package/skills/frontend/shadcn-ui/assets/components/badge.md +276 -0
- package/skills/frontend/shadcn-ui/assets/components/breadcrumb.md +556 -0
- package/skills/frontend/shadcn-ui/assets/components/bubble.md +706 -0
- package/skills/frontend/shadcn-ui/assets/components/button-group.md +969 -0
- package/skills/frontend/shadcn-ui/assets/components/button.md +523 -0
- package/skills/frontend/shadcn-ui/assets/components/calendar.md +959 -0
- package/skills/frontend/shadcn-ui/assets/components/card.md +684 -0
- package/skills/frontend/shadcn-ui/assets/components/carousel.md +643 -0
- package/skills/frontend/shadcn-ui/assets/components/chart.md +1295 -0
- package/skills/frontend/shadcn-ui/assets/components/checkbox.md +553 -0
- package/skills/frontend/shadcn-ui/assets/components/code-block.md +2041 -0
- package/skills/frontend/shadcn-ui/assets/components/collapsible.md +504 -0
- package/skills/frontend/shadcn-ui/assets/components/combobox.md +1102 -0
- package/skills/frontend/shadcn-ui/assets/components/command.md +682 -0
- package/skills/frontend/shadcn-ui/assets/components/context-menu.md +949 -0
- package/skills/frontend/shadcn-ui/assets/components/data-table.md +1667 -0
- package/skills/frontend/shadcn-ui/assets/components/date-picker.md +698 -0
- package/skills/frontend/shadcn-ui/assets/components/dialog.md +454 -0
- package/skills/frontend/shadcn-ui/assets/components/direction.md +205 -0
- package/skills/frontend/shadcn-ui/assets/components/drawer.md +806 -0
- package/skills/frontend/shadcn-ui/assets/components/dropdown-menu.md +1315 -0
- package/skills/frontend/shadcn-ui/assets/components/empty.md +562 -0
- package/skills/frontend/shadcn-ui/assets/components/field.md +1321 -0
- package/skills/frontend/shadcn-ui/assets/components/hover-card.md +342 -0
- package/skills/frontend/shadcn-ui/assets/components/index.md +82 -0
- package/skills/frontend/shadcn-ui/assets/components/input-group.md +980 -0
- package/skills/frontend/shadcn-ui/assets/components/input-otp.md +551 -0
- package/skills/frontend/shadcn-ui/assets/components/input.md +555 -0
- package/skills/frontend/shadcn-ui/assets/components/item.md +937 -0
- package/skills/frontend/shadcn-ui/assets/components/kbd.md +290 -0
- package/skills/frontend/shadcn-ui/assets/components/label.md +327 -0
- package/skills/frontend/shadcn-ui/assets/components/marker.md +445 -0
- package/skills/frontend/shadcn-ui/assets/components/menubar.md +804 -0
- package/skills/frontend/shadcn-ui/assets/components/message-scroller.md +2770 -0
- package/skills/frontend/shadcn-ui/assets/components/message.md +618 -0
- package/skills/frontend/shadcn-ui/assets/components/native-select.md +321 -0
- package/skills/frontend/shadcn-ui/assets/components/navigation-menu.md +568 -0
- package/skills/frontend/shadcn-ui/assets/components/pagination.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/popover.md +402 -0
- package/skills/frontend/shadcn-ui/assets/components/progress.md +240 -0
- package/skills/frontend/shadcn-ui/assets/components/questionnaire.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/components/radio-group.md +440 -0
- package/skills/frontend/shadcn-ui/assets/components/resizable.md +302 -0
- package/skills/frontend/shadcn-ui/assets/components/scroll-area.md +226 -0
- package/skills/frontend/shadcn-ui/assets/components/select.md +647 -0
- package/skills/frontend/shadcn-ui/assets/components/separator.md +235 -0
- package/skills/frontend/shadcn-ui/assets/components/sheet.md +354 -0
- package/skills/frontend/shadcn-ui/assets/components/sidebar.md +1156 -0
- package/skills/frontend/shadcn-ui/assets/components/skeleton.md +217 -0
- package/skills/frontend/shadcn-ui/assets/components/slider.md +253 -0
- package/skills/frontend/shadcn-ui/assets/components/spinner.md +352 -0
- package/skills/frontend/shadcn-ui/assets/components/switch.md +296 -0
- package/skills/frontend/shadcn-ui/assets/components/table.md +572 -0
- package/skills/frontend/shadcn-ui/assets/components/tabs.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/textarea.md +218 -0
- package/skills/frontend/shadcn-ui/assets/components/toast.md +260 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle-group.md +419 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle.md +220 -0
- package/skills/frontend/shadcn-ui/assets/components/tooltip.md +332 -0
- package/skills/frontend/shadcn-ui/assets/components/trace.md +1890 -0
- package/skills/frontend/shadcn-ui/assets/components/typography.md +561 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/next.md +108 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/overview.md +75 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/vite.md +144 -0
- package/skills/frontend/shadcn-ui/assets/forms/next.md +716 -0
- package/skills/frontend/shadcn-ui/assets/forms/overview.md +60 -0
- package/skills/frontend/shadcn-ui/assets/forms/react-hook-form.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/forms/tanstack-form.md +2236 -0
- package/skills/frontend/shadcn-ui/assets/installation/astro.md +252 -0
- package/skills/frontend/shadcn-ui/assets/installation/manual.md +255 -0
- package/skills/frontend/shadcn-ui/assets/installation/next.md +256 -0
- package/skills/frontend/shadcn-ui/assets/installation/react-router.md +226 -0
- package/skills/frontend/shadcn-ui/assets/installation/remix.md +52 -0
- package/skills/frontend/shadcn-ui/assets/installation/vite.md +314 -0
- package/skills/frontend/shadcn-ui/assets/mcp/mcp.md +338 -0
- package/skills/frontend/shadcn-ui/assets/overview/changelog.md +6 -0
- package/skills/frontend/shadcn-ui/assets/overview/cli.md +738 -0
- package/skills/frontend/shadcn-ui/assets/overview/components-json.md +379 -0
- package/skills/frontend/shadcn-ui/assets/overview/directory.md +74 -0
- package/skills/frontend/shadcn-ui/assets/overview/introduction.md +77 -0
- package/skills/frontend/shadcn-ui/assets/overview/skills.md +71 -0
- package/skills/frontend/shadcn-ui/assets/overview/theming.md +304 -0
- package/skills/frontend/shadcn-ui/assets/overview/typeset.md +242 -0
- package/skills/frontend/shadcn-ui/assets/registry/getting-started.md +648 -0
- package/skills/frontend/shadcn-ui/assets/registry/overview.md +90 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-item-json.md +483 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-json.md +178 -0
- package/skills/frontend/shadcn-ui/evals/componentVerification.json +19 -0
- package/skills/frontend/shadcn-ui/references/aiComponentsCatalog.md +51 -0
- package/skills/frontend/shadcn-ui/references/apiReference.md +3 -0
- package/skills/frontend/shadcn-ui/references/blocksCatalog.md +32 -0
- package/skills/frontend/shadcn-ui/references/cliCommands.md +47 -0
- package/skills/frontend/shadcn-ui/references/componentMarkdownSources.md +48 -0
- package/skills/frontend/shadcn-ui/scripts/fetchComponentDocs.py +43 -0
- package/skills/frontend/tsxReactStandard/SKILL.md +150 -0
- package/skills/frontend/tsxReactStandard/evals/tsxVerification.json +14 -0
- package/skills/frontend/tsxReactStandard/references/apiReference.md +3 -0
- package/skills/frontend/tsxReactStandard/references/discriminatedUnions.md +31 -0
- package/skills/frontend/tsxReactStandard/references/tsconfigStrict.md +36 -0
- package/skills/frontend/tsxReactStandard/scripts/validateTsxTypes.py +44 -0
- package/skills/gitVersionControl/gitWorkflow/SKILL.md +128 -0
- package/skills/gitVersionControl/gitWorkflow/assets/README.md +23 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-environment.md +87 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-formatting.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-reference.md +2363 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-git.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-remote-repositories.md +65 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/associating-text-editors-with-git.md +93 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/caching-your-github-credentials.md +115 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/getting-changes-from-a-remote-repository.md +76 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/ignoring-files.md +51 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/managing-remote-repositories.md +231 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/pushing-commits-to-a-remote-repository.md +119 -0
- package/skills/gitVersionControl/gitWorkflow/evals/evalGitWorkflow.py +43 -0
- package/skills/gitVersionControl/gitWorkflow/references/apiReference.md +3 -0
- package/skills/gitVersionControl/gitWorkflow/references/branchingModels.md +32 -0
- package/skills/gitVersionControl/gitWorkflow/scripts/diagnoseGitGraph.py +68 -0
- package/skills/github/assets/README.md +39 -0
- package/skills/github/assets/cli/gh-environment.md +87 -0
- package/skills/github/assets/cli/gh-formatting.md +156 -0
- package/skills/github/assets/cli/gh-reference.md +2363 -0
- package/skills/github/assets/docs-api/github-docs-api.md +60 -0
- package/skills/github/assets/rest-api/actions-secrets.md +1272 -0
- package/skills/github/assets/rest-api/actions-variables.md +1247 -0
- package/skills/github/assets/rest-api/actions-workflow-runs.md +1697 -0
- package/skills/github/assets/rest-api/actions-workflows.md +348 -0
- package/skills/github/assets/rest-api/authenticating.md +174 -0
- package/skills/github/assets/rest-api/branches.md +727 -0
- package/skills/github/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/assets/rest-api/collaborators.md +547 -0
- package/skills/github/assets/rest-api/commits.md +957 -0
- package/skills/github/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/assets/rest-api/orgs.md +1172 -0
- package/skills/github/assets/rest-api/overview.md +875 -0
- package/skills/github/assets/rest-api/pull-reviews.md +722 -0
- package/skills/github/assets/rest-api/pulls.md +1605 -0
- package/skills/github/assets/rest-api/quickstart.md +344 -0
- package/skills/github/assets/rest-api/releases.md +650 -0
- package/skills/github/assets/rest-api/repos.md +2957 -0
- package/skills/github/assets/rest-api/rules.md +1507 -0
- package/skills/github/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubAction/SKILL.md +159 -0
- package/skills/github/githubAction/assets/README.md +38 -0
- package/skills/github/githubAction/assets/reference/contexts.md +918 -0
- package/skills/github/githubAction/assets/reference/dependency-caching.md +393 -0
- package/skills/github/githubAction/assets/reference/events-that-trigger-workflows.md +1348 -0
- package/skills/github/githubAction/assets/reference/expressions.md +441 -0
- package/skills/github/githubAction/assets/reference/metadata-syntax.md +803 -0
- package/skills/github/githubAction/assets/reference/variables.md +149 -0
- package/skills/github/githubAction/assets/reference/workflow-cancellation.md +22 -0
- package/skills/github/githubAction/assets/reference/workflow-commands.md +1056 -0
- package/skills/github/githubAction/assets/reference/workflow-syntax.md +1721 -0
- package/skills/github/githubAction/assets/rest-api/secrets.md +1272 -0
- package/skills/github/githubAction/assets/rest-api/workflow-runs.md +1697 -0
- package/skills/github/githubAction/assets/rest-api/workflows.md +348 -0
- package/skills/github/githubAction/assets/starter-workflows/automation/stale.yml +27 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/blank.yml +36 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/docker-image.yml +18 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/go.yml +28 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/maven.yml +35 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/node.js.yml +31 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/python-app.yml +39 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/rust.yml +22 -0
- package/skills/github/githubAction/assets/starter-workflows/code-scanning/codeql.yml +97 -0
- package/skills/github/githubAction/evals/actionVerification.json +14 -0
- package/skills/github/githubAction/references/apiReference.md +3 -0
- package/skills/github/githubAction/references/workflowPatterns.md +81 -0
- package/skills/github/githubAction/scripts/validateWorkflowYaml.py +53 -0
- package/skills/github/githubQuality/SKILL.md +136 -0
- package/skills/github/githubQuality/assets/README.md +24 -0
- package/skills/github/githubQuality/assets/pull-requests/about-code-owners.md +178 -0
- package/skills/github/githubQuality/assets/pull-requests/about-merge-methods.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/creating-a-pull-request.md +170 -0
- package/skills/github/githubQuality/assets/pull-requests/giving-reviews.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/managing-a-merge-queue.md +134 -0
- package/skills/github/githubQuality/assets/pull-requests/merging-a-pull-request.md +101 -0
- package/skills/github/githubQuality/assets/pull-requests/resolving-reviews.md +59 -0
- package/skills/github/githubQuality/assets/pull-requests/status-checks.md +135 -0
- package/skills/github/githubQuality/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/githubQuality/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/githubQuality/assets/rest-api/commits.md +957 -0
- package/skills/github/githubQuality/assets/rest-api/pulls.md +1605 -0
- package/skills/github/githubQuality/assets/rest-api/reviews.md +722 -0
- package/skills/github/githubQuality/evals/qualityVerification.json +14 -0
- package/skills/github/githubQuality/references/apiReference.md +3 -0
- package/skills/github/githubQuality/references/codeownersExample.md +26 -0
- package/skills/github/githubQuality/references/prTemplate.md +20 -0
- package/skills/github/githubQuality/scripts/auditPrQuality.py +52 -0
- package/skills/github/githubSecurity/SKILL.md +170 -0
- package/skills/github/githubSecurity/assets/README.md +32 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning.md +67 -0
- package/skills/github/githubSecurity/assets/code-scanning/codeql-code-scanning.md +79 -0
- package/skills/github/githubSecurity/assets/code-scanning/configure-code-scanning.md +121 -0
- package/skills/github/githubSecurity/assets/dependabot/about-the-dependabot-yml-file.md +74 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-security-updates.md +95 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-version-updates.md +80 -0
- package/skills/github/githubSecurity/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/githubSecurity/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/githubSecurity/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/githubSecurity/assets/secret-scanning/enable-secret-scanning.md +59 -0
- package/skills/github/githubSecurity/assets/secret-scanning/secret-scanning.md +105 -0
- package/skills/github/githubSecurity/assets/security-advisories/github-advisory-database.md +148 -0
- package/skills/github/githubSecurity/evals/securityVerification.json +14 -0
- package/skills/github/githubSecurity/references/apiReference.md +3 -0
- package/skills/github/githubSecurity/references/codeqlAnalysis.yml +42 -0
- package/skills/github/githubSecurity/references/dependabotConfig.yml +27 -0
- package/skills/github/githubSecurity/scripts/auditRepoSecurity.py +47 -0
- package/skills/github/githubSetup/SKILL.md +137 -0
- package/skills/github/githubSetup/assets/README.md +40 -0
- package/skills/github/githubSetup/assets/branches/about-protected-branches.md +198 -0
- package/skills/github/githubSetup/assets/branches/changing-the-default-branch.md +49 -0
- package/skills/github/githubSetup/assets/branches/deleting-and-restoring-branches.md +44 -0
- package/skills/github/githubSetup/assets/branches/managing-a-branch-protection-rule.md +115 -0
- package/skills/github/githubSetup/assets/branches/renaming-a-branch.md +74 -0
- package/skills/github/githubSetup/assets/branches/viewing-branches-in-your-repository.md +30 -0
- package/skills/github/githubSetup/assets/repositories/about-repositories.md +127 -0
- package/skills/github/githubSetup/assets/repositories/cloning-a-repository.md +114 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-new-repository.md +82 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-repository-from-a-template.md +51 -0
- package/skills/github/githubSetup/assets/repositories/deleting-a-repository.md +34 -0
- package/skills/github/githubSetup/assets/repositories/managing-teams-and-people-with-access.md +69 -0
- package/skills/github/githubSetup/assets/repositories/renaming-a-repository.md +47 -0
- package/skills/github/githubSetup/assets/repositories/restoring-a-deleted-repository.md +61 -0
- package/skills/github/githubSetup/assets/repositories/setting-repository-visibility.md +137 -0
- package/skills/github/githubSetup/assets/rest-api/branches.md +727 -0
- package/skills/github/githubSetup/assets/rest-api/quickstart.md +344 -0
- package/skills/github/githubSetup/assets/rest-api/repos.md +2957 -0
- package/skills/github/githubSetup/assets/rulesets/about-rulesets.md +72 -0
- package/skills/github/githubSetup/assets/rulesets/available-rules-for-rulesets.md +383 -0
- package/skills/github/githubSetup/assets/rulesets/converting-branch-protections-to-rulesets.md +92 -0
- package/skills/github/githubSetup/assets/rulesets/creating-rulesets-for-a-repository.md +108 -0
- package/skills/github/githubSetup/assets/rulesets/managing-rulesets-for-a-repository.md +149 -0
- package/skills/github/githubSetup/assets/rulesets/troubleshooting-rules.md +122 -0
- package/skills/github/githubSetup/evals/setupVerification.json +14 -0
- package/skills/github/githubSetup/references/apiReference.md +3 -0
- package/skills/github/githubSetup/references/repoSettingsBlueprint.md +13 -0
- package/skills/github/githubSetup/references/rulesetTemplates.json +42 -0
- package/skills/github/githubSetup/scripts/configureRepoBaseline.py +46 -0
- package/skills/github/githubTeam/SKILL.md +115 -0
- package/skills/github/githubTeam/assets/README.md +21 -0
- package/skills/github/githubTeam/assets/organizations/about-organizations.md +69 -0
- package/skills/github/githubTeam/assets/organizations/repository-roles-for-an-organization.md +94 -0
- package/skills/github/githubTeam/assets/rest-api/collaborators.md +547 -0
- package/skills/github/githubTeam/assets/rest-api/orgs.md +1172 -0
- package/skills/github/githubTeam/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubTeam/assets/teams/about-teams.md +82 -0
- package/skills/github/githubTeam/assets/teams/adding-members-to-a-team.md +55 -0
- package/skills/github/githubTeam/evals/teamVerification.json +14 -0
- package/skills/github/githubTeam/references/apiReference.md +3 -0
- package/skills/github/githubTeam/references/permissionMatrix.md +17 -0
- package/skills/github/githubTeam/references/reviewAssignment.md +17 -0
- package/skills/github/githubTeam/scripts/manageTeamSync.py +31 -0
- package/skills/securityQa/llmSecurityRedteaming/SKILL.md +86 -0
- package/skills/securityQa/llmSecurityRedteaming/evals/securityRedteamVerification.json +14 -0
- package/skills/securityQa/llmSecurityRedteaming/references/apiReference.md +3 -0
- package/skills/securityQa/llmSecurityRedteaming/references/jailbreakTaxonomy.md +6 -0
- package/skills/securityQa/llmSecurityRedteaming/references/owaspLlmTopTen.md +12 -0
- package/skills/securityQa/llmSecurityRedteaming/scripts/testPromptInjection.py +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/SKILL.md +110 -0
- package/skills/softwareDevelopment/requirementsEngineering/evals/evalRequirements.py +33 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/apiReference.md +3 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/requirementsAnalysisModels.md +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/scripts/validateUserStories.py +49 -0
- package/skills/testing/testDrivenDevelopment/SKILL.md +122 -0
- package/skills/testing/testDrivenDevelopment/evals/evalTdd.py +25 -0
- package/skills/testing/testDrivenDevelopment/references/apiReference.md +3 -0
- package/skills/testing/testDrivenDevelopment/references/testPyramidDoubles.md +35 -0
- package/skills/testing/testDrivenDevelopment/scripts/auditTestPyramid.py +58 -0
|
@@ -0,0 +1,1242 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Astro Adapter API
|
|
3
|
+
sidebar:
|
|
4
|
+
label: Adapter API
|
|
5
|
+
i18nReady: true
|
|
6
|
+
---
|
|
7
|
+
import ReadMore from '~/components/ReadMore.astro';
|
|
8
|
+
import Since from '~/components/Since.astro';
|
|
9
|
+
import { FileTree } from '@astrojs/starlight/components';
|
|
10
|
+
|
|
11
|
+
Astro is designed to make it easy to deploy to any cloud provider for on-demand rendering, also known as server-side rendering (SSR). This ability is provided by __adapters__, which are [integrations](/en/reference/integrations-reference/). See the [on-demand rendering guide](/en/guides/on-demand-rendering/) to learn how to use an existing adapter.
|
|
12
|
+
|
|
13
|
+
## What is an adapter?
|
|
14
|
+
|
|
15
|
+
An adapter is a special kind of [integration](/en/reference/integrations-reference/) that provides an entrypoint for server rendering at request time. An adapter has access to the full Integration API and does two things:
|
|
16
|
+
|
|
17
|
+
- Implements host-specific APIs for handling requests.
|
|
18
|
+
- Configures the build according to host conventions.
|
|
19
|
+
|
|
20
|
+
## Building an adapter
|
|
21
|
+
|
|
22
|
+
Create an integration and call the `setAdapter()` function in the [`astro:config:done`](/en/reference/integrations-reference/#astroconfigdone) hook. This allows you to define a server entrypoint and the features supported by your adapter.
|
|
23
|
+
|
|
24
|
+
The following example creates an adapter with a server entrypoint and stable support for Astro static output:
|
|
25
|
+
|
|
26
|
+
```js title="my-adapter.mjs" {5-14} "setAdapter"
|
|
27
|
+
export default function createIntegration() {
|
|
28
|
+
return {
|
|
29
|
+
name: '@example/my-adapter',
|
|
30
|
+
hooks: {
|
|
31
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
32
|
+
setAdapter({
|
|
33
|
+
name: '@example/my-adapter',
|
|
34
|
+
entrypointResolution: 'auto',
|
|
35
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
36
|
+
supportedAstroFeatures: {
|
|
37
|
+
staticOutput: 'stable'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The `setAdapter()` function accepts an object containing the following properties:
|
|
47
|
+
|
|
48
|
+
### `name`
|
|
49
|
+
|
|
50
|
+
<p>
|
|
51
|
+
|
|
52
|
+
**Type:** `string`
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
Defines a unique name for your adapter. This will be used for logging.
|
|
56
|
+
|
|
57
|
+
### `entrypointResolution`
|
|
58
|
+
|
|
59
|
+
<p>
|
|
60
|
+
|
|
61
|
+
**Type:** `"explicit" | "auto"`<br />
|
|
62
|
+
**Default**: `"explicit"`<br />
|
|
63
|
+
<Since v="6.0.0" />
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
:::caution[Deprecated]
|
|
67
|
+
`entrypointResolution: "explicit"` is deprecated. `entrypointResolution: "auto"` will become the default, and only, behavior in a future major version.
|
|
68
|
+
|
|
69
|
+
See [how to migrate](/en/guides/upgrade-to/v6/#deprecated-createexports-and-start-adapter-api).
|
|
70
|
+
:::
|
|
71
|
+
|
|
72
|
+
Specifies the method Astro will use to resolve the server entrypoint: `"auto"` (recommended) or `"explicit"` (default, but deprecated):
|
|
73
|
+
|
|
74
|
+
- **`"auto"` (recommended):** You are responsible for providing a valid module as an entrypoint using either [`serverEntrypoint`](/en/reference/adapter-reference/#serverentrypoint) or, if you need further customization at the Vite level using [`vite.build.rollupOptions.input`](https://rollupjs.org/configuration-options/#input).
|
|
75
|
+
- **`"explicit"` (deprecated)**: You must provide the exports required by the host in the server entrypoint using a `createExports()` function before passing them to `setAdapter()` as an [`exports`](#exports) list. This supports adapters built using the Astro 5 version of the Adapter API. By default, all adapters will receive this value to allow backwards compatibility. **However, no new adapters should be created with this value.** Existing adapters should override this default value with `"auto"` as soon as they are able to migrate to the new v6 API.
|
|
76
|
+
|
|
77
|
+
The following example defines the `entrypointResolution` and `serverEntrypoint` to tell Astro that a custom entrypoint is provided:
|
|
78
|
+
|
|
79
|
+
```js title="my-adapter.mjs" {8-9}
|
|
80
|
+
export default function createIntegration() {
|
|
81
|
+
return {
|
|
82
|
+
name: '@example/my-adapter',
|
|
83
|
+
hooks: {
|
|
84
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
85
|
+
setAdapter({
|
|
86
|
+
name: '@example/my-adapter',
|
|
87
|
+
entrypointResolution: 'auto',
|
|
88
|
+
serverEntrypoint: '@example/my-adapter/custom-entrypoint.js',
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The following example defines the `entrypointResolution` and Rollup options to tell Astro that a custom entrypoint is provided:
|
|
97
|
+
|
|
98
|
+
```js title="my-adapter.mjs" {9-11,19}
|
|
99
|
+
export default function createIntegration() {
|
|
100
|
+
return {
|
|
101
|
+
name: '@example/my-adapter',
|
|
102
|
+
hooks: {
|
|
103
|
+
'astro:config:setup': ({ updateConfig }) => {
|
|
104
|
+
updateConfig({
|
|
105
|
+
vite: {
|
|
106
|
+
build: {
|
|
107
|
+
rollupOptions: {
|
|
108
|
+
input: '@example/my-adapter/custom-entrypoint.js'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
115
|
+
setAdapter({
|
|
116
|
+
name: '@example/my-adapter',
|
|
117
|
+
entrypointResolution: 'auto',
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
<ReadMore>Learn more about how to [build a server entrypoint](#building-a-server-entrypoint).</ReadMore>
|
|
126
|
+
|
|
127
|
+
### `serverEntrypoint`
|
|
128
|
+
|
|
129
|
+
<p>
|
|
130
|
+
|
|
131
|
+
**Type:** `string | URL`
|
|
132
|
+
</p>
|
|
133
|
+
|
|
134
|
+
Defines the entrypoint for on-demand rendering.
|
|
135
|
+
|
|
136
|
+
### `supportedAstroFeatures`
|
|
137
|
+
|
|
138
|
+
<p>
|
|
139
|
+
|
|
140
|
+
**Type:** `AstroAdapterFeatureMap`<br />
|
|
141
|
+
<Since v="3.0.0" />
|
|
142
|
+
</p>
|
|
143
|
+
|
|
144
|
+
A map of Astro's built-in features supported by the adapter. This allows Astro to determine which features an adapter supports, so appropriate error messages can be provided.
|
|
145
|
+
|
|
146
|
+
<ReadMore>Discover the [available Astro features](#astro-features) that an adapter can configure.</ReadMore>
|
|
147
|
+
|
|
148
|
+
### `adapterFeatures`
|
|
149
|
+
|
|
150
|
+
<p>
|
|
151
|
+
|
|
152
|
+
**Type:** `AstroAdapterFeatures`<br />
|
|
153
|
+
<Since v="3.0.0" />
|
|
154
|
+
</p>
|
|
155
|
+
|
|
156
|
+
An object that specifies which [adapter features that change the build output](#adapter-features) are supported by the adapter.
|
|
157
|
+
|
|
158
|
+
### `client`
|
|
159
|
+
|
|
160
|
+
<p>
|
|
161
|
+
|
|
162
|
+
**Type:** `{ internalFetchHeaders?: Record<string, string> | () => Record<string, string>; assetQueryParams?: URLSearchParams; }`<br />
|
|
163
|
+
<Since v="5.15.0" />
|
|
164
|
+
</p>
|
|
165
|
+
|
|
166
|
+
A configuration object for Astro's client-side code.
|
|
167
|
+
|
|
168
|
+
#### `client.internalFetchHeaders`
|
|
169
|
+
|
|
170
|
+
<p>
|
|
171
|
+
|
|
172
|
+
**Type:** `Record<string, string> | () => Record<string, string>`
|
|
173
|
+
</p>
|
|
174
|
+
|
|
175
|
+
Defines the headers to inject into Astro's internal fetch calls (e.g. Actions, View Transitions, Server Islands, Prefetch). This can be an object of headers or a function that returns headers.
|
|
176
|
+
|
|
177
|
+
The following example retrieves a `DEPLOY_ID` from the environment variables and, if provided, returns an object with the header name as key and the deploy id as value:
|
|
178
|
+
|
|
179
|
+
```js title="my-adapter.mjs" {10-15}
|
|
180
|
+
export default function createIntegration() {
|
|
181
|
+
return {
|
|
182
|
+
name: '@example/my-adapter',
|
|
183
|
+
hooks: {
|
|
184
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
185
|
+
setAdapter({
|
|
186
|
+
name: '@example/my-adapter',
|
|
187
|
+
entrypointResolution: 'auto',
|
|
188
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
189
|
+
client: {
|
|
190
|
+
internalFetchHeaders: () => {
|
|
191
|
+
const deployId = process.env.DEPLOY_ID;
|
|
192
|
+
return deployId ? { 'Your-Header-ID': deployId } : {};
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### `client.assetQueryParams`
|
|
203
|
+
|
|
204
|
+
<p>
|
|
205
|
+
|
|
206
|
+
**Type:** `URLSearchParams`
|
|
207
|
+
</p>
|
|
208
|
+
|
|
209
|
+
Defines the query parameters to append to all asset URLs (e.g. images, stylesheets, scripts). This is useful for adapters that need to track deployment versions or other metadata.
|
|
210
|
+
|
|
211
|
+
The following example retrieves a `DEPLOY_ID` from the environment variables and, if provided, returns an object with a custom search parameter name as key and the deploy id as value:
|
|
212
|
+
|
|
213
|
+
```js title="my-adapter.mjs" {10-14}
|
|
214
|
+
export default function createIntegration() {
|
|
215
|
+
return {
|
|
216
|
+
name: '@example/my-adapter',
|
|
217
|
+
hooks: {
|
|
218
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
219
|
+
setAdapter({
|
|
220
|
+
name: '@example/my-adapter',
|
|
221
|
+
entrypointResolution: 'auto',
|
|
222
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
223
|
+
client: {
|
|
224
|
+
assetQueryParams: process.env.DEPLOY_ID
|
|
225
|
+
? new URLSearchParams({ yourParam: process.env.DEPLOY_ID })
|
|
226
|
+
: undefined,
|
|
227
|
+
},
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### `previewEntrypoint`
|
|
236
|
+
|
|
237
|
+
<p>
|
|
238
|
+
|
|
239
|
+
**Type:** `string | URL`<br />
|
|
240
|
+
<Since v="1.5.0" />
|
|
241
|
+
</p>
|
|
242
|
+
|
|
243
|
+
Defines the path or ID of a module in the adapter's package that is responsible for starting up the built server when `astro preview` is run.
|
|
244
|
+
|
|
245
|
+
```js title="my-adapter.mjs" {10}
|
|
246
|
+
export default function createIntegration() {
|
|
247
|
+
return {
|
|
248
|
+
name: '@example/my-adapter',
|
|
249
|
+
hooks: {
|
|
250
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
251
|
+
setAdapter({
|
|
252
|
+
name: '@example/my-adapter',
|
|
253
|
+
entrypointResolution: 'auto',
|
|
254
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
255
|
+
previewEntrypoint: '@example/my-adapter/preview.js',
|
|
256
|
+
});
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
<ReadMore>Learn more about how to [build a preview entrypoint](#building-a-preview-entrypoint).</ReadMore>
|
|
264
|
+
|
|
265
|
+
### `args`
|
|
266
|
+
|
|
267
|
+
<p>
|
|
268
|
+
|
|
269
|
+
**Type:** `any`
|
|
270
|
+
</p>
|
|
271
|
+
|
|
272
|
+
:::caution[Deprecated]
|
|
273
|
+
This property is deprecated and will be removed in a future major version. Learn how to [update your adapter with `entrypointResolution: "auto"`](/en/guides/upgrade-to/v6/#deprecated-createexports-and-start-adapter-api).
|
|
274
|
+
:::
|
|
275
|
+
|
|
276
|
+
A JSON-serializable value that will be passed to the adapter's server entrypoint at runtime. This is useful to pass an object containing build-time configuration (e.g. paths, secrets) to your server runtime code.
|
|
277
|
+
|
|
278
|
+
The following example defines an `args` object with a property that identifies where assets generated by Astro are located:
|
|
279
|
+
|
|
280
|
+
```js title="my-adapter.mjs" {8-11}
|
|
281
|
+
export default function createIntegration() {
|
|
282
|
+
return {
|
|
283
|
+
name: '@example/my-adapter',
|
|
284
|
+
hooks: {
|
|
285
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
286
|
+
setAdapter({
|
|
287
|
+
name: '@example/my-adapter',
|
|
288
|
+
entrypointResolution: 'explicit',
|
|
289
|
+
args: {
|
|
290
|
+
assets: config.build.assets
|
|
291
|
+
},
|
|
292
|
+
serverEntrypoint: '@example/my-adapter/server.js'
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### `exports`
|
|
301
|
+
|
|
302
|
+
<p>
|
|
303
|
+
|
|
304
|
+
**Type:** `string[]`
|
|
305
|
+
</p>
|
|
306
|
+
|
|
307
|
+
:::caution[Deprecated]
|
|
308
|
+
This property is deprecated and will be removed in a future major version. Learn how to [update your adapter with `entrypointResolution: "auto"`](/en/guides/upgrade-to/v6/#deprecated-createexports-and-start-adapter-api).
|
|
309
|
+
:::
|
|
310
|
+
|
|
311
|
+
Defines an array of named exports to use in conjunction with the `createExports()` function of your server entrypoint.
|
|
312
|
+
|
|
313
|
+
The following example assumes that `createExports()` provides an export named `handler`:
|
|
314
|
+
|
|
315
|
+
```js title="my-adapter.mjs" {8-9}
|
|
316
|
+
export default function createIntegration() {
|
|
317
|
+
return {
|
|
318
|
+
name: '@example/my-adapter',
|
|
319
|
+
hooks: {
|
|
320
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
321
|
+
setAdapter({
|
|
322
|
+
name: '@example/my-adapter',
|
|
323
|
+
entrypointResolution: 'explicit',
|
|
324
|
+
exports: ['handler'],
|
|
325
|
+
serverEntrypoint: '@example/my-adapter/server.js'
|
|
326
|
+
});
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Custom prerenderer
|
|
334
|
+
|
|
335
|
+
<p><Since v="6.0.0" /></p>
|
|
336
|
+
|
|
337
|
+
Adapters can provide a custom prerenderer to control how pages are prerendered by using the [`setPrerenderer()`](/en/reference/integrations-reference/#setprerenderer-option) function in the `astro:build:start` hook.
|
|
338
|
+
|
|
339
|
+
The following example shows how an adapter can set a custom prerenderer:
|
|
340
|
+
|
|
341
|
+
```js title="my-adapter.mjs"
|
|
342
|
+
export default function createIntegration() {
|
|
343
|
+
return {
|
|
344
|
+
name: '@example/my-adapter',
|
|
345
|
+
hooks: {
|
|
346
|
+
'astro:build:start': ({ setPrerenderer }) => {
|
|
347
|
+
setPrerenderer((defaultPrerenderer) => ({
|
|
348
|
+
name: 'my-prerenderer',
|
|
349
|
+
async setup() {
|
|
350
|
+
// Start a preview server
|
|
351
|
+
},
|
|
352
|
+
async getStaticPaths() {
|
|
353
|
+
// Returns { paths: Array<{ pathname: string, route: RouteData }>, metadata }
|
|
354
|
+
return defaultPrerenderer.getStaticPaths();
|
|
355
|
+
},
|
|
356
|
+
async render(request, { routeData }) {
|
|
357
|
+
// request: Request, options: { routeData: RouteData }
|
|
358
|
+
// Custom rendering logic, e.g. make HTTP requests to a preview server
|
|
359
|
+
const response = await fetch(`http://localhost:4321${new URL(request.url).pathname}`);
|
|
360
|
+
return { response };
|
|
361
|
+
},
|
|
362
|
+
async teardown() {
|
|
363
|
+
// Stop the preview server
|
|
364
|
+
}
|
|
365
|
+
}));
|
|
366
|
+
},
|
|
367
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
368
|
+
setAdapter({
|
|
369
|
+
name: '@example/my-adapter',
|
|
370
|
+
entrypointResolution: 'auto',
|
|
371
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
The factory function receives the default prerenderer, allowing you to wrap or extend its behavior. This is useful when you only need to customize specific aspects of prerendering.
|
|
380
|
+
|
|
381
|
+
<p><Since v="7.4.0" /></p>
|
|
382
|
+
|
|
383
|
+
The factory function also receives a context object with the [output directories resolved by Vite](/en/reference/integrations-reference/#astrobuildoutputdirectories). Use these to locate build output instead of reading directories from the Astro config. For example, this is useful to start a preview server against the built server code:
|
|
384
|
+
|
|
385
|
+
```js title="my-adapter.mjs" "{ outputDirectories }"
|
|
386
|
+
setPrerenderer((defaultPrerenderer, { outputDirectories }) => ({
|
|
387
|
+
name: 'my-prerenderer',
|
|
388
|
+
async setup() {
|
|
389
|
+
// Start a preview server using the built output
|
|
390
|
+
await startPreviewServer({
|
|
391
|
+
client: outputDirectories.client,
|
|
392
|
+
server: outputDirectories.server,
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
// ...
|
|
396
|
+
}));
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## Building a server entrypoint
|
|
400
|
+
|
|
401
|
+
You will need to create a file that executes during server-side requests to enable on-demand rendering with your particular host. Astro's adapter API attempts to work with any type of host and gives a flexible way to conform to the host APIs.
|
|
402
|
+
|
|
403
|
+
You can import and use [`createApp()`](/en/reference/modules/astro-app/#createapp) to access methods that allow you to work with standard [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects.
|
|
404
|
+
|
|
405
|
+
This file should conform to what the host expects. For example, some serverless hosts expect you to export an `handler()` function:
|
|
406
|
+
|
|
407
|
+
```js title="my-adapter/server.js"
|
|
408
|
+
import { createApp } from 'astro/app/entrypoint';
|
|
409
|
+
|
|
410
|
+
const app = createApp();
|
|
411
|
+
|
|
412
|
+
export async function handler(event, context) {
|
|
413
|
+
// ...
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
<ReadMore>Learn more about the methods and utilities available in the [Adapter Server Entrypoint API Reference](/en/reference/modules/astro-app/).</ReadMore>
|
|
418
|
+
|
|
419
|
+
### Passing build-time configuration
|
|
420
|
+
|
|
421
|
+
If you need to access build-time configuration in your server entrypoint, you can pass via a virtual module. For example, your server might need to identify where assets generated by Astro are located.
|
|
422
|
+
|
|
423
|
+
First, create and register a Vite plugin to serialize the data:
|
|
424
|
+
|
|
425
|
+
```js title="my-adapter.mjs"
|
|
426
|
+
const VIRTUAL_MODULE_ID = 'virtual:@example/my-adapter:config';
|
|
427
|
+
const RESOLVED_VIRTUAL_MODULE_ID = '\0' + VIRTUAL_MODULE_ID;
|
|
428
|
+
|
|
429
|
+
function createConfigPlugin(config) {
|
|
430
|
+
return {
|
|
431
|
+
name: VIRTUAL_MODULE_ID,
|
|
432
|
+
resolveId: {
|
|
433
|
+
filter: {
|
|
434
|
+
id: new RegExp(`^${VIRTUAL_MODULE_ID}$`),
|
|
435
|
+
},
|
|
436
|
+
handler() {
|
|
437
|
+
return RESOLVED_VIRTUAL_MODULE_ID;
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
load: {
|
|
441
|
+
filter: {
|
|
442
|
+
id: new RegExp(`^${RESOLVED_VIRTUAL_MODULE_ID}$`),
|
|
443
|
+
},
|
|
444
|
+
handler() {
|
|
445
|
+
return `
|
|
446
|
+
export const assets = ${JSON.stringify(config.build.assets)};
|
|
447
|
+
`;
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export default function createIntegration() {
|
|
454
|
+
let _config;
|
|
455
|
+
return {
|
|
456
|
+
name: '@example/my-adapter',
|
|
457
|
+
hooks: {
|
|
458
|
+
'astro:config:setup': ({ config, updateConfig }) => {
|
|
459
|
+
_config = config;
|
|
460
|
+
|
|
461
|
+
updateConfig({
|
|
462
|
+
vite: {
|
|
463
|
+
plugins: [createConfigPlugin(_config)]
|
|
464
|
+
}
|
|
465
|
+
})
|
|
466
|
+
},
|
|
467
|
+
'astro:config:done': ({ config, setAdapter }) => {
|
|
468
|
+
_config = config;
|
|
469
|
+
setAdapter({
|
|
470
|
+
name: '@example/my-adapter',
|
|
471
|
+
entrypointResolution: 'auto',
|
|
472
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
473
|
+
});
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
You can create internal types if needed:
|
|
481
|
+
|
|
482
|
+
```ts title="virtual.d.ts"
|
|
483
|
+
declare module 'virtual:@example/my-adapter:config' {
|
|
484
|
+
export const assets: string;
|
|
485
|
+
}
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
You can then import the virtual module:
|
|
489
|
+
|
|
490
|
+
```js title="my-adapter/server.js" ins={2}
|
|
491
|
+
import { createApp } from 'astro/app/entrypoint';
|
|
492
|
+
import { assets } from 'virtual:@example/my-adapter:config';
|
|
493
|
+
|
|
494
|
+
const app = createApp();
|
|
495
|
+
|
|
496
|
+
export async function handler(event, context) {
|
|
497
|
+
// ...
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
## Building a preview entrypoint
|
|
502
|
+
|
|
503
|
+
When your adapter supports [hybrid](#hybridoutput) or [server output](#serveroutput), you can provide a preview entrypoint to enable support for [`astro preview`](/en/reference/cli-reference/#astro-preview). Static output does not require a preview entrypoint.
|
|
504
|
+
|
|
505
|
+
To register a preview entrypoint, make the module's default export a function that takes the [server parameters](#previewserverparams) as an argument and returns a [`PreviewServer`](#previewserver). Then, specify the module path as the value for [`previewEntrypoint`](#previewentrypoint) in your adapter.
|
|
506
|
+
|
|
507
|
+
The following example implements an entrypoint that creates a preview server using a custom `createServer()` function before returning it:
|
|
508
|
+
|
|
509
|
+
```ts title="my-adapter/preview.ts"
|
|
510
|
+
import type { CreatePreviewServer } from 'astro';
|
|
511
|
+
import { createServer } from './utils/server';
|
|
512
|
+
|
|
513
|
+
const createPreviewServer: CreatePreviewServer = async (config) => {
|
|
514
|
+
const host = config.host ?? '0.0.0.0';
|
|
515
|
+
const port = config.port ?? 4321;
|
|
516
|
+
const server = createServer(host, port);
|
|
517
|
+
|
|
518
|
+
return server;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export default createPreviewServer;
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## Astro features
|
|
525
|
+
|
|
526
|
+
Astro features are a way for an adapter to tell Astro whether they are able to support a feature, and also the adapter’s level of support.
|
|
527
|
+
|
|
528
|
+
When using these properties, Astro will:
|
|
529
|
+
- run specific validation;
|
|
530
|
+
- emit contextual information to the logs;
|
|
531
|
+
|
|
532
|
+
These operations are run based on the features supported or not supported, their level of support, the [desired amount of logging](#adaptersupportwithmessagesuppress), and the user's own configuration.
|
|
533
|
+
|
|
534
|
+
The following configuration tells Astro that this adapter has experimental support for the Sharp-powered built-in image service:
|
|
535
|
+
|
|
536
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
537
|
+
export default function createIntegration() {
|
|
538
|
+
return {
|
|
539
|
+
name: '@example/my-adapter',
|
|
540
|
+
hooks: {
|
|
541
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
542
|
+
setAdapter({
|
|
543
|
+
name: '@example/my-adapter',
|
|
544
|
+
entrypointResolution: 'auto',
|
|
545
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
546
|
+
supportedAstroFeatures: {
|
|
547
|
+
sharpImageService: 'experimental'
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
If the Sharp image service is used, Astro will log a warning and error to the terminal based on your adapter's support:
|
|
557
|
+
|
|
558
|
+
```
|
|
559
|
+
[@example/my-adapter] The feature is experimental and subject to issues or changes.
|
|
560
|
+
|
|
561
|
+
[@example/my-adapter] The currently selected adapter `@example/my-adapter` is not compatible with the service "Sharp". Your project will NOT be able to build.
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
A message can additionally be provided to give more context to the user:
|
|
565
|
+
|
|
566
|
+
```js title="my-adapter.mjs" ins={10-15}
|
|
567
|
+
export default function createIntegration() {
|
|
568
|
+
return {
|
|
569
|
+
name: '@example/my-adapter',
|
|
570
|
+
hooks: {
|
|
571
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
572
|
+
setAdapter({
|
|
573
|
+
name: '@example/my-adapter',
|
|
574
|
+
entrypointResolution: 'auto',
|
|
575
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
576
|
+
supportedAstroFeatures: {
|
|
577
|
+
sharpImageService: {
|
|
578
|
+
support: 'limited',
|
|
579
|
+
message: 'This adapter has limited support for Sharp. Certain features may not work as expected.'
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
This object contains the following configurable features:
|
|
590
|
+
|
|
591
|
+
### `staticOutput`
|
|
592
|
+
|
|
593
|
+
<p>
|
|
594
|
+
|
|
595
|
+
**Type:** [`AdapterSupport`](#adaptersupport)
|
|
596
|
+
</p>
|
|
597
|
+
|
|
598
|
+
Defines whether the adapter is able to serve static pages.
|
|
599
|
+
|
|
600
|
+
### `hybridOutput`
|
|
601
|
+
|
|
602
|
+
<p>
|
|
603
|
+
|
|
604
|
+
**Type:** [`AdapterSupport`](#adaptersupport)
|
|
605
|
+
</p>
|
|
606
|
+
|
|
607
|
+
Defines whether the adapter is able to serve sites that include a mix of static and on-demand rendered pages.
|
|
608
|
+
|
|
609
|
+
### `serverOutput`
|
|
610
|
+
|
|
611
|
+
<p>
|
|
612
|
+
|
|
613
|
+
**Type:** [`AdapterSupport`](#adaptersupport)
|
|
614
|
+
</p>
|
|
615
|
+
|
|
616
|
+
Defines whether the adapter is able to serve on-demand rendered pages.
|
|
617
|
+
|
|
618
|
+
### `i18nDomains`
|
|
619
|
+
|
|
620
|
+
<p>
|
|
621
|
+
|
|
622
|
+
**Type:** [`AdapterSupport`](#adaptersupport)<br />
|
|
623
|
+
<Since v="4.3.0" />
|
|
624
|
+
</p>
|
|
625
|
+
|
|
626
|
+
Defines whether the adapter is able to support i18n domains.
|
|
627
|
+
|
|
628
|
+
### `envGetSecret`
|
|
629
|
+
|
|
630
|
+
<p>
|
|
631
|
+
|
|
632
|
+
**Type:** [`AdapterSupport`](#adaptersupport)<br />
|
|
633
|
+
<Since v="4.10.0" />
|
|
634
|
+
</p>
|
|
635
|
+
|
|
636
|
+
Defines whether the adapter is able to support `getSecret()` exported from [`astro:env/server`](/en/reference/modules/astro-env/). When enabled, this feature allows your adapter to retrieve secrets configured by users in `env.schema`.
|
|
637
|
+
|
|
638
|
+
The following example enables the feature by passing [a valid `AdapterSupportsKind` value](#adaptersupportskind) to the adapter:
|
|
639
|
+
|
|
640
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
641
|
+
export default function createIntegration() {
|
|
642
|
+
return {
|
|
643
|
+
name: '@example/my-adapter',
|
|
644
|
+
hooks: {
|
|
645
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
646
|
+
setAdapter({
|
|
647
|
+
name: '@example/my-adapter',
|
|
648
|
+
entrypointResolution: 'auto',
|
|
649
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
650
|
+
supportedAstroFeatures: {
|
|
651
|
+
envGetSecret: 'stable'
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
The `astro/env/setup` module allows you to provide an implementation for `getSecret()`. In [your server entrypoint](#building-a-server-entrypoint), call `setGetEnv()` as soon as possible:
|
|
661
|
+
|
|
662
|
+
```js ins={2,4}
|
|
663
|
+
import { createApp } from 'astro/app/entrypoint';
|
|
664
|
+
import { setGetEnv } from "astro/env/setup"
|
|
665
|
+
|
|
666
|
+
setGetEnv((key) => process.env[key])
|
|
667
|
+
|
|
668
|
+
const app = createApp();
|
|
669
|
+
|
|
670
|
+
export async function handler(event, context) {
|
|
671
|
+
// ...
|
|
672
|
+
}
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
If the adapter supports secrets, be sure to call `setGetEnv()` before `getSecret()` when environment variables are tied to the request:
|
|
676
|
+
|
|
677
|
+
```js ins={2,8}
|
|
678
|
+
import { createApp } from 'astro/app/entrypoint';
|
|
679
|
+
import { setGetEnv } from 'astro/env/setup';
|
|
680
|
+
|
|
681
|
+
const app = createApp();
|
|
682
|
+
|
|
683
|
+
export default {
|
|
684
|
+
async fetch(request: Request, env: Record<string, unknown>) {
|
|
685
|
+
setGetEnv((key) => env[key]);
|
|
686
|
+
|
|
687
|
+
return await app.render(request);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
### `sharpImageService`
|
|
693
|
+
|
|
694
|
+
<p>
|
|
695
|
+
|
|
696
|
+
**Type:** [`AdapterSupport`](#adaptersupport)<br />
|
|
697
|
+
<Since v="5.0.0" />
|
|
698
|
+
</p>
|
|
699
|
+
|
|
700
|
+
Defines whether the adapter supports image transformation using the built-in Sharp image service.
|
|
701
|
+
|
|
702
|
+
## Adapter features
|
|
703
|
+
|
|
704
|
+
A set of features that changes the output of the emitted files. When an adapter opts in to these features, they will get additional information inside specific hooks and must implement the proper logic to handle the different output.
|
|
705
|
+
|
|
706
|
+
### `middlewareMode`
|
|
707
|
+
|
|
708
|
+
<p>
|
|
709
|
+
|
|
710
|
+
**Type:** [`MiddlewareMode`](#middlewaremode-1)<br />
|
|
711
|
+
**Default:** `"classic"`<br />
|
|
712
|
+
<Since v="6.0.0" />
|
|
713
|
+
</p>
|
|
714
|
+
|
|
715
|
+
Determines at which stage of the page lifecycle the middleware is executed, and how the middleware code is emitted in the build output.
|
|
716
|
+
|
|
717
|
+
The `classic` mode matches the default behavior of Astro. On prerendered pages, middleware is run at build time, and when the page is requested, the middleware is not run again. On dynamic pages, middleware is run at request time only. The middleware code is part of your server bundle.
|
|
718
|
+
|
|
719
|
+
In `edge` mode, the middleware code can be deployed independently from the server bundle, for example, as an edge function.
|
|
720
|
+
|
|
721
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
722
|
+
export default function createIntegration() {
|
|
723
|
+
return {
|
|
724
|
+
name: '@example/my-adapter',
|
|
725
|
+
hooks: {
|
|
726
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
727
|
+
setAdapter({
|
|
728
|
+
name: '@example/my-adapter',
|
|
729
|
+
entrypointResolution: 'auto',
|
|
730
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
731
|
+
adapterFeatures: {
|
|
732
|
+
middlewareMode: 'edge'
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
Then, consume the hook [`astro:build:ssr`](/en/reference/integrations-reference/#astrobuildssr), which will give you a `middlewareEntryPoint`, an `URL` to the physical file on the file system.
|
|
742
|
+
|
|
743
|
+
```js title="my-adapter.mjs" ins={16-21}
|
|
744
|
+
export default function createIntegration() {
|
|
745
|
+
return {
|
|
746
|
+
name: '@example/my-adapter',
|
|
747
|
+
hooks: {
|
|
748
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
749
|
+
setAdapter({
|
|
750
|
+
name: '@example/my-adapter',
|
|
751
|
+
entrypointResolution: 'auto',
|
|
752
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
753
|
+
adapterFeatures: {
|
|
754
|
+
middlewareMode: 'edge'
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
},
|
|
758
|
+
|
|
759
|
+
'astro:build:ssr': ({ middlewareEntryPoint }) => {
|
|
760
|
+
// remember to check if this property exits, it will be `undefined` if the adapter doesn't opt in to the feature
|
|
761
|
+
if (middlewareEntryPoint) {
|
|
762
|
+
createEdgeMiddleware(middlewareEntryPoint)
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
function createEdgeMiddleware(middlewareEntryPoint) {
|
|
770
|
+
// emit a new physical file using your bundler
|
|
771
|
+
}
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
### `buildOutput`
|
|
775
|
+
|
|
776
|
+
<p>
|
|
777
|
+
|
|
778
|
+
**Type:** `"static" | "server"`<br />
|
|
779
|
+
**Default:** `"server"`<br />
|
|
780
|
+
<Since v="5.0.0" />
|
|
781
|
+
</p>
|
|
782
|
+
|
|
783
|
+
Allows you to force a specific output shape for the build. This can be useful for adapters that only work with a specific output type. For example, your adapter might expect a static website so it can create host-specific files. Defaults to `server` if not specified.
|
|
784
|
+
|
|
785
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
786
|
+
export default function createIntegration() {
|
|
787
|
+
return {
|
|
788
|
+
name: '@example/my-adapter',
|
|
789
|
+
hooks: {
|
|
790
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
791
|
+
setAdapter({
|
|
792
|
+
name: '@example/my-adapter',
|
|
793
|
+
entrypointResolution: 'auto',
|
|
794
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
795
|
+
adapterFeatures: {
|
|
796
|
+
buildOutput: 'static'
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
},
|
|
800
|
+
},
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
### `staticHeaders`
|
|
806
|
+
|
|
807
|
+
<p>
|
|
808
|
+
|
|
809
|
+
**Type:** `boolean`<br />
|
|
810
|
+
**Default:** `false`<br />
|
|
811
|
+
<Since v="6.0.0" />
|
|
812
|
+
</p>
|
|
813
|
+
|
|
814
|
+
Whether or not the adapter provides support for setting response headers for static pages. When this feature is enabled, Astro will return a map of the `Headers` emitted by the static pages. This map is available as `routeToHeaders` in the [`astro:build:generated` hook](/en/reference/integrations-reference/#astrobuildgenerated) and can be used to generate platform-specific output that controls HTTP headers, for example, to create a `_headers` file for platforms that support it.
|
|
815
|
+
|
|
816
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
817
|
+
export default function createIntegration() {
|
|
818
|
+
return {
|
|
819
|
+
name: '@example/my-adapter',
|
|
820
|
+
hooks: {
|
|
821
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
822
|
+
setAdapter({
|
|
823
|
+
name: '@example/my-adapter',
|
|
824
|
+
entrypointResolution: 'auto',
|
|
825
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
826
|
+
adapterFeatures: {
|
|
827
|
+
staticHeaders: true,
|
|
828
|
+
},
|
|
829
|
+
});
|
|
830
|
+
},
|
|
831
|
+
'astro:build:generated': ({ routeToHeaders }) => {
|
|
832
|
+
// use `routeToHeaders` to generate a configuration file
|
|
833
|
+
// for your virtual host of choice
|
|
834
|
+
},
|
|
835
|
+
},
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
The value of the headers might change based on the features enabled/used by the application. For example, if [CSP is enabled](/en/reference/configuration-reference/#securitycsp), the `<meta http-equiv="content-security-policy">` element is not added to the static page. Instead, its `content` is available in the `routeToHeaders` map.
|
|
841
|
+
|
|
842
|
+
### `preserveBuildClientDir`
|
|
843
|
+
|
|
844
|
+
<p>
|
|
845
|
+
|
|
846
|
+
**Type:** `boolean`<br />
|
|
847
|
+
**Default:** `false`<br />
|
|
848
|
+
<Since v="6.0.0" />
|
|
849
|
+
</p>
|
|
850
|
+
|
|
851
|
+
When `true`, static builds will preserve the `client/server` directory structure instead of outputting directly to `outDir`. This ensures static builds use `build.client` for assets, maintaining consistency with server builds.
|
|
852
|
+
|
|
853
|
+
This is useful for adapters that require a specific directory structure regardless of the build output type, such as deploying to platforms with specific file organization requirements.
|
|
854
|
+
|
|
855
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
856
|
+
export default function createIntegration() {
|
|
857
|
+
return {
|
|
858
|
+
name: '@example/my-adapter',
|
|
859
|
+
hooks: {
|
|
860
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
861
|
+
setAdapter({
|
|
862
|
+
name: '@example/my-adapter',
|
|
863
|
+
entrypointResolution: 'auto',
|
|
864
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
865
|
+
adapterFeatures: {
|
|
866
|
+
preserveBuildClientDir: true,
|
|
867
|
+
},
|
|
868
|
+
});
|
|
869
|
+
},
|
|
870
|
+
},
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
### `preserveBuildServerDir`
|
|
876
|
+
|
|
877
|
+
<p>
|
|
878
|
+
|
|
879
|
+
**Type:** `boolean`<br />
|
|
880
|
+
**Default:** `false`<br />
|
|
881
|
+
<Since v="6.4.0" />
|
|
882
|
+
</p>
|
|
883
|
+
|
|
884
|
+
When `true`, static builds will preserve the `client/server` directory structure for server output instead of outputting directly to `outDir`. This ensures static builds use `build.server` for server files, maintaining consistency with server builds.
|
|
885
|
+
|
|
886
|
+
This is useful for adapters that require a consistent `dist/client/` and `dist/server/` layout regardless of the build output type, such as when a static site may still contain server islands or image endpoints that need a server entry.
|
|
887
|
+
|
|
888
|
+
```js title="my-adapter.mjs" ins={10-12}
|
|
889
|
+
export default function createIntegration() {
|
|
890
|
+
return {
|
|
891
|
+
name: '@example/my-adapter',
|
|
892
|
+
hooks: {
|
|
893
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
894
|
+
setAdapter({
|
|
895
|
+
name: '@example/my-adapter',
|
|
896
|
+
entrypointResolution: 'auto',
|
|
897
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
898
|
+
adapterFeatures: {
|
|
899
|
+
preserveBuildServerDir: true,
|
|
900
|
+
},
|
|
901
|
+
});
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
## Adapter types reference
|
|
909
|
+
|
|
910
|
+
The following types can be imported from the `astro` module:
|
|
911
|
+
|
|
912
|
+
```ts
|
|
913
|
+
import type {
|
|
914
|
+
AdapterSupport,
|
|
915
|
+
AdapterSupportsKind,
|
|
916
|
+
AdapterSupportWithMessage,
|
|
917
|
+
MiddlewareMode,
|
|
918
|
+
CreatePreviewServer,
|
|
919
|
+
PreviewServer,
|
|
920
|
+
PreviewServerParams,
|
|
921
|
+
} from "astro";
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
### `AdapterSupport`
|
|
925
|
+
|
|
926
|
+
<p>
|
|
927
|
+
|
|
928
|
+
**Type:** <code><a href="#adaptersupport">AdapterSupportsKind</a> | <a href="#adaptersupportwithmessage">AdapterSupportWithMessage</a></code><br />
|
|
929
|
+
<Since v="5.0.0" />
|
|
930
|
+
</p>
|
|
931
|
+
|
|
932
|
+
A union of valid formats to describe the support level for a feature.
|
|
933
|
+
|
|
934
|
+
### `AdapterSupportsKind`
|
|
935
|
+
|
|
936
|
+
<p>
|
|
937
|
+
|
|
938
|
+
**Type:** `"deprecated" | "experimental" | "limited" | "stable" | "unsupported"`
|
|
939
|
+
</p>
|
|
940
|
+
|
|
941
|
+
Defines the level of support for a feature by your adapter:
|
|
942
|
+
* Use `"deprecated"` when your adapter deprecates support for a feature before removing it completely in a future version.
|
|
943
|
+
* Use `"experimental"` when your adapter adds support for a feature, but issues or breaking changes are expected.
|
|
944
|
+
* Use `"limited"` when your adapter only supports a subset of the full feature.
|
|
945
|
+
* Use `"stable"` when the feature is fully supported by your adapter.
|
|
946
|
+
* Use `"unsupported"` to warn users that they may encounter build issues in their project, as this feature is not supported by your adapter.
|
|
947
|
+
|
|
948
|
+
### `AdapterSupportWithMessage`
|
|
949
|
+
|
|
950
|
+
<p>
|
|
951
|
+
|
|
952
|
+
<Since v="5.0.0" />
|
|
953
|
+
</p>
|
|
954
|
+
|
|
955
|
+
An object that allows you to define a support level for a feature and a message to be logged in the user console. This object contains the following properties:
|
|
956
|
+
|
|
957
|
+
#### `AdapterSupportWithMessage.support`
|
|
958
|
+
|
|
959
|
+
<p>
|
|
960
|
+
|
|
961
|
+
**Type:** <code>Exclude\<<a href="#adaptersupportskind">AdapterSupportsKind</a>, "stable"\></code>
|
|
962
|
+
</p>
|
|
963
|
+
|
|
964
|
+
Defines the level of support for a feature by your adapter.
|
|
965
|
+
|
|
966
|
+
#### `AdapterSupportWithMessage.message`
|
|
967
|
+
|
|
968
|
+
<p>
|
|
969
|
+
|
|
970
|
+
**Type:** `string`
|
|
971
|
+
</p>
|
|
972
|
+
|
|
973
|
+
Defines a custom message to log regarding the support of a feature by your adapter.
|
|
974
|
+
|
|
975
|
+
#### `AdapterSupportWithMessage.suppress`
|
|
976
|
+
|
|
977
|
+
<p>
|
|
978
|
+
|
|
979
|
+
**Type:** `"default" | "all"`<br />
|
|
980
|
+
<Since v="5.9.0" />
|
|
981
|
+
</p>
|
|
982
|
+
|
|
983
|
+
An option to prevent showing some or all logged messages about an adapter's support for a feature.
|
|
984
|
+
|
|
985
|
+
If Astro's default log message is redundant, or confusing to the user in combination with your [custom `message`](#adaptersupportwithmessagemessage), you can use `suppress: "default"` to suppress the default message and only log your message:
|
|
986
|
+
|
|
987
|
+
```js title="my-adapter.mjs" ins={14}
|
|
988
|
+
export default function createIntegration() {
|
|
989
|
+
return {
|
|
990
|
+
name: '@example/my-adapter',
|
|
991
|
+
hooks: {
|
|
992
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
993
|
+
setAdapter({
|
|
994
|
+
name: '@example/my-adapter',
|
|
995
|
+
entrypointResolution: 'auto',
|
|
996
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
997
|
+
supportedAstroFeatures: {
|
|
998
|
+
sharpImageService: {
|
|
999
|
+
support: 'limited',
|
|
1000
|
+
message: 'The adapter has limited support for Sharp. It will be used for images during build time, but will not work at runtime.',
|
|
1001
|
+
suppress: 'default' // custom message is more detailed than the default
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
You can also use `suppress: "all"` to suppress all messages about support for the feature. This is useful when these messages are unhelpful to users in a specific context, such as when they have a configuration setting that means they are not using that feature. For example, you can choose to prevent logging any messages about Sharp support from your adapter:
|
|
1012
|
+
|
|
1013
|
+
```js title="my-adapter.mjs" ins={14}
|
|
1014
|
+
export default function createIntegration() {
|
|
1015
|
+
return {
|
|
1016
|
+
name: '@example/my-adapter',
|
|
1017
|
+
hooks: {
|
|
1018
|
+
'astro:config:done': ({ setAdapter }) => {
|
|
1019
|
+
setAdapter({
|
|
1020
|
+
name: '@example/my-adapter',
|
|
1021
|
+
entrypointResolution: 'auto',
|
|
1022
|
+
serverEntrypoint: '@example/my-adapter/server.js',
|
|
1023
|
+
supportedAstroFeatures: {
|
|
1024
|
+
sharpImageService: {
|
|
1025
|
+
support: 'limited',
|
|
1026
|
+
message: 'This adapter has limited support for Sharp. Certain features may not work as expected.',
|
|
1027
|
+
suppress: 'all'
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
},
|
|
1032
|
+
},
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
### `MiddlewareMode`
|
|
1038
|
+
|
|
1039
|
+
<p>
|
|
1040
|
+
|
|
1041
|
+
**Type:** `"classic" | "edge"`<br />
|
|
1042
|
+
<Since v="6.0.0" />
|
|
1043
|
+
</p>
|
|
1044
|
+
|
|
1045
|
+
A union of valid formats to describe the mode in which middleware is run.
|
|
1046
|
+
|
|
1047
|
+
### `CreatePreviewServer`
|
|
1048
|
+
|
|
1049
|
+
<p>
|
|
1050
|
+
|
|
1051
|
+
**Type:** <code>(params: <a href="#previewserverparams">PreviewServerParams</a>) => <a href="#previewserver">PreviewServer</a> | Promise\<<a href="#previewserver">PreviewServer</a>\></code>
|
|
1052
|
+
</p>
|
|
1053
|
+
|
|
1054
|
+
Describes the function an adapter should export to start a preview server when [`astro preview`](/en/reference/cli-reference/#astro-preview) is run.
|
|
1055
|
+
|
|
1056
|
+
### `PreviewServer`
|
|
1057
|
+
|
|
1058
|
+
<p>
|
|
1059
|
+
|
|
1060
|
+
**Type:** `{ host?: string; port: number; urls?: { local: string[]; network: string[] }; closed(): Promise<void>; stop(): Promise<void>; }`
|
|
1061
|
+
</p>
|
|
1062
|
+
|
|
1063
|
+
Describes an instance of a preview server for the adapter.
|
|
1064
|
+
|
|
1065
|
+
#### `PreviewServer.host`
|
|
1066
|
+
|
|
1067
|
+
<p>
|
|
1068
|
+
|
|
1069
|
+
**Type:** `string | undefined`
|
|
1070
|
+
</p>
|
|
1071
|
+
|
|
1072
|
+
Defines the host the preview server is listening on.
|
|
1073
|
+
|
|
1074
|
+
#### `PreviewServer.port`
|
|
1075
|
+
|
|
1076
|
+
<p>
|
|
1077
|
+
|
|
1078
|
+
**Type:** `number`
|
|
1079
|
+
</p>
|
|
1080
|
+
|
|
1081
|
+
Defines the port the preview server is listening on.
|
|
1082
|
+
|
|
1083
|
+
#### `PreviewServer.urls`
|
|
1084
|
+
|
|
1085
|
+
<p>
|
|
1086
|
+
|
|
1087
|
+
**Type:** `{ local: string[]; network: string[] } | undefined`<br />
|
|
1088
|
+
<Since v="7.2.0" />
|
|
1089
|
+
</p>
|
|
1090
|
+
|
|
1091
|
+
Defines the resolved URLs the preview server is listening on, grouped into `local` (loopback addresses) and `network` (LAN and public addresses). Astro uses these to record the server's address in the lock file [when the preview server runs in the background](/en/reference/cli-reference/#--background).
|
|
1092
|
+
|
|
1093
|
+
#### `PreviewServer.closed()`
|
|
1094
|
+
|
|
1095
|
+
<p>
|
|
1096
|
+
|
|
1097
|
+
**Type:** `() => Promise<void>`
|
|
1098
|
+
</p>
|
|
1099
|
+
|
|
1100
|
+
Defines a function that resolves when the preview server has closed.
|
|
1101
|
+
|
|
1102
|
+
#### `PreviewServer.stop()`
|
|
1103
|
+
|
|
1104
|
+
<p>
|
|
1105
|
+
|
|
1106
|
+
**Type:** `() => Promise<void>`
|
|
1107
|
+
</p>
|
|
1108
|
+
|
|
1109
|
+
Defines a function to stop the preview server and perform any necessary cleanup.
|
|
1110
|
+
|
|
1111
|
+
### `PreviewServerParams`
|
|
1112
|
+
|
|
1113
|
+
<p>
|
|
1114
|
+
|
|
1115
|
+
**Type:** `object`
|
|
1116
|
+
</p>
|
|
1117
|
+
|
|
1118
|
+
Describes the configuration for the preview server.
|
|
1119
|
+
|
|
1120
|
+
#### `PreviewServerParams.outDir`
|
|
1121
|
+
|
|
1122
|
+
<p>
|
|
1123
|
+
|
|
1124
|
+
**Type:** `URL`
|
|
1125
|
+
</p>
|
|
1126
|
+
|
|
1127
|
+
The [configured output directory](/en/reference/configuration-reference/#outdir) for the build.
|
|
1128
|
+
|
|
1129
|
+
#### `PreviewServerParams.client`
|
|
1130
|
+
|
|
1131
|
+
<p>
|
|
1132
|
+
|
|
1133
|
+
**Type:** `URL`
|
|
1134
|
+
</p>
|
|
1135
|
+
|
|
1136
|
+
The [configured client assets directory](/en/reference/configuration-reference/#buildclient) for the build.
|
|
1137
|
+
|
|
1138
|
+
#### `PreviewServerParams.server`
|
|
1139
|
+
|
|
1140
|
+
<p>
|
|
1141
|
+
|
|
1142
|
+
**Type:** `URL`<br />
|
|
1143
|
+
<Since v="6.0.0" />
|
|
1144
|
+
</p>
|
|
1145
|
+
|
|
1146
|
+
The [configured directory for server JavaScript](/en/reference/configuration-reference/#buildserver) when building to SSR.
|
|
1147
|
+
|
|
1148
|
+
#### `PreviewServerParams.serverEntrypoint`
|
|
1149
|
+
|
|
1150
|
+
<p>
|
|
1151
|
+
|
|
1152
|
+
**Type:** `URL`
|
|
1153
|
+
</p>
|
|
1154
|
+
|
|
1155
|
+
The built server entry module generated by Astro.
|
|
1156
|
+
|
|
1157
|
+
#### `PreviewServerParams.host`
|
|
1158
|
+
|
|
1159
|
+
<p>
|
|
1160
|
+
|
|
1161
|
+
**Type:** `string | undefined`
|
|
1162
|
+
</p>
|
|
1163
|
+
|
|
1164
|
+
Specifies the [configured host](/en/reference/configuration-reference/#serverhost) on which the server preview should listen.
|
|
1165
|
+
|
|
1166
|
+
#### `PreviewServerParams.port`
|
|
1167
|
+
|
|
1168
|
+
<p>
|
|
1169
|
+
|
|
1170
|
+
**Type:** `number`
|
|
1171
|
+
</p>
|
|
1172
|
+
|
|
1173
|
+
Defines the [configured port](/en/reference/configuration-reference/#serverport) on which the server preview should listen.
|
|
1174
|
+
|
|
1175
|
+
#### `PreviewServerParams.base`
|
|
1176
|
+
|
|
1177
|
+
<p>
|
|
1178
|
+
|
|
1179
|
+
**Type:** `string`
|
|
1180
|
+
</p>
|
|
1181
|
+
|
|
1182
|
+
Specifies the [configured base path](/en/reference/configuration-reference/#base) to deploy to.
|
|
1183
|
+
|
|
1184
|
+
#### `PreviewServerParams.logger`
|
|
1185
|
+
|
|
1186
|
+
<p>
|
|
1187
|
+
|
|
1188
|
+
**Type:** [`AstroIntegrationLogger`](/en/reference/integrations-reference/#astrointegrationlogger)
|
|
1189
|
+
</p>
|
|
1190
|
+
|
|
1191
|
+
Defines an instance of the Astro logger that can be used to write logs when the preview server is running.
|
|
1192
|
+
|
|
1193
|
+
#### `PreviewServerParams.headers`
|
|
1194
|
+
|
|
1195
|
+
<p>
|
|
1196
|
+
|
|
1197
|
+
**Type:** `OutgoingHttpHeaders | undefined`
|
|
1198
|
+
</p>
|
|
1199
|
+
|
|
1200
|
+
Describes the [configured HTTP response headers](/en/reference/configuration-reference/#serverheaders).
|
|
1201
|
+
|
|
1202
|
+
#### `PreviewServerParams.allowedHosts`
|
|
1203
|
+
|
|
1204
|
+
<p>
|
|
1205
|
+
|
|
1206
|
+
**Type:** `string[] | true | undefined`<br />
|
|
1207
|
+
<Since v="6.2.0" />
|
|
1208
|
+
</p>
|
|
1209
|
+
|
|
1210
|
+
Describes the [configured allowed hosts](/en/reference/configuration-reference/#serverallowedhosts) that the preview server should respond to.
|
|
1211
|
+
|
|
1212
|
+
#### `PreviewServerParams.open`
|
|
1213
|
+
|
|
1214
|
+
<p>
|
|
1215
|
+
|
|
1216
|
+
**Type:** `string | boolean`<br />
|
|
1217
|
+
<Since v="7.0.8" />
|
|
1218
|
+
</p>
|
|
1219
|
+
|
|
1220
|
+
Specifies the [configured open option](/en/reference/configuration-reference/#serveropen) for the preview server.
|
|
1221
|
+
|
|
1222
|
+
#### `PreviewServerParams.root`
|
|
1223
|
+
|
|
1224
|
+
<p>
|
|
1225
|
+
|
|
1226
|
+
**Type:** `URL`
|
|
1227
|
+
</p>
|
|
1228
|
+
|
|
1229
|
+
Specifies the [configured root directory](/en/reference/configuration-reference/#root) of the project.
|
|
1230
|
+
|
|
1231
|
+
## Allow installation via `astro add`
|
|
1232
|
+
|
|
1233
|
+
[The `astro add` command](/en/reference/cli-reference/#astro-add) allows users to easily add integrations and adapters to their project. To allow your adapter to be installed with this command, **add `astro-adapter` to the `keywords` field in your `package.json`**:
|
|
1234
|
+
|
|
1235
|
+
```json
|
|
1236
|
+
{
|
|
1237
|
+
"name": "example",
|
|
1238
|
+
"keywords": ["astro-adapter"],
|
|
1239
|
+
}
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1242
|
+
Once you [publish your adapter to npm](https://docs.npmjs.com/cli/v8/commands/npm-publish), running `astro add example` will install your package with any peer dependencies specified in your `package.json` and instruct users to update their project config manually.
|