/** * Reserved application names (cross-system, application-scoped). * * Every application-create surface rejects any name whose **lowercase form** * appears in this list: the CLI `CreateApplicationSchema` * (`@fjall/cli/src/validation/commandSchemas.ts`), the webapp create route * (`webapp/app/routes/api/applications/index.ts`), and the webapp scaffold * schema `ScaffoldRequestSchema` (`webapp/app/routes/api/github/scaffold.ts`). * * The reserved name `"fjall"` is gated here because it denotes the * organisation-tier marker under the `fjall/` marker convention (P1) — a * customer-owned application sharing that name would collide structurally * with the organisation entry under `[container/]fjall/fjall/infrastructure.ts`. * * `"organisation"` / `"platform"` / `"account"` are the org-tier deploy * targets (deploy-core `ORGANISATION_TYPES` — the coupled SSoT; a deploy-core * parity test pins the subset relation, since util sits below deploy-core and * cannot import it). Deploy consumers classify a deploy as org-level from the * target NAME alone (`fjall deploy account`, the worker's org-level gate), so * an application sharing one of these names would be mis-classified as an * org-tier deploy — bypassing the app-scoped session policy and injecting org * identity into synth. * * `"domain"` is reserved because BOTH verb-first surfaces reject the word * permanently: `fjall deploy domain` and `fjall destroy domain` are teaching * errors routing to the noun-verb domain commands, and domain infrastructure * lives under the `fjall/domains//` marker tree. An application named * "domain" would therefore be undeployable and undestroyable from the moment * it was created, so create time is the honest place to fail closed. Residue: * an application created under an older CLI can still carry the name on disk; * this list closes the door, it does not rename what is already there. * * **Boundary with `isReservedSlug`** — `webapp/app/.server/utils/reservedSlugs.ts` * guards organisation slugs (URL-scoped, webapp-only). This list is * application-scoped and ships from `@fjall/util` for cross-system reuse * (CLI + webapp + worker). Both coexist; neither references the other. * * All entries MUST be lowercase. Membership checks lowercase the input * before testing, so `"Fjall"`, `"FJALL"`, and `"fjALL"` all reject * identically. */ export declare const RESERVED_APP_NAMES: readonly ["fjall", "organisation", "platform", "account", "domain"]; export type ReservedAppName = (typeof RESERVED_APP_NAMES)[number]; /** * Canonical user-facing rejection message for a reserved application name. * Shared by every create surface (the CLI `CreateApplicationSchema`, the webapp * create route, the webapp scaffold schema) so the wording cannot drift. */ export declare const RESERVED_APP_NAME_MESSAGE = "This application name is reserved for Fjall's organisation-tier infrastructure."; /** * Case-insensitive membership check. The canonical entrypoint — consumers * MUST route through this helper rather than calling `.includes(name.toLowerCase())` * inline, so the lowercasing discipline cannot drift across CLI/webapp/worker. */ export declare function isReservedAppName(name: string): boolean; /** * Reserved application-name suffix: `-cache`. * * Every app's ECR build-cache repository is derived as * `` `${toKebab(appName)}-cache` `` (`buildCacheRepositoryName`, * `util/src/docker/cacheRepository.ts`). An application whose own kebab form * ends in `-cache` would collide with a sibling app's cache repo: the * sibling's deploy session policy exempts that ARN from the foreign-ECR * mutation Deny (deploy-core `deploySessionPolicy.ts`) and its cache ensure * would overwrite the colliding app repo's lifecycle policy. Rejecting the * suffix at create time keeps the `-cache` namespace exclusively * derivational. */ export declare const RESERVED_APP_NAME_SUFFIX = "-cache"; /** * Canonical user-facing rejection message for a `-cache`-suffixed name. * Shared by every create surface so the wording cannot drift. */ export declare const RESERVED_APP_NAME_SUFFIX_MESSAGE = "Application names ending in '-cache' are reserved for Fjall build-cache repositories."; /** * Suffix check for the reserved `-cache` namespace. Runs on the kebab form, * not the raw lowercase — `WebAppCache` contains no hyphen until kebab-cased, * yet derives the colliding repo `web-app-cache`. Consumers MUST route * through this helper rather than an inline `.endsWith()` so the kebab-first * discipline cannot drift across CLI/webapp/worker. */ export declare function hasReservedAppNameSuffix(name: string): boolean;