@rxap/config 19.2.0-dev.2 → 19.2.0-dev.3
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.
- package/CHANGELOG.md +6 -0
- package/compodoc/changelog.html +5 -0
- package/compodoc/dependencies.html +1 -1
- package/compodoc/injectables/ConfigService.html +142 -68
- package/compodoc/interfaces/ConfigLoadOptions.html +197 -33
- package/compodoc/js/menu-wc.js +3 -0
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/enumerations.html +231 -0
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +780 -644
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/ConfigLoaderService.html +2 -2
- package/docs/html/classes/ConfigService.html +6 -6
- package/docs/html/classes/ConfigTestingService.html +2 -2
- package/docs/html/enums/ConfigLoadingStrategy.html +3 -0
- package/docs/html/functions/ProvideConfig.html +1 -1
- package/docs/html/functions/dnsLookup.html +1 -1
- package/docs/html/functions/dnsResolver.html +1 -1
- package/docs/html/functions/fetchCidContent.html +1 -1
- package/docs/html/functions/fetchCidContentAsJson.html +1 -1
- package/docs/html/functions/fetchCidContentViaHttp.html +1 -1
- package/docs/html/functions/fetchContentViaHttp.html +1 -1
- package/docs/html/functions/raceSuccess.html +2 -2
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/AppsNavigationConfig.html +2 -2
- package/docs/html/interfaces/Config.html +2 -2
- package/docs/html/interfaces/ConfigLoadOptions.html +7 -5
- package/docs/html/interfaces/LogoConfig.html +2 -2
- package/docs/html/interfaces/NavigationConfig.html +2 -2
- package/docs/html/interfaces/Oauth2Config.html +2 -2
- package/docs/html/interfaces/i18nConfig.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/AnySchema.html +1 -1
- package/docs/html/types/Join.html +1 -1
- package/docs/html/types/LanguagesConfig.html +1 -1
- package/docs/html/types/Leaves.html +1 -1
- package/docs/html/types/NoInferType.html +1 -1
- package/docs/html/types/Paths.html +1 -1
- package/docs/html/variables/RXAP_CONFIG.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ConfigLoaderService.md +7 -7
- package/docs/markdown/classes/ConfigService.md +22 -22
- package/docs/markdown/classes/ConfigTestingService.md +8 -8
- package/docs/markdown/enumerations/ConfigLoadingStrategy.md +25 -0
- package/docs/markdown/functions/ProvideConfig.md +2 -2
- package/docs/markdown/functions/dnsLookup.md +2 -2
- package/docs/markdown/functions/dnsResolver.md +2 -2
- package/docs/markdown/functions/fetchCidContent.md +2 -2
- package/docs/markdown/functions/fetchCidContentAsJson.md +2 -2
- package/docs/markdown/functions/fetchCidContentViaHttp.md +2 -2
- package/docs/markdown/functions/fetchContentViaHttp.md +2 -2
- package/docs/markdown/functions/raceSuccess.md +2 -2
- package/docs/markdown/globals.md +6 -2
- package/docs/markdown/interfaces/AppsNavigationConfig.md +12 -12
- package/docs/markdown/interfaces/Config.md +6 -6
- package/docs/markdown/interfaces/ConfigLoadOptions.md +27 -11
- package/docs/markdown/interfaces/LogoConfig.md +5 -5
- package/docs/markdown/interfaces/NavigationConfig.md +9 -9
- package/docs/markdown/interfaces/Oauth2Config.md +3 -3
- package/docs/markdown/interfaces/i18nConfig.md +4 -4
- package/docs/markdown/type-aliases/AnySchema.md +2 -2
- package/docs/markdown/type-aliases/Join.md +2 -2
- package/docs/markdown/type-aliases/LanguagesConfig.md +2 -2
- package/docs/markdown/type-aliases/Leaves.md +2 -2
- package/docs/markdown/type-aliases/NoInferType.md +2 -2
- package/docs/markdown/type-aliases/Paths.md +2 -2
- package/docs/markdown/variables/RXAP_CONFIG.md +2 -2
- package/docs/wiki/Class.ConfigLoaderService.md +6 -6
- package/docs/wiki/Class.ConfigService.md +21 -21
- package/docs/wiki/Class.ConfigTestingService.md +7 -7
- package/docs/wiki/Enumeration.ConfigLoadingStrategy.md +21 -0
- package/docs/wiki/Function.ProvideConfig.md +1 -1
- package/docs/wiki/Function.dnsLookup.md +1 -1
- package/docs/wiki/Function.dnsResolver.md +1 -1
- package/docs/wiki/Function.fetchCidContent.md +1 -1
- package/docs/wiki/Function.fetchCidContentAsJson.md +1 -1
- package/docs/wiki/Function.fetchCidContentViaHttp.md +1 -1
- package/docs/wiki/Function.fetchContentViaHttp.md +1 -1
- package/docs/wiki/Function.raceSuccess.md +1 -1
- package/docs/wiki/Interface.AppsNavigationConfig.md +11 -11
- package/docs/wiki/Interface.Config.md +5 -5
- package/docs/wiki/Interface.ConfigLoadOptions.md +26 -10
- package/docs/wiki/Interface.LogoConfig.md +4 -4
- package/docs/wiki/Interface.NavigationConfig.md +8 -8
- package/docs/wiki/Interface.Oauth2Config.md +2 -2
- package/docs/wiki/Interface.i18nConfig.md +3 -3
- package/docs/wiki/TypeAlias.AnySchema.md +1 -1
- package/docs/wiki/TypeAlias.Join.md +1 -1
- package/docs/wiki/TypeAlias.LanguagesConfig.md +1 -1
- package/docs/wiki/TypeAlias.Leaves.md +1 -1
- package/docs/wiki/TypeAlias.NoInferType.md +1 -1
- package/docs/wiki/TypeAlias.Paths.md +1 -1
- package/docs/wiki/Variable.RXAP_CONFIG.md +1 -1
- package/docs/wiki/_Sidebar.md +4 -0
- package/docs/wiki/globals.md +5 -1
- package/fesm2022/rxap-config.mjs +111 -34
- package/fesm2022/rxap-config.mjs.map +1 -1
- package/lib/config.service.d.ts +9 -0
- package/package.json +6 -6
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: NavigationConfig
|
|
4
4
|
|
|
5
|
-
Defined in: [config.ts:22](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [config.ts:22](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L22)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Defined in: [config.ts:22](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
10
10
|
|
|
11
11
|
> `optional` **apps**: [`AppsNavigationConfig`](../wiki/Interface.AppsNavigationConfig)[]
|
|
12
12
|
|
|
13
|
-
Defined in: [config.ts:23](https://gitlab.com/rxap/packages/-/blob/
|
|
13
|
+
Defined in: [config.ts:23](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L23)
|
|
14
14
|
|
|
15
15
|
***
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ Defined in: [config.ts:23](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
18
18
|
|
|
19
19
|
> `optional` **collapsable**: `boolean`
|
|
20
20
|
|
|
21
|
-
Defined in: [config.ts:24](https://gitlab.com/rxap/packages/-/blob/
|
|
21
|
+
Defined in: [config.ts:24](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L24)
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Defined in: [config.ts:24](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
26
26
|
|
|
27
27
|
> `optional` **fixedInViewport**: `boolean`
|
|
28
28
|
|
|
29
|
-
Defined in: [config.ts:28](https://gitlab.com/rxap/packages/-/blob/
|
|
29
|
+
Defined in: [config.ts:28](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L28)
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ Defined in: [config.ts:28](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
34
34
|
|
|
35
35
|
> `optional` **mobileQuery**: `string`
|
|
36
36
|
|
|
37
|
-
Defined in: [config.ts:29](https://gitlab.com/rxap/packages/-/blob/
|
|
37
|
+
Defined in: [config.ts:29](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L29)
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@ Defined in: [config.ts:29](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
42
42
|
|
|
43
43
|
> `optional` **mode**: `"side"` \| `"over"`
|
|
44
44
|
|
|
45
|
-
Defined in: [config.ts:26](https://gitlab.com/rxap/packages/-/blob/
|
|
45
|
+
Defined in: [config.ts:26](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L26)
|
|
46
46
|
|
|
47
47
|
***
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ Defined in: [config.ts:26](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
50
50
|
|
|
51
51
|
> `optional` **opened**: `boolean`
|
|
52
52
|
|
|
53
|
-
Defined in: [config.ts:27](https://gitlab.com/rxap/packages/-/blob/
|
|
53
|
+
Defined in: [config.ts:27](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L27)
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
@@ -58,4 +58,4 @@ Defined in: [config.ts:27](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
58
58
|
|
|
59
59
|
> `optional` **pinned**: `boolean`
|
|
60
60
|
|
|
61
|
-
Defined in: [config.ts:25](https://gitlab.com/rxap/packages/-/blob/
|
|
61
|
+
Defined in: [config.ts:25](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L25)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Oauth2Config
|
|
4
4
|
|
|
5
|
-
Defined in: [config.ts:39](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [config.ts:39](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L39)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ Defined in: [config.ts:39](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
10
10
|
|
|
11
11
|
> `optional` **profileUrl**: `string`
|
|
12
12
|
|
|
13
|
-
Defined in: [config.ts:40](https://gitlab.com/rxap/packages/-/blob/
|
|
13
|
+
Defined in: [config.ts:40](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L40)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: i18nConfig
|
|
4
4
|
|
|
5
|
-
Defined in: [config.ts:34](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [config.ts:34](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L34)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Defined in: [config.ts:34](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
10
10
|
|
|
11
11
|
> `optional` **defaultLanguage**: `string`
|
|
12
12
|
|
|
13
|
-
Defined in: [config.ts:36](https://gitlab.com/rxap/packages/-/blob/
|
|
13
|
+
Defined in: [config.ts:36](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L36)
|
|
14
14
|
|
|
15
15
|
***
|
|
16
16
|
|
|
@@ -18,4 +18,4 @@ Defined in: [config.ts:36](https://gitlab.com/rxap/packages/-/blob/b23f976d89ae8
|
|
|
18
18
|
|
|
19
19
|
> `optional` **languages**: [`LanguagesConfig`](../wiki/TypeAlias.LanguagesConfig)
|
|
20
20
|
|
|
21
|
-
Defined in: [config.ts:35](https://gitlab.com/rxap/packages/-/blob/
|
|
21
|
+
Defined in: [config.ts:35](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L35)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **AnySchema**: `object`
|
|
6
6
|
|
|
7
|
-
Defined in: [config.service.ts:22](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [config.service.ts:22](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.service.ts#L22)
|
|
8
8
|
|
|
9
9
|
## Type declaration
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Join**\<`K`, `P`\>: `K` *extends* `string` \| `number` ? `P` *extends* `string` \| `number` ? `` `${K}${"" extends P ? "" : "."}${P}` `` : `never` : `never`
|
|
6
6
|
|
|
7
|
-
Defined in: [types.ts:8](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [types.ts:8](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/types.ts#L8)
|
|
8
8
|
|
|
9
9
|
## Type Parameters
|
|
10
10
|
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
> **LanguagesConfig**: `Record`\<`string`, `string`\>
|
|
6
6
|
|
|
7
|
-
Defined in: [config.ts:32](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [config.ts:32](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/config.ts#L32)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Leaves**\<`T`, `D`\>: \[`D`\] *extends* \[`never`\] ? `never` : `T` *extends* `object` ? `{ [K in keyof T]-?: Join<K, Leaves<T[K], Prev[D]>> }`\[keyof `T`\] : `""`
|
|
6
6
|
|
|
7
|
-
Defined in: [types.ts:20](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [types.ts:20](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/types.ts#L20)
|
|
8
8
|
|
|
9
9
|
## Type Parameters
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **NoInferType**\<`T`\>: \[`T`\]\[`T` *extends* `any` ? `0` : `never`\]
|
|
6
6
|
|
|
7
|
-
Defined in: [types.ts:1](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [types.ts:1](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/types.ts#L1)
|
|
8
8
|
|
|
9
9
|
## Type Parameters
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Paths**\<`T`, `D`\>: \[`D`\] *extends* \[`never`\] ? `never` : `T` *extends* `object` ? \{ \[K in keyof T\]-?: K extends string \| number ? \`$\{K\}\` \| Join\<K, Paths\<T\[K\], Prev\[D\]\>\> : never \}\[keyof `T`\] : `""`
|
|
6
6
|
|
|
7
|
-
Defined in: [types.ts:13](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [types.ts:13](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/types.ts#L13)
|
|
8
8
|
|
|
9
9
|
## Type Parameters
|
|
10
10
|
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
> `const` **RXAP\_CONFIG**: `InjectionToken`\<`unknown`\>
|
|
6
6
|
|
|
7
|
-
Defined in: [tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/5ad37909a73f9e3eaab7208cdf5b0e12eb759c7e/packages/angular/config/src/lib/tokens.ts#L3)
|
package/docs/wiki/_Sidebar.md
CHANGED
package/docs/wiki/globals.md
CHANGED
package/fesm2022/rxap-config.mjs
CHANGED
|
@@ -24,10 +24,10 @@ class ConfigLoaderService {
|
|
|
24
24
|
this.configLoading.set(url, loading$);
|
|
25
25
|
return firstValueFrom(loading$);
|
|
26
26
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
28
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigLoaderService, deps: [{ token: HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigLoaderService, providedIn: 'root' }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigLoaderService, decorators: [{
|
|
31
31
|
type: Injectable,
|
|
32
32
|
args: [{ providedIn: 'root' }]
|
|
33
33
|
}], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
|
|
@@ -58,10 +58,10 @@ class ConfigTestingService {
|
|
|
58
58
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
59
59
|
setLocalConfig(config) {
|
|
60
60
|
}
|
|
61
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
62
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigTestingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
62
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigTestingService }); }
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigTestingService, decorators: [{
|
|
65
65
|
type: Injectable
|
|
66
66
|
}] });
|
|
67
67
|
|
|
@@ -201,6 +201,11 @@ async function fetchCidContentAsJson(cid, path, _fetchCidContent = fetchCidConte
|
|
|
201
201
|
return null; // Return null if blob is not available
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
var ConfigLoadingStrategy;
|
|
205
|
+
(function (ConfigLoadingStrategy) {
|
|
206
|
+
ConfigLoadingStrategy["DEFAULT"] = "default";
|
|
207
|
+
ConfigLoadingStrategy["FIFO"] = "fifo";
|
|
208
|
+
})(ConfigLoadingStrategy || (ConfigLoadingStrategy = {}));
|
|
204
209
|
class ConfigService {
|
|
205
210
|
static { this.onError = new ReplaySubject(1); }
|
|
206
211
|
static { this.onRequestError = new ReplaySubject(1); }
|
|
@@ -253,9 +258,104 @@ class ConfigService {
|
|
|
253
258
|
options.fromUrlParam = environment.config.fromUrlParam;
|
|
254
259
|
options.fromLocalStorage = environment.config.fromLocalStorage;
|
|
255
260
|
options.schema = environment.config.schema;
|
|
261
|
+
options.strategy = environment.config.strategy ?? options.strategy;
|
|
256
262
|
}
|
|
257
263
|
}
|
|
258
264
|
config = deepMerge(config, options?.static ?? {});
|
|
265
|
+
let done = false;
|
|
266
|
+
if (!done && options?.fromUrls !== false) {
|
|
267
|
+
try {
|
|
268
|
+
config = deepMerge(config, await this.loadConfigFromUrls(options, environment));
|
|
269
|
+
if (options.strategy === ConfigLoadingStrategy.FIFO) {
|
|
270
|
+
done = true;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
if (options.strategy !== ConfigLoadingStrategy.FIFO) {
|
|
275
|
+
console.error('Could not load config from urls', error);
|
|
276
|
+
throw error;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
console.warn('Could not load config from urls: ' + error.message + '. Will try next strategy.');
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (!done && options?.fromLocalStorage !== false) {
|
|
284
|
+
try {
|
|
285
|
+
config = deepMerge(config, this.loadConfigFromLocalStorage(options));
|
|
286
|
+
if (options.strategy === ConfigLoadingStrategy.FIFO) {
|
|
287
|
+
done = true;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
if (options.strategy !== ConfigLoadingStrategy.FIFO) {
|
|
292
|
+
console.error('Could not load config from local storage', error);
|
|
293
|
+
throw error;
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
console.warn('Could not load config from local storage: ' + error.message + '. Will try next strategy.');
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (!done && options?.fromUrlParam) {
|
|
301
|
+
try {
|
|
302
|
+
config = deepMerge(config, this.loadConfigFromUrlParam(options));
|
|
303
|
+
if (options.strategy === ConfigLoadingStrategy.FIFO) {
|
|
304
|
+
done = true;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
if (options.strategy !== ConfigLoadingStrategy.FIFO) {
|
|
309
|
+
console.error('Could not load config from url param', error);
|
|
310
|
+
throw error;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
console.warn('Could not load config from url param: ' + error.message + '. Will try next strategy.');
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if (!done && options?.fromDns) {
|
|
318
|
+
await this.loadConfigFromDns(options);
|
|
319
|
+
}
|
|
320
|
+
if (!done && options?.fromCid) {
|
|
321
|
+
try {
|
|
322
|
+
config = deepMerge(config, await this.loadConfigFromCid(options));
|
|
323
|
+
if (options.strategy === ConfigLoadingStrategy.FIFO) {
|
|
324
|
+
done = true;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
catch (error) {
|
|
328
|
+
if (options.strategy !== ConfigLoadingStrategy.FIFO) {
|
|
329
|
+
console.error('Could not load config from cid', error);
|
|
330
|
+
throw error;
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
console.warn('Could not load config from cid: ' + error.message + '. Will try next strategy.');
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (!done) {
|
|
338
|
+
console.warn('No config loading strategy succeeded. Using default config.');
|
|
339
|
+
}
|
|
340
|
+
config = deepMerge(config, this.Overwrites);
|
|
341
|
+
console.debug('app config', config);
|
|
342
|
+
this.Config = config;
|
|
343
|
+
}
|
|
344
|
+
static loadConfigFromUrlParam(options) {
|
|
345
|
+
const param = typeof options.fromUrlParam === 'string' ? options.fromUrlParam : 'config';
|
|
346
|
+
return this.LoadConfigDefaultFromUrlParam(param);
|
|
347
|
+
}
|
|
348
|
+
static loadConfigFromLocalStorage(options) {
|
|
349
|
+
const localConfig = localStorage.getItem(ConfigService.LocalStorageKey);
|
|
350
|
+
if (localConfig) {
|
|
351
|
+
return JSON.parse(localConfig);
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
return {};
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
static async loadConfigFromUrls(options, environment) {
|
|
358
|
+
let config = {};
|
|
259
359
|
const urls = (options?.url ? coerceArray(options.url) : ConfigService.Urls).map(url => {
|
|
260
360
|
if (typeof url === 'function') {
|
|
261
361
|
if (!environment) {
|
|
@@ -275,30 +375,7 @@ class ConfigService {
|
|
|
275
375
|
config = deepMerge(config, loadedConfig);
|
|
276
376
|
}
|
|
277
377
|
}
|
|
278
|
-
|
|
279
|
-
if (options?.fromLocalStorage !== false) {
|
|
280
|
-
const localConfig = localStorage.getItem(ConfigService.LocalStorageKey);
|
|
281
|
-
if (localConfig) {
|
|
282
|
-
try {
|
|
283
|
-
config = deepMerge(config, JSON.parse(localConfig));
|
|
284
|
-
}
|
|
285
|
-
catch (e) {
|
|
286
|
-
console.error('local config could not be parsed');
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
if (options?.fromUrlParam) {
|
|
291
|
-
const param = typeof options.fromUrlParam === 'string' ? options.fromUrlParam : 'config';
|
|
292
|
-
config = deepMerge(config, this.LoadConfigDefaultFromUrlParam(param));
|
|
293
|
-
}
|
|
294
|
-
if (options?.fromDns) {
|
|
295
|
-
await this.loadConfigFromDns(options);
|
|
296
|
-
}
|
|
297
|
-
if (options?.fromCid) {
|
|
298
|
-
config = deepMerge(config, await this.loadConfigFromCid(options));
|
|
299
|
-
}
|
|
300
|
-
console.debug('app config', config);
|
|
301
|
-
this.Config = config;
|
|
378
|
+
return config;
|
|
302
379
|
}
|
|
303
380
|
static async loadConfigFromCid(options) {
|
|
304
381
|
console.debug('Loading config from CID: ', options.fromCid);
|
|
@@ -540,10 +617,10 @@ class ConfigService {
|
|
|
540
617
|
}
|
|
541
618
|
return value;
|
|
542
619
|
}
|
|
543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
544
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigService, deps: [{ token: RXAP_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
621
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigService, providedIn: 'root' }); }
|
|
545
622
|
}
|
|
546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ConfigService, decorators: [{
|
|
547
624
|
type: Injectable,
|
|
548
625
|
args: [{
|
|
549
626
|
providedIn: 'root',
|
|
@@ -569,5 +646,5 @@ function ProvideConfig(config = {}) {
|
|
|
569
646
|
* Generated bundle index. Do not edit.
|
|
570
647
|
*/
|
|
571
648
|
|
|
572
|
-
export { ConfigLoaderService, ConfigService, ConfigTestingService, ProvideConfig, RXAP_CONFIG, dnsLookup, dnsResolver, fetchCidContent, fetchCidContentAsJson, fetchCidContentViaHttp, fetchContentViaHttp, raceSuccess };
|
|
649
|
+
export { ConfigLoaderService, ConfigLoadingStrategy, ConfigService, ConfigTestingService, ProvideConfig, RXAP_CONFIG, dnsLookup, dnsResolver, fetchCidContent, fetchCidContentAsJson, fetchCidContentViaHttp, fetchContentViaHttp, raceSuccess };
|
|
573
650
|
//# sourceMappingURL=rxap-config.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-config.mjs","sources":["../../../../../packages/angular/config/src/lib/config-loader.service.ts","../../../../../packages/angular/config/src/lib/config-testing-service.ts","../../../../../packages/angular/config/src/lib/tokens.ts","../../../../../packages/angular/config/src/lib/utilities.ts","../../../../../packages/angular/config/src/lib/config.service.ts","../../../../../packages/angular/config/src/lib/provide-config.ts","../../../../../packages/angular/config/src/index.ts","../../../../../packages/angular/config/src/rxap-config.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n firstValueFrom,\n Observable,\n} from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\nimport {\n finalize,\n share,\n} from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigLoaderService {\n public readonly configs = new Map<string, any>();\n\n public readonly configLoading = new Map<string, Observable<any>>();\n\n constructor(\n @Inject(HttpClient)\n public readonly http: HttpClient,\n ) {\n }\n\n public async load$<T = any>(url: string): Promise<T> {\n if (this.configs.has(url)) {\n return this.configs.get(url);\n }\n\n if (this.configLoading.has(url)) {\n return this.configLoading.get(url)!.toPromise();\n }\n\n const loading$ = this.http.get<T>(url).pipe(\n finalize(() => this.configLoading.delete(url)),\n share(),\n );\n\n this.configLoading.set(url, loading$);\n\n return firstValueFrom(loading$);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n getFromObject,\n SetToObject,\n} from '@rxap/utilities';\nimport { ConfigService } from './config.service';\n\n@Injectable()\nexport class ConfigTestingService implements ConfigService {\n readonly config: Record<string, any> = {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n clearLocalConfig(): void {\n }\n\n set<T>(propertyPath: string, value: T): void {\n SetToObject(this.config, propertyPath, value);\n }\n\n get<T>(propertyPath: string, defaultValue?: T): T | undefined {\n return getFromObject<T, T>(this.config, propertyPath, defaultValue);\n }\n\n getOrThrow<T>(propertyPath: string): T {\n const value = this.get<T>(propertyPath);\n if (value === undefined) {\n throw new Error(`Could not find config in path '${ propertyPath }'`);\n }\n return value;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setLocalConfig(config: Record<string, any>): void {\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_CONFIG = new InjectionToken('rxap/config');\n","// TODO : move to separate package\n\nimport { log } from '@rxap/rxjs';\nimport { JoinPath } from '@rxap/utilities';\nimport {\n catchError,\n EMPTY,\n firstValueFrom,\n Observable,\n race,\n} from 'rxjs';\n\n/**\n * Similar to Promise.race() but only resolves with the first successful promise.\n * It will only reject if all promises reject.\n */\nexport async function raceSuccess<T>(promises: Promise<T>[]): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n let rejectionCount = 0;\n\n promises.forEach((promise) => {\n promise.then(\n // On success, resolve the entire raceSuccess promise\n (value) => resolve(value),\n // On rejection, count it and check if all promises rejected\n () => {\n rejectionCount++;\n if (rejectionCount === promises.length) {\n reject(new Error('All promises were rejected'));\n }\n // Otherwise continue waiting for other promises\n }\n );\n });\n });\n}\n\n\nexport async function dnsResolver(endpoint: string, name: string, type: string): Promise<string> {\n const response = await fetch(`${endpoint}?name=${name}&type=${type}`, {\n method: 'GET',\n headers: {\n 'Accept': 'application/dns-json',\n 'Cache-Control': 'no-cache, no-store, must-revalidate',\n 'Pragma': 'no-cache',\n 'Expires': '0',\n },\n });\n if (!response.ok) {\n throw new Error(`Failed to resolve DNS via ${endpoint} (${response.status}): ${response.statusText}`);\n }\n const result = await response.json();\n // Basic validation of the response structure\n if (!result || !Array.isArray(result.Answer) || result.Answer.length === 0 || !result.Answer[0].data) {\n throw new Error(`Invalid DNS response structure from ${endpoint} for ${name} ${type}`);\n }\n const data = result.Answer[0].data;\n // Remove surrounding quotes often found in TXT records\n return data.replace(/^\"(.*)\"$/, '$1');\n}\n\nexport async function dnsLookup(\n name: string,\n type: string,\n dnsServers = [\n 'https://dns.google/resolve',\n 'https://cloudflare-dns.com/dns-query'\n ]\n): Promise<string> {\n type = type.toUpperCase();\n console.log(`Performing DNS lookup for ${type} record of ${name} using servers: ${dnsServers.join(', ')}`);\n try {\n // Use Promise.race to get the first successful response\n return await raceSuccess(dnsServers.map(server => dnsResolver(server, name, type)));\n } catch (error: any) {\n console.error(`Failed to resolve DNS TXT record for ${name} using any server: ${error.message}`);\n throw new Error(`DNS lookup failed for ${name} (${type})`); // Re-throw a more specific error\n }\n}\n\nexport function fetchContentViaHttp(url: string): Observable<Blob | null> {\n return new Observable<Blob>((subscriber) => {\n let controller: AbortController | null = new AbortController(); // For cancellation\n\n fetch(url)\n .then(response => {\n if (!response.ok) {\n // Don't complete here, let catchError handle it\n throw new Error(`HTTP error ${response.status} for ${url}: ${response.statusText}`);\n }\n return response.blob();\n })\n .then(blob => {\n if (!subscriber.closed) {\n subscriber.next(blob);\n subscriber.complete();\n }\n })\n .catch(error => {\n if (error.name !== 'AbortError' && !subscriber.closed) {\n console.warn(`Fetch error for ${url}:`, error);\n }\n });\n\n // Cleanup function for when the observable is unsubscribed\n return () => {\n controller?.abort();\n controller = null; // Release reference\n };\n\n }).pipe(\n catchError(error => {\n // Log the error but return null to signal failure without stopping the race\n console.error(`Fetch failed for ${url}: ${error.message}`);\n return EMPTY; // Signal failure with null\n }),\n );\n}\n\nexport function fetchCidContentViaHttp(cid: string, path?: string): Observable<Blob | null> {\n return race(\n // Attempt 1: w3s.link\n fetchContentViaHttp(JoinPath(`https://${ cid }.ipfs.w3s.link`, path)).pipe(\n log(`w3s fetch attempt for ${cid}`),\n ),\n // Attempt 1: storacha.link\n fetchContentViaHttp(JoinPath(`https://${ cid }.ipfs.storacha.link`, path)).pipe(\n log(`storacha fetch attempt for ${cid}`),\n ),\n // Attempt 2: Local gateway\n fetchContentViaHttp(JoinPath(`${location.origin}/ipfs/${ cid }`, path)).pipe(\n log(`local fetch attempt for ${cid}`),\n )\n // Add more sources here if needed\n ).pipe(\n log(`Race winner for ${cid}`), // Log which source won (will show Blob or null)\n );\n}\n\nexport async function fetchCidContent(cid: string, path?: string): Promise<Blob | null> {\n console.log(`Fetching content for CID: ${cid}`);\n // Example: Fetch from an IPFS gateway or other source\n // const gatewayUrl = `https://ipfs.io/ipfs/${cid}`;\n try {\n return await firstValueFrom(\n race(\n fetchCidContentViaHttp(cid, path)\n ),\n { defaultValue: null } // Return null if the stream completes empty\n );\n } catch (error) {\n console.error(`Error fetching or parsing content for CID ${cid}:`, error);\n return null; // Return null on error\n }\n}\n\nexport async function fetchCidContentAsJson(cid: string, path?: string, _fetchCidContent = fetchCidContent): Promise<any | null> {\n console.log(`Fetching JSON content for CID: ${cid}`);\n const blob = await _fetchCidContent(cid, path);\n if (blob) {\n try {\n const text = await blob.text();\n return JSON.parse(text);\n } catch (error) {\n console.error(`Error parsing JSON content for CID ${cid}:`, error);\n return null; // Return null on error\n }\n }\n console.warn(`No blob available for CID ${cid}, cannot parse as JSON.`);\n return null; // Return null if blob is not available\n}\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport { Environment } from '@rxap/environment';\nimport {\n coerceArray,\n CoercePrefix,\n deepMerge,\n SetObjectValue,\n SetToObject,\n} from '@rxap/utilities';\nimport { ReplaySubject } from 'rxjs';\nimport { RXAP_CONFIG } from './tokens';\nimport { NoInferType } from './types';\nimport {\n dnsLookup,\n fetchCidContentAsJson,\n} from './utilities';\n\nexport type AnySchema = { validateAsync: (...args: any[]) => any };\n\nexport interface ConfigLoadOptions {\n fromUrlParam?: string | boolean;\n fromLocalStorage?: boolean;\n schema?: AnySchema;\n url?: string | string[] | ((environment: Environment) => string | string[]);\n /**\n * static config values\n */\n static?: Record<string, any>;\n /**\n * Load additional configuration based on a CID found in a DNS TXT record.\n * If true, uses `location.hostname`. If a string, uses that domain.\n */\n fromDns?: string | boolean;\n /**\n * Load additional configuration directly from the given Content Identifier (CID).\n * This takes precedence over `fromDns` if both are provided.\n */\n fromCid?: string;\n fetchCidContent?: (cid: string, path?: string) => Promise<Blob | null>;\n dnsServers?: string[];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ConfigService<Config extends Record<string, any> = Record<string, any>> {\n\n public static onError = new ReplaySubject<unknown>(1);\n public static onRequestError = new ReplaySubject<Response>(1);\n\n public static onErrorFnc: Array<(error: any) => void> = [];\n public static onRequestErrorFnc: Array<(response: Response) => void> = [];\n\n public static Config: any = null;\n\n /**\n * Static default values for the config object.\n * Will be overwritten by an dynamic config file specified in\n * the Urls array.\n */\n public static Defaults: any = {};\n\n /**\n * Any value definition in the Overwrites object will overwrite any\n * value form the Defaults values or dynamic config files\n */\n public static Overwrites: any = {};\n\n public static LocalStorageKey = 'rxap/config/local-config';\n\n /**\n * @deprecated instead use the url property of the ConfigLoadOptions\n */\n public static Urls = [];\n public readonly config!: Config;\n\n constructor(@Optional() @Inject(RXAP_CONFIG) config: any | null = null) {\n this.config = ConfigService.Config;\n if (config) {\n this.config = deepMerge(this.config ?? {}, config);\n }\n if (!this.config) {\n throw new Error('config not available');\n }\n }\n\n /**\n * Used to load the app config from a remote resource.\n *\n * Promise.all([ ConfigService.Load() ])\n * .then(() => platformBrowserDynamic().bootstrapModule(AppModule))\n * .catch(err => console.error(err))\n *\n */\n public static async Load(options?: ConfigLoadOptions, environment?: Environment): Promise<void> {\n options ??= {};\n\n let config: any = deepMerge(this.Defaults, {});\n\n if (environment?.config) {\n if (typeof environment.config === 'string') {\n options.url = environment.config;\n } else {\n options.static = environment.config.static;\n options.url = environment.config.url;\n options.fromUrlParam = environment.config.fromUrlParam;\n options.fromLocalStorage = environment.config.fromLocalStorage;\n options.schema = environment.config.schema;\n }\n }\n\n config = deepMerge(config, options?.static ?? {});\n\n const urls = (options?.url ? coerceArray(options.url) : ConfigService.Urls).map(url => {\n if (typeof url === 'function') {\n if (!environment) {\n throw new Error('environment is required when url is a function');\n }\n return coerceArray(url(environment));\n }\n return coerceArray(url);\n }).flat();\n\n for (const url of urls) {\n const loadedConfig = await this.loadConfig(url, true, options?.schema);\n const match = url.match(/config\\.([a-zA-Z0-9.\\-_]+)\\.json/);\n if (match) {\n SetToObject(config, match[1], loadedConfig);\n } else {\n config = deepMerge(config, loadedConfig);\n }\n }\n\n config = deepMerge(config, this.Overwrites);\n\n if (options?.fromLocalStorage !== false) {\n\n const localConfig = localStorage.getItem(ConfigService.LocalStorageKey);\n\n if (localConfig) {\n try {\n config = deepMerge(config, JSON.parse(localConfig));\n } catch (e: any) {\n console.error('local config could not be parsed');\n }\n }\n\n }\n\n if (options?.fromUrlParam) {\n const param = typeof options.fromUrlParam === 'string' ? options.fromUrlParam : 'config';\n config = deepMerge(config, this.LoadConfigDefaultFromUrlParam(param));\n }\n\n if (options?.fromDns) {\n await this.loadConfigFromDns(options as any);\n }\n\n if (options?.fromCid) {\n config = deepMerge(config, await this.loadConfigFromCid(options as any));\n }\n\n console.debug('app config', config);\n\n this.Config = config;\n }\n\n private static async loadConfigFromCid(options: ConfigLoadOptions & { fromCid: string | boolean }) {\n console.debug('Loading config from CID: ', options.fromCid);\n try {\n const cidContent = await fetchCidContentAsJson(options.fromCid, undefined, options.fetchCidContent);\n if (cidContent && typeof cidContent === 'object') {\n console.log(`Merging configuration from CID ${options.fromCid}.`, cidContent);\n // Merge CID content into the existing config object\n console.log('Configuration merged successfully.');\n return cidContent;\n } else if (cidContent) {\n console.warn(`Content fetched from CID ${options.fromCid} is not a mergeable object, skipping merge.`);\n } else {\n console.warn(`No content fetched or content was null for CID ${options.fromCid}.`);\n }\n } catch (error: any) {\n console.error(`Failed to fetch or process content for CID ${options.fromCid}: ${error.message}`);\n // Decide how to handle fetch/processing errors\n }\n }\n\n private static async loadConfigFromDns(options: ConfigLoadOptions & { fromDns: string | boolean }) {\n console.debug('Loading config from DNS');\n const dnsServers = options.dnsServers ?? [];\n if (dnsServers.length === 0) {\n dnsServers.push(\n 'https://dns.google/resolve',\n 'https://cloudflare-dns.com/dns-query'\n );\n }\n let domain = location.hostname;\n if (typeof options.fromDns === 'string') {\n domain = options.fromDns;\n }\n domain = CoercePrefix(domain, '_config.');\n try {\n console.log(`Attempting DNS lookup for domain: ${domain}`);\n const txtData = await dnsLookup(domain, 'TXT', dnsServers);\n console.log(`DNS TXT record data found: ${txtData}`);\n // Example CID extraction logic (adapt to your TXT record format)\n // This looks for IPFS CIDs (v0 'Qm...' or v1 'b...') potentially after 'ipfs://' or '/'\n const cidMatch = txtData.match(/(?:ipfs:\\/\\/|\\/|^)([a-zA-Z0-9]{40,})$/);\n if (cidMatch && cidMatch[1]) {\n options.fromCid = cidMatch[1];\n console.log(`Extracted CID from DNS: ${options.fromCid}`);\n } else {\n console.warn(`Could not extract a valid CID format from DNS TXT data: \"${txtData}\"`);\n }\n } catch (error: any) {\n console.error(`DNS lookup for ${domain} failed: ${error.message}`);\n // Decide if failure is critical or recoverable\n }\n }\n\n private static handleError(error: any) {\n this.onError.next(error);\n for (const fnc of this.onErrorFnc) {\n try {\n fnc(error);\n } catch (e: any) {\n console.error('Error in onErrorFnc', e);\n }\n }\n }\n\n private static handleRequestError(response: Response) {\n this.onRequestError.next(response);\n for (const fnc of this.onRequestErrorFnc) {\n try {\n fnc(response);\n } catch (e: any) {\n console.error('Error in onRequestErrorFnc', e);\n }\n }\n }\n\n private static async loadConfig<T = any>(url: string, required?: boolean, schema?: AnySchema): Promise<T | null> {\n\n let config: any;\n let response: any;\n\n try {\n response = await fetch(url);\n } catch (error: any) {\n const message = `Could not fetch config from '${ url }': ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n if (!response.ok) {\n let message = `Config request results in non ok response for '${ url }': (${ response.status }) ${ response.statusText }`;\n switch (response.status) {\n case 404:\n message = `Config not found at '${ url }'`;\n break;\n case 405:\n message = `Config service is not started yet. Wait 30s and try again.`;\n break;\n case 401:\n message = `Unauthorized to fetch config from '${ url }'`;\n break;\n }\n if (required) {\n this.handleRequestError(response);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n try {\n config = await response.json();\n } catch (error: any) {\n const message = `Could not parse config from '${ url }' to a json object: ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n if (schema) {\n try {\n config = await schema.validateAsync(config);\n } catch (error: any) {\n const message = `Config from '${ url }' is not valid: ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n }\n\n return config;\n\n }\n\n private static LoadConfigDefaultFromUrlParam(param = 'config') {\n\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n\n const configFromParams = {};\n\n for (const configParam of urlParams.getAll('config')) {\n\n try {\n const split = configParam.split(';');\n if (split.length === 2) {\n const keyPath = split[0];\n const value = split[1];\n SetObjectValue(configFromParams, keyPath, value);\n }\n } catch (e: any) {\n console.warn(`Parsing of url config param failed for '${ configParam }': ${ e.message }`);\n }\n\n }\n\n return configFromParams;\n\n }\n\n public static async SideLoad(\n url: string,\n propertyPath: string,\n required?: boolean,\n schema?: AnySchema,\n ): Promise<void> {\n\n if (!this.Config) {\n throw new Error('Config side load is only possible after the initial config load.');\n }\n\n const config = await this.loadConfig(url, required, schema);\n\n SetObjectValue(this.Config, propertyPath, config);\n\n console.debug(`Side loaded config for '${ propertyPath }' successful`, this.Config);\n\n }\n\n public static Get<T = any, K extends Record<string, any> = Record<string, any>>(\n path: string,\n defaultValue: T | undefined,\n config: Record<string, any>,\n ): T\n\n public static Get<T = any, K extends Record<string, any> = Record<string, any>>(\n path: string,\n defaultValue: NoInferType<T>,\n config: Record<string, any> = this.Config,\n ): T {\n if (!config) {\n throw new Error('config not loaded');\n }\n let configValue: any = config;\n if (typeof path !== 'string') {\n throw new Error('The config property path is not a string');\n }\n for (const fragment of path.split('.')) {\n if (configValue && typeof configValue === 'object' && fragment in configValue) {\n configValue = configValue[fragment];\n } else {\n if (defaultValue !== undefined) {\n return defaultValue;\n }\n console.debug(`Config with path '${ path }' not found`);\n return undefined as any;\n }\n }\n return configValue;\n }\n\n private static showError(message: string) {\n const hasUl = document.getElementById('rxap-config-error') !== null;\n const ul = document.getElementById('rxap-config-error') ?? document.createElement('ul');\n ul.id = 'rxap-config-error';\n ul.style.position = 'fixed';\n ul.style.bottom = '16px';\n ul.style.right = '16px';\n ul.style.backgroundColor = 'white';\n ul.style.padding = '32px';\n ul.style.zIndex = '99999999';\n ul.style.color = 'black';\n const messageLi = document.createElement('li');\n messageLi.innerText = message;\n ul.appendChild(messageLi);\n const refreshHintLi = document.createElement('li');\n refreshHintLi.innerText = 'Please refresh the page to try again.';\n ul.appendChild(refreshHintLi);\n const autoRefreshHintLi = document.createElement('li');\n autoRefreshHintLi.innerText = 'The page will refresh automatically in 30 seconds.';\n ul.appendChild(autoRefreshHintLi);\n if (!hasUl) {\n document.body.appendChild(ul);\n }\n setTimeout(() => location.reload(), 30000);\n }\n\n public setLocalConfig(config: Config): void {\n localStorage.setItem(ConfigService.LocalStorageKey, JSON.stringify(config));\n }\n\n public clearLocalConfig(): void {\n localStorage.removeItem(ConfigService.LocalStorageKey);\n }\n\n public get<T = any>(propertyPath: string): T | undefined;\n public get<T = any>(propertyPath: string, defaultValue: NoInferType<T>): T;\n public get<T = any>(propertyPath: string, defaultValue?: T): T | undefined {\n return ConfigService.Get(propertyPath, defaultValue, this.config);\n }\n\n public getOrThrow<T = any>(propertyPath: string): T;\n public getOrThrow<T = any>(propertyPath: string, defaultValue: NoInferType<T>): T;\n public getOrThrow<T = any>(propertyPath: string, defaultValue?: T): T {\n const value = ConfigService.Get(propertyPath, defaultValue, this.config);\n if (value === undefined) {\n throw new Error(`Could not find config in path '${ propertyPath }'`);\n }\n return value;\n }\n\n}\n","import { RXAP_CONFIG } from './tokens';\n\nexport function ProvideConfig(config: Record<string, unknown> = {}) {\n return {\n provide: RXAP_CONFIG,\n useValue: config,\n };\n}\n","// region \nexport * from './lib/config-loader.service';\nexport * from './lib/config-testing-service';\nexport * from './lib/config.service';\nexport * from './lib/config';\nexport * from './lib/provide-config';\nexport * from './lib/tokens';\nexport * from './lib/types';\nexport * from './lib/utilities';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAea,mBAAmB,CAAA;AAK9B,IAAA,WAAA,CAEkB,IAAgB,EAAA;QAAhB,IAAI,CAAA,IAAA,GAAJ,IAAI;AANN,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,GAAG,EAAe;AAEhC,QAAA,IAAA,CAAA,aAAa,GA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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,kBA+BQ,WAAW,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AA/BhC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAgCc;;0BAAY,MAAM;2BAAC,WAAW;;;AC9E7B,SAAA,aAAa,CAAC,MAAA,GAAkC,EAAE,EAAA;IAChE,OAAO;AACL,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,QAAQ,EAAE,MAAM;KACjB;AACH;;ACPA;AASA;;ACTA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-config.mjs","sources":["../../../../../packages/angular/config/src/lib/config-loader.service.ts","../../../../../packages/angular/config/src/lib/config-testing-service.ts","../../../../../packages/angular/config/src/lib/tokens.ts","../../../../../packages/angular/config/src/lib/utilities.ts","../../../../../packages/angular/config/src/lib/config.service.ts","../../../../../packages/angular/config/src/lib/provide-config.ts","../../../../../packages/angular/config/src/index.ts","../../../../../packages/angular/config/src/rxap-config.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport {\n firstValueFrom,\n Observable,\n} from 'rxjs';\nimport { HttpClient } from '@angular/common/http';\nimport {\n finalize,\n share,\n} from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class ConfigLoaderService {\n public readonly configs = new Map<string, any>();\n\n public readonly configLoading = new Map<string, Observable<any>>();\n\n constructor(\n @Inject(HttpClient)\n public readonly http: HttpClient,\n ) {\n }\n\n public async load$<T = any>(url: string): Promise<T> {\n if (this.configs.has(url)) {\n return this.configs.get(url);\n }\n\n if (this.configLoading.has(url)) {\n return this.configLoading.get(url)!.toPromise();\n }\n\n const loading$ = this.http.get<T>(url).pipe(\n finalize(() => this.configLoading.delete(url)),\n share(),\n );\n\n this.configLoading.set(url, loading$);\n\n return firstValueFrom(loading$);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n getFromObject,\n SetToObject,\n} from '@rxap/utilities';\nimport { ConfigService } from './config.service';\n\n@Injectable()\nexport class ConfigTestingService implements ConfigService {\n readonly config: Record<string, any> = {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n clearLocalConfig(): void {\n }\n\n set<T>(propertyPath: string, value: T): void {\n SetToObject(this.config, propertyPath, value);\n }\n\n get<T>(propertyPath: string, defaultValue?: T): T | undefined {\n return getFromObject<T, T>(this.config, propertyPath, defaultValue);\n }\n\n getOrThrow<T>(propertyPath: string): T {\n const value = this.get<T>(propertyPath);\n if (value === undefined) {\n throw new Error(`Could not find config in path '${ propertyPath }'`);\n }\n return value;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setLocalConfig(config: Record<string, any>): void {\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_CONFIG = new InjectionToken('rxap/config');\n","// TODO : move to separate package\n\nimport { log } from '@rxap/rxjs';\nimport { JoinPath } from '@rxap/utilities';\nimport {\n catchError,\n EMPTY,\n firstValueFrom,\n Observable,\n race,\n} from 'rxjs';\n\n/**\n * Similar to Promise.race() but only resolves with the first successful promise.\n * It will only reject if all promises reject.\n */\nexport async function raceSuccess<T>(promises: Promise<T>[]): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n let rejectionCount = 0;\n\n promises.forEach((promise) => {\n promise.then(\n // On success, resolve the entire raceSuccess promise\n (value) => resolve(value),\n // On rejection, count it and check if all promises rejected\n () => {\n rejectionCount++;\n if (rejectionCount === promises.length) {\n reject(new Error('All promises were rejected'));\n }\n // Otherwise continue waiting for other promises\n }\n );\n });\n });\n}\n\n\nexport async function dnsResolver(endpoint: string, name: string, type: string): Promise<string> {\n const response = await fetch(`${endpoint}?name=${name}&type=${type}`, {\n method: 'GET',\n headers: {\n 'Accept': 'application/dns-json',\n 'Cache-Control': 'no-cache, no-store, must-revalidate',\n 'Pragma': 'no-cache',\n 'Expires': '0',\n },\n });\n if (!response.ok) {\n throw new Error(`Failed to resolve DNS via ${endpoint} (${response.status}): ${response.statusText}`);\n }\n const result = await response.json();\n // Basic validation of the response structure\n if (!result || !Array.isArray(result.Answer) || result.Answer.length === 0 || !result.Answer[0].data) {\n throw new Error(`Invalid DNS response structure from ${endpoint} for ${name} ${type}`);\n }\n const data = result.Answer[0].data;\n // Remove surrounding quotes often found in TXT records\n return data.replace(/^\"(.*)\"$/, '$1');\n}\n\nexport async function dnsLookup(\n name: string,\n type: string,\n dnsServers = [\n 'https://dns.google/resolve',\n 'https://cloudflare-dns.com/dns-query'\n ]\n): Promise<string> {\n type = type.toUpperCase();\n console.log(`Performing DNS lookup for ${type} record of ${name} using servers: ${dnsServers.join(', ')}`);\n try {\n // Use Promise.race to get the first successful response\n return await raceSuccess(dnsServers.map(server => dnsResolver(server, name, type)));\n } catch (error: any) {\n console.error(`Failed to resolve DNS TXT record for ${name} using any server: ${error.message}`);\n throw new Error(`DNS lookup failed for ${name} (${type})`); // Re-throw a more specific error\n }\n}\n\nexport function fetchContentViaHttp(url: string): Observable<Blob | null> {\n return new Observable<Blob>((subscriber) => {\n let controller: AbortController | null = new AbortController(); // For cancellation\n\n fetch(url)\n .then(response => {\n if (!response.ok) {\n // Don't complete here, let catchError handle it\n throw new Error(`HTTP error ${response.status} for ${url}: ${response.statusText}`);\n }\n return response.blob();\n })\n .then(blob => {\n if (!subscriber.closed) {\n subscriber.next(blob);\n subscriber.complete();\n }\n })\n .catch(error => {\n if (error.name !== 'AbortError' && !subscriber.closed) {\n console.warn(`Fetch error for ${url}:`, error);\n }\n });\n\n // Cleanup function for when the observable is unsubscribed\n return () => {\n controller?.abort();\n controller = null; // Release reference\n };\n\n }).pipe(\n catchError(error => {\n // Log the error but return null to signal failure without stopping the race\n console.error(`Fetch failed for ${url}: ${error.message}`);\n return EMPTY; // Signal failure with null\n }),\n );\n}\n\nexport function fetchCidContentViaHttp(cid: string, path?: string): Observable<Blob | null> {\n return race(\n // Attempt 1: w3s.link\n fetchContentViaHttp(JoinPath(`https://${ cid }.ipfs.w3s.link`, path)).pipe(\n log(`w3s fetch attempt for ${cid}`),\n ),\n // Attempt 1: storacha.link\n fetchContentViaHttp(JoinPath(`https://${ cid }.ipfs.storacha.link`, path)).pipe(\n log(`storacha fetch attempt for ${cid}`),\n ),\n // Attempt 2: Local gateway\n fetchContentViaHttp(JoinPath(`${location.origin}/ipfs/${ cid }`, path)).pipe(\n log(`local fetch attempt for ${cid}`),\n )\n // Add more sources here if needed\n ).pipe(\n log(`Race winner for ${cid}`), // Log which source won (will show Blob or null)\n );\n}\n\nexport async function fetchCidContent(cid: string, path?: string): Promise<Blob | null> {\n console.log(`Fetching content for CID: ${cid}`);\n // Example: Fetch from an IPFS gateway or other source\n // const gatewayUrl = `https://ipfs.io/ipfs/${cid}`;\n try {\n return await firstValueFrom(\n race(\n fetchCidContentViaHttp(cid, path)\n ),\n { defaultValue: null } // Return null if the stream completes empty\n );\n } catch (error) {\n console.error(`Error fetching or parsing content for CID ${cid}:`, error);\n return null; // Return null on error\n }\n}\n\nexport async function fetchCidContentAsJson(cid: string, path?: string, _fetchCidContent = fetchCidContent): Promise<any | null> {\n console.log(`Fetching JSON content for CID: ${cid}`);\n const blob = await _fetchCidContent(cid, path);\n if (blob) {\n try {\n const text = await blob.text();\n return JSON.parse(text);\n } catch (error) {\n console.error(`Error parsing JSON content for CID ${cid}:`, error);\n return null; // Return null on error\n }\n }\n console.warn(`No blob available for CID ${cid}, cannot parse as JSON.`);\n return null; // Return null if blob is not available\n}\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport { Environment } from '@rxap/environment';\nimport {\n coerceArray,\n CoercePrefix,\n deepMerge,\n SetObjectValue,\n SetToObject,\n} from '@rxap/utilities';\nimport { ReplaySubject } from 'rxjs';\nimport { RXAP_CONFIG } from './tokens';\nimport { NoInferType } from './types';\nimport {\n dnsLookup,\n fetchCidContentAsJson,\n} from './utilities';\n\nexport type AnySchema = { validateAsync: (...args: any[]) => any };\n\nexport enum ConfigLoadingStrategy {\n DEFAULT = 'default',\n FIFO = 'fifo',\n}\n\nexport interface ConfigLoadOptions {\n fromUrlParam?: string | boolean;\n fromUrls?: boolean;\n fromLocalStorage?: boolean;\n schema?: AnySchema;\n url?: string | string[] | ((environment: Environment) => string | string[]);\n /**\n * static config values\n */\n static?: Record<string, any>;\n /**\n * Load additional configuration based on a CID found in a DNS TXT record.\n * If true, uses `location.hostname`. If a string, uses that domain.\n */\n fromDns?: string | boolean;\n /**\n * Load additional configuration directly from the given Content Identifier (CID).\n * This takes precedence over `fromDns` if both are provided.\n */\n fromCid?: string;\n fetchCidContent?: (cid: string, path?: string) => Promise<Blob | null>;\n dnsServers?: string[];\n strategy?: ConfigLoadingStrategy;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ConfigService<Config extends Record<string, any> = Record<string, any>> {\n\n public static onError = new ReplaySubject<unknown>(1);\n public static onRequestError = new ReplaySubject<Response>(1);\n\n public static onErrorFnc: Array<(error: any) => void> = [];\n public static onRequestErrorFnc: Array<(response: Response) => void> = [];\n\n public static Config: any = null;\n\n /**\n * Static default values for the config object.\n * Will be overwritten by an dynamic config file specified in\n * the Urls array.\n */\n public static Defaults: any = {};\n\n /**\n * Any value definition in the Overwrites object will overwrite any\n * value form the Defaults values or dynamic config files\n */\n public static Overwrites: any = {};\n\n public static LocalStorageKey = 'rxap/config/local-config';\n\n /**\n * @deprecated instead use the url property of the ConfigLoadOptions\n */\n public static Urls = [];\n public readonly config!: Config;\n\n constructor(@Optional() @Inject(RXAP_CONFIG) config: any | null = null) {\n this.config = ConfigService.Config;\n if (config) {\n this.config = deepMerge(this.config ?? {}, config);\n }\n if (!this.config) {\n throw new Error('config not available');\n }\n }\n\n /**\n * Used to load the app config from a remote resource.\n *\n * Promise.all([ ConfigService.Load() ])\n * .then(() => platformBrowserDynamic().bootstrapModule(AppModule))\n * .catch(err => console.error(err))\n *\n */\n public static async Load(options?: ConfigLoadOptions, environment?: Environment): Promise<void> {\n options ??= {};\n\n let config: any = deepMerge(this.Defaults, {});\n\n if (environment?.config) {\n if (typeof environment.config === 'string') {\n options.url = environment.config;\n } else {\n options.static = environment.config.static;\n options.url = environment.config.url;\n options.fromUrlParam = environment.config.fromUrlParam;\n options.fromLocalStorage = environment.config.fromLocalStorage;\n options.schema = environment.config.schema;\n options.strategy = environment.config.strategy as ConfigLoadingStrategy ?? options.strategy;\n }\n }\n\n config = deepMerge(config, options?.static ?? {});\n let done = false;\n\n if (!done && options?.fromUrls !== false) {\n try {\n config = deepMerge(config, await this.loadConfigFromUrls(options, environment));\n if (options.strategy === ConfigLoadingStrategy.FIFO) {\n done = true;\n }\n } catch (error: any) {\n if (options.strategy !== ConfigLoadingStrategy.FIFO) {\n console.error('Could not load config from urls', error);\n throw error;\n } else {\n console.warn('Could not load config from urls: ' + error.message + '. Will try next strategy.');\n }\n }\n }\n\n if (!done && options?.fromLocalStorage !== false) {\n try {\n config = deepMerge(config, this.loadConfigFromLocalStorage(options));\n if (options.strategy === ConfigLoadingStrategy.FIFO) {\n done = true;\n }\n } catch (error: any) {\n if (options.strategy !== ConfigLoadingStrategy.FIFO) {\n console.error('Could not load config from local storage', error);\n throw error;\n } else {\n console.warn('Could not load config from local storage: ' + error.message + '. Will try next strategy.');\n }\n }\n }\n\n if (!done && options?.fromUrlParam) {\n try {\n config = deepMerge(config, this.loadConfigFromUrlParam(options as any));\n if (options.strategy === ConfigLoadingStrategy.FIFO) {\n done = true;\n }\n } catch (error: any) {\n if (options.strategy !== ConfigLoadingStrategy.FIFO) {\n console.error('Could not load config from url param', error);\n throw error;\n } else {\n console.warn('Could not load config from url param: ' + error.message + '. Will try next strategy.');\n }\n }\n }\n\n if (!done && options?.fromDns) {\n await this.loadConfigFromDns(options as any);\n }\n\n if (!done && options?.fromCid) {\n try {\n config = deepMerge(config, await this.loadConfigFromCid(options as any));\n if (options.strategy === ConfigLoadingStrategy.FIFO) {\n done = true;\n }\n } catch (error: any) {\n if (options.strategy !== ConfigLoadingStrategy.FIFO) {\n console.error('Could not load config from cid', error);\n throw error;\n } else {\n console.warn('Could not load config from cid: ' + error.message + '. Will try next strategy.');\n }\n }\n }\n\n if (!done) {\n console.warn('No config loading strategy succeeded. Using default config.');\n }\n\n config = deepMerge(config, this.Overwrites);\n\n console.debug('app config', config);\n\n this.Config = config;\n }\n\n private static loadConfigFromUrlParam(options: ConfigLoadOptions & { fromUrlParam: string | true }) {\n const param = typeof options.fromUrlParam === 'string' ? options.fromUrlParam : 'config';\n return this.LoadConfigDefaultFromUrlParam(param);\n }\n\n private static loadConfigFromLocalStorage(options: ConfigLoadOptions) {\n const localConfig = localStorage.getItem(ConfigService.LocalStorageKey);\n if (localConfig) {\n return JSON.parse(localConfig);\n } else {\n return {};\n }\n }\n\n private static async loadConfigFromUrls(options: ConfigLoadOptions, environment?: Environment) {\n let config: any = {};\n const urls = (\n options?.url ? coerceArray(options.url) : ConfigService.Urls\n ).map(url => {\n if (typeof url === 'function') {\n if (!environment) {\n throw new Error('environment is required when url is a function');\n }\n return coerceArray(url(environment));\n }\n return coerceArray(url);\n }).flat();\n\n for (const url of urls) {\n const loadedConfig = await this.loadConfig(url, true, options?.schema);\n const match = url.match(/config\\.([a-zA-Z0-9.\\-_]+)\\.json/);\n if (match) {\n SetToObject(config, match[1], loadedConfig);\n } else {\n config = deepMerge(config, loadedConfig);\n }\n }\n return config;\n }\n\n private static async loadConfigFromCid(options: ConfigLoadOptions & { fromCid: string | boolean }) {\n console.debug('Loading config from CID: ', options.fromCid);\n try {\n const cidContent = await fetchCidContentAsJson(options.fromCid, undefined, options.fetchCidContent);\n if (cidContent && typeof cidContent === 'object') {\n console.log(`Merging configuration from CID ${options.fromCid}.`, cidContent);\n // Merge CID content into the existing config object\n console.log('Configuration merged successfully.');\n return cidContent;\n } else if (cidContent) {\n console.warn(`Content fetched from CID ${options.fromCid} is not a mergeable object, skipping merge.`);\n } else {\n console.warn(`No content fetched or content was null for CID ${options.fromCid}.`);\n }\n } catch (error: any) {\n console.error(`Failed to fetch or process content for CID ${options.fromCid}: ${error.message}`);\n // Decide how to handle fetch/processing errors\n }\n }\n\n private static async loadConfigFromDns(options: ConfigLoadOptions & { fromDns: string | boolean }) {\n console.debug('Loading config from DNS');\n const dnsServers = options.dnsServers ?? [];\n if (dnsServers.length === 0) {\n dnsServers.push(\n 'https://dns.google/resolve',\n 'https://cloudflare-dns.com/dns-query'\n );\n }\n let domain = location.hostname;\n if (typeof options.fromDns === 'string') {\n domain = options.fromDns;\n }\n domain = CoercePrefix(domain, '_config.');\n try {\n console.log(`Attempting DNS lookup for domain: ${domain}`);\n const txtData = await dnsLookup(domain, 'TXT', dnsServers);\n console.log(`DNS TXT record data found: ${txtData}`);\n // Example CID extraction logic (adapt to your TXT record format)\n // This looks for IPFS CIDs (v0 'Qm...' or v1 'b...') potentially after 'ipfs://' or '/'\n const cidMatch = txtData.match(/(?:ipfs:\\/\\/|\\/|^)([a-zA-Z0-9]{40,})$/);\n if (cidMatch && cidMatch[1]) {\n options.fromCid = cidMatch[1];\n console.log(`Extracted CID from DNS: ${options.fromCid}`);\n } else {\n console.warn(`Could not extract a valid CID format from DNS TXT data: \"${txtData}\"`);\n }\n } catch (error: any) {\n console.error(`DNS lookup for ${domain} failed: ${error.message}`);\n // Decide if failure is critical or recoverable\n }\n }\n\n private static handleError(error: any) {\n this.onError.next(error);\n for (const fnc of this.onErrorFnc) {\n try {\n fnc(error);\n } catch (e: any) {\n console.error('Error in onErrorFnc', e);\n }\n }\n }\n\n private static handleRequestError(response: Response) {\n this.onRequestError.next(response);\n for (const fnc of this.onRequestErrorFnc) {\n try {\n fnc(response);\n } catch (e: any) {\n console.error('Error in onRequestErrorFnc', e);\n }\n }\n }\n\n private static async loadConfig<T = any>(url: string, required?: boolean, schema?: AnySchema): Promise<T | null> {\n\n let config: any;\n let response: any;\n\n try {\n response = await fetch(url);\n } catch (error: any) {\n const message = `Could not fetch config from '${ url }': ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n if (!response.ok) {\n let message = `Config request results in non ok response for '${ url }': (${ response.status }) ${ response.statusText }`;\n switch (response.status) {\n case 404:\n message = `Config not found at '${ url }'`;\n break;\n case 405:\n message = `Config service is not started yet. Wait 30s and try again.`;\n break;\n case 401:\n message = `Unauthorized to fetch config from '${ url }'`;\n break;\n }\n if (required) {\n this.handleRequestError(response);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n try {\n config = await response.json();\n } catch (error: any) {\n const message = `Could not parse config from '${ url }' to a json object: ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n\n if (schema) {\n try {\n config = await schema.validateAsync(config);\n } catch (error: any) {\n const message = `Config from '${ url }' is not valid: ${ error.message }`;\n if (required) {\n this.handleError(error);\n this.showError(message);\n throw new Error(message);\n } else {\n console.warn(message);\n return null;\n }\n }\n }\n\n return config;\n\n }\n\n private static LoadConfigDefaultFromUrlParam(param = 'config') {\n\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n\n const configFromParams = {};\n\n for (const configParam of urlParams.getAll('config')) {\n\n try {\n const split = configParam.split(';');\n if (split.length === 2) {\n const keyPath = split[0];\n const value = split[1];\n SetObjectValue(configFromParams, keyPath, value);\n }\n } catch (e: any) {\n console.warn(`Parsing of url config param failed for '${ configParam }': ${ e.message }`);\n }\n\n }\n\n return configFromParams;\n\n }\n\n public static async SideLoad(\n url: string,\n propertyPath: string,\n required?: boolean,\n schema?: AnySchema,\n ): Promise<void> {\n\n if (!this.Config) {\n throw new Error('Config side load is only possible after the initial config load.');\n }\n\n const config = await this.loadConfig(url, required, schema);\n\n SetObjectValue(this.Config, propertyPath, config);\n\n console.debug(`Side loaded config for '${ propertyPath }' successful`, this.Config);\n\n }\n\n public static Get<T = any, K extends Record<string, any> = Record<string, any>>(\n path: string,\n defaultValue: T | undefined,\n config: Record<string, any>,\n ): T\n\n public static Get<T = any, K extends Record<string, any> = Record<string, any>>(\n path: string,\n defaultValue: NoInferType<T>,\n config: Record<string, any> = this.Config,\n ): T {\n if (!config) {\n throw new Error('config not loaded');\n }\n let configValue: any = config;\n if (typeof path !== 'string') {\n throw new Error('The config property path is not a string');\n }\n for (const fragment of path.split('.')) {\n if (configValue && typeof configValue === 'object' && fragment in configValue) {\n configValue = configValue[fragment];\n } else {\n if (defaultValue !== undefined) {\n return defaultValue;\n }\n console.debug(`Config with path '${ path }' not found`);\n return undefined as any;\n }\n }\n return configValue;\n }\n\n private static showError(message: string) {\n const hasUl = document.getElementById('rxap-config-error') !== null;\n const ul = document.getElementById('rxap-config-error') ?? document.createElement('ul');\n ul.id = 'rxap-config-error';\n ul.style.position = 'fixed';\n ul.style.bottom = '16px';\n ul.style.right = '16px';\n ul.style.backgroundColor = 'white';\n ul.style.padding = '32px';\n ul.style.zIndex = '99999999';\n ul.style.color = 'black';\n const messageLi = document.createElement('li');\n messageLi.innerText = message;\n ul.appendChild(messageLi);\n const refreshHintLi = document.createElement('li');\n refreshHintLi.innerText = 'Please refresh the page to try again.';\n ul.appendChild(refreshHintLi);\n const autoRefreshHintLi = document.createElement('li');\n autoRefreshHintLi.innerText = 'The page will refresh automatically in 30 seconds.';\n ul.appendChild(autoRefreshHintLi);\n if (!hasUl) {\n document.body.appendChild(ul);\n }\n setTimeout(() => location.reload(), 30000);\n }\n\n public setLocalConfig(config: Config): void {\n localStorage.setItem(ConfigService.LocalStorageKey, JSON.stringify(config));\n }\n\n public clearLocalConfig(): void {\n localStorage.removeItem(ConfigService.LocalStorageKey);\n }\n\n public get<T = any>(propertyPath: string): T | undefined;\n public get<T = any>(propertyPath: string, defaultValue: NoInferType<T>): T;\n public get<T = any>(propertyPath: string, defaultValue?: T): T | undefined {\n return ConfigService.Get(propertyPath, defaultValue, this.config);\n }\n\n public getOrThrow<T = any>(propertyPath: string): T;\n public getOrThrow<T = any>(propertyPath: string, defaultValue: NoInferType<T>): T;\n public getOrThrow<T = any>(propertyPath: string, defaultValue?: T): T {\n const value = ConfigService.Get(propertyPath, defaultValue, this.config);\n if (value === undefined) {\n throw new Error(`Could not find config in path '${ propertyPath }'`);\n }\n return value;\n }\n\n}\n","import { RXAP_CONFIG } from './tokens';\n\nexport function ProvideConfig(config: Record<string, unknown> = {}) {\n return {\n provide: RXAP_CONFIG,\n useValue: config,\n };\n}\n","// region \nexport * from './lib/config-loader.service';\nexport * from './lib/config-testing-service';\nexport * from './lib/config.service';\nexport * from './lib/config';\nexport * from './lib/provide-config';\nexport * from './lib/tokens';\nexport * from './lib/types';\nexport * from './lib/utilities';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAea,mBAAmB,CAAA;AAK9B,IAAA,WAAA,CAEkB,IAAgB,EAAA;QAAhB,IAAI,CAAA,IAAA,GAAJ,IAAI;AANN,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,GAAG,EAAe;AAEhC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAA2B;;IAQ3D,MAAM,KAAK,CAAU,GAAW,EAAA;QACrC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;;QAG9B,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EA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