Documentation
¶
Overview ¶
Package scaffold holds the `forge scaffold` command — the one verb that writes new code into a forge project, at two granularities picked by ARITY:
forge scaffold everything the protos imply (the sweep;
see sweep.go)
forge scaffold <noun> [args...] one thing, explicitly (service / worker /
operator / binary / frontend / webhook /
package / adapter / library /
handler-file / rpc / entity / crd /
scenario)
Both modes run the same primitives: `forge scaffold entity product --from-proto tasks` is the explicit spelling of one birth the sweep would perform from a `// forge:entity` marker. The nouns beyond entity (service, worker, …) have no marker to sweep from, so they are only reachable explicitly.
It is a dir-nested command group (the devspace idiom forge ships in generated apps). The subcommands that trigger codegen — `scaffold service`, `scaffold worker`, `scaffold operator` — reach the generate pipeline and the pkg/app/services.go registration view through factory.GenAPI (function values internal/cli registers via SetGenAPI). The group never imports internal/cli, so the registry indirection in the factory package is what keeps the dependency one-directional (group → factory) and the import cycle broken. init() (in sweep.go) self-registers the command with the factory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeclareFrontendInKCL ¶
func DeclareFrontendInKCL(root, projectName, frontendName, kclType string, pinnedPort int, routes []string)
DeclareFrontendInKCL gives later frontends the same bindings as initial ones.
func NormalizeRouteSlugs ¶
NormalizeRouteSlugs canonicalizes the route allowlist for both scaffold entry points.
Types ¶
This section is empty.