@go-to-k/cdkd 0.137.2 → 0.137.3

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
@@ -41121,7 +41121,7 @@ function discoverOneApi(logicalId, resource, template, stackName) {
41121
41121
  apiLogicalId: logicalId,
41122
41122
  apiStackName: stackName,
41123
41123
  declaredAt,
41124
- ...apiCdkPath !== "" && { apiCdkPath },
41124
+ ...apiCdkPath !== void 0 && { apiCdkPath },
41125
41125
  routeSelectionExpression,
41126
41126
  stage,
41127
41127
  routes,
@@ -41306,12 +41306,45 @@ function pickRefLogicalId$2(value) {
41306
41306
  }
41307
41307
  function readApiCdkPath(logicalId, template) {
41308
41308
  const resource = template.Resources?.[logicalId];
41309
- if (!resource) return "";
41310
- return readCdkPath(resource);
41309
+ if (!resource) return void 0;
41310
+ const path = readCdkPath(resource);
41311
+ return path === "" ? void 0 : path;
41311
41312
  }
41312
41313
 
41313
41314
  //#endregion
41314
41315
  //#region src/local/websocket-event.ts
41316
+ /**
41317
+ * AWS API Gateway WebSocket event-payload builders.
41318
+ *
41319
+ * Spec: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
41320
+ *
41321
+ * Three event types — CONNECT / MESSAGE / DISCONNECT — each carry a
41322
+ * shared {@link WebSocketRequestContext} plus per-event fields.
41323
+ *
41324
+ * Fields cdkd populates locally vs mocks (matches design Q1 in
41325
+ * `docs/design/462-websocket-api.md`):
41326
+ *
41327
+ * | Field | Source |
41328
+ * |--------------------------------------|-----------------------------------------|
41329
+ * | `connectionId` | UUID v4 generated at `$connect` |
41330
+ * | `requestId` / `extendedRequestId` | Generated UUID per event |
41331
+ * | `messageId` (MESSAGE only) | Generated UUID per event |
41332
+ * | `requestTime` / `requestTimeEpoch` | `Date.now()` at build time |
41333
+ * | `connectedAt` | Captured at `$connect` |
41334
+ * | `stage` | Resolved Stage Name; `'local'` default |
41335
+ * | `apiId` | `'local'` (mock) |
41336
+ * | `domainName` | `'localhost'` (mock) |
41337
+ * | `identity.sourceIp` | `req.socket.remoteAddress` (real) |
41338
+ * | `identity.userAgent` | Upgrade `User-Agent` header (real) |
41339
+ * | `headers`/`queryStringParameters` | Parsed from upgrade `req` (real) |
41340
+ * | `authorizer` | `null` in v1 (deferred) |
41341
+ *
41342
+ * Per-event `eventType` / `routeKey` / `messageDirection` are fixed by
41343
+ * the lifecycle stage, NOT by the route's `routeKey` field — `routeKey`
41344
+ * carries which user-declared route fired ("$connect" / "$disconnect" /
41345
+ * "$default" / custom).
41346
+ */
41347
+ const MOCK_ACCOUNT_ID$1 = "123456789012";
41315
41348
  const MOCK_DOMAIN_NAME$1 = "localhost";
41316
41349
  const MOCK_API_ID$1 = "local";
41317
41350
  /**
@@ -41338,6 +41371,7 @@ function buildRequestContext(routeKey, eventType, connectionId, connectedAt, sta
41338
41371
  apiId: MOCK_API_ID$1,
41339
41372
  authorizer: null,
41340
41373
  identity: {
41374
+ accountId: MOCK_ACCOUNT_ID$1,
41341
41375
  sourceIp: snapshot.sourceIp ?? "127.0.0.1",
41342
41376
  userAgent: snapshot.userAgent ?? ""
41343
41377
  }
@@ -54130,7 +54164,7 @@ function reorderArgs(argv) {
54130
54164
  */
54131
54165
  async function main() {
54132
54166
  const program = new Command();
54133
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.137.2");
54167
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.137.3");
54134
54168
  program.addCommand(createBootstrapCommand());
54135
54169
  program.addCommand(createSynthCommand());
54136
54170
  program.addCommand(createListCommand());