@go-to-k/cdkd 0.230.23 → 0.230.25
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 +15 -8
- 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.25";
|
|
1449
1449
|
}
|
|
1450
1450
|
/**
|
|
1451
1451
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -8040,7 +8040,9 @@ var LambdaFunctionProvider = class {
|
|
|
8040
8040
|
}
|
|
8041
8041
|
const newCode = properties["Code"];
|
|
8042
8042
|
const oldCode = previousProperties["Code"];
|
|
8043
|
-
|
|
8043
|
+
const normalizeArchitectures = (v) => Array.isArray(v) && v.length > 0 ? v : ["x86_64"];
|
|
8044
|
+
const architecturesChanged = JSON.stringify(normalizeArchitectures(properties["Architectures"])) !== JSON.stringify(normalizeArchitectures(previousProperties["Architectures"]));
|
|
8045
|
+
if (newCode && (architecturesChanged || JSON.stringify(newCode) !== JSON.stringify(oldCode))) {
|
|
8044
8046
|
const builtCode = this.buildCode(newCode, properties["Runtime"]);
|
|
8045
8047
|
const codeParams = {
|
|
8046
8048
|
FunctionName: physicalId,
|
|
@@ -8048,7 +8050,8 @@ var LambdaFunctionProvider = class {
|
|
|
8048
8050
|
S3Key: builtCode.S3Key,
|
|
8049
8051
|
S3ObjectVersion: builtCode.S3ObjectVersion,
|
|
8050
8052
|
ZipFile: builtCode.ZipFile,
|
|
8051
|
-
ImageUri: builtCode.ImageUri
|
|
8053
|
+
ImageUri: builtCode.ImageUri,
|
|
8054
|
+
Architectures: architecturesChanged ? normalizeArchitectures(properties["Architectures"]) : void 0
|
|
8052
8055
|
};
|
|
8053
8056
|
await this.lambdaClient.send(new UpdateFunctionCodeCommand(codeParams));
|
|
8054
8057
|
this.logger.debug(`Updated code for Lambda function ${physicalId}`);
|
|
@@ -10032,11 +10035,15 @@ var DynamoDBTableProvider = class {
|
|
|
10032
10035
|
try {
|
|
10033
10036
|
const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
|
|
10034
10037
|
if (table?.TableArn) await this.applyTagDiff(table.TableArn, previousProperties["Tags"], properties["Tags"]);
|
|
10035
|
-
|
|
10038
|
+
const normalizeTableClass = (v) => typeof v === "string" && v.length > 0 ? v : "STANDARD";
|
|
10039
|
+
const tableClassChanged = normalizeTableClass(properties["TableClass"]) !== normalizeTableClass(previousProperties["TableClass"]);
|
|
10040
|
+
const billingOrThroughputChanged = JSON.stringify(properties["BillingMode"]) !== JSON.stringify(previousProperties["BillingMode"]) || JSON.stringify(properties["ProvisionedThroughput"]) !== JSON.stringify(previousProperties["ProvisionedThroughput"]);
|
|
10041
|
+
if (billingOrThroughputChanged || tableClassChanged) {
|
|
10036
10042
|
const billingMode = properties["BillingMode"];
|
|
10037
10043
|
const updateInput = { TableName: physicalId };
|
|
10038
|
-
if (billingMode) updateInput.BillingMode = billingMode;
|
|
10039
|
-
if (
|
|
10044
|
+
if (billingOrThroughputChanged && billingMode) updateInput.BillingMode = billingMode;
|
|
10045
|
+
if (tableClassChanged) updateInput.TableClass = normalizeTableClass(properties["TableClass"]);
|
|
10046
|
+
if (billingOrThroughputChanged && billingMode !== "PAY_PER_REQUEST" && properties["ProvisionedThroughput"]) {
|
|
10040
10047
|
const pt = properties["ProvisionedThroughput"];
|
|
10041
10048
|
updateInput.ProvisionedThroughput = {
|
|
10042
10049
|
ReadCapacityUnits: Number(pt["ReadCapacityUnits"] ?? 5),
|
|
@@ -10045,7 +10052,7 @@ var DynamoDBTableProvider = class {
|
|
|
10045
10052
|
}
|
|
10046
10053
|
await this.dynamoDBClient.send(new UpdateTableCommand(updateInput));
|
|
10047
10054
|
await this.waitForTableActiveAfterUpdate(physicalId);
|
|
10048
|
-
this.logger.debug(`Updated BillingMode/ProvisionedThroughput on DynamoDB table ${physicalId}`);
|
|
10055
|
+
this.logger.debug(`Updated BillingMode/ProvisionedThroughput/TableClass on DynamoDB table ${physicalId}`);
|
|
10049
10056
|
}
|
|
10050
10057
|
if (JSON.stringify(properties["OnDemandThroughput"]) !== JSON.stringify(previousProperties["OnDemandThroughput"])) {
|
|
10051
10058
|
if (properties["OnDemandThroughput"]) {
|
|
@@ -55405,7 +55412,7 @@ function reorderArgs(argv) {
|
|
|
55405
55412
|
async function main() {
|
|
55406
55413
|
installPipeCloseHandler();
|
|
55407
55414
|
const program = new Command();
|
|
55408
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.
|
|
55415
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.25");
|
|
55409
55416
|
program.addCommand(createBootstrapCommand());
|
|
55410
55417
|
program.addCommand(createSynthCommand());
|
|
55411
55418
|
program.addCommand(createListCommand());
|