@codedrifters/configulator 0.0.192 → 0.0.193

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
@@ -1315,6 +1315,100 @@ interface TemplateResolveResult {
1315
1315
  */
1316
1316
  declare function resolveTemplateVariables(template: string, metadata: ResolvedProjectMetadata | undefined): TemplateResolveResult;
1317
1317
 
1318
+ /**
1319
+ * Astro output mode.
1320
+ *
1321
+ * @see https://docs.astro.build/en/reference/configuration-reference/#output
1322
+ */
1323
+ declare const AstroOutput: {
1324
+ readonly STATIC: "static";
1325
+ readonly SERVER: "server";
1326
+ readonly HYBRID: "hybrid";
1327
+ };
1328
+ type AstroOutput = (typeof AstroOutput)[keyof typeof AstroOutput];
1329
+ /**
1330
+ * Declarative spec for an Astro integration or adapter import.
1331
+ *
1332
+ * Rendered into `astro.config.mjs` as an import plus an invocation in
1333
+ * the `integrations` array (or as the `adapter` field).
1334
+ */
1335
+ interface AstroIntegrationSpec {
1336
+ /**
1337
+ * Local binding used in the generated config, e.g. "react".
1338
+ */
1339
+ readonly name: string;
1340
+ /**
1341
+ * Module to import from, e.g. "@astrojs/react".
1342
+ */
1343
+ readonly importPath: string;
1344
+ /**
1345
+ * Raw argument expression passed to the integration call.
1346
+ *
1347
+ * Written verbatim inside the parentheses, e.g. `"{ include: ['**\/*.tsx'] }"`.
1348
+ * When omitted the integration is invoked with no arguments.
1349
+ */
1350
+ readonly args?: string;
1351
+ /**
1352
+ * When true, use a default import (`import name from ...`).
1353
+ * When false or omitted, use a named import (`import { name } from ...`).
1354
+ *
1355
+ * @default true
1356
+ */
1357
+ readonly defaultImport?: boolean;
1358
+ }
1359
+ /**
1360
+ * Options controlling the rendered `astro.config.mjs`.
1361
+ */
1362
+ interface AstroConfigOptions {
1363
+ /**
1364
+ * Site URL (used for canonical URLs, sitemaps, RSS).
1365
+ */
1366
+ readonly site?: string;
1367
+ /**
1368
+ * Base path the site is deployed under.
1369
+ */
1370
+ readonly base?: string;
1371
+ /**
1372
+ * Output mode.
1373
+ *
1374
+ * @default AstroOutput.STATIC
1375
+ */
1376
+ readonly output?: AstroOutput;
1377
+ /**
1378
+ * Integrations rendered into the `integrations` array.
1379
+ */
1380
+ readonly integrations?: Array<AstroIntegrationSpec>;
1381
+ /**
1382
+ * SSR adapter rendered into the `adapter` field.
1383
+ */
1384
+ readonly adapter?: AstroIntegrationSpec;
1385
+ }
1386
+
1387
+ /**
1388
+ * Renders `astro.config.mjs` for an Astro project.
1389
+ */
1390
+ declare class AstroConfig extends Component {
1391
+ readonly project: NodeProject;
1392
+ /**
1393
+ * Find the AstroConfig component on a project.
1394
+ */
1395
+ static of(project: NodeProject): AstroConfig | undefined;
1396
+ private readonly configFilePath;
1397
+ private readonly site?;
1398
+ private readonly base?;
1399
+ private readonly output?;
1400
+ private readonly integrations;
1401
+ private readonly adapter?;
1402
+ constructor(project: NodeProject, options?: AstroConfigOptions);
1403
+ /**
1404
+ * Render the config file contents as an array of lines.
1405
+ *
1406
+ * Exposed for unit testing — `synthesizeConfig` writes these to disk.
1407
+ */
1408
+ renderConfig(): Array<string>;
1409
+ private synthesizeConfig;
1410
+ }
1411
+
1318
1412
  /*******************************************************************************
1319
1413
  *
1320
1414
  * Git configs for this repo. This venn diagram has a great deal of overlap
@@ -1673,6 +1767,10 @@ interface AwsOrganization {
1673
1767
  declare function getLatestEligibleVersion(packageName: string, minimumReleaseAgeMinutes: number): Promise<string | null>;
1674
1768
 
1675
1769
  declare const VERSION: {
1770
+ /**
1771
+ * Version of Astro to pin for AstroProject scaffolding.
1772
+ */
1773
+ readonly ASTRO_VERSION: "5.14.1";
1676
1774
  /**
1677
1775
  * CDK CLI for workflows and command line operations.
1678
1776
  *
@@ -2097,6 +2195,192 @@ declare class ResetTask extends Component {
2097
2195
  constructor(project: Project$1, options?: ResetTaskOptions);
2098
2196
  }
2099
2197
 
2198
+ /**
2199
+ * Options for the Vitest config (test block in vitest.config).
2200
+ *
2201
+ * @see https://vitest.dev/config/
2202
+ */
2203
+ interface VitestConfigOptions {
2204
+ /**
2205
+ * Glob patterns for test files.
2206
+ *
2207
+ * @default ["**\/*.{test,spec}.?(c|m)[jt]s?(x)"]
2208
+ */
2209
+ readonly include?: string[];
2210
+ /**
2211
+ * Glob patterns to exclude from test files.
2212
+ *
2213
+ * @default ["**\/node_modules\/**", "**\/dist\/**", "**\/lib\/**", "**\/.?\*"]
2214
+ */
2215
+ readonly exclude?: string[];
2216
+ /**
2217
+ * Test environment.
2218
+ *
2219
+ * @default "node"
2220
+ */
2221
+ readonly environment?: "node" | "jsdom" | "happy-dom" | "edge-runtime";
2222
+ /**
2223
+ * Do not fail when no tests are found.
2224
+ *
2225
+ * @default true
2226
+ */
2227
+ readonly passWithNoTests?: boolean;
2228
+ /**
2229
+ * Enable coverage collection.
2230
+ *
2231
+ * @default true
2232
+ */
2233
+ readonly coverageEnabled?: boolean;
2234
+ /**
2235
+ * Coverage reports directory.
2236
+ *
2237
+ * @default "coverage"
2238
+ */
2239
+ readonly coverageDirectory?: string;
2240
+ /**
2241
+ * Coverage reporters.
2242
+ *
2243
+ * @default ["text", "lcov"]
2244
+ */
2245
+ readonly coverageReporters?: string[];
2246
+ }
2247
+ /**
2248
+ * Options for the Vitest component.
2249
+ */
2250
+ interface VitestOptions {
2251
+ /**
2252
+ * Config file path.
2253
+ *
2254
+ * @default "vitest.config.ts"
2255
+ */
2256
+ readonly configFilePath?: string;
2257
+ /**
2258
+ * Vitest config (test block).
2259
+ */
2260
+ readonly config?: VitestConfigOptions;
2261
+ /**
2262
+ * Vitest version (overrides VERSION.VITEST_VERSION).
2263
+ */
2264
+ readonly vitestVersion?: string;
2265
+ }
2266
+ /**
2267
+ * Vitest component for Node/TypeScript projects.
2268
+ *
2269
+ * Adds Vitest as the test runner: devDeps, vitest.config.ts, and test/watch tasks.
2270
+ * Incompatible with Jest; use jest: false when constructing the project.
2271
+ */
2272
+ declare class Vitest extends Component {
2273
+ readonly project: NodeProject;
2274
+ /**
2275
+ * Find the Vitest component on a project.
2276
+ */
2277
+ static of(project: NodeProject): Vitest | undefined;
2278
+ private readonly configFilePath;
2279
+ private readonly include;
2280
+ private readonly exclude;
2281
+ private readonly environment;
2282
+ private readonly passWithNoTests;
2283
+ private readonly coverageEnabled;
2284
+ private readonly coverageDirectory;
2285
+ private readonly coverageReporters;
2286
+ private readonly version;
2287
+ constructor(project: NodeProject, options?: VitestOptions);
2288
+ preSynthesize(): void;
2289
+ private addTestTasks;
2290
+ private synthesizeConfig;
2291
+ private renderConfig;
2292
+ }
2293
+
2294
+ /**
2295
+ * Test runner for TypeScript projects.
2296
+ */
2297
+ declare const TestRunner: {
2298
+ readonly JEST: "jest";
2299
+ readonly VITEST: "vitest";
2300
+ };
2301
+ type TestRunner = (typeof TestRunner)[keyof typeof TestRunner];
2302
+ /**
2303
+ * Configuration options for TypeScriptProject.
2304
+ */
2305
+ interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOptions, "defaultReleaseBranch"> {
2306
+ /**
2307
+ * Test runner to use.
2308
+ *
2309
+ * @default TestRunner.JEST
2310
+ */
2311
+ readonly testRunner?: TestRunner;
2312
+ /**
2313
+ * Options for Vitest (only used when testRunner is 'vitest').
2314
+ */
2315
+ readonly vitestOptions?: VitestOptions;
2316
+ /**
2317
+ * Enable the reset task that deletes all build artifacts.
2318
+ *
2319
+ * @default true
2320
+ */
2321
+ readonly resetTask?: boolean;
2322
+ /**
2323
+ * Options for the reset task.
2324
+ */
2325
+ readonly resetTaskOptions?: ResetTaskOptions;
2326
+ /**
2327
+ * AI agent configuration (Cursor, Claude Code rules).
2328
+ * Generates rule files with auto-detected bundles based on project tooling.
2329
+ *
2330
+ * - `true` or `{}`: enable with auto-detected defaults
2331
+ * - `AgentConfigOptions`: enable with explicit configuration
2332
+ * - `false` or `undefined`: disabled (default)
2333
+ *
2334
+ * Sub-projects do not inherit `AgentConfig` from their parent
2335
+ * `MonorepoProject`. Agent rule files are rendered only on projects that
2336
+ * explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
2337
+ * `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
2338
+ *
2339
+ * @default false
2340
+ */
2341
+ readonly agentConfig?: AgentConfigOptions | boolean;
2342
+ }
2343
+ declare class TypeScriptProject extends typescript.TypeScriptProject {
2344
+ constructor(userOptions: TypeScriptProjectOptions);
2345
+ }
2346
+
2347
+ /**
2348
+ * Configuration options for AstroProject.
2349
+ */
2350
+ interface AstroProjectOptions extends TypeScriptProjectOptions, AstroConfigOptions {
2351
+ /**
2352
+ * Astro package version.
2353
+ *
2354
+ * @default VERSION.ASTRO_VERSION
2355
+ */
2356
+ readonly astroVersion?: string;
2357
+ /**
2358
+ * Emit sample Astro starter files (`src/pages/index.astro`, `public/favicon.svg`).
2359
+ *
2360
+ * @default false
2361
+ */
2362
+ readonly sampleCode?: boolean;
2363
+ /**
2364
+ * Astro tsconfig preset to extend.
2365
+ *
2366
+ * @default "astro/tsconfigs/strict"
2367
+ */
2368
+ readonly astroTsconfigExtends?: string;
2369
+ }
2370
+ /**
2371
+ * Minimal Astro site scaffolded on top of {@link TypeScriptProject}.
2372
+ *
2373
+ * Replaces the `tsc` compile step with `astro check && astro build`, writes
2374
+ * `astro.config.mjs`, sets `"type": "module"`, and wires dev/preview tasks.
2375
+ */
2376
+ declare class AstroProject extends TypeScriptProject {
2377
+ /**
2378
+ * Rendered Astro config component.
2379
+ */
2380
+ readonly astroConfig: AstroConfig;
2381
+ constructor(userOptions: AstroProjectOptions);
2382
+ }
2383
+
2100
2384
  /**
2101
2385
  * Each of the below options corresponds to a task property found here:
2102
2386
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -2737,155 +3021,6 @@ declare class ProjectMetadata extends Component {
2737
3021
  private autoDetectRepository;
2738
3022
  }
2739
3023
 
2740
- /**
2741
- * Options for the Vitest config (test block in vitest.config).
2742
- *
2743
- * @see https://vitest.dev/config/
2744
- */
2745
- interface VitestConfigOptions {
2746
- /**
2747
- * Glob patterns for test files.
2748
- *
2749
- * @default ["**\/*.{test,spec}.?(c|m)[jt]s?(x)"]
2750
- */
2751
- readonly include?: string[];
2752
- /**
2753
- * Glob patterns to exclude from test files.
2754
- *
2755
- * @default ["**\/node_modules\/**", "**\/dist\/**", "**\/lib\/**", "**\/.?\*"]
2756
- */
2757
- readonly exclude?: string[];
2758
- /**
2759
- * Test environment.
2760
- *
2761
- * @default "node"
2762
- */
2763
- readonly environment?: "node" | "jsdom" | "happy-dom" | "edge-runtime";
2764
- /**
2765
- * Do not fail when no tests are found.
2766
- *
2767
- * @default true
2768
- */
2769
- readonly passWithNoTests?: boolean;
2770
- /**
2771
- * Enable coverage collection.
2772
- *
2773
- * @default true
2774
- */
2775
- readonly coverageEnabled?: boolean;
2776
- /**
2777
- * Coverage reports directory.
2778
- *
2779
- * @default "coverage"
2780
- */
2781
- readonly coverageDirectory?: string;
2782
- /**
2783
- * Coverage reporters.
2784
- *
2785
- * @default ["text", "lcov"]
2786
- */
2787
- readonly coverageReporters?: string[];
2788
- }
2789
- /**
2790
- * Options for the Vitest component.
2791
- */
2792
- interface VitestOptions {
2793
- /**
2794
- * Config file path.
2795
- *
2796
- * @default "vitest.config.ts"
2797
- */
2798
- readonly configFilePath?: string;
2799
- /**
2800
- * Vitest config (test block).
2801
- */
2802
- readonly config?: VitestConfigOptions;
2803
- /**
2804
- * Vitest version (overrides VERSION.VITEST_VERSION).
2805
- */
2806
- readonly vitestVersion?: string;
2807
- }
2808
- /**
2809
- * Vitest component for Node/TypeScript projects.
2810
- *
2811
- * Adds Vitest as the test runner: devDeps, vitest.config.ts, and test/watch tasks.
2812
- * Incompatible with Jest; use jest: false when constructing the project.
2813
- */
2814
- declare class Vitest extends Component {
2815
- readonly project: NodeProject;
2816
- /**
2817
- * Find the Vitest component on a project.
2818
- */
2819
- static of(project: NodeProject): Vitest | undefined;
2820
- private readonly configFilePath;
2821
- private readonly include;
2822
- private readonly exclude;
2823
- private readonly environment;
2824
- private readonly passWithNoTests;
2825
- private readonly coverageEnabled;
2826
- private readonly coverageDirectory;
2827
- private readonly coverageReporters;
2828
- private readonly version;
2829
- constructor(project: NodeProject, options?: VitestOptions);
2830
- preSynthesize(): void;
2831
- private addTestTasks;
2832
- private synthesizeConfig;
2833
- private renderConfig;
2834
- }
2835
-
2836
- /**
2837
- * Test runner for TypeScript projects.
2838
- */
2839
- declare const TestRunner: {
2840
- readonly JEST: "jest";
2841
- readonly VITEST: "vitest";
2842
- };
2843
- type TestRunner = (typeof TestRunner)[keyof typeof TestRunner];
2844
- /**
2845
- * Configuration options for TypeScriptProject.
2846
- */
2847
- interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOptions, "defaultReleaseBranch"> {
2848
- /**
2849
- * Test runner to use.
2850
- *
2851
- * @default TestRunner.JEST
2852
- */
2853
- readonly testRunner?: TestRunner;
2854
- /**
2855
- * Options for Vitest (only used when testRunner is 'vitest').
2856
- */
2857
- readonly vitestOptions?: VitestOptions;
2858
- /**
2859
- * Enable the reset task that deletes all build artifacts.
2860
- *
2861
- * @default true
2862
- */
2863
- readonly resetTask?: boolean;
2864
- /**
2865
- * Options for the reset task.
2866
- */
2867
- readonly resetTaskOptions?: ResetTaskOptions;
2868
- /**
2869
- * AI agent configuration (Cursor, Claude Code rules).
2870
- * Generates rule files with auto-detected bundles based on project tooling.
2871
- *
2872
- * - `true` or `{}`: enable with auto-detected defaults
2873
- * - `AgentConfigOptions`: enable with explicit configuration
2874
- * - `false` or `undefined`: disabled (default)
2875
- *
2876
- * Sub-projects do not inherit `AgentConfig` from their parent
2877
- * `MonorepoProject`. Agent rule files are rendered only on projects that
2878
- * explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
2879
- * `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
2880
- *
2881
- * @default false
2882
- */
2883
- readonly agentConfig?: AgentConfigOptions | boolean;
2884
- }
2885
- declare class TypeScriptProject extends typescript.TypeScriptProject {
2886
- constructor(userOptions: TypeScriptProjectOptions);
2887
- }
2888
-
2889
3024
  /*******************************************************************************
2890
3025
  *
2891
3026
  * Update / customize typescript configs for a project.
@@ -3001,4 +3136,4 @@ declare const COMPLETE_JOB_ID = "complete";
3001
3136
  */
3002
3137
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3003
3138
 
3004
- 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, 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 };
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 };