@go-to-k/cdkd 0.166.1 → 0.167.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 CHANGED
@@ -1123,6 +1123,7 @@ function validateRecreateTargets(input) {
1123
1123
  const blockedStatefulTargets = [];
1124
1124
  const blockedMultiRegionTargets = [];
1125
1125
  const blockedAlreadySdk = [];
1126
+ const blockedAlreadyCcApi = [];
1126
1127
  const blockedNoSdkProvider = [];
1127
1128
  const conflictSet = new Set(conflictingDirections);
1128
1129
  const namedTargets = [...input.recreateViaCcApi.map((id) => ({
@@ -1166,6 +1167,7 @@ function validateRecreateTargets(input) {
1166
1167
  property
1167
1168
  });
1168
1169
  }
1170
+ if (recordedResource.provisionedBy === "cc-api") blockedAlreadyCcApi.push(target);
1169
1171
  } else {
1170
1172
  const actionableDrops = findActionableSilentDrops(resourceType, templateResource.Properties, input.allowUnsupportedProperties);
1171
1173
  for (const { property } of actionableDrops) ambiguousIntentSdk.push({
@@ -1187,6 +1189,7 @@ function validateRecreateTargets(input) {
1187
1189
  blockedStatefulTargets,
1188
1190
  blockedMultiRegionTargets,
1189
1191
  blockedAlreadySdk,
1192
+ blockedAlreadyCcApi,
1190
1193
  blockedNoSdkProvider,
1191
1194
  conflictingDirections
1192
1195
  };
@@ -1241,6 +1244,12 @@ function renderRecreateTargetsErrors(validation) {
1241
1244
  for (const blocked of validation.blockedAlreadySdk) lines.push(` - ${blocked.logicalId} (${blocked.resourceType})`);
1242
1245
  lines.push(" Fix: remove --recreate-via-sdk-provider <id> for these resources. They are already SDK-managed (or pre-v7 legacy state, treated as SDK).");
1243
1246
  }
1247
+ if (validation.blockedAlreadyCcApi.length > 0) {
1248
+ if (lines.length > 0) lines.push("");
1249
+ lines.push(`--recreate-via-cc-api named ${validation.blockedAlreadyCcApi.length} resource(s) that are ALREADY sticky on Cloud Control API (the migration is a no-op):`);
1250
+ for (const blocked of validation.blockedAlreadyCcApi) lines.push(` - ${blocked.logicalId} (${blocked.resourceType})`);
1251
+ lines.push(" Fix: remove --recreate-via-cc-api <id> for these resources. They are already CC-managed; a destroy + recreate cycle would produce the same end state at the cost of unnecessary downtime.");
1252
+ }
1244
1253
  if (validation.blockedNoSdkProvider.length > 0) {
1245
1254
  if (lines.length > 0) lines.push("");
1246
1255
  lines.push(`--recreate-via-sdk-provider named ${validation.blockedNoSdkProvider.length} resource(s) of types cdkd has no SDK provider for (Tier 2 CC-only):`);
@@ -46242,12 +46251,22 @@ async function invokeRieStreaming(host, port, event, timeoutMs) {
46242
46251
  throw new Error(`RIE streaming response did not emit the prelude/body separator within ${STREAM_PRELUDE_MAX_BYTES} bytes. The handler likely did not call awslambda.HttpResponseStream.from(stream, metadata).`);
46243
46252
  }
46244
46253
  }
46254
+ let preludeSynthesized = false;
46245
46255
  if (separatorIdx < 0) {
46246
- clearTimeout(timer);
46247
- throw new Error(`RIE streaming response ended before the prelude/body separator (got ${preludeBytes.length} bytes). The handler likely threw before streaming the prelude — check container logs.`);
46256
+ if (preludeBytes.length === 0) {
46257
+ clearTimeout(timer);
46258
+ throw new Error(`RIE streaming response ended with zero bytes. The handler likely threw before any write — check container logs.`);
46259
+ }
46260
+ preludeSynthesized = true;
46261
+ bodyTail = preludeBytes;
46262
+ preludeBytes = Buffer.alloc(0);
46248
46263
  }
46249
46264
  let prelude;
46250
- try {
46265
+ if (preludeSynthesized) prelude = {
46266
+ statusCode: 200,
46267
+ headers: { "Content-Type": "application/octet-stream" }
46268
+ };
46269
+ else try {
46251
46270
  prelude = parseStreamingPrelude(preludeBytes.toString("utf8"));
46252
46271
  } catch (err) {
46253
46272
  clearTimeout(timer);
@@ -60761,7 +60780,7 @@ function reorderArgs(argv) {
60761
60780
  */
60762
60781
  async function main() {
60763
60782
  const program = new Command();
60764
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.166.1");
60783
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.167.1");
60765
60784
  program.addCommand(createBootstrapCommand());
60766
60785
  program.addCommand(createSynthCommand());
60767
60786
  program.addCommand(createListCommand());