@orkestrel/scaffold 0.0.3 → 0.0.5

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.
@@ -659,6 +659,7 @@ export declare function coreTsconfig(): string;
659
659
  * `configs/src/vite.core.config.ts` — inlines its own `build.lib` /
660
660
  * `rolldownOptions` (core's `srcCore` root export carries no build.lib).
661
661
  *
662
+ * @param browser - Whether a declared browser environment enables the shared CSS pipeline.
662
663
  * @returns The core environment `vite.config.ts` file content, newline-terminated.
663
664
  *
664
665
  * @example
@@ -666,7 +667,7 @@ export declare function coreTsconfig(): string;
666
667
  * coreViteConfig().includes('srcCore(') // true
667
668
  * ```
668
669
  */
669
- export declare function coreViteConfig(): string;
670
+ export declare function coreViteConfig(browser?: boolean): string;
670
671
 
671
672
  /**
672
673
  * Validate and return a `Blueprint` from plain data.
@@ -2131,7 +2132,7 @@ export declare function coreViteConfig(): string;
2131
2132
  export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
2132
2133
 
2133
2134
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2134
- export declare const SCAFFOLD_RANGE = "^0.0.2";
2135
+ export declare const SCAFFOLD_RANGE = "^0.0.5";
2135
2136
 
2136
2137
  /**
2137
2138
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2570,22 +2571,66 @@ export declare function coreViteConfig(): string;
2570
2571
 
2571
2572
  /**
2572
2573
  * The rendered import / `resolve` header block every `rootViteConfig` shape
2573
- * prefixes — the official Playwright provider import appears only when
2574
- * `needsPlaywright`, per the three grounded `rootViteConfig`
2575
- * shapes: unconditional for a multi-environment blueprint, conditional on the
2576
- * sole environment being `'browser'` for a single non-`core` environment, absent for
2577
- * `core`-only.
2578
- *
2579
- * @param needsPlaywright - Whether this shape ships a browser test project (and so needs Playwright).
2580
- * @param needsVue - Whether the generated root imports the Vue Vite plugin.
2574
+ * prefixes — the environment boundary and every guarantee it enforces ship
2575
+ * unconditionally; `machinery` selects only the host-specific pipelines layered
2576
+ * over them, per the three grounded `rootViteConfig` shapes: browser machinery
2577
+ * unconditional for a multi-environment blueprint carrying `browser`,
2578
+ * conditional on the sole environment being `'browser'` for a single non-`core`
2579
+ * environment, absent for `core`-only.
2580
+ *
2581
+ * @param machinery - The host-specific machinery this shape carries, from `viteMachinery`.
2581
2582
  * @returns The rendered header block, newline-terminated.
2582
2583
  *
2583
2584
  * @example
2584
2585
  * ```ts
2585
- * viteHeader(false).includes('@vitest/browser-playwright') // false
2586
- * viteHeader(true).includes('@vitest/browser-playwright') // true
2586
+ * viteHeader(viteMachinery(['core'])).includes('@vitest/browser-playwright') // false
2587
+ * viteHeader(viteMachinery(['core', 'browser'])).includes('@vitest/browser-playwright') // true
2587
2588
  * ```
2588
2589
  */
2589
- export declare function viteHeader(needsPlaywright: boolean, needsVue?: boolean): string;
2590
+ export declare function viteHeader(machinery: ViteMachinery): string;
2591
+
2592
+ /**
2593
+ * Which host-specific machinery a generated root `vite.config.ts` carries.
2594
+ *
2595
+ * @remarks
2596
+ * The boundary GUARANTEES never vary by blueprint: every generated
2597
+ * configuration emits the environment-boundary plugin, its module-graph AST
2598
+ * audit, and stylesheet rejection, because those enforce owner-independent
2599
+ * laws. Only the host-specific pipelines below are selected by the declared
2600
+ * environments. `browser` covers everything a declared browser environment
2601
+ * needs — the CSS pipeline and the Playwright-backed browser test project;
2602
+ * `vue` adds the single-file-component, HTML, and development-server
2603
+ * machinery an application browser environment needs; `output` adds build
2604
+ * output containment, which an application of `core` alone never builds.
2605
+ */
2606
+ export declare interface ViteMachinery {
2607
+ readonly browser: boolean;
2608
+ readonly vue: boolean;
2609
+ readonly output: boolean;
2610
+ }
2611
+
2612
+ /**
2613
+ * Derive which host-specific machinery a workspace's generated root
2614
+ * `vite.config.ts` carries from its declared environments.
2615
+ *
2616
+ * @remarks
2617
+ * This is the SOLE derivation of that set; `rootViteConfig`,
2618
+ * `singleSrcViteConfig`, `applicationViteConfig`, and `configArtifacts` all
2619
+ * read it rather than recomputing an axis of their own. Nothing here selects
2620
+ * a boundary GUARANTEE — the environment-boundary plugin, its module-graph
2621
+ * AST audit, and stylesheet rejection ship in every shape.
2622
+ *
2623
+ * @param src - The declared published `Environment[]`.
2624
+ * @param app - The declared application `Environment[]`, defaulting to none.
2625
+ * @param engine - Whether the workspace also builds its own executable.
2626
+ * @returns The machinery set the generated header renders.
2627
+ *
2628
+ * @example
2629
+ * ```ts
2630
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true }
2631
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
2632
+ * ```
2633
+ */
2634
+ export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], engine?: boolean): ViteMachinery;
2590
2635
 
2591
2636
  export { }
@@ -659,6 +659,7 @@ export declare function coreTsconfig(): string;
659
659
  * `configs/src/vite.core.config.ts` — inlines its own `build.lib` /
660
660
  * `rolldownOptions` (core's `srcCore` root export carries no build.lib).
661
661
  *
662
+ * @param browser - Whether a declared browser environment enables the shared CSS pipeline.
662
663
  * @returns The core environment `vite.config.ts` file content, newline-terminated.
663
664
  *
664
665
  * @example
@@ -666,7 +667,7 @@ export declare function coreTsconfig(): string;
666
667
  * coreViteConfig().includes('srcCore(') // true
667
668
  * ```
