@snyk/docker-registry-v2-client
Advanced tools
Comparing version 2.8.2 to 2.9.0
export declare const MANIFEST_V2 = "application/vnd.docker.distribution.manifest.v2+json"; | ||
export declare const MANIFEST_LIST_V2 = "application/vnd.docker.distribution.manifest.list.v2+json"; | ||
export declare const OCI_MANIFEST_V1 = "application/vnd.oci.image.manifest.v1+json"; | ||
export declare const OCI_INDEX_V1 = "application/vnd.oci.image.index.v1+json"; | ||
export declare const IMAGE_CONFIG = "application/vnd.docker.container.image.v1+json"; | ||
export declare const LAYER = "application/vnd.docker.image.rootfs.diff.tar.gzip"; | ||
export declare const JSON = "application/json"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JSON = exports.LAYER = exports.IMAGE_CONFIG = exports.MANIFEST_LIST_V2 = exports.MANIFEST_V2 = void 0; | ||
exports.JSON = exports.LAYER = exports.IMAGE_CONFIG = exports.OCI_INDEX_V1 = exports.OCI_MANIFEST_V1 = exports.MANIFEST_LIST_V2 = exports.MANIFEST_V2 = void 0; | ||
exports.MANIFEST_V2 = "application/vnd.docker.distribution.manifest.v2+json"; | ||
exports.MANIFEST_LIST_V2 = "application/vnd.docker.distribution.manifest.list.v2+json"; | ||
exports.OCI_MANIFEST_V1 = "application/vnd.oci.image.manifest.v1+json"; | ||
exports.OCI_INDEX_V1 = "application/vnd.oci.image.index.v1+json"; | ||
exports.IMAGE_CONFIG = "application/vnd.docker.container.image.v1+json"; | ||
@@ -7,0 +9,0 @@ exports.LAYER = "application/vnd.docker.image.rootfs.diff.tar.gzip"; |
@@ -37,3 +37,4 @@ "use strict"; | ||
let manifestDigest; | ||
if (contentType === contentTypes.MANIFEST_LIST_V2) { | ||
if (contentType === contentTypes.MANIFEST_LIST_V2 || | ||
contentType === contentTypes.OCI_INDEX_V1) { | ||
indexDigest = computeDigest(manifestResponse.body); | ||
@@ -58,4 +59,5 @@ manifestDigest = getManifestDigestByPlatform(manifestResponse, platform); | ||
} | ||
const manifestContentType = manifestResponse.headers["content-type"]; | ||
const parsedBody = (0, needle_1.parseResponseBody)(manifestResponse); | ||
return Object.assign(Object.assign({}, parsedBody), { indexDigest, manifestDigest }); | ||
return Object.assign(Object.assign({}, parsedBody), { indexDigest, manifestDigest, manifestContentType }); | ||
} | ||
@@ -62,0 +64,0 @@ exports.getManifest = getManifest; |
@@ -12,2 +12,3 @@ import { checkSupport } from "./check-support"; | ||
import * as types from "./types"; | ||
export { checkSupport, getAuthTokenForEndpoint, getImageConfig, getImageSize, getLayer, getManifest, getRepos, getTags, registryCall, validation, types, }; | ||
import * as contentTypes from "./content-types"; | ||
export { checkSupport, getAuthTokenForEndpoint, getImageConfig, getImageSize, getLayer, getManifest, getRepos, getTags, registryCall, validation, types, contentTypes, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.types = exports.validation = exports.registryCall = exports.getTags = exports.getRepos = exports.getManifest = exports.getLayer = exports.getImageSize = exports.getImageConfig = exports.getAuthTokenForEndpoint = exports.checkSupport = void 0; | ||
exports.contentTypes = exports.types = exports.validation = exports.registryCall = exports.getTags = exports.getRepos = exports.getManifest = exports.getLayer = exports.getImageSize = exports.getImageConfig = exports.getAuthTokenForEndpoint = exports.checkSupport = void 0; | ||
const check_support_1 = require("./check-support"); | ||
@@ -26,2 +26,4 @@ Object.defineProperty(exports, "checkSupport", { enumerable: true, get: function () { return check_support_1.checkSupport; } }); | ||
exports.types = types; | ||
const contentTypes = require("./content-types"); | ||
exports.contentTypes = contentTypes; | ||
//# sourceMappingURL=index.js.map |
@@ -32,2 +32,8 @@ export interface LayerConfig { | ||
manifestDigest?: string; | ||
/** | ||
* Optional for backwards compatibility. This field is not directly return by the container registry, | ||
* it is appended before returning the ImageManifest. It is populated with the HTTP Response header | ||
* value of the same name. | ||
*/ | ||
manifestContentType?: string; | ||
} | ||
@@ -34,0 +40,0 @@ export interface ImageManifestList { |
@@ -45,3 +45,8 @@ { | ||
}, | ||
"version": "2.8.2" | ||
"release": { | ||
"branches": [ | ||
"main" | ||
] | ||
}, | ||
"version": "2.9.0" | ||
} |
@@ -61,2 +61,3 @@ # snyk/docker-registry-v2-client | ||
export SNYK_OCI_DOCKER_HUB_REPOSITORY=snykgoof/oci-goof | ||
export SNYK_OCI_MULTI_ARCH_DOCKER_HUB_REPOSITORY=snykgoof/nodejs18 | ||
``` | ||
@@ -63,0 +64,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
61118
786
89