refactor: update registry type from 'docker-hub' to 'oci' across seed data (#325)

Updates the registry type for all Docker Hub packages in the seed data
from `docker-hub` to `oci` to align with the standardized OCI registry
format. This change affects the `registry_type` field and simplifies the
`identifier` field by removing the full Docker Hub URL prefix.

Changes:
- Updated `registry_type` from `docker-hub` to `oci` for all Docker
packages
- Simplified `identifier` field to use just the repository name/path
instead of full URLs
- Maintained `registry_base_url` as `https://docker.io` for all entries

This refactoring improves consistency and aligns with OCI standards
while maintaining backward compatibility through the registry base URL.
This commit is contained in:
adam jones 2025-08-30 00:12:10 +01:00 • committed by GitHub
commit e0aecadc24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,9 +15,9 @@ import (
)
const (
RegistryTypeNPM = "npm"
RegistryTypePyPi = "pypi"
RegistryTypeDocker = "docker"
RegistryTypeNPM = "npm"
RegistryTypePyPi = "pypi"
RegistryTypeOci = "oci"
)
func InitCommand() error {
@ -206,7 +206,7 @@ func detectPackageType() string {
// Check for Dockerfile
if _, err := os.Stat("Dockerfile"); err == nil {
return RegistryTypeDocker
return RegistryTypeOci
}
// Default to npm as most common
@ -281,8 +281,8 @@ func createServerJSON(
case RegistryTypePyPi:
registryType = RegistryTypePyPi
registryBaseURL = "https://pypi.org"
case RegistryTypeDocker:
registryType = "docker-hub"
case RegistryTypeOci:
registryType = RegistryTypeOci
registryBaseURL = "https://docker.io"
case "url":
registryType = "url"