feat(lns): expose catalog entry aliases

Co-authored-by: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 14:04:45 +00:00
parent 670d9520fd
commit 4e145e8786
2 changed files with 27 additions and 0 deletions

12
lns.go
View file

@ -559,6 +559,18 @@ type NameStateStats = primitives.NameStateStats
// NameStateStatus mirrors the name phase enum from pkg/primitives.
type NameStateStatus = primitives.NameStateStatus
// ReservedName mirrors the reserved-name catalog entry type from pkg/covenant.
type ReservedName = covenant.ReservedName
// LockedName mirrors the locked-name catalog entry type from pkg/covenant.
type LockedName = covenant.LockedName
// ReservedEntry mirrors the reserved-name catalog entry pair from pkg/covenant.
type ReservedEntry = covenant.ReservedEntry
// LockedEntry mirrors the locked-name catalog entry pair from pkg/covenant.
type LockedEntry = covenant.LockedEntry
// Name state constants mirror pkg/primitives so callers can keep using the
// top-level lns package for common domain objects.
const (

View file

@ -359,6 +359,21 @@ func TestPackageNameStateAliases(t *testing.T) {
}
}
func TestPackageCatalogTypeAliases(t *testing.T) {
var reserved ReservedName
var locked LockedName
var reservedEntry ReservedEntry
var lockedEntry LockedEntry
if reserved.Name != "" || locked.Name != "" {
t.Fatal("catalog name aliases should expose the covenant catalog entry types")
}
if reservedEntry.Value.Name != "" || lockedEntry.Value.Name != "" {
t.Fatal("catalog entry aliases should expose the covenant catalog entry pair types")
}
}
func TestPackageNameSetHelpers(t *testing.T) {
hash, err := HashString("example-name")
if err != nil {