module

Fluxion::Config::StepParser

Entry points the manifest mapper uses.

Most plan kinds have the same spec fields as their stable-schema counterpart, so they go through build_kind and reuse one parser. Only the kinds whose shape genuinely differs — the package family, where the manager comes from the kind id rather than a field — get their own function here.

Constants

APT_SOURCE_OPTIONS = ["arch", "signed-by"] of ::String

Options an APT source line may carry. Anything else — notably trusted and allow-insecure — is a trust bypass and is rejected rather than passed through.

EXACT_RELEASE = /\Av\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]+)?\z/
FLATPAK_APP_ID = /\A[A-Za-z][A-Za-z0-9_-]*(?:\.[A-Za-z][A-Za-z0-9_-]*){2,}\z/
KINDS = ["packages", "apt-repository", "rpm-repository", "pacman-repository", "flatpak", "flatpak-remote", "shell-script", "compiled-binary", "dotbot", "default-shell", "oh-my-zsh", "toolchain", "nerd-fonts", "shell-reload", "shell-command", "assert", "manual", "binstaller-profile", "user-groups", "git-config", "git-repo", "systemd-unit", "system-setting", "system-update", "gpg-key", "tool-packages", "zypper-repository"] of ::String

Every type the stable jobs/steps schema accepts, in the order the documentation lists them. kinds and the did-you-mean suggester both read this, so adding a kind here is the only edit needed.

REPOSITORY_ID = /\A[A-Za-z0-9][A-Za-z0-9._-]*\z/
SDKMAN_SAFE_VALUE = /\A[A-Za-z0-9._+-]+\z/
SENSITIVE_NAME = /(^|[^a-z0-9])(?:api[._-]?key|access[._-]?key|private[._-]?key|key[._-]?passphrase|passphrase|authorization|token|secret|password|passwd|credentials?)($|[^a-z0-9])/

Names that almost always carry a secret. Getting this wrong in the safe direction only costs a <redacted> in the output; getting it wrong the other way leaks a token into logs and state.

UNSAFE_PACKAGE_CHARS = /[\s$;|&`><"'\\]/

Instance methods

build_kind(context : Context, spec : Node, type : String, name : String, description : String | Nil, probe : String | Nil) : Step | Nil

Builds a step from a plan entry's spec node using the stable schema's parser for that type.

Source
levenshtein(a : String, b : String) : Int32
Source
manifest_file_writes(context : Context, spec : Node, name : String, description : String | Nil, probe : String | Nil) : Step | Nil
Source
manifest_flatpak(context : Context, spec : Node, name : String, description : String | Nil, probe : String | Nil) : Step | Nil
Source
manifest_interrupt(context : Context, spec : Node, name : String, description : String | Nil) : Step | Nil
Source
manifest_packages(context : Context, spec : Node, kind : PlanKinds::Kind, name : String, description : String | Nil, probe : String | Nil) : Step | Nil
Source
manifest_sdkman(context : Context, spec : Node, name : String, description : String | Nil, probe : String | Nil) : Step | Nil
Source
parse(context : Context, node : Node) : Step | Nil
Source
sensitive_name?(name : String) : Bool
Source
suggestion_for(kind : String) : String | Nil

Levenshtein against the known kinds, with a budget that scales with the input so a short typo does not match everything. Ties resolve to the first kind in declaration order.

Source