also looking at this
feat(operations): fleet inventory, attach preflight, and the exports that were missing
#192
11 files
+1313
-5
| @@ -69,12 +69,28 @@ export const DEFAULT_SITE_PORT_RANGE: SitePortRange = { start: 3000, end: 3999 } | ||
| 69 | 69 | * One project's registry fragment, as written by the deploy: |
| 70 | 70 | * `JSON.stringify({ slug, ...RpxGatewayConfig })`. |
| 71 | 71 | * |
| 72 | * Only the fields this module reads are declared. A fragment written by an older | |
| 73 | * ts-cloud may be missing `slug`, which the writer defaults to `'app'`. | |
| 72 | * Only the fields a reader here needs are declared. A fragment written by an | |
| 73 | * older ts-cloud may be missing `slug`, which the writer defaults to `'app'`. | |
| 74 | * | |
| 75 | * The route fields beyond `from` are declared for the fleet inventory | |
| 76 | * (`operations/inventory`), which answers "what is this box serving, for | |
| 77 | * whom" from these same files. They are optional and additive: this module's | |
| 78 | * port allocator still reads only `from`. | |
| 74 | 79 | */ |
| 75 | 80 | export interface HostSiteFragment { |
| 76 | 81 | slug?: string |
| 77 | proxies?: Array<{ from?: string | string[] }> | |
| 82 | proxies?: Array<{ | |
| 83 | /** Public host the route is served under. */ | |
| 84 | to?: string | |
| 85 | /** Path prefix within the host. Omitted means `/`. */ | |
| 86 | path?: string | |
| 87 | /** Upstream(s) for an app route. */ | |
| 88 | from?: string | string[] | |
| 89 | /** Served directory for a static route. */ | |
| 90 | static?: string | { dir?: string } | |
| 91 | /** Target for a redirect route. */ | |
| 92 | redirect?: string | { to?: string } | |
| 93 | }> | |
| 78 | 94 | } |
| 79 | 95 | |
| 80 | 96 | /** Port -> the slug of the project that already serves it on this box. */ |