@csermet/multiprovider
Version:
cloud-graph provider plugin for AWS used to fetch AWS cloud data.
21 lines (20 loc) • 840 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const format_1 = require("../../utils/format");
exports.default = ({ service: rawData, account, region }) => {
const { repositoryArn: arn, registryId: registryAccountId, repositoryName: name, repositoryUri, createdAt, imageTagMutability, imageScanningConfiguration: { scanOnPush: imageScanOnPush = false } = {}, encryptionConfiguration: { encryptionType: type = 'none', kmsKey = '' } = {}, Tags, } = rawData;
return {
id: arn,
arn,
region,
accountId: account,
createdAt: createdAt.toISOString(),
encryptionConfig: { type, kmsKey },
imageScanOnPush,
imageTagMutability,
name,
registryAccountId,
repositoryUri,
tags: format_1.formatTagsFromMap(Tags),
};
};