Documentation
¶
Overview ¶
Package skel seeds the embedded rocketclaw skeleton into workspaces.
Index ¶
- func ListSetupFiles() ([]string, error)
- func OverlaySpecs(overlays []string) []string
- func ReadSetupFile(name string) ([]byte, error)
- func ReplaceRuntimeAssetsAfterValidation(workspace, runtimeDir string, overlays []string, logger *slog.Logger, ...) error
- func StageLiveRuntime(workspace, runtimeDir string, overlays []string, baseOverlay string, ...) (string, error)
- func SyncEffectiveRuntimeAssets(workspace, target string, overlays []string, logger *slog.Logger) error
- func SyncInWithOverlays(workspace, runtimeDir string, overlays []string, logger *slog.Logger) error
- type OverlayContext
- type OverlayFile
- type OverlayInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListSetupFiles ¶
ListSetupFiles returns every workspace-relative file path that `rocketclaw setup` can materialize.
func OverlaySpecs ¶ added in v0.0.50
OverlaySpecs returns configured overlay spec strings in config order.
func ReadSetupFile ¶
ReadSetupFile returns the bytes for one workspace-relative embedded setup file.
func ReplaceRuntimeAssetsAfterValidation ¶ added in v0.0.25
func ReplaceRuntimeAssetsAfterValidation(workspace, runtimeDir string, overlays []string, logger *slog.Logger, validate func(string) error) error
ReplaceRuntimeAssetsAfterValidation rebuilds runtime assets in a stage and replaces live assets only after validate accepts the staged work dir.
func StageLiveRuntime ¶ added in v0.0.50
func StageLiveRuntime(workspace, runtimeDir string, overlays []string, baseOverlay string, files []OverlayFile, logger *slog.Logger) (string, error)
StageLiveRuntime copies the live embedded, git overlay, and workspace stack into a new temporary directory under workspace. When baseOverlay names a configured overlay, files replace that live clone layer before later overlays apply. When baseOverlay is empty, files are written as a final extra layer after the live stack. A non-empty unknown baseOverlay is rejected. It does not write the live runtime or live clones. The caller must remove the returned directory.
func SyncEffectiveRuntimeAssets ¶ added in v0.0.7
func SyncEffectiveRuntimeAssets(workspace, target string, overlays []string, logger *slog.Logger) error
SyncEffectiveRuntimeAssets materializes startup-equivalent runtime assets into target without touching runtime state or workspace script symlinks.
Types ¶
type OverlayContext ¶ added in v0.0.50
type OverlayContext struct {
BaseOverlay string
Files []OverlayFile
}
OverlayContext is one live clone as a named base overlay plus its files.
func ReadOverlayContext ¶ added in v0.0.50
func ReadOverlayContext(workspace, runtimeDir string, overlays []string, spec string) (OverlayContext, error)
ReadOverlayContext returns the live clone files for spec. It does not fetch or write.
type OverlayFile ¶ added in v0.0.50
type OverlayFile struct {
Path, Content string
}
OverlayFile is one file from a live overlay clone.
type OverlayInfo ¶ added in v0.0.2
type OverlayInfo struct {
Spec, URL, Ref, ClonePath string
}
OverlayInfo describes one configured git overlay materialized by SyncInWithOverlays.
func OverlayInfos ¶ added in v0.0.2
func OverlayInfos(workspace, runtimeDir string, overlays []string) []OverlayInfo
OverlayInfos returns normalized configured overlay clone metadata in config order.