@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.
- package/CHANGELOG.md +38 -0
- package/dist/esm/AppConfig.js +8 -24
- package/dist/esm/AppConfig.js.map +1 -1
- package/dist/esm/schemas.js +2 -2
- package/dist/esm/schemas.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/schemas.d.ts +3 -9
- package/dist/types/types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +8 -8
- package/src/AppConfig.ts +9 -26
- package/src/schemas.ts +2 -2
- package/src/types.ts +1 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 7.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
|
|
10
|
+
- @equinor/fusion-observable@8.5.8
|
|
11
|
+
- @equinor/fusion-query@6.0.4
|
|
12
|
+
|
|
13
|
+
## 7.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#3978](https://github.com/equinor/fusion-framework/pull/3978) [`54702d7`](https://github.com/equinor/fusion-framework/commit/54702d78e8d868d490817c015471e11ee648a98a) Thanks [@Noggling](https://github.com/Noggling)! - Allow custom string values for app build tags instead of restricting to 'latest' and 'preview'.
|
|
18
|
+
|
|
19
|
+
The app module schema now accepts any string value for the `tag` field in `AppBuildManifest` and `ApiApplicationBuildSchema`. This enables using custom deployment tags like `dev`, `staging`, `v1.0`, or any other string value while maintaining backward compatibility with existing `latest` and `preview` tags.
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// Before: only 'latest' | 'preview' allowed
|
|
23
|
+
const build: AppBuildManifest = {
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
entryPoint: "index.js",
|
|
26
|
+
tag: "latest", // or 'preview' only
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// After: any string value allowed
|
|
30
|
+
const build: AppBuildManifest = {
|
|
31
|
+
version: "1.0.0",
|
|
32
|
+
entryPoint: "index.js",
|
|
33
|
+
tag: "dev", // or 'staging', 'v1.0', etc.
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This aligns the schema validation with the CLI's existing flexibility for custom tags.
|
|
38
|
+
|
|
39
|
+
Fixes: https://github.com/equinor/fusion-core-tasks/issues/252
|
|
40
|
+
|
|
3
41
|
## 7.3.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/dist/esm/AppConfig.js
CHANGED
|
@@ -31,30 +31,22 @@ const deepFreeze = (obj) => {
|
|
|
31
31
|
*/
|
|
32
32
|
export class AppConfig {
|
|
33
33
|
#endpoints;
|
|
34
|
+
#environment;
|
|
34
35
|
/**
|
|
35
36
|
* The environment configuration for the application.
|
|
36
|
-
* This property is read-only and is of type `TEnvironment`.
|
|
37
37
|
*/
|
|
38
|
-
environment
|
|
38
|
+
get environment() {
|
|
39
|
+
return this.#environment;
|
|
40
|
+
}
|
|
39
41
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* Retrieves the endpoints as a record of strings. This method returns a proxy
|
|
43
|
-
* that maps the endpoint names to their respective URLs.
|
|
44
|
-
*
|
|
45
|
-
* @returns {Record<string, string | undefined>} A record where the keys are endpoint names and the values are their URLs.
|
|
42
|
+
* The configuration endpoints for the application,.
|
|
46
43
|
*/
|
|
47
44
|
get endpoints() {
|
|
48
|
-
|
|
49
|
-
return new Proxy(this.#endpoints, {
|
|
50
|
-
get(target, prop) {
|
|
51
|
-
return target[prop]?.url;
|
|
52
|
-
},
|
|
53
|
-
});
|
|
45
|
+
return this.#endpoints;
|
|
54
46
|
}
|
|
55
47
|
constructor(config) {
|
|
56
|
-
this
|
|
57
|
-
this.#endpoints = config.endpoints ?? {};
|
|
48
|
+
this.#environment = deepFreeze(config.environment ?? {});
|
|
49
|
+
this.#endpoints = deepFreeze(config.endpoints ?? {});
|
|
58
50
|
}
|
|
59
51
|
/**
|
|
60
52
|
* Retrieves the configuration endpoint associated with the given key.
|
|
@@ -65,13 +57,5 @@ export class AppConfig {
|
|
|
65
57
|
getEndpoint(key) {
|
|
66
58
|
return this.#endpoints[key];
|
|
67
59
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Retrieve all configuration endpoints associated with the app.
|
|
70
|
-
*
|
|
71
|
-
* @returns The configuration endpoints found.
|
|
72
|
-
*/
|
|
73
|
-
getEndpoints() {
|
|
74
|
-
return this.#endpoints;
|
|
75
|
-
}
|
|
76
60
|
}
|
|
77
61
|
//# sourceMappingURL=AppConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../../src/AppConfig.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,MAAM,UAAU,GAAG,CAAoC,GAAM,EAAK,EAAE;IAClE,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACxC,IACE,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ;YACjC,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI;YACtB,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAC/B,CAAC;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;;;;;OAKG;IACH,WAAW,CAAC,GAAW;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/esm/schemas.js
CHANGED
|
@@ -59,7 +59,7 @@ const ApiApplicationPersonSchema = z.object({
|
|
|
59
59
|
* - `version`: The version of the application build.
|
|
60
60
|
* - `entryPoint`: The entry point of the application.
|
|
61
61
|
* - `tags`: An optional array of tags associated with the build.
|
|
62
|
-
* - `tag`: An optional tag indicating the build type,
|
|
62
|
+
* - `tag`: An optional tag indicating the build type (can be any string, commonly 'latest' or 'preview').
|
|
63
63
|
* - `assetPath`: An optional path to the build assets.
|
|
64
64
|
* - `configUrl`: An optional URL to the build configuration.
|
|
65
65
|
* - `timestamp`: An optional timestamp of the build.
|
|
@@ -73,7 +73,7 @@ export const ApiApplicationBuildSchema = z.object({
|
|
|
73
73
|
version: z.string(),
|
|
74
74
|
entryPoint: z.string(),
|
|
75
75
|
tags: z.array(z.string()).nullish(),
|
|
76
|
-
tag: z.
|
|
76
|
+
tag: z.string().nullish(),
|
|
77
77
|
assetPath: z.string().nullish(),
|
|
78
78
|
configUrl: z.string().nullish(),
|
|
79
79
|
timestamp: z.string().nullish(),
|
package/dist/esm/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACjE,SAAS,EAAE,CAAC;SACT,MAAM,CACL,CAAC,CAAC,MAAM,EAAE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