recipes

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

View Source
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.

View Source
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.

View Source
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

func Build(pack *config.PackConfig, version string, opts Options) ([]*pipeline.Pipeline, error)

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.

Jump to

Keyboard shortcuts

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