Documentation
¶
Overview ¶
Package scaffoldhooks runs a scaffold template's declarative hooks: block around atmos scaffold generate / atmos init. It reuses the exact hook schema and when: vocabulary that stack-level lifecycle hooks use (pkg/hooks.Hook), driving step-backed hooks (kind: step, kind: steps) through the same shared step-execution engine (pkg/runner/step) that workflows and custom commands use -- not a bespoke execution engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RunInput ¶ added in v1.230.0
type RunInput struct {
// HooksMap is the scaffold's decoded spec.hooks block.
HooksMap map[string]hooks.Hook
// Event is the scaffold lifecycle event being fired (before/after.scaffold.generate).
Event hooks.HookEvent
// Answers is the collected prompt answers, exposed to hooks as {{ .Answers.<field> }} and as
// the `answers` when: CEL variable.
Answers map[string]any
// Status is the run outcome ("success"/"failure"), exposed as the `status` when: CEL variable.
Status string
// SkipHooks implements --skip-hooks; nil means no hook is skipped.
SkipHooks func(string) bool
// TargetPath is the scaffold's target/output directory. An unset or bare-relative
// working_directory on a step-backed hook defaults to it (see
// hooks.ApplyDefaultWorkingDirectory), and it is exposed to hook templates as
// {{ .TargetPath }}.
TargetPath string
}
RunInput bundles scaffoldhooks.Run's inputs into a single argument, mirroring how pkg/hooks.ExecContext bundles a stack-level lifecycle hook run's inputs.
Click to show internal directories.
Click to hide internal directories.