+8
-5
@@ -95604,6 +95604,12 @@ const registry_1 = __nccwpck_require__(26198);
|
|||||||
const DOCKER_DEFAULT_REGISTRY = 'registry-1.docker.io';
|
const DOCKER_DEFAULT_REGISTRY = 'registry-1.docker.io';
|
||||||
const EMPTY_BLOB = Buffer.from('{}');
|
const EMPTY_BLOB = Buffer.from('{}');
|
||||||
const ALT_EMPTY_BLOB = Buffer.from('');
|
const ALT_EMPTY_BLOB = Buffer.from('');
|
||||||
|
const EMPTY_DESCRIPTOR = {
|
||||||
|
mediaType: constants_1.CONTENT_TYPE_EMPTY_DESCRIPTOR,
|
||||||
|
digest: 'sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a',
|
||||||
|
size: 2,
|
||||||
|
data: 'e30=',
|
||||||
|
};
|
||||||
class OCIImage {
|
class OCIImage {
|
||||||
constructor(image, creds, opts) {
|
constructor(image, creds, opts) {
|
||||||
_OCIImage_instances.add(this);
|
_OCIImage_instances.add(this);
|
||||||
@@ -95627,15 +95633,12 @@ class OCIImage {
|
|||||||
// Upload the artifact blob
|
// Upload the artifact blob
|
||||||
const artifactBlob = await __classPrivateFieldGet(this, _OCIImage_client, "f").uploadBlob(opts.artifact);
|
const artifactBlob = await __classPrivateFieldGet(this, _OCIImage_client, "f").uploadBlob(opts.artifact);
|
||||||
// Upload the empty blob (needed for the manifest config)
|
// Upload the empty blob (needed for the manifest config)
|
||||||
const emptyBlob = await __classPrivateFieldGet(this, _OCIImage_client, "f").uploadBlob(ALT_EMPTY_BLOB);
|
// const emptyBlob = await this.#client.uploadBlob(ALT_EMPTY_BLOB);
|
||||||
// Construct artifact manifest
|
// Construct artifact manifest
|
||||||
const manifest = buildManifest({
|
const manifest = buildManifest({
|
||||||
artifactDescriptor: { ...artifactBlob, mediaType: opts.mediaType },
|
artifactDescriptor: { ...artifactBlob, mediaType: opts.mediaType },
|
||||||
subjectDescriptor: imageDescriptor,
|
subjectDescriptor: imageDescriptor,
|
||||||
configDescriptor: {
|
configDescriptor: EMPTY_DESCRIPTOR,
|
||||||
...emptyBlob,
|
|
||||||
mediaType: constants_1.CONTENT_TYPE_EMPTY_DESCRIPTOR,
|
|
||||||
},
|
|
||||||
annotations,
|
annotations,
|
||||||
});
|
});
|
||||||
// Upload artifact manifest
|
// Upload artifact manifest
|
||||||
|
|||||||
Reference in New Issue
Block a user