project

package
v0.1.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey(relative string) string

APIKey returns the deterministic, Go-safe generated package directory for a co-located app/api route. The input is relative to app/api.

func BuildID

func BuildID(root string, routes []Route) (string, error)

func BuildSnapshot

func BuildSnapshot(root string) (map[string]string, error)

BuildSnapshot records the same source files used by BuildID, keyed by their slash-normalized path relative to root. Development mode uses it to identify which build products a source edit can affect.

func Generate

func Generate(root, buildRoot string, check bool) error

func SyncGoSources

func SyncGoSources(root string, routes []Route, check bool) error

SyncGoSources projects route-owned Go into import-safe generated packages. Authored app directories remain editor inputs and are never imported by the production server.

func Write

func Write(root string, routes []Route, buildID string, check bool) error

Write persists deterministic route registries using an already finalized build identity. The build command uses this after hashing compiler outputs.

Types

type Manifest

type Manifest struct {
	APIVersion string  `json:"apiVersion"`
	BuildID    string  `json:"buildId"`
	Routes     []Route `json:"routes"`
}

func LoadManifest

func LoadManifest(root string) (Manifest, error)

type Route

type Route struct {
	ID          string `json:"id"`
	Pattern     string `json:"pattern"`
	Mode        string `json:"mode"`
	Reason      string `json:"reason"`
	AppDir      string `json:"appDir"`
	ServerKey   string `json:"serverKey"`
	PageFile    string `json:"pageFile"`
	SchemaFile  string `json:"schemaFile,omitempty"`
	BuildFile   string `json:"buildFile,omitempty"`
	ServerFile  string `json:"serverFile,omitempty"`
	PlanFile    string `json:"planFile"`
	ClientEntry string `json:"clientEntry"`
}

func Discover

func Discover(root string) ([]Route, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL