@orkestrel/scaffold 0.0.18 → 0.0.19

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.
Files changed (65) hide show
  1. package/dist/host/AGENTS.md +4 -2
  2. package/dist/host/CLAUDE.md +22 -10
  3. package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +267 -0
  4. package/dist/host/agents/skills/enterprise-bootstrap/agents/openai.yaml +4 -0
  5. package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +609 -0
  6. package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +994 -0
  7. package/dist/host/agents/skills/enterprise-bootstrap/references/frontend-design.md +59 -0
  8. package/dist/host/agents/skills/enterprise-bootstrap/references/utilities.md +312 -0
  9. package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +4 -13
  10. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +78 -50
  11. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +81 -0
  12. package/dist/host/agents/skills/orkestrel-debrief/agents/openai.yaml +4 -0
  13. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +75 -0
  14. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +11 -9
  15. package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +44 -59
  16. package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +14 -6
  17. package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +113 -0
  18. package/dist/host/agents/skills/orkestrel-polish-surface/agents/openai.yaml +4 -0
  19. package/dist/host/agents/skills/orkestrel-polish-surface/references/capture-harness.md +82 -0
  20. package/dist/host/claude/agents/builder.md +2 -0
  21. package/dist/host/claude/agents/codex.md +33 -26
  22. package/dist/host/claude/agents/grok.md +7 -0
  23. package/dist/host/claude/agents/implementer.md +2 -1
  24. package/dist/host/claude/agents/orkestrel.md +20 -15
  25. package/dist/host/claude/agents/planner.md +2 -1
  26. package/dist/host/claude/agents/reviewer.md +6 -0
  27. package/dist/host/claude/rules/documentation.md +1 -0
  28. package/dist/host/claude/rules/names.md +5 -7
  29. package/dist/host/claude/rules/quality.md +7 -5
  30. package/dist/host/claude/rules/styles.md +1 -0
  31. package/dist/host/claude/rules/tests.md +1 -0
  32. package/dist/host/claude/rules/typescript.md +3 -10
  33. package/dist/host/claude/rules/workspace.md +2 -5
  34. package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +12 -0
  35. package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +12 -0
  36. package/dist/host/claude/skills/orkestrel-polish-surface/SKILL.md +12 -0
  37. package/dist/host/codex/agents/analyst.toml +6 -3
  38. package/dist/host/codex/agents/builder.toml +3 -2
  39. package/dist/host/codex/agents/checker.toml +4 -2
  40. package/dist/host/codex/agents/grok.toml +3 -1
  41. package/dist/host/codex/agents/implementer.toml +4 -2
  42. package/dist/host/codex/agents/opus.toml +5 -3
  43. package/dist/host/codex/agents/orkestrel.toml +6 -5
  44. package/dist/host/codex/agents/planner.toml +6 -2
  45. package/dist/host/codex/agents/reviewer.toml +7 -2
  46. package/dist/host/codex/config.toml +11 -2
  47. package/dist/host/dotfiles/prettierignore +3 -0
  48. package/dist/host/guides/src/scaffold.md +42 -12
  49. package/dist/host/manifest.json +80 -9
  50. package/dist/src/core/index.cjs +162 -14
  51. package/dist/src/core/index.cjs.map +1 -1
  52. package/dist/src/core/index.d.cts +17 -6
  53. package/dist/src/core/index.d.ts +17 -6
  54. package/dist/src/core/index.js +162 -15
  55. package/dist/src/core/index.js.map +1 -1
  56. package/dist/src/server/index.cjs +9 -3
  57. package/dist/src/server/index.cjs.map +1 -1
  58. package/dist/src/server/index.d.cts +2 -1
  59. package/dist/src/server/index.d.ts +2 -1
  60. package/dist/src/server/index.js +10 -4
  61. package/dist/src/server/index.js.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/host/agents/skills/orkestrel-build-application/references/application.md +0 -129
  64. package/dist/host/claude/agents/application.md +0 -30
  65. package/dist/host/codex/agents/application.toml +0 -25
@@ -259,6 +259,8 @@ export declare interface Blueprint {
259
259
  readonly service: boolean;
260
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
261
  readonly global: boolean;
262
+ /** Structural: `true` only for a repo that carries the physical, exact-case `configs/app/vite.showcase.config.ts` regular file; valid only with `app/browser`. */
263
+ readonly showcase: boolean;
262
264
  }
263
265
 
