| description | cdkd synthesis layer (CDK app subprocess execution, Cloud Assembly parsing, context providers) | |
|---|---|---|
| paths |
|
- Synthesis orchestration (no external CDK toolkit dependencies; CDK app itself generates templates)
AppExecutorruns CDK app as subprocess with env vars (CDK_OUTDIR, CDK_CONTEXT_JSON, CDK_DEFAULT_REGION, etc.)AssemblyReaderparses Cloud Assembly manifest.json directly (recursively traverses nested assemblies for CDK Stage support). EachStackInfocarriesmessages— the stack's CDK annotation messages (Annotations.addError/addWarning/addInfo), collected bystack-messages.ts'scollectStackMessagesfrom BOTH on-disk layouts: the artifact's inlinemetadatafield (older aws-cdk-lib) AND the<artifactId>.metadata.jsonside file referenced byadditionalMetadataFile(current aws-cdk-lib). A referenced-but-unreadable side file throws (fail-closed — silently continuing could hide an error annotation that must block deploy).stack-messages.tsalso ownsprocessStackMessages(stacks, logger, options?)— CDK CLI parity for annotations (issues #1228 / #1230): logs every message at its level ([Error|Warning|Info at /path] …), then throwsSynthesisError('Found errors')when any stack carries an error annotation.StackMessageOptionsmirrors the CDK CLI's failAt resolution:strict(the--strictflag) additionally throwsSynthesisError('Found warnings (--strict mode)')on any warning (errors win when both exist);ignoreErrors(the--ignore-errorsflag) displays but never throws; strict overrides ignoreErrors when both are set. Called bysynth(all stacks) anddeploy(selection-aware: after the final target-stack set incl. auto-included dependencies, before macro expansion / any AWS mutation — an error in a non-selected sibling does not block the deploy, mirroring #1150); both commands register the sharedannotationMessageOptionspair fromsrc/cli/options.ts.diff/list/ other synth-driven commands deliberately do NOT fail on error annotations (upstreamcdk diffdoes not either).Synthesizerorchestrates synthesis with context provider loop for missing context resolution- Context providers: see
src/synthesis/context-providers/for full list (insrc/synthesis/context-providers/) ContextStoremanages cdk.context.json read/write