Migrate NPC registry durable contract

This commit is contained in:
2026-08-05 18:25:04 +00:00
parent 916a32195b
commit 9653e06297
56 changed files with 256 additions and 237 deletions

View File

@@ -51,9 +51,9 @@ func canonicalizeNPC(npc *npcResponse, order shared.SourceRefOrder, sourceID str
return order.EarliestValid(refs)
}
func canonicalNPCList(response extractionResponse, sourceID string) dnd.NPCList {
func canonicalNPCRegistry(response extractionResponse, sourceID string) dnd.NPCRegistry {
if response.NPCs == nil {
return dnd.NPCList{NPCs: nil}
return dnd.NPCRegistry{NPCs: nil}
}
npcs := make([]dnd.NPC, len(response.NPCs))
for index, npc := range response.NPCs {
@@ -63,7 +63,7 @@ func canonicalNPCList(response extractionResponse, sourceID string) dnd.NPCList
SourceRefs: canonicalSourceRefs(npc.SourceRefs, sourceID),
}
}
return dnd.NPCList{NPCs: npcs}
return dnd.NPCRegistry{NPCs: npcs}
}
func canonicalSourceRefs(values []npcSourceRefResponse, sourceID string) []source.SourceRef {