feat(bgm): model setup as ordered placements

Replace the path->parts setup map with an ordered list of placements, each moving its parts to a path. Entries apply in order, so a part listed in a later placement ends up on that placement's path.
This commit is contained in:
2026-08-10 11:27:46 +08:00
parent bc418b2c73
commit c2693277ac
6 changed files with 36 additions and 12 deletions
+4 -4
View File
@@ -55,10 +55,10 @@ describe('collectPackages', () => {
expect([...harbor.setups.keys()]).toEqual(['game#main']);
const setup = harbor.setups.get('game#main')!;
expect(setup.surfaces).toEqual(['board#harbor', 'board#player']);
expect(setup.setup).toEqual({
'/dock/0': 'harbor:token#wood',
'/deck': 'harbor:token#grain',
});
expect(setup.setup).toEqual([
{ path: '/dock/0', parts: 'harbor:token#wood' },
{ path: '/deck', parts: 'harbor:token#grain' },
]);
});
it('scopes include patterns to the package declaration directory', () => {