@codedrifters/configulator 0.0.243 → 0.0.244
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 +87 -6
- package/lib/index.d.ts +88 -7
- package/lib/index.js +76 -10
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +73 -10
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -2757,8 +2757,10 @@ type LayoutEnforcement = (typeof LAYOUT_ENFORCEMENT)[keyof typeof LAYOUT_ENFORCE
|
|
|
2757
2757
|
*
|
|
2758
2758
|
* We key by class name (not class reference) so this module stays free of
|
|
2759
2759
|
* import cycles with the project-type files that validate against it.
|
|
2760
|
-
* `StarlightProject` maps to `DOCS` because the docs-singleton
|
|
2761
|
-
*
|
|
2760
|
+
* `StarlightProject` maps to `DOCS` by default because the docs-singleton
|
|
2761
|
+
* rule says a default-role Starlight project is the monorepo-wide docs
|
|
2762
|
+
* site. Site-role Starlight projects override this mapping at validate
|
|
2763
|
+
* time via their instance `role` property.
|
|
2762
2764
|
*
|
|
2763
2765
|
* @see ADR-006 §4 — Configulator project-type → `outdir` mapping
|
|
2764
2766
|
*/
|
|
@@ -2773,6 +2775,14 @@ interface LayoutViolation {
|
|
|
2773
2775
|
readonly outdir: string;
|
|
2774
2776
|
readonly expectedRoot: MonorepoLayoutRoot;
|
|
2775
2777
|
}
|
|
2778
|
+
/**
|
|
2779
|
+
* Violation reported by {@link validateStarlightSingleton} when a
|
|
2780
|
+
* `MonorepoProject` tree contains more than one `StarlightProject`
|
|
2781
|
+
* carrying `role: "docs"` (the docs-singleton rule — ADR-006 §3).
|
|
2782
|
+
*/
|
|
2783
|
+
interface StarlightSingletonViolation {
|
|
2784
|
+
readonly projectNames: ReadonlyArray<string>;
|
|
2785
|
+
}
|
|
2776
2786
|
/**
|
|
2777
2787
|
* Inspect every sub-project of `root` and collect those whose `outdir` does
|
|
2778
2788
|
* not live under the root expected for their project class (ADR-006 §4).
|
|
@@ -2784,13 +2794,39 @@ interface LayoutViolation {
|
|
|
2784
2794
|
* sub-project).
|
|
2785
2795
|
* - `outdir` comparison is done in POSIX form against the project root so
|
|
2786
2796
|
* absolute paths synthesised on Windows still match.
|
|
2797
|
+
* - A `StarlightProject` carrying `role: "site"` is validated against the
|
|
2798
|
+
* `sites/` root rather than the default `docs/` root. This keeps the
|
|
2799
|
+
* class-to-root mapping static while still honouring the ADR-006 §3
|
|
2800
|
+
* docs-singleton carve-out for docs-role projects.
|
|
2787
2801
|
*/
|
|
2788
2802
|
declare function validateMonorepoLayout(root: Project$1): Array<LayoutViolation>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Inspect every sub-project of `root` and flag cases where more than one
|
|
2805
|
+
* `StarlightProject` claims `role: "docs"` (ADR-006 §3 — there is
|
|
2806
|
+
* exactly one Starlight docs site per monorepo, and it lives at `/docs`).
|
|
2807
|
+
*
|
|
2808
|
+
* Returns `undefined` when the singleton rule is satisfied (zero or one
|
|
2809
|
+
* docs-role Starlight project). Returns a single violation whose
|
|
2810
|
+
* `projectNames` list contains every offending project when two or more
|
|
2811
|
+
* docs-role Starlight projects are present — the caller reports the
|
|
2812
|
+
* whole set so authors can see every candidate at once rather than
|
|
2813
|
+
* fixing them one at a time.
|
|
2814
|
+
*
|
|
2815
|
+
* Site-role Starlight projects never count toward the singleton limit
|
|
2816
|
+
* and are not flagged.
|
|
2817
|
+
*/
|
|
2818
|
+
declare function validateStarlightSingleton(root: Project$1): StarlightSingletonViolation | undefined;
|
|
2789
2819
|
/**
|
|
2790
2820
|
* Render one {@link LayoutViolation} as an actionable, single-line error
|
|
2791
2821
|
* message pointing the reader at ADR-006.
|
|
2792
2822
|
*/
|
|
2793
2823
|
declare function formatLayoutViolation(violation: LayoutViolation): string;
|
|
2824
|
+
/**
|
|
2825
|
+
* Render a {@link StarlightSingletonViolation} as an actionable,
|
|
2826
|
+
* single-line error message pointing the reader at ADR-006 §3
|
|
2827
|
+
* (docs-singleton carve-out).
|
|
2828
|
+
*/
|
|
2829
|
+
declare function formatStarlightSingletonViolation(violation: StarlightSingletonViolation): string;
|
|
2794
2830
|
|
|
2795
2831
|
/**
|
|
2796
2832
|
* Each of the below options corresponds to a task property found here:
|
|
@@ -3410,10 +3446,20 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
3410
3446
|
* layout contract. Runs in `preSynthesize` so all sub-projects are
|
|
3411
3447
|
* attached by the time we inspect the tree.
|
|
3412
3448
|
*
|
|
3449
|
+
* Two checks run in sequence:
|
|
3450
|
+
*
|
|
3451
|
+
* 1. **Outdir-vs-root validation.** Every sub-project's `outdir` must
|
|
3452
|
+
* live under the root expected for its project type (ADR-006 §4).
|
|
3453
|
+
* 2. **Docs-singleton validation.** At most one `StarlightProject`
|
|
3454
|
+
* may carry `role: "docs"` (ADR-006 §3).
|
|
3455
|
+
*
|
|
3413
3456
|
* Behavior is controlled by `layoutEnforcement`:
|
|
3414
|
-
* - `"off"` — skip
|
|
3415
|
-
* - `"warn"` — log a `console.warn` per violation; continue.
|
|
3416
|
-
*
|
|
3457
|
+
* - `"off"` — skip both checks.
|
|
3458
|
+
* - `"warn"` — log a `console.warn` per violation; continue. Singleton
|
|
3459
|
+
* violations also warn in this mode rather than throwing, so all
|
|
3460
|
+
* layout findings are surfaced consistently.
|
|
3461
|
+
* - `"error"` — throw on the first outdir violation, or on the
|
|
3462
|
+
* singleton violation if outdir validation passed.
|
|
3417
3463
|
*/
|
|
3418
3464
|
preSynthesize(): void;
|
|
3419
3465
|
/**
|
|
@@ -3633,6 +3679,21 @@ declare function resolveAwsCdkProjectOutdir(packageName: string | undefined): st
|
|
|
3633
3679
|
*/
|
|
3634
3680
|
declare function resolveAstroProjectOutdir(packageName: string | undefined): string;
|
|
3635
3681
|
|
|
3682
|
+
/**
|
|
3683
|
+
* Role a {@link StarlightProject} plays inside the monorepo (ADR-006).
|
|
3684
|
+
*
|
|
3685
|
+
* - `"docs"` — the monorepo-wide Starlight docs site. Singleton: at most one
|
|
3686
|
+
* docs-role project may exist per `MonorepoProject`. Defaults `outdir` to
|
|
3687
|
+
* `docs/`.
|
|
3688
|
+
* - `"site"` — a user-facing Starlight site deployed from `sites/`. Behaves
|
|
3689
|
+
* like a regular {@link AstroProject} for placement: defaults `outdir` to
|
|
3690
|
+
* `sites/<scope>/<name>`.
|
|
3691
|
+
*/
|
|
3692
|
+
declare const STARLIGHT_ROLE: {
|
|
3693
|
+
readonly DOCS: "docs";
|
|
3694
|
+
readonly SITE: "site";
|
|
3695
|
+
};
|
|
3696
|
+
type StarlightRole = (typeof STARLIGHT_ROLE)[keyof typeof STARLIGHT_ROLE];
|
|
3636
3697
|
/**
|
|
3637
3698
|
* A single Starlight social icon link.
|
|
3638
3699
|
*/
|
|
@@ -3687,6 +3748,19 @@ interface StarlightProjectOptions extends AstroProjectOptions {
|
|
|
3687
3748
|
* Starlight site title (required).
|
|
3688
3749
|
*/
|
|
3689
3750
|
readonly starlightTitle: string;
|
|
3751
|
+
/**
|
|
3752
|
+
* Role this Starlight project plays in the monorepo (ADR-006).
|
|
3753
|
+
*
|
|
3754
|
+
* - `"docs"` (default) — the monorepo-wide docs singleton. `outdir`
|
|
3755
|
+
* defaults to `docs/`. Only one docs-role `StarlightProject` may
|
|
3756
|
+
* exist per `MonorepoProject`; a second one fails synth.
|
|
3757
|
+
* - `"site"` — a regular user-facing Starlight site. `outdir`
|
|
3758
|
+
* defaults to `sites/<scope>/<name>` (same rule as
|
|
3759
|
+
* `AstroProject`). Multiple site-role projects are allowed.
|
|
3760
|
+
*
|
|
3761
|
+
* @default "docs"
|
|
3762
|
+
*/
|
|
3763
|
+
readonly role?: StarlightRole;
|
|
3690
3764
|
/**
|
|
3691
3765
|
* Starlight site description.
|
|
3692
3766
|
*/
|
|
@@ -3737,6 +3811,13 @@ interface StarlightProjectOptions extends AstroProjectOptions {
|
|
|
3737
3811
|
* Starlight Astro integration.
|
|
3738
3812
|
*/
|
|
3739
3813
|
declare class StarlightProject extends AstroProject {
|
|
3814
|
+
/**
|
|
3815
|
+
* Role this Starlight project plays in the monorepo (ADR-006).
|
|
3816
|
+
*
|
|
3817
|
+
* - `"docs"` — monorepo-wide docs singleton at `/docs`.
|
|
3818
|
+
* - `"site"` — user-facing Starlight site under `sites/<scope>/<name>`.
|
|
3819
|
+
*/
|
|
3820
|
+
readonly role: StarlightRole;
|
|
3740
3821
|
constructor(userOptions: StarlightProjectOptions);
|
|
3741
3822
|
}
|
|
3742
3823
|
|
|
@@ -3774,4 +3855,4 @@ declare const COMPLETE_JOB_ID = "complete";
|
|
|
3774
3855
|
*/
|
|
3775
3856
|
declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
|
|
3776
3857
|
|
|
3777
|
-
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, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, type LabelDefinition, type LayoutEnforcement, type LayoutViolation, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, type McpServerConfig, type McpTransport, type MergeMethod, type MonorepoLayoutRoot, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, REQUIREMENTS_WRITER_PATHS, 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, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, vitestBundle };
|
|
3858
|
+
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, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, type LabelDefinition, type LayoutEnforcement, type LayoutViolation, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, type McpServerConfig, type McpTransport, type MergeMethod, type MonorepoLayoutRoot, MonorepoProject, type MonorepoProjectOptions, type OrganizationMetadata, PROD_DEPLOY_NAME, PnpmWorkspace, type PnpmWorkspaceOptions, ProjectMetadata, type ProjectMetadataOptions, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, type RemoteCacheOptions, type RepositoryMetadata, ResetTask, type ResetTaskOptions, type ResolvedProjectMetadata, STARLIGHT_ROLE, type SlackMetadata, type StarlightEditLink, type StarlightLogo, StarlightProject, type StarlightProjectOptions, type StarlightRole, type StarlightSidebarItem, type StarlightSingletonViolation, 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, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
package/lib/index.d.ts
CHANGED
|
@@ -2806,8 +2806,10 @@ type LayoutEnforcement = (typeof LAYOUT_ENFORCEMENT)[keyof typeof LAYOUT_ENFORCE
|
|
|
2806
2806
|
*
|
|
2807
2807
|
* We key by class name (not class reference) so this module stays free of
|
|
2808
2808
|
* import cycles with the project-type files that validate against it.
|
|
2809
|
-
* `StarlightProject` maps to `DOCS` because the docs-singleton
|
|
2810
|
-
*
|
|
2809
|
+
* `StarlightProject` maps to `DOCS` by default because the docs-singleton
|
|
2810
|
+
* rule says a default-role Starlight project is the monorepo-wide docs
|
|
2811
|
+
* site. Site-role Starlight projects override this mapping at validate
|
|
2812
|
+
* time via their instance `role` property.
|
|
2811
2813
|
*
|
|
2812
2814
|
* @see ADR-006 §4 — Configulator project-type → `outdir` mapping
|
|
2813
2815
|
*/
|
|
@@ -2822,6 +2824,14 @@ interface LayoutViolation {
|
|
|
2822
2824
|
readonly outdir: string;
|
|
2823
2825
|
readonly expectedRoot: MonorepoLayoutRoot;
|
|
2824
2826
|
}
|
|
2827
|
+
/**
|
|
2828
|
+
* Violation reported by {@link validateStarlightSingleton} when a
|
|
2829
|
+
* `MonorepoProject` tree contains more than one `StarlightProject`
|
|
2830
|
+
* carrying `role: "docs"` (the docs-singleton rule — ADR-006 §3).
|
|
2831
|
+
*/
|
|
2832
|
+
interface StarlightSingletonViolation {
|
|
2833
|
+
readonly projectNames: ReadonlyArray<string>;
|
|
2834
|
+
}
|
|
2825
2835
|
/**
|
|
2826
2836
|
* Inspect every sub-project of `root` and collect those whose `outdir` does
|
|
2827
2837
|
* not live under the root expected for their project class (ADR-006 §4).
|
|
@@ -2833,13 +2843,39 @@ interface LayoutViolation {
|
|
|
2833
2843
|
* sub-project).
|
|
2834
2844
|
* - `outdir` comparison is done in POSIX form against the project root so
|
|
2835
2845
|
* absolute paths synthesised on Windows still match.
|
|
2846
|
+
* - A `StarlightProject` carrying `role: "site"` is validated against the
|
|
2847
|
+
* `sites/` root rather than the default `docs/` root. This keeps the
|
|
2848
|
+
* class-to-root mapping static while still honouring the ADR-006 §3
|
|
2849
|
+
* docs-singleton carve-out for docs-role projects.
|
|
2836
2850
|
*/
|
|
2837
2851
|
declare function validateMonorepoLayout(root: Project): Array<LayoutViolation>;
|
|
2852
|
+
/**
|
|
2853
|
+
* Inspect every sub-project of `root` and flag cases where more than one
|
|
2854
|
+
* `StarlightProject` claims `role: "docs"` (ADR-006 §3 — there is
|
|
2855
|
+
* exactly one Starlight docs site per monorepo, and it lives at `/docs`).
|
|
2856
|
+
*
|
|
2857
|
+
* Returns `undefined` when the singleton rule is satisfied (zero or one
|
|
2858
|
+
* docs-role Starlight project). Returns a single violation whose
|
|
2859
|
+
* `projectNames` list contains every offending project when two or more
|
|
2860
|
+
* docs-role Starlight projects are present — the caller reports the
|
|
2861
|
+
* whole set so authors can see every candidate at once rather than
|
|
2862
|
+
* fixing them one at a time.
|
|
2863
|
+
*
|
|
2864
|
+
* Site-role Starlight projects never count toward the singleton limit
|
|
2865
|
+
* and are not flagged.
|
|
2866
|
+
*/
|
|
2867
|
+
declare function validateStarlightSingleton(root: Project): StarlightSingletonViolation | undefined;
|
|
2838
2868
|
/**
|
|
2839
2869
|
* Render one {@link LayoutViolation} as an actionable, single-line error
|
|
2840
2870
|
* message pointing the reader at ADR-006.
|
|
2841
2871
|
*/
|
|
2842
2872
|
declare function formatLayoutViolation(violation: LayoutViolation): string;
|
|
2873
|
+
/**
|
|
2874
|
+
* Render a {@link StarlightSingletonViolation} as an actionable,
|
|
2875
|
+
* single-line error message pointing the reader at ADR-006 §3
|
|
2876
|
+
* (docs-singleton carve-out).
|
|
2877
|
+
*/
|
|
2878
|
+
declare function formatStarlightSingletonViolation(violation: StarlightSingletonViolation): string;
|
|
2843
2879
|
|
|
2844
2880
|
/**
|
|
2845
2881
|
* Each of the below options corresponds to a task property found here:
|
|
@@ -3459,10 +3495,20 @@ declare class MonorepoProject extends TypeScriptAppProject {
|
|
|
3459
3495
|
* layout contract. Runs in `preSynthesize` so all sub-projects are
|
|
3460
3496
|
* attached by the time we inspect the tree.
|
|
3461
3497
|
*
|
|
3498
|
+
* Two checks run in sequence:
|
|
3499
|
+
*
|
|
3500
|
+
* 1. **Outdir-vs-root validation.** Every sub-project's `outdir` must
|
|
3501
|
+
* live under the root expected for its project type (ADR-006 §4).
|
|
3502
|
+
* 2. **Docs-singleton validation.** At most one `StarlightProject`
|
|
3503
|
+
* may carry `role: "docs"` (ADR-006 §3).
|
|
3504
|
+
*
|
|
3462
3505
|
* Behavior is controlled by `layoutEnforcement`:
|
|
3463
|
-
* - `"off"` — skip
|
|
3464
|
-
* - `"warn"` — log a `console.warn` per violation; continue.
|
|
3465
|
-
*
|
|
3506
|
+
* - `"off"` — skip both checks.
|
|
3507
|
+
* - `"warn"` — log a `console.warn` per violation; continue. Singleton
|
|
3508
|
+
* violations also warn in this mode rather than throwing, so all
|
|
3509
|
+
* layout findings are surfaced consistently.
|
|
3510
|
+
* - `"error"` — throw on the first outdir violation, or on the
|
|
3511
|
+
* singleton violation if outdir validation passed.
|
|
3466
3512
|
*/
|
|
3467
3513
|
preSynthesize(): void;
|
|
3468
3514
|
/**
|
|
@@ -3682,6 +3728,21 @@ declare function resolveAwsCdkProjectOutdir(packageName: string | undefined): st
|
|
|
3682
3728
|
*/
|
|
3683
3729
|
declare function resolveAstroProjectOutdir(packageName: string | undefined): string;
|
|
3684
3730
|
|
|
3731
|
+
/**
|
|
3732
|
+
* Role a {@link StarlightProject} plays inside the monorepo (ADR-006).
|
|
3733
|
+
*
|
|
3734
|
+
* - `"docs"` — the monorepo-wide Starlight docs site. Singleton: at most one
|
|
3735
|
+
* docs-role project may exist per `MonorepoProject`. Defaults `outdir` to
|
|
3736
|
+
* `docs/`.
|
|
3737
|
+
* - `"site"` — a user-facing Starlight site deployed from `sites/`. Behaves
|
|
3738
|
+
* like a regular {@link AstroProject} for placement: defaults `outdir` to
|
|
3739
|
+
* `sites/<scope>/<name>`.
|
|
3740
|
+
*/
|
|
3741
|
+
declare const STARLIGHT_ROLE: {
|
|
3742
|
+
readonly DOCS: "docs";
|
|
3743
|
+
readonly SITE: "site";
|
|
3744
|
+
};
|
|
3745
|
+
type StarlightRole = (typeof STARLIGHT_ROLE)[keyof typeof STARLIGHT_ROLE];
|
|
3685
3746
|
/**
|
|
3686
3747
|
* A single Starlight social icon link.
|
|
3687
3748
|
*/
|
|
@@ -3736,6 +3797,19 @@ interface StarlightProjectOptions extends AstroProjectOptions {
|
|
|
3736
3797
|
* Starlight site title (required).
|
|
3737
3798
|
*/
|
|
3738
3799
|
readonly starlightTitle: string;
|
|
3800
|
+
/**
|
|
3801
|
+
* Role this Starlight project plays in the monorepo (ADR-006).
|
|
3802
|
+
*
|
|
3803
|
+
* - `"docs"` (default) — the monorepo-wide docs singleton. `outdir`
|
|
3804
|
+
* defaults to `docs/`. Only one docs-role `StarlightProject` may
|
|
3805
|
+
* exist per `MonorepoProject`; a second one fails synth.
|
|
3806
|
+
* - `"site"` — a regular user-facing Starlight site. `outdir`
|
|
3807
|
+
* defaults to `sites/<scope>/<name>` (same rule as
|
|
3808
|
+
* `AstroProject`). Multiple site-role projects are allowed.
|
|
3809
|
+
*
|
|
3810
|
+
* @default "docs"
|
|
3811
|
+
*/
|
|
3812
|
+
readonly role?: StarlightRole;
|
|
3739
3813
|
/**
|
|
3740
3814
|
* Starlight site description.
|
|
3741
3815
|
*/
|
|
@@ -3786,6 +3860,13 @@ interface StarlightProjectOptions extends AstroProjectOptions {
|
|
|
3786
3860
|
* Starlight Astro integration.
|
|
3787
3861
|
*/
|
|
3788
3862
|
declare class StarlightProject extends AstroProject {
|
|
3863
|
+
/**
|
|
3864
|
+
* Role this Starlight project plays in the monorepo (ADR-006).
|
|
3865
|
+
*
|
|
3866
|
+
* - `"docs"` — monorepo-wide docs singleton at `/docs`.
|
|
3867
|
+
* - `"site"` — user-facing Starlight site under `sites/<scope>/<name>`.
|
|
3868
|
+
*/
|
|
3869
|
+
readonly role: StarlightRole;
|
|
3789
3870
|
constructor(userOptions: StarlightProjectOptions);
|
|
3790
3871
|
}
|
|
3791
3872
|
|
|
@@ -3823,5 +3904,5 @@ declare const COMPLETE_JOB_ID = "complete";
|
|
|
3823
3904
|
*/
|
|
3824
3905
|
declare function addBuildCompleteJob(buildWorkflow: BuildWorkflow): void;
|
|
3825
3906
|
|
|
3826
|
-
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, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, 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, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, vitestBundle };
|
|
3827
|
-
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, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightSidebarItem, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
|
|
3907
|
+
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, LAYOUT_ENFORCEMENT, LAYOUT_ROOT_BY_PROJECT_TYPE, MCP_TRANSPORT, MERGE_METHODS, MIMIMUM_RELEASE_AGE, MINIMUM_RELEASE_AGE, MONOREPO_LAYOUT, MonorepoProject, PROD_DEPLOY_NAME, PnpmWorkspace, ProjectMetadata, REQUIREMENTS_WRITER_PATHS, ROOT_CI_TASK_NAME, ROOT_TURBO_TASK_NAME, ResetTask, STARLIGHT_ROLE, StarlightProject, TestRunner, TurboRepo, TurboRepoTask, TypeScriptConfig, TypeScriptProject, VERSION, VERSION_KEYS_SKIP, VERSION_NPM_PACKAGES, VSCodeConfig, Vitest, addApproveMergeUpgradeWorkflow, addBuildCompleteJob, addSyncLabelsWorkflow, awsCdkBundle, baseBundle, bcmWriterBundle, companyProfileBundle, formatLayoutViolation, formatStarlightSingletonViolation, getLatestEligibleVersion, githubWorkflowBundle, industryDiscoveryBundle, jestBundle, maintenanceAuditBundle, meetingAnalysisBundle, orchestratorBundle, peopleProfileBundle, pnpmBundle, prReviewBundle, projenBundle, requirementsAnalystBundle, requirementsReviewerBundle, requirementsWriterBundle, researchPipelineBundle, resolveAstroProjectOutdir, resolveAwsCdkProjectOutdir, resolveModelAlias, resolveOutdirFromPackageName, resolveTemplateVariables, resolveTypeScriptProjectOutdir, slackBundle, softwareProfileBundle, turborepoBundle, typescriptBundle, validateMonorepoLayout, validateStarlightSingleton, vitestBundle };
|
|
3908
|
+
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, LayoutEnforcement, LayoutViolation, McpServerConfig, McpTransport, MergeMethod, MonorepoLayoutRoot, MonorepoProjectOptions, OrganizationMetadata, PnpmWorkspaceOptions, ProjectMetadataOptions, RemoteCacheOptions, RepositoryMetadata, ResetTaskOptions, ResolvedProjectMetadata, SlackMetadata, StarlightEditLink, StarlightLogo, StarlightProjectOptions, StarlightRole, StarlightSidebarItem, StarlightSingletonViolation, StarlightSocialLink, SyncLabelsOptions, TemplateResolveResult, TurboRepoOptions, TurboRepoTaskOptions, TypeScriptProjectOptions, VersionKey, VitestConfigOptions, VitestOptions };
|
package/lib/index.js
CHANGED
|
@@ -210,6 +210,7 @@ __export(index_exports, {
|
|
|
210
210
|
ROOT_CI_TASK_NAME: () => ROOT_CI_TASK_NAME,
|
|
211
211
|
ROOT_TURBO_TASK_NAME: () => ROOT_TURBO_TASK_NAME,
|
|
212
212
|
ResetTask: () => ResetTask,
|
|
213
|
+
STARLIGHT_ROLE: () => STARLIGHT_ROLE,
|
|
213
214
|
StarlightProject: () => StarlightProject,
|
|
214
215
|
TestRunner: () => TestRunner,
|
|
215
216
|
TurboRepo: () => TurboRepo,
|
|
@@ -229,6 +230,7 @@ __export(index_exports, {
|
|
|
229
230
|
bcmWriterBundle: () => bcmWriterBundle,
|
|
230
231
|
companyProfileBundle: () => companyProfileBundle,
|
|
231
232
|
formatLayoutViolation: () => formatLayoutViolation,
|
|
233
|
+
formatStarlightSingletonViolation: () => formatStarlightSingletonViolation,
|
|
232
234
|
getLatestEligibleVersion: () => getLatestEligibleVersion,
|
|
233
235
|
githubWorkflowBundle: () => githubWorkflowBundle,
|
|
234
236
|
industryDiscoveryBundle: () => industryDiscoveryBundle,
|
|
@@ -255,6 +257,7 @@ __export(index_exports, {
|
|
|
255
257
|
turborepoBundle: () => turborepoBundle,
|
|
256
258
|
typescriptBundle: () => typescriptBundle,
|
|
257
259
|
validateMonorepoLayout: () => validateMonorepoLayout,
|
|
260
|
+
validateStarlightSingleton: () => validateStarlightSingleton,
|
|
258
261
|
vitestBundle: () => vitestBundle
|
|
259
262
|
});
|
|
260
263
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -901,7 +904,12 @@ var baseBundle = {
|
|
|
901
904
|
"- The docs site is monorepo-wide. Sub-project documentation belongs",
|
|
902
905
|
" inside that single site (under `docs/content/`), not in a per-package",
|
|
903
906
|
" `docs/` folder.",
|
|
904
|
-
"- Configulator's `StarlightProject` defaults its `outdir` to `/docs
|
|
907
|
+
"- Configulator's `StarlightProject` defaults its `outdir` to `/docs` and",
|
|
908
|
+
' its `role` to `"docs"`. A second `StarlightProject` with `role: "docs"`',
|
|
909
|
+
" fails synth \u2014 the singleton rule is enforced at validate time.",
|
|
910
|
+
"- Additional Starlight sites (client-facing, marketing, etc.) must set",
|
|
911
|
+
' `role: "site"`, which routes them under `sites/<scope>/<name>` just',
|
|
912
|
+
" like a plain `AstroProject`.",
|
|
905
913
|
"- `/sites` is reserved for end-user-facing web front ends (marketing",
|
|
906
914
|
" sites, SPAs, client-facing apps). It deliberately does not host the",
|
|
907
915
|
" dev-docs site.",
|
|
@@ -917,7 +925,8 @@ var baseBundle = {
|
|
|
917
925
|
"| `TypeScriptProject` | `packages/<scope>/<name>` |",
|
|
918
926
|
"| `AwsCdkProject` | `apps/<scope>/<name>` |",
|
|
919
927
|
"| `AstroProject` | `sites/<scope>/<name>` |",
|
|
920
|
-
"| `StarlightProject` (role = docs) | `docs/` |",
|
|
928
|
+
"| `StarlightProject` (role = docs, default) | `docs/` |",
|
|
929
|
+
"| `StarlightProject` (role = site) | `sites/<scope>/<name>` |",
|
|
921
930
|
"",
|
|
922
931
|
"`<scope>` is parsed from the sub-project's package name (everything",
|
|
923
932
|
"after `@` and before `/`). `<name>` is the unscoped part of the",
|
|
@@ -15661,7 +15670,7 @@ function validateMonorepoLayout(root) {
|
|
|
15661
15670
|
const rootOutdir = toPosix(root.outdir);
|
|
15662
15671
|
for (const sub of root.subprojects) {
|
|
15663
15672
|
const className = sub.constructor.name;
|
|
15664
|
-
const expectedRoot =
|
|
15673
|
+
const expectedRoot = expectedRootFor(sub, className);
|
|
15665
15674
|
if (expectedRoot === void 0) {
|
|
15666
15675
|
continue;
|
|
15667
15676
|
}
|
|
@@ -15677,11 +15686,40 @@ function validateMonorepoLayout(root) {
|
|
|
15677
15686
|
}
|
|
15678
15687
|
return violations;
|
|
15679
15688
|
}
|
|
15689
|
+
function validateStarlightSingleton(root) {
|
|
15690
|
+
const docsRoleProjects = [];
|
|
15691
|
+
for (const sub of root.subprojects) {
|
|
15692
|
+
if (sub.constructor.name !== "StarlightProject") {
|
|
15693
|
+
continue;
|
|
15694
|
+
}
|
|
15695
|
+
if (getStarlightRole(sub) === "docs") {
|
|
15696
|
+
docsRoleProjects.push(sub.name);
|
|
15697
|
+
}
|
|
15698
|
+
}
|
|
15699
|
+
if (docsRoleProjects.length <= 1) {
|
|
15700
|
+
return void 0;
|
|
15701
|
+
}
|
|
15702
|
+
return { projectNames: docsRoleProjects };
|
|
15703
|
+
}
|
|
15704
|
+
function expectedRootFor(sub, className) {
|
|
15705
|
+
if (className === "StarlightProject") {
|
|
15706
|
+
return getStarlightRole(sub) === "site" ? MONOREPO_LAYOUT.SITES : MONOREPO_LAYOUT.DOCS;
|
|
15707
|
+
}
|
|
15708
|
+
return LAYOUT_ROOT_BY_PROJECT_TYPE[className];
|
|
15709
|
+
}
|
|
15710
|
+
function getStarlightRole(sub) {
|
|
15711
|
+
const role = sub.role;
|
|
15712
|
+
return role === "site" ? "site" : "docs";
|
|
15713
|
+
}
|
|
15680
15714
|
function formatLayoutViolation(violation) {
|
|
15681
15715
|
const { projectName, projectType, outdir, expectedRoot } = violation;
|
|
15682
15716
|
const expectedExample = expectedRoot === MONOREPO_LAYOUT.DOCS ? "docs/" : `${expectedRoot}/<scope>/<name>`;
|
|
15683
15717
|
return `[monorepo-layout] ${projectType} "${projectName}" has outdir "${outdir}", which is outside the expected root "${expectedRoot}/" (expected e.g. "${expectedExample}"). See docs/requirements/architectural-decisions/ADR-006-monorepo-layout.md.`;
|
|
15684
15718
|
}
|
|
15719
|
+
function formatStarlightSingletonViolation(violation) {
|
|
15720
|
+
const names = violation.projectNames.map((n) => `"${n}"`).join(", ");
|
|
15721
|
+
return `[monorepo-layout] Multiple StarlightProject instances with role: "docs" found (${names}). ADR-006 allows exactly one docs-role Starlight project per MonorepoProject. Either remove the duplicates or set role: "site" on the additional ones so they land under sites/. See docs/requirements/architectural-decisions/ADR-006-monorepo-layout.md.`;
|
|
15722
|
+
}
|
|
15685
15723
|
function outdirMatchesRoot(relOutdir, expectedRoot) {
|
|
15686
15724
|
const segments = relOutdir.split("/").filter((s) => s.length > 0);
|
|
15687
15725
|
if (segments.length === 0) {
|
|
@@ -16487,10 +16525,20 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
|
|
|
16487
16525
|
* layout contract. Runs in `preSynthesize` so all sub-projects are
|
|
16488
16526
|
* attached by the time we inspect the tree.
|
|
16489
16527
|
*
|
|
16528
|
+
* Two checks run in sequence:
|
|
16529
|
+
*
|
|
16530
|
+
* 1. **Outdir-vs-root validation.** Every sub-project's `outdir` must
|
|
16531
|
+
* live under the root expected for its project type (ADR-006 §4).
|
|
16532
|
+
* 2. **Docs-singleton validation.** At most one `StarlightProject`
|
|
16533
|
+
* may carry `role: "docs"` (ADR-006 §3).
|
|
16534
|
+
*
|
|
16490
16535
|
* Behavior is controlled by `layoutEnforcement`:
|
|
16491
|
-
* - `"off"` — skip
|
|
16492
|
-
* - `"warn"` — log a `console.warn` per violation; continue.
|
|
16493
|
-
*
|
|
16536
|
+
* - `"off"` — skip both checks.
|
|
16537
|
+
* - `"warn"` — log a `console.warn` per violation; continue. Singleton
|
|
16538
|
+
* violations also warn in this mode rather than throwing, so all
|
|
16539
|
+
* layout findings are surfaced consistently.
|
|
16540
|
+
* - `"error"` — throw on the first outdir violation, or on the
|
|
16541
|
+
* singleton violation if outdir validation passed.
|
|
16494
16542
|
*/
|
|
16495
16543
|
preSynthesize() {
|
|
16496
16544
|
super.preSynthesize();
|
|
@@ -16498,15 +16546,22 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
|
|
|
16498
16546
|
return;
|
|
16499
16547
|
}
|
|
16500
16548
|
const violations = validateMonorepoLayout(this);
|
|
16501
|
-
|
|
16502
|
-
return;
|
|
16503
|
-
}
|
|
16549
|
+
const singletonViolation = validateStarlightSingleton(this);
|
|
16504
16550
|
if (this.layoutEnforcement === LAYOUT_ENFORCEMENT.ERROR) {
|
|
16505
|
-
|
|
16551
|
+
if (violations.length > 0) {
|
|
16552
|
+
throw new Error(formatLayoutViolation(violations[0]));
|
|
16553
|
+
}
|
|
16554
|
+
if (singletonViolation !== void 0) {
|
|
16555
|
+
throw new Error(formatStarlightSingletonViolation(singletonViolation));
|
|
16556
|
+
}
|
|
16557
|
+
return;
|
|
16506
16558
|
}
|
|
16507
16559
|
for (const violation of violations) {
|
|
16508
16560
|
console.warn(formatLayoutViolation(violation));
|
|
16509
16561
|
}
|
|
16562
|
+
if (singletonViolation !== void 0) {
|
|
16563
|
+
console.warn(formatStarlightSingletonViolation(singletonViolation));
|
|
16564
|
+
}
|
|
16510
16565
|
}
|
|
16511
16566
|
/**
|
|
16512
16567
|
* Allows a sub project to request installation of dependency at the Monorepo root
|
|
@@ -17503,8 +17558,13 @@ var AwsCdkProject = class extends import_projen20.awscdk.AwsCdkTypeScriptApp {
|
|
|
17503
17558
|
|
|
17504
17559
|
// src/projects/starlight-project.ts
|
|
17505
17560
|
var import_projen21 = require("projen");
|
|
17561
|
+
var STARLIGHT_ROLE = {
|
|
17562
|
+
DOCS: "docs",
|
|
17563
|
+
SITE: "site"
|
|
17564
|
+
};
|
|
17506
17565
|
var StarlightProject = class extends AstroProject {
|
|
17507
17566
|
constructor(userOptions) {
|
|
17567
|
+
const role = userOptions.role ?? STARLIGHT_ROLE.DOCS;
|
|
17508
17568
|
const starlightConfig = buildStarlightConfig(userOptions);
|
|
17509
17569
|
const starlightSpec = {
|
|
17510
17570
|
name: "starlight",
|
|
@@ -17512,8 +17572,10 @@ var StarlightProject = class extends AstroProject {
|
|
|
17512
17572
|
defaultImport: true,
|
|
17513
17573
|
args: JSON.stringify(starlightConfig, null, 2)
|
|
17514
17574
|
};
|
|
17575
|
+
const resolvedOutdir = userOptions.outdir ?? (role === STARLIGHT_ROLE.DOCS ? MONOREPO_LAYOUT.DOCS : void 0);
|
|
17515
17576
|
const mergedOptions = {
|
|
17516
17577
|
...userOptions,
|
|
17578
|
+
outdir: resolvedOutdir,
|
|
17517
17579
|
integrations: [starlightSpec, ...userOptions.integrations ?? []],
|
|
17518
17580
|
depsUpgradeOptions: {
|
|
17519
17581
|
...userOptions.depsUpgradeOptions,
|
|
@@ -17525,6 +17587,7 @@ var StarlightProject = class extends AstroProject {
|
|
|
17525
17587
|
}
|
|
17526
17588
|
};
|
|
17527
17589
|
super(mergedOptions);
|
|
17590
|
+
this.role = role;
|
|
17528
17591
|
const starlightVersion = userOptions.starlightVersion ?? VERSION.STARLIGHT_VERSION;
|
|
17529
17592
|
const sharpVersion = userOptions.sharpVersion ?? VERSION.SHARP_VERSION;
|
|
17530
17593
|
this.addDeps(
|
|
@@ -17652,6 +17715,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
17652
17715
|
ROOT_CI_TASK_NAME,
|
|
17653
17716
|
ROOT_TURBO_TASK_NAME,
|
|
17654
17717
|
ResetTask,
|
|
17718
|
+
STARLIGHT_ROLE,
|
|
17655
17719
|
StarlightProject,
|
|
17656
17720
|
TestRunner,
|
|
17657
17721
|
TurboRepo,
|
|
@@ -17671,6 +17735,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
17671
17735
|
bcmWriterBundle,
|
|
17672
17736
|
companyProfileBundle,
|
|
17673
17737
|
formatLayoutViolation,
|
|
17738
|
+
formatStarlightSingletonViolation,
|
|
17674
17739
|
getLatestEligibleVersion,
|
|
17675
17740
|
githubWorkflowBundle,
|
|
17676
17741
|
industryDiscoveryBundle,
|
|
@@ -17697,6 +17762,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
17697
17762
|
turborepoBundle,
|
|
17698
17763
|
typescriptBundle,
|
|
17699
17764
|
validateMonorepoLayout,
|
|
17765
|
+
validateStarlightSingleton,
|
|
17700
17766
|
vitestBundle
|
|
17701
17767
|
});
|
|
17702
17768
|
//# sourceMappingURL=index.js.map
|