Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build manifest #2312

Open
pi0 opened this issue Mar 25, 2024 · 0 comments
Open

Build manifest #2312

pi0 opened this issue Mar 25, 2024 · 0 comments
Labels
discussion enhancement New feature or request

Comments

@pi0
Copy link
Member

pi0 commented Mar 25, 2024

When building Nitro-based projects, we can gather information about build/deployment and make it universally accessible with a unified API across deployment providers.

  • manifest.buildId: Auto-generated during the build
  • manifest.deploymentId: Can be set by the deployment provider (usually env variables)
  • manifest.timestampt: Time when the build started

It can be accessible in different contexts:

  • Via build-context using nitro.options.manifest.{buildId, deploymentId}
  • Via runtime config (useRuntimeConfig().nitro.manifest)
  • Via server build manifest file (.output/nitro.json)
  • Via an opt-in/customizable public manifest (.output/public/_nitro/builds/{buildId}.json) similar to Nuxt app manifest

It can be used for several purposes both for custom deployments but mainly for gracefully handling new deployments or provider-specific logic like vercel skew protection

@pi0 pi0 added enhancement New feature or request discussion labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant