Commit 9cbe153
Make CardStore.virtualNetwork required
Tighten the CardStore interface so every implementation must expose a
VirtualNetwork. Implementations updated:
- gc-card-store.ts's CardStoreWithGarbageCollection already had it
- render-service.ts's CardStoreWithErrors gains a public getter that
exposes its existing #virtualNetwork field
- field-configuration-test.gts's DeferredLinkStore test stub gains a
`virtualNetwork: new VirtualNetwork()` field
- card-api.gts's FallbackCardStore.virtualNetwork getter throws when
the active loader can't supply one (was `undefined` before); the
loadCardDocument / loadFileMetaDocument methods that previously
threw on missing VN drop their now-redundant runtime checks
virtualNetworkFor's external contract stays `VirtualNetwork | undefined`
— that's the documented out-of-scope item for CS-11374 (detached
instances, static parsers). It wraps the getStore(instance).virtualNetwork
access in try/catch so a FallbackCardStore-without-loader-VN reaches the
function as undefined the way callers already expect.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 1c26be1 commit 9cbe153
3 files changed
Lines changed: 28 additions & 24 deletions
File tree
- packages
- base
- host
- app/services
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| |||
4653 | 4653 | | |
4654 | 4654 | | |
4655 | 4655 | | |
4656 | | - | |
4657 | | - | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
4658 | 4659 | | |
4659 | 4660 | | |
4660 | 4661 | | |
4661 | | - | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
4662 | 4667 | | |
4663 | 4668 | | |
4664 | 4669 | | |
| |||
4712 | 4717 | | |
4713 | 4718 | | |
4714 | 4719 | | |
4715 | | - | |
4716 | | - | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
| 4725 | + | |
| 4726 | + | |
| 4727 | + | |
4717 | 4728 | | |
4718 | 4729 | | |
4719 | 4730 | | |
| |||
4774 | 4785 | | |
4775 | 4786 | | |
4776 | 4787 | | |
4777 | | - | |
4778 | | - | |
4779 | | - | |
4780 | | - | |
4781 | | - | |
4782 | | - | |
4783 | | - | |
| 4788 | + | |
4784 | 4789 | | |
4785 | 4790 | | |
4786 | 4791 | | |
| |||
4790 | 4795 | | |
4791 | 4796 | | |
4792 | 4797 | | |
4793 | | - | |
4794 | | - | |
4795 | | - | |
4796 | | - | |
4797 | | - | |
4798 | | - | |
4799 | | - | |
| 4798 | + | |
4800 | 4799 | | |
4801 | 4800 | | |
4802 | 4801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments