@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.ts CHANGED
@@ -1364,6 +1364,100 @@ interface TemplateResolveResult {
1364
1364
  */
1365
1365
  declare function resolveTemplateVariables(template: string, metadata: ResolvedProjectMetadata | undefined): TemplateResolveResult;
1366
1366
 
1367
+ /**
1368
+ * Astro output mode.
1369
+ *
1370
+ * @see https://docs.astro.build/en/reference/configuration-reference/#output
1371
+ */
1372
+ declare const AstroOutput: {
1373
+ readonly STATIC: "static";
1374
+ readonly SERVER: "server";
1375
+ readonly HYBRID: "hybrid";
1376
+ };
1377
+ type AstroOutput = (typeof AstroOutput)[keyof typeof AstroOutput];
1378
+ /**
1379
+ * Declarative spec for an Astro integration or adapter import.
1380
+ *
1381
+ * Rendered into `astro.config.mjs` as an import plus an invocation in
1382
+ * the `integrations` array (or as the `adapter` field).
1383
+ */
1384
+ interface AstroIntegrationSpec {
1385
+ /**
1386
+ * Local binding used in the generated config, e.g. "react".
1387
+ */
1388
+ readonly name: string;
1389
+ /**
1390
+ * Module to import from, e.g. "@astrojs/react".
1391
+ */
1392
+ readonly importPath: string;
1393
+ /**
1394
+ * Raw argument expression passed to the integration call.
1395
+ *
1396
+ * Written verbatim inside the parentheses, e.g. `"{ include: ['**\/*.tsx'] }"`.
1397
+ * When omitted the integration is invoked with no arguments.
1398
+ */
1399
+ readonly args?: string;
1400
+ /**
1401
+ * When true, use a default import (`import name from ...`).
1402
+ * When false or omitted, use a named import (`import { name } from ...`).
1403
+ *
1404
+ * @default true
1405
+ */
1406
+ readonly defaultImport?: boolean;
1407
+ }
1408
+ /**
1409
+ * Options controlling the rendered `astro.config.mjs`.
1410
+ */
1411
+ interface AstroConfigOptions {
1412
+ /**
1413
+ * Site URL (used for canonical URLs, sitemaps, RSS).
1414
+ */
1415
+ readonly site?: string;
1416
+ /**
1417
+ * Base path the site is deployed under.
1418
+ */
1419
+ readonly base?: string;
1420
+ /**
1421
+ * Output mode.
1422
+ *
1423
+ * @default AstroOutput.STATIC
1424
+ */
1425
+ readonly output?: AstroOutput;
1426
+ /**
1427
+ * Integrations rendered into the `integrations` array.
1428
+ */
1429
+ readonly integrations?: Array<AstroIntegrationSpec>;
1430
+ /**
1431
+ * SSR adapter rendered into the `adapter` field.
1432
+ */
1433
+ readonly adapter?: AstroIntegrationSpec;
1434
+ }
1435
+
1436
+ /**
1437
+ * Renders `astro.config.mjs` for an Astro project.
1438
+ */
1439
+ declare class AstroConfig extends Component {
1440
+ readonly project: NodeProject;
1441
+ /**
1442
+ * Find the AstroConfig component on a project.
1443
+ */
1444
+ static of(project: NodeProject): AstroConfig | undefined;
1445
+ private readonly configFilePath;
1446
+ private readonly site?;
1447
+ private readonly base?;
1448
+ private readonly output?;
1449
+ private readonly integrations;
1450
+ private readonly adapter?;
1451
+ constructor(project: NodeProject, options?: AstroConfigOptions);
1452
+ /**
1453
+ * Render the config file contents as an array of lines.
1454
+ *
1455
+ * Exposed for unit testing — `synthesizeConfig` writes these to disk.
1456
+ */
1457
+ renderConfig(): Array<string>;
1458
+ private synthesizeConfig;
1459
+ }
1460
+
1367
1461
  /*******************************************************************************
1368
1462
  *
1369
1463
  * Git configs for this repo. This venn diagram has a great deal of overlap
@@ -1722,6 +1816,10 @@ interface AwsOrganization {
1722
1816
  declare function getLatestEligibleVersion(packageName: string, minimumReleaseAgeMinutes: number): Promise<string | null>;
1723
1817
 
1724
1818
  declare const VERSION: {
1819
+ /**
1820
+ * Version of Astro to pin for AstroProject scaffolding.
1821
+ */
1822
+ readonly ASTRO_VERSION: "5.14.1";
1725
1823
  /**
1726
1824
  * CDK CLI for workflows and command line operations.
1727
1825
  *
@@ -2146,6 +2244,192 @@ declare class ResetTask extends Component {
2146
2244
  constructor(project: Project, options?: ResetTaskOptions);
2147
2245
  }
2148
2246
 
2247
+ /**
2248
+ * Options for the Vitest config (test block in vitest.config).
2249
+ *
2250
+ * @see https://vitest.dev/config/
2251
+ */
2252
+ interface VitestConfigOptions {
2253
+ /**
2254
+ * Glob patterns for test files.
2255
+ *
2256
+ * @default ["**\/*.{test,spec}.?(c|m)[jt]s?(x)"]
2257
+ */
2258
+ readonly include?: string[];
2259
+ /**
2260
+ * Glob patterns to exclude from test files.
2261
+ *
2262
+ * @default ["**\/node_modules\/**", "**\/dist\/**", "**\/lib\/**", "**\/.?\*"]
2263
+ */
2264
+ readonly exclude?: string[];
2265
+ /**
2266
+ * Test environment.
2267
+ *
2268
+ * @default "node"
2269
+ */
2270
+ readonly environment?: "node" | "jsdom" | "happy-dom" | "edge-runtime";
2271
+ /**
2272
+ * Do not fail when no tests are found.
2273
+ *
2274
+ * @default true
2275
+ */
2276
+ readonly passWithNoTests?: boolean;
2277
+ /**
2278
+ * Enable coverage collection.
2279
+ *
2280
+ * @default true
2281
+ */
2282
+ readonly coverageEnabled?: boolean;
2283
+ /**
2284
+ * Coverage reports directory.
2285
+ *
2286
+ * @default "coverage"
2287
+ */
2288
+ readonly coverageDirectory?: string;
2289
+ /**
2290
+ * Coverage reporters.
2291
+ *
2292
+ * @default ["text", "lcov"]
2293
+ */
2294
+ readonly coverageReporters?: string[];
2295
+ }
2296
+ /**
2297
+ * Options for the Vitest component.
2298
+ */
2299
+ interface VitestOptions {
2300
+ /**
2301
+ * Config file path.
2302
+ *
2303
+ * @default "vitest.config.ts"
2304
+ */
2305
+ readonly configFilePath?: string;
2306
+ /**
2307
+ * Vitest config (test block).
2308
+ */
2309
+ readonly config?: VitestConfigOptions;
2310
+ /**
2311
+ * Vitest version (overrides VERSION.VITEST_VERSION).
2312
+ */
2313
+ readonly vitestVersion?: string;
2314
+ }
2315
+ /**
2316
+ * Vitest component for Node/TypeScript projects.
2317
+ *
2318
+ * Adds Vitest as the test runner: devDeps, vitest.config.ts, and test/watch tasks.
2319
+ * Incompatible with Jest; use jest: false when constructing the project.
2320
+ */
2321
+ declare class Vitest extends Component {
2322
+ readonly project: NodeProject;
2323
+ /**
2324
+ * Find the Vitest component on a project.
2325
+ */
2326
+ static of(project: NodeProject): Vitest | undefined;
2327
+ private readonly configFilePath;
2328
+ private readonly include;
2329
+ private readonly exclude;
2330
+ private readonly environment;
2331
+ private readonly passWithNoTests;
2332
+ private readonly coverageEnabled;
2333
+ private readonly coverageDirectory;
2334
+ private readonly coverageReporters;
2335
+ private readonly version;
2336
+ constructor(project: NodeProject, options?: VitestOptions);
2337
+ preSynthesize(): void;
2338
+ private addTestTasks;
2339
+ private synthesizeConfig;
2340
+ private renderConfig;
2341
+ }
2342
+
2343
+ /**
2344
+ * Test runner for TypeScript projects.
2345
+ */
2346
+ declare const TestRunner: {
2347
+ readonly JEST: "jest";
2348
+ readonly VITEST: "vitest";
2349
+ };
2350
+ type TestRunner = (typeof TestRunner)[keyof typeof TestRunner];
2351
+ /**
2352
+ * Configuration options for TypeScriptProject.
2353
+ */
2354
+ interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOptions, "defaultReleaseBranch"> {
2355
+ /**
2356
+ * Test runner to use.
2357
+ *
2358
+ * @default TestRunner.JEST
2359
+ */
2360
+ readonly testRunner?: TestRunner;
2361
+ /**
2362
+ * Options for Vitest (only used when testRunner is 'vitest').
2363
+ */
2364
+ readonly vitestOptions?: VitestOptions;
2365
+ /**
2366
+ * Enable the reset task that deletes all build artifacts.
2367
+ *
2368
+ * @default true
2369
+ */
2370
+ readonly resetTask?: boolean;
2371
+ /**
2372
+ * Options for the reset task.
2373
+ */
2374
+ readonly resetTaskOptions?: ResetTaskOptions;
2375
+ /**
2376
+ * AI agent configuration (Cursor, Claude Code rules).
2377
+ * Generates rule files with auto-detected bundles based on project tooling.
2378
+ *
2379
+ * - `true` or `{}`: enable with auto-detected defaults
2380
+ * - `AgentConfigOptions`: enable with explicit configuration
2381
+ * - `false` or `undefined`: disabled (default)
2382
+ *
2383
+ * Sub-projects do not inherit `AgentConfig` from their parent
2384
+ * `MonorepoProject`. Agent rule files are rendered only on projects that
2385
+ * explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
2386
+ * `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
2387
+ *
2388
+ * @default false
2389
+ */
2390
+ readonly agentConfig?: AgentConfigOptions | boolean;
2391
+ }
2392
+ declare class TypeScriptProject extends typescript.TypeScriptProject {
2393
+ constructor(userOptions: TypeScriptProjectOptions);
2394
+ }
2395
+
2396
+ /**
2397
+ * Configuration options for AstroProject.
2398
+ */
2399
+ interface AstroProjectOptions extends TypeScriptProjectOptions, AstroConfigOptions {
2400
+ /**
2401
+ * Astro package version.
2402
+ *
2403
+ * @default VERSION.ASTRO_VERSION
2404
+ */
2405
+ readonly astroVersion?: string;
2406
+ /**
2407
+ * Emit sample Astro starter files (`src/pages/index.astro`, `public/favicon.svg`).
2408
+ *
2409
+ * @default false
2410
+ */
2411
+ readonly sampleCode?: boolean;
2412
+ /**
2413
+ * Astro tsconfig preset to extend.
2414
+ *
2415
+ * @default "astro/tsconfigs/strict"
2416
+ */
2417
+ readonly astroTsconfigExtends?: string;
2418
+ }
2419
+ /**
2420
+ * Minimal Astro site scaffolded on top of {@link TypeScriptProject}.
2421
+ *
2422
+ * Replaces the `tsc` compile step with `astro check && astro build`, writes
2423
+ * `astro.config.mjs`, sets `"type": "module"`, and wires dev/preview tasks.
2424
+ */
2425
+ declare class AstroProject extends TypeScriptProject {
2426
+ /**
2427
+ * Rendered Astro config component.
2428
+ */
2429
+ readonly astroConfig: AstroConfig;
2430
+ constructor(userOptions: AstroProjectOptions);
2431
+ }
2432
+
2149
2433
  /**
2150
2434
  * Each of the below options corresponds to a task property found here:
2151
2435
  * * https://turborepo.com/docs/reference/configuration#defining-tasks
@@ -2786,155 +3070,6 @@ declare class ProjectMetadata extends Component {
2786
3070
  private autoDetectRepository;
2787
3071
  }
2788
3072
 
2789
- /**
2790
- * Options for the Vitest config (test block in vitest.config).
2791
- *
2792
- * @see https://vitest.dev/config/
2793
- */
2794
- interface VitestConfigOptions {
2795
- /**
2796
- * Glob patterns for test files.
2797
- *
2798
- * @default ["**\/*.{test,spec}.?(c|m)[jt]s?(x)"]
2799
- */
2800
- readonly include?: string[];
2801
- /**
2802
- * Glob patterns to exclude from test files.
2803
- *
2804
- * @default ["**\/node_modules\/**", "**\/dist\/**", "**\/lib\/**", "**\/.?\*"]
2805
- */
2806
- readonly exclude?: string[];
2807
- /**
2808
- * Test environment.
2809
- *
2810
- * @default "node"
2811
- */
2812
- readonly environment?: "node" | "jsdom" | "happy-dom" | "edge-runtime";
2813
- /**
2814
- * Do not fail when no tests are found.
2815
- *
2816
- * @default true
2817
- */
2818
- readonly passWithNoTests?: boolean;
2819
- /**
2820
- * Enable coverage collection.
2821
- *
2822
- * @default true
2823
- */
2824
- readonly coverageEnabled?: boolean;
2825
- /**
2826
- * Coverage reports directory.
2827
- *
2828
- * @default "coverage"
2829
- */
2830
- readonly coverageDirectory?: string;
2831
- /**
2832
- * Coverage reporters.
2833
- *
2834
- * @default ["text", "lcov"]
2835
- */
2836
- readonly coverageReporters?: string[];
2837
- }
2838
- /**
2839
- * Options for the Vitest component.
2840
- */
2841
- interface VitestOptions {
2842
- /**
2843
- * Config file path.
2844
- *
2845
- * @default "vitest.config.ts"
2846
- */
2847
- readonly configFilePath?: string;
2848
- /**
2849
- * Vitest config (test block).
2850
- */
2851
- readonly config?: VitestConfigOptions;
2852
- /**
2853
- * Vitest version (overrides VERSION.VITEST_VERSION).
2854
- */
2855
- readonly vitestVersion?: string;
2856
- }
2857
- /**
2858
- * Vitest component for Node/TypeScript projects.
2859
- *
2860
- * Adds Vitest as the test runner: devDeps, vitest.config.ts, and test/watch tasks.
2861
- * Incompatible with Jest; use jest: false when constructing the project.
2862
- */
2863
- declare class Vitest extends Component {
2864
- readonly project: NodeProject;
2865
- /**
2866
- * Find the Vitest component on a project.
2867
- */
2868
- static of(project: NodeProject): Vitest | undefined;
2869
- private readonly configFilePath;
2870
- private readonly include;
2871
- private readonly exclude;
2872
- private readonly environment;
2873
- private readonly passWithNoTests;
2874
- private readonly coverageEnabled;
2875
- private readonly coverageDirectory;
2876
- private readonly coverageReporters;
2877
- private readonly version;
2878
- constructor(project: NodeProject, options?: VitestOptions);
2879
- preSynthesize(): void;
2880
- private addTestTasks;
2881
- private synthesizeConfig;
2882
- private renderConfig;
2883
- }
2884
-
2885
- /**
2886
- * Test runner for TypeScript projects.
2887
- */
2888
- declare const TestRunner: {
2889
- readonly JEST: "jest";
2890
- readonly VITEST: "vitest";
2891
- };
2892
- type TestRunner = (typeof TestRunner)[keyof typeof TestRunner];
2893
- /**
2894
- * Configuration options for TypeScriptProject.
2895
- */
2896
- interface TypeScriptProjectOptions extends Omit<typescript.TypeScriptProjectOptions, "defaultReleaseBranch"> {
2897
- /**
2898
- * Test runner to use.
2899
- *
2900
- * @default TestRunner.JEST
2901
- */
2902
- readonly testRunner?: TestRunner;
2903
- /**
2904
- * Options for Vitest (only used when testRunner is 'vitest').
2905
- */
2906
- readonly vitestOptions?: VitestOptions;
2907
- /**
2908
- * Enable the reset task that deletes all build artifacts.
2909
- *
2910
- * @default true
2911
- */
2912
- readonly resetTask?: boolean;
2913
- /**
2914
- * Options for the reset task.
2915
- */
2916
- readonly resetTaskOptions?: ResetTaskOptions;
2917
- /**
2918
- * AI agent configuration (Cursor, Claude Code rules).
2919
- * Generates rule files with auto-detected bundles based on project tooling.
2920
- *
2921
- * - `true` or `{}`: enable with auto-detected defaults
2922
- * - `AgentConfigOptions`: enable with explicit configuration
2923
- * - `false` or `undefined`: disabled (default)
2924
- *
2925
- * Sub-projects do not inherit `AgentConfig` from their parent
2926
- * `MonorepoProject`. Agent rule files are rendered only on projects that
2927
- * explicitly opt in, so a monorepo's root `AgentConfig` does not duplicate
2928
- * `.cursor/`, `.claude/`, or `CLAUDE.md` into each sub-project's `outdir`.
2929
- *
2930
- * @default false
2931
- */
2932
- readonly agentConfig?: AgentConfigOptions | boolean;
2933
- }
2934
- declare class TypeScriptProject extends typescript.TypeScriptProject {
2935
- constructor(userOptions: TypeScriptProjectOptions);
2936
- }
2937
-
2938
3073
  /*******************************************************************************
2939
3074
  *
2940
3075
  * Update / customize typescript configs for a project.
@@ -3050,5 +3185,5 @@ declare const COMPLETE_JOB_ID = "complete";
3050
3185
  */
3051
3186
  declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
3052
3187
 
3053
- export { AGENT_MODEL, AGENT_PLATFORM, AGENT_RULE_SCOPE, AgentConfig, 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 };
3054
- export type { AgentConfigOptions, AgentModel, AgentPlatform, AgentPlatformOverrides, AgentProcedure, AgentRule, AgentRuleBundle, AgentRuleScope, AgentSkill, AgentSubAgent, AgentSubAgentPlatformOverrides, ApproveMergeUpgradeOptions, 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 };
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 };