|
11 | 11 | import { execSync } from 'child_process'; |
12 | 12 | import { cpSync, mkdirSync, rmSync, existsSync, writeFileSync, readFileSync } from 'fs'; |
13 | 13 | import { resolve } from 'path'; |
| 14 | +import { capabilities as registryCapabilities } from '../apps/cockpit/scripts/capability-registry'; |
14 | 15 |
|
15 | 16 | const root = resolve(__dirname, '..'); |
16 | 17 | const deployDir = resolve(root, 'deploy/examples'); |
17 | 18 | const skipBuild = process.argv.includes('--skip-build'); |
18 | 19 |
|
19 | | -const capabilities = [ |
20 | | - { product: 'langgraph', topic: 'streaming' }, |
21 | | - { product: 'langgraph', topic: 'persistence' }, |
22 | | - { product: 'langgraph', topic: 'interrupts' }, |
23 | | - { product: 'langgraph', topic: 'memory' }, |
24 | | - { product: 'langgraph', topic: 'durable-execution' }, |
25 | | - { product: 'langgraph', topic: 'subgraphs' }, |
26 | | - { product: 'langgraph', topic: 'time-travel' }, |
27 | | - { product: 'langgraph', topic: 'deployment-runtime' }, |
28 | | - { product: 'deep-agents', topic: 'planning' }, |
29 | | - { product: 'deep-agents', topic: 'filesystem' }, |
30 | | - { product: 'deep-agents', topic: 'subagents' }, |
31 | | - { product: 'deep-agents', topic: 'memory' }, |
32 | | - { product: 'deep-agents', topic: 'skills' }, |
33 | | - { product: 'deep-agents', topic: 'sandboxes' }, |
34 | | - { product: 'render', topic: 'spec-rendering' }, |
35 | | - { product: 'render', topic: 'element-rendering' }, |
36 | | - { product: 'render', topic: 'state-management' }, |
37 | | - { product: 'render', topic: 'registry' }, |
38 | | - { product: 'render', topic: 'repeat-loops' }, |
39 | | - { product: 'render', topic: 'computed-functions' }, |
40 | | - { product: 'chat', topic: 'messages' }, |
41 | | - { product: 'chat', topic: 'input' }, |
42 | | - { product: 'chat', topic: 'interrupts' }, |
43 | | - { product: 'chat', topic: 'tool-calls' }, |
44 | | - { product: 'chat', topic: 'subagents' }, |
45 | | - { product: 'chat', topic: 'threads' }, |
46 | | - { product: 'chat', topic: 'timeline' }, |
47 | | - { product: 'chat', topic: 'generative-ui' }, |
48 | | - { product: 'chat', topic: 'debug' }, |
49 | | - { product: 'chat', topic: 'theming' }, |
50 | | - { product: 'chat', topic: 'a2ui' }, |
51 | | - { product: 'ag-ui', topic: 'interrupts' }, |
52 | | - { product: 'ag-ui', topic: 'streaming' }, |
53 | | - { product: 'ag-ui', topic: 'tool-views' }, |
54 | | - { product: 'ag-ui', topic: 'json-render' }, |
55 | | - { product: 'ag-ui', topic: 'a2ui' }, |
56 | | -]; |
| 20 | +// Derive the staged-example list from the capability registry — the single |
| 21 | +// source of truth (every entry has an `angularProject` that builds to |
| 22 | +// `dist/cockpit/<product>/<topic>/angular`). Hardcoding it previously let new |
| 23 | +// caps (tool-views, json-render, a2ui) silently 404 in production because they |
| 24 | +// were added to the registry but never to this list. The Railway deploy |
| 25 | +// generator already derives from the registry; this keeps the frontend deploy |
| 26 | +// in lockstep so a registry cap can never be missed again. |
| 27 | +const capabilities = registryCapabilities.map((c) => ({ |
| 28 | + product: c.product, |
| 29 | + topic: c.topic, |
| 30 | +})); |
57 | 31 |
|
58 | 32 | if (!skipBuild) { |
59 | 33 | console.log(`Building all ${capabilities.length} Angular apps...`); |
|
0 commit comments