@equinor/fusion-framework-module-context 4.0.21 → 4.1.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 +115 -82
- package/dist/esm/ContextConfigBuilder.js.map +1 -1
- package/dist/esm/ContextProvider.js +6 -1
- package/dist/esm/ContextProvider.js.map +1 -1
- package/dist/esm/client/ContextClient.js.map +1 -1
- package/dist/esm/configurator.js.map +1 -1
- package/dist/esm/errors.js +29 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/module.js.map +1 -1
- package/dist/esm/utils/resolve-context-from-path.js.map +1 -1
- package/dist/esm/utils/resolve-initial-context.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/errors.d.ts +9 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +9 -2
- package/src/ContextProvider.ts +9 -1
- package/src/errors.ts +23 -0
- package/src/version.ts +1 -1
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.0
|
|
1
|
+
export declare const version = "4.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-module-context",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"import": "./dist/esm/index.js",
|
|
9
9
|
"types": "./dist/types/index.d.ts"
|
|
10
10
|
},
|
|
11
|
+
"./errors.js": {
|
|
12
|
+
"import": "./dist/esm/errors.js",
|
|
13
|
+
"types": "./dist/types/errors.d.ts"
|
|
14
|
+
},
|
|
11
15
|
"./package.json": "./package.json",
|
|
12
16
|
"./utils": {
|
|
13
17
|
"import": "./dist/esm/utils/index.js",
|
|
@@ -22,6 +26,9 @@
|
|
|
22
26
|
],
|
|
23
27
|
"utils": [
|
|
24
28
|
"dist/types/utils/index.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"./errors.js": [
|
|
31
|
+
".dist/types/errors.d.ts"
|
|
25
32
|
]
|
|
26
33
|
}
|
|
27
34
|
},
|
|
@@ -44,8 +51,8 @@
|
|
|
44
51
|
"rxjs": "^7.8.1",
|
|
45
52
|
"typescript": "^5.1.3",
|
|
46
53
|
"@equinor/fusion-framework-module": "^4.2.7",
|
|
47
|
-
"@equinor/fusion-framework-module-event": "^4.0.8",
|
|
48
54
|
"@equinor/fusion-framework-module-navigation": "^3.1.4",
|
|
55
|
+
"@equinor/fusion-framework-module-event": "^4.0.8",
|
|
49
56
|
"@equinor/fusion-framework-module-services": "^3.2.4"
|
|
50
57
|
},
|
|
51
58
|
"peerDependencies": {
|
package/src/ContextProvider.ts
CHANGED
|
@@ -406,7 +406,15 @@ export class ContextProvider implements IContextProvider {
|
|
|
406
406
|
/* @ts-ignore */
|
|
407
407
|
this.#contextParameterFn({ search, type: this.#contextType }),
|
|
408
408
|
)
|
|
409
|
-
.pipe(
|
|
409
|
+
.pipe(
|
|
410
|
+
catchError((err) => {
|
|
411
|
+
if (err.name === 'QueryClientError') {
|
|
412
|
+
throw err.cause;
|
|
413
|
+
}
|
|
414
|
+
throw err;
|
|
415
|
+
}),
|
|
416
|
+
map((x) => x.value),
|
|
417
|
+
);
|
|
410
418
|
|
|
411
419
|
return this.#contextFilter ? query$.pipe(map(this.#contextFilter)) : query$;
|
|
412
420
|
}
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class FusionContextSearchError extends Error {
|
|
2
|
+
#details;
|
|
3
|
+
|
|
4
|
+
get title(): string {
|
|
5
|
+
return this.#details.title;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get description(): string | undefined {
|
|
9
|
+
return this.#details.description;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
details: {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
},
|
|
17
|
+
options?: ErrorOptions,
|
|
18
|
+
) {
|
|
19
|
+
super(details.description ?? details.title, options);
|
|
20
|
+
this.#details = details;
|
|
21
|
+
this.name = 'FusionContextSearchError';
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '4.0
|
|
2
|
+
export const version = '4.1.0';
|