@ticatec/omniflow-artifact
v0.2.0
Published
Unified artifact registry and publishing SPI specification, base templates, and registry coordinator
Readme
@ticatec/omniflow-artifact
@ticatec/omniflow-artifact provides the abstract SPI specification, base templates, and registry coordinator for artifact publication, container image pushing, and credential management across diverse registries in OmniFlow.
Following the microkernel architecture, this package provides the SPI contracts, template base classes, registry coordinator, and standard built-in publishers:
- Docker Registries: Docker Hub (
DockerHubPublisher), Harbor (HarborPublisher), and Generic Docker Registry V2 (GenericDockerV2Publisher); - NPM Registries: npmjs.org (
NpmJsPublisher) and Generic NPM Registry (GenericNpmPublisher).
Vendor-specific platform drivers (Aliyun ACR, GitLab, GitHub Packages, Forgejo, Nexus) are provided by their dedicated provider packages (@ticatec/omniflow-*).
Core Features
- Standard SPI Contracts:
ArtifactPublisher: Standardized lifecycle interface (detect,login,publish,exists);ArtifactPayload: Uniform artifact description (type, name, tags, source, platforms);PublishResult: Structured metadata for artifact traceability (digest, full ref, tags).
- Template Method Base Classes:
BasePublisher: Execution lifecycle, unified dry-run simulation (preserving namespace and core context integration), credentials extraction, automaticcleanuphook, and error handling;BaseDockerPublisher: Secure Docker login via stdin piping (no shell interpolation, preventing shell injection and credential leaking in process list and logs), repository URL building, multi-tag tagging, pushing, and digest inspection;BaseNpmPublisher: npm publishing, dynamic.npmrctoken injection with guaranteed cleanup/restoration infinally, access level management.
- Pluggable Registry (
ArtifactPublisherRegistry):- Platform detection and priority-based matching;
- Support for third-party plugin registration via
registerArtifactPublisher.
License
MIT License.