668
669
  */
669
- export declare function coreViteConfig(): string;
670
+ export declare function coreViteConfig(browser?: boolean): string;
670
671
 
671
672
  /**
672
673
  * Validate and return a `Blueprint` from plain data.
@@ -2131,7 +2132,7 @@ export declare function coreViteConfig(): string;
2131
2132
  export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
2132
2133
 
2133
2134
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2134
- export declare const SCAFFOLD_RANGE = "^0.0.2";
2135
+ export declare const SCAFFOLD_RANGE = "^0.0.5";
2135
2136
 
2136
2137
  /**
2137
2138
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2570,22 +2571,66 @@ export declare function coreViteConfig(): string;
2570
2571
 
2571
2572
  /**
2572
2573
  * The rendered import / `resolve` header block every `rootViteConfig` shape
2573
- * prefixes — the official Playwright provider import appears only when
2574
- * `needsPlaywright`, per the three grounded `rootViteConfig`
2575
- * shapes: unconditional for a multi-environment blueprint, conditional on the
2576
- * sole environment being `'browser'` for a single non-`core` environment, absent for
2577
- * `core`-only.
2578
- *
2579
- * @param needsPlaywright - Whether this shape ships a browser test project (and so needs Playwright).
2580
- * @param needsVue - Whether the generated root imports the Vue Vite plugin.
2574
+ * prefixes — the environment boundary and every guarantee it enforces ship
2575
+ * unconditionally; `machinery` selects only the host-specific pipelines layered
2576
+ * over them, per the three grounded `rootViteConfig` shapes: browser machinery
2577
+ * unconditional for a multi-environment blueprint carrying `browser`,
2578
+ * conditional on the sole environment being `'browser'` for a single non-`core`
2579
+ * environment, absent for `core`-only.
2580
+ *
2581
+ * @param machinery - The host-specific machinery this shape carries, from `viteMachinery`.
2581
2582
  * @returns The rendered header block, newline-terminated.
2582
2583
  *
2583
2584
  * @example
2584
2585
  * ```ts
2585
- * viteHeader(false).includes('@vitest/browser-playwright') // false
2586
- * viteHeader(true).includes('@vitest/browser-playwright') // true
2586
+ * viteHeader(viteMachinery(['core'])).includes('@vitest/browser-playwright') // false
2587
+ * viteHeader(viteMachinery(['core', 'browser'])).includes('@vitest/browser-playwright') // true
2587
2588
  * ```
2588
2589
  */
2589
- export declare function viteHeader(needsPlaywright: boolean, needsVue?: boolean): string;
2590
+ export declare function viteHeader(machinery: ViteMachinery): string;
2591
+
2592
+ /**
2593
+ * Which host-specific machinery a generated root `vite.config.ts` carries.
2594
+ *
2595
+ * @remarks
2596
+ * The boundary GUARANTEES never vary by blueprint: every generated
2597
+ * configuration emits the environment-boundary plugin, its module-graph AST
2598
+ * audit, and stylesheet rejection, because those enforce owner-independent
2599
+ * laws. Only the host-specific pipelines below are selected by the declared
2600
+ * environments. `browser` covers everything a declared browser environment
2601
+ * needs — the CSS pipeline and the Playwright-backed browser test project;
2602
+ * `vue` adds the single-file-component, HTML, and development-server
2603
+ * machinery an application browser environment needs; `output` adds build
2604
+ * output containment, which an application of `core` alone never builds.
2605
+ */
2606
+ export declare interface ViteMachinery {
2607
+ readonly browser: boolean;
2608
+ readonly vue: boolean;
2609
+ readonly output: boolean;
2610
+ }
2611
+
2612
+ /**
2613
+ * Derive which host-specific machinery a workspace's generated root
2614
+ * `vite.config.ts` carries from its declared environments.
2615
+ *
2616
+ * @remarks
2617
+ * This is the SOLE derivation of that set; `rootViteConfig`,
2618
+ * `singleSrcViteConfig`, `applicationViteConfig`, and `configArtifacts` all
2619
+ * read it rather than recomputing an axis of their own. Nothing here selects
2620
+ * a boundary GUARANTEE — the environment-boundary plugin, its module-graph
2621
+ * AST audit, and stylesheet rejection ship in every shape.
2622
+ *
2623
+ * @param src - The declared published `Environment[]`.
2624
+ * @param app - The declared application `Environment[]`, defaulting to none.
2625
+ * @param engine - Whether the workspace also builds its own executable.
2626
+ * @returns The machinery set the generated header renders.
2627
+ *
2628
+ * @example
2629
+ * ```ts
2630
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true }
2631
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
2632
+ * ```
2633
+ */
2634
+ export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], engine?: boolean): ViteMachinery;
2590
2635
 
2591
2636
  export { }