@equinor/fusion-framework-module-app 7.2.0-next.0 → 7.2.0
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 +35 -38
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/app/events.d.ts +2 -0
- package/dist/types/types.d.ts +0 -14
- package/dist/types/version.d.ts +1 -1
- package/package.json +8 -8
- package/src/app/events.ts +2 -0
- package/src/types.ts +2 -16
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,46 +1,10 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 7.2.0
|
|
3
|
+
## 7.2.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
8
|
-
|
|
9
|
-
**New Features:**
|
|
10
|
-
- **module-app**: Added `RouteSchemaEntry` type and `routes` field to `AppManifest` interface
|
|
11
|
-
- **cli**: Added `RouteSchemaEntry` and `AppManifestWithRoutes` type exports for app manifest generation
|
|
12
|
-
|
|
13
|
-
Route schemas allow applications to document their routes in app manifests, enabling automatic API documentation and schema generation. The `RouteSchemaEntry` type represents a route with its path, description, and optional parameter/search schemas.
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type {
|
|
17
|
-
RouteSchemaEntry,
|
|
18
|
-
AppManifest,
|
|
19
|
-
} from "@equinor/fusion-framework-module-app";
|
|
20
|
-
import type { AppManifestWithRoutes } from "@equinor/fusion-framework-cli/app";
|
|
21
|
-
|
|
22
|
-
const manifest: AppManifest = {
|
|
23
|
-
appKey: "my-app",
|
|
24
|
-
displayName: "My App",
|
|
25
|
-
description: "My app description",
|
|
26
|
-
type: "standalone",
|
|
27
|
-
routes: [
|
|
28
|
-
["/", "Home page"],
|
|
29
|
-
["/products", "Products listing page"],
|
|
30
|
-
["/products/:id", "Product detail page", { id: "Product ID" }],
|
|
31
|
-
],
|
|
32
|
-
};
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The CLI package also exports `AppManifestWithRoutes` which allows RouteNode objects (from the router package) to be used in manifest definitions, which are then serialized to RouteSchemaEntry arrays.
|
|
36
|
-
|
|
37
|
-
### Patch Changes
|
|
38
|
-
|
|
39
|
-
- [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b) Thanks [@odinr](https://github.com/odinr)! - relase next
|
|
40
|
-
|
|
41
|
-
- Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b), [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8), [`9f7597e`](https://github.com/equinor/fusion-framework/commit/9f7597ee237ef069dc24cbe39c73b5b26db157dd), [`75c068f`](https://github.com/equinor/fusion-framework/commit/75c068fea13c32435ac26bd9043cc156482bfaf1)]:
|
|
42
|
-
- @equinor/fusion-observable@9.0.0-next.0
|
|
43
|
-
- @equinor/fusion-query@7.0.0-next.0
|
|
7
|
+
- [#3842](https://github.com/equinor/fusion-framework/pull/3842) [`d38cd60`](https://github.com/equinor/fusion-framework/commit/d38cd60472380d60282c2a5672dc6e3bba3e7ca9) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - Add module fusion-framework-module-analytics
|
|
44
8
|
|
|
45
9
|
## 7.1.1
|
|
46
10
|
|
|
@@ -63,17 +27,20 @@
|
|
|
63
27
|
## New Features
|
|
64
28
|
|
|
65
29
|
### App Tag/Version Support
|
|
30
|
+
|
|
66
31
|
- **App Client**: Added `getAppBuild` method to fetch build manifests by app key and tag
|
|
67
32
|
- **App Module Provider**: Enhanced `getAppManifest` to accept optional tag parameter
|
|
68
33
|
- **App Loading**: Modified `setCurrentApp` to support `AppReference` objects with tag specification
|
|
69
34
|
- **URL Integration**: Added `getAppTagFromUrl` utility to extract app tags from URL parameters
|
|
70
35
|
|
|
71
36
|
### Enhanced Type System
|
|
37
|
+
|
|
72
38
|
- Added `AppReference` type for specifying app key and optional tag
|
|
73
39
|
- Extended `AppBundleState` to include optional `tag` property
|
|
74
40
|
- Updated `AppBuildManifest` type definition for build-specific metadata
|
|
75
41
|
|
|
76
42
|
### API Improvements
|
|
43
|
+
|
|
77
44
|
- **AppClient**: Updated interface to support tag-based manifest and build fetching
|
|
78
45
|
- **App Class**: Added `tag` getter property for accessing current app tag
|
|
79
46
|
- **Action System**: Enhanced `fetchManifest` action to handle tag parameters
|
|
@@ -81,6 +48,7 @@
|
|
|
81
48
|
## Changes by Package
|
|
82
49
|
|
|
83
50
|
### `@equinor/fusion-framework-module-app`
|
|
51
|
+
|
|
84
52
|
- **AppClient.ts**: Added `getAppBuild` method with tag support and updated `getAppManifest` signature
|
|
85
53
|
- **AppModuleProvider.ts**: Enhanced `setCurrentApp` method to handle `AppReference` objects with tags
|
|
86
54
|
- **App.ts**: Added `tag` getter and improved error handling in initialization
|
|
@@ -89,6 +57,7 @@
|
|
|
89
57
|
- **flows.ts**: Modified manifest fetching flow to handle tag-based requests
|
|
90
58
|
|
|
91
59
|
### `@equinor/fusion-framework-dev-portal`
|
|
60
|
+
|
|
92
61
|
- **AppLoader.tsx**: Added `getAppTagFromUrl` utility function and integrated tag-based app loading
|
|
93
62
|
|
|
94
63
|
## Usage Examples
|
|
@@ -121,14 +90,17 @@
|
|
|
121
90
|
## Migration Guide
|
|
122
91
|
|
|
123
92
|
### For App Consumers
|
|
93
|
+
|
|
124
94
|
- No breaking changes - existing code continues to work
|
|
125
95
|
- Optionally use new tag-based loading for version-specific deployments
|
|
126
96
|
|
|
127
97
|
### For App Developers
|
|
98
|
+
|
|
128
99
|
- Consider adding `&tag` URL parameter support for testing different versions
|
|
129
100
|
- Use new `AppReference` type when programmatically setting current apps with tags
|
|
130
101
|
|
|
131
102
|
## Technical Details
|
|
103
|
+
|
|
132
104
|
- **Backward Compatibility**: All changes are backward compatible
|
|
133
105
|
- **Caching**: Tag-based manifests and builds are cached separately
|
|
134
106
|
- **Error Handling**: Enhanced error handling for build and manifest loading failures
|
|
@@ -162,6 +134,7 @@
|
|
|
162
134
|
### Patch Changes
|
|
163
135
|
|
|
164
136
|
- [#3428](https://github.com/equinor/fusion-framework/pull/3428) [`1700ca8`](https://github.com/equinor/fusion-framework/commit/1700ca8851fa108e55e9729fd24f595272766e63) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update zod from 4.1.9 to 4.1.11
|
|
137
|
+
|
|
165
138
|
- **v4.1.10**: Fixed shape caching issue (#5263) improving validation performance for complex schemas
|
|
166
139
|
- **v4.1.11**: Maintenance release with general improvements
|
|
167
140
|
|
|
@@ -180,6 +153,7 @@
|
|
|
180
153
|
Updated source code to migrate from zod v3 to v4. Updated zod dependency from v3.25.76 to v4.1.8 and modified schema definitions in the app module to use explicit key and value types for records and updated error message format from `description` to `message` for zod v4 compatibility.
|
|
181
154
|
|
|
182
155
|
Key changes in source code:
|
|
156
|
+
|
|
183
157
|
- Fixed record schema definitions to use explicit key and value types (`z.record(z.string(), z.any())`)
|
|
184
158
|
- Updated error message options format (replaced `description` with `message`)
|
|
185
159
|
- Enhanced `ApiAppConfigSchema` with proper record type definitions for environment and endpoints
|
|
@@ -188,6 +162,7 @@
|
|
|
188
162
|
Breaking changes: Record schemas must specify both key and value types explicitly. Error message format has changed from zod v3 to v4 format. Function schema definitions now require explicit typing.
|
|
189
163
|
|
|
190
164
|
Links:
|
|
165
|
+
|
|
191
166
|
- [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
|
|
192
167
|
- [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
|
|
193
168
|
|
|
@@ -200,16 +175,19 @@
|
|
|
200
175
|
- [#3395](https://github.com/equinor/fusion-framework/pull/3395) [`29f6710`](https://github.com/equinor/fusion-framework/commit/29f6710238baf9b29f42394b30cb8b97f25462c3) Thanks [@odinr](https://github.com/odinr)! - Updated immer from 9.0.16 to 10.1.3 across all packages.
|
|
201
176
|
|
|
202
177
|
### Breaking Changes
|
|
178
|
+
|
|
203
179
|
- Immer 10.x introduces stricter TypeScript types for draft functions
|
|
204
180
|
- `ValidRecipeReturnType` type constraints have changed
|
|
205
181
|
- Promise return types in draft functions are no longer automatically handled
|
|
206
182
|
|
|
207
183
|
### Fixes Applied
|
|
184
|
+
|
|
208
185
|
- Updated BookmarkProvider to handle new immer type constraints
|
|
209
186
|
- Fixed ObservableInput type assignments in mergeScan operations
|
|
210
187
|
- Removed async/await from immer draft functions to comply with new type requirements
|
|
211
188
|
|
|
212
189
|
### Links
|
|
190
|
+
|
|
213
191
|
- [Immer 10.0.0 Release Notes](https://github.com/immerjs/immer/releases/tag/v10.0.0)
|
|
214
192
|
- [Immer Migration Guide](https://github.com/immerjs/immer/blob/main/MIGRATION.md)
|
|
215
193
|
|
|
@@ -220,15 +198,18 @@
|
|
|
220
198
|
- [#3347](https://github.com/equinor/fusion-framework/pull/3347) [`11143fa`](https://github.com/equinor/fusion-framework/commit/11143fa3002fb8a6c095052a04c7e596c56bafa8) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: bump uuid from 11.0.3 to 13.0.0
|
|
221
199
|
|
|
222
200
|
### Breaking Changes
|
|
201
|
+
|
|
223
202
|
- v13.0.0: Make browser exports the default
|
|
224
203
|
- v12.0.0: Update to TypeScript 5.2, remove CommonJS support, drop Node 16 support
|
|
225
204
|
|
|
226
205
|
### New Features
|
|
206
|
+
|
|
227
207
|
- Improved v4() performance
|
|
228
208
|
- Added Node 24 to CI matrix
|
|
229
209
|
- Restored node: prefix support
|
|
230
210
|
|
|
231
211
|
### Links
|
|
212
|
+
|
|
232
213
|
- [GitHub releases](https://github.com/uuidjs/uuid/releases/tag/v13.0.0)
|
|
233
214
|
- [npm changelog](https://www.npmjs.com/package/uuid?activeTab=versions)
|
|
234
215
|
|
|
@@ -241,6 +222,7 @@
|
|
|
241
222
|
### Patch Changes
|
|
242
223
|
|
|
243
224
|
- [#3315](https://github.com/equinor/fusion-framework/pull/3315) [`2ea9fb6`](https://github.com/equinor/fusion-framework/commit/2ea9fb63bdf967e0d010ddae2af9f6fb32077240) Thanks [@Noggling](https://github.com/Noggling)! - Improve error handling in AppClient
|
|
225
|
+
|
|
244
226
|
- Add support for HTTP 410 (Gone) status code handling across all error types
|
|
245
227
|
- Import and use `HttpJsonResponseError` for more specific error handling in `getAppManifest`
|
|
246
228
|
- Add 'deleted' error type to handle when application resources have been deleted
|
|
@@ -258,6 +240,7 @@
|
|
|
258
240
|
### Patch Changes
|
|
259
241
|
|
|
260
242
|
- [#3088](https://github.com/equinor/fusion-framework/pull/3088) [`7441b13`](https://github.com/equinor/fusion-framework/commit/7441b13aa50dd7362d1629086a27b6b4e571575d) Thanks [@eikeland](https://github.com/eikeland)! - chore: update package typesVersions
|
|
243
|
+
|
|
261
244
|
- Updated package.json typesVersions.
|
|
262
245
|
- Ensures backward compatibility with older node versions.
|
|
263
246
|
- Ensured consistency with workspace and repository configuration.
|
|
@@ -370,6 +353,7 @@
|
|
|
370
353
|
### Patch Changes
|
|
371
354
|
|
|
372
355
|
- [#2519](https://github.com/equinor/fusion-framework/pull/2519) [`83a7ee9`](https://github.com/equinor/fusion-framework/commit/83a7ee971785343bccedc2d72cc02486193615af) Thanks [@eikeland](https://github.com/eikeland)! - ### Changes:
|
|
356
|
+
|
|
373
357
|
- Updated `AppClient` class to improve the query for fetching app manifests:
|
|
374
358
|
- Adjusted the query path manifests method to include `$expand=category,admins,owners,keywords` when `filterByCurrentUser` is not specified.
|
|
375
359
|
- Minor formatting changes for better readability.
|
|
@@ -381,9 +365,11 @@
|
|
|
381
365
|
- [#2685](https://github.com/equinor/fusion-framework/pull/2685) [`add2e98`](https://github.com/equinor/fusion-framework/commit/add2e98d23e683a801729e9af543cfa15c574e27) Thanks [@eikeland](https://github.com/eikeland)! - Added versioning support to `AppModuleProvider`.
|
|
382
366
|
|
|
383
367
|
**Modified files:**
|
|
368
|
+
|
|
384
369
|
- `packages/modules/app/src/AppModuleProvider.ts`
|
|
385
370
|
|
|
386
371
|
**Changes:**
|
|
372
|
+
|
|
387
373
|
- Imported `SemanticVersion` from `@equinor/fusion-framework-module`.
|
|
388
374
|
- Imported `version` from `./version`.
|
|
389
375
|
- Added a `version` getter to `AppModuleProvider` that returns a `SemanticVersion` instance.
|
|
@@ -398,9 +384,11 @@
|
|
|
398
384
|
- [#2654](https://github.com/equinor/fusion-framework/pull/2654) [`59ab642`](https://github.com/equinor/fusion-framework/commit/59ab6424f3ce80649f42ddb6804b46f6789607ba) Thanks [@eikeland](https://github.com/eikeland)! - Reverting update to the `manifests` call `selector` function in `AppClient` to use `jsonSelector` and parse the response with `ApplicationSchema`.
|
|
399
385
|
|
|
400
386
|
**Modified files:**
|
|
387
|
+
|
|
401
388
|
- `packages/modules/app/src/AppClient.ts`
|
|
402
389
|
|
|
403
390
|
**Changes:**
|
|
391
|
+
|
|
404
392
|
- Replaced `res.json()` with `jsonSelector(res)`
|
|
405
393
|
- Parsed the response using `ApplicationSchema.array().parse(response.value)`
|
|
406
394
|
|
|
@@ -435,6 +423,7 @@
|
|
|
435
423
|
```
|
|
436
424
|
|
|
437
425
|
- [#2577](https://github.com/equinor/fusion-framework/pull/2577) [`c3ba9f1`](https://github.com/equinor/fusion-framework/commit/c3ba9f109d9f96d6dc6ee2f0ddac00c8b3090982) Thanks [@eikeland](https://github.com/eikeland)! - #### Changes:
|
|
426
|
+
|
|
438
427
|
1. **AppClient.ts**
|
|
439
428
|
- Added `updateAppSettings` method to set app settings by appKey.
|
|
440
429
|
2. **AppModuleProvider.ts**
|
|
@@ -495,10 +484,12 @@
|
|
|
495
484
|
> This will introduce breaking changes to the configuration of `AppConfigurator.client`.
|
|
496
485
|
|
|
497
486
|
**Added**
|
|
487
|
+
|
|
498
488
|
- Introduced `AppClient` class to handle application manifest and configuration queries.
|
|
499
489
|
- Added `zod` to validate the application manifest.
|
|
500
490
|
|
|
501
491
|
**Changed**
|
|
492
|
+
|
|
502
493
|
- Updated `AppModuleProvider` to use `AppClient` for fetching application manifests and configurations.
|
|
503
494
|
- Modified `AppConfigurator` to utilize `AppClient` for client configuration.
|
|
504
495
|
- Updated `useApps` hook with new input parameter for `filterByCurrentUser` in `fusion-framework-react`.
|
|
@@ -577,6 +568,7 @@
|
|
|
577
568
|
- [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
|
|
578
569
|
|
|
579
570
|
Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
|
|
571
|
+
|
|
580
572
|
1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
|
|
581
573
|
2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
|
|
582
574
|
3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
|
|
@@ -625,6 +617,7 @@
|
|
|
625
617
|
### Patch Changes
|
|
626
618
|
|
|
627
619
|
- [#2235](https://github.com/equinor/fusion-framework/pull/2235) [`97e41a5`](https://github.com/equinor/fusion-framework/commit/97e41a55d05644b6684c6cb165b65b115bd416eb) Thanks [@odinr](https://github.com/odinr)! - - **Refactored**: The `actionBaseType` function has been renamed to `getBaseType` and its implementation has been updated.
|
|
620
|
+
|
|
628
621
|
- **Added**: New utility types and functions for handling action types and payloads in a more type-safe manner.
|
|
629
622
|
|
|
630
623
|
- [#2248](https://github.com/equinor/fusion-framework/pull/2248) [`da9dd83`](https://github.com/equinor/fusion-framework/commit/da9dd83c9352def5365b6c962dc8443589ac9526) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - #2235 renamed a method and changed type. This PR forgot to change to the correct param when using this method. Fixes typo - update to use actions `type` in the reducer.
|
|
@@ -700,6 +693,7 @@
|
|
|
700
693
|
### Patch Changes
|
|
701
694
|
|
|
702
695
|
- [#1763](https://github.com/equinor/fusion-framework/pull/1763) [`1ca8264`](https://github.com/equinor/fusion-framework/commit/1ca826489a0d1dd755324344a12bbf6659a3be12) Thanks [@odinr](https://github.com/odinr)! - improve type of current application
|
|
696
|
+
|
|
703
697
|
- result will be `undefined` if current application has never been set
|
|
704
698
|
- result will be `IApplication` if current application is set
|
|
705
699
|
- result will be `null` if current application is cleared
|
|
@@ -816,6 +810,7 @@
|
|
|
816
810
|
### Minor Changes
|
|
817
811
|
|
|
818
812
|
- [#927](https://github.com/equinor/fusion-framework/pull/927) [`8bc4c5d6`](https://github.com/equinor/fusion-framework/commit/8bc4c5d6ed900e424efcab5572047c106d7ec04a) Thanks [@odinr](https://github.com/odinr)! - Create and expose interface for App
|
|
813
|
+
|
|
819
814
|
- deprecate [AppModuleProvider.createApp](https://github.com/equinor/fusion-framework/blob/cf08d5ae3cef473e5025fd973a2a7a45a3b22dee/packages/modules/app/src/AppModuleProvider.ts#L171)
|
|
820
815
|
|
|
821
816
|
this should not create any breaking changes since apps was only created from provider.
|
|
@@ -826,6 +821,7 @@
|
|
|
826
821
|
```
|
|
827
822
|
|
|
828
823
|
- [#927](https://github.com/equinor/fusion-framework/pull/927) [`8bc4c5d6`](https://github.com/equinor/fusion-framework/commit/8bc4c5d6ed900e424efcab5572047c106d7ec04a) Thanks [@odinr](https://github.com/odinr)! - Allow updating manifest of application
|
|
824
|
+
|
|
829
825
|
- add meta data for `setManifest` action to flag if `merge` or `replace`
|
|
830
826
|
- add method on `App` to update manifest, _default flag `merge`_
|
|
831
827
|
- check in state reducer if `setManifest` action is `update` or `merge`
|
|
@@ -836,6 +832,7 @@
|
|
|
836
832
|
### Patch Changes
|
|
837
833
|
|
|
838
834
|
- [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
|
|
835
|
+
|
|
839
836
|
- align all versions of typescript
|
|
840
837
|
- update types to build
|
|
841
838
|
- a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|