Documentation
¶
Overview ¶
Package launchconfig loads Clank's project-specific web preview launch files.
Index ¶
Constants ¶
const ( // ProjectRelativePath is the repository-owned launch configuration path. ProjectRelativePath = ".clank/launch.yaml" // PortEnvironmentName is the allocated-port contract for every command. PortEnvironmentName = "PORT" // PublicHostnameEnvironmentName is the hostname clients use to reach a preview. PublicHostnameEnvironmentName = "CLANK_PREVIEW_PUBLIC_HOSTNAME" // PublicURLEnvironmentName is the externally reachable preview URL. PublicURLEnvironmentName = "CLANK_PREVIEW_PUBLIC_URL" )
Variables ¶
This section is empty.
Functions ¶
func LaunchSchema ¶
func LaunchSchema() string
LaunchSchema returns the canonical structural schema shown to setup agents.
func RenderEnvironment ¶
func RenderEnvironment(environment map[string]string, port int, publicHostname string) (map[string]string, error)
RenderEnvironment resolves Clank placeholders in configured environment values.
func SetupTaskPrompt ¶
SetupTaskPrompt builds the bounded, non-interactive agent task.
Types ¶
type NotFoundError ¶
type NotFoundError struct {
Paths Paths
}
NotFoundError carries the paths offered by one-time setup.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Paths ¶
Paths contains the project identity and launch configuration location.
func ResolvePaths ¶
ResolvePaths finds the project root and derives its launch file.
type Preview ¶
type Preview struct {
Directory string `yaml:"directory"`
Command string `yaml:"command"`
Environment map[string]string `yaml:"env"`
Ready Ready `yaml:"ready"`
}
Preview declares one named web development server.
type Resolved ¶
type Resolved struct {
Name string
WorkDir string
Command string
Environment map[string]string
Ready Ready
Source Source
}
Resolved is one validated launch entry with an absolute working directory.
func FinalizeSetup ¶
FinalizeSetup validates the generated project configuration in place.