@go-to-k/cdkd 0.74.0 → 0.75.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/README.md +35 -4
- package/dist/cli.js +2613 -230
- package/dist/cli.js.map +4 -4
- package/dist/go-to-k-cdkd-0.75.1.tgz +0 -0
- package/package.json +2 -1
- package/dist/go-to-k-cdkd-0.74.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -673,13 +673,19 @@ cdkd local start-api --env-vars env.json
|
|
|
673
673
|
|
|
674
674
|
# Pin the deployed execution role per Lambda (or globally with a bare ARN)
|
|
675
675
|
cdkd local start-api --assume-role MyApiHandler=arn:aws:iam::123:role/handler-role
|
|
676
|
+
|
|
677
|
+
# Hot reload — re-synth + re-discover routes when cdk.out/ or asset dirs change
|
|
678
|
+
cdkd local start-api --watch
|
|
679
|
+
|
|
680
|
+
# Select a specific API Gateway Stage (default: the first attached)
|
|
681
|
+
cdkd local start-api --stage prod
|
|
676
682
|
```
|
|
677
683
|
|
|
678
|
-
|
|
684
|
+
Scope: REST v1 + HTTP API + Function URL with AWS_PROXY integrations.
|
|
679
685
|
Authorizers (PR 8b — Lambda TOKEN/REQUEST + Cognito User Pool + HTTP v2
|
|
680
|
-
JWT)
|
|
681
|
-
|
|
682
|
-
deferred to follow-up
|
|
686
|
+
JWT), VPC-config Lambda warnings (PR 8b), CORS preflight (PR 8c), hot
|
|
687
|
+
reload (PR 8c), and stage variables (PR 8c) are supported. WebSocket
|
|
688
|
+
APIs are deferred to a follow-up PR.
|
|
683
689
|
|
|
684
690
|
**Authorizers (PR 8b)**: `Authorization: Bearer <token>`-protected
|
|
685
691
|
routes are gated on the authorizer Lambda's response (TOKEN / REQUEST
|
|
@@ -696,6 +702,31 @@ deployed VPC's subnets — calls to private RDS / ElastiCache will fail.
|
|
|
696
702
|
cdkd warns at startup naming each affected Lambda; AWS SDK calls still
|
|
697
703
|
reach public AWS endpoints via the dev's network as usual.
|
|
698
704
|
|
|
705
|
+
**Hot reload (`--watch`)**: re-runs the synth → discover → spec-build
|
|
706
|
+
pipeline whenever `cdk.out/` or any of the routed Lambdas' asset
|
|
707
|
+
directories change. Routes added / removed / changed swap in
|
|
708
|
+
atomically without restarting the HTTP server; in-flight requests
|
|
709
|
+
complete against the old container pool while the new pool warms.
|
|
710
|
+
Synth failures are non-fatal — the previous version keeps serving and
|
|
711
|
+
a warn line names the failure. Off by default; pass `--watch` to
|
|
712
|
+
enable.
|
|
713
|
+
|
|
714
|
+
**CORS preflight**: HTTP API v2 OPTIONS preflight requests are
|
|
715
|
+
intercepted when the API has a `CorsConfiguration` block. The server
|
|
716
|
+
matches the request's `Origin` / `Access-Control-Request-Method` /
|
|
717
|
+
`Access-Control-Request-Headers` against the configured allowlist and
|
|
718
|
+
returns a `204 No Content` with the canonical `Access-Control-Allow-*`
|
|
719
|
+
headers. Preflight handling is skipped when the user has registered
|
|
720
|
+
an explicit OPTIONS method (their Lambda owns it). REST v1 CORS (Mock
|
|
721
|
+
OPTIONS method) is not auto-handled and stays out of scope; use the
|
|
722
|
+
deployed API for that case.
|
|
723
|
+
|
|
724
|
+
**Stage variables**: `event.stageVariables` is populated from the
|
|
725
|
+
selected Stage's `Variables` (REST v1) / `StageVariables` (HTTP API
|
|
726
|
+
v2) map. Default selection is the first Stage attached to each API;
|
|
727
|
+
pass `--stage <name>` to pick a Stage by `StageName`. Function URL
|
|
728
|
+
routes don't have a Stage — `event.stageVariables` stays `null`.
|
|
729
|
+
|
|
699
730
|
See [docs/cli-reference.md](docs/cli-reference.md#local-start-api-long-running-local-api-server)
|
|
700
731
|
for the full route-discovery rules, container-pool semantics, exit
|
|
701
732
|
codes, and per-authorizer-kind detection / response-shape details.
|