@rxap/config 19.2.0 → 19.3.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/compodoc/changelog.html +10 -0
  3. package/compodoc/dependencies.html +2 -2
  4. package/compodoc/injectables/ConfigService.html +145 -93
  5. package/compodoc/interfaces/ConfigLoadOptions.html +209 -58
  6. package/compodoc/js/search/search_index.js +2 -2
  7. package/compodoc/miscellaneous/enumerations.html +53 -0
  8. package/compodoc/miscellaneous/functions.html +60 -9
  9. package/compodoc/miscellaneous/typealiases.html +21 -0
  10. package/compodoc/miscellaneous/variables.html +185 -0
  11. package/compodoc/properties.html +1 -1
  12. package/docs/documentation.json +1443 -720
  13. package/docs/html/assets/hierarchy.js +1 -1
  14. package/docs/html/assets/navigation.js +1 -1
  15. package/docs/html/assets/search.js +1 -1
  16. package/docs/html/classes/ConfigLoaderService.html +2 -2
  17. package/docs/html/classes/ConfigService.html +6 -6
  18. package/docs/html/classes/ConfigTestingService.html +2 -2
  19. package/docs/html/enums/ConfigLoadMethod.html +5 -0
  20. package/docs/html/enums/ConfigLoadingStrategy.html +2 -2
  21. package/docs/html/functions/ProvideConfig.html +1 -1
  22. package/docs/html/functions/dnsLookup.html +1 -1
  23. package/docs/html/functions/dnsResolver.html +1 -1
  24. package/docs/html/functions/fetchCidContent.html +1 -1
  25. package/docs/html/functions/fetchCidContentAsJson.html +1 -1
  26. package/docs/html/functions/fetchCidContentViaHttp.html +1 -1
  27. package/docs/html/functions/fetchContentViaHttp.html +1 -1
  28. package/docs/html/functions/localPathIpfsGateway.html +1 -0
  29. package/docs/html/functions/localSubDomainIpfsGateway.html +1 -0
  30. package/docs/html/functions/raceSuccess.html +2 -2
  31. package/docs/html/functions/storachaIpfsGateway.html +1 -0
  32. package/docs/html/functions/w3sIpfsGateway.html +1 -0
  33. package/docs/html/hierarchy.html +1 -1
  34. package/docs/html/index.html +2 -2
  35. package/docs/html/interfaces/AppsNavigationConfig.html +2 -2
  36. package/docs/html/interfaces/Config.html +2 -2
  37. package/docs/html/interfaces/ConfigLoadOptions.html +11 -5
  38. package/docs/html/interfaces/LogoConfig.html +2 -2
  39. package/docs/html/interfaces/NavigationConfig.html +2 -2
  40. package/docs/html/interfaces/Oauth2Config.html +2 -2
  41. package/docs/html/interfaces/i18nConfig.html +2 -2
  42. package/docs/html/modules.html +1 -1
  43. package/docs/html/types/AnySchema.html +1 -1
  44. package/docs/html/types/IpfsGatewayFunction.html +1 -0
  45. package/docs/html/types/Join.html +1 -1
  46. package/docs/html/types/LanguagesConfig.html +1 -1
  47. package/docs/html/types/Leaves.html +1 -1
  48. package/docs/html/types/NoInferType.html +1 -1
  49. package/docs/html/types/Paths.html +1 -1
  50. package/docs/html/variables/RXAP_CONFIG.html +1 -1
  51. package/docs/html/variables/defaultDnsServers.html +1 -0
  52. package/docs/html/variables/defaultIpfsGatewayServers.html +1 -0
  53. package/docs/markdown/README.md +1 -1
  54. package/docs/markdown/classes/ConfigLoaderService.md +7 -7
  55. package/docs/markdown/classes/ConfigService.md +22 -22
  56. package/docs/markdown/classes/ConfigTestingService.md +8 -8
  57. package/docs/markdown/enumerations/ConfigLoadMethod.md +41 -0
  58. package/docs/markdown/enumerations/ConfigLoadingStrategy.md +4 -4
  59. package/docs/markdown/functions/ProvideConfig.md +2 -2
  60. package/docs/markdown/functions/dnsLookup.md +3 -3
  61. package/docs/markdown/functions/dnsResolver.md +2 -2
  62. package/docs/markdown/functions/fetchCidContent.md +7 -3
  63. package/docs/markdown/functions/fetchCidContentAsJson.md +8 -4
  64. package/docs/markdown/functions/fetchCidContentViaHttp.md +7 -3
  65. package/docs/markdown/functions/fetchContentViaHttp.md +2 -2
  66. package/docs/markdown/functions/localPathIpfsGateway.md +21 -0
  67. package/docs/markdown/functions/localSubDomainIpfsGateway.md +21 -0
  68. package/docs/markdown/functions/raceSuccess.md +2 -2
  69. package/docs/markdown/functions/storachaIpfsGateway.md +21 -0
  70. package/docs/markdown/functions/w3sIpfsGateway.md +21 -0
  71. package/docs/markdown/globals.md +10 -2
  72. package/docs/markdown/interfaces/AppsNavigationConfig.md +12 -12
  73. package/docs/markdown/interfaces/Config.md +6 -6
  74. package/docs/markdown/interfaces/ConfigLoadOptions.md +45 -13
  75. package/docs/markdown/interfaces/LogoConfig.md +5 -5
  76. package/docs/markdown/interfaces/NavigationConfig.md +9 -9
  77. package/docs/markdown/interfaces/Oauth2Config.md +3 -3
  78. package/docs/markdown/interfaces/i18nConfig.md +4 -4
  79. package/docs/markdown/type-aliases/AnySchema.md +2 -2
  80. package/docs/markdown/type-aliases/IpfsGatewayFunction.md +21 -0
  81. package/docs/markdown/type-aliases/Join.md +2 -2
  82. package/docs/markdown/type-aliases/LanguagesConfig.md +2 -2
  83. package/docs/markdown/type-aliases/Leaves.md +2 -2
  84. package/docs/markdown/type-aliases/NoInferType.md +2 -2
  85. package/docs/markdown/type-aliases/Paths.md +2 -2
  86. package/docs/markdown/variables/RXAP_CONFIG.md +2 -2
  87. package/docs/markdown/variables/defaultDnsServers.md +11 -0
  88. package/docs/markdown/variables/defaultIpfsGatewayServers.md +11 -0
  89. package/docs/wiki/Class.ConfigLoaderService.md +6 -6
  90. package/docs/wiki/Class.ConfigService.md +21 -21
  91. package/docs/wiki/Class.ConfigTestingService.md +7 -7
  92. package/docs/wiki/Enumeration.ConfigLoadMethod.md +37 -0
  93. package/docs/wiki/Enumeration.ConfigLoadingStrategy.md +3 -3
  94. package/docs/wiki/Function.ProvideConfig.md +1 -1
  95. package/docs/wiki/Function.dnsLookup.md +2 -2
  96. package/docs/wiki/Function.dnsResolver.md +1 -1
  97. package/docs/wiki/Function.fetchCidContent.md +6 -2
  98. package/docs/wiki/Function.fetchCidContentAsJson.md +7 -3
  99. package/docs/wiki/Function.fetchCidContentViaHttp.md +6 -2
  100. package/docs/wiki/Function.fetchContentViaHttp.md +1 -1
  101. package/docs/wiki/Function.localPathIpfsGateway.md +17 -0
  102. package/docs/wiki/Function.localSubDomainIpfsGateway.md +17 -0
  103. package/docs/wiki/Function.raceSuccess.md +1 -1
  104. package/docs/wiki/Function.storachaIpfsGateway.md +17 -0
  105. package/docs/wiki/Function.w3sIpfsGateway.md +17 -0
  106. package/docs/wiki/Interface.AppsNavigationConfig.md +11 -11
  107. package/docs/wiki/Interface.Config.md +5 -5
  108. package/docs/wiki/Interface.ConfigLoadOptions.md +44 -12
  109. package/docs/wiki/Interface.LogoConfig.md +4 -4
  110. package/docs/wiki/Interface.NavigationConfig.md +8 -8
  111. package/docs/wiki/Interface.Oauth2Config.md +2 -2
  112. package/docs/wiki/Interface.i18nConfig.md +3 -3
  113. package/docs/wiki/TypeAlias.AnySchema.md +1 -1
  114. package/docs/wiki/TypeAlias.IpfsGatewayFunction.md +17 -0
  115. package/docs/wiki/TypeAlias.Join.md +1 -1
  116. package/docs/wiki/TypeAlias.LanguagesConfig.md +1 -1
  117. package/docs/wiki/TypeAlias.Leaves.md +1 -1
  118. package/docs/wiki/TypeAlias.NoInferType.md +1 -1
  119. package/docs/wiki/TypeAlias.Paths.md +1 -1
  120. package/docs/wiki/Variable.RXAP_CONFIG.md +1 -1
  121. package/docs/wiki/Variable.defaultDnsServers.md +7 -0
  122. package/docs/wiki/Variable.defaultIpfsGatewayServers.md +7 -0
  123. package/docs/wiki/_Sidebar.md +8 -0
  124. package/docs/wiki/globals.md +9 -1
  125. package/fesm2022/rxap-config.mjs +112 -74
  126. package/fesm2022/rxap-config.mjs.map +1 -1
  127. package/lib/config.service.d.ts +18 -0
  128. package/lib/utilities.d.ts +10 -3
  129. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [19.3.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/config@19.3.0-dev.0...@rxap/config@19.3.0-dev.1) (2026-04-14)
