@orkestrel/scaffold 0.0.4 → 0.0.6
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/dist/bin/scaffold.js +57 -22
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/CLAUDE.md +18 -4
- package/dist/host/claude/agents/codex.md +16 -0
- package/dist/host/claude/rules/workspace.md +8 -8
- package/dist/host/guides/src/scaffold.md +144 -42
- package/dist/host/scripts/codex.sh +5 -0
- package/dist/host/tests/setupPolicy.ts +178 -4
- package/dist/src/core/index.cjs +285 -129
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +109 -25
- package/dist/src/core/index.d.ts +109 -25
- package/dist/src/core/index.js +283 -130
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +11 -5
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +4 -2
- package/dist/src/server/index.d.ts +4 -2
- package/dist/src/server/index.js +12 -6
- package/dist/src/server/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -144,7 +144,7 @@ export declare interface ArtifactBase {
|
|
|
144
144
|
*
|
|
145
145
|
* @returns A fresh `ContractShape` describing one planned file.
|
|
146
146
|
*/
|
|
147
|
-
export declare function artifactShape(): UnionShape<[ ObjectShape<{
|
|
147
|
+
export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
|
|
148
148
|
path: StringShape;
|
|
149
149
|
group: LiteralShape<readonly Group[]>;
|
|
150
150
|
origin: LiteralShape<readonly ["host"]>;
|
|
@@ -305,7 +305,7 @@ export declare function blueprintToMembers(spec: Blueprint): readonly Member[];
|
|
|
305
305
|
/**
|
|
306
306
|
* The full pure compilation: draft a blueprint's artifacts — the manifest and
|
|
307
307
|
* exports combination rules over the per-environment `SRC_MATRIX` rows, plus
|
|
308
|
-
* `HOST_PATHS` and `overrides` — then pin.
|
|
308
|
+
* the `selectHostPaths` selection of `HOST_PATHS` and `overrides` — then pin.
|
|
309
309
|
*
|
|
310
310
|
* @param blueprint - The `Blueprint` to compile.
|
|
311
311
|
* @param groups - An optional `Group[]` selection (default: all groups).
|
|
@@ -644,7 +644,7 @@ export declare function contentToHex(content: string): string;
|
|
|
644
644
|
export declare const CONTROL_CHARACTER_PATTERN: RegExp;
|
|
645
645
|
|
|
646
646
|
/**
|
|
647
|
-
* `configs/src/tsconfig.core.json` —
|
|
647
|
+
* `configs/src/tsconfig.core.json` — host-neutral core with web interop declarations.
|
|
648
648
|
*
|
|
649
649
|
* @returns The core environment `tsconfig` file content, newline-terminated.
|
|
650
650
|
*
|
|
@@ -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.
|
|
@@ -1041,12 +1042,15 @@ export declare function coreViteConfig(): string;
|
|
|
1041
1042
|
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Draft the `guides` group's artifacts — the package's own filled guide stub,
|
|
1044
|
-
* the guides index, and
|
|
1045
|
+
* the guides index, and vendored dependency guide mirrors whose paths are
|
|
1046
|
+
* neither the package's own guide nor already carried by the selected host
|
|
1047
|
+
* set.
|
|
1045
1048
|
*
|
|
1046
1049
|
* @param spec - The `Blueprint` to derive guide artifacts from.
|
|
1047
1050
|
* @param pascal - The package's PascalCase entity name.
|
|
1048
1051
|
* @param members - The blueprint's derived `Member[]`.
|
|
1049
|
-
* @returns The `guides` group's `Artifact[]
|
|
1052
|
+
* @returns The `guides` group's `Artifact[]`, with one contributor per guide
|
|
1053
|
+
* path.
|
|
1050
1054
|
*
|
|
1051
1055
|
* @example
|
|
1052
1056
|
* ```ts
|
|
@@ -1183,9 +1187,12 @@ export declare function coreViteConfig(): string;
|
|
|
1183
1187
|
* The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
|
|
1184
1188
|
* the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
|
|
1185
1189
|
* `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
|
|
1186
|
-
* the line's seven byte-identical root dotfiles, and the two guides-grouped
|
|
1187
|
-
* dev-tooling guide
|
|
1188
|
-
* scaffold engine's own self-guide
|
|
1190
|
+
* the line's seven byte-identical root dotfiles, and the two guides-grouped
|
|
1191
|
+
* mirror candidates: the line-wide dev-tooling guide
|
|
1192
|
+
* (`guides/src/guide.md`) and the scaffold engine's own self-guide
|
|
1193
|
+
* (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
|
|
1194
|
+
* subset selected by `selectHostPaths`, omitting the target blueprint's own
|
|
1195
|
+
* guide.
|
|
1189
1196
|
*/
|
|
1190
1197
|
export declare const HOST_PATHS: readonly string[];
|
|
1191
1198
|
|
|
@@ -1392,6 +1399,24 @@ export declare function coreViteConfig(): string;
|
|
|
1392
1399
|
*/
|
|
1393
1400
|
export declare function manifestToDependencies(manifestText: string): readonly Dependency[];
|
|
1394
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Project a `package.json` text to its own string `name`.
|
|
1404
|
+
*
|
|
1405
|
+
* @param manifest - The `package.json` file content.
|
|
1406
|
+
* @returns The own string `name`, or `undefined` when the manifest exceeds its
|
|
1407
|
+
* byte ceiling, is malformed, has a non-object root, or has no own string
|
|
1408
|
+
* `name`.
|
|
1409
|
+
*
|
|
1410
|
+
* @example
|
|
1411
|
+
* ```ts
|
|
1412
|
+
* import { manifestToName } from '@orkestrel/scaffold'
|
|
1413
|
+
*
|
|
1414
|
+
* manifestToName('{"name":"@orkestrel/router"}') // '@orkestrel/router'
|
|
1415
|
+
* manifestToName('{}') // undefined
|
|
1416
|
+
* ```
|
|
1417
|
+
*/
|
|
1418
|
+
export declare function manifestToName(manifest: string): string | undefined;
|
|
1419
|
+
|
|
1395
1420
|
/** Maximum byte size accepted for one scaffold artifact. */
|
|
1396
1421
|
export declare const MAX_ARTIFACT_BYTES = 5242880;
|
|
1397
1422
|
|
|
@@ -1492,12 +1517,13 @@ export declare function coreViteConfig(): string;
|
|
|
1492
1517
|
export declare const ORKESTREL_RANGE_PATTERN: RegExp;
|
|
1493
1518
|
|
|
1494
1519
|
/**
|
|
1495
|
-
* One
|
|
1520
|
+
* One artifact override.
|
|
1496
1521
|
*
|
|
1497
1522
|
* @remarks
|
|
1498
1523
|
* `content` REPLACES the rendered artifact at `path`, never partially merges.
|
|
1499
|
-
* An override whose `path` matches no planned artifact,
|
|
1500
|
-
* `host`-origin path, is a BLOCKING question
|
|
1524
|
+
* An override whose `path` matches no planned artifact, targets a
|
|
1525
|
+
* `host`-origin path, or targets `package.json` is a BLOCKING question.
|
|
1526
|
+
* Accepted overrides surface as retained non-blocking advisories.
|
|
1501
1527
|
*/
|
|
1502
1528
|
export declare interface Override {
|
|
1503
1529
|
readonly path: string;
|
|
@@ -1930,7 +1956,7 @@ export declare function coreViteConfig(): string;
|
|
|
1930
1956
|
engine: BooleanShape;
|
|
1931
1957
|
}, false>;
|
|
1932
1958
|
groups: ArrayShape<LiteralShape<readonly Group[]>>;
|
|
1933
|
-
artifacts: ArrayShape<UnionShape<[ ObjectShape<{
|
|
1959
|
+
artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
|
|
1934
1960
|
path: StringShape;
|
|
1935
1961
|
group: LiteralShape<readonly Group[]>;
|
|
1936
1962
|
origin: LiteralShape<readonly ["host"]>;
|
|
@@ -2131,7 +2157,7 @@ export declare function coreViteConfig(): string;
|
|
|
2131
2157
|
export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
|
|
2132
2158
|
|
|
2133
2159
|
/** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
|
|
2134
|
-
export declare const SCAFFOLD_RANGE = "^0.0.
|
|
2160
|
+
export declare const SCAFFOLD_RANGE = "^0.0.6";
|
|
2135
2161
|
|
|
2136
2162
|
/**
|
|
2137
2163
|
* Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
|
|
@@ -2174,6 +2200,20 @@ export declare function coreViteConfig(): string;
|
|
|
2174
2200
|
readonly digest: string;
|
|
2175
2201
|
}
|
|
2176
2202
|
|
|
2203
|
+
/**
|
|
2204
|
+
* Select host paths without the guide owned by the target blueprint.
|
|
2205
|
+
*
|
|
2206
|
+
* @param paths - Host artifact paths in deterministic input order.
|
|
2207
|
+
* @param name - The target blueprint's unscoped package name.
|
|
2208
|
+
* @returns Every host path except `guides/src/<name>.md`, in input order.
|
|
2209
|
+
*
|
|
2210
|
+
* @example
|
|
2211
|
+
* ```ts
|
|
2212
|
+
* selectHostPaths(['guides/src/guide.md', 'LICENSE'], 'guide') // ['LICENSE']
|
|
2213
|
+
* ```
|
|
2214
|
+
*/
|
|
2215
|
+
export declare function selectHostPaths(paths: readonly string[], name: string): readonly string[];
|
|
2216
|
+
|
|
2177
2217
|
/**
|
|
2178
2218
|
* Serialize text as a single-quoted TypeScript string literal.
|
|
2179
2219
|
*
|
|
@@ -2570,22 +2610,66 @@ export declare function coreViteConfig(): string;
|
|
|
2570
2610
|
|
|
2571
2611
|
/**
|
|
2572
2612
|
* The rendered import / `resolve` header block every `rootViteConfig` shape
|
|
2573
|
-
* prefixes — the
|
|
2574
|
-
* `
|
|
2575
|
-
*
|
|
2576
|
-
*
|
|
2577
|
-
* `core
|
|
2578
|
-
*
|
|
2579
|
-
*
|
|
2580
|
-
* @param
|
|
2613
|
+
* prefixes — the environment boundary and every guarantee it enforces ship
|
|
2614
|
+
* unconditionally; `machinery` selects only the host-specific pipelines layered
|
|
2615
|
+
* over them, per the three grounded `rootViteConfig` shapes: browser machinery
|
|
2616
|
+
* unconditional for a multi-environment blueprint carrying `browser`,
|
|
2617
|
+
* conditional on the sole environment being `'browser'` for a single non-`core`
|
|
2618
|
+
* environment, absent for `core`-only.
|
|
2619
|
+
*
|
|
2620
|
+
* @param machinery - The host-specific machinery this shape carries, from `viteMachinery`.
|
|
2581
2621
|
* @returns The rendered header block, newline-terminated.
|
|
2582
2622
|
*
|
|
2583
2623
|
* @example
|
|
2584
2624
|
* ```ts
|
|
2585
|
-
* viteHeader(
|
|
2586
|
-
* viteHeader(
|
|
2625
|
+
* viteHeader(viteMachinery(['core'])).includes('@vitest/browser-playwright') // false
|
|
2626
|
+
* viteHeader(viteMachinery(['core', 'browser'])).includes('@vitest/browser-playwright') // true
|
|
2627
|
+
* ```
|
|
2628
|
+
*/
|
|
2629
|
+
export declare function viteHeader(machinery: ViteMachinery): string;
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Which host-specific machinery a generated root `vite.config.ts` carries.
|
|
2633
|
+
*
|
|
2634
|
+
* @remarks
|
|
2635
|
+
* The boundary GUARANTEES never vary by blueprint: every generated
|
|
2636
|
+
* configuration emits the environment-boundary plugin, its module-graph AST
|
|
2637
|
+
* audit, and stylesheet rejection, because those enforce owner-independent
|
|
2638
|
+
* laws. Only the host-specific pipelines below are selected by the declared
|
|
2639
|
+
* environments. `browser` covers everything a declared browser environment
|
|
2640
|
+
* needs — the CSS pipeline and the Playwright-backed browser test project;
|
|
2641
|
+
* `vue` adds the single-file-component, HTML, and development-server
|
|
2642
|
+
* machinery an application browser environment needs; `output` adds build
|
|
2643
|
+
* output containment, which an application of `core` alone never builds.
|
|
2644
|
+
*/
|
|
2645
|
+
export declare interface ViteMachinery {
|
|
2646
|
+
readonly browser: boolean;
|
|
2647
|
+
readonly vue: boolean;
|
|
2648
|
+
readonly output: boolean;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
/**
|
|
2652
|
+
* Derive which host-specific machinery a workspace's generated root
|
|
2653
|
+
* `vite.config.ts` carries from its declared environments.
|
|
2654
|
+
*
|
|
2655
|
+
* @remarks
|
|
2656
|
+
* This is the SOLE derivation of that set; `rootViteConfig`,
|
|
2657
|
+
* `singleSrcViteConfig`, `applicationViteConfig`, and `configArtifacts` all
|
|
2658
|
+
* read it rather than recomputing an axis of their own. Nothing here selects
|
|
2659
|
+
* a boundary GUARANTEE — the environment-boundary plugin, its module-graph
|
|
2660
|
+
* AST audit, and stylesheet rejection ship in every shape.
|
|
2661
|
+
*
|
|
2662
|
+
* @param src - The declared published `Environment[]`.
|
|
2663
|
+
* @param app - The declared application `Environment[]`, defaulting to none.
|
|
2664
|
+
* @param engine - Whether the workspace also builds its own executable.
|
|
2665
|
+
* @returns The machinery set the generated header renders.
|
|
2666
|
+
*
|
|
2667
|
+
* @example
|
|
2668
|
+
* ```ts
|
|
2669
|
+
* viteMachinery(['core']) // { browser: false, vue: false, output: true }
|
|
2670
|
+
* viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
|
|
2587
2671
|
* ```
|
|
2588
2672
|
*/
|
|
2589
|
-
export declare function
|
|
2673
|
+
export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], engine?: boolean): ViteMachinery;
|
|
2590
2674
|
|
|
2591
2675
|
export { }
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ export declare interface ArtifactBase {
|
|
|
144
144
|
*
|
|
145
145
|
* @returns A fresh `ContractShape` describing one planned file.
|
|
146
146
|
*/
|
|
147
|
-
export declare function artifactShape(): UnionShape<[ ObjectShape<{
|
|
147
|
+
export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
|
|
148
148
|
path: StringShape;
|
|
149
149
|
group: LiteralShape<readonly Group[]>;
|
|
150
150
|
origin: LiteralShape<readonly ["host"]>;
|
|
@@ -305,7 +305,7 @@ export declare function blueprintToMembers(spec: Blueprint): readonly Member[];
|
|
|
305
305
|
/**
|
|
306
306
|
* The full pure compilation: draft a blueprint's artifacts — the manifest and
|
|
307
307
|
* exports combination rules over the per-environment `SRC_MATRIX` rows, plus
|
|
308
|
-
* `HOST_PATHS` and `overrides` — then pin.
|
|
308
|
+
* the `selectHostPaths` selection of `HOST_PATHS` and `overrides` — then pin.
|
|
309
309
|
*
|
|
310
310
|
* @param blueprint - The `Blueprint` to compile.
|
|
311
311
|
* @param groups - An optional `Group[]` selection (default: all groups).
|
|
@@ -644,7 +644,7 @@ export declare function contentToHex(content: string): string;
|
|
|
644
644
|
export declare const CONTROL_CHARACTER_PATTERN: RegExp;
|
|
645
645
|
|
|
646
646
|
/**
|
|
647
|
-
* `configs/src/tsconfig.core.json` —
|
|
647
|
+
* `configs/src/tsconfig.core.json` — host-neutral core with web interop declarations.
|
|
648
648
|
*
|
|
649
649
|
* @returns The core environment `tsconfig` file content, newline-terminated.
|
|
650
650
|
*
|
|
@@ -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.
|
|
@@ -1041,12 +1042,15 @@ export declare function coreViteConfig(): string;
|
|
|
1041
1042
|
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Draft the `guides` group's artifacts — the package's own filled guide stub,
|
|
1044
|
-
* the guides index, and
|
|
1045
|
+
* the guides index, and vendored dependency guide mirrors whose paths are
|
|
1046
|
+
* neither the package's own guide nor already carried by the selected host
|
|
1047
|
+
* set.
|
|
1045
1048
|
*
|
|
1046
1049
|
* @param spec - The `Blueprint` to derive guide artifacts from.
|
|
1047
1050
|
* @param pascal - The package's PascalCase entity name.
|
|
1048
1051
|
* @param members - The blueprint's derived `Member[]`.
|
|
1049
|
-
* @returns The `guides` group's `Artifact[]
|
|
1052
|
+
* @returns The `guides` group's `Artifact[]`, with one contributor per guide
|
|
1053
|
+
* path.
|
|
1050
1054
|
*
|
|
1051
1055
|
* @example
|
|
1052
1056
|
* ```ts
|
|
@@ -1183,9 +1187,12 @@ export declare function coreViteConfig(): string;
|
|
|
1183
1187
|
* The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
|
|
1184
1188
|
* the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
|
|
1185
1189
|
* `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
|
|
1186
|
-
* the line's seven byte-identical root dotfiles, and the two guides-grouped
|
|
1187
|
-
* dev-tooling guide
|
|
1188
|
-
* scaffold engine's own self-guide
|
|
1190
|
+
* the line's seven byte-identical root dotfiles, and the two guides-grouped
|
|
1191
|
+
* mirror candidates: the line-wide dev-tooling guide
|
|
1192
|
+
* (`guides/src/guide.md`) and the scaffold engine's own self-guide
|
|
1193
|
+
* (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
|
|
1194
|
+
* subset selected by `selectHostPaths`, omitting the target blueprint's own
|
|
1195
|
+
* guide.
|
|
1189
1196
|
*/
|
|
1190
1197
|
export declare const HOST_PATHS: readonly string[];
|
|
1191
1198
|
|
|
@@ -1392,6 +1399,24 @@ export declare function coreViteConfig(): string;
|
|
|
1392
1399
|
*/
|
|
1393
1400
|
export declare function manifestToDependencies(manifestText: string): readonly Dependency[];
|
|
1394
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Project a `package.json` text to its own string `name`.
|
|
1404
|
+
*
|
|
1405
|
+
* @param manifest - The `package.json` file content.
|
|
1406
|
+
* @returns The own string `name`, or `undefined` when the manifest exceeds its
|
|
1407
|
+
* byte ceiling, is malformed, has a non-object root, or has no own string
|
|
1408
|
+
* `name`.
|
|
1409
|
+
*
|
|
1410
|
+
* @example
|
|
1411
|
+
* ```ts
|
|
1412
|
+
* import { manifestToName } from '@orkestrel/scaffold'
|
|
1413
|
+
*
|
|
1414
|
+
* manifestToName('{"name":"@orkestrel/router"}') // '@orkestrel/router'
|
|
1415
|
+
* manifestToName('{}') // undefined
|
|
1416
|
+
* ```
|
|
1417
|
+
*/
|
|
1418
|
+
export declare function manifestToName(manifest: string): string | undefined;
|
|
1419
|
+
|
|
1395
1420
|
/** Maximum byte size accepted for one scaffold artifact. */
|
|
1396
1421
|
export declare const MAX_ARTIFACT_BYTES = 5242880;
|
|
1397
1422
|
|
|
@@ -1492,12 +1517,13 @@ export declare function coreViteConfig(): string;
|
|
|
1492
1517
|
export declare const ORKESTREL_RANGE_PATTERN: RegExp;
|
|
1493
1518
|
|
|
1494
1519
|
/**
|
|
1495
|
-
* One
|
|
1520
|
+
* One artifact override.
|
|
1496
1521
|
*
|
|
1497
1522
|
* @remarks
|
|
1498
1523
|
* `content` REPLACES the rendered artifact at `path`, never partially merges.
|
|
1499
|
-
* An override whose `path` matches no planned artifact,
|
|
1500
|
-
* `host`-origin path, is a BLOCKING question
|
|
1524
|
+
* An override whose `path` matches no planned artifact, targets a
|
|
1525
|
+
* `host`-origin path, or targets `package.json` is a BLOCKING question.
|
|
1526
|
+
* Accepted overrides surface as retained non-blocking advisories.
|
|
1501
1527
|
*/
|
|
1502
1528
|
export declare interface Override {
|
|
1503
1529
|
readonly path: string;
|
|
@@ -1930,7 +1956,7 @@ export declare function coreViteConfig(): string;
|
|
|
1930
1956
|
engine: BooleanShape;
|
|
1931
1957
|
}, false>;
|
|
1932
1958
|
groups: ArrayShape<LiteralShape<readonly Group[]>>;
|
|
1933
|
-
artifacts: ArrayShape<UnionShape<[ ObjectShape<{
|
|
1959
|
+
artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
|
|
1934
1960
|
path: StringShape;
|
|
1935
1961
|
group: LiteralShape<readonly Group[]>;
|
|
1936
1962
|
origin: LiteralShape<readonly ["host"]>;
|
|
@@ -2131,7 +2157,7 @@ export declare function coreViteConfig(): string;
|
|
|
2131
2157
|
export declare function rootViteConfig(src: readonly Environment[], engine?: boolean): string;
|
|
2132
2158
|
|
|
2133
2159
|
/** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
|
|
2134
|
-
export declare const SCAFFOLD_RANGE = "^0.0.
|
|
2160
|
+
export declare const SCAFFOLD_RANGE = "^0.0.6";
|
|
2135
2161
|
|
|
2136
2162
|
/**
|
|
2137
2163
|
* Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
|
|
@@ -2174,6 +2200,20 @@ export declare function coreViteConfig(): string;
|
|
|
2174
2200
|
readonly digest: string;
|
|
2175
2201
|
}
|
|
2176
2202
|
|
|
2203
|
+
/**
|
|
2204
|
+
* Select host paths without the guide owned by the target blueprint.
|
|
2205
|
+
*
|
|
2206
|
+
* @param paths - Host artifact paths in deterministic input order.
|
|
2207
|
+
* @param name - The target blueprint's unscoped package name.
|
|
2208
|
+
* @returns Every host path except `guides/src/<name>.md`, in input order.
|
|
2209
|
+
*
|
|
2210
|
+
* @example
|
|
2211
|
+
* ```ts
|
|
2212
|
+
* selectHostPaths(['guides/src/guide.md', 'LICENSE'], 'guide') // ['LICENSE']
|
|
2213
|
+
* ```
|
|
2214
|
+
*/
|
|
2215
|
+
export declare function selectHostPaths(paths: readonly string[], name: string): readonly string[];
|
|
2216
|
+
|
|
2177
2217
|
/**
|
|
2178
2218
|
* Serialize text as a single-quoted TypeScript string literal.
|
|
2179
2219
|
*
|
|
@@ -2570,22 +2610,66 @@ export declare function coreViteConfig(): string;
|
|
|
2570
2610
|
|
|
2571
2611
|
/**
|
|
2572
2612
|
* The rendered import / `resolve` header block every `rootViteConfig` shape
|
|
2573
|
-
* prefixes — the
|
|
2574
|
-
* `
|
|
2575
|
-
*
|
|
2576
|
-
*
|
|
2577
|
-
* `core
|
|
2578
|
-
*
|
|
2579
|
-
*
|
|
2580
|
-
* @param
|
|
2613
|
+
* prefixes — the environment boundary and every guarantee it enforces ship
|
|
2614
|
+
* unconditionally; `machinery` selects only the host-specific pipelines layered
|
|
2615
|
+
* over them, per the three grounded `rootViteConfig` shapes: browser machinery
|
|
2616
|
+
* unconditional for a multi-environment blueprint carrying `browser`,
|
|
2617
|
+
* conditional on the sole environment being `'browser'` for a single non-`core`
|
|
2618
|
+
* environment, absent for `core`-only.
|
|
2619
|
+
*
|
|
2620
|
+
* @param machinery - The host-specific machinery this shape carries, from `viteMachinery`.
|
|
2581
2621
|
* @returns The rendered header block, newline-terminated.
|
|
2582
2622
|
*
|
|
2583
2623
|
* @example
|
|
2584
2624
|
* ```ts
|
|
2585
|
-
* viteHeader(
|
|
2586
|
-
* viteHeader(
|
|
2625
|
+
* viteHeader(viteMachinery(['core'])).includes('@vitest/browser-playwright') // false
|
|
2626
|
+
* viteHeader(viteMachinery(['core', 'browser'])).includes('@vitest/browser-playwright') // true
|
|
2627
|
+
* ```
|
|
2628
|
+
*/
|
|
2629
|
+
export declare function viteHeader(machinery: ViteMachinery): string;
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Which host-specific machinery a generated root `vite.config.ts` carries.
|
|
2633
|
+
*
|
|
2634
|
+
* @remarks
|
|
2635
|
+
* The boundary GUARANTEES never vary by blueprint: every generated
|
|
2636
|
+
* configuration emits the environment-boundary plugin, its module-graph AST
|
|
2637
|
+
* audit, and stylesheet rejection, because those enforce owner-independent
|
|
2638
|
+
* laws. Only the host-specific pipelines below are selected by the declared
|
|
2639
|
+
* environments. `browser` covers everything a declared browser environment
|
|
2640
|
+
* needs — the CSS pipeline and the Playwright-backed browser test project;
|
|
2641
|
+
* `vue` adds the single-file-component, HTML, and development-server
|
|
2642
|
+
* machinery an application browser environment needs; `output` adds build
|
|
2643
|
+
* output containment, which an application of `core` alone never builds.
|
|
2644
|
+
*/
|
|
2645
|
+
export declare interface ViteMachinery {
|
|
2646
|
+
readonly browser: boolean;
|
|
2647
|
+
readonly vue: boolean;
|
|
2648
|
+
readonly output: boolean;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
/**
|
|
2652
|
+
* Derive which host-specific machinery a workspace's generated root
|
|
2653
|
+
* `vite.config.ts` carries from its declared environments.
|
|
2654
|
+
*
|
|
2655
|
+
* @remarks
|
|
2656
|
+
* This is the SOLE derivation of that set; `rootViteConfig`,
|
|
2657
|
+
* `singleSrcViteConfig`, `applicationViteConfig`, and `configArtifacts` all
|
|
2658
|
+
* read it rather than recomputing an axis of their own. Nothing here selects
|
|
2659
|
+
* a boundary GUARANTEE — the environment-boundary plugin, its module-graph
|
|
2660
|
+
* AST audit, and stylesheet rejection ship in every shape.
|
|
2661
|
+
*
|
|
2662
|
+
* @param src - The declared published `Environment[]`.
|
|
2663
|
+
* @param app - The declared application `Environment[]`, defaulting to none.
|
|
2664
|
+
* @param engine - Whether the workspace also builds its own executable.
|
|
2665
|
+
* @returns The machinery set the generated header renders.
|
|
2666
|
+
*
|
|
2667
|
+
* @example
|
|
2668
|
+
* ```ts
|
|
2669
|
+
* viteMachinery(['core']) // { browser: false, vue: false, output: true }
|
|
2670
|
+
* viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
|
|
2587
2671
|
* ```
|
|
2588
2672
|
*/
|
|
2589
|
-
export declare function
|
|
2673
|
+
export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], engine?: boolean): ViteMachinery;
|
|
2590
2674
|
|
|
2591
2675
|
export { }
|