Documentation
¶
Overview ¶
Package recipes composes a pack's pipelines.
A recipe builds a pipeline; it does not run one. The caller runs it, which is what lets the TUI show the stages before anything is fetched and lets a dry run skip the sinks that commit.
Index ¶
Constants ¶
const ( DefaultOpenMojiVersion = settings.DefaultOpenMojiVersion DefaultUnicodeVersion = settings.DefaultUnicodeVersion )
Emoji recipe defaults, kept under their old names. The settings registry owns the values now; these alias it so nothing reading the old constants can see a different number.
const ( RecipeAuto = "auto" RecipeGeneric = "generic" RecipeEmojiSets = "emoji-sets" // RecipeManifestPack refreshes a pack set by set, each set from the // upstream its set manifest names, then commits once. RecipeManifestPack = "manifest-pack" // RecipeBundled is RecipeManifestPack's former name. A pack config that // still carries it is dispatched exactly as RecipeManifestPack, and the // run logs a deprecation notice. // // Deprecated: write "manifest-pack". Earliest removal: 0.2.0. RecipeBundled = "bundled" )
Recipe names a pack config's `recipe` field may carry.
const LicencesRoot = "{pack_root}/resources/assets/svg/licenses"
LicencesRoot is where a pack keeps its upstreams' licence texts, one directory per upstream set. It sits beside resources/assets/svg/files, so it is not export-ignored and ships with the icons.
const RemovalRelease = "0.2.0"
RemovalRelease is the earliest release that may drop the deprecated recipe name, name-based dispatch, CLI command and route.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build returns the pipelines for a pack, in the order they must run.
Dispatch is on the pack's `recipe` field when it names one, else on the pack NAME first and the source type second -- reversing those breaks icon-sets-emoji, which declares source.type "url" because that is how its *version* is discovered while its assets come from three separate upstreams that only the named recipe knows about.
func Deprecation ¶ added in v0.1.2
func Deprecation(pack *config.PackConfig) string
Deprecation returns a notice when pack reaches its recipe through a deprecated path, or "" when it does not: the RecipeBundled name, or the name-based dispatch that a config with no `recipe` still gets. Dispatch is the same either way; only the notice differs.
func Select ¶
func Select(pack *config.PackConfig) string
Select names the recipe a pack runs, or "" when none applies. The deprecated name RecipeBundled selects RecipeManifestPack.
Types ¶
type Options ¶
type Options struct {
// DryRun drops the committing sinks: the version stamp and the git branch.
// The filesystem sinks still run, so a dry run shows the real diff in the
// pack's working tree.
DryRun bool
// ConfigDir is where a manifest-pack's set manifest lives.
ConfigDir string
// Settings is this pack's resolved settings. Nil means the defaults.
Settings *settings.Resolved
// Git overrides the git/gh runner, for tests. Nil means real subprocesses.
Git gitx.Runner
// Logger receives every pipeline's and every stage's log lines. Nil means
// slog.Default(), which is what the CLI wants; a server running several
// syncs at once passes one per run so their lines stay apart.
Logger *slog.Logger
// Observer is told when each stage starts and finishes. May be nil.
Observer pipeline.Observer
}
Options carries what a recipe needs beyond the pack config.