Kind: Function
Source: atloria-monorepo/apps/api/src/docs-repo/sidecar.ts
Merge the current served set into the existing registry and return the deterministic string.
For each page (keyed by docUuid): upsert slug/scope/lang/kgEntityId. If the slug CHANGED from the stored one, append the old slug to previousSlugs (dedup, keep order). Entries for docUuids no longer served are RETAINED — the ledger is an identity history, not a mirror of the live set (a page can be unpublished then republished under the same identity, and rename history must survive a doc dropping out of the served set for a version).
Signature
tsfunction mergeSlugRegistry(existingJson: string | null | undefined, pages: PageIdentity[]): string
Parameters
| Name | Type |
|---|---|
existingJson | `string |
pages | PageIdentity[] |
Returns: string
Was this page helpful?