@codedrifters/configulator 0.0.196 → 0.0.198

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
@@ -1799,6 +1799,15 @@ declare const VERSION: {
1799
1799
  * Version of Projen to use.
1800
1800
  */
1801
1801
  readonly PROJEN_VERSION: "0.99.48";
1802
+ /**
1803
+ * Version of sharp to pin for StarlightProject (required peer for
1804
+ * Starlight's image optimization pipeline).
1805
+ */
1806
+ readonly SHARP_VERSION: "0.34.5";
1807
+ /**
1808
+ * Version of @astrojs/starlight to pin for StarlightProject scaffolding.
1809
+ */
1810
+ readonly STARLIGHT_VERSION: "0.38.3";
1802
1811
  /**
1803
1812
  * What version of the turborepo library should we use?
1804
1813
  */
@@ -2462,88 +2471,6 @@ declare class AwsDeployWorkflow extends Component {
2462
2471
  preSynthesize(): void;
2463
2472
  }
2464
2473
 
2465
- /**
2466
- * Configuration options for AwsCdkProject.
2467
- *
2468
- * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
2469
- * throws otherwise. Configulator assumes a single-package repo is still a
2470
- * monorepo (with one workspace) so all conventions hold uniformly.
2471
- */
2472
- interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
2473
- /**
2474
- * AWS deployment targets (dev / stage / prod accounts and regions). Each
2475
- * entry creates an `AwsDeploymentTarget` component on the project.
2476
- */
2477
- readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
2478
- /**
2479
- * AWS deploy workflows. If omitted, one workflow is auto-generated per
2480
- * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
2481
- * workflow renders to its own `.github/workflows/*.yml` file.
2482
- *
2483
- * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
2484
- * supplying any workflows of your own — the array is truthy and short-circuits
2485
- * the default. Useful when you intend to attach deploy jobs to an existing
2486
- * build workflow yourself.
2487
- */
2488
- readonly deployWorkflows?: Array<DeployWorkflowOptions>;
2489
- /**
2490
- * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
2491
- * When set, every workflow generated from `deploymentTargets` re-uses this
2492
- * build workflow instead of creating its own. Default behavior (omit) is one
2493
- * separate yml file per stage type.
2494
- *
2495
- * Distinct from `buildWorkflow: boolean` inherited from
2496
- * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
2497
- * build workflow is generated at all.
2498
- */
2499
- readonly sharedBuildWorkflow?: BuildWorkflow;
2500
- /**
2501
- * Test runner to use.
2502
- *
2503
- * @default TestRunner.JEST
2504
- */
2505
- readonly testRunner?: TestRunner;
2506
- /**
2507
- * Options for Vitest (only used when testRunner is 'vitest').
2508
- */
2509
- readonly vitestOptions?: VitestOptions;
2510
- /**
2511
- * Enable the reset task that deletes all build artifacts.
2512
- *
2513
- * @default true
2514
- */
2515
- readonly resetTask?: boolean;
2516
- /**
2517
- * Options for the reset task.
2518
- */
2519
- readonly resetTaskOptions?: ResetTaskOptions;
2520
- /**
2521
- * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
2522
- * not inherited from the parent `MonorepoProject`.
2523
- *
2524
- * @default false
2525
- */
2526
- readonly agentConfig?: AgentConfigOptions | boolean;
2527
- }
2528
- /**
2529
- * AWS CDK TypeScript application with CodeDrifters conventions baked in.
2530
- *
2531
- * Always creates an `AwsDeploymentConfig` component (even with zero deployment
2532
- * targets) so the `synth` task is consistently rewritten to emit into
2533
- * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
2534
- * funnels every package's CDK output into one root-level `dist/` tree so
2535
- * GitHub Actions workflows can pass artifacts between jobs uniformly.
2536
- */
2537
- declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
2538
- constructor(userOptions: AwsCdkProjectOptions);
2539
- /**
2540
- * Add an AWS deployment target to this project after construction. The
2541
- * target is registered on the existing `AwsDeploymentConfig` and immediately
2542
- * available for `AwsDeployWorkflow` consumption.
2543
- */
2544
- addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
2545
- }
2546
-
2547
2474
  /**
2548
2475
  * Each of the below options corresponds to a task property found here:
2549
2476
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -3150,6 +3077,140 @@ declare class MonorepoProject extends TypeScriptAppProject {
3150
3077
  postSynthesize(): void;
3151
3078
  }
3152
3079
 
3080
+ /**
3081
+ * Default branch-delete patterns that trigger the teardown workflow.
3082
+ */
3083
+ declare const DEFAULT_TEARDOWN_BRANCH_PATTERNS: ReadonlyArray<string>;
3084
+ /**
3085
+ * Options for {@link AwsTeardownWorkflow}.
3086
+ */
3087
+ interface AwsTeardownWorkflowOptions {
3088
+ /**
3089
+ * Targets to scan for orphaned CloudFormation stacks.
3090
+ */
3091
+ readonly awsDestructionTargets: Array<AwsDeploymentTarget>;
3092
+ /**
3093
+ * Name of the tag containing the repo name. Used to find CloudFormation
3094
+ * stacks associated with this repo.
3095
+ */
3096
+ readonly repoTagName: string;
3097
+ /**
3098
+ * Name of the tag containing the stage type (e.g. dev, stage, prod).
3099
+ */
3100
+ readonly stageTypeTagName: string;
3101
+ /**
3102
+ * Name of the tag containing the environment type (e.g. primary, secondary).
3103
+ */
3104
+ readonly environmentTypeTagName: string;
3105
+ /**
3106
+ * Name of the tag where branch names are stored. Used to determine if a
3107
+ * stack is orphaned (no matching branch).
3108
+ */
3109
+ readonly branchNameTagName: string;
3110
+ /**
3111
+ * Branch patterns whose deletion triggers the teardown workflow.
3112
+ *
3113
+ * @default ["feat/*", "fix/*", "feature/*"]
3114
+ */
3115
+ readonly deleteBranchPatterns?: Array<string>;
3116
+ }
3117
+ /**
3118
+ * Scheduled GitHub Actions workflow that tears down orphaned CloudFormation
3119
+ * stacks whose associated branch no longer exists.
3120
+ */
3121
+ declare class AwsTeardownWorkflow extends Component {
3122
+ rootProject: MonorepoProject;
3123
+ constructor(rootProject: MonorepoProject, options: AwsTeardownWorkflowOptions);
3124
+ }
3125
+
3126
+ /**
3127
+ * Configuration options for AwsCdkProject.
3128
+ *
3129
+ * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
3130
+ * throws otherwise. Configulator assumes a single-package repo is still a
3131
+ * monorepo (with one workspace) so all conventions hold uniformly.
3132
+ */
3133
+ interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
3134
+ /**
3135
+ * AWS deployment targets (dev / stage / prod accounts and regions). Each
3136
+ * entry creates an `AwsDeploymentTarget` component on the project.
3137
+ */
3138
+ readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
3139
+ /**
3140
+ * AWS deploy workflows. If omitted, one workflow is auto-generated per
3141
+ * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
3142
+ * workflow renders to its own `.github/workflows/*.yml` file.
3143
+ *
3144
+ * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
3145
+ * supplying any workflows of your own — the array is truthy and short-circuits
3146
+ * the default. Useful when you intend to attach deploy jobs to an existing
3147
+ * build workflow yourself.
3148
+ */
3149
+ readonly deployWorkflows?: Array<DeployWorkflowOptions>;
3150
+ /**
3151
+ * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
3152
+ * When set, every workflow generated from `deploymentTargets` re-uses this
3153
+ * build workflow instead of creating its own. Default behavior (omit) is one
3154
+ * separate yml file per stage type.
3155
+ *
3156
+ * Distinct from `buildWorkflow: boolean` inherited from
3157
+ * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
3158
+ * build workflow is generated at all.
3159
+ */
3160
+ readonly sharedBuildWorkflow?: BuildWorkflow;
3161
+ /**
3162
+ * Test runner to use.
3163
+ *
3164
+ * @default TestRunner.JEST
3165
+ */
3166
+ readonly testRunner?: TestRunner;
3167
+ /**
3168
+ * Options for Vitest (only used when testRunner is 'vitest').
3169
+ */
3170
+ readonly vitestOptions?: VitestOptions;
3171
+ /**
3172
+ * Enable the reset task that deletes all build artifacts.
3173
+ *
3174
+ * @default true
3175
+ */
3176
+ readonly resetTask?: boolean;
3177
+ /**
3178
+ * Options for the reset task.
3179
+ */
3180
+ readonly resetTaskOptions?: ResetTaskOptions;
3181
+ /**
3182
+ * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
3183
+ * not inherited from the parent `MonorepoProject`.
3184
+ *
3185
+ * @default false
3186
+ */
3187
+ readonly agentConfig?: AgentConfigOptions | boolean;
3188
+ /**
3189
+ * Scheduled teardown workflow options. When provided, an `AwsTeardownWorkflow`
3190
+ * is attached to the parent `MonorepoProject` that periodically deletes
3191
+ * orphaned CloudFormation stacks whose branch no longer exists.
3192
+ */
3193
+ readonly teardownWorkflow?: AwsTeardownWorkflowOptions;
3194
+ }
3195
+ /**
3196
+ * AWS CDK TypeScript application with CodeDrifters conventions baked in.
3197
+ *
3198
+ * Always creates an `AwsDeploymentConfig` component (even with zero deployment
3199
+ * targets) so the `synth` task is consistently rewritten to emit into
3200
+ * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
3201
+ * funnels every package's CDK output into one root-level `dist/` tree so
3202
+ * GitHub Actions workflows can pass artifacts between jobs uniformly.
3203
+ */
3204
+ declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
3205
+ constructor(userOptions: AwsCdkProjectOptions);
3206
+ /**
3207
+ * Add an AWS deployment target to this project after construction. The
3208
+ * target is registered on the existing `AwsDeploymentConfig` and immediately
3209
+ * available for `AwsDeployWorkflow` consumption.
3210
+ */
3211
+ addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
3212
+ }
3213
+
3153
3214
  /**
3154
3215
  * Provides structured project metadata consumed by AgentConfig, skills,
3155
3216
  * and other configulator features at synthesis time.
@@ -3184,6 +3245,113 @@ declare class ProjectMetadata extends Component {
3184
3245
  private autoDetectRepository;
3185
3246
  }
3186
3247
 
3248
+ /**
3249
+ * A single Starlight social icon link.
3250
+ */
3251
+ interface StarlightSocialLink {
3252
+ readonly icon: string;
3253
+ readonly label: string;
3254
+ readonly href: string;
3255
+ }
3256
+ /**
3257
+ * Starlight logo configuration.
3258
+ */
3259
+ interface StarlightLogo {
3260
+ readonly src: string;
3261
+ readonly alt?: string;
3262
+ }
3263
+ /**
3264
+ * Starlight edit-link configuration.
3265
+ */
3266
+ interface StarlightEditLink {
3267
+ readonly baseUrl: string;
3268
+ }
3269
+ /**
3270
+ * Sidebar item accepted by Starlight's `sidebar` config. Covers the four
3271
+ * common shapes: link, group with nested items, autogenerated group, and
3272
+ * internal slug reference.
3273
+ */
3274
+ type StarlightSidebarItem = {
3275
+ readonly label: string;
3276
+ readonly link: string;
3277
+ readonly badge?: string | {
3278
+ readonly text: string;
3279
+ readonly variant?: string;
3280
+ };
3281
+ } | {
3282
+ readonly label: string;
3283
+ readonly items: ReadonlyArray<StarlightSidebarItem>;
3284
+ } | {
3285
+ readonly label: string;
3286
+ readonly autogenerate: {
3287
+ readonly directory: string;
3288
+ readonly collapsed?: boolean;
3289
+ };
3290
+ } | {
3291
+ readonly label: string;
3292
+ readonly slug: string;
3293
+ };
3294
+ /**
3295
+ * Configuration options for StarlightProject.
3296
+ */
3297
+ interface StarlightProjectOptions extends AstroProjectOptions {
3298
+ /**
3299
+ * Starlight site title (required).
3300
+ */
3301
+ readonly starlightTitle: string;
3302
+ /**
3303
+ * Starlight site description.
3304
+ */
3305
+ readonly starlightDescription?: string;
3306
+ /**
3307
+ * Social links rendered in the Starlight header.
3308
+ */
3309
+ readonly social?: ReadonlyArray<StarlightSocialLink>;
3310
+ /**
3311
+ * Sidebar config (passed through verbatim). When omitted, Starlight
3312
+ * autogenerates the sidebar from the `src/content/docs/` tree.
3313
+ */
3314
+ readonly sidebar?: ReadonlyArray<StarlightSidebarItem>;
3315
+ /**
3316
+ * Custom CSS files loaded by Starlight.
3317
+ */
3318
+ readonly customCss?: ReadonlyArray<string>;
3319
+ /**
3320
+ * Site logo displayed in the Starlight header.
3321
+ */
3322
+ readonly logo?: StarlightLogo;
3323
+ /**
3324
+ * "Edit this page" link configuration.
3325
+ */
3326
+ readonly editLink?: StarlightEditLink;
3327
+ /**
3328
+ * @astrojs/starlight package version.
3329
+ *
3330
+ * @default VERSION.STARLIGHT_VERSION
3331
+ */
3332
+ readonly starlightVersion?: string;
3333
+ /**
3334
+ * sharp package version (required peer for Starlight's image pipeline).
3335
+ *
3336
+ * @default VERSION.SHARP_VERSION
3337
+ */
3338
+ readonly sharpVersion?: string;
3339
+ /**
3340
+ * Emit sample Starlight content (`src/content/docs/index.mdx`,
3341
+ * `src/content/config.ts`).
3342
+ *
3343
+ * @default false
3344
+ */
3345
+ readonly sampleContent?: boolean;
3346
+ }
3347
+ /**
3348
+ * Docs site scaffolded on top of {@link AstroProject} using the
3349
+ * Starlight Astro integration.
3350
+ */
3351
+ declare class StarlightProject extends AstroProject {
3352
+ constructor(userOptions: StarlightProjectOptions);
3353
+ }
3354
+
3187
3355
  /*******************************************************************************
3188
3356
  *
3189
3357
  * Update / customize typescript configs for a project.
@@ -3218,4 +3386,4 @@ declare const COMPLETE_JOB_ID = "complete";
3218
3386
  */
3219
3387
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3220
3388
 
3221
- 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, 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 };
3389
+ 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 StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightSidebarItem, type StarlightSocialLink, 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 };