mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
Adds PublishPackageVersion, DescribePackageVersion, and GetPackageVersionAsset for CodeArtifact's generic package format, matching AWS's own wire restriction that PublishPackageVersion accepts only the generic format. Includes real asset hashing (MD5, SHA-1, SHA-256, SHA-512), SHA-256 integrity verification against the caller's x-amz-content-sha256 header, correct Unfinished/Published status transitions, and the documented AWS quotas for this action (350 assets per version, 5 GB max asset size), all returning ServiceQuotaExceededException when exceeded. Asset bytes are kept out of the JSON/WAL-backed package-version store (@JsonIgnore on PackageAsset.content) and instead go through a dedicated asset store, a disk file in persistent/hybrid/wal mode or a side map in memory mode, the same split S3Object/S3Service already uses for object bytes. Without this, a publish rewrote every asset of every package version on disk each time, growing quadratically under this action's own 350-asset/5GB quotas. The asset name is also validated against the wire model's AssetName pattern (no control characters), not just its length, since it is echoed back verbatim in the X-AssetName response header on GetPackageVersionAsset. Verified against the real botocore service-2.json wire model and the AWS CodeArtifact User Guide (including its PDF for the quotas table, since the HTML quotas page is JS-rendered). Live-verified with the real AWS CLI and the AWS SDK for Java v2 against a running Floci instance, including an exact byte-for-byte asset round-trip and the real ConflictException when republishing an already-Published version.