Documentation
¶
Index ¶
- Constants
- Variables
- func Bundle(_ map[string]string) core.Bundle
- func GenerateGlue(w io.Writer, packageName, cliImport string, mods []ResolvedModule) error
- func HasGoFiles(dir string) bool
- func NormalizeID(target string) string
- func ReadModuleLine(goModPath string) (string, error)
- func ResolveBundles(reqs []Requirement) ([]core.Bundle, error)
- func ResolveBundlesWith(reqs []Requirement, onBundle func(core.Bundle)) ([]core.Bundle, error)
- type Plan
- type Requirement
- type ResolvedModule
Constants ¶
View Source
const ID = "require"
Variables ¶
View Source
var Directive = core.Directive{
Name: "require",
Example: "@require ./locallib as mylib\n@require github.com/nexssp/text-tools v1.0.0 as text_tools",
Handler: handleDirective,
}
Functions ¶
func GenerateGlue ¶
func GenerateGlue( w io.Writer, packageName, cliImport string, mods []ResolvedModule, ) error
func HasGoFiles ¶
func NormalizeID ¶
NormalizeID extracts the canonical bundle ID from any target path. e.g. "github.com/nexssp/mybundle/nexssflow" -> "mybundle" e.g. "nflow-harness/loose/localtest_e152bdd9" -> "localtest"
func ReadModuleLine ¶
func ResolveBundles ¶
func ResolveBundles(reqs []Requirement) ([]core.Bundle, error)
ResolveBundles resolves in-process requirements to core.Bundle instances.
func ResolveBundlesWith ¶ added in v0.15.0
ResolveBundlesWith resolves in-process requirements and calls onBundle immediately after each factory returns, before option validation or alias wiring. Owners can therefore retain cleanup callbacks when a later bundle fails validation or construction.
Types ¶
type Plan ¶
type Plan struct {
Modules []Requirement
}
type Requirement ¶
type Requirement struct {
Import string
// PackagePath is the Go import path selected for the bundle package.
// It may differ from Import when a bare repository target defaults to
// its nexssflow package or when Go resolves a package to a nested module.
PackagePath string
Alias string
Version string
// ResolvedVersion is the provider module version selected by Go for a
// versioned remote bundle package. Local and workspace replacements may
// leave it empty.
ResolvedVersion string
LocalPath string
ModuleRoot string
ModulePath string
IsLoose bool
LooseID string
Options map[string]string
}
func FromMeta ¶
func FromMeta(meta map[string]any) []Requirement
func (Requirement) IsLocal ¶
func (r Requirement) IsLocal() bool
type ResolvedModule ¶
type ResolvedModule struct {
Requirement Requirement
Dir string
GoMod string
}
Click to show internal directories.
Click to hide internal directories.