@codedrifters/configulator 0.0.195 → 0.0.197

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/lib/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Component, Project as Project$1, typescript } from 'projen';
1
+ import { Component, Project as Project$1, typescript, awscdk } from 'projen';
2
2
  import { Project, Component as Component$1, Task } from 'projen/lib';
3
3
  import { NodeProject } from 'projen/lib/javascript';
4
4
  import { AwsCdkTypeScriptApp } from 'projen/lib/awscdk';
@@ -6,7 +6,7 @@ import { AwsStageType, DeploymentTargetRoleType, AwsEnvironmentType, AWS_STAGE_T
6
6
  import * as spec from '@jsii/spec';
7
7
  import { TypeScriptProject as TypeScriptProject$1, TypeScriptAppProject, TypeScriptProjectOptions as TypeScriptProjectOptions$1 } from 'projen/lib/typescript';
8
8
  import { ValueOf } from 'type-fest';
9
- import { BuildWorkflowOptions, BuildWorkflow } from 'projen/lib/build';
9
+ import { BuildWorkflow, BuildWorkflowOptions } from 'projen/lib/build';
10
10
  import { JobStep } from 'projen/lib/github/workflows-model';
11
11
 
12
12
  /**
@@ -2381,6 +2381,87 @@ declare class AstroProject extends TypeScriptProject {
2381
2381
  constructor(userOptions: AstroProjectOptions);
2382
2382
  }
2383
2383
 
2384
+ declare const PROD_DEPLOY_NAME = "prod-deploy";
2385
+ interface DeployWorkflowOptions {
2386
+ /**
2387
+ * What type of deploy is this workflow for?
2388
+ *
2389
+ * @default AWS_STAGE_TYPE.DEV
2390
+ */
2391
+ readonly awsStageType?: ValueOf<typeof AWS_STAGE_TYPE>;
2392
+ /**
2393
+ * Optionally feed a list of targets to deploy to.
2394
+ *
2395
+ * @default discovers all targets using stageType
2396
+ */
2397
+ readonly awsDeploymentTargets?: Array<AwsDeploymentTarget>;
2398
+ /**
2399
+ * Existing workflow, useful if we're tacking deployments onto an existing
2400
+ * build workflow
2401
+ */
2402
+ readonly buildWorkflow?: BuildWorkflow;
2403
+ /**
2404
+ * Options for the build workflow, if no build workflow is provided.
2405
+ */
2406
+ readonly buildWorkflowOptions?: Partial<BuildWorkflowOptions>;
2407
+ /**
2408
+ * Projects that should complete deployment before this one starts.
2409
+ */
2410
+ readonly deployAfterTargets?: Array<AwsDeploymentTarget>;
2411
+ }
2412
+ declare class AwsDeployWorkflow extends Component {
2413
+ project: AwsCdkTypeScriptApp;
2414
+ options: DeployWorkflowOptions;
2415
+ static of(project: AwsCdkTypeScriptApp, buildWorkflow: BuildWorkflow): AwsDeployWorkflow | undefined;
2416
+ /**
2417
+ * The root project for this deploy workflow. Must be a monorepo project.
2418
+ */
2419
+ private rootProject;
2420
+ /**
2421
+ * What type of deploy is this workflow for?
2422
+ */
2423
+ awsStageType: AwsStageType;
2424
+ /**
2425
+ * AWS environment type, such as primary or secondary.
2426
+ *
2427
+ * @deprecated Use deployment target role terminology elsewhere. This property is maintained for backward compatibility.
2428
+ * @default 'primary' (this is the only type supported currently)
2429
+ */
2430
+ awsEnvironmentType: DeploymentTargetRoleType;
2431
+ /**
2432
+ * The list of targets to deploy to.
2433
+ */
2434
+ readonly awsDeploymentTargets: Array<AwsDeploymentTarget>;
2435
+ /**
2436
+ * Hold the deploy workflow so we can add to it in preSynth
2437
+ */
2438
+ buildWorkflow: BuildWorkflow;
2439
+ /**
2440
+ * Was this workflow created externally?
2441
+ */
2442
+ externalWorkflow: boolean;
2443
+ /**
2444
+ * Projects that should complete deployment before this one starts.
2445
+ */
2446
+ deployAfterTargets: Array<AwsDeploymentTarget>;
2447
+ constructor(project: AwsCdkTypeScriptApp, options?: DeployWorkflowOptions);
2448
+ setupNode: () => Array<JobStep>;
2449
+ setupPnpm: () => Array<JobStep>;
2450
+ /**
2451
+ * Builds a GitHub Actions condition string that checks if the current branch
2452
+ * matches any of the provided branch patterns.
2453
+ *
2454
+ * Handles both exact matches (e.g., "main") and glob patterns (e.g., "feature/*").
2455
+ * Also allows workflow_dispatch (manual runs) to proceed.
2456
+ *
2457
+ * @param branches Array of GitBranch objects with branch patterns
2458
+ * @returns Condition string or empty string if no branches provided
2459
+ */
2460
+ private buildBranchFilterCondition;
2461
+ private deploySteps;
2462
+ preSynthesize(): void;
2463
+ }
2464
+
2384
2465
  /**
2385
2466
  * Each of the below options corresponds to a task property found here:
2386
2467
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -2987,6 +3068,140 @@ declare class MonorepoProject extends TypeScriptAppProject {
2987
3068
  postSynthesize(): void;
2988
3069
  }
2989
3070
 
3071
+ /**
3072
+ * Default branch-delete patterns that trigger the teardown workflow.
3073
+ */
3074
+ declare const DEFAULT_TEARDOWN_BRANCH_PATTERNS: ReadonlyArray<string>;
3075
+ /**
3076
+ * Options for {@link AwsTeardownWorkflow}.
3077
+ */
3078
+ interface AwsTeardownWorkflowOptions {
3079
+ /**
3080
+ * Targets to scan for orphaned CloudFormation stacks.
3081
+ */
3082
+ readonly awsDestructionTargets: Array<AwsDeploymentTarget>;
3083
+ /**
3084
+ * Name of the tag containing the repo name. Used to find CloudFormation
3085
+ * stacks associated with this repo.
3086
+ */
3087
+ readonly repoTagName: string;
3088
+ /**
3089
+ * Name of the tag containing the stage type (e.g. dev, stage, prod).
3090
+ */
3091
+ readonly stageTypeTagName: string;
3092
+ /**
3093
+ * Name of the tag containing the environment type (e.g. primary, secondary).
3094
+ */
3095
+ readonly environmentTypeTagName: string;
3096
+ /**
3097
+ * Name of the tag where branch names are stored. Used to determine if a
3098
+ * stack is orphaned (no matching branch).
3099
+ */
3100
+ readonly branchNameTagName: string;
3101
+ /**
3102
+ * Branch patterns whose deletion triggers the teardown workflow.
3103
+ *
3104
+ * @default ["feat/*", "fix/*", "feature/*"]
3105
+ */
3106
+ readonly deleteBranchPatterns?: Array<string>;
3107
+ }
3108
+ /**
3109
+ * Scheduled GitHub Actions workflow that tears down orphaned CloudFormation
3110
+ * stacks whose associated branch no longer exists.
3111
+ */
3112
+ declare class AwsTeardownWorkflow extends Component {
3113
+ rootProject: MonorepoProject;
3114
+ constructor(rootProject: MonorepoProject, options: AwsTeardownWorkflowOptions);
3115
+ }
3116
+
3117
+ /**
3118
+ * Configuration options for AwsCdkProject.
3119
+ *
3120
+ * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
3121
+ * throws otherwise. Configulator assumes a single-package repo is still a
3122
+ * monorepo (with one workspace) so all conventions hold uniformly.
3123
+ */
3124
+ interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
3125
+ /**
3126
+ * AWS deployment targets (dev / stage / prod accounts and regions). Each
3127
+ * entry creates an `AwsDeploymentTarget` component on the project.
3128
+ */
3129
+ readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
3130
+ /**
3131
+ * AWS deploy workflows. If omitted, one workflow is auto-generated per
3132
+ * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
3133
+ * workflow renders to its own `.github/workflows/*.yml` file.
3134
+ *
3135
+ * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
3136
+ * supplying any workflows of your own — the array is truthy and short-circuits
3137
+ * the default. Useful when you intend to attach deploy jobs to an existing
3138
+ * build workflow yourself.
3139
+ */
3140
+ readonly deployWorkflows?: Array<DeployWorkflowOptions>;
3141
+ /**
3142
+ * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
3143
+ * When set, every workflow generated from `deploymentTargets` re-uses this
3144
+ * build workflow instead of creating its own. Default behavior (omit) is one
3145
+ * separate yml file per stage type.
3146
+ *
3147
+ * Distinct from `buildWorkflow: boolean` inherited from
3148
+ * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
3149
+ * build workflow is generated at all.
3150
+ */
3151
+ readonly sharedBuildWorkflow?: BuildWorkflow;
3152
+ /**
3153
+ * Test runner to use.
3154
+ *
3155
+ * @default TestRunner.JEST
3156
+ */
3157
+ readonly testRunner?: TestRunner;
3158
+ /**
3159
+ * Options for Vitest (only used when testRunner is 'vitest').
3160
+ */
3161
+ readonly vitestOptions?: VitestOptions;
3162
+ /**
3163
+ * Enable the reset task that deletes all build artifacts.
3164
+ *
3165
+ * @default true
3166
+ */
3167
+ readonly resetTask?: boolean;
3168
+ /**
3169
+ * Options for the reset task.
3170
+ */
3171
+ readonly resetTaskOptions?: ResetTaskOptions;
3172
+ /**
3173
+ * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
3174
+ * not inherited from the parent `MonorepoProject`.
3175
+ *
3176
+ * @default false
3177
+ */
3178
+ readonly agentConfig?: AgentConfigOptions | boolean;
3179
+ /**
3180
+ * Scheduled teardown workflow options. When provided, an `AwsTeardownWorkflow`
3181
+ * is attached to the parent `MonorepoProject` that periodically deletes
3182
+ * orphaned CloudFormation stacks whose branch no longer exists.
3183
+ */
3184
+ readonly teardownWorkflow?: AwsTeardownWorkflowOptions;
3185
+ }
3186
+ /**
3187
+ * AWS CDK TypeScript application with CodeDrifters conventions baked in.
3188
+ *
3189
+ * Always creates an `AwsDeploymentConfig` component (even with zero deployment
3190
+ * targets) so the `synth` task is consistently rewritten to emit into
3191
+ * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
3192
+ * funnels every package's CDK output into one root-level `dist/` tree so
3193
+ * GitHub Actions workflows can pass artifacts between jobs uniformly.
3194
+ */
3195
+ declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
3196
+ constructor(userOptions: AwsCdkProjectOptions);
3197
+ /**
3198
+ * Add an AWS deployment target to this project after construction. The
3199
+ * target is registered on the existing `AwsDeploymentConfig` and immediately
3200
+ * available for `AwsDeployWorkflow` consumption.
3201
+ */
3202
+ addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
3203
+ }
3204
+
2990
3205
  /**
2991
3206
  * Provides structured project metadata consumed by AgentConfig, skills,
2992
3207
  * and other configulator features at synthesis time.
@@ -3042,87 +3257,6 @@ declare class VSCodeConfig extends Component {
3042
3257
  constructor(project: TypeScriptAppProject);
3043
3258
  }
3044
3259
 
3045
- declare const PROD_DEPLOY_NAME = "prod-deploy";
3046
- interface DeployWorkflowOptions {
3047
- /**
3048
- * What type of deploy is this workflow for?
3049
- *
3050
- * @default AWS_STAGE_TYPE.DEV
3051
- */
3052
- readonly awsStageType?: ValueOf<typeof AWS_STAGE_TYPE>;
3053
- /**
3054
- * Optionally feed a list of targets to deploy to.
3055
- *
3056
- * @default discovers all targets using stageType
3057
- */
3058
- readonly awsDeploymentTargets?: Array<AwsDeploymentTarget>;
3059
- /**
3060
- * Existing workflow, useful if we're tacking deployments onto an existing
3061
- * build workflow
3062
- */
3063
- readonly buildWorkflow?: BuildWorkflow;
3064
- /**
3065
- * Options for the build workflow, if no build workflow is provided.
3066
- */
3067
- readonly buildWorkflowOptions?: Partial<BuildWorkflowOptions>;
3068
- /**
3069
- * Projects that should complete deployment before this one starts.
3070
- */
3071
- readonly deployAfterTargets?: Array<AwsDeploymentTarget>;
3072
- }
3073
- declare class AwsDeployWorkflow extends Component {
3074
- project: AwsCdkTypeScriptApp;
3075
- options: DeployWorkflowOptions;
3076
- static of(project: AwsCdkTypeScriptApp, buildWorkflow: BuildWorkflow): AwsDeployWorkflow | undefined;
3077
- /**
3078
- * The root project for this deploy workflow. Must be a monorepo project.
3079
- */
3080
- private rootProject;
3081
- /**
3082
- * What type of deploy is this workflow for?
3083
- */
3084
- awsStageType: AwsStageType;
3085
- /**
3086
- * AWS environment type, such as primary or secondary.
3087
- *
3088
- * @deprecated Use deployment target role terminology elsewhere. This property is maintained for backward compatibility.
3089
- * @default 'primary' (this is the only type supported currently)
3090
- */
3091
- awsEnvironmentType: DeploymentTargetRoleType;
3092
- /**
3093
- * The list of targets to deploy to.
3094
- */
3095
- readonly awsDeploymentTargets: Array<AwsDeploymentTarget>;
3096
- /**
3097
- * Hold the deploy workflow so we can add to it in preSynth
3098
- */
3099
- buildWorkflow: BuildWorkflow;
3100
- /**
3101
- * Was this workflow created externally?
3102
- */
3103
- externalWorkflow: boolean;
3104
- /**
3105
- * Projects that should complete deployment before this one starts.
3106
- */
3107
- deployAfterTargets: Array<AwsDeploymentTarget>;
3108
- constructor(project: AwsCdkTypeScriptApp, options?: DeployWorkflowOptions);
3109
- setupNode: () => Array<JobStep>;
3110
- setupPnpm: () => Array<JobStep>;
3111
- /**
3112
- * Builds a GitHub Actions condition string that checks if the current branch
3113
- * matches any of the provided branch patterns.
3114
- *
3115
- * Handles both exact matches (e.g., "main") and glob patterns (e.g., "feature/*").
3116
- * Also allows workflow_dispatch (manual runs) to proceed.
3117
- *
3118
- * @param branches Array of GitBranch objects with branch patterns
3119
- * @returns Condition string or empty string if no branches provided
3120
- */
3121
- private buildBranchFilterCondition;
3122
- private deploySteps;
3123
- preSynthesize(): void;
3124
- }
3125
-
3126
3260
  /** Name of the gate job appended to build workflows (ADR 0004). */
