tcmts.cli.migrate

Migrated type
What a migration did.
formatsOf (file: string) => number[]
The hash formats a codebase's definitions are in.
migrateCodebase (root: string) => (Migrated & { backup: string; verified: number; }) | undefined
Move a codebase to this tcm's hash format, safely: the database as it was is kept beside it (`codebase.v<n>.sqlite`), a copy is migrated (`migrateFile`), and the copy is used only if this tcm then reads every live definition back to its hash (`verify`); otherwise the codebase is left as it was. Undefined if it's in this format already.
migrateFile (file: string) => Migrated
Move a codebase's database (a file nothing else has open) to this tcm's hash format, in place, in one transaction. A pure function of what's in it, so every copy of a codebase (a clone, a server) migrates to the same hashes and they go on syncing:
remapHashes (v: unknown, map: ReadonlyMap<string, string>) => unknown
A value with every hash in it replaced as `map` says (`h` or `#h`, wherever it is in it); the rest as it was.
testRemapHashes () => void