Documentation
¶
Overview ¶
Package buildflow is the single entry point for "prepare a Next.js
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Payload nextcore.NextCorePayload
// "serverless" or "vps". Resolved from Cfg + payload.
EffectiveTarget string
StandaloneDir string
// ReleaseDir / TarballPath are populated only on the VPS path —
// the artifact `nextdeploy ship` uploads to the remote daemon.
ReleaseDir string
TarballPath string
// Skipped is true when the incremental check matched and no rebuild
// was attempted. `nextdeploy build` treats this as "exit success";
// ship treats it as "use the existing artifacts".
Skipped bool
}
Result is the artifact set produced by a Run.
func Run ¶
Run executes the unified build flow:
- Incremental skip (unless Force): if the git commit AND the config fingerprint are unchanged, skip `next build` — but still regenerate metadata and repackage the VPS artifact, so what ships always matches the current config.
- Generate metadata (nextcore.GenerateMetadata) — reads next.config and the routes/prerender manifests.
- Validate output mode + features against the resolved target.
- Decide whether `next build` needs to run, and with which flags (Cloudflare requires --webpack; AWS / VPS take the user's default).
- For VPS: copy public/ + static/ + metadata.json into the release directory and create app.tar.gz.
- Audit the standalone tree — informational warnings for size.
Click to show internal directories.
Click to hide internal directories.