3127
3261
  declare const COMPLETE_JOB_ID = "complete";
3128
3262
  /**
@@ -3136,4 +3270,4 @@ declare const COMPLETE_JOB_ID = "complete";
3136
3270
  */
3137
3271
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3138
3272
 
3139
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, type LabelDefinition, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type SyncLabelsOptions, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, pnpmBundle, projenBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, turborepoBundle, typescriptBundle, vitestBundle };
3273
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, type AgentConfigOptions, type AgentModel, type AgentPlatform, type AgentPlatformOverrides, type AgentProcedure, type AgentRule, type AgentRuleBundle, type AgentRuleScope, type AgentSkill, type AgentSubAgent, type AgentSubAgentPlatformOverrides, type ApproveMergeUpgradeOptions, AstroConfig, type AstroConfigOptions, type AstroIntegrationSpec, AstroOutput, AstroProject, type AstroProjectOptions, type AwsAccount, AwsCdkProject, type AwsCdkProjectOptions, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, type AwsDeploymentTargetOptions, type AwsLocalDeploymentConfig, type AwsOrganization, type AwsRegion, AwsTeardownWorkflow, type AwsTeardownWorkflowOptions, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, type CiDeploymentConfig, type ClassTypeOptions, type ClaudeAutoModeConfig, type ClaudeHookAction, type ClaudeHookEntry, type ClaudeHooksConfig, type ClaudePermissionsConfig, type ClaudeRuleTarget, type ClaudeSandboxConfig, type ClaudeSettingsConfig, type CopilotHandoff, type CursorHookAction, type CursorHooksConfig, type CursorSettingsConfig, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, type DeployWorkflowOptions, type DeploymentMetadata, type GitBranch, type GitHubBoardMetadata, type GitHubProjectMetadata, type GitHubSprintMetadata, type IDependencyResolver, JsiiFaker, type LabelDefinition, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, type McpServerConfig, type McpTransport, type MergeMethod, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, type SlackMetadata, type SyncLabelsOptions, type TemplateResolveResult, TestRunner, TurboRepo, type TurboRepoOptions, TurboRepoTask, type TurboRepoTaskOptions, TypeScriptConfig, TypeScriptProject, type TypeScriptProjectOptions, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, type VersionKey, Vitest, type VitestConfigOptions, type VitestOptions, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, pnpmBundle, projenBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, turborepoBundle, typescriptBundle, vitestBundle };
package/lib/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Component, Project, typescript } from 'projen';
1
+ import { Component, Project, typescript, awscdk } from 'projen';
2
2
  import { Project as Project$1, Task, Component as Component$1 } from 'projen/lib';
