Internal
Set the ambient pipeline scope and stage context, execute fn, then clean up.
fn
Use this inside your stageFactory to make the pipeline scope available to defineHosting/defineBackend (which detect the ambient scope via globalThis).
stageFactory
defineHosting
defineBackend
globalThis
The CDK Stage provided by the pipeline.
The full stage configuration for the current stage.
A callback (sync or async) that imports/executes your application code.
Set the ambient pipeline scope and stage context, execute
fn, then clean up.Use this inside your
stageFactoryto make the pipeline scope available todefineHosting/defineBackend(which detect the ambient scope viaglobalThis).