@orkestrel/scaffold 0.0.9 → 0.0.11
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 +47 -21
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/guides/src/scaffold.md +64 -29
- package/dist/host/tests/setupPolicy.ts +87 -2
- package/dist/src/core/index.cjs +78 -54
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +51 -21
- package/dist/src/core/index.d.ts +51 -21
- package/dist/src/core/index.js +77 -55
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +9 -3
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +2 -1
- package/dist/src/server/index.d.ts +2 -1
- package/dist/src/server/index.js +11 -5
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ export declare function applicationArtifacts(spec: Blueprint): readonly Artifact
|
|
|
68
68
|
*
|
|
69
69
|
* @param src - Published src environments.
|
|
70
70
|
* @param app - Private app environments.
|
|
71
|
-
* @param
|
|
71
|
+
* @param facts - Optional structural facts.
|
|
72
72
|
* @returns The root `vite.config.ts` content.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
@@ -76,7 +76,7 @@ export declare function applicationArtifacts(spec: Blueprint): readonly Artifact
|
|
|
76
76
|
* applicationViteConfig([], ['core', 'server']).includes('appServer') // true
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
export declare function applicationViteConfig(src: readonly Environment[], app: readonly Environment[],
|
|
79
|
+
export declare function applicationViteConfig(src: readonly Environment[], app: readonly Environment[], facts?: ViteFacts): string;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Apply a blueprint's `overrides` over a drafted artifact list — an override
|
|
@@ -257,6 +257,8 @@ export declare interface Blueprint {
|
|
|
257
257
|
readonly integration: boolean;
|
|
258
258
|
/** Structural: `true` only for a repo that ships `tests/service` — a slow, opt-in proof project against a foreign running process, outside the default run, never by name. Derivation requires `tests/setupService.ts` and `scripts/service.sh` beside it and fails `TARGET` otherwise. */
|
|
259
259
|
readonly service: boolean;
|
|
260
|
+
/** Structural: `true` only for a repo that carries the physical, exact-case `tests/setupGlobal.ts` module — integration and `srcBrowser` projects consume that shared global setup only under their own additional structural conditions. */
|
|
261
|
+
readonly global: boolean;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
/**
|
|
@@ -268,8 +270,8 @@ export declare interface Blueprint {
|
|
|
268
270
|
* `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
|
|
269
271
|
* `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
|
|
270
272
|
* `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
|
|
271
|
-
* `service` default `false`. `description` is OMITTED entirely
|
|
272
|
-
* the result round-trips the exact-record `Blueprint` guard.
|
|
273
|
+
* `service` / `global` default `false`. `description` is OMITTED entirely
|
|
274
|
+
* when absent, so the result round-trips the exact-record `Blueprint` guard.
|
|
273
275
|
* @returns A complete `Blueprint`.
|
|
274
276
|
*
|
|
275
277
|
* @example
|
|
@@ -326,6 +328,7 @@ export declare function blueprintShape(): ObjectShape<{
|
|
|
326
328
|
bin: BooleanShape;
|
|
327
329
|
integration: BooleanShape;
|
|
328
330
|
service: BooleanShape;
|
|
331
|
+
global: BooleanShape;
|
|
329
332
|
}, false>;
|
|
330
333
|
|
|
331
334
|
/**
|
|
@@ -1038,6 +1041,21 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1038
1041
|
*/
|
|
1039
1042
|
export declare function findPathConflict(paths: readonly string[]): readonly [existing: string, duplicate: string] | undefined;
|
|
1040
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* Test whether a complete rendered line fits the fleet formatter's print width.
|
|
1046
|
+
*
|
|
1047
|
+
* @param text - The complete rendered line, including indentation and trailing punctuation.
|
|
1048
|
+
* @returns Whether the line fits within `JSON_PRINT_WIDTH`.
|
|
1049
|
+
*
|
|
1050
|
+
* @example
|
|
1051
|
+
* ```ts
|
|
1052
|
+
* import { fitsPrintWidth } from '@orkestrel/scaffold'
|
|
1053
|
+
*
|
|
1054
|
+
* fitsPrintWidth('\t["ESNext"],') // true
|
|
1055
|
+
* ```
|
|
1056
|
+
*/
|
|
1057
|
+
export declare function fitsPrintWidth(text: string): boolean;
|
|
1058
|
+
|
|
1041
1059
|
/**
|
|
1042
1060
|
* Serialize a value to newline-terminated JSON that matches the fleet's own
|
|
1043
1061
|
* `oxfmt` output byte-for-byte — objects one key per line, arrays collapsed
|
|
@@ -1077,6 +1095,9 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1077
1095
|
/** Function-declaration token kept out of template literals consumed by parity scans. */
|
|
1078
1096
|
export declare const FUNCTION_KEYWORD = "function";
|
|
1079
1097
|
|
|
1098
|
+
/** The consumer-owned Vitest global-setup module shared by its independently selected projects. */
|
|
1099
|
+
export declare const GLOBAL_SETUP_PATH = "tests/setupGlobal.ts";
|
|
1100
|
+
|
|
1080
1101
|
/** The closed artifact-group vocabulary a plan selects over. */
|
|
1081
1102
|
export declare type Group = 'manifest' | 'configs' | 'source' | 'tests' | 'guides' | 'docs' | 'orchestration';
|
|
1082
1103
|
|
|
@@ -1303,17 +1324,17 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1303
1324
|
/**
|
|
1304
1325
|
* Build the standalone Node-only installed-consumer integration proof project.
|
|
1305
1326
|
*
|
|
1306
|
-
* @param
|
|
1327
|
+
* @param facts - Optional structural facts controlling the shared global setup.
|
|
1307
1328
|
* @returns The emitted `integration` project definition.
|
|
1308
1329
|
*
|
|
1309
1330
|
* @example
|
|
1310
1331
|
* ```ts
|
|
1311
|
-
* integrationViteProject({ bin: true, integration: true }).includes(
|
|
1312
|
-
* "globalSetup: ['./tests/
|
|
1332
|
+
* integrationViteProject({ bin: true, integration: true, global: true }).includes(
|
|
1333
|
+
* "globalSetup: ['./tests/setupGlobal.ts']",
|
|
1313
1334
|
* ) // true
|
|
1314
1335
|
* ```
|
|
1315
1336
|
*/
|
|
1316
|
-
export declare function integrationViteProject(
|
|
1337
|
+
export declare function integrationViteProject(facts?: ViteFacts): string;
|
|
1317
1338
|
|
|
1318
1339
|
/** Visible characters forbidden by portable paths and Markdown path cells. */
|
|
1319
1340
|
export declare const INVALID_PATH_CHARACTER_PATTERN: RegExp;
|
|
@@ -2026,6 +2047,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2026
2047
|
bin: BooleanShape;
|
|
2027
2048
|
integration: BooleanShape;
|
|
2028
2049
|
service: BooleanShape;
|
|
2050
|
+
global: BooleanShape;
|
|
2029
2051
|
}, false>;
|
|
2030
2052
|
groups: ArrayShape<LiteralShape<readonly Group[]>>;
|
|
2031
2053
|
artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
|
|
@@ -2241,9 +2263,9 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2241
2263
|
* environment is `browser` (it must run its own tests in a real browser).
|
|
2242
2264
|
*
|
|
2243
2265
|
* @param src - The declared `Environment[]`.
|
|
2244
|
-
* @param
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2266
|
+
* @param facts - Optional structural facts. `bin` appends the standalone executable
|
|
2267
|
+
* build-and-test project; `integration` and `service` append their standalone
|
|
2268
|
+
* proof projects; `global` wires the shared global-setup module.
|
|
2247
2269
|
* @returns The root `vite.config.ts` file content, newline-terminated.
|
|
2248
2270
|
*
|
|
2249
2271
|
* @example
|
|
@@ -2251,10 +2273,10 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2251
2273
|
* rootViteConfig(['core']).includes('srcCore') // true
|
|
2252
2274
|
* ```
|
|
2253
2275
|
*/
|
|
2254
|
-
export declare function rootViteConfig(src: readonly Environment[],
|
|
2276
|
+
export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
|
|
2255
2277
|
|
|
2256
2278
|
/** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
|
|
2257
|
-
export declare const SCAFFOLD_RANGE = "^0.0.
|
|
2279
|
+
export declare const SCAFFOLD_RANGE = "^0.0.11";
|
|
2258
2280
|
|
|
2259
2281
|
/**
|
|
2260
2282
|
* Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
|
|
@@ -2353,7 +2375,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2353
2375
|
* projects.
|
|
2354
2376
|
*
|
|
2355
2377
|
* @param environment - The sole declared non-`core` environment.
|
|
2356
|
-
* @param
|
|
2378
|
+
* @param facts - Optional structural facts.
|
|
2357
2379
|
* @returns The root `vite.config.ts` file content for a single non-`core` environment, newline-terminated.
|
|
2358
2380
|
*
|
|
2359
2381
|
* @example
|
|
@@ -2361,7 +2383,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2361
2383
|
* singleSrcViteConfig('server').includes('srcServer') // true
|
|
2362
2384
|
* ```
|
|
2363
2385
|
*/
|
|
2364
|
-
export declare function singleSrcViteConfig(environment: 'browser' | 'server',
|
|
2386
|
+
export declare function singleSrcViteConfig(environment: 'browser' | 'server', facts?: ViteFacts): string;
|
|
2365
2387
|
|
|
2366
2388
|
/** Exact lowercase hexadecimal target bytes keyed by artifact-relative path. */
|
|
2367
2389
|
export declare type Snapshot = Readonly<Record<string, string>>;
|
|
@@ -2723,11 +2745,19 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2723
2745
|
readonly note?: string;
|
|
2724
2746
|
}
|
|
2725
2747
|
|
|
2726
|
-
/**
|
|
2727
|
-
|
|
2748
|
+
/**
|
|
2749
|
+
* Optional structural facts consumed by a generated root Vite configuration.
|
|
2750
|
+
*
|
|
2751
|
+
* @remarks
|
|
2752
|
+
* `bin`, `integration`, and `service` select their matching projects.
|
|
2753
|
+
* `global` records the physical `tests/setupGlobal.ts` module and wires it
|
|
2754
|
+
* into every selected project that consumes that shared setup.
|
|
2755
|
+
*/
|
|
2756
|
+
export declare interface ViteFacts {
|
|
2728
2757
|
readonly bin?: boolean;
|
|
2729
2758
|
readonly integration?: boolean;
|
|
2730
2759
|
readonly service?: boolean;
|
|
2760
|
+
readonly global?: boolean;
|
|
2731
2761
|
}
|
|
2732
2762
|
|
|
2733
2763
|
/**
|
|
@@ -2797,7 +2827,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2797
2827
|
/**
|
|
2798
2828
|
* Render the one ordered proof and structural-axis project definition block.
|
|
2799
2829
|
*
|
|
2800
|
-
* @param
|
|
2830
|
+
* @param facts - Optional structural facts.
|
|
2801
2831
|
* @returns Policy, guides, then selected axis project definitions, separated by one blank line.
|
|
2802
2832
|
*
|
|
2803
2833
|
* @example
|
|
@@ -2805,7 +2835,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2805
2835
|
* viteProjectDefinitions({ bin: true }).includes('export const srcBin =') // true
|
|
2806
2836
|
* ```
|
|
2807
2837
|
*/
|
|
2808
|
-
export declare function viteProjectDefinitions(
|
|
2838
|
+
export declare function viteProjectDefinitions(facts?: ViteFacts): string;
|
|
2809
2839
|
|
|
2810
2840
|
/** One generated Vitest project factory and its optional browser-project label. */
|
|
2811
2841
|
export declare interface ViteProjectRegistration {
|
|
@@ -2819,7 +2849,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2819
2849
|
*
|
|
2820
2850
|
* @param src - The declared published environments.
|
|
2821
2851
|
* @param app - The declared application environments.
|
|
2822
|
-
* @param
|
|
2852
|
+
* @param facts - Optional structural facts.
|
|
2823
2853
|
* @returns Source projects, application projects, proof projects, then optional axis projects.
|
|
2824
2854
|
*
|
|
2825
2855
|
* @example
|
|
@@ -2828,6 +2858,6 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2828
2858
|
* // [{ project: 'srcCore' }, { project: 'policy' }, { project: 'guides' }, { project: 'integration' }]
|
|
2829
2859
|
* ```
|
|
2830
2860
|
*/
|
|
2831
|
-
export declare function viteProjectRegistrations(src: readonly Environment[], app?: readonly Environment[],
|
|
2861
|
+
export declare function viteProjectRegistrations(src: readonly Environment[], app?: readonly Environment[], facts?: ViteFacts): readonly ViteProjectRegistration[];
|
|
2832
2862
|
|
|
2833
2863
|
export { }
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare function applicationArtifacts(spec: Blueprint): readonly Artifact
|
|
|
68
68
|
*
|
|
69
69
|
* @param src - Published src environments.
|
|
70
70
|
* @param app - Private app environments.
|
|
71
|
-
* @param
|
|
71
|
+
* @param facts - Optional structural facts.
|
|
72
72
|
* @returns The root `vite.config.ts` content.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
@@ -76,7 +76,7 @@ export declare function applicationArtifacts(spec: Blueprint): readonly Artifact
|
|
|
76
76
|
* applicationViteConfig([], ['core', 'server']).includes('appServer') // true
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
export declare function applicationViteConfig(src: readonly Environment[], app: readonly Environment[],
|
|
79
|
+
export declare function applicationViteConfig(src: readonly Environment[], app: readonly Environment[], facts?: ViteFacts): string;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Apply a blueprint's `overrides` over a drafted artifact list — an override
|
|
@@ -257,6 +257,8 @@ export declare interface Blueprint {
|
|
|
257
257
|
readonly integration: boolean;
|
|
258
258
|
/** Structural: `true` only for a repo that ships `tests/service` — a slow, opt-in proof project against a foreign running process, outside the default run, never by name. Derivation requires `tests/setupService.ts` and `scripts/service.sh` beside it and fails `TARGET` otherwise. */
|
|
259
259
|
readonly service: boolean;
|
|
260
|
+
/** Structural: `true` only for a repo that carries the physical, exact-case `tests/setupGlobal.ts` module — integration and `srcBrowser` projects consume that shared global setup only under their own additional structural conditions. */
|
|
261
|
+
readonly global: boolean;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
/**
|
|
@@ -268,8 +270,8 @@ export declare interface Blueprint {
|
|
|
268
270
|
* `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
|
|
269
271
|
* `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
|
|
270
272
|
* `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
|
|
271
|
-
* `service` default `false`. `description` is OMITTED entirely
|
|
272
|
-
* the result round-trips the exact-record `Blueprint` guard.
|
|
273
|
+
* `service` / `global` default `false`. `description` is OMITTED entirely
|
|
274
|
+
* when absent, so the result round-trips the exact-record `Blueprint` guard.
|
|
273
275
|
* @returns A complete `Blueprint`.
|
|
274
276
|
*
|
|
275
277
|
* @example
|
|
@@ -326,6 +328,7 @@ export declare function blueprintShape(): ObjectShape<{
|
|
|
326
328
|
bin: BooleanShape;
|
|
327
329
|
integration: BooleanShape;
|
|
328
330
|
service: BooleanShape;
|
|
331
|
+
global: BooleanShape;
|
|
329
332
|
}, false>;
|
|
330
333
|
|
|
331
334
|
/**
|
|
@@ -1038,6 +1041,21 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1038
1041
|
*/
|
|
1039
1042
|
export declare function findPathConflict(paths: readonly string[]): readonly [existing: string, duplicate: string] | undefined;
|
|
1040
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* Test whether a complete rendered line fits the fleet formatter's print width.
|
|
1046
|
+
*
|
|
1047
|
+
* @param text - The complete rendered line, including indentation and trailing punctuation.
|
|
1048
|
+
* @returns Whether the line fits within `JSON_PRINT_WIDTH`.
|
|
1049
|
+
*
|
|
1050
|
+
* @example
|
|
1051
|
+
* ```ts
|
|
1052
|
+
* import { fitsPrintWidth } from '@orkestrel/scaffold'
|
|
1053
|
+
*
|
|
1054
|
+
* fitsPrintWidth('\t["ESNext"],') // true
|
|
1055
|
+
* ```
|
|
1056
|
+
*/
|
|
1057
|
+
export declare function fitsPrintWidth(text: string): boolean;
|
|
1058
|
+
|
|
1041
1059
|
/**
|
|
1042
1060
|
* Serialize a value to newline-terminated JSON that matches the fleet's own
|
|
1043
1061
|
* `oxfmt` output byte-for-byte — objects one key per line, arrays collapsed
|
|
@@ -1077,6 +1095,9 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1077
1095
|
/** Function-declaration token kept out of template literals consumed by parity scans. */
|
|
1078
1096
|
export declare const FUNCTION_KEYWORD = "function";
|
|
1079
1097
|
|
|
1098
|
+
/** The consumer-owned Vitest global-setup module shared by its independently selected projects. */
|
|
1099
|
+
export declare const GLOBAL_SETUP_PATH = "tests/setupGlobal.ts";
|
|
1100
|
+
|
|
1080
1101
|
/** The closed artifact-group vocabulary a plan selects over. */
|
|
1081
1102
|
export declare type Group = 'manifest' | 'configs' | 'source' | 'tests' | 'guides' | 'docs' | 'orchestration';
|
|
1082
1103
|
|
|
@@ -1303,17 +1324,17 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
1303
1324
|
/**
|
|
1304
1325
|
* Build the standalone Node-only installed-consumer integration proof project.
|
|
1305
1326
|
*
|
|
1306
|
-
* @param
|
|
1327
|
+
* @param facts - Optional structural facts controlling the shared global setup.
|
|
1307
1328
|
* @returns The emitted `integration` project definition.
|
|
1308
1329
|
*
|
|
1309
1330
|
* @example
|
|
1310
1331
|
* ```ts
|
|
1311
|
-
* integrationViteProject({ bin: true, integration: true }).includes(
|
|
1312
|
-
* "globalSetup: ['./tests/
|
|
1332
|
+
* integrationViteProject({ bin: true, integration: true, global: true }).includes(
|
|
1333
|
+
* "globalSetup: ['./tests/setupGlobal.ts']",
|
|
1313
1334
|
* ) // true
|
|
1314
1335
|
* ```
|
|
1315
1336
|
*/
|
|
1316
|
-
export declare function integrationViteProject(
|
|
1337
|
+
export declare function integrationViteProject(facts?: ViteFacts): string;
|
|
1317
1338
|
|
|
1318
1339
|
/** Visible characters forbidden by portable paths and Markdown path cells. */
|
|
1319
1340
|
export declare const INVALID_PATH_CHARACTER_PATTERN: RegExp;
|
|
@@ -2026,6 +2047,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2026
2047
|
bin: BooleanShape;
|
|
2027
2048
|
integration: BooleanShape;
|
|
2028
2049
|
service: BooleanShape;
|
|
2050
|
+
global: BooleanShape;
|
|
2029
2051
|
}, false>;
|
|
2030
2052
|
groups: ArrayShape<LiteralShape<readonly Group[]>>;
|
|
2031
2053
|
artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
|
|
@@ -2241,9 +2263,9 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2241
2263
|
* environment is `browser` (it must run its own tests in a real browser).
|
|
2242
2264
|
*
|
|
2243
2265
|
* @param src - The declared `Environment[]`.
|
|
2244
|
-
* @param
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2266
|
+
* @param facts - Optional structural facts. `bin` appends the standalone executable
|
|
2267
|
+
* build-and-test project; `integration` and `service` append their standalone
|
|
2268
|
+
* proof projects; `global` wires the shared global-setup module.
|
|
2247
2269
|
* @returns The root `vite.config.ts` file content, newline-terminated.
|
|
2248
2270
|
*
|
|
2249
2271
|
* @example
|
|
@@ -2251,10 +2273,10 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2251
2273
|
* rootViteConfig(['core']).includes('srcCore') // true
|
|
2252
2274
|
* ```
|
|
2253
2275
|
*/
|
|
2254
|
-
export declare function rootViteConfig(src: readonly Environment[],
|
|
2276
|
+
export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
|
|
2255
2277
|
|
|
2256
2278
|
/** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
|
|
2257
|
-
export declare const SCAFFOLD_RANGE = "^0.0.
|
|
2279
|
+
export declare const SCAFFOLD_RANGE = "^0.0.11";
|
|
2258
2280
|
|
|
2259
2281
|
/**
|
|
2260
2282
|
* Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
|
|
@@ -2353,7 +2375,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2353
2375
|
* projects.
|
|
2354
2376
|
*
|
|
2355
2377
|
* @param environment - The sole declared non-`core` environment.
|
|
2356
|
-
* @param
|
|
2378
|
+
* @param facts - Optional structural facts.
|
|
2357
2379
|
* @returns The root `vite.config.ts` file content for a single non-`core` environment, newline-terminated.
|
|
2358
2380
|
*
|
|
2359
2381
|
* @example
|
|
@@ -2361,7 +2383,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2361
2383
|
* singleSrcViteConfig('server').includes('srcServer') // true
|
|
2362
2384
|
* ```
|
|
2363
2385
|
*/
|
|
2364
|
-
export declare function singleSrcViteConfig(environment: 'browser' | 'server',
|
|
2386
|
+
export declare function singleSrcViteConfig(environment: 'browser' | 'server', facts?: ViteFacts): string;
|
|
2365
2387
|
|
|
2366
2388
|
/** Exact lowercase hexadecimal target bytes keyed by artifact-relative path. */
|
|
2367
2389
|
export declare type Snapshot = Readonly<Record<string, string>>;
|
|
@@ -2723,11 +2745,19 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2723
2745
|
readonly note?: string;
|
|
2724
2746
|
}
|
|
2725
2747
|
|
|
2726
|
-
/**
|
|
2727
|
-
|
|
2748
|
+
/**
|
|
2749
|
+
* Optional structural facts consumed by a generated root Vite configuration.
|
|
2750
|
+
*
|
|
2751
|
+
* @remarks
|
|
2752
|
+
* `bin`, `integration`, and `service` select their matching projects.
|
|
2753
|
+
* `global` records the physical `tests/setupGlobal.ts` module and wires it
|
|
2754
|
+
* into every selected project that consumes that shared setup.
|
|
2755
|
+
*/
|
|
2756
|
+
export declare interface ViteFacts {
|
|
2728
2757
|
readonly bin?: boolean;
|
|
2729
2758
|
readonly integration?: boolean;
|
|
2730
2759
|
readonly service?: boolean;
|
|
2760
|
+
readonly global?: boolean;
|
|
2731
2761
|
}
|
|
2732
2762
|
|
|
2733
2763
|
/**
|
|
@@ -2797,7 +2827,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2797
2827
|
/**
|
|
2798
2828
|
* Render the one ordered proof and structural-axis project definition block.
|
|
2799
2829
|
*
|
|
2800
|
-
* @param
|
|
2830
|
+
* @param facts - Optional structural facts.
|
|
2801
2831
|
* @returns Policy, guides, then selected axis project definitions, separated by one blank line.
|
|
2802
2832
|
*
|
|
2803
2833
|
* @example
|
|
@@ -2805,7 +2835,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2805
2835
|
* viteProjectDefinitions({ bin: true }).includes('export const srcBin =') // true
|
|
2806
2836
|
* ```
|
|
2807
2837
|
*/
|
|
2808
|
-
export declare function viteProjectDefinitions(
|
|
2838
|
+
export declare function viteProjectDefinitions(facts?: ViteFacts): string;
|
|
2809
2839
|
|
|
2810
2840
|
/** One generated Vitest project factory and its optional browser-project label. */
|
|
2811
2841
|
export declare interface ViteProjectRegistration {
|
|
@@ -2819,7 +2849,7 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2819
2849
|
*
|
|
2820
2850
|
* @param src - The declared published environments.
|
|
2821
2851
|
* @param app - The declared application environments.
|
|
2822
|
-
* @param
|
|
2852
|
+
* @param facts - Optional structural facts.
|
|
2823
2853
|
* @returns Source projects, application projects, proof projects, then optional axis projects.
|
|
2824
2854
|
*
|
|
2825
2855
|
* @example
|
|
@@ -2828,6 +2858,6 @@ export declare function coreViteConfig(browser?: boolean): string;
|
|
|
2828
2858
|
* // [{ project: 'srcCore' }, { project: 'policy' }, { project: 'guides' }, { project: 'integration' }]
|
|
2829
2859
|
* ```
|
|
2830
2860
|
*/
|
|
2831
|
-
export declare function viteProjectRegistrations(src: readonly Environment[], app?: readonly Environment[],
|
|
2861
|
+
export declare function viteProjectRegistrations(src: readonly Environment[], app?: readonly Environment[], facts?: ViteFacts): readonly ViteProjectRegistration[];
|
|
2832
2862
|
|
|
2833
2863
|
export { }
|