264
266
  /**
@@ -270,7 +272,7 @@ export declare interface Blueprint {
270
272
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
271
273
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
272
274
  * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
273
- * `service` / `global` default `false`. `description` is OMITTED entirely
275
+ * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
274
276
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
275
277
  * @returns A complete `Blueprint`.
276
278
  *
@@ -329,6 +331,7 @@ export declare function blueprintShape(): ObjectShape<{
329
331
  integration: BooleanShape;
330
332
  service: BooleanShape;
331
333
  global: BooleanShape;
334
+ showcase: BooleanShape;
332
335
  }, false>;
333
336
 
334
337
  /**
@@ -2047,6 +2050,7 @@ export declare function coreViteConfig(): string;
2047
2050
  integration: BooleanShape;
2048
2051
  service: BooleanShape;
2049
2052
  global: BooleanShape;
2053
+ showcase: BooleanShape;
2050
2054
  }, false>;
2051
2055
  groups: ArrayShape<LiteralShape<readonly Group[]>>;
2052
2056
  artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
@@ -2275,7 +2279,7 @@ export declare function coreViteConfig(): string;
2275
2279
  export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
2276
2280
 
2277
2281
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2278
- export declare const SCAFFOLD_RANGE = "^0.0.18";
2282
+ export declare const SCAFFOLD_RANGE = "^0.0.19";
2279
2283
 
2280
2284
  /**
2281
2285
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2365,6 +2369,9 @@ export declare function coreViteConfig(): string;
2365
2369
  /** Immutable official actions/setup-node v6.4.0 commit used by generated CI. */
2366
2370
  export declare const SETUP_NODE_ACTION_SHA = "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e";
2367
2371
 
2372
+ /** The consumer-owned Vite wrapper whose physical presence enables the optional app showcase. */
2373
+ export declare const SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
2374
+
2368
2375
  /**
2369
2376
  * The single non-`core` environment's factory IS the base (Shape 3 of
2370
2377
  * `rootViteConfig`) — the environment's own `viteHeader` (Playwright only when
@@ -2750,13 +2757,15 @@ export declare function coreViteConfig(): string;
2750
2757
  * @remarks
2751
2758
  * `bin`, `integration`, and `service` select their matching projects.
2752
2759
  * `global` records the physical `tests/setupGlobal.ts` module and wires it
2753
- * into every selected project that consumes that shared setup.
2760
+ * into every selected project that consumes that shared setup. `showcase`
2761
+ * records the physical app showcase wrapper and selects its browser machinery.
2754
2762
  */
2755
2763
  export declare interface ViteFacts {
2756
2764
  readonly bin?: boolean;
2757
2765
  readonly integration?: boolean;
2758
2766
  readonly service?: boolean;
2759
2767
  readonly global?: boolean;
2768
+ readonly showcase?: boolean;
2760
2769
  }
2761
2770
 
2762
2771
  /**
@@ -2800,6 +2809,7 @@ export declare function coreViteConfig(): string;
2800
2809
  readonly browser: boolean;
2801
2810
  readonly vue: boolean;
2802
2811
  readonly output: boolean;
2812
+ readonly showcase: boolean;
2803
2813
  }
2804
2814
 
2805
2815
  /**
@@ -2816,15 +2826,16 @@ export declare function coreViteConfig(): string;
2816
2826
  * @param src - The declared published `Environment[]`.
2817
2827
  * @param app - The declared application `Environment[]`, defaulting to none.
2818
2828
  * @param bin - Whether the workspace also builds its own executable.
2829
+ * @param showcase - Whether the workspace carries its optional app showcase.
2819
2830
  * @returns The machinery set the generated header renders.
2820
2831
  *
2821
2832
  * @example
2822
2833
  * ```ts
2823
- * viteMachinery(['core']) // { browser: false, vue: false, output: true }
2824
- * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
2834
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true, showcase: false }
2835
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false, showcase: false }
2825
2836
  * ```
2826
2837
  */
2827
- export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], bin?: boolean): ViteMachinery;
2838
+ export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], bin?: boolean, showcase?: boolean): ViteMachinery;
2828
2839
 
2829
2840
  /**
2830
2841
  * Render the one ordered proof and structural-axis project definition block.
@@ -259,6 +259,8 @@ export declare interface Blueprint {
259
259
  readonly service: boolean;
260
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
261
  readonly global: boolean;
262
+ /** Structural: `true` only for a repo that carries the physical, exact-case `configs/app/vite.showcase.config.ts` regular file; valid only with `app/browser`. */
263
+ readonly showcase: boolean;
262
264
  }
263
265
 
