@go-to-k/cdkd 0.283.21 → 0.283.23
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/README.md +6 -4
- package/dist/{asg-provider-DKjoomrX.js → asg-provider-BKIOy3_q.js} +2 -2
- package/dist/{asg-provider-DKjoomrX.js.map → asg-provider-BKIOy3_q.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{deploy-engine-ISSt01TI.js → deploy-engine-CQXpKq7o.js} +49 -6
- package/dist/{deploy-engine-ISSt01TI.js.map → deploy-engine-CQXpKq7o.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -14220,6 +14220,35 @@ function handlerAuthFailureHint(statusMessage) {
|
|
|
14220
14220
|
if (/cloudcontrol/i.test(service)) return "";
|
|
14221
14221
|
return ` [hint: this 403 was returned by ${service} to the AWS-managed resource handler running the operation, not to cdkd directly — these credentials already passed Cloud Control's own auth to start it. If the equivalent ${service} API call succeeds with the same credentials, the resource handler itself is failing (an upstream AWS issue worth retrying later), not your local credential setup.]`;
|
|
14222
14222
|
}
|
|
14223
|
+
/** How many key names a malformed-model log line may carry. */
|
|
14224
|
+
const MAX_LOGGED_MODEL_KEYS = 12;
|
|
14225
|
+
/**
|
|
14226
|
+
* Summarize a JSON document by its KEY NAMES, for a log line that must not
|
|
14227
|
+
* carry the document's values (issue #1908).
|
|
14228
|
+
*
|
|
14229
|
+
* The document failed to parse, so the keys cannot be read structurally; this
|
|
14230
|
+
* matches the `"name":` lexical form instead. That is a deliberate trade: the
|
|
14231
|
+
* pattern requires the colon, so a bare string VALUE is never reported, and the
|
|
14232
|
+
* only way a value reaches the line is if the document contains a string that
|
|
14233
|
+
* is itself followed by a colon -- which for an AWS readback means a nested
|
|
14234
|
+
* key. Values are what must not leak, and a key-shaped token is not one.
|
|
14235
|
+
*/
|
|
14236
|
+
function describeJsonKeys(document) {
|
|
14237
|
+
const keys = [];
|
|
14238
|
+
const seen = /* @__PURE__ */ new Set();
|
|
14239
|
+
const pattern = /"([^"\\]{1,64})"\s*:/g;
|
|
14240
|
+
let match;
|
|
14241
|
+
while ((match = pattern.exec(document)) !== null) {
|
|
14242
|
+
const key = match[1];
|
|
14243
|
+
if (seen.has(key)) continue;
|
|
14244
|
+
seen.add(key);
|
|
14245
|
+
keys.push(key);
|
|
14246
|
+
if (keys.length >= MAX_LOGGED_MODEL_KEYS) break;
|
|
14247
|
+
}
|
|
14248
|
+
if (keys.length === 0) return "no readable key names";
|
|
14249
|
+
const suffix = pattern.lastIndex < document.length && keys.length >= MAX_LOGGED_MODEL_KEYS ? ", ..." : "";
|
|
14250
|
+
return `keys: ${keys.join(", ")}${suffix}`;
|
|
14251
|
+
}
|
|
14223
14252
|
var CloudControlProvider = class {
|
|
14224
14253
|
cloudControlClient;
|
|
14225
14254
|
logger = getLogger().child("CloudControlProvider");
|
|
@@ -14239,7 +14268,7 @@ var CloudControlProvider = class {
|
|
|
14239
14268
|
try {
|
|
14240
14269
|
const ccProperties = stringifyJsonProperties(resourceType, stripNullValues(properties));
|
|
14241
14270
|
const desiredState = JSON.stringify(ccProperties);
|
|
14242
|
-
this.logger.debug(`DesiredState for ${logicalId}:
|
|
14271
|
+
this.logger.debug(`DesiredState for ${logicalId}: keys=${JSON.stringify(Object.keys(ccProperties))}`);
|
|
14243
14272
|
const createResponse = await this.cloudControlClient.send(new CreateResourceCommand({
|
|
14244
14273
|
TypeName: resourceType,
|
|
14245
14274
|
DesiredState: desiredState
|
|
@@ -14380,7 +14409,7 @@ var CloudControlProvider = class {
|
|
|
14380
14409
|
if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
|
|
14381
14410
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
14382
14411
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
14383
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
14412
|
+
const { ASGProvider } = await import("./asg-provider-BKIOy3_q.js").then((n) => n.n);
|
|
14384
14413
|
return await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
14385
14414
|
}
|
|
14386
14415
|
const isProtectedEc2Instance = context?.removeProtection === true && resourceType === "AWS::EC2::Instance";
|
|
@@ -14500,14 +14529,28 @@ var CloudControlProvider = class {
|
|
|
14500
14529
|
throw new ProvisioningError(`${operation} timeout for ${logicalId} after ${maxWaitMs / 1e3}s`, "Unknown", logicalId);
|
|
14501
14530
|
}
|
|
14502
14531
|
/**
|
|
14503
|
-
* Parse resource model JSON string
|
|
14532
|
+
* Parse resource model JSON string.
|
|
14533
|
+
*
|
|
14534
|
+
* On a parse failure this logs the error plus the model's SHAPE — never its
|
|
14535
|
+
* body (issue #1908, a GHSA-p5qg-v9gv-hc7w residual). The model is an AWS
|
|
14536
|
+
* readback, and a read handler cannot return write-only properties (the #809
|
|
14537
|
+
* premise), so the common secret shapes are absent — but a `{{resolve:...}}`
|
|
14538
|
+
* secret resolved into a NON-write-only property can round-trip back here,
|
|
14539
|
+
* and the previous `Raw model: <first 500 chars>` line would have printed it.
|
|
14540
|
+
* Truncation is not a mitigation: 500 characters is precisely where a
|
|
14541
|
+
* document's leading values sit.
|
|
14542
|
+
*
|
|
14543
|
+
* KEY NAMES are logged and values are not, which is the whole distinction —
|
|
14544
|
+
* a key is a property name from the type's schema, a value is the data. That
|
|
14545
|
+
* keeps the line diagnostic (it says WHICH document failed to parse) without
|
|
14546
|
+
* carrying anything sensitive.
|
|
14504
14547
|
*/
|
|
14505
14548
|
parseResourceModel(resourceModel) {
|
|
14506
14549
|
try {
|
|
14507
14550
|
return JSON.parse(resourceModel);
|
|
14508
14551
|
} catch (error) {
|
|
14509
14552
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
14510
|
-
this.logger.warn(`Failed to parse resource model: ${errorMessage}\
|
|
14553
|
+
this.logger.warn(`Failed to parse resource model: ${errorMessage}\nModel shape: ${resourceModel.length} chars, ${describeJsonKeys(resourceModel)}`);
|
|
14511
14554
|
return {};
|
|
14512
14555
|
}
|
|
14513
14556
|
}
|
|
@@ -21553,7 +21596,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
21553
21596
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
21554
21597
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
21555
21598
|
function getCdkdVersion() {
|
|
21556
|
-
return "0.283.
|
|
21599
|
+
return "0.283.23";
|
|
21557
21600
|
}
|
|
21558
21601
|
/**
|
|
21559
21602
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -23888,4 +23931,4 @@ var DeployEngine = class {
|
|
|
23888
23931
|
|
|
23889
23932
|
//#endregion
|
|
23890
23933
|
export { coerceCfnBoolean as $, resolveCaptureObservedState as $t, cyan as A, LocalStartServiceError as An, rewriteTemplateAssetReferences as At, findSilentDropProperties as B, StateError as Bn, buildDockerImage as Bt, makeCanonicalizePropertiesFn as C, AssetError as Cn, shouldRetainResource as Ct, renderStatefulReason as D, DeployCancelledError as Dn, buildAssetRedirectMap as Dt, isStatefulRecreateTargetSync as E, DependencyError as En, WorkGraph as Et, IAMRoleProvider as F, ProvisioningError as Fn, getBootstrapMarkerKey as Ft, IntrinsicFunctionResolver as G, withErrorHandling as Gn, AssetManifestLoader as Gt, slowCcOperationTimeoutMs as H, formatError as Hn, getDockerCmd as Ht, collectInlinePolicyNamesManagedBySiblings as I, ResourceTimeoutError as In, parseBootstrapMarker as It, refStateLookupFromResource as J, isThrottlingError as Jn, synthesisStatusMessage as Jt, cfnRefValueFromPhysicalId as K, isMarkedNonRetryable as Kn, getDockerImageBySourceHash as Kt, clearOnUpdateRemoval as L, ResourceUpdateNotSupportedError as Ln, validateAssetBucketName as Lt, green as M, MissingCdkCliError as Mn, AssetModeResolver as Mt, red as N, NestedStackChildDirectDestroyError as Nn, BOOTSTRAP_MARKER_PREFIX as Nt, formatResourceLine as O, LocalInvokeBuildError as On, createAssetRedirectResolver as Ot, yellow as P, PartialFailureError as Pn, ensureAssetStorage as Pt, assertRegionMatch as Q, resolveAutoAssetStorage as Qt, ProviderRegistry as R, StackHasActiveImportsError as Rn, validateContainerRepoName as Rt, unsupportedFinalSnapshotError as S, setAwsClients as Sn, rebuildClientForBucketRegion as St, MULTI_REGION_RECREATE_BLOCKED_TYPES as T, ConfigError as Tn, stringifyValue as Tt, disableInstanceApiTermination as U, isCdkdError as Un, runDockerForeground as Ut, CloudControlProvider as V, SynthesisError as Vn, formatDockerLoginError as Vt, isTerminationProtectionPropagationError as W, normalizeAwsError as Wn, runDockerStreaming as Wt, normalizeAwsTagsToCfn as X, __exportAll as Xn, getLegacyStateBucketName as Xt, WAFv2WebACLProvider as Y, markNonRetryable as Yn, getDefaultStateBucketName as Yt, resolveExplicitPhysicalId as Z, resolveApp as Zt, buildFinalSnapshotIdentifier as _, clearBucketRegionCache as _n, withRetry as _t, DeploymentEventsStore as a, warnDeprecatedNoPrefixCliFlag as an, requireConfigObject as at, isFinalSnapshotError as b, getAwsClients as bn, LockManager as bt, replayFailedOperations as c, MIGRATE_TMP_PREFIX as cn, scrubResourceRecord as ct, deleteSkipReason as d, expectedOwnerParam as dn, s3BucketDualStackDomainName as dt, resolveSkipPrefix as en, configBooleanRefusal as et, withResourceDeadline as f, PARTITION_TABLE as fn, s3BucketRegionalDomainName as ft, PRE_DELETE_SNAPSHOT_TYPES as g, processStackMessages as gn, describeTypeWithThrottleRetry as gt, ATOMIC_FINAL_SNAPSHOT_TYPES as h, AssemblyReader as hn, DiffCalculator as ht, DeploymentEventsReader as i, stateBucketExistenceConfirmed as in, requireConfigArray as it, gray as j, LockError as jn, escapeRegExp$1 as jt, bold as k, LocalMigrateError as kn, loadPublishableAssetManifest as kt, replayRollback as l, findLargeInlineResources as ln, s3BucketArn as lt, computeImplicitDeleteEdges as m, derivePartitionAndUrlSuffix as mn, applyRoleArnIfSet as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, resolveStateBucketWithDefaultAndSource as nn, readConfigString as nt, planFailedOps as o, CFN_TEMPLATE_BODY_LIMIT as on, requireConfigString as ot, IMPLICIT_DELETE_DEPENDENCIES as p, canonicalizeRegion as pn, s3BucketWebsiteUrl as pt, getAccountInfo as q, isRetryableTransientError as qn, Synthesizer as qt, DeployEngine as r, resolveUseCdkBootstrapAssets as rn, replayWarn as rt, planRollback as s, CFN_TEMPLATE_URL_LIMIT as sn, redactSecretsForState as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveStateBucketWithDefault as tn, configStringRefusal as tt, UNSPECIFIED_SKIP_REASON as u, uploadCfnTemplate as un, s3BucketDomainName as ut, ccRoutedFinalSnapshotError as v, resolveBucketRegion as vn, DagBuilder as vt, extractDeploymentEventError as w, CdkdError as wn, AssetPublisher as wt, refusesFinalSnapshot as x, resetAwsClients as xn, S3StateBackend as xt, createPreDeleteFinalSnapshot as y, AwsClients as yn, TemplateParser as yt, findActionableSilentDrops as z, StackTerminationProtectionError as zn, buildDenyExternalAccessPolicy as zt };
|
|
23891
|
-
//# sourceMappingURL=deploy-engine-
|
|
23934
|
+
//# sourceMappingURL=deploy-engine-CQXpKq7o.js.map
|