@equinor/fusion-framework-module-app 7.4.0 → 7.4.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.
- package/CHANGELOG.md +10 -0
- package/dist/esm/AppConfig.js +8 -24
- package/dist/esm/AppConfig.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/AppConfig.d.ts +3 -15
- package/dist/types/version.d.ts +1 -1
- package/package.json +8 -8
- package/src/AppConfig.ts +9 -26
- package/src/version.ts +1 -1
|
@@ -27,18 +27,12 @@ export declare class AppConfig<TEnvironment extends ConfigEnvironment = ConfigEn
|
|
|
27
27
|
#private;
|
|
28
28
|
/**
|
|
29
29
|
* The environment configuration for the application.
|
|
30
|
-
* This property is read-only and is of type `TEnvironment`.
|
|
31
30
|
*/
|
|
32
|
-
|
|
31
|
+
get environment(): TEnvironment;
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* Retrieves the endpoints as a record of strings. This method returns a proxy
|
|
37
|
-
* that maps the endpoint names to their respective URLs.
|
|
38
|
-
*
|
|
39
|
-
* @returns {Record<string, string | undefined>} A record where the keys are endpoint names and the values are their URLs.
|
|
33
|
+
* The configuration endpoints for the application,.
|
|
40
34
|
*/
|
|
41
|
-
get endpoints(): Record<string,
|
|
35
|
+
get endpoints(): Record<string, ConfigEndPoint>;
|
|
42
36
|
constructor(config: {
|
|
43
37
|
environment?: TEnvironment | null;
|
|
44
38
|
endpoints?: Record<string, ConfigEndPoint>;
|
|
@@ -50,10 +44,4 @@ export declare class AppConfig<TEnvironment extends ConfigEnvironment = ConfigEn
|
|
|
50
44
|
* @returns The configuration endpoint if found, otherwise `undefined`.
|
|
51
45
|
*/
|
|
52
46
|
getEndpoint(key: string): ConfigEndPoint | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Retrieve all configuration endpoints associated with the app.
|
|
55
|
-
*
|
|
56
|
-
* @returns The configuration endpoints found.
|
|
57
|
-
*/
|
|
58
|
-
getEndpoints(): Record<string, ConfigEndPoint>;
|
|
59
47
|
}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "7.4.
|
|
1
|
+
export declare const version = "7.4.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-module-app",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -61,16 +61,16 @@
|
|
|
61
61
|
"rxjs": "^7.8.1",
|
|
62
62
|
"uuid": "^13.0.0",
|
|
63
63
|
"zod": "^4.1.8",
|
|
64
|
-
"@equinor/fusion-observable": "^8.5.
|
|
65
|
-
"@equinor/fusion-query": "^6.0.
|
|
64
|
+
"@equinor/fusion-observable": "^8.5.8",
|
|
65
|
+
"@equinor/fusion-query": "^6.0.4"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"typescript": "^5.8.2",
|
|
69
|
-
"@equinor/fusion-framework-module-event": "^
|
|
70
|
-
"@equinor/fusion-framework-module-
|
|
71
|
-
"@equinor/fusion-framework-module
|
|
72
|
-
"@equinor/fusion-framework-module-
|
|
73
|
-
"@equinor/fusion-framework-module": "^
|
|
69
|
+
"@equinor/fusion-framework-module-event": "^5.0.1",
|
|
70
|
+
"@equinor/fusion-framework-module-msal": "^7.3.1",
|
|
71
|
+
"@equinor/fusion-framework-module": "^5.0.6",
|
|
72
|
+
"@equinor/fusion-framework-module-service-discovery": "^9.1.1",
|
|
73
|
+
"@equinor/fusion-framework-module-http": "^7.0.8"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"build": "tsc -b"
|
package/src/AppConfig.ts
CHANGED
|
@@ -41,36 +41,28 @@ export type ConfigEndPoint = {
|
|
|
41
41
|
*/
|
|
42
42
|
export class AppConfig<TEnvironment extends ConfigEnvironment = ConfigEnvironment> {
|
|
43
43
|
#endpoints: Record<string, ConfigEndPoint>;
|
|
44
|
+
#environment: TEnvironment;
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* The environment configuration for the application.
|
|
47
|
-
* This property is read-only and is of type `TEnvironment`.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
get environment(): TEnvironment {
|
|
50
|
+
return this.#environment;
|
|
51
|
+
}
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* Retrieves the endpoints as a record of strings. This method returns a proxy
|
|
55
|
-
* that maps the endpoint names to their respective URLs.
|
|
56
|
-
*
|
|
57
|
-
* @returns {Record<string, string | undefined>} A record where the keys are endpoint names and the values are their URLs.
|
|
54
|
+
* The configuration endpoints for the application,.
|
|
58
55
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return new Proxy(this.#endpoints, {
|
|
62
|
-
get(target, prop): string | undefined {
|
|
63
|
-
return target[prop as string]?.url;
|
|
64
|
-
},
|
|
65
|
-
}) as unknown as Record<string, string>;
|
|
56
|
+
get endpoints(): Record<string, ConfigEndPoint> {
|
|
57
|
+
return this.#endpoints;
|
|
66
58
|
}
|
|
67
59
|
|
|
68
60
|
constructor(config: {
|
|
69
61
|
environment?: TEnvironment | null;
|
|
70
62
|
endpoints?: Record<string, ConfigEndPoint>;
|
|
71
63
|
}) {
|
|
72
|
-
this
|
|
73
|
-
this.#endpoints = config.endpoints ?? {};
|
|
64
|
+
this.#environment = deepFreeze(config.environment ?? {}) as TEnvironment;
|
|
65
|
+
this.#endpoints = deepFreeze(config.endpoints ?? {});
|
|
74
66
|
}
|
|
75
67
|
|
|
76
68
|
/**
|
|
@@ -82,13 +74,4 @@ export class AppConfig<TEnvironment extends ConfigEnvironment = ConfigEnvironmen
|
|
|
82
74
|
getEndpoint(key: string): ConfigEndPoint | undefined {
|
|
83
75
|
return this.#endpoints[key];
|
|
84
76
|
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Retrieve all configuration endpoints associated with the app.
|
|
88
|
-
*
|
|
89
|
-
* @returns The configuration endpoints found.
|
|
90
|
-
*/
|
|
91
|
-
getEndpoints(): Record<string, ConfigEndPoint> {
|
|
92
|
-
return this.#endpoints;
|
|
93
|
-
}
|
|
94
77
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '7.4.
|
|
2
|
+
export const version = '7.4.1';
|