@go-to-k/cdkd 0.258.0 → 0.259.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
@@ -1901,7 +1901,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1901
1901
  const FLUSH_EVENT_THRESHOLD = 50;
1902
1902
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1903
1903
  function getCdkdVersion() {
1904
- return "0.258.0";
1904
+ return "0.259.1";
1905
1905
  }
1906
1906
  /**
1907
1907
  * Generate a time-sortable unique run id, e.g.
@@ -8516,13 +8516,13 @@ var LambdaFunctionProvider = class {
8516
8516
  Role: properties["Role"],
8517
8517
  Handler: properties["Handler"],
8518
8518
  Runtime: properties["Runtime"],
8519
- Timeout: properties["Timeout"],
8520
- MemorySize: properties["MemorySize"],
8521
- Description: properties["Description"],
8522
- Environment: properties["Environment"],
8523
- Layers: properties["Layers"],
8524
- TracingConfig: properties["TracingConfig"],
8525
- EphemeralStorage: properties["EphemeralStorage"],
8519
+ Timeout: this.clearOnUpdateRemoval(properties["Timeout"], previousProperties["Timeout"], 3),
8520
+ MemorySize: this.clearOnUpdateRemoval(properties["MemorySize"], previousProperties["MemorySize"], 128),
8521
+ Description: this.clearOnUpdateRemoval(properties["Description"], previousProperties["Description"], ""),
8522
+ Environment: this.clearOnUpdateRemoval(properties["Environment"], previousProperties["Environment"], { Variables: {} }),
8523
+ Layers: this.clearOnUpdateRemoval(properties["Layers"], previousProperties["Layers"], []),
8524
+ TracingConfig: this.clearOnUpdateRemoval(properties["TracingConfig"], previousProperties["TracingConfig"], { Mode: "PassThrough" }),
8525
+ EphemeralStorage: this.clearOnUpdateRemoval(properties["EphemeralStorage"], previousProperties["EphemeralStorage"], { Size: 512 }),
8526
8526
  VpcConfig: this.buildVpcConfigForUpdate(properties["VpcConfig"], previousProperties["VpcConfig"]),
8527
8527
  DeadLetterConfig: this.clearOnUpdateRemoval(properties["DeadLetterConfig"], previousProperties["DeadLetterConfig"], { TargetArn: "" }),
8528
8528
  KMSKeyArn: this.clearOnUpdateRemoval(properties["KmsKeyArn"], previousProperties["KmsKeyArn"], ""),
@@ -8677,9 +8677,12 @@ var LambdaFunctionProvider = class {
8677
8677
  * `UpdateFunctionConfiguration` treats an absent field as "no change", so
8678
8678
  * passing `undefined` for a field the user just dropped from the template
8679
8679
  * leaves the old value live on AWS — the update reports success while the
8680
- * field silently persists. For fields that support an explicit reset value
8681
- * (DeadLetterConfig `{TargetArn:''}`, KMSKeyArn `''`, FileSystemConfigs `[]`,
8682
- * ImageConfig `{}`, SnapStart `{ApplyOn:'None'}`) we send that reset when the
8680
+ * field silently persists. For every optional config field we send its
8681
+ * CFn-default / explicit reset value (e.g. Timeout `3`, MemorySize `128`,
8682
+ * Environment `{Variables:{}}`, Layers `[]`, TracingConfig
8683
+ * `{Mode:'PassThrough'}`, EphemeralStorage `{Size:512}`, DeadLetterConfig
8684
+ * `{TargetArn:''}`, KMSKeyArn `''`, FileSystemConfigs `[]`, ImageConfig `{}`,
8685
+ * SnapStart `{ApplyOn:'None'}`, LoggingConfig `{LogFormat:'Text'}`) when the
8683
8686
  * field was present before and is now absent. Mirrors `buildVpcConfigForUpdate`.
8684
8687
  */
8685
8688
  clearOnUpdateRemoval(newValue, previousValue, clearValue) {
@@ -10601,6 +10604,30 @@ var LambdaMicrovmImageProvider = class {
10601
10604
  default: return;
10602
10605
  }
10603
10606
  }
10607
+ /**
10608
+ * Adopt an existing MicroVM image into cdkd state.
10609
+ *
10610
+ * Override-only: the image ARN must be supplied via `--resource
10611
+ * <logicalId>=<arn>`. There is no auto-lookup — MicroVM images have no
10612
+ * `aws:cdk:path` tag (AWS reserves the `aws:` tag prefix) and a bare `Name`
10613
+ * is rejected by `GetMicrovmImage` ("Invalid ARN format"), so the physical id
10614
+ * must be the image ARN. Returns `null` when the image does not exist.
10615
+ */
10616
+ async import(input) {
10617
+ const arn = input.knownPhysicalId;
10618
+ if (!arn) return null;
10619
+ if (!arn.startsWith("arn:")) throw new Error(`--resource override for ${input.logicalId} must be a MicroVM image ARN (got '${arn}'). A bare image name is not accepted; use the arn:...:microvm-image:... ARN.`);
10620
+ try {
10621
+ await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: arn }));
10622
+ return {
10623
+ physicalId: arn,
10624
+ attributes: { ImageArn: arn }
10625
+ };
10626
+ } catch (error) {
10627
+ if (error instanceof ResourceNotFoundException$7) return null;
10628
+ throw error;
10629
+ }
10630
+ }
10604
10631
  buildAttributes(imageArn, state, extra) {
10605
10632
  const attributes = { ImageArn: imageArn };
10606
10633
  if (state !== void 0) attributes["State"] = state;
@@ -61260,7 +61287,7 @@ function createMigrateCommand() {
61260
61287
  */
61261
61288
  function buildProgram() {
61262
61289
  const program = new Command();
61263
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.258.0");
61290
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.259.1");
61264
61291
  program.addCommand(createBootstrapCommand());
61265
61292
  program.addCommand(createSynthCommand());
61266
61293
  program.addCommand(createListCommand());