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:
parent
12dc4c3b99
commit
e0aecadc24
1 changed files with 195 additions and 196 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue