AssetKinds class
The conventional values of Asset.kind, and the rules that read them.
kind is free-form on purpose — a release can carry anything — but three
parts of the system have to agree on what a given value means: the update
service, which must never offer a signature file as the thing to install;
the CLI's --kind filter; and anyone reading a listing. Writing the
vocabulary down once is what keeps those three from drifting.
Untagged artifacts are not left uninterpreted. A release published before
kind existed, or by a pipeline that does not set it, still carries
agent.tar.gz.sha256 next to agent.tar.gz, and treating that as an
installable artifact would be wrong in a way the user never asked for. So
the auxiliary kinds are also inferred from the filename; the installable
ones are not, because guessing installer from an extension would be a
guess with consequences.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
byPreference(
Asset a, Asset b) → int - Orders installable artifacts by how ready-to-use they are: an installer beats an archive, which beats an untagged artifact, which beats anything else. Ties break on name so the choice is stable across calls.
-
isAuxiliary(
Asset asset) → bool -
Whether
assetaccompanies the release rather than being installable. -
matches(
Asset asset, String kind) → bool -
Whether
assetis ofkind, by its tag or by the filename convention. -
of(
Asset asset) → String? -
The effective kind of
asset: its Asset.kind when set, otherwise the auxiliary kind its filename implies, otherwisenull.
Constants
- archive → const String
- A compressed build the client unpacks itself.
-
auxiliary
→ const Set<
String> - Kinds that accompany a release rather than being the thing installed.
- checksums → const String
- A checksum manifest.
- installer → const String
-
A ready-to-run installer:
.dmg,.msi,.deb. - sbom → const String
- A software bill of materials.
- signature → const String
- A detached signature.