iconpack

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package iconpack generates consumer-local, attributed SVG icon packs from a verified Arai Hu Assets release boundary or a consumer-supplied source manifest and icon-pack root.

Index

Constants

View Source
const (
	// OutputSchemaVersion identifies the generated manifest and provenance format.
	OutputSchemaVersion = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.1.12

type Config struct {
	SchemaVersion int            `json:"schemaVersion" yaml:"schemaVersion"`
	Sources       []ConfigSource `json:"sources" yaml:"sources"`
}

Config is the Goshtoso-owned .iconpack.yaml contract. Its lock is always the sibling .iconpack.lock.yaml (or IconpackLockPath when explicitly set); Muamba manifests are never discovered or modified.

type ConfigSource added in v0.1.12

type ConfigSource struct {
	ID              string   `json:"id" yaml:"id"`
	URL             string   `json:"url" yaml:"url"`
	Kind            string   `json:"kind,omitempty" yaml:"kind,omitempty"`
	PackName        string   `json:"packName,omitempty" yaml:"packName,omitempty"`
	Path            string   `json:"path,omitempty" yaml:"path,omitempty"`
	Paths           []string `json:"paths,omitempty" yaml:"paths,omitempty"`
	License         string   `json:"license" yaml:"license"`
	LicensePath     string   `json:"licensePath" yaml:"licensePath"`
	LicenseURL      string   `json:"licenseUrl,omitempty" yaml:"licenseUrl,omitempty"`
	StripComponents int      `json:"stripComponents,omitempty" yaml:"stripComponents,omitempty"`
	MaxFiles        int      `json:"maxFiles,omitempty" yaml:"maxFiles,omitempty"`
	MaxUnpackedSize string   `json:"maxUnpackedSize,omitempty" yaml:"maxUnpackedSize,omitempty"`
}

ConfigSource describes a GitHub tree/archive, a single remote file, or a source that is resolved by the iconpack acquisition adapter.

type Options

type Options struct {
	// ConfigPath selects the Muamba-backed .iconpack.yaml contract. It is
	// mutually exclusive with the legacy release/source flags below.
	ConfigPath          string
	IconpackLockPath    string
	Trust               bool
	AllowHTTP           bool
	ReleaseRoot         string
	ReleaseArchive      string
	Release             string
	ArchiveSHA256       string
	CatalogSHA256       string
	ReleaseJSONSHA256   string
	ChecksumsSHA256     string
	SourceRoot          string
	SourceArchive       string
	SourceArchiveSHA256 string
	SourceManifest      string
	Names               []string
	SelectionManifest   string
	OutputDir           string
	Package             string
	ConstPrefix         string
	SpriteURL           string
	IconifyPrefix       string
	Check               bool
}

Options describes one deterministic icon-pack generation.

type Result

type Result struct {
	OutputDir     string
	Release       string
	CatalogSHA256 string
	SelectedCount int
	Published     bool
}

Result identifies a verified or newly published output.

func Generate

func Generate(ctx context.Context, opts Options) (Result, error)

Generate verifies the selected source boundary, selects exact canonical names, and atomically publishes one owned output directory. A source manifest makes non-Arai-Hu icon packs first-class inputs while retaining the Arai Hu Assets release mode for catalog-backed packs.

type Selection

type Selection struct {
	SchemaVersion int      `json:"schemaVersion" yaml:"schemaVersion"`
	Names         []string `json:"names" yaml:"names"`
}

Selection is the JSON-first input manifest. YAML uses the same field names.

Jump to

Keyboard shortcuts

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