@venturekit/infra API
Functions
Section titled “Functions”defineVenture(definition)
Section titled “defineVenture(definition)”Creates a VentureKit application. This is the main entry point used in vk.config.ts.
function defineVenture(definition: VentureDefinition): { _routesDir: string _functionsDir: string _queuesDir: string _cronsDir: string _resolveInfrastructure: (stage: string) => VentureIntent | undefined _definition: VentureDefinition app(input: { stage: string }): VentureAppConfig}Returns a metadata object that CLI tools read:
_routesDir— used byvk devto discover routes and byvk deployto configure API Gateway_functionsDir/_queuesDir/_cronsDir— directories for standalone functions, queue consumers, and cron handlers_resolveInfrastructure(stage)— merges shared definitions with per-env overrides byid, returns the resolvedVentureIntent_definition— the full definition for config resolutionapp()— 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): ResolvedConfigVentureDefinition
Section titled “VentureDefinition”interface VentureDefinition { base: BaseConfig security: SecurityConfig envs: { dev?: EnvConfigInput stage?: EnvConfigInput prod?: EnvConfigInput } routesDir?: string // default: 'src/routes' functionsDir?: string // default: 'src/functions' queuesDir?: string // default: 'src/queues' cronsDir?: string // default: 'src/crons'
// Shared infrastructure definitions (matched by id with per-env overrides) databases?: DatabaseIntent[] storage?: StorageIntent[] auth?: AuthIntent[] queues?: QueueIntent[] caches?: CacheIntent[] schedules?: ScheduleIntent[] functions?: FunctionIntent[] monitoring?: MonitoringIntent[] secrets?: SecretsIntent[] envVars?: EnvVarIntent[] domains?: DomainIntent[]}VentureAppConfig
Section titled “VentureAppConfig”interface VentureAppConfig { name: string home: 'aws' providers: { aws: { region: string } }}