3
3
  import { NodeProject } from 'projen/lib/javascript';
4
4
  import { AwsCdkTypeScriptApp } from 'projen/lib/awscdk';
5
5
  import * as spec from '@jsii/spec';
6
- import { TypeScriptProject as TypeScriptProject$1, TypeScriptAppProject, TypeScriptProjectOptions as TypeScriptProjectOptions$1 } from 'projen/lib/typescript';
6
+ import { TypeScriptAppProject, TypeScriptProjectOptions as TypeScriptProjectOptions$1, TypeScriptProject as TypeScriptProject$1 } from 'projen/lib/typescript';
7
7
  import { ValueOf } from 'type-fest';
8
8
  import { BuildWorkflow, BuildWorkflowOptions } from 'projen/lib/build';
9
9
  import { JobStep } from 'projen/lib/github/workflows-model';
@@ -2430,6 +2430,87 @@ declare class AstroProject extends TypeScriptProject {
2430
2430
  constructor(userOptions: AstroProjectOptions);
2431
2431
  }
2432
2432
 
2433
+ declare const PROD_DEPLOY_NAME = "prod-deploy";
2434
+ interface DeployWorkflowOptions {
2435
+ /**
2436
+ * What type of deploy is this workflow for?
2437
+ *
2438
+ * @default AWS_STAGE_TYPE.DEV
2439
+ */
2440
+ readonly awsStageType?: ValueOf<typeof AWS_STAGE_TYPE>;
2441
+ /**
2442
+ * Optionally feed a list of targets to deploy to.
2443
+ *
2444
+ * @default discovers all targets using stageType
2445
+ */
2446
+ readonly awsDeploymentTargets?: Array<AwsDeploymentTarget>;
2447
+ /**
2448
+ * Existing workflow, useful if we're tacking deployments onto an existing
2449
+ * build workflow
2450
+ */
2451
+ readonly buildWorkflow?: BuildWorkflow;
2452
+ /**
2453
+ * Options for the build workflow, if no build workflow is provided.
2454
+ */
2455
+ readonly buildWorkflowOptions?: Partial<BuildWorkflowOptions>;
2456
+ /**
2457
+ * Projects that should complete deployment before this one starts.
2458
+ */
2459
+ readonly deployAfterTargets?: Array<AwsDeploymentTarget>;
2460
+ }
2461
+ declare class AwsDeployWorkflow extends Component {
2462
+ project: AwsCdkTypeScriptApp;
2463
+ options: DeployWorkflowOptions;
2464
+ static of(project: AwsCdkTypeScriptApp, buildWorkflow: BuildWorkflow): AwsDeployWorkflow | undefined;
2465
+ /**
2466
+ * The root project for this deploy workflow. Must be a monorepo project.
2467
+ */
2468
+ private rootProject;
2469
+ /**
2470
+ * What type of deploy is this workflow for?
2471
+ */
2472
+ awsStageType: AwsStageType;
2473
+ /**
2474
+ * AWS environment type, such as primary or secondary.
2475
+ *
2476
+ * @deprecated Use deployment target role terminology elsewhere. This property is maintained for backward compatibility.
2477
+ * @default 'primary' (this is the only type supported currently)
2478
+ */
2479
+ awsEnvironmentType: DeploymentTargetRoleType;
2480
+ /**
2481
+ * The list of targets to deploy to.
2482
+ */
2483
+ readonly awsDeploymentTargets: Array<AwsDeploymentTarget>;
2484
+ /**
2485
+ * Hold the deploy workflow so we can add to it in preSynth
2486
+ */
2487
+ buildWorkflow: BuildWorkflow;
2488
+ /**
2489
+ * Was this workflow created externally?
2490
+ */
2491
+ externalWorkflow: boolean;
2492
+ /**
2493
+ * Projects that should complete deployment before this one starts.
2494
+ */
2495
+ deployAfterTargets: Array<AwsDeploymentTarget>;
2496
+ constructor(project: AwsCdkTypeScriptApp, options?: DeployWorkflowOptions);
2497
+ setupNode: () => Array<JobStep>;
2498
+ setupPnpm: () => Array<JobStep>;
2499
+ /**
2500
+ * Builds a GitHub Actions condition string that checks if the current branch
2501
+ * matches any of the provided branch patterns.
2502
+ *
2503
+ * Handles both exact matches (e.g., "main") and glob patterns (e.g., "feature/*").
2504
+ * Also allows workflow_dispatch (manual runs) to proceed.
2505
+ *
2506
+ * @param branches Array of GitBranch objects with branch patterns
2507
+ * @returns Condition string or empty string if no branches provided
2508
+ */
2509
+ private buildBranchFilterCondition;
2510
+ private deploySteps;
2511
+ preSynthesize(): void;
2512
+ }
2513
+
2433
2514
  /**
2434
2515
  * Each of the below options corresponds to a task property found here:
2435
2516
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -3036,6 +3117,140 @@ declare class MonorepoProject extends TypeScriptAppProject {
3036
3117
  postSynthesize(): void;
3037
3118
  }
3038
3119
 
3120
+ /**
3121
+ * Default branch-delete patterns that trigger the teardown workflow.
3122
+ */
3123
+ declare const DEFAULT_TEARDOWN_BRANCH_PATTERNS: ReadonlyArray<string>;
3124
+ /**
3125
+ * Options for {@link AwsTeardownWorkflow}.
3126
+ */
3127
+ interface AwsTeardownWorkflowOptions {
3128
+ /**
3129
+ * Targets to scan for orphaned CloudFormation stacks.
3130
+ */
3131
+ readonly awsDestructionTargets: Array<AwsDeploymentTarget>;
3132
+ /**
3133
+ * Name of the tag containing the repo name. Used to find CloudFormation
3134
+ * stacks associated with this repo.
3135
+ */
3136
+ readonly repoTagName: string;
3137
+ /**
3138
+ * Name of the tag containing the stage type (e.g. dev, stage, prod).
3139
+ */
3140
+ readonly stageTypeTagName: string;
3141
+ /**
3142
+ * Name of the tag containing the environment type (e.g. primary, secondary).
3143
+ */
3144
+ readonly environmentTypeTagName: string;
3145
+ /**
3146
+ * Name of the tag where branch names are stored. Used to determine if a
3147
+ * stack is orphaned (no matching branch).
3148
+ */
3149
+ readonly branchNameTagName: string;
3150
+ /**
3151
+ * Branch patterns whose deletion triggers the teardown workflow.
3152
+ *
3153
+ * @default ["feat/*", "fix/*", "feature/*"]
3154
+ */
3155
+ readonly deleteBranchPatterns?: Array<string>;
3156
+ }
3157
+ /**
3158
+ * Scheduled GitHub Actions workflow that tears down orphaned CloudFormation
3159
+ * stacks whose associated branch no longer exists.
3160
+ */
3161
+ declare class AwsTeardownWorkflow extends Component {
3162
+ rootProject: MonorepoProject;
3163
+ constructor(rootProject: MonorepoProject, options: AwsTeardownWorkflowOptions);
3164
+ }
3165
+
3166
+ /**
3167
+ * Configuration options for AwsCdkProject.
3168
+ *
3169
+ * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
3170
+ * throws otherwise. Configulator assumes a single-package repo is still a
3171
+ * monorepo (with one workspace) so all conventions hold uniformly.
3172
+ */
3173
+ interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
3174
+ /**
3175
+ * AWS deployment targets (dev / stage / prod accounts and regions). Each
3176
+ * entry creates an `AwsDeploymentTarget` component on the project.
3177
+ */
3178
+ readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
3179
+ /**
3180
+ * AWS deploy workflows. If omitted, one workflow is auto-generated per
3181
+ * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
3182
+ * workflow renders to its own `.github/workflows/*.yml` file.
3183
+ *
3184
+ * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
3185
+ * supplying any workflows of your own — the array is truthy and short-circuits
3186
+ * the default. Useful when you intend to attach deploy jobs to an existing
3187
+ * build workflow yourself.
3188
+ */
3189
+ readonly deployWorkflows?: Array<DeployWorkflowOptions>;
3190
+ /**
3191
+ * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
3192
+ * When set, every workflow generated from `deploymentTargets` re-uses this
3193
+ * build workflow instead of creating its own. Default behavior (omit) is one
3194
+ * separate yml file per stage type.
3195
+ *
3196
+ * Distinct from `buildWorkflow: boolean` inherited from
3197
+ * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
3198
+ * build workflow is generated at all.
3199
+ */
3200
+ readonly sharedBuildWorkflow?: BuildWorkflow;
3201
+ /**
3202
+ * Test runner to use.
3203
+ *
3204
+ * @default TestRunner.JEST
3205
+ */
3206
+ readonly testRunner?: TestRunner;
3207
+ /**
3208
+ * Options for Vitest (only used when testRunner is 'vitest').
3209
+ */
3210
+ readonly vitestOptions?: VitestOptions;
3211
+ /**
3212
+ * Enable the reset task that deletes all build artifacts.
3213
+ *
3214
+ * @default true
3215
+ */
3216
+ readonly resetTask?: boolean;
3217
+ /**
3218
+ * Options for the reset task.
3219
+ */
3220
+ readonly resetTaskOptions?: ResetTaskOptions;
3221
+ /**
3222
+ * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
3223
+ * not inherited from the parent `MonorepoProject`.
3224
+ *
3225
+ * @default false
3226
+ */
3227
+ readonly agentConfig?: AgentConfigOptions | boolean;
3228
+ /**
3229
+ * Scheduled teardown workflow options. When provided, an `AwsTeardownWorkflow`
3230
+ * is attached to the parent `MonorepoProject` that periodically deletes
3231
+ * orphaned CloudFormation stacks whose branch no longer exists.
3232
+ */
3233
+ readonly teardownWorkflow?: AwsTeardownWorkflowOptions;
3234
+ }
3235
+ /**
3236
+ * AWS CDK TypeScript application with CodeDrifters conventions baked in.
3237
+ *
3238
+ * Always creates an `AwsDeploymentConfig` component (even with zero deployment
3239
+ * targets) so the `synth` task is consistently rewritten to emit into
3240
+ * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
3241
+ * funnels every package's CDK output into one root-level `dist/` tree so
3242
+ * GitHub Actions workflows can pass artifacts between jobs uniformly.
3243
+ */
3244
+ declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
3245
+ constructor(userOptions: AwsCdkProjectOptions);
3246
+ /**
3247
+ * Add an AWS deployment target to this project after construction. The
3248
+ * target is registered on the existing `AwsDeploymentConfig` and immediately
3249
+ * available for `AwsDeployWorkflow` consumption.
3250
+ */
3251
+ addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
3252
+ }
3253
+
3039
3254
  /**
3040
3255
  * Provides structured project metadata consumed by AgentConfig, skills,
3041
3256
  * and other configulator features at synthesis time.
@@ -3091,87 +3306,6 @@ declare class VSCodeConfig extends Component {
3091
3306
  constructor(project: TypeScriptAppProject);
3092
3307
  }
3093
3308
 
3094
- declare const PROD_DEPLOY_NAME = "prod-deploy";
3095
- interface DeployWorkflowOptions {
3096
- /**
3097
- * What type of deploy is this workflow for?
3098
- *
3099
- * @default AWS_STAGE_TYPE.DEV
3100
- */
3101
- readonly awsStageType?: ValueOf<typeof AWS_STAGE_TYPE>;
3102
- /**
3103
- * Optionally feed a list of targets to deploy to.
3104
- *
3105
- * @default discovers all targets using stageType
3106
- */
3107
- readonly awsDeploymentTargets?: Array<AwsDeploymentTarget>;
3108
- /**
3109
- * Existing workflow, useful if we're tacking deployments onto an existing
3110
- * build workflow
3111
- */
3112
- readonly buildWorkflow?: BuildWorkflow;
3113
- /**
3114
- * Options for the build workflow, if no build workflow is provided.
3115
- */
3116
- readonly buildWorkflowOptions?: Partial<BuildWorkflowOptions>;
3117
- /**
3118
- * Projects that should complete deployment before this one starts.
3119
- */
3120
- readonly deployAfterTargets?: Array<AwsDeploymentTarget>;
3121
- }
3122
- declare class AwsDeployWorkflow extends Component {
3123
- project: AwsCdkTypeScriptApp;
3124
- options: DeployWorkflowOptions;
3125
- static of(project: AwsCdkTypeScriptApp, buildWorkflow: BuildWorkflow): AwsDeployWorkflow | undefined;
3126
- /**
3127
- * The root project for this deploy workflow. Must be a monorepo project.
3128
- */
3129
- private rootProject;
3130
- /**
3131
- * What type of deploy is this workflow for?
3132
- */
3133
- awsStageType: AwsStageType;
3134
- /**
3135
- * AWS environment type, such as primary or secondary.
3136
- *
3137
- * @deprecated Use deployment target role terminology elsewhere. This property is maintained for backward compatibility.
3138
- * @default 'primary' (this is the only type supported currently)
3139
- */
3140
- awsEnvironmentType: DeploymentTargetRoleType;
3141
- /**
3142
- * The list of targets to deploy to.
3143
- */
3144
- readonly awsDeploymentTargets: Array<AwsDeploymentTarget>;
3145
- /**
3146
- * Hold the deploy workflow so we can add to it in preSynth
3147
- */
3148
- buildWorkflow: BuildWorkflow;
3149
- /**
3150
- * Was this workflow created externally?
3151
- */
3152
- externalWorkflow: boolean;
3153
- /**
3154
- * Projects that should complete deployment before this one starts.
3155
- */
3156
- deployAfterTargets: Array<AwsDeploymentTarget>;
3157
- constructor(project: AwsCdkTypeScriptApp, options?: DeployWorkflowOptions);
3158
- setupNode: () => Array<JobStep>;
3159
- setupPnpm: () => Array<JobStep>;
3160
- /**
3161
- * Builds a GitHub Actions condition string that checks if the current branch
3162
- * matches any of the provided branch patterns.
3163
- *
3164
- * Handles both exact matches (e.g., "main") and glob patterns (e.g., "feature/*").
3165
- * Also allows workflow_dispatch (manual runs) to proceed.
3166
- *
3167
- * @param branches Array of GitBranch objects with branch patterns
3168
- * @returns Condition string or empty string if no branches provided
3169
- */
3170
- private buildBranchFilterCondition;
3171
- private deploySteps;
3172
- preSynthesize(): void;
3173
- }
3174
-
3175
3309
  /** Name of the gate job appended to build workflows (ADR 0004). */
