@equinor/fusion-framework-module-app 7.3.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.
@@ -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
- readonly environment: TEnvironment;
31
+ get environment(): TEnvironment;
33
32
  /**
34
- * @deprecated Use `getEndpoint` instead.
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, string | undefined>;
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
  }
@@ -25,7 +25,7 @@ export type ApiAppConfig = z.infer<typeof ApiAppConfigSchema>;
25
25
  * - `version`: The version of the application build.
26
26
  * - `entryPoint`: The entry point of the application.
27
27
  * - `tags`: An optional array of tags associated with the build.
28
- * - `tag`: An optional tag indicating the build type, either 'latest' or 'preview'.
28
+ * - `tag`: An optional tag indicating the build type (can be any string, commonly 'latest' or 'preview').
29
29
  * - `assetPath`: An optional path to the build assets.
30
30
  * - `configUrl`: An optional URL to the build configuration.
31
31
  * - `timestamp`: An optional timestamp of the build.
@@ -39,10 +39,7 @@ export declare const ApiApplicationBuildSchema: z.ZodObject<{
39
39
  version: z.ZodString;
40
40
  entryPoint: z.ZodString;
41
41
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
42
- tag: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
43
- latest: "latest";
44
- preview: "preview";
45
- }>>>;
42
+ tag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
43
  assetPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
44
  configUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
45
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -129,10 +126,7 @@ export declare const ApiApplicationSchema: z.ZodObject<{
129
126
  version: z.ZodString;
130
127
  entryPoint: z.ZodString;
131
128
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
132
- tag: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
133
- latest: "latest";
134
- preview: "preview";
135
- }>>>;
129
+ tag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
130
  assetPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
131
  configUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
132
  timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -44,7 +44,7 @@ export type AppBuildManifest = {
44
44
  version: string;
45
45
  entryPoint: string;
46
46
  tags?: Nullable<string[]>;
47
- tag?: Nullable<'latest' | 'preview'>;
47
+ tag?: Nullable<string>;
48
48
  assetPath?: Nullable<string>;
49
49
  configUrl?: Nullable<string>;
50
50
  timestamp?: Nullable<string>;
@@ -1 +1 @@
1
- export declare const version = "7.3.0";
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.3.0",
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.7",
65
- "@equinor/fusion-query": "^6.0.3"
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": "^4.4.1",
70
- "@equinor/fusion-framework-module-http": "^7.0.6",
71
- "@equinor/fusion-framework-module": "^5.0.5",
72
- "@equinor/fusion-framework-module-service-discovery": "^9.0.5",
73
- "@equinor/fusion-framework-module-msal": "^6.0.5"
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
- public readonly environment: TEnvironment;
49
+ get environment(): TEnvironment {
50
+ return this.#environment;
51
+ }
50
52
 
51
53
  /**
52
- * @deprecated Use `getEndpoint` instead.
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
- public get endpoints(): Record<string, string | undefined> {
60
- console.warn('endpoints is deprecated, use getEndpoint instead');
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.environment = deepFreeze(config.environment ?? {}) as TEnvironment;
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/schemas.ts CHANGED
@@ -67,7 +67,7 @@ const ApiApplicationPersonSchema = z.object({
67
67
  * - `version`: The version of the application build.
68
68
  * - `entryPoint`: The entry point of the application.
69
69
  * - `tags`: An optional array of tags associated with the build.
70
- * - `tag`: An optional tag indicating the build type, either 'latest' or 'preview'.
70
+ * - `tag`: An optional tag indicating the build type (can be any string, commonly 'latest' or 'preview').
71
71
  * - `assetPath`: An optional path to the build assets.
72
72
  * - `configUrl`: An optional URL to the build configuration.
73
73
  * - `timestamp`: An optional timestamp of the build.
@@ -81,7 +81,7 @@ export const ApiApplicationBuildSchema = z.object({
81
81
  version: z.string(),
82
82
  entryPoint: z.string(),
83
83
  tags: z.array(z.string()).nullish(),
84
- tag: z.enum(['latest', 'preview']).nullish(),
84
+ tag: z.string().nullish(),
85
85
  assetPath: z.string().nullish(),
86
86
  configUrl: z.string().nullish(),
87
87
  timestamp: z.string().nullish(),
package/src/types.ts CHANGED
@@ -70,7 +70,7 @@ export type AppBuildManifest = {
70
70
  version: string;
71
71
  entryPoint: string;
72
72
  tags?: Nullable<string[]>;
73
- tag?: Nullable<'latest' | 'preview'>;
73
+ tag?: Nullable<string>;
74
74
  assetPath?: Nullable<string>;
75
75
  configUrl?: Nullable<string>;
76
76
  timestamp?: Nullable<string>;
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '7.3.0';
2
+ export const version = '7.4.1';