Commit 7aba512
authored
feat(utils): add indexer endpoint env var support to AppConfigService (#261)
Add support for VITE_APP_CFG_INDEXER_ENDPOINT_{NETWORK_ID} environment
variables to configure indexer endpoints at runtime.
Changes:
- Add parsing for VITE_APP_CFG_INDEXER_ENDPOINT_* pattern in loadFromViteEnvironment
- Add merging of loaded indexer endpoints into config.indexerEndpoints
- Add unit tests for env var parsing and getIndexerEndpointOverride getter
- Update "getters warn before initialization" test to include indexer endpoint
This enables configuring indexer endpoints (which may contain API keys)
via .env.local files instead of committing secrets to app.config.json.1 parent 60c4d0a commit 7aba512
File tree
2 files changed
+61
-1
lines changed- packages/utils/src
- __tests__
2 files changed
+61
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
170 | 186 | | |
171 | 187 | | |
172 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
| |||
536 | 553 | | |
537 | 554 | | |
538 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
539 | 577 | | |
540 | 578 | | |
541 | 579 | | |
| |||
664 | 702 | | |
665 | 703 | | |
666 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
667 | 711 | | |
668 | 712 | | |
669 | 713 | | |
670 | 714 | | |
671 | 715 | | |
672 | 716 | | |
673 | | - | |
| 717 | + | |
674 | 718 | | |
675 | 719 | | |
676 | 720 | | |
| |||
0 commit comments