3176
3310
  declare const COMPLETE_JOB_ID = "complete";
3177
3311
  /**
@@ -3185,5 +3319,5 @@ declare const COMPLETE_JOB_ID = "complete";
3185
3319
  */
3186
3320
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3187
3321
 
3188
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TYPE_LABELS, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, pnpmBundle, projenBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, turborepoBundle, typescriptBundle, vitestBundle };
3189
- export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, DeployWorkflowOptions, DeploymentMetadata, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, McpServerConfig, McpTransport, MergeMethod, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
3322
+ export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, AwsDeployWorkflow, AwsDeploymentConfig, AwsDeploymentTarget, AwsTeardownWorkflow, BUILT_IN_BUNDLES, CLAUDE_RULE_TARGET, COMPLETE_JOB_ID, DEFAULT_PRIORITY_LABELS, DEFAULT_STATUS_LABELS, DEFAULT_TEARDOWN_BRANCH_PATTERNS, DEFAULT_TYPE_LABELS, JsiiFaker, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, getLatestEligibleVersion, githubWorkflowBundle, jestBundle, meetingAnalysisBundle, orchestratorBundle, pnpmBundle, projenBundle, resolveModelAlias, resolveTemplateVariables, slackBundle, turborepoBundle, typescriptBundle, vitestBundle };
3323
+ export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, AwsDeploymentTargetOptions, AwsLocalDeploymentConfig, AwsOrganization, AwsRegion, AwsTeardownWorkflowOptions, CiDeploymentConfig, ClassTypeOptions, ClaudeAutoModeConfig, ClaudeHookAction, ClaudeHookEntry, ClaudeHooksConfig, ClaudePermissionsConfig, ClaudeRuleTarget, ClaudeSandboxConfig, ClaudeSettingsConfig, CopilotHandoff, CursorHookAction, CursorHooksConfig, CursorSettingsConfig, DeployWorkflowOptions, DeploymentMetadata, GitBranch, GitHubBoardMetadata, GitHubProjectMetadata, GitHubSprintMetadata, IDependencyResolver, LabelDefinition, McpServerConfig, McpTransport, MergeMethod, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };