@snyk/docker-registry-v2-client
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -21,6 +21,3 @@ "use strict"; | ||
var _a; | ||
let accept = `${(_a = options.acceptManifest) !== null && _a !== void 0 ? _a : contentTypes.MANIFEST_V2}`; | ||
if (shouldAcceptManifestList(tag, platform)) { | ||
accept += `, ${contentTypes.MANIFEST_LIST_V2}`; | ||
} | ||
const accept = (_a = options.acceptManifest) !== null && _a !== void 0 ? _a : `${contentTypes.MANIFEST_V2}, ${contentTypes.MANIFEST_LIST_V2}`; | ||
const endpoint = `/${repo}/manifests/${tag}`; | ||
@@ -54,10 +51,2 @@ const manifestResponse = await registry_call_1.registryV2Call(registryBase, endpoint, accept, username, password, options); | ||
} | ||
// Accept manifest list content type in case that: | ||
// - Manifest digest was requested - if it's a manifest list digest, a list is returned and some CRs are strict | ||
// about the returned content type being different from the requested one (gcr) | ||
// - Specific platform was requested, therefore we need to get the list in order to find the specific platform | ||
// (by default the CR will return linux/amd64) | ||
function shouldAcceptManifestList(tag, platform) { | ||
return tag.includes(":") || !!platform; | ||
} | ||
//# sourceMappingURL=get-manifest.js.map |
@@ -45,3 +45,3 @@ { | ||
}, | ||
"version": "2.5.0" | ||
"version": "2.5.1" | ||
} |
@@ -26,30 +26,39 @@ # snyk/docker-registry-v2-client | ||
Set up your local env with the following env vars (see 1Password): | ||
```console | ||
export SNYK_DRA_ARTIFACTORY_PASSWORD=<See 1password: Development/DRA env> | ||
export SNYK_DRA_ARTIFACTORY_REGISTRY_BASE=dockere2e.artifactory.dev.snyk.io | ||
export SNYK_DRA_ARTIFACTORY_REPOSITORY=goof | ||
export SNYK_DRA_ARTIFACTORY_STORAGE_API_BASE=artifactory.dev.snyk.io/artifactory/api/storage/dockere2e | ||
export SNYK_DRA_ARTIFACTORY_USERNAME=snyk-e2e-test | ||
export SNYK_DRA_AZURE_PASSWORD=<See 1password: Development/Azure Container Registry (ACR) - Docker Registry Agent> | ||
export SNYK_DRA_AZURE_REGISTRY_BASE=snykgoof.azurecr.io | ||
export SNYK_DRA_AZURE_USERNAME=snykgoof | ||
export SNYK_DRA_AZURE_PASSWORD=<See 1password: Development/Azure Container Registry (ACR) - Docker Registry Agent> | ||
export SNYK_DRA_AZURE_REPOSITORY=snykgoof/azure-goof | ||
export SNYK_OCI_AZURE_REPOSITORY=snykgoof/oci-goof | ||
export SNYK_DRA_AZURE_REGISTRY_BASE=snykgoof.azurecr.io | ||
export SNYK_DRA_DOCKER_HUB_PASSWORD=<See 1password: Development/DockerHub - snykgoof user> | ||
export SNYK_DRA_DOCKER_HUB_REGISTRY_BASE=registry-1.docker.io | ||
export SNYK_DRA_DOCKER_HUB_REPOSITORY=snykgoof/dockerhub-goof | ||
export SNYK_DRA_DOCKER_HUB_USERNAME=snykgoof | ||
export SNYK_DRA_DOCKER_HUB_PASSWORD=<See 1password: Docker - snykgoof user> | ||
export SNYK_DRA_DOCKER_HUB_REPOSITORY=snykgoof/dockerhub-goof | ||
export SNYK_OCI_DOCKER_HUB_REPOSITORY=snykgoof/oci-goof | ||
export SNYK_DRA_DOCKER_HUB_REGISTRY_BASE=registry-1.docker.io | ||
export SNYK_DRA_ELASTIC_ACCESS_KEY_ID=AKIAJICAGDWS3GILA5WA | ||
export SNYK_DRA_ELASTIC_SECRET_ACCESS_KEY=<See 1password: Development/Elastic Container Registry (ECR) - Docker Registry Agent> | ||
export SNYK_DRA_ELASTIC_REGION=eu-west-3 | ||
export SNYK_DRA_ELASTIC_REPOSITORY=amazon-goof | ||
export SNYK_DRA_ELASTIC_SECRET_ACCESS_KEY=<See 1password: Development/Elastic Container Registry (ECR) - Docker Registry Agent> | ||
export SNYK_DRA_ARTIFACTORY_USERNAME=snyk-e2e-test | ||
export SNYK_DRA_ARTIFACTORY_PASSWORD=<See 1password: Artifactory Cloud - snyk-e2e-test> | ||
export SNYK_DRA_ARTIFACTORY_REPOSITORY=goof | ||
export SNYK_DRA_ARTIFACTORY_REGISTRY_BASE=snyk-test-registry.jfrog.io | ||
export SNYK_DRA_GOOGLE_PASSWORD='<See 1Password: Development/GCR Google Container Registry snyk-magma>' | ||
export SNYK_DRA_GOOGLE_REGISTRY_BASE=gcr.io | ||
export SNYK_DRA_GOOGLE_REPOSITORY=snyk-magma/google-goof | ||
export SNYK_DRA_GOOGLE_USERNAME=_json_key | ||
export SNYK_DRA_QUAY_USERNAME=snyk_magma | ||
export SNYK_DRA_QUAY_PASSWORD=<See 1password: Development/Quay - Team Magma> | ||
export SNYK_DRA_QUAY_REPOSITORY=snyk_magma/goof | ||
export SNYK_DRA_QUAY_REGISTRY_BASE=quay.io | ||
export SNYK_DRA_QUAY_USERNAME=snyk_magma | ||
export SNYK_OCI_AZURE_REPOSITORY=snykgoof/oci-goof | ||
export SNYK_OCI_DOCKER_HUB_REPOSITORY=snykgoof/oci-goof | ||
``` | ||
To run the tests: | ||
@@ -56,0 +65,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88
52296
649