ball_resolver library
Ball module resolver — fetches, verifies, and caches modules from HTTP, file, git, inline, and registry sources.
Classes
- ContentAddressableCache
- ModuleResolver
-
Resolves
ModuleImportentries to concreteModuleinstances. - NpmAdapter
- PubAdapter
- RegistryAdapter
- Abstract adapter for a specific package registry.
- RegistryBridge
- ResolvedRegistryModule
- Result of fetching a module from a registry.
Functions
-
computeIntegrity(
Module module) → String - Compute the integrity hash of a Module's canonical proto binary encoding. Returns the hash in the format "sha256:
-
computeIntegrityFromBytes(
List< int> bytes) → String - Compute the integrity hash of raw bytes.
-
verifyIntegrity(
Module module, String expected) → bool -
Verify that a module matches the expected integrity hash.
Returns true if the hash matches, false otherwise.
If
expectedis empty, always returns true (no verification requested).
Typedefs
-
OnTheFlyEncoder
= Future<
Module> Function(RegistrySource source, String resolvedVersion) -
Callback type for on-the-fly encoding of packages that don't
publish Ball artifacts. The CLI provides this using
PubClient -
RegistryResolver
= Future<
Module> Function(RegistrySource source) - Callback for resolving RegistrySource imports. Provided by Stage 4 registry adapters. When null, RegistrySource imports fail with an error.