@go-to-k/cdkd 0.230.0 → 0.230.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +33 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1445,7 +1445,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1445
1445
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1446
1446
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1447
1447
|
function getCdkdVersion() {
|
|
1448
|
-
return "0.230.
|
|
1448
|
+
return "0.230.1";
|
|
1449
1449
|
}
|
|
1450
1450
|
/**
|
|
1451
1451
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -35093,6 +35093,32 @@ var ECRProvider = class {
|
|
|
35093
35093
|
return this.client;
|
|
35094
35094
|
}
|
|
35095
35095
|
/**
|
|
35096
|
+
* Map CFn `ImageScanningConfiguration` (PascalCase `{ ScanOnPush }`) to the
|
|
35097
|
+
* SDK shape (camelCase `{ scanOnPush }`). The SDK input keys are camelCase;
|
|
35098
|
+
* forwarding the CFn-cased object verbatim makes the SDK ignore the unknown
|
|
35099
|
+
* `ScanOnPush` key and silently default `scanOnPush` to `false` — so
|
|
35100
|
+
* `imageScanOnPush: true` never reached AWS. Returns `undefined` for an
|
|
35101
|
+
* absent config so the caller can omit the field.
|
|
35102
|
+
*/
|
|
35103
|
+
toSdkScanningConfig(cfn) {
|
|
35104
|
+
if (!cfn) return void 0;
|
|
35105
|
+
return { scanOnPush: Boolean(cfn["ScanOnPush"]) };
|
|
35106
|
+
}
|
|
35107
|
+
/**
|
|
35108
|
+
* Map CFn `EncryptionConfiguration` (PascalCase `{ EncryptionType, KmsKey }`)
|
|
35109
|
+
* to the SDK shape (camelCase `{ encryptionType, kmsKey }`). Same casing trap
|
|
35110
|
+
* as scanning config — a KMS repo's `KmsKey` would be silently dropped (and
|
|
35111
|
+
* the type would fall back to AES256) without this mapping.
|
|
35112
|
+
*/
|
|
35113
|
+
toSdkEncryptionConfig(cfn) {
|
|
35114
|
+
if (!cfn) return void 0;
|
|
35115
|
+
const encryptionType = cfn["EncryptionType"];
|
|
35116
|
+
if (!encryptionType) return void 0;
|
|
35117
|
+
const out = { encryptionType };
|
|
35118
|
+
if (encryptionType === "KMS" && cfn["KmsKey"]) out.kmsKey = cfn["KmsKey"];
|
|
35119
|
+
return out;
|
|
35120
|
+
}
|
|
35121
|
+
/**
|
|
35096
35122
|
* Create an ECR Repository
|
|
35097
35123
|
*/
|
|
35098
35124
|
async create(logicalId, resourceType, properties) {
|
|
@@ -35100,11 +35126,13 @@ var ECRProvider = class {
|
|
|
35100
35126
|
const repositoryName = properties["RepositoryName"] || generateResourceName(logicalId, { maxLength: 256 }).toLowerCase();
|
|
35101
35127
|
try {
|
|
35102
35128
|
const tags = properties["Tags"];
|
|
35129
|
+
const scanningConfig = this.toSdkScanningConfig(properties["ImageScanningConfiguration"]);
|
|
35130
|
+
const encryptionConfig = this.toSdkEncryptionConfig(properties["EncryptionConfiguration"]);
|
|
35103
35131
|
const repo = (await this.getClient().send(new CreateRepositoryCommand({
|
|
35104
35132
|
repositoryName,
|
|
35105
|
-
...
|
|
35133
|
+
...scanningConfig ? { imageScanningConfiguration: scanningConfig } : {},
|
|
35106
35134
|
...properties["ImageTagMutability"] ? { imageTagMutability: properties["ImageTagMutability"] } : {},
|
|
35107
|
-
...
|
|
35135
|
+
...encryptionConfig ? { encryptionConfiguration: encryptionConfig } : {},
|
|
35108
35136
|
...tags ? { tags } : {}
|
|
35109
35137
|
}))).repository;
|
|
35110
35138
|
if (!repo?.repositoryName) throw new Error("CreateRepository did not return repository name");
|
|
@@ -35155,7 +35183,7 @@ var ECRProvider = class {
|
|
|
35155
35183
|
if (JSON.stringify(newScanConfig) !== JSON.stringify(oldScanConfig)) {
|
|
35156
35184
|
await this.getClient().send(new PutImageScanningConfigurationCommand({
|
|
35157
35185
|
repositoryName: physicalId,
|
|
35158
|
-
imageScanningConfiguration: newScanConfig ?? { scanOnPush: false }
|
|
35186
|
+
imageScanningConfiguration: this.toSdkScanningConfig(newScanConfig) ?? { scanOnPush: false }
|
|
35159
35187
|
}));
|
|
35160
35188
|
this.logger.debug(`Updated image scanning configuration for ${physicalId}`);
|
|
35161
35189
|
}
|
|
@@ -54962,7 +54990,7 @@ function reorderArgs(argv) {
|
|
|
54962
54990
|
async function main() {
|
|
54963
54991
|
installPipeCloseHandler();
|
|
54964
54992
|
const program = new Command();
|
|
54965
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.
|
|
54993
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.1");
|
|
54966
54994
|
program.addCommand(createBootstrapCommand());
|
|
54967
54995
|
program.addCommand(createSynthCommand());
|
|
54968
54996
|
program.addCommand(createListCommand());
|