7
+
8
+ ### Features
9
+
10
+ - **config:** add IPFS gateway support and simplify DNS server handling ([3451549](https://gitlab.com/rxap/packages/commit/345154901dfe881fe97bf5bf3ed113ec4d5036ef))
11
+
12
+ # [19.3.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/config@19.2.0...@rxap/config@19.3.0-dev.0) (2026-02-09)
13
+
14
+ ### Features
15
+
16
+ - **config:** add configurable loading order for config sources ([6aac03b](https://gitlab.com/rxap/packages/commit/6aac03bec5dfc5b8c162f424b90fdd64bfc3899e))
17
+
6
18
  # [19.2.0](https://gitlab.com/rxap/packages/compare/@rxap/config@19.2.0-dev.3...@rxap/config@19.2.0) (2026-01-23)
7
19
 
8
20
  **Note:** Version bump only for package @rxap/config
@@ -85,6 +85,16 @@
85
85
  <h1>Change Log</h1>
86
86
  <p>All notable changes to this project will be documented in this file.
87
87
  See <a href="https://conventionalcommits.org">Conventional Commits</a> for commit guidelines.</p>
88
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/config@19.3.0-dev.0...@rxap/config@19.3.0-dev.1">19.3.0-dev.1</a> (2026-04-14)</h1>
89
+ <h3>Features</h3>
90
+ <ul>
91
+ <li><strong>config:</strong> add IPFS gateway support and simplify DNS server handling (<a href="https://gitlab.com/rxap/packages/commit/345154901dfe881fe97bf5bf3ed113ec4d5036ef">3451549</a>)</li>
92
+ </ul>
93
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/config@19.2.0...@rxap/config@19.3.0-dev.0">19.3.0-dev.0</a> (2026-02-09)</h1>
94
+ <h3>Features</h3>
95
+ <ul>
96
+ <li><strong>config:</strong> add configurable loading order for config sources (<a href="https://gitlab.com/rxap/packages/commit/6aac03bec5dfc5b8c162f424b90fdd64bfc3899e">6aac03b</a>)</li>
97
+ </ul>
88
98
  <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/config@19.2.0-dev.3...@rxap/config@19.2.0">19.2.0</a> (2026-01-23)</h1>
89
99
  <p><strong>Note:</strong> Version bump only for package @rxap/config</p>
90
100
  <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/config@19.2.0-dev.2...@rxap/config@19.2.0-dev.3">19.2.0-dev.3</a> (2026-01-19)</h1>
@@ -117,9 +117,9 @@
117
117
  <li>
118
118
  <b>@angular/core</b> : ^19.2.1</li>
119
119
  <li>
120
- <b>@rxap/environment</b> : ^19.1.0-dev.0</li>
120
+ <b>@rxap/environment</b> : ^19.1.0</li>
121
121
  <li>
122
- <b>@rxap/utilities</b> : ^16.5.0-dev.1</li>
122
+ <b>@rxap/utilities</b> : ^16.5.1-dev.0</li>
123
123
  <li>
124
124
  <b>rxjs</b> : ^7.8.1</li>
125
125
  </ul>
@@ -260,7 +260,7 @@
260
260
  </tr>
261
261
  <tr>
262
262
  <td class="col-md-4">
263
- <div class="io-line">Defined in <a href="" data-line="86" class="link-to-prism">src/lib/config.service.ts:86</a></div>
263
+ <div class="io-line">Defined in <a href="" data-line="102" class="link-to-prism">src/lib/config.service.ts:102</a></div>
264
264
  </td>
265
265
  </tr>
266
266
 
@@ -325,8 +325,8 @@
325
325
 
326
326
  <tr>
327
327
  <td class="col-md-4">
328
- <div class="io-line">Defined in <a href="" data-line="504"
329
- class="link-to-prism">src/lib/config.service.ts:504</a></div>
328
+ <div class="io-line">Defined in <a href="" data-line="556"
329
+ class="link-to-prism">src/lib/config.service.ts:556</a></div>
330
330
  </td>
331
331
  </tr>
332
332
 
@@ -364,8 +364,8 @@
364
364
 
365
365
  <tr>
366
366
  <td class="col-md-4">
367
- <div class="io-line">Defined in <a href="" data-line="508"
368
- class="link-to-prism">src/lib/config.service.ts:508</a></div>
367
+ <div class="io-line">Defined in <a href="" data-line="560"
368
+ class="link-to-prism">src/lib/config.service.ts:560</a></div>
369
369
  </td>
370
370
  </tr>
371
371
 
@@ -441,8 +441,8 @@
441
441
 
442
442
  <tr>
443
443
  <td class="col-md-4">
444
- <div class="io-line">Defined in <a href="" data-line="509"
445
- class="link-to-prism">src/lib/config.service.ts:509</a></div>
444
+ <div class="io-line">Defined in <a href="" data-line="561"
445
+ class="link-to-prism">src/lib/config.service.ts:561</a></div>
446
446
  </td>
447
447
  </tr>
448
448
 
@@ -530,8 +530,8 @@
530
530
 
531
531
  <tr>
532
532
  <td class="col-md-4">
533
- <div class="io-line">Defined in <a href="" data-line="510"
534
- class="link-to-prism">src/lib/config.service.ts:510</a></div>
533
+ <div class="io-line">Defined in <a href="" data-line="562"
534
+ class="link-to-prism">src/lib/config.service.ts:562</a></div>
535
535
  </td>
536
536
  </tr>
537
537
 
@@ -619,8 +619,8 @@
619
619
 
620
620
  <tr>
621
621
  <td class="col-md-4">
622
- <div class="io-line">Defined in <a href="" data-line="442"
623
- class="link-to-prism">src/lib/config.service.ts:442</a></div>
622
+ <div class="io-line">Defined in <a href="" data-line="494"
623
+ class="link-to-prism">src/lib/config.service.ts:494</a></div>
624
624
  </td>
625
625
  </tr>
626
626
 
@@ -721,8 +721,8 @@
721
721
 
722
722
  <tr>
723
723
  <td class="col-md-4">
724
- <div class="io-line">Defined in <a href="" data-line="448"
725
- class="link-to-prism">src/lib/config.service.ts:448</a></div>
724
+ <div class="io-line">Defined in <a href="" data-line="500"
725
+ class="link-to-prism">src/lib/config.service.ts:500</a></div>
726
726
  </td>
727
727
  </tr>
728
728
 
@@ -831,8 +831,8 @@
831
831
 
832
832
  <tr>
833
833
  <td class="col-md-4">
834
- <div class="io-line">Defined in <a href="" data-line="514"
835
- class="link-to-prism">src/lib/config.service.ts:514</a></div>
834
+ <div class="io-line">Defined in <a href="" data-line="566"
835
+ class="link-to-prism">src/lib/config.service.ts:566</a></div>
836
836
  </td>
837
837
  </tr>
838
838
 
@@ -908,8 +908,8 @@
908
908
 
909
909
  <tr>
910
910
  <td class="col-md-4">
911
- <div class="io-line">Defined in <a href="" data-line="515"
912
- class="link-to-prism">src/lib/config.service.ts:515</a></div>
911
+ <div class="io-line">Defined in <a href="" data-line="567"
912
+ class="link-to-prism">src/lib/config.service.ts:567</a></div>
913
913
  </td>
914
914
  </tr>
915
915
 
@@ -997,8 +997,8 @@
997
997
 
998
998
  <tr>
999
999
  <td class="col-md-4">
1000
- <div class="io-line">Defined in <a href="" data-line="516"
1001
- class="link-to-prism">src/lib/config.service.ts:516</a></div>
1000
+ <div class="io-line">Defined in <a href="" data-line="568"
1001
+ class="link-to-prism">src/lib/config.service.ts:568</a></div>
1002
1002
  </td>
1003
1003
  </tr>
1004
1004
 
@@ -1087,8 +1087,8 @@
1087
1087
 
1088
1088
  <tr>
1089
1089
  <td class="col-md-4">
1090
- <div class="io-line">Defined in <a href="" data-line="106"
1091
- class="link-to-prism">src/lib/config.service.ts:106</a></div>
1090
+ <div class="io-line">Defined in <a href="" data-line="122"
1091
+ class="link-to-prism">src/lib/config.service.ts:122</a></div>
1092
1092
  </td>
1093
1093
  </tr>
1094
1094
 
@@ -1173,8 +1173,8 @@
1173
1173
 
1174
1174
  <tr>
1175
1175
  <td class="col-md-4">
1176
- <div class="io-line">Defined in <a href="" data-line="500"
1177
- class="link-to-prism">src/lib/config.service.ts:500</a></div>
1176
+ <div class="io-line">Defined in <a href="" data-line="552"
1177
+ class="link-to-prism">src/lib/config.service.ts:552</a></div>
1178
1178
  </td>
1179
1179
  </tr>
1180
1180
 
@@ -1243,8 +1243,8 @@
1243
1243
 
1244
1244
  <tr>
1245
1245
  <td class="col-md-4">
1246
- <div class="io-line">Defined in <a href="" data-line="423"
1247
- class="link-to-prism">src/lib/config.service.ts:423</a></div>
1246
+ <div class="io-line">Defined in <a href="" data-line="475"
1247
+ class="link-to-prism">src/lib/config.service.ts:475</a></div>
1248
1248
  </td>
1249
1249
  </tr>
1250
1250
 
@@ -1353,7 +1353,7 @@
1353
1353
  </tr>
1354
1354
  <tr>
1355
1355
  <td class="col-md-4">
1356
- <div class="io-line">Defined in <a href="" data-line="86" class="link-to-prism">src/lib/config.service.ts:86</a></div>
1356
+ <div class="io-line">Defined in <a href="" data-line="102" class="link-to-prism">src/lib/config.service.ts:102</a></div>
1357
1357
  </td>
1358
1358
  </tr>
1359
1359
 
@@ -1385,7 +1385,7 @@
1385
1385
  </tr>
1386
1386
  <tr>
1387
1387
  <td class="col-md-4">
1388
- <div class="io-line">Defined in <a href="" data-line="65" class="link-to-prism">src/lib/config.service.ts:65</a></div>
1388
+ <div class="io-line">Defined in <a href="" data-line="81" class="link-to-prism">src/lib/config.service.ts:81</a></div>
1389
1389
  </td>
1390
1390
  </tr>
1391
1391
 
@@ -1417,7 +1417,7 @@
1417
1417
  </tr>
1418
1418
  <tr>
1419
1419
  <td class="col-md-4">
1420
- <div class="io-line">Defined in <a href="" data-line="72" class="link-to-prism">src/lib/config.service.ts:72</a></div>
1420
+ <div class="io-line">Defined in <a href="" data-line="88" class="link-to-prism">src/lib/config.service.ts:88</a></div>
1421
1421
  </td>
1422
1422
  </tr>
1423
1423
 
@@ -1457,7 +1457,7 @@ the Urls array.</p>
1457
1457
  </tr>
1458
1458
  <tr>
1459
1459
  <td class="col-md-4">
1460
- <div class="io-line">Defined in <a href="" data-line="80" class="link-to-prism">src/lib/config.service.ts:80</a></div>
1460
+ <div class="io-line">Defined in <a href="" data-line="96" class="link-to-prism">src/lib/config.service.ts:96</a></div>
1461
1461
  </td>
1462
1462
  </tr>
1463
1463
 
@@ -1483,7 +1483,7 @@ the Urls array.</p>
1483
1483
  </tr>
1484
1484
  <tr>
1485
1485
  <td class="col-md-4">
1486
- <div class="io-line">Defined in <a href="" data-line="59" class="link-to-prism">src/lib/config.service.ts:59</a></div>
1486
+ <div class="io-line">Defined in <a href="" data-line="75" class="link-to-prism">src/lib/config.service.ts:75</a></div>
1487
1487
  </td>
1488
1488
  </tr>
1489
1489
 
@@ -1515,7 +1515,7 @@ the Urls array.</p>
1515
1515
  </tr>
1516
1516
  <tr>
1517
1517
  <td class="col-md-4">
1518
- <div class="io-line">Defined in <a href="" data-line="62" class="link-to-prism">src/lib/config.service.ts:62</a></div>
1518
+ <div class="io-line">Defined in <a href="" data-line="78" class="link-to-prism">src/lib/config.service.ts:78</a></div>
1519
1519
  </td>
1520
1520
  </tr>
1521
1521
 
@@ -1541,7 +1541,7 @@ the Urls array.</p>
1541
1541
  </tr>
1542
1542
  <tr>
1543
1543
  <td class="col-md-4">
1544
- <div class="io-line">Defined in <a href="" data-line="60" class="link-to-prism">src/lib/config.service.ts:60</a></div>
1544
+ <div class="io-line">Defined in <a href="" data-line="76" class="link-to-prism">src/lib/config.service.ts:76</a></div>
1545
1545
  </td>
1546
1546
  </tr>
1547
1547
 
@@ -1573,7 +1573,7 @@ the Urls array.</p>
1573
1573
  </tr>
1574
1574
  <tr>
1575
1575
  <td class="col-md-4">
1576
- <div class="io-line">Defined in <a href="" data-line="63" class="link-to-prism">src/lib/config.service.ts:63</a></div>
1576
+ <div class="io-line">Defined in <a href="" data-line="79" class="link-to-prism">src/lib/config.service.ts:79</a></div>
1577
1577
  </td>
1578
1578
  </tr>
1579
1579
 
@@ -1605,7 +1605,7 @@ the Urls array.</p>
1605
1605
  </tr>
1606
1606
  <tr>
1607
1607
  <td class="col-md-4">
1608
- <div class="io-line">Defined in <a href="" data-line="78" class="link-to-prism">src/lib/config.service.ts:78</a></div>
1608
+ <div class="io-line">Defined in <a href="" data-line="94" class="link-to-prism">src/lib/config.service.ts:94</a></div>
1609
1609
  </td>
1610
1610
  </tr>
1611
1611
 
@@ -1649,7 +1649,7 @@ value form the Defaults values or dynamic config files</p>
1649
1649
  </tr>
1650
1650
  <tr>
1651
1651
  <td class="col-md-4">
1652
- <div class="io-line">Defined in <a href="" data-line="85" class="link-to-prism">src/lib/config.service.ts:85</a></div>
1652
+ <div class="io-line">Defined in <a href="" data-line="101" class="link-to-prism">src/lib/config.service.ts:101</a></div>
1653
1653
  </td>
1654
1654
  </tr>
1655
1655
 
@@ -1690,6 +1690,13 @@ export enum ConfigLoadingStrategy {
1690
1690
  FIFO &#x3D; &#x27;fifo&#x27;,
1691
1691
  }
1692
1692
 
1693
+ export enum ConfigLoadMethod {
1694
+ FROM_URLS &#x3D; &#x27;fromUrls&#x27;,
1695
+ FROM_LOCAL_STORAGE &#x3D; &#x27;fromLocalStorage&#x27;,
1696
+ FROM_URL_PARAM &#x3D; &#x27;fromUrlParam&#x27;,
1697
+ FROM_CID &#x3D; &#x27;fromCid&#x27;,
1698
+ }
1699
+
1693
1700
  export interface ConfigLoadOptions {
1694
1701
  fromUrlParam?: string | boolean;
1695
1702
  fromUrls?: boolean;
@@ -1711,8 +1718,17 @@ export interface ConfigLoadOptions {
1711
1718
  */
1712
1719
  fromCid?: string;
1713
1720
  fetchCidContent?: (cid: string, path?: string) &#x3D;&gt; Promise&lt;Blob | null&gt;;
1721
+ ipfsGatewayServers?: Array&lt;(cid: string) &#x3D;&gt; string&gt;;
1714
1722
  dnsServers?: string[];
1715
1723
  strategy?: ConfigLoadingStrategy;
1724
+ /**
1725
+ * Defines the order and subset of config sources to load.
1726
+ * If not specified, defaults to: [FROM_URLS, FROM_LOCAL_STORAGE, FROM_URL_PARAM, FROM_CID]
1727
+ *
1728
+ * Note: static config is always merged first, and Overwrites are always merged last.
1729
+ * Note: fromDns is not a source itself - it resolves the CID for FROM_CID.
1730
+ */
1731
+ order?: ConfigLoadMethod[];
1716
1732
  }
1717
1733
 
1718
1734
  @Injectable({
@@ -1785,81 +1801,60 @@ export class ConfigService&lt;Config extends Record&lt;string, any&gt; &#x3D; Re
1785
1801
  }
1786
1802
  }
1787
1803
 
1804
+ // Always merge static config first
1788
1805
  config &#x3D; deepMerge(config, options?.static ?? {});
1789
- let done &#x3D; false;
1790
1806
 
1791
- if (!done &amp;&amp; options?.fromUrls !&#x3D;&#x3D; false) {
1792
- try {
1793
- config &#x3D; deepMerge(config, await this.loadConfigFromUrls(options, environment));
1794
- if (options.strategy &#x3D;&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1795
- done &#x3D; true;
1796
- }
1797
- } catch (error: any) {
1798
- if (options.strategy !&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1799
- console.error(&#x27;Could not load config from urls&#x27;, error);
1800
- throw error;
1801
- } else {
1802
- console.warn(&#x27;Could not load config from urls: &#x27; + error.message + &#x27;. Will try next strategy.&#x27;);
1803
- }
1804
- }
1805
- }
1807
+ // Determine the order of config sources to load
1808
+ const order &#x3D; options.order ?? [
1809
+ ConfigLoadMethod.FROM_URLS,
1810
+ ConfigLoadMethod.FROM_LOCAL_STORAGE,
1811
+ ConfigLoadMethod.FROM_URL_PARAM,
1812
+ ConfigLoadMethod.FROM_CID,
1813
+ ];
1806
1814
 
1807
- if (!done &amp;&amp; options?.fromLocalStorage !&#x3D;&#x3D; false) {
1808
- try {
1809
- config &#x3D; deepMerge(config, this.loadConfigFromLocalStorage(options));
1810
- if (options.strategy &#x3D;&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1811
- done &#x3D; true;
1812
- }
1813
- } catch (error: any) {
1814
- if (options.strategy !&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1815
- console.error(&#x27;Could not load config from local storage&#x27;, error);
1816
- throw error;
1817
- } else {
1818
- console.warn(&#x27;Could not load config from local storage: &#x27; + error.message + &#x27;. Will try next strategy.&#x27;);
1819
- }
1820
- }
1815
+ // If fromDns is enabled and FROM_CID is in the order, resolve CID first
1816
+ if (options.fromDns &amp;&amp; order.includes(ConfigLoadMethod.FROM_CID) &amp;&amp; !options.fromCid) {
1817
+ await this.loadConfigFromDns(options as any);
1821
1818
  }
1822
1819
 
1823
- if (!done &amp;&amp; options?.fromUrlParam) {
1824
- try {
1825
- config &#x3D; deepMerge(config, this.loadConfigFromUrlParam(options as any));
1826
- if (options.strategy &#x3D;&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1827
- done &#x3D; true;
1828
- }
1829
- } catch (error: any) {
1830
- if (options.strategy !&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1831
- console.error(&#x27;Could not load config from url param&#x27;, error);
1832
- throw error;
1833
- } else {
1834
- console.warn(&#x27;Could not load config from url param: &#x27; + error.message + &#x27;. Will try next strategy.&#x27;);
1835
- }
1820
+ // Load configs from sources in the specified order
1821
+ let done &#x3D; false;
1822
+ for (const method of order) {
1823
+ if (done) {
1824
+ break;
1836
1825
  }
1837
- }
1838
1826
 
1839
- if (!done &amp;&amp; options?.fromDns) {
1840
- await this.loadConfigFromDns(options as any);
1841
- }
1827
+ // Check if the source is enabled
1828
+ if (!this.isSourceEnabled(options, method)) {
1829
+ continue;
1830
+ }
1842
1831
 
1843
- if (!done &amp;&amp; options?.fromCid) {
1844
1832
  try {
1845
- config &#x3D; deepMerge(config, await this.loadConfigFromCid(options as any));
1833
+ const loadedConfig &#x3D; await this.loadConfigFromMethod(method, options, environment);
1834
+ if (loadedConfig) {
1835
+ config &#x3D; deepMerge(config, loadedConfig);
1836
+ }
1837
+
1838
+ // If using FIFO strategy, stop after first successful load
1846
1839
  if (options.strategy &#x3D;&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1847
1840
  done &#x3D; true;
1848
1841
  }
1849
1842
  } catch (error: any) {
1843
+ const methodName &#x3D; this.getMethodName(method);
1850
1844
  if (options.strategy !&#x3D;&#x3D; ConfigLoadingStrategy.FIFO) {
1851
- console.error(&#x27;Could not load config from cid&#x27;, error);
1845
+ console.error(&#x60;Could not load config from ${methodName}&#x60;, error);
1852
1846
  throw error;
1853
1847
  } else {
1854
- console.warn(&#x27;Could not load config from cid: &#x27; + error.message + &#x27;. Will try next strategy.&#x27;);
1848
+ console.warn(&#x60;Could not load config from ${methodName}: ${error.message}. Will try next strategy.&#x60;);
1855
1849
  }
1856
1850
  }
1857
1851
  }
1858
1852
 
1859
- if (!done) {
1853
+ if (!done &amp;&amp; order.length &gt; 0) {
1860
1854
  console.warn(&#x27;No config loading strategy succeeded. Using default config.&#x27;);
1861
1855
  }
1862
1856
 
1857
+ // Always merge overwrites last
1863
1858
  config &#x3D; deepMerge(config, this.Overwrites);
1864
1859
 
1865
1860
  console.debug(&#x27;app config&#x27;, config);
@@ -1867,6 +1862,55 @@ export class ConfigService&lt;Config extends Record&lt;string, any&gt; &#x3D; Re
1867
1862
  this.Config &#x3D; config;
1868
1863
  }
1869
1864
 
1865
+ private static isSourceEnabled(options: ConfigLoadOptions, method: ConfigLoadMethod): boolean {
1866
+ switch (method) {
1867
+ case ConfigLoadMethod.FROM_URLS:
1868
+ return options.fromUrls !&#x3D;&#x3D; false;
1869
+ case ConfigLoadMethod.FROM_LOCAL_STORAGE:
1870
+ return options.fromLocalStorage !&#x3D;&#x3D; false;
1871
+ case ConfigLoadMethod.FROM_URL_PARAM:
1872
+ return !!options.fromUrlParam;
1873
+ case ConfigLoadMethod.FROM_CID:
1874
+ return !!options.fromCid;
1875
+ default:
1876
+ return false;
1877
+ }
1878
+ }
1879
+
1880
+ private static async loadConfigFromMethod(
1881
+ method: ConfigLoadMethod,
1882
+ options: ConfigLoadOptions,
1883
+ environment?: Environment,
1884
+ ): Promise&lt;any&gt; {
1885
+ switch (method) {
1886
+ case ConfigLoadMethod.FROM_URLS:
1887
+ return await this.loadConfigFromUrls(options, environment);
1888
+ case ConfigLoadMethod.FROM_LOCAL_STORAGE:
1889
+ return this.loadConfigFromLocalStorage(options);
1890
+ case ConfigLoadMethod.FROM_URL_PARAM:
1891
+ return this.loadConfigFromUrlParam(options as any);
1892
+ case ConfigLoadMethod.FROM_CID:
1893
+ return await this.loadConfigFromCid(options as any);
1894
+ default:
1895
+ return null;
1896
+ }
1897
+ }
1898
+
1899
+ private static getMethodName(method: ConfigLoadMethod): string {
1900
+ switch (method) {
1901
+ case ConfigLoadMethod.FROM_URLS:
1902
+ return &#x27;urls&#x27;;
1903
+ case ConfigLoadMethod.FROM_LOCAL_STORAGE:
1904
+ return &#x27;local storage&#x27;;
1905
+ case ConfigLoadMethod.FROM_URL_PARAM:
1906
+ return &#x27;url param&#x27;;
1907
+ case ConfigLoadMethod.FROM_CID:
1908
+ return &#x27;cid&#x27;;
1909
+ default:
1910
+ return &#x27;unknown&#x27;;
1911
+ }
1912
+ }
1913
+
1870
1914
  private static loadConfigFromUrlParam(options: ConfigLoadOptions &amp; { fromUrlParam: string | true }) {
1871
1915
  const param &#x3D; typeof options.fromUrlParam &#x3D;&#x3D;&#x3D; &#x27;string&#x27; ? options.fromUrlParam : &#x27;config&#x27;;
1872
1916
  return this.LoadConfigDefaultFromUrlParam(param);
@@ -1909,8 +1953,18 @@ export class ConfigService&lt;Config extends Record&lt;string, any&gt; &#x3D; Re
1909
1953
 
1910
1954
  private static async loadConfigFromCid(options: ConfigLoadOptions &amp; { fromCid: string | boolean }) {
1911
1955
  console.debug(&#x27;Loading config from CID: &#x27;, options.fromCid);
1956
+ const ipfsGatewayFunctions &#x3D; options.ipfsGatewayServers ?? [];
1957
+ if (!ipfsGatewayFunctions.length) {
1958
+ console.warn(&#x27;No IPFS gateway servers provided for fetching content from CID&#x27;);
1959
+ return;
1960
+ }
1912
1961
  try {
1913
- const cidContent &#x3D; await fetchCidContentAsJson(options.fromCid, undefined, options.fetchCidContent);
1962
+ const cidContent &#x3D; await fetchCidContentAsJson(
1963
+ options.fromCid,
1964
+ undefined,
1965
+ options.fetchCidContent,
1966
+ ipfsGatewayFunctions
1967
+ );
1914
1968
  if (cidContent &amp;&amp; typeof cidContent &#x3D;&#x3D;&#x3D; &#x27;object&#x27;) {
1915
1969
  console.log(&#x60;Merging configuration from CID ${options.fromCid}.&#x60;, cidContent);
1916
1970
  // Merge CID content into the existing config object
@@ -1930,11 +1984,9 @@ export class ConfigService&lt;Config extends Record&lt;string, any&gt; &#x3D; Re
1930
1984
  private static async loadConfigFromDns(options: ConfigLoadOptions &amp; { fromDns: string | boolean }) {
1931
1985
  console.debug(&#x27;Loading config from DNS&#x27;);
1932
1986
  const dnsServers &#x3D; options.dnsServers ?? [];
1933
- if (dnsServers.length &#x3D;&#x3D;&#x3D; 0) {
1934
- dnsServers.push(
1935
- &#x27;https://dns.google/resolve&#x27;,
1936
- &#x27;https://cloudflare-dns.com/dns-query&#x27;
1937
- );
1987
+ if (!dnsServers.length) {
1988
+ console.warn(&#x27;No DNS servers provided for DNS lookup&#x27;);
1989
+ return;
1938
1990
  }
1939
1991
  let domain &#x3D; location.hostname;
1940
1992
  if (typeof options.fromDns &#x3D;&#x3D;&#x3D; &#x27;string&#x27;) {