264
266
  /**
@@ -270,7 +272,7 @@ export declare interface Blueprint {
270
272
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
271
273
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
272
274
  * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
273
- * `service` / `global` default `false`. `description` is OMITTED entirely
275
+ * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
274
276
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
275
277
  * @returns A complete `Blueprint`.
276
278
  *
@@ -329,6 +331,7 @@ export declare function blueprintShape(): ObjectShape<{
329
331
  integration: BooleanShape;
330
332
  service: BooleanShape;
331
333
  global: BooleanShape;
334
+ showcase: BooleanShape;
332
335
  }, false>;
333
336
 
334
337
  /**
@@ -2047,6 +2050,7 @@ export declare function coreViteConfig(): string;
2047
2050
  integration: BooleanShape;
2048
2051
  service: BooleanShape;
2049
2052
  global: BooleanShape;
2053
+ showcase: BooleanShape;
2050
2054
  }, false>;
2051
2055
  groups: ArrayShape<LiteralShape<readonly Group[]>>;
2052
2056
  artifacts: ArrayShape<UnionShape<readonly [ ObjectShape<{
@@ -2275,7 +2279,7 @@ export declare function coreViteConfig(): string;
2275
2279
  export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
2276
2280
 
2277
2281
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2278
- export declare const SCAFFOLD_RANGE = "^0.0.18";
2282
+ export declare const SCAFFOLD_RANGE = "^0.0.19";
2279
2283
 
2280
2284
  /**
2281
2285
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2365,6 +2369,9 @@ export declare function coreViteConfig(): string;
2365
2369
  /** Immutable official actions/setup-node v6.4.0 commit used by generated CI. */
2366
2370
  export declare const SETUP_NODE_ACTION_SHA = "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e";
2367
2371
 
2372
+ /** The consumer-owned Vite wrapper whose physical presence enables the optional app showcase. */
2373
+ export declare const SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
2374
+
2368
2375
  /**
2369
2376
  * The single non-`core` environment's factory IS the base (Shape 3 of
2370
2377
  * `rootViteConfig`) — the environment's own `viteHeader` (Playwright only when
@@ -2750,13 +2757,15 @@ export declare function coreViteConfig(): string;
2750
2757
  * @remarks
2751
2758
  * `bin`, `integration`, and `service` select their matching projects.
2752
2759
  * `global` records the physical `tests/setupGlobal.ts` module and wires it
2753
- * into every selected project that consumes that shared setup.
2760
+ * into every selected project that consumes that shared setup. `showcase`
2761
+ * records the physical app showcase wrapper and selects its browser machinery.
2754
2762
  */
2755
2763
  export declare interface ViteFacts {
2756
2764
  readonly bin?: boolean;
2757
2765
  readonly integration?: boolean;
2758
2766
  readonly service?: boolean;
2759
2767
  readonly global?: boolean;
2768
+ readonly showcase?: boolean;
2760
2769
  }
2761
2770
 
2762
2771
  /**
@@ -2800,6 +2809,7 @@ export declare function coreViteConfig(): string;
2800
2809
  readonly browser: boolean;
2801
2810
  readonly vue: boolean;
2802
2811
  readonly output: boolean;
2812
+ readonly showcase: boolean;
2803
2813
  }
2804
2814
 
2805
2815
  /**
@@ -2816,15 +2826,16 @@ export declare function coreViteConfig(): string;
2816
2826
  * @param src - The declared published `Environment[]`.
2817
2827
  * @param app - The declared application `Environment[]`, defaulting to none.
2818
2828
  * @param bin - Whether the workspace also builds its own executable.
2829
+ * @param showcase - Whether the workspace carries its optional app showcase.
2819
2830
  * @returns The machinery set the generated header renders.
2820
2831
  *
2821
2832
  * @example
2822
2833
  * ```ts
2823
- * viteMachinery(['core']) // { browser: false, vue: false, output: true }
2824
- * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
2834
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true, showcase: false }
2835
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false, showcase: false }
2825
2836
  * ```
2826
2837
  */
2827
- export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], bin?: boolean): ViteMachinery;
2838
+ export declare function viteMachinery(src: readonly Environment[], app?: readonly Environment[], bin?: boolean, showcase?: boolean): ViteMachinery;
2828
2839
 
2829
2840
  /**
2830
2841
  * Render the one ordered proof and structural-axis project definition block.
@@ -144,6 +144,8 @@ var HOST_PATHS = Object.freeze([
144
144
  var SERVICE_SCRIPT_PATH = "scripts/service.sh";
145
145
  /** The consumer-owned Vitest global-setup module shared by its independently selected projects. */
146
146
  var GLOBAL_SETUP_PATH = "tests/setupGlobal.ts";
147
+ /** The consumer-owned Vite wrapper whose physical presence enables the optional app showcase. */
148
+ var SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
147
149
  /** The package-name RegExp — lowercase alphanumeric-with-hyphens, letter-first. */
148
150
  var NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
149
151
  /** Maximum bare workspace name length beneath the generated `@orkestrel/` scope. */
@@ -226,7 +228,7 @@ var DEFAULT_VERSION = "0.0.1";
226
228
  /** The `engines.node` range the `blueprint` builder fills. */
227
229
  var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
228
230
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
229
- var SCAFFOLD_RANGE = "^0.0.18";
231
+ var SCAFFOLD_RANGE = "^0.0.19";
230
232
  /** Tooling versions shared by scaffold and every generated workspace. */
231
233
  var BASE_DEV_DEPENDENCIES = Object.freeze({
232
234
  "@microsoft/api-extractor": "^7.58.12",
@@ -426,7 +428,7 @@ function member(name, category, summary, environment = "core") {
426
428
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
427
429
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
428
430
  * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
429
- * `service` / `global` default `false`. `description` is OMITTED entirely
431
+ * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
430
432
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
431
433
  * @returns A complete `Blueprint`.
432
434
  *
@@ -452,7 +454,8 @@ function blueprint(name, options) {
452
454
  bin: options?.bin ?? false,
453
455
  integration: options?.integration ?? false,
454
456
  service: options?.service ?? false,
455
- global: options?.global ?? false
457
+ global: options?.global ?? false,
458
+ showcase: options?.showcase ?? false
456
459
  };
457
460
  return options?.description === void 0 ? base : {
458
461
  ...base,
@@ -1360,6 +1363,11 @@ function validateBlueprint(spec) {
1360
1363
  text: "At least one src or app environment is required",
1361
1364
  blocking: true
1362
1365
  });
1366
+ if (spec.showcase && !spec.app.includes("browser")) questions.push({
1367
+ field: "showcase",
1368
+ text: "Showcase requires the app browser environment",
1369
+ blocking: true
1370
+ });
1363
1371
  if (spec.src.length > 0) {
1364
1372
  for (const environment of spec.src) if (!ENVIRONMENTS.includes(environment)) questions.push({
1365
1373
  field: "src",
@@ -1823,7 +1831,8 @@ function blueprintShape() {
1823
1831
  bin: booleanShape(),
1824
1832
  integration: booleanShape(),
1825
1833
  service: booleanShape(),
1826
- global: booleanShape()
1834
+ global: booleanShape(),
1835
+ showcase: booleanShape()
1827
1836
  });
1828
1837
  }
1829
1838
  /**
@@ -5560,6 +5569,7 @@ function devDependenciesFor(spec) {
5560
5569
  ...dependencies,
5561
5570
  ...spec.src.includes("browser") ? SOURCE_BROWSER_DEV_DEPENDENCIES : {},
5562
5571
  ...spec.app.includes("browser") ? APP_BROWSER_DEV_DEPENDENCIES : {},
5572
+ ...spec.showcase ? { "vite-plugin-singlefile": "^2.3.3" } : {},
5563
5573
  ...spec.bin ? { "@vitest/browser-playwright": SOURCE_BROWSER_DEV_DEPENDENCIES["@vitest/browser-playwright"] } : {}
5564
5574
  };
5565
5575
  }
@@ -5643,7 +5653,14 @@ function packageManifest(spec) {
5643
5653
  const runtime = spec.app.filter((environment) => environment !== "core");
5644
5654
  scripts["build:app"] = runtime.length > 0 ? runtime.map((environment) => `npm run build:app:${environment}`).join(" && ") : "npm run check:app:core";
5645
5655
  for (const environment of runtime) scripts[`build:app:${environment}`] = `vite build --config configs/app/vite.${environment}.config.ts`;
5646
- if (spec.app.includes("browser")) scripts.dev = "vite --config configs/app/vite.browser.config.ts";
5656
+ if (spec.app.includes("browser")) {
5657
+ scripts.dev = "vite --config configs/app/vite.browser.config.ts";
5658
+ if (spec.showcase) {
5659
+ scripts.showcase = `vite --config ${SHOWCASE_CONFIG_PATH}`;
5660
+ scripts["build:showcase"] = `vite build --config ${SHOWCASE_CONFIG_PATH}`;
5661
+ scripts.show = "npm run build:showcase && npm run copy dist/showcase/index.html demo/showcase.html";
5662
+ }
5663
+ }
5647
5664
  if (spec.app.includes("server")) {
5648
5665
  scripts.serve = "node dist/app/server/main.cjs";
5649
5666
  scripts["serve:build"] = "npm run build:app:server && npm run serve";
@@ -5761,20 +5778,22 @@ function rootTsconfig(src, app = []) {
5761
5778
  * @param src - The declared published `Environment[]`.
5762
5779
  * @param app - The declared application `Environment[]`, defaulting to none.
5763
5780
  * @param bin - Whether the workspace also builds its own executable.
5781
+ * @param showcase - Whether the workspace carries its optional app showcase.
5764
5782
  * @returns The machinery set the generated header renders.
5765
5783
  *
5766
5784
  * @example
5767
5785
  * ```ts
5768
- * viteMachinery(['core']) // { browser: false, vue: false, output: true }
5769
- * viteMachinery([], ['core']) // { browser: false, vue: false, output: false }
5786
+ * viteMachinery(['core']) // { browser: false, vue: false, output: true, showcase: false }
5787
+ * viteMachinery([], ['core']) // { browser: false, vue: false, output: false, showcase: false }
5770
5788
  * ```
5771
5789
  */
5772
- function viteMachinery(src, app = [], bin = false) {
5790
+ function viteMachinery(src, app = [], bin = false, showcase = false) {
5773
5791
  const unbuilt = src.length === 0 && app.length > 0 && !bin && app.every((environment) => environment === "core");
5774
5792
  return {
5775
5793
  browser: src.includes("browser") || app.includes("browser"),
5776
5794
  vue: app.includes("browser"),
5777
- output: !unbuilt
5795
+ output: !unbuilt,
5796
+ showcase: showcase && app.includes("browser")
5778
5797
  };
5779
5798
  }
5780
5799
  /**
@@ -5888,7 +5907,7 @@ ${renderedRegistrations.map((registration) => ` ${registration},`).join("\n")}
5888
5907
  * ```
5889
5908
  */
5890
5909
  function viteHeader(machinery) {
5891
- const { browser: needsBrowser, vue: needsVue, output: needsOutput } = machinery;
5910
+ const { browser: needsBrowser, vue: needsVue, output: needsOutput, showcase: needsShowcase } = machinery;
5892
5911
  const playwrightTypeImports = needsBrowser ? `import type { PlaywrightProviderOptions } from '@vitest/browser-playwright'
5893
5912
  ` : "";
5894
5913
  const playwrightImports = needsBrowser ? `import { playwright } from '@vitest/browser-playwright'
@@ -5896,6 +5915,8 @@ import { chromium } from 'playwright'
5896
5915
  ` : "";
5897
5916
  const vueImports = needsVue ? `import vue from '@vitejs/plugin-vue'
5898
5917
  import { parse as parseVue } from 'vue/compiler-sfc'
5918
+ ` : "";
5919
+ const showcaseImports = needsShowcase ? `import { viteSingleFile } from 'vite-plugin-singlefile'
5899
5920
  ` : "";
5900
5921
  const viteTypeImports = needsVue ? `import type {
5901
5922
  CSSOptions,
@@ -6955,6 +6976,31 @@ ${EXPORT_KEYWORD} function finalizeHtml(): Plugin {
6955
6976
  }
6956
6977
  }
6957
6978
 
6979
+ ` : ""}${needsShowcase ? `${EXPORT_KEYWORD} ${CONST_KEYWORD} SHOWCASE_SECURITY_POLICY =
6980
+ "base-uri 'none'; object-src 'none'; script-src 'self' 'unsafe-inline'; script-src-attr 'none'; style-src 'self' 'unsafe-inline'"
6981
+
6982
+ ${EXPORT_KEYWORD} function showcaseHtml(): Plugin {
6983
+ return {
6984
+ name: 'orkestrel-showcase-html',
6985
+ enforce: 'post',
6986
+ transformIndexHtml: {
6987
+ order: 'post',
6988
+ handler(html, context) {
6989
+ if (!isBrowserHtmlEntry(context.filename)) return undefined
6990
+ if (!html.includes(HTML_SECURITY_META)) {
6991
+ throw new Error('[orkestrel-showcase] Browser HTML must retain its security policy')
6992
+ }
6993
+ const stamp = new Date().toISOString()
6994
+ return html.replace(
6995
+ HTML_SECURITY_META,
6996
+ HTML_SECURITY_META.replace(HTML_SECURITY_POLICY, SHOWCASE_SECURITY_POLICY) +
6997
+ \`\\n\\t\\t<meta name="build-id" content="\${stamp}" />\`,
6998
+ )
6999
+ },
7000
+ },
7001
+ }
7002
+ }
7003
+
6958
7004
  ` : ""}${EXPORT_KEYWORD} async function environmentAssetSources(
6959
7005
  code: string,
6960
7006
  id: string,
@@ -7266,7 +7312,7 @@ ${needsBrowser ? `import {
7266
7312
  resolve as resolvePath,
7267
7313
  sep,
7268
7314
  } from 'node:path'` : `import { dirname, isAbsolute, relative, resolve as resolvePath, sep } from 'node:path'`}
7269
- ${playwrightImports}${vueImports}${needsBrowser ? `\n/** Chromium executable layouts inside a \`chromium-<revision>\` browsers-directory entry, per platform. */
7315
+ ${playwrightImports}${vueImports}${showcaseImports}${needsBrowser ? `\n/** Chromium executable layouts inside a \`chromium-<revision>\` browsers-directory entry, per platform. */
7270
7316
  ${EXPORT_KEYWORD} ${CONST_KEYWORD} CHROMIUM_LAYOUTS = Object.freeze([
7271
7317
  'chrome-linux/chrome',
7272
7318
  'chrome-linux64/chrome',
@@ -8015,7 +8061,7 @@ ${renderedTest}
8015
8061
  */
8016
8062
  function applicationViteConfig(src, app, facts = {}) {
8017
8063
  const hasSourceCore = src.includes("core");
8018
- const machinery = viteMachinery(src, app, facts.bin === true);
8064
+ const machinery = viteMachinery(src, app, facts.bin === true, facts.showcase === true);
8019
8065
  const header = viteHeader(machinery);
8020
8066
  const blocks = [];
8021
8067
  if (src.includes("core")) blocks.push(`
@@ -8160,8 +8206,98 @@ ${EXPORT_KEYWORD} const appCore = (config?: UserConfig): UserConfig =>
8160
8206
  config ?? {},
8161
8207
  )
8162
8208
  `);
8163
- if (app.includes("browser")) blocks.push(`
8164
- ${EXPORT_KEYWORD} function appBrowser(...config: readonly never[]): UserConfig {
8209
+ if (app.includes("browser")) blocks.push(facts.showcase === true ? `
8210
+ ${FUNCTION_KEYWORD} applicationBrowser(showcase: boolean): UserConfig {
8211
+ const output = showcase ? 'dist/showcase' : 'dist/app/browser'
8212
+ return {
8213
+ resolve,
8214
+ css: ENVIRONMENT_CSS,
8215
+ html: environmentHtml(),
8216
+ plugins: [
8217
+ restoreHtml(),
8218
+ outputBoundary(output),
8219
+ environmentBoundary('app/browser'),
8220
+ vue(),
8221
+ prepareHtml(),
8222
+ finalizeHtml(),
8223
+ ...(showcase
8224
+ ? [
8225
+ viteSingleFile({
8226
+ removeViteModuleLoader: true,
8227
+ useRecommendedBuildConfig: true,
8228
+ }),
8229
+ showcaseHtml(),
8230
+ ]
8231
+ : []),
8232
+ ],
8233
+ root: resolveWorkspacePath('app/browser'),
8234
+ publicDir: false,
8235
+ server: {
8236
+ fs: {
8237
+ strict: true,
8238
+ allow: [...browserServerRoots()],
8239
+ },
8240
+ },
8241
+ build: {
8242
+ ...(showcase
8243
+ ? {
8244
+ cssMinify: 'lightningcss',
8245
+ minify: 'oxc',
8246
+ modulePreload: false,
8247
+ reportCompressedSize: false,
8248
+ sourcemap: false,
8249
+ target: 'esnext',
8250
+ }
8251
+ : { assetsInlineLimit: 0 }),
8252
+ emptyOutDir: true,
8253
+ outDir: resolveWorkspacePath(output),
8254
+ rolldownOptions: {
8255
+ input: resolveWorkspacePath('${APP_MATRIX.browser.entry}'),
8256
+ },
8257
+ },
8258
+ test: {
8259
+ name: { label: '${APP_MATRIX.browser.project}', color: 'blue' },
8260
+ root: resolveWorkspacePath('.'),
8261
+ dir: resolveWorkspacePath('.'),
8262
+ include: ['tests/app/browser/**/*.test.ts'],
8263
+ setupFiles: ['./tests/setup.ts', './tests/setupBrowser.ts'],
8264
+ deps: {
8265
+ optimizer: {
8266
+ client: {
8267
+ enabled: true,
8268
+ include: ['vue', ...BROWSER_TEST_DEPENDENCIES],
8269
+ },
8270
+ },
8271
+ },
8272
+ browser: {
8273
+ enabled: true,
8274
+ provider: playwright(browserOptions),
8275
+ instances: [{ browser: 'chromium', headless: true }],
8276
+ },
8277
+ fileParallelism: false,
8278
+ },
8279
+ }
8280
+ }
8281
+
8282
+ ${EXPORT_KEYWORD} function appBrowser(...config: never[]): UserConfig {
8283
+ if (config.length > 0) {
8284
+ throw new Error(
8285
+ '[orkestrel-environment-boundary] Browser configuration overrides are not permitted by the generated boundary',
8286
+ )
8287
+ }
8288
+ return applicationBrowser(false)
8289
+ }
8290
+
8291
+ ${EXPORT_KEYWORD} function appShowcase(...config: never[]): UserConfig {
8292
+ if (config.length > 0) {
8293
+ throw new Error(
8294
+ '[orkestrel-environment-boundary] Showcase configuration overrides are not permitted by the generated boundary',
8295
+ )
8296
+ }
8297
+ return applicationBrowser(true)
8298
+ }
8299
+ ` : `
8300
+ ${EXPORT_KEYWORD} function appBrowser(...config: never[]): UserConfig {
8165
8301
  if (config.length > 0) {
8166
8302
  throw new Error(
8167
8303
  '[orkestrel-environment-boundary] Browser configuration overrides are not permitted by the generated boundary',
@@ -8641,6 +8777,17 @@ function configArtifacts(spec) {
8641
8777
  });
8642
8778
  }
8643
8779
  }
8780
+ if (spec.showcase) artifacts.push({
8781
+ path: SHOWCASE_CONFIG_PATH,
8782
+ group: "configs",
8783
+ origin: "computed",
8784
+ environment: "browser",
8785
+ content: `import { defineConfig } from 'vite'
8786
+ import { appShowcase } from '../../vite.config.ts'
8787
+
8788
+ export default defineConfig(appShowcase())
8789
+ `
8790
+ });
8644
8791
  return artifacts;
8645
8792
  }
8646
8793
  /**
@@ -9775,6 +9922,6 @@ function createBlueprint(data) {
9775
9922
  return candidate;
9776
9923
  }
9777
9924
  //#endregion
9778
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, CATEGORIES, CHECKOUT_ACTION_SHA, COMPILER_ID, COMPILE_STAGES, CONST_KEYWORD, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXPORT_KEYWORD, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, FRESHNESS, FUNCTION_KEYWORD, GLOBAL_SETUP_PATH, GROUPS, HEX_PATTERN, HOST_PATHS, IMPORT_KEYWORD, INVALID_PATH_CHARACTER_PATTERN, JSON_PRINT_WIDTH, JSON_TAB_WIDTH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_DATA_GRAPH_KEYS, MAX_DATA_GRAPH_NODES, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_SERIALIZED_INPUT_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORIGINS, ORKESTREL_RANGE_PATTERN, PlanManager, SCAFFOLD_RANGE, SERVICE_SCRIPT_PATH, SETUP_NODE_ACTION_SHA, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, SYNC_BASELINE_PATTERN, ScaffoldError, TEMPLATES, TYPESCRIPT_EXTENSIONS, VERSION_PATTERN, alignTable, appTsconfig, appViteConfig, applicationArtifacts, applicationViteConfig, applyOverrides, artifactShape, auditToReview, binTsconfig, binViteConfig, binViteProject, blueprint, blueprintShape, blueprintToMembers, blueprintToPlan, bytesToHex, catalogNames, catalogToBlock, ciWorkflow, compareCodeUnit, computeColumnWidth, computeHash, configArtifacts, contentByteLength, contentCodePoint, contentToBytes, contentToHex, coreTsconfig, coreViteConfig, createBlueprint, createCompiler, createPlanManager, delimiterCell, dependency, dependencyShape, devDependenciesFor, diffPlan, dualCondition, entryFields, escapeHtmlText, exportsMap, fillArtifact, findFileConflict, findPathConflict, fitsPrintWidth, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, guidesViteProject, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, integrationViteProject, isArtifact, isBehind, isBlueprint, isCompilerEventHooks, isDenseDataArray, isDependency, isEmitterErrorHandler, isMember, isOverride, isPlan, isPlanManagerEventHooks, isScaffoldError, isSyncReport, isWorkspaceName, manifestToDependencies, manifestToName, member, memberShape, override, overrideShape, ownDataValue, packageManifest, padCell, paritySpecifiers, parseBlueprint, parseBoundedJSON, parseCompilerOptions, parsePlan, parsePlanIds, parsePlanManagerOptions, parseSyncReport, pascalCase, pinPlan, planPayload, planShape, planToReview, planToSummary, policyViteProject, rangeToFreshness, renderArray, renderObject, renderValue, renderViteTest, rootTsconfig, rootViteConfig, selectHostPaths, serializeTypeScriptString, serviceViteProject, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery, viteProjectDefinitions, viteProjectRegistrations };
9925
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_MATRIX, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, CATEGORIES, CHECKOUT_ACTION_SHA, COMPILER_ID, COMPILE_STAGES, CONST_KEYWORD, CONTROL_CHARACTER_PATTERN, Compiler, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, ENGINES_PATTERN, ENVIRONMENTS, EXPORT_KEYWORD, EXTRA_NAME_PATTERN, EXTRA_RANGE_PATTERN, FRESHNESS, FUNCTION_KEYWORD, GLOBAL_SETUP_PATH, GROUPS, HEX_PATTERN, HOST_PATHS, IMPORT_KEYWORD, INVALID_PATH_CHARACTER_PATTERN, JSON_PRINT_WIDTH, JSON_TAB_WIDTH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_COLLECTION_ITEMS, MAX_DATA_GRAPH_KEYS, MAX_DATA_GRAPH_NODES, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_SERIALIZED_INPUT_BYTES, MAX_TOTAL_ARTIFACT_BYTES, MINIMUM_NODE_VERSION, NAME_PATTERN, ORIGINS, ORKESTREL_RANGE_PATTERN, PlanManager, SCAFFOLD_RANGE, SERVICE_SCRIPT_PATH, SETUP_NODE_ACTION_SHA, SHOWCASE_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, SYNC_BASELINE_PATTERN, ScaffoldError, TEMPLATES, TYPESCRIPT_EXTENSIONS, VERSION_PATTERN, alignTable, appTsconfig, appViteConfig, applicationArtifacts, applicationViteConfig, applyOverrides, artifactShape, auditToReview, binTsconfig, binViteConfig, binViteProject, blueprint, blueprintShape, blueprintToMembers, blueprintToPlan, bytesToHex, catalogNames, catalogToBlock, ciWorkflow, compareCodeUnit, computeColumnWidth, computeHash, configArtifacts, contentByteLength, contentCodePoint, contentToBytes, contentToHex, coreTsconfig, coreViteConfig, createBlueprint, createCompiler, createPlanManager, delimiterCell, dependency, dependencyShape, devDependenciesFor, diffPlan, dualCondition, entryFields, escapeHtmlText, exportsMap, fillArtifact, findFileConflict, findPathConflict, fitsPrintWidth, formatJson, guideArtifacts, guideMemberTable, guideMethods, guideTests, guideUsage, guidesViteProject, hasBlueprintEnvironment, hasOnlyDataProperties, hasValidArtifactBytes, hasValidArtifactHex, hasValidAuditBytes, hasValidBlueprintBytes, hasValidOverrideBytes, hasValidPlanBytes, hasValidPlanHex, hasValidSnapshotBytes, hasValidSyncReportBytes, hostGroup, inferGroup, integrationViteProject, isArtifact, isBehind, isBlueprint, isCompilerEventHooks, isDenseDataArray, isDependency, isEmitterErrorHandler, isMember, isOverride, isPlan, isPlanManagerEventHooks, isScaffoldError, isSyncReport, isWorkspaceName, manifestToDependencies, manifestToName, member, memberShape, override, overrideShape, ownDataValue, packageManifest, padCell, paritySpecifiers, parseBlueprint, parseBoundedJSON, parseCompilerOptions, parsePlan, parsePlanIds, parsePlanManagerOptions, parseSyncReport, pascalCase, pinPlan, planPayload, planShape, planToReview, planToSummary, policyViteProject, rangeToFreshness, renderArray, renderObject, renderValue, renderViteTest, rootTsconfig, rootViteConfig, selectHostPaths, serializeTypeScriptString, serviceViteProject, singleSrcViteConfig, snapshotOf, snapshotPlan, sourceArtifacts, splitTableRow, srcTsconfig, srcVariant, srcViteConfig, stableStringify, syncReportShape, syncToReview, testArtifacts, validateBlueprint, validateDependencyArray, validatePlan, viteHeader, viteMachinery, viteProjectDefinitions, viteProjectRegistrations };
9779
9926
 
9780
9927
  //# sourceMappingURL=index.js.map