Skip to content

@venturekit/infra API

Creates a VentureKit application. This is the main entry point used in vk.config.ts.

function defineVenture(definition: VentureDefinition): {
_routesDir: string
_infrastructure?: VentureIntent
_definition: VentureDefinition
app(input: { stage: string }): VentureAppConfig
}

Returns a metadata object that CLI tools read:

  • _routesDir — used by vk dev to discover routes and by vk deploy to configure API Gateway
  • _infrastructure — used to generate Docker Compose services (dev) or CDK constructs (deploy)
  • _definition — the full definition for config resolution
  • app() — returns project name and region for the given stage

getResolvedConfig(base, security, envInput)

Section titled “getResolvedConfig(base, security, envInput)”

Returns the fully resolved ResolvedConfig for the current environment (determined by VENTURE_STAGE).

function getResolvedConfig(
base: BaseConfig,
security: SecurityConfig,
envInput: EnvConfigInput
): ResolvedConfig
interface VentureDefinition {
base: BaseConfig
security: SecurityConfig
envs: {
dev?: EnvConfigInput
stage?: EnvConfigInput
prod?: EnvConfigInput
}
routesDir: string
infrastructure?: VentureIntent
}
interface VentureAppConfig {
name: string
home: 'aws'
providers: { aws: { region: string } }
}