@go-to-k/cdkd 0.172.0 → 0.173.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-iDMcWcre.js";
|
|
3
|
-
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-
|
|
3
|
+
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-BfRlYX17.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -414,12 +414,12 @@ const RESOURCE_PROPERTY_FORMAT = /^[A-Z][A-Za-z0-9]+(::[A-Z][A-Za-z0-9]+)+:[A-Z]
|
|
|
414
414
|
function parseAllowUnsupportedPropertiesToken(value, previous) {
|
|
415
415
|
const parsed = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
416
416
|
for (const token of parsed) {
|
|
417
|
-
if (!RESOURCE_PROPERTY_FORMAT.test(token)) throw new Error(`Invalid --allow-unsupported-properties value "${token}": expected <ResourceType>:<PropertyName> with PascalCase on both halves (e.g. AWS::Lambda::Function:
|
|
417
|
+
if (!RESOURCE_PROPERTY_FORMAT.test(token)) throw new Error(`Invalid --allow-unsupported-properties value "${token}": expected <ResourceType>:<PropertyName> with PascalCase on both halves (e.g. AWS::Lambda::Function:RecursiveLoop).`);
|
|
418
418
|
if (token.startsWith("Custom::")) throw new Error(`Invalid --allow-unsupported-properties value "${token}": Custom:: resources are routed through cfn-response and have no write-side silent drop at cdkd, so the flag would have no effect. Use --allow-unsupported-types for type-level escape hatches instead.`);
|
|
419
419
|
}
|
|
420
420
|
return [...previous ?? [], ...parsed];
|
|
421
421
|
}
|
|
422
|
-
const allowUnsupportedPropertiesOption = new Option("--allow-unsupported-properties <entries>", "Comma-separated <ResourceType>:<PropertyName> tokens to accept as silently dropped at deploy time. Escape hatch — the property will NOT be written to AWS, the deployed resource will be missing the field. Example: --allow-unsupported-properties AWS::Lambda::Function:
|
|
422
|
+
const allowUnsupportedPropertiesOption = new Option("--allow-unsupported-properties <entries>", "Comma-separated <ResourceType>:<PropertyName> tokens to accept as silently dropped at deploy time. Escape hatch — the property will NOT be written to AWS, the deployed resource will be missing the field. Example: --allow-unsupported-properties AWS::Lambda::Function:RecursiveLoop,AWS::RDS::DBInstance:CACertificateIdentifier").argParser(parseAllowUnsupportedPropertiesToken);
|
|
423
423
|
/**
|
|
424
424
|
* Issue [#615] — `--recreate-via-cc-api <LogicalId>` (repeatable). Each
|
|
425
425
|
* named resource is destroyed + recreated this deploy via Cloud Control
|
|
@@ -1088,8 +1088,8 @@ function renderStatefulReason(reason) {
|
|
|
1088
1088
|
* this is a structural limitation, not a data-loss footgun.
|
|
1089
1089
|
*
|
|
1090
1090
|
* Plus one cross-flag invariant: `--recreate-via-cc-api MyLambda`
|
|
1091
|
-
* combined with `--allow-unsupported-properties AWS::Lambda::Function:
|
|
1092
|
-
* on a resource whose template carries `
|
|
1091
|
+
* combined with `--allow-unsupported-properties AWS::Lambda::Function:RecursiveLoop`
|
|
1092
|
+
* on a resource whose template carries `RecursiveLoop` is **ambiguous
|
|
1093
1093
|
* intent** — does the user want SDK + silent drop, or CC migration?
|
|
1094
1094
|
* Fail fast and let the user pick one strategy per resource.
|
|
1095
1095
|
*/
|
|
@@ -6992,7 +6992,8 @@ var LambdaFunctionProvider = class {
|
|
|
6992
6992
|
"KmsKeyArn",
|
|
6993
6993
|
"FileSystemConfigs",
|
|
6994
6994
|
"ImageConfig",
|
|
6995
|
-
"SnapStart"
|
|
6995
|
+
"SnapStart",
|
|
6996
|
+
"LoggingConfig"
|
|
6996
6997
|
])]]);
|
|
6997
6998
|
eniWaitTimeoutMs = 600 * 1e3;
|
|
6998
6999
|
eniWaitInitialDelayMs = 1e4;
|
|
@@ -7044,6 +7045,7 @@ var LambdaFunctionProvider = class {
|
|
|
7044
7045
|
FileSystemConfigs: properties["FileSystemConfigs"],
|
|
7045
7046
|
ImageConfig: properties["ImageConfig"],
|
|
7046
7047
|
SnapStart: properties["SnapStart"],
|
|
7048
|
+
LoggingConfig: properties["LoggingConfig"],
|
|
7047
7049
|
Tags: tags
|
|
7048
7050
|
};
|
|
7049
7051
|
const response = await this.lambdaClient.send(new CreateFunctionCommand(createParams));
|
|
@@ -7082,7 +7084,8 @@ var LambdaFunctionProvider = class {
|
|
|
7082
7084
|
"KmsKeyArn",
|
|
7083
7085
|
"FileSystemConfigs",
|
|
7084
7086
|
"ImageConfig",
|
|
7085
|
-
"SnapStart"
|
|
7087
|
+
"SnapStart",
|
|
7088
|
+
"LoggingConfig"
|
|
7086
7089
|
];
|
|
7087
7090
|
let hasConfigChanges = false;
|
|
7088
7091
|
for (const field of configFields) if (JSON.stringify(properties[field]) !== JSON.stringify(previousProperties[field])) {
|
|
@@ -7107,7 +7110,8 @@ var LambdaFunctionProvider = class {
|
|
|
7107
7110
|
KMSKeyArn: this.clearOnUpdateRemoval(properties["KmsKeyArn"], previousProperties["KmsKeyArn"], ""),
|
|
7108
7111
|
FileSystemConfigs: this.clearOnUpdateRemoval(properties["FileSystemConfigs"], previousProperties["FileSystemConfigs"], []),
|
|
7109
7112
|
ImageConfig: this.clearOnUpdateRemoval(properties["ImageConfig"], previousProperties["ImageConfig"], {}),
|
|
7110
|
-
SnapStart: this.clearOnUpdateRemoval(properties["SnapStart"], previousProperties["SnapStart"], { ApplyOn: "None" })
|
|
7113
|
+
SnapStart: this.clearOnUpdateRemoval(properties["SnapStart"], previousProperties["SnapStart"], { ApplyOn: "None" }),
|
|
7114
|
+
LoggingConfig: this.clearOnUpdateRemoval(properties["LoggingConfig"], previousProperties["LoggingConfig"], { LogFormat: "Text" })
|
|
7111
7115
|
};
|
|
7112
7116
|
await this.lambdaClient.send(new UpdateFunctionConfigurationCommand(configParams));
|
|
7113
7117
|
this.logger.debug(`Updated configuration for Lambda function ${physicalId}`);
|
|
@@ -7573,8 +7577,9 @@ var LambdaFunctionProvider = class {
|
|
|
7573
7577
|
* `create()` accepts (`Runtime`, `Handler`, `Role`, `Timeout`, `MemorySize`,
|
|
7574
7578
|
* `Description`, `Environment`, `Layers`, `Architectures`, `PackageType`,
|
|
7575
7579
|
* `TracingConfig`, `EphemeralStorage`, `VpcConfig`, `DeadLetterConfig`,
|
|
7576
|
-
* `KmsKeyArn`, `FileSystemConfigs`, `ImageConfig`, `SnapStart`,
|
|
7577
|
-
* physical `FunctionName`). The drift comparator
|
|
7580
|
+
* `KmsKeyArn`, `FileSystemConfigs`, `ImageConfig`, `SnapStart`,
|
|
7581
|
+
* `LoggingConfig`, plus the physical `FunctionName`). The drift comparator
|
|
7582
|
+
* only descends into keys
|
|
7578
7583
|
* present in
|
|
7579
7584
|
* cdkd state, so AWS-managed fields (timestamps, FunctionArn, RevisionId,
|
|
7580
7585
|
* etc.) are filtered at compare time — we still avoid serializing them on
|
|
@@ -7639,6 +7644,13 @@ var LambdaFunctionProvider = class {
|
|
|
7639
7644
|
if (Object.keys(ic).length > 0) result["ImageConfig"] = ic;
|
|
7640
7645
|
}
|
|
7641
7646
|
if (cfg.SnapStart?.ApplyOn !== void 0) result["SnapStart"] = { ApplyOn: cfg.SnapStart.ApplyOn };
|
|
7647
|
+
if (cfg.LoggingConfig?.LogFormat !== void 0) {
|
|
7648
|
+
const lc = { LogFormat: cfg.LoggingConfig.LogFormat };
|
|
7649
|
+
if (cfg.LoggingConfig.ApplicationLogLevel !== void 0) lc["ApplicationLogLevel"] = cfg.LoggingConfig.ApplicationLogLevel;
|
|
7650
|
+
if (cfg.LoggingConfig.SystemLogLevel !== void 0) lc["SystemLogLevel"] = cfg.LoggingConfig.SystemLogLevel;
|
|
7651
|
+
if (cfg.LoggingConfig.LogGroup !== void 0) lc["LogGroup"] = cfg.LoggingConfig.LogGroup;
|
|
7652
|
+
result["LoggingConfig"] = lc;
|
|
7653
|
+
}
|
|
7642
7654
|
result["Tags"] = normalizeAwsTagsToCfn(resp.Tags);
|
|
7643
7655
|
return result;
|
|
7644
7656
|
} catch (err) {
|
|
@@ -35270,7 +35282,7 @@ const EMPTY_ALLOW_SET = /* @__PURE__ */ new Set();
|
|
|
35270
35282
|
*
|
|
35271
35283
|
* - **Fresh hits**: a resource whose template uses one or more
|
|
35272
35284
|
* silent-drop top-level CFn properties. Annotation value is the list
|
|
35273
|
-
* of property names (e.g. `
|
|
35285
|
+
* of property names (e.g. `RecursiveLoop`).
|
|
35274
35286
|
* - **Sticky hits**: a resource whose deployed state records
|
|
35275
35287
|
* `provisionedBy: 'cc-api'` (from a prior deploy) even when the
|
|
35276
35288
|
* current template's silent-drop set is empty. Annotation value is
|
|
@@ -51250,7 +51262,7 @@ function reorderArgs(argv) {
|
|
|
51250
51262
|
*/
|
|
51251
51263
|
async function main() {
|
|
51252
51264
|
const program = new Command();
|
|
51253
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
51265
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.173.0");
|
|
51254
51266
|
program.addCommand(createBootstrapCommand());
|
|
51255
51267
|
program.addCommand(createSynthCommand());
|
|
51256
51268
|
program.addCommand(createListCommand());
|