@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.ts CHANGED
@@ -3,7 +3,7 @@ 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';
@@ -1848,6 +1848,15 @@ declare const VERSION: {
1848
1848
  * Version of Projen to use.
1849
1849
  */
1850
1850
  readonly PROJEN_VERSION: "0.99.48";
1851
+ /**
1852
+ * Version of sharp to pin for StarlightProject (required peer for
1853
+ * Starlight's image optimization pipeline).
1854
+ */
1855
+ readonly SHARP_VERSION: "0.34.5";
1856
+ /**
1857
+ * Version of @astrojs/starlight to pin for StarlightProject scaffolding.
1858
+ */
1859
+ readonly STARLIGHT_VERSION: "0.38.3";
1851
1860
  /**
1852
1861
  * What version of the turborepo library should we use?
1853
1862
  */
@@ -2511,88 +2520,6 @@ declare class AwsDeployWorkflow extends Component {
2511
2520
  preSynthesize(): void;
2512
2521
  }
2513
2522
 
2514
- /**
2515
- * Configuration options for AwsCdkProject.
2516
- *
2517
- * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
2518
- * throws otherwise. Configulator assumes a single-package repo is still a
2519
- * monorepo (with one workspace) so all conventions hold uniformly.
2520
- */
2521
- interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
2522
- /**
2523
- * AWS deployment targets (dev / stage / prod accounts and regions). Each
2524
- * entry creates an `AwsDeploymentTarget` component on the project.
2525
- */
2526
- readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
2527
- /**
2528
- * AWS deploy workflows. If omitted, one workflow is auto-generated per
2529
- * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
2530
- * workflow renders to its own `.github/workflows/*.yml` file.
2531
- *
2532
- * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
2533
- * supplying any workflows of your own — the array is truthy and short-circuits
2534
- * the default. Useful when you intend to attach deploy jobs to an existing
2535
- * build workflow yourself.
2536
- */
2537
- readonly deployWorkflows?: Array<DeployWorkflowOptions>;
2538
- /**
2539
- * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
2540
- * When set, every workflow generated from `deploymentTargets` re-uses this
2541
- * build workflow instead of creating its own. Default behavior (omit) is one
2542
- * separate yml file per stage type.
2543
- *
2544
- * Distinct from `buildWorkflow: boolean` inherited from
2545
- * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
2546
- * build workflow is generated at all.
2547
- */
2548
- readonly sharedBuildWorkflow?: BuildWorkflow;
2549
- /**
2550
- * Test runner to use.
2551
- *
2552
- * @default TestRunner.JEST
2553
- */
2554
- readonly testRunner?: TestRunner;
2555
- /**
2556
- * Options for Vitest (only used when testRunner is 'vitest').
2557
- */
2558
- readonly vitestOptions?: VitestOptions;
2559
- /**
2560
- * Enable the reset task that deletes all build artifacts.
2561
- *
2562
- * @default true
2563
- */
2564
- readonly resetTask?: boolean;
2565
- /**
2566
- * Options for the reset task.
2567
- */
2568
- readonly resetTaskOptions?: ResetTaskOptions;
2569
- /**
2570
- * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
2571
- * not inherited from the parent `MonorepoProject`.
2572
- *
2573
- * @default false
2574
- */
2575
- readonly agentConfig?: AgentConfigOptions | boolean;
2576
- }
2577
- /**
2578
- * AWS CDK TypeScript application with CodeDrifters conventions baked in.
2579
- *
2580
- * Always creates an `AwsDeploymentConfig` component (even with zero deployment
2581
- * targets) so the `synth` task is consistently rewritten to emit into
2582
- * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
2583
- * funnels every package's CDK output into one root-level `dist/` tree so
2584
- * GitHub Actions workflows can pass artifacts between jobs uniformly.
2585
- */
2586
- declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
2587
- constructor(userOptions: AwsCdkProjectOptions);
2588
- /**
2589
- * Add an AWS deployment target to this project after construction. The
2590
- * target is registered on the existing `AwsDeploymentConfig` and immediately
2591
- * available for `AwsDeployWorkflow` consumption.
2592
- */
2593
- addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
2594
- }
2595
-
2596
2523
  /**
2597
2524
  * Each of the below options corresponds to a task property found here:
2598
2525
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -3199,6 +3126,140 @@ declare class MonorepoProject extends TypeScriptAppProject {
3199
3126
  postSynthesize(): void;
3200
3127
  }
3201
3128
 
3129
+ /**
3130
+ * Default branch-delete patterns that trigger the teardown workflow.
3131
+ */
3132
+ declare const DEFAULT_TEARDOWN_BRANCH_PATTERNS: ReadonlyArray<string>;
3133
+ /**
3134
+ * Options for {@link AwsTeardownWorkflow}.
3135
+ */
3136
+ interface AwsTeardownWorkflowOptions {
3137
+ /**
3138
+ * Targets to scan for orphaned CloudFormation stacks.
3139
+ */
3140
+ readonly awsDestructionTargets: Array<AwsDeploymentTarget>;
3141
+ /**
3142
+ * Name of the tag containing the repo name. Used to find CloudFormation
3143
+ * stacks associated with this repo.
3144
+ */
3145
+ readonly repoTagName: string;
3146
+ /**
3147
+ * Name of the tag containing the stage type (e.g. dev, stage, prod).
3148
+ */
3149
+ readonly stageTypeTagName: string;
3150
+ /**
3151
+ * Name of the tag containing the environment type (e.g. primary, secondary).
3152
+ */
3153
+ readonly environmentTypeTagName: string;
3154
+ /**
3155
+ * Name of the tag where branch names are stored. Used to determine if a
3156
+ * stack is orphaned (no matching branch).
3157
+ */
3158
+ readonly branchNameTagName: string;
3159
+ /**
3160
+ * Branch patterns whose deletion triggers the teardown workflow.
3161
+ *
3162
+ * @default ["feat/*", "fix/*", "feature/*"]
3163
+ */
3164
+ readonly deleteBranchPatterns?: Array<string>;
3165
+ }
3166
+ /**
3167
+ * Scheduled GitHub Actions workflow that tears down orphaned CloudFormation
3168
+ * stacks whose associated branch no longer exists.
3169
+ */
3170
+ declare class AwsTeardownWorkflow extends Component {
3171
+ rootProject: MonorepoProject;
3172
+ constructor(rootProject: MonorepoProject, options: AwsTeardownWorkflowOptions);
3173
+ }
3174
+
3175
+ /**
3176
+ * Configuration options for AwsCdkProject.
3177
+ *
3178
+ * AwsCdkProject must be parented to a `MonorepoProject` — the constructor
3179
+ * throws otherwise. Configulator assumes a single-package repo is still a
3180
+ * monorepo (with one workspace) so all conventions hold uniformly.
3181
+ */
3182
+ interface AwsCdkProjectOptions extends Omit<awscdk.AwsCdkTypeScriptAppOptions, "defaultReleaseBranch"> {
3183
+ /**
3184
+ * AWS deployment targets (dev / stage / prod accounts and regions). Each
3185
+ * entry creates an `AwsDeploymentTarget` component on the project.
3186
+ */
3187
+ readonly deploymentTargets?: Array<AwsDeploymentTargetOptions>;
3188
+ /**
3189
+ * AWS deploy workflows. If omitted, one workflow is auto-generated per
3190
+ * unique `awsStageType` present in `deploymentTargets`. Each auto-generated
3191
+ * workflow renders to its own `.github/workflows/*.yml` file.
3192
+ *
3193
+ * Pass an empty array (`[]`) to opt out of auto-derivation entirely without
3194
+ * supplying any workflows of your own — the array is truthy and short-circuits
3195
+ * the default. Useful when you intend to attach deploy jobs to an existing
3196
+ * build workflow yourself.
3197
+ */
3198
+ readonly deployWorkflows?: Array<DeployWorkflowOptions>;
3199
+ /**
3200
+ * Optional shared `BuildWorkflow` to attach all auto-derived deploy jobs to.
3201
+ * When set, every workflow generated from `deploymentTargets` re-uses this
3202
+ * build workflow instead of creating its own. Default behavior (omit) is one
3203
+ * separate yml file per stage type.
3204
+ *
3205
+ * Distinct from `buildWorkflow: boolean` inherited from
3206
+ * `AwsCdkTypeScriptAppOptions`, which toggles whether the projen-managed
3207
+ * build workflow is generated at all.
3208
+ */
3209
+ readonly sharedBuildWorkflow?: BuildWorkflow;
3210
+ /**
3211
+ * Test runner to use.
3212
+ *
3213
+ * @default TestRunner.JEST
3214
+ */
3215
+ readonly testRunner?: TestRunner;
3216
+ /**
3217
+ * Options for Vitest (only used when testRunner is 'vitest').
3218
+ */
3219
+ readonly vitestOptions?: VitestOptions;
3220
+ /**
3221
+ * Enable the reset task that deletes all build artifacts.
3222
+ *
3223
+ * @default true
3224
+ */
3225
+ readonly resetTask?: boolean;
3226
+ /**
3227
+ * Options for the reset task.
3228
+ */
3229
+ readonly resetTaskOptions?: ResetTaskOptions;
3230
+ /**
3231
+ * AI agent configuration (Cursor, Claude Code rules). Opt-in per project;
3232
+ * not inherited from the parent `MonorepoProject`.
3233
+ *
3234
+ * @default false
3235
+ */
3236
+ readonly agentConfig?: AgentConfigOptions | boolean;
3237
+ /**
3238
+ * Scheduled teardown workflow options. When provided, an `AwsTeardownWorkflow`
3239
+ * is attached to the parent `MonorepoProject` that periodically deletes
3240
+ * orphaned CloudFormation stacks whose branch no longer exists.
3241
+ */
3242
+ readonly teardownWorkflow?: AwsTeardownWorkflowOptions;
3243
+ }
3244
+ /**
3245
+ * AWS CDK TypeScript application with CodeDrifters conventions baked in.
3246
+ *
3247
+ * Always creates an `AwsDeploymentConfig` component (even with zero deployment
3248
+ * targets) so the `synth` task is consistently rewritten to emit into
3249
+ * `dist/<project-path>/cdk.out`. This is intentional and not opt-out: it
3250
+ * funnels every package's CDK output into one root-level `dist/` tree so
3251
+ * GitHub Actions workflows can pass artifacts between jobs uniformly.
3252
+ */
3253
+ declare class AwsCdkProject extends awscdk.AwsCdkTypeScriptApp {
3254
+ constructor(userOptions: AwsCdkProjectOptions);
3255
+ /**
3256
+ * Add an AWS deployment target to this project after construction. The
3257
+ * target is registered on the existing `AwsDeploymentConfig` and immediately
3258
+ * available for `AwsDeployWorkflow` consumption.
3259
+ */
3260
+ addDeploymentTarget(options: AwsDeploymentTargetOptions): AwsDeploymentTarget;
3261
+ }
3262
+
3202
3263
  /**
3203
3264
  * Provides structured project metadata consumed by AgentConfig, skills,
3204
3265
  * and other configulator features at synthesis time.
@@ -3233,6 +3294,113 @@ declare class ProjectMetadata extends Component {
3233
3294
  private autoDetectRepository;
3234
3295
  }
3235
3296
 
3297
+ /**
3298
+ * A single Starlight social icon link.
3299
+ */
3300
+ interface StarlightSocialLink {
3301
+ readonly icon: string;
3302
+ readonly label: string;
3303
+ readonly href: string;
3304
+ }
3305
+ /**
3306
+ * Starlight logo configuration.
3307
+ */
3308
+ interface StarlightLogo {
3309
+ readonly src: string;
3310
+ readonly alt?: string;
3311
+ }
3312
+ /**
3313
+ * Starlight edit-link configuration.
3314
+ */
3315
+ interface StarlightEditLink {
3316
+ readonly baseUrl: string;
3317
+ }
3318
+ /**
3319
+ * Sidebar item accepted by Starlight's `sidebar` config. Covers the four
3320
+ * common shapes: link, group with nested items, autogenerated group, and
3321
+ * internal slug reference.
3322
+ */
3323
+ type StarlightSidebarItem = {
3324
+ readonly label: string;
3325
+ readonly link: string;
3326
+ readonly badge?: string | {
3327
+ readonly text: string;
3328
+ readonly variant?: string;
3329
+ };
3330
+ } | {
3331
+ readonly label: string;
3332
+ readonly items: ReadonlyArray<StarlightSidebarItem>;
3333
+ } | {
3334
+ readonly label: string;
3335
+ readonly autogenerate: {
3336
+ readonly directory: string;
3337
+ readonly collapsed?: boolean;
3338
+ };
3339
+ } | {
3340
+ readonly label: string;
3341
+ readonly slug: string;
3342
+ };
3343
+ /**
3344
+ * Configuration options for StarlightProject.
3345
+ */
3346
+ interface StarlightProjectOptions extends AstroProjectOptions {
3347
+ /**
3348
+ * Starlight site title (required).
3349
+ */
3350
+ readonly starlightTitle: string;
3351
+ /**
3352
+ * Starlight site description.
3353
+ */
3354
+ readonly starlightDescription?: string;
3355
+ /**
3356
+ * Social links rendered in the Starlight header.
3357
+ */
3358
+ readonly social?: ReadonlyArray<StarlightSocialLink>;
3359
+ /**
3360
+ * Sidebar config (passed through verbatim). When omitted, Starlight
3361
+ * autogenerates the sidebar from the `src/content/docs/` tree.
3362
+ */
3363
+ readonly sidebar?: ReadonlyArray<StarlightSidebarItem>;
3364
+ /**
3365
+ * Custom CSS files loaded by Starlight.
3366
+ */
3367
+ readonly customCss?: ReadonlyArray<string>;
3368
+ /**
3369
+ * Site logo displayed in the Starlight header.
3370
+ */
3371
+ readonly logo?: StarlightLogo;
3372
+ /**
3373
+ * "Edit this page" link configuration.
3374
+ */
3375
+ readonly editLink?: StarlightEditLink;
3376
+ /**
3377
+ * @astrojs/starlight package version.
3378
+ *
3379
+ * @default VERSION.STARLIGHT_VERSION
3380
+ */
3381
+ readonly starlightVersion?: string;
3382
+ /**
3383
+ * sharp package version (required peer for Starlight's image pipeline).
3384
+ *
3385
+ * @default VERSION.SHARP_VERSION
3386
+ */
3387
+ readonly sharpVersion?: string;
3388
+ /**
3389
+ * Emit sample Starlight content (`src/content/docs/index.mdx`,
3390
+ * `src/content/config.ts`).
3391
+ *
3392
+ * @default false
3393
+ */
3394
+ readonly sampleContent?: boolean;
3395
+ }
3396
+ /**
3397
+ * Docs site scaffolded on top of {@link AstroProject} using the
3398
+ * Starlight Astro integration.
3399
+ */
3400
+ declare class StarlightProject extends AstroProject {
3401
+ constructor(userOptions: StarlightProjectOptions);
3402
+ }
3403
+
3236
3404
  /*******************************************************************************
3237
3405
  *
3238
3406
  * Update / customize typescript configs for a project.
@@ -3267,5 +3435,5 @@ declare const COMPLETE_JOB_ID = "complete";
3267
3435
  */
3268
3436
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3269
3437
 
3270
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, AstroConfig, AstroOutput, AstroProject, AwsCdkProject, 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 };
3271
- export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, AstroConfigOptions, AstroIntegrationSpec, AstroProjectOptions, AwsAccount, AwsCdkProjectOptions, 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 };
3438
+ 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, StarlightProject, 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 };
3439
+ 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, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightSidebarItem, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };