@equinor/fusion-framework-module-http 8.1.0-next.0 → 8.1.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.
Files changed (53) hide show
  1. package/dist/esm/version.js +1 -1
  2. package/dist/esm/version.js.map +1 -1
  3. package/dist/tsconfig.tsbuildinfo +1 -1
  4. package/dist/types/version.d.ts +1 -1
  5. package/package.json +6 -3
  6. package/CHANGELOG.md +0 -1321
  7. package/docs/client-configuration.md +0 -175
  8. package/docs/observable-patterns.md +0 -103
  9. package/docs/selectors-and-handlers.md +0 -112
  10. package/docs/server-sent-events.md +0 -125
  11. package/docs/testing.md +0 -78
  12. package/src/configurator.ts +0 -249
  13. package/src/errors/ClientNotFoundException.ts +0 -9
  14. package/src/errors/HttpJsonResponseError.ts +0 -32
  15. package/src/errors/HttpResponseError.ts +0 -21
  16. package/src/errors/ServerSentEventResponseError.ts +0 -30
  17. package/src/errors/index.ts +0 -4
  18. package/src/index.ts +0 -15
  19. package/src/lib/client/client-msal.ts +0 -80
  20. package/src/lib/client/client.ts +0 -496
  21. package/src/lib/client/index.ts +0 -4
  22. package/src/lib/client/types.ts +0 -244
  23. package/src/lib/index.ts +0 -3
  24. package/src/lib/operators/HttpMiddlewareHandler.ts +0 -58
  25. package/src/lib/operators/HttpRequestHandler.ts +0 -29
  26. package/src/lib/operators/HttpResponseHandler.ts +0 -11
  27. package/src/lib/operators/ProcessOperators.ts +0 -113
  28. package/src/lib/operators/capitalize-request-method-operator.ts +0 -26
  29. package/src/lib/operators/fetch-request.schemas.ts +0 -104
  30. package/src/lib/operators/index.ts +0 -9
  31. package/src/lib/operators/request-operator-header.ts +0 -19
  32. package/src/lib/operators/request-validation-operator.ts +0 -51
  33. package/src/lib/operators/sse-map.operator.ts +0 -45
  34. package/src/lib/operators/types.ts +0 -174
  35. package/src/lib/selectors/blob-selector.ts +0 -42
  36. package/src/lib/selectors/create-sse-selector.ts +0 -279
  37. package/src/lib/selectors/index.ts +0 -11
  38. package/src/lib/selectors/json-selector.ts +0 -52
  39. package/src/mock/create-open-api-mock-middleware.ts +0 -40
  40. package/src/mock/create-router-middleware.ts +0 -158
  41. package/src/mock/index.ts +0 -26
  42. package/src/mock/resolve-open-api-mock-response.ts +0 -36
  43. package/src/module.ts +0 -149
  44. package/src/provider.ts +0 -225
  45. package/src/version.ts +0 -2
  46. package/tests/HttpClient.test.ts +0 -173
  47. package/tests/HttpMiddlewareHandler.test.ts +0 -58
  48. package/tests/mock/adapters.test.ts +0 -62
  49. package/tests/mock/router-middleware.test.ts +0 -135
  50. package/tests/operators.test.ts +0 -137
  51. package/tests/sse.selector.test.ts +0 -162
  52. package/tsconfig.json +0 -18
  53. package/vitest.config.ts +0 -12
package/CHANGELOG.md DELETED
@@ -1,1321 +0,0 @@
1
- # Change Log
2
-
3
- ## 8.1.0-next.0
4
-
5
- ### Minor Changes
6
-
7
- - 2836e0b: Add a `./mock` entry point built on `addMiddleware` on the real `HttpClientConfigurator`, so answering a request in a test doesn't mean swapping out a separate configurator.
8
-
9
- ```ts
10
- configurator.configureHttpClient("catalog", {
11
- baseUri: "https://api.example.com",
12
- });
13
- configurator.http.addMiddleware(async (uri, init, next) =>
14
- uri === "https://api.example.com/items"
15
- ? Response.json([{ id: 1 }])
16
- : next(uri, init),
17
- );
18
- ```
19
-
20
- `addMiddleware` wraps `_performFetch` rather than replacing it, so the exact same client and configuration a real app registers is what a test exercises — only the boundary that would reach the network is short-circuited, and a middleware that calls `next(uri, init)` falls through to the real call (or the next middleware) unchanged.
21
-
22
- Two adapters are included for building a middleware:
23
-
24
- - `createRouterMiddleware(baseUri, build)` — a minimal Express-like router (`.get`/`.post`/`.put`/`.patch`/`.delete`/`.on`, `:id`-style path params) for one base URI, with no dependency on a real routing library.
25
- - `createOpenApiMockMiddleware(openApiMock)` — adapts an `@equinor/fusion-openapi-mock` instance, so a real `openapi.json`/`openapi.yaml` fakes every response with no handlers written at all.
26
-
27
- ```ts
28
- import { createRouterMiddleware } from "@equinor/fusion-framework-module-http/mock";
29
-
30
- configurator.http.addMiddleware(
31
- createRouterMiddleware("https://context.example.com", (router) => {
32
- router.get("/contexts/:id", ({ params }) =>
33
- Response.json({ id: params.id }),
34
- );
35
- }),
36
- );
37
- ```
38
-
39
- `@equinor/fusion-framework`'s `FrameworkMockConfigurator` gains a matching `.http` accessor, backed by the same real `IHttpClientConfigurator`.
40
-
41
- ### Patch Changes
42
-
43
- - e8aae1f: Internal: publish every package on the `next` pre-release tag so the whole framework can be installed as a coherent set.
44
-
45
- Packages without their own changes are bumped only to receive a `-next.N` version and the `next` dist-tag on npm. Install with:
46
-
47
- ```bash
48
- pnpm add @equinor/fusion-framework-react-app@next
49
- ```
50
-
51
- - 2836e0b: Fix `HttpClient.abort()` not cancelling the underlying network call when middleware is registered. `next(...)` resolves through a `Promise`, so a middleware calling it created a subscription to `_performFetch` outside the tree the `takeUntil(this._abort$)` teardown reaches -- the outer request settled, but the real `fetch` kept running. `abort()` now also aborts a per-request `AbortSignal` combined into the request `init`, so `_performFetch` (`fromFetch` by default) is cancelled directly regardless of whether middleware severed the RxJS subscription chain.
52
- - Updated dependencies [e8aae1f]
53
- - Updated dependencies [2836e0b]
54
- - Updated dependencies [2836e0b]
55
- - Updated dependencies [2836e0b]
56
- - Updated dependencies [2836e0b]
57
- - Updated dependencies [2836e0b]
58
- - Updated dependencies [2836e0b]
59
- - Updated dependencies [2836e0b]
60
- - Updated dependencies [2836e0b]
61
- - Updated dependencies [2836e0b]
62
- - Updated dependencies [2836e0b]
63
- - Updated dependencies [2836e0b]
64
- - @equinor/fusion-framework-module@6.1.3-next.0
65
- - @equinor/fusion-framework-module-msal@11.0.0-next.0
66
-
67
- ## 8.0.5
68
-
69
- ### Patch Changes
70
-
71
- - de2b4fb: Added missing TSDoc comments on class fields flagged by the new `require-property-tsdoc` fusion-lint rule.
72
-
73
- ## 8.0.4
74
-
75
- ### Patch Changes
76
-
77
- - 80c3e4a: Internal: resolve `noConfusingVoidType` Biome warning on the `ProcessOperator` callback type with an explanatory `biome-ignore` comment, since the `| void` relies on TypeScript's void-callback leniency for operator functions that don't transform the request. No public API or behavior change.
78
- - 80c3e4a: Internal: add required fusion-lint intent comments explaining `as unknown as T` casts in the HTTP client configurator, provider, and low-level fetch client. No behavior change.
79
- - 80c3e4a: Internal: resolve remaining `fusion-lint` warnings across the module (TSDoc, intent comments, `no-todo-without-issue`). Also reorganizes the error classes into `src/errors/` (one class per file, `HttpResponseError.ts`, `HttpJsonResponseError.ts`, `ServerSentEventResponseError.ts`, `ClientNotFoundException.ts`) and additionally exposes them as an `Errors` namespace:
80
-
81
- ```typescript
82
- // Still works, unchanged
83
- import { ClientNotFoundException } from '@equinor/fusion-framework-module-http';
84
-
85
- // New alternative
86
- import { Errors } from '@equinor/fusion-framework-module-http';
87
- new Errors.ClientNotFoundException(...);
88
- ```
89
-
90
- The existing named exports and the `./errors` subpath export (`dist/esm/errors/index.js` / `dist/types/errors/index.d.ts`) both continue to work — no breaking change for consumers.
91
-
92
- ## 8.0.3
93
-
94
- ### Patch Changes
95
-
96
- - @equinor/fusion-framework-module-msal@10.0.0
97
-
98
- ## 8.0.2
99
-
100
- ### Patch Changes
101
-
102
- - Updated dependencies [b7b1d9a]
103
- - Updated dependencies [b7b1d9a]
104
- - Updated dependencies [b7b1d9a]
105
- - @equinor/fusion-framework-module@6.1.0
106
- - @equinor/fusion-framework-module-msal@9.0.0
107
-
108
- ## 8.0.1
109
-
110
- ### Patch Changes
111
-
112
- - f045ac0: Internal: upgrade `zod` from 4.3.6 to 4.4.3 to resolve validation issues; no public API changes.
113
-
114
- ## 8.0.0
115
-
116
- ### Major Changes
117
-
118
- - abffa53: Major version bump for Fusion Framework React 19 release.
119
-
120
- All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
121
-
122
- **Breaking changes:**
123
- - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
124
- - React Router upgraded from v6 to v7
125
- - Navigation module refactored with new history API
126
- - `renderComponent` and `renderApp` now use `createRoot` API
127
-
128
- **Migration:**
129
- - Update your React version to 18.0.0 or higher before upgrading
130
- - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
131
- - See individual package changelogs for package-specific migration steps
132
-
133
- ### Patch Changes
134
-
135
- - abffa53: Fix HTTP client configuration so `responseHandler` options are applied when creating clients, preserve request `path` values in the request pipeline, only treat absolute `http:` and `https:` strings as ad-hoc client URLs, avoid mutating caller-provided MSAL request init objects, and re-export the SSE helpers from the operators and selectors entry points.
136
- - Updated dependencies [abffa53]
137
- - Updated dependencies [abffa53]
138
- - @equinor/fusion-framework-module@6.0.0
139
- - @equinor/fusion-framework-module-msal@8.0.0
140
-
141
- ## 7.0.8
142
-
143
- ### Patch Changes
144
-
145
- - [#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.
146
-
147
- - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581), [`db8fa81`](https://github.com/equinor/fusion-framework/commit/db8fa8134b77a628b15e06f7f72b50f04ef97458)]:
148
- - @equinor/fusion-framework-module@5.0.6
149
- - @equinor/fusion-framework-module-msal@7.3.1
150
-
151
- ## 7.0.7
152
-
153
- ### Patch Changes
154
-
155
- - Updated dependencies [[`cb37cae`](https://github.com/equinor/fusion-framework/commit/cb37cae45e06778e8d1ea20faed31b582e49fcae)]:
156
- - @equinor/fusion-framework-module-msal@7.0.0
157
-
158
- ## 7.0.6
159
-
160
- ### Patch Changes
161
-
162
- - [#3866](https://github.com/equinor/fusion-framework/pull/3866) [`f70d66f`](https://github.com/equinor/fusion-framework/commit/f70d66f1bc826e614140adb2c6ee052f98e3b3da) Thanks [@dependabot](https://github.com/apps/dependabot)! - Internal: Dedupe zod dependency to 4.3.5
163
-
164
- Deduplicated zod dependency to version 4.3.5 across all packages using `pnpm dedupe`. This aligns all packages (AI plugins upgraded from v3.25.76, other packages consolidated from v4.1.8/v4.1.11) to use the same latest stable version, improving consistency and reducing bundle size. All builds, tests, and linting pass successfully.
165
-
166
- - Updated dependencies [[`f70d66f`](https://github.com/equinor/fusion-framework/commit/f70d66f1bc826e614140adb2c6ee052f98e3b3da)]:
167
- - @equinor/fusion-framework-module-msal@6.0.5
168
-
169
- ## 7.0.5
170
-
171
- ### Patch Changes
172
-
173
- - [#3714](https://github.com/equinor/fusion-framework/pull/3714) [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8) Thanks [@odinr](https://github.com/odinr)! - Update HTTP module to use new MSAL token acquisition API format.
174
-
175
- Changes `acquireAccessToken` call from `{ scopes }` to `{ request: { scopes } }` to maintain compatibility with MSAL v4 API changes.
176
-
177
- Migration: No action required. This is an internal API compatibility fix.
178
-
179
- - Updated dependencies [[`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8), [`11fe961`](https://github.com/equinor/fusion-framework/commit/11fe961794e4960ccb987bc320268cc9b263f1f8)]:
180
- - @equinor/fusion-framework-module-msal@6.0.0
181
-
182
- ## 7.0.4
183
-
184
- ### Patch Changes
185
-
186
- - [#3544](https://github.com/equinor/fusion-framework/pull/3544) [`443414f`](https://github.com/equinor/fusion-framework/commit/443414fe0351b529cecf0a667383640567d05e74) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update zod from 4.1.11 to 4.1.12, which includes a critical bug fix for ZodError.flatten() preventing crashes on 'toString' key and improved error handling throughout the framework.
187
-
188
- - Updated dependencies [[`cd06a8a`](https://github.com/equinor/fusion-framework/commit/cd06a8a8de86a44edf349103fb9da6c8615a1d59), [`443414f`](https://github.com/equinor/fusion-framework/commit/443414fe0351b529cecf0a667383640567d05e74)]:
189
- - @equinor/fusion-framework-module@5.0.5
190
- - @equinor/fusion-framework-module-msal@5.1.2
191
-
192
- ## 7.0.3
193
-
194
- ### Patch Changes
195
-
196
- - [#3594](https://github.com/equinor/fusion-framework/pull/3594) [`6900d98`](https://github.com/equinor/fusion-framework/commit/6900d98142c84f4703095f8d03b09af57a1d7d2e) Thanks [@odinr](https://github.com/odinr)! - Fix HttpClientProvider to extend BaseModuleProvider, ensuring proper module interface implementation and preventing configuration errors.
197
-
198
- - Updated dependencies [[`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`e1a94c5`](https://github.com/equinor/fusion-framework/commit/e1a94c5a1df4ac2ec92ed25b75648397a3dbfa7b), [`0bc6b38`](https://github.com/equinor/fusion-framework/commit/0bc6b38e61c98a2f9dea7b55fa9983f268f860be)]:
199
- - @equinor/fusion-framework-module@5.0.4
200
- - @equinor/fusion-framework-module-msal@5.1.1
201
-
202
- ## 7.0.2
203
-
204
- ### Patch Changes
205
-
206
- - [#3541](https://github.com/equinor/fusion-framework/pull/3541) [`a66d70a`](https://github.com/equinor/fusion-framework/commit/a66d70a9fa40ab14f2534be4f22b6d1f602097a0) Thanks [@odinr](https://github.com/odinr)! - Fixed capitalizeRequestMethodOperator to handle undefined HTTP method values.
207
-
208
- The operator was throwing a Zod validation error when request.method was undefined, expecting a string but receiving undefined. Updated the requestMethodCasing schema to properly handle optional method values and added test coverage for undefined method scenarios.
209
-
210
- - Updated dependencies [[`45954e5`](https://github.com/equinor/fusion-framework/commit/45954e5db471a2faa24e88e41fc6d6c18817d6d1)]:
211
- - @equinor/fusion-framework-module@5.0.3
212
-
213
- ## 7.0.1
214
-
215
- ### Patch Changes
216
-
217
- - [#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
218
- - **v4.1.10**: Fixed shape caching issue (#5263) improving validation performance for complex schemas
219
- - **v4.1.11**: Maintenance release with general improvements
220
-
221
- This patch update enhances schema validation performance without changing any APIs.
222
-
223
- - Updated dependencies [[`3b614f8`](https://github.com/equinor/fusion-framework/commit/3b614f87138f5a52f8ccc50ca8c6598ef3db37d6), [`1700ca8`](https://github.com/equinor/fusion-framework/commit/1700ca8851fa108e55e9729fd24f595272766e63)]:
224
- - @equinor/fusion-framework-module@5.0.2
225
- - @equinor/fusion-framework-module-msal@5.0.1
226
-
227
- ## 7.0.0
228
-
229
- ### Major Changes
230
-
231
- - [#3394](https://github.com/equinor/fusion-framework/pull/3394) [`c222c67`](https://github.com/equinor/fusion-framework/commit/c222c673bc7cdefff6eb0cd9436bfa3d1f185295) Thanks [@odinr](https://github.com/odinr)! - chore: bump zod from 3.25.76 to 4.1.8
232
-
233
- Updated source code to migrate from zod v3 to v4. Updated zod dependency from v3.25.76 to v4.1.8 and modified error handling in the HTTP module to use ZodError `.issues` property instead of `.errors` and replaced `z.custom()` with `z.string().refine()` for better v4 compatibility.
234
-
235
- Key changes in source code:
236
- - Updated ZodError `.errors` to `.issues` property in capitalize-request-method operator
237
- - Replaced `z.custom()` with `z.string().refine()` for better v4 compatibility in request method casing validation
238
- - Simplified error message configuration in request method verb validation
239
- - Updated error handling to use new zod v4 error structure
240
-
241
- Breaking changes: Error handling structure has changed to use new zod v4 error format.
242
-
243
- Links:
244
- - [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
245
- - [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
246
-
247
- ### Patch Changes
248
-
249
- - Updated dependencies [[`c222c67`](https://github.com/equinor/fusion-framework/commit/c222c673bc7cdefff6eb0cd9436bfa3d1f185295)]:
250
- - @equinor/fusion-framework-module-msal@5.0.0
251
-
252
- ## 6.3.5
253
-
254
- ### Patch Changes
255
-
256
- - [#2910](https://github.com/equinor/fusion-framework/pull/2910) [`07cc985`](https://github.com/equinor/fusion-framework/commit/07cc9857e1427b574e011cc319518e701dba784d) Thanks [@dependabot](https://github.com/apps/dependabot)! - Updated vitest from 2.1.9 to 3.2.4 across all packages.
257
-
258
- ## Breaking Changes
259
- - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
260
- - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
261
- - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
262
- - **Coverage API**: New coverage methods `enableCoverage()` and `disableCoverage()`
263
- - **TypeScript Support**: Enhanced TypeScript integration and type definitions
264
-
265
- ## Security Updates
266
- - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
267
- - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
268
-
269
- ## Migration Notes
270
- - Test snapshots may need regeneration due to quote format changes
271
- - Some test configurations might need updates for new TypeScript support
272
- - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
273
-
274
- ## Links
275
- - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
276
- - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
277
-
278
- - Updated dependencies [[`3049232`](https://github.com/equinor/fusion-framework/commit/30492326336bea0d1af683b89e62a18eceec4402)]:
279
- - @equinor/fusion-framework-module@5.0.1
280
-
281
- ## 6.3.4
282
-
283
- ### Patch Changes
284
-
285
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - fix(http): use acquireAccessToken instead of acquireToken
286
- - The HTTP module now uses the correct method `acquireAccessToken` from the auth provider to retrieve the access token for requests with scopes.
287
- - This fixes compatibility with the new MSAL node module interface, which no longer exposes `acquireToken` but instead provides `acquireAccessToken` for token retrieval.
288
- - Ensures the Authorization header is set correctly for authenticated HTTP requests.
289
-
290
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - update Vite to 6.3.5
291
-
292
- - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253) Thanks [@odinr](https://github.com/odinr)! - Upgrade zod dependency to ^3.25.76 in all affected packages.
293
-
294
- - Updated dependencies [[`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253)]:
295
- - @equinor/fusion-framework-module@5.0.0
296
- - @equinor/fusion-framework-module-msal@4.0.8
297
-
298
- ## 6.3.3
299
-
300
- ### Patch Changes
301
-
302
- - [#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
303
- - Updated package.json typesVersions.
304
- - Ensures backward compatibility with older node versions.
305
- - Ensured consistency with workspace and repository configuration.
306
-
307
- - Updated dependencies [[`7441b13`](https://github.com/equinor/fusion-framework/commit/7441b13aa50dd7362d1629086a27b6b4e571575d)]:
308
- - @equinor/fusion-framework-module-msal@4.0.7
309
-
310
- ## 6.3.2
311
-
312
- ### Patch Changes
313
-
314
- - Updated dependencies [[`96bb1fb`](https://github.com/equinor/fusion-framework/commit/96bb1fb744d8dc2410e99fea6ca948d2d5489428)]:
315
- - @equinor/fusion-framework-module@4.4.2
316
- - @equinor/fusion-framework-module-msal@4.0.6
317
-
318
- ## 6.3.1
319
-
320
- ### Patch Changes
321
-
322
- - [#3054](https://github.com/equinor/fusion-framework/pull/3054) [`c6af3a3`](https://github.com/equinor/fusion-framework/commit/c6af3a3c926fb245e9d056b506d47b8bf4f1efde) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - Re-add typesVersions from package.json files
323
-
324
- - Updated dependencies [[`e49f916`](https://github.com/equinor/fusion-framework/commit/e49f9161557202df57248d02ade4d2ef50231bdc), [`c6af3a3`](https://github.com/equinor/fusion-framework/commit/c6af3a3c926fb245e9d056b506d47b8bf4f1efde)]:
325
- - @equinor/fusion-framework-module@4.4.1
326
- - @equinor/fusion-framework-module-msal@4.0.5
327
-
328
- ## 6.3.0
329
-
330
- ### Minor Changes
331
-
332
- - [#3038](https://github.com/equinor/fusion-framework/pull/3038) [`7a0a510`](https://github.com/equinor/fusion-framework/commit/7a0a510e0af1f0769c596e1b9aaa391250efd95d) Thanks [@odinr](https://github.com/odinr)! - ### Added
333
- - Introduced support for Server-Sent Events (SSE) in the HTTP module.
334
- - Added `sse# Change Log method to `HttpClient` for subscribing to SSE streams.
335
- - Added `sseMap` operator for handling SSE in RxJS pipelines.
336
- - Added `createSseSelector` for transforming SSE responses into observables.
337
- - Enhanced error handling with `ServerSentEventResponseError`.
338
-
339
- ### Documentation
340
- - Updated README with examples and usage details for SSE support.
341
-
342
- ### Patch Changes
343
-
344
- - Updated dependencies [[`efd70a3`](https://github.com/equinor/fusion-framework/commit/efd70a34f734e0c155d3440e35ce4fa11a7abc42)]:
345
- - @equinor/fusion-framework-module@4.4.0
346
- - @equinor/fusion-framework-module-msal@4.0.4
347
-
348
- ## 6.2.5
349
-
350
- ### Patch Changes
351
-
352
- - [#3012](https://github.com/equinor/fusion-framework/pull/3012) [`f53b60b`](https://github.com/equinor/fusion-framework/commit/f53b60b7805706ce7617e614f0ac0c24317a2e43) Thanks [@odinr](https://github.com/odinr)! - removed `typesVersions` from packages, since we no longer support TS < 4.7, also corrected `types` path in package.json
353
-
354
- - Updated dependencies [[`f53b60b`](https://github.com/equinor/fusion-framework/commit/f53b60b7805706ce7617e614f0ac0c24317a2e43)]:
355
- - @equinor/fusion-framework-module@4.3.8
356
- - @equinor/fusion-framework-module-msal@4.0.3
357
-
358
- ## 6.2.4
359
-
360
- ### Patch Changes
361
-
362
- - [#2952](https://github.com/equinor/fusion-framework/pull/2952) [`e164abc`](https://github.com/equinor/fusion-framework/commit/e164abcf52ff84d181ed5406d2a28441d54da9a8) Thanks [@odinr](https://github.com/odinr)! - fix(http): resovle relative urls
363
-
364
- ## 6.2.3
365
-
366
- ### Patch Changes
367
-
368
- - [#2885](https://github.com/equinor/fusion-framework/pull/2885) [`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update he `Typescript` version `^5.7.3` to `^5.8.2`
369
-
370
- - [#2901](https://github.com/equinor/fusion-framework/pull/2901) [`8c6c598`](https://github.com/equinor/fusion-framework/commit/8c6c598fce973f9c24426d5e108cc3301d2da139) Thanks [@odinr](https://github.com/odinr)! - refactor: adhere to Biome `useOptionalChain`
371
-
372
- - [#2900](https://github.com/equinor/fusion-framework/pull/2900) [`fdd057e`](https://github.com/equinor/fusion-framework/commit/fdd057e0920ffb93e07b6338e3ff592a65dabbc6) Thanks [@odinr](https://github.com/odinr)! - Fixed key syntax in `HttpClientConfigurator` default request handler.
373
-
374
- - Updated dependencies [[`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237)]:
375
- - @equinor/fusion-framework-module@4.3.7
376
- - @equinor/fusion-framework-module-msal@4.0.2
377
-
378
- ## 6.2.2
379
-
380
- ### Patch Changes
381
-
382
- - [#2852](https://github.com/equinor/fusion-framework/pull/2852) [`ba5d12e`](https://github.com/equinor/fusion-framework/commit/ba5d12eba0a38db412353765e997d02c1fbb478d) Thanks [@odinr](https://github.com/odinr)! - replaced forEach with for-of loops for better readability
383
-
384
- - [#2848](https://github.com/equinor/fusion-framework/pull/2848) [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d) Thanks [@odinr](https://github.com/odinr)! - Refactored imports to use `type` when importing types from a module, to conform with the `useImportType` rule in Biome.
385
-
386
- - Updated dependencies [[`ba5d12e`](https://github.com/equinor/fusion-framework/commit/ba5d12eba0a38db412353765e997d02c1fbb478d), [`6efabb7`](https://github.com/equinor/fusion-framework/commit/6efabb7837a97319e976e122db855d8b88b031a6), [`1953dd2`](https://github.com/equinor/fusion-framework/commit/1953dd217d85fa4880856b2c97b6305fcbaf2e24), [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d)]:
387
- - @equinor/fusion-framework-module@4.3.6
388
- - @equinor/fusion-framework-module-msal@4.0.1
389
-
390
- ## 6.2.1
391
-
392
- ### Patch Changes
393
-
394
- - Updated dependencies [[`ea4b522`](https://github.com/equinor/fusion-framework/commit/ea4b5221b30719289fc947b5dbb0acd3ea52ffaa)]:
395
- - @equinor/fusion-framework-module-msal@4.0.0
396
-
397
- ## 6.2.0
398
-
399
- ### Minor Changes
400
-
401
- - [#2491](https://github.com/equinor/fusion-framework/pull/2491) [`73af73e`](https://github.com/equinor/fusion-framework/commit/73af73e5582ca27b132210af8ba308b80e036d51) Thanks [@odinr](https://github.com/odinr)! - Added a new operator `capitalizeRequestMethodOperator` to ensure that the HTTP method of a given request is in uppercase.
402
- - Introduced `capitalizeRequestMethodOperator` which processes an HTTP request object and converts its method to uppercase.
403
- - Logs a warning if the HTTP method was converted, providing information about the change and a reference to RFC 7231 Section 4.1.
404
-
405
- **Example usage:**
406
-
407
- ```typescript
408
- import { capitalizeRequestMethodOperator } from "@equinor/fusion-query";
409
-
410
- const operator = capitalizeRequestMethodOperator();
411
- const request = { method: "get" };
412
- const updatedRequest = operator(request);
413
- console.log(updatedRequest.method); // Outputs: 'GET'
414
- ```
415
-
416
- Adding the operator to the `HttpClient`:
417
-
418
- ```typescript
419
- const httpClient = new HttpClient();
420
- httpClient.requestHandler.add(
421
- "capatalize-method",
422
- capitalizeRequestMethodOperator(),
423
- );
424
-
425
- // transforms `method` to uppercase and logs a warning.
426
- httpClient.get("https://example.com", { method: "get" });
427
- ```
428
-
429
- - [#2491](https://github.com/equinor/fusion-framework/pull/2491) [`73af73e`](https://github.com/equinor/fusion-framework/commit/73af73e5582ca27b132210af8ba308b80e036d51) Thanks [@odinr](https://github.com/odinr)! - The `HttpClientConfigurator` now has by default the `capitalizeRequestMethodOperator` and `requestValidationOperator` enabled.
430
-
431
- **CapitalizeRequestMethodOperator**
432
-
433
- This operator will capitalize the HTTP method name before sending the request. This is useful when you are using a client that requires the HTTP method to be capitalized. If you want to disable this operator, you can do so by removing it from the `HttpClientConfigurator`:
434
-
435
- ```typescript
436
- httpConfig.defaultHttpRequestHandler.remove("capitalize-method");
437
- ```
438
-
439
- > [!NOTE]
440
- > This operator is enabled by default and will log to the console if the method is not capitalized.
441
-
442
- **RequestValidationOperator**
443
-
444
- This operator will parse and validate the request before sending it. If the request is invalid, the error will be logged to the console. If you want to disable this operator, you can do so by removing it from the `HttpClientConfigurator`:
445
-
446
- ```typescript
447
- httpConfig.defaultHttpRequestHandler.remove("validate-request");
448
- ```
449
-
450
- > [!NOTE]
451
- > This operator is enabled by default and will log to the console if the request parameters are invalid.
452
-
453
- If you wish stricter validation, you can enable the `strict` mode by setting the `strict` property to `true`:
454
-
455
- ```typescript
456
- import { requestValidationOperator } from '@equinor/fusion-framework-module-http/operators';
457
-
458
- httpConfig.defaultHttpRequestHandler.set(
459
- 'validate-request'
460
- requestValidationOperator({
461
- strict: true, // will throw error if schema is not valid
462
- parse: true // will not allow additional properties
463
- })
464
- );
465
- ```
466
-
467
- - [#2491](https://github.com/equinor/fusion-framework/pull/2491) [`73af73e`](https://github.com/equinor/fusion-framework/commit/73af73e5582ca27b132210af8ba308b80e036d51) Thanks [@odinr](https://github.com/odinr)! - Added `remove` to the `ProcessOperators` to allow for the removal of a specific operator. This is useful for removing operators that are not desired, example default operators included in initial configuration.
468
-
469
- example:
470
-
471
- ```typescript
472
- httpClient.requestHandler.remove("capitalize-method");
473
- ```
474
-
475
- > [!NOTE]
476
- > There are currently no code completion for the `remove` method, so you will need to know the name of the operator you want to remove. We assume this is so low level that if you are removing operators you know what the name of the operator is.
477
-
478
- > [!TIP]
479
- > If you only wish to replace the operator with another operator, you can use the `set` method instead of `remove` and `add`.
480
-
481
- - [#2491](https://github.com/equinor/fusion-framework/pull/2491) [`73af73e`](https://github.com/equinor/fusion-framework/commit/73af73e5582ca27b132210af8ba308b80e036d51) Thanks [@odinr](https://github.com/odinr)! - **New Feature: Enhanced `requestValidationOperator`**
482
-
483
- The `requestValidationOperator` is a utility function that validates incoming requests against a Zod schema. This function has two options: `strict` and `parse`. The `strict` option allows you to enforce strict validation, while the `parse` option enables you to return the parsed request object if it passes validation.
484
-
485
- The `requestValidationOperator` is meant to be used as a request operator in the Fusion API framework. It is a higher-order function that takes a Zod schema as an argument and returns a function that validates incoming requests against that schema.
486
-
487
- | Option | Description | Usage |
488
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
489
- | **Strict Validation** | When `strict` is set to `true`, the validation will fail if there are additional properties not defined in the schema. | If `strict` is set to `false` or omitted, additional properties will be allowed and passed through without causing validation errors. |
490
- | **Parse Option** | When `parse` is enabled, the function will return the parsed and potentially transformed request object if it passes validation. | If `parse` is not enabled, the function will not return anything even if the request object is valid. |
491
-
492
- To use the new `strict` and `parse` options, update your code as follows:
493
-
494
- Example usage with strict validation:
495
-
496
- ```typescript
497
- const operator = requestValidationOperator({ strict: true });
498
-
499
- // This will throw an error because of invalid method and extra property.
500
- operator({
501
- method: "post",
502
- body: "foo",
503
- extraProperty: "This should not be here",
504
- });
505
- ```
506
-
507
- Example usage with parsing enabled:
508
-
509
- ```typescript
510
- // Example usage with parsing enabled
511
- const operator = requestValidationOperator({ parse: true });
512
-
513
- // will return { method: 'GET' }
514
- const parsedRequest = operator({
515
- method: "GET",
516
- extraProperty: "This should not be here",
517
- });
518
- ```
519
-
520
- Example usage with both strict validation and parsing enabled:
521
-
522
- ```typescript
523
- const operator = requestValidationOperator({ strict: true, parse: true });
524
-
525
- // will throw an error because of extra property.
526
- const parsedStrictRequest = operator({
527
- method: "GET",
528
- extraProperty: "This should not be here",
529
- });
530
- ```
531
-
532
- Example usage with the `HttpClient`:
533
-
534
- ```typescript
535
- const httpClient = new HttpClient();
536
-
537
- // Add the request validation operator to the HttpClient.
538
- httpClient.requestHandler.add(
539
- "validate-init",
540
- requestValidationOperator({ parse: true }),
541
- );
542
-
543
- // will throw an error because of invalid method.
544
- httpClient.get("https://example.com", { method: "get" });
545
- ```
546
-
547
- ## 6.1.0
548
-
549
- ### Minor Changes
550
-
551
- - [#2452](https://github.com/equinor/fusion-framework/pull/2452) [`c776845`](https://github.com/equinor/fusion-framework/commit/c776845e753acf4a0bceda1c59d31e5939c44c31) Thanks [@odinr](https://github.com/odinr)! - **@equinor/fusion-framework-module-http**
552
-
553
- `HttpClient._resolveUrl` now supports resolving URLs with a base URL that contains a path.
554
-
555
- before:
556
-
557
- ```typescript
558
- const client = new HttpClient("https://example.com/test/me");
559
- client.fetch("/api"); // https://example.com/api
560
- ```
561
-
562
- now:
563
-
564
- ```typescript
565
- const client = new HttpClient("https://example.com/test/me");
566
- client.fetch("/api"); // https://example.com/test/me/api
567
- ```
568
-
569
- ### Patch Changes
570
-
571
- - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
572
- - @equinor/fusion-framework-module@4.3.5
573
- - @equinor/fusion-framework-module-msal@3.1.5
574
-
575
- ## 6.0.3
576
-
577
- ### Patch Changes
578
-
579
- - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
580
- - @equinor/fusion-framework-module@4.3.4
581
- - @equinor/fusion-framework-module-msal@3.1.4
582
-
583
- ## 6.0.2
584
-
585
- ### Patch Changes
586
-
587
- - [#2358](https://github.com/equinor/fusion-framework/pull/2358) [`decb9e9`](https://github.com/equinor/fusion-framework/commit/decb9e9e3d1bb1b0577b729a1e7ae812afdd83cb) Thanks [@eikeland](https://github.com/eikeland)! - Updating vitest to 2.0.4. Setting vitest as devDependency in fusion-query. Updating vite to 5.3.4
588
-
589
- - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
590
- - @equinor/fusion-framework-module@4.3.3
591
- - @equinor/fusion-framework-module-msal@3.1.3
592
-
593
- ## 6.0.1
594
-
595
- ### Patch Changes
596
-
597
- - [#2324](https://github.com/equinor/fusion-framework/pull/2324) [`788d0b9`](https://github.com/equinor/fusion-framework/commit/788d0b93edc25e5b682d88c58614560c204c1af9) Thanks [@odinr](https://github.com/odinr)! - Updated documentation in `README.md` for http module.
598
- - added introduction to http module
599
- - added concepts section which highlights the key concepts of http module
600
- - added sequence diagram for http request execution
601
- - added examples for http module
602
- - improved documentation for configuring http module
603
- - improved documentation for working with http clients
604
- - improved the formatting of the documentation
605
-
606
- - [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
607
-
608
- - [#2324](https://github.com/equinor/fusion-framework/pull/2324) [`788d0b9`](https://github.com/equinor/fusion-framework/commit/788d0b93edc25e5b682d88c58614560c204c1af9) Thanks [@odinr](https://github.com/odinr)! - Updated TsDoc for http module
609
-
610
- - [#2324](https://github.com/equinor/fusion-framework/pull/2324) [`788d0b9`](https://github.com/equinor/fusion-framework/commit/788d0b93edc25e5b682d88c58614560c204c1af9) Thanks [@odinr](https://github.com/odinr)! - - Added a new type `ResponseSelector<TResult, TResponse>`: a function that takes a `Response` object and returns an observable stream of type `TResult`. The `ResponseSelector` type has two template parameters: `TResult` and `TResponse`.
611
- - Updated the `FetchRequestInit` type to include a new property `selector` of type `ResponseSelector<TReturn, TResponse>`, which allows specifying a response selector function.
612
- - Updated the blob-selector and json-selector functions to use the new `ResponseSelector` type.
613
-
614
- - [#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.
615
-
616
- Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
617
- 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
618
- 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
619
- 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
620
-
621
- No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
622
-
623
- Before:
624
-
625
- ```json
626
- {
627
- "compilerOptions": {
628
- "module": "ES2022",
629
- "target": "ES6",
630
- "incremental": true,
631
- "removeComments": true,
632
- "preserveConstEnums": true,
633
- "sourceMap": true,
634
- "moduleResolution": "node"
635
- }
636
- }
637
- ```
638
-
639
- After:
640
-
641
- ```json
642
- {
643
- "compilerOptions": {
644
- "module": "ES2022",
645
- "target": "ES6",
646
- "incremental": true,
647
- "preserveConstEnums": true,
648
- "sourceMap": true,
649
- "moduleResolution": "node"
650
- }
651
- }
652
- ```
653
-
654
- This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
655
-
656
- - Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
657
- - @equinor/fusion-framework-module@4.3.2
658
- - @equinor/fusion-framework-module-msal@3.1.2
659
-
660
- ## 6.0.0
661
-
662
- ### Major Changes
663
-
664
- - [#2181](https://github.com/equinor/fusion-framework/pull/2181) [`ba2379b`](https://github.com/equinor/fusion-framework/commit/ba2379b177f23ccc023894e36e50d7fc56c929c8) Thanks [@odinr](https://github.com/odinr)! - The `blob` and `blob# Change Log methods in the `HttpClient` class have been updated to provide a more robust and flexible API for fetching blob resources.
665
- 1. The `blob` and `blob# Change Log methods now accept an optional `args`parameter of type`FetchRequestInit<T, TRequest, TResponse>`, where `T` is the type of the expected blob result. This allows consumers to customize the fetch request and response handling.
666
- 2. The `blob` and `blob# Change Log methods now return a `Promise<T>`and`StreamResponse<T>`respectively, where`T` is the type of the expected blob result. This allows consumers to handle the blob data in a more type-safe manner.
667
- 3. The `blobSelector` function has been updated to extract the filename (if available) from the `content-disposition` header and return it along with the blob data in a `BlobResult` object.
668
- 4. If you were previously using the `blob` or `blob# Change Log methods and expecting a `Blob`result, you must now use the new`BlobResult` type, which includes the filename (if available) and the blob data.
669
-
670
- > [!WARNING]
671
- > This alters the return type of the `blob` and `blob# Change Log methods, which is a **breaking change**.
672
-
673
- Example:
674
-
675
- ```typescript
676
- const blobResult = await httpClient.blob("/path/to/blob");
677
- console.log(blobResult.filename); // 'example.pdf'
678
- console.log(blobResult.blob); // Blob instance
679
- ```
680
-
681
- 1. If you were providing a custom selector function to the `blob` or `blob# Change Log methods, you can now use the new `BlobResult` type in your selector function.
682
-
683
- Example:
684
-
685
- ```typescript
686
- const customBlobSelector = async (
687
- response: Response,
688
- ): Promise<{ filename: string; blob: Blob }> => {
689
- // Extract filename and blob from the response
690
- const { filename, blob } = await blobSelector(response);
691
- return { filename, blob };
692
- };
693
-
694
- const blobResult = await httpClient.blob("/path/to/blob", {
695
- selector: customBlobSelector,
696
- });
697
- console.log(blobResult.filename); // 'example.pdf'
698
- console.log(blobResult.blob); // Blob instance
699
- ```
700
-
701
- 3. If you were using the `blob# Change Log method and expecting a `StreamResponse<Blob>`, you can now use the new `StreamResponse<T>`type, where`T` is the type of the expected blob result.
702
-
703
- Example:
704
-
705
- ```typescript
706
- const blobStream = httpClient.blob$("/path/to/blob");
707
- blobStream.subscribe((blobResult) => {
708
- console.log(blobResult.filename); // 'example.pdf'
709
- console.log(blobResult.blob); // Blob instance
710
- });
711
- ```
712
-
713
- ### Patch Changes
714
-
715
- - [#2196](https://github.com/equinor/fusion-framework/pull/2196) [`1e60919`](https://github.com/equinor/fusion-framework/commit/1e60919e83fb65528c88f604d7bd43299ec412e1) Thanks [@odinr](https://github.com/odinr)! - The `jsonSelector` function was not checking the error type in the `catch` block.
716
- This lead to not throwing the error with parsed data, but always throwing a parser error, where the correct error was `cause` in the `ErrorOptions`
717
-
718
- **BREAKING CHANGE:**
719
-
720
- If for some reason developers has catched the error and assumed the `cause` property would give the proper error data, this will no longer be the case.
721
-
722
- ```ts
723
- try {
724
- await jsonSelector(response);
725
- } catch (error) {
726
- if (error instanceof HttpJsonResponseError) {
727
- const { data, cause } = error;
728
- if (data) {
729
- console.error(
730
- "the request was not `ok`, see provided error data",
731
- data,
732
- );
733
- } else {
734
- console.error(
735
- "failed to parse data from response, see provided cause",
736
- cause,
737
- );
738
- }
739
- }
740
- }
741
- ```
742
-
743
- ```diff
744
- try {
745
- await jsonSelector(response);
746
- } catch (error) {
747
- if(error instanceof HttpJsonResponseError) {
748
- - const data = error.cause instanceof HttpJsonResponseError ? err.cause.data : null;
749
- + const data = error instanceof HttpJsonResponseError ? error.data : null;
750
- if(data) {
751
- console.error('the request was not `ok`, see provided error data', data);
752
- } else {
753
- console.error('failed to parse data from response, see provided cause', error.cause);
754
- }
755
- }
756
- }
757
- ```
758
-
759
- ## 5.2.3
760
-
761
- ### Patch Changes
762
-
763
- - Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
764
- - @equinor/fusion-framework-module@4.3.1
765
- - @equinor/fusion-framework-module-msal@3.1.1
766
-
767
- ## 5.2.2
768
-
769
- ### Patch Changes
770
-
771
- - [#2073](https://github.com/equinor/fusion-framework/pull/2073) [`fab2d22`](https://github.com/equinor/fusion-framework/commit/fab2d22f56772c02b1c1e5688cea1dd376edfcb3) Thanks [@eikeland](https://github.com/eikeland)! - Removing type module in package.json
772
-
773
- ## 5.2.1
774
-
775
- ### Patch Changes
776
-
777
- - [#2043](https://github.com/equinor/fusion-framework/pull/2043) [`4af517f`](https://github.com/equinor/fusion-framework/commit/4af517f107f960aa1dc7459451d99e2e83d350ee) Thanks [@odinr](https://github.com/odinr)! - Added test for http client, to check if configured operators are not altered
778
-
779
- - [#2043](https://github.com/equinor/fusion-framework/pull/2043) [`4af517f`](https://github.com/equinor/fusion-framework/commit/4af517f107f960aa1dc7459451d99e2e83d350ee) Thanks [@odinr](https://github.com/odinr)! - When adding operators to request and response handler to an http client instanstance, the values where added to the configured handlers permanently
780
-
781
- ```ts
782
- // create a new client from configuration
783
- const fooClient = provider.createClient("foo");
784
- fooClient.requestHandler.setHeader("x-foo", "bar");
785
-
786
- // generate a RequestInit object
787
- const fooRequest = await lastValueFrom(
788
- fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri }),
789
- );
790
-
791
- expect((fooRequest.headers as Headers)?.get("x-foo")).toBe("bar");
792
-
793
- // create a new client from the same configuration
794
- const barClient = provider.createClient("foo");
795
-
796
- // generate a RequestInit object
797
- const barRequest = await lastValueFrom(
798
- barClient.requestHandler.process({ path: "/api", uri: barClient.uri }),
799
- );
800
-
801
- // expect the request header to not been modified
802
- // FAILED
803
- expect((barRequest.headers as Headers)?.get("x-foo")).toBeUndefined();
804
- ```
805
-
806
- modified the `ProcessOperators` to accept operators on creation, which are clone to the instance.
807
-
808
- ```diff
809
- --- a/packages/modules/http/src/lib/client/client.ts
810
- +++ a/packages/modules/http/src/lib/client/client.ts
811
- constructor(
812
- public uri: string,
813
- options?: Partial<HttpClientCreateOptions<TRequest, TResponse>>,
814
- ) {
815
- - this.requestHandler = options?.requestHandler ?? new HttpRequestHandler<TRequest>();
816
- + this.requestHandler = new HttpRequestHandler<TRequest>(options?.requestHandler);
817
- - this.responseHandler = options?.responseHandler ?? new HttpResponseHandler<TResponse>();
818
- + this.responseHandler = new HttpResponseHandler<TResponse>(options?.responseHandler);
819
- this._init();
820
- }
821
-
822
- ```
823
-
824
- ## 5.2.0
825
-
826
- ### Minor Changes
827
-
828
- - [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
829
-
830
- ### Patch Changes
831
-
832
- - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
833
- - @equinor/fusion-framework-module@4.3.0
834
- - @equinor/fusion-framework-module-msal@3.1.0
835
-
836
- ## 5.1.6
837
-
838
- ### Patch Changes
839
-
840
- - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
841
- - @equinor/fusion-framework-module@4.2.7
842
- - @equinor/fusion-framework-module-msal@3.0.10
843
-
844
- ## 5.1.5
845
-
846
- ### Patch Changes
847
-
848
- - Updated dependencies [[`5eab8af`](https://github.com/equinor/fusion-framework/commit/5eab8afe3c3106cc67ad14ce4cbee6c7e4e8dfb1)]:
849
- - @equinor/fusion-framework-module-msal@3.0.9
850
-
851
- ## 5.1.4
852
-
853
- ### Patch Changes
854
-
855
- - [#1625](https://github.com/equinor/fusion-framework/pull/1625) [`1e4ba77`](https://github.com/equinor/fusion-framework/commit/1e4ba7707d3ce5cfd9c8d6673f760523aa47a45e) Thanks [@Gustav-Eikaas](https://github.com/Gustav-Eikaas)! - fix import from non specified export (moduleResolution: bundler)
856
-
857
- ## 5.1.3
858
-
859
- ### Patch Changes
860
-
861
- - [#1621](https://github.com/equinor/fusion-framework/pull/1621) [`0af3540`](https://github.com/equinor/fusion-framework/commit/0af3540340bac85a19ca3a8ec4e0ccd42b3090ee) Thanks [@odinr](https://github.com/odinr)! - **Improves error handling when processing json http response**
862
-
863
- In packages/modules/http/src/errors.ts:
864
- - The class HttpResponseError now has a generic parameter TResponse.
865
- - Added a static property Name to the class.
866
- - Added a new class HttpJsonResponseError which extends HttpResponseError and also has generic parameters TType and TResponse.
867
- - Added a static property Name to the class.
868
- - Added a public property data of type TType.
869
- - Modified the constructor to accept an optional data parameter.
870
-
871
- In packages/modules/http/src/lib/selectors/json-selector.ts:
872
- - Added an import statement for HttpJsonResponseError.
873
- - Modified the jsonSelector function to handle errors when parsing the response.
874
- - Added a try-catch block.
875
- - Changed the JSON parsing logic to store the parsed data in a variable data.
876
- - If the response is not OK, a HttpJsonResponseError is thrown with the appropriate error message, response object, and data property.
877
- - If there is an error parsing the response, a HttpJsonResponseError is thrown with the appropriate error message, response object, and cause property.
878
-
879
- ## 5.1.2
880
-
881
- ### Patch Changes
882
-
883
- - [#1595](https://github.com/equinor/fusion-framework/pull/1595) [`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125) Thanks [@Gustav-Eikaas](https://github.com/Gustav-Eikaas)! - support for module resolution NodeNext & Bundler
884
-
885
- - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
886
- - @equinor/fusion-framework-module@4.2.6
887
- - @equinor/fusion-framework-module-msal@3.0.8
888
-
889
- ## 5.1.1
890
-
891
- ### Patch Changes
892
-
893
- - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
894
-
895
- - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
896
- - @equinor/fusion-framework-module@4.2.5
897
- - @equinor/fusion-framework-module-msal@3.0.7
898
-
899
- ## 5.1.0
900
-
901
- ### Minor Changes
902
-
903
- - [#1242](https://github.com/equinor/fusion-framework/pull/1242) [`8e9e34a0`](https://github.com/equinor/fusion-framework/commit/8e9e34a06a6905d092ad8ca3f9330a3699da20fa) Thanks [@odinr](https://github.com/odinr)! - add method for executing blob requests
904
- - added selector for extracting blob from response
905
- - added function for fetching blob as stream or promise on the http client
906
-
907
- ```tsx
908
- const data = await client.blob("/person/photo");
909
- const url = URL.createObjectURL(blob);
910
- return <img src={url} />;
911
- ```
912
-
913
- ## 5.0.6
914
-
915
- ### Patch Changes
916
-
917
- - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
918
- - @equinor/fusion-framework-module@4.2.4
919
- - @equinor/fusion-framework-module-msal@3.0.6
920
-
921
- ## 5.0.5
922
-
923
- ### Patch Changes
924
-
925
- - [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
926
-
927
- conflicts of `@types/react` made random outcomes when using `yarn`
928
-
929
- this change should not affect consumer of the packages, but might conflict dependent on local package manager.
930
-
931
- - [#1145](https://github.com/equinor/fusion-framework/pull/1145) [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump rxjs from 7.5.7 to [7.8.1](https://github.com/ReactiveX/rxjs/blob/7.8.1/CHANGELOG.md)
932
-
933
- - [#1163](https://github.com/equinor/fusion-framework/pull/1163) [`52d98701`](https://github.com/equinor/fusion-framework/commit/52d98701627e93c7284c0b9a5bfd8dab1da43bd3) Thanks [@odinr](https://github.com/odinr)! - Append `Accecpt: application/json` to request headers
934
-
935
- when using the `json# Change Log or `json`function on the`HttpClient`add`Accecpt: application/json` to the request header
936
-
937
- - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
938
- - @equinor/fusion-framework-module@4.2.3
939
- - @equinor/fusion-framework-module-msal@3.0.5
940
-
941
- ## 5.0.4
942
-
943
- ### Patch Changes
944
-
945
- - [#946](https://github.com/equinor/fusion-framework/pull/946) [`5a160d88`](https://github.com/equinor/fusion-framework/commit/5a160d88981ddfe861d391cfefe10f54dda3d352) Thanks [@odinr](https://github.com/odinr)! - Build/update typescript to 5
946
-
947
- - Updated dependencies [[`5a160d88`](https://github.com/equinor/fusion-framework/commit/5a160d88981ddfe861d391cfefe10f54dda3d352)]:
948
- - @equinor/fusion-framework-module@4.2.1
949
- - @equinor/fusion-framework-module-msal@3.0.4
950
-
951
- ## 5.0.3
952
-
953
- ### Patch Changes
954
-
955
- - [#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**
956
- - align all versions of typescript
957
- - update types to build
958
- - 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
959
-
960
- - Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
961
- - @equinor/fusion-framework-module@4.2.0
962
- - @equinor/fusion-framework-module-msal@3.0.3
963
-
964
- All notable changes to this project will be documented in this file.
965
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
966
-
967
- ## 5.0.2 (2023-05-23)
968
-
969
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
970
-
971
- ## 5.0.1 (2023-05-05)
972
-
973
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
974
-
975
- ## 5.0.0 (2023-04-16)
976
-
977
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
978
-
979
- ## 4.0.2 (2023-03-22)
980
-
981
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
982
-
983
- ## [4.0.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@4.0.0...@equinor/fusion-framework-module-http@4.0.1) (2023-03-20)
984
-
985
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
986
-
987
- ## 4.0.0 (2023-02-22)
988
-
989
- ### ⚠ BREAKING CHANGES
990
-
991
- - **modules/http:** `IHttpClient.execute` is removed, most likely not used, too complex to maintain
992
-
993
- ### Bug Fixes
994
-
995
- - **modules/http:** fix typing for json requests ([459df80](https://github.com/equinor/fusion-framework/commit/459df80bfc79426ec6507db8f06d488b6a3d0f07))
996
-
997
- ## [3.0.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.2.3...@equinor/fusion-framework-module-http@3.0.0) (2023-01-27)
998
-
999
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1000
-
1001
- ## [3.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.2.3...@equinor/fusion-framework-module-http@3.0.0-alpha.0) (2023-01-26)
1002
-
1003
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1004
-
1005
- ## 2.2.3 (2023-01-26)
1006
-
1007
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1008
-
1009
- ## 2.2.2 (2023-01-17)
1010
-
1011
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1012
-
1013
- ## 2.2.1 (2022-12-12)
1014
-
1015
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1016
-
1017
- ## [2.2.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.1.8...@equinor/fusion-framework-module-http@2.2.0) (2022-12-08)
1018
-
1019
- ### Features
1020
-
1021
- - **http:** throw error when selector error ([dc0aa35](https://github.com/equinor/fusion-framework/commit/dc0aa35cbc44fb0503a9431ab728b81d8a3af290))
1022
-
1023
- ## 2.1.8 (2022-12-06)
1024
-
1025
- ### Bug Fixes
1026
-
1027
- - **module-http:** adding missing types on module-http iHttpClient ([ac6e81e](https://github.com/equinor/fusion-framework/commit/ac6e81e54d70b8a943466046fcbe86f6bd7c4c67))
1028
-
1029
- ## 2.1.7 (2022-12-01)
1030
-
1031
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1032
-
1033
- ## 2.1.6 (2022-12-01)
1034
-
1035
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1036
-
1037
- ## 2.1.5 (2022-11-18)
1038
-
1039
- ### Bug Fixes
1040
-
1041
- - **module-http:** add headers to json request ([8223394](https://github.com/equinor/fusion-framework/commit/8223394362a24663bf65442025f0b031aa37a910))
1042
-
1043
- ## 2.1.4 (2022-11-11)
1044
-
1045
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1046
-
1047
- ## 2.1.3 (2022-11-11)
1048
-
1049
- ### Bug Fixes
1050
-
1051
- - **module-auth:** make http module await auth ([18a0ed9](https://github.com/equinor/fusion-framework/commit/18a0ed947e128bf1cdc86aa45d31e73c1f8c4bbb))
1052
-
1053
- ## 2.1.2 (2022-11-03)
1054
-
1055
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1056
-
1057
- ## 2.1.1 (2022-11-02)
1058
-
1059
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1060
-
1061
- ## 2.1.0 (2022-11-01)
1062
-
1063
- ### Features
1064
-
1065
- - :necktie: remove try catch from json-selector ([fe5e2ea](https://github.com/equinor/fusion-framework/commit/fe5e2ea087cdee99403175e912eb09479b86414e))
1066
- - :sparkles: return undefined on status code 204 ([af1eea7](https://github.com/equinor/fusion-framework/commit/af1eea7a9ef539a44c3cab69904b4764f169caa6))
1067
-
1068
- ### Reverts
1069
-
1070
- - :rewind: revert changes in json-selector ([8c448e5](https://github.com/equinor/fusion-framework/commit/8c448e5c76fb20cbd908c95f2fbd9d8d0367aad1))
1071
-
1072
- ## 2.0.14 (2022-10-27)
1073
-
1074
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1075
-
1076
- ## 2.0.13 (2022-10-21)
1077
-
1078
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1079
-
1080
- ## [2.0.12](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.11...@equinor/fusion-framework-module-http@2.0.12) (2022-10-17)
1081
-
1082
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1083
-
1084
- ## 2.0.11 (2022-10-03)
1085
-
1086
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1087
-
1088
- ## 2.0.10 (2022-10-03)
1089
-
1090
- ### Bug Fixes
1091
-
1092
- - **module-http:** allow typing of fetch request ([de08783](https://github.com/equinor/fusion-framework/commit/de0878342d82249ffc7e1212230d0aa0e14d32cb))
1093
-
1094
- ## [2.0.9](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.8...@equinor/fusion-framework-module-http@2.0.9) (2022-09-29)
1095
-
1096
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1097
-
1098
- ## 2.0.8 (2022-09-27)
1099
-
1100
- ### Bug Fixes
1101
-
1102
- - update registering of configuration ([20942ce](https://github.com/equinor/fusion-framework/commit/20942ce1c7a853ea3b55c031a242646e378db8c9))
1103
-
1104
- ## 2.0.7 (2022-09-20)
1105
-
1106
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1107
-
1108
- ## [2.0.6](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.5...@equinor/fusion-framework-module-http@2.0.6) (2022-09-16)
1109
-
1110
- ### Bug Fixes
1111
-
1112
- - **module-http:** fix export ([06a490d](https://github.com/equinor/fusion-framework/commit/06a490d40e34d2074ac102ac4fcd458cadd3538a))
1113
- - **module-http:** improve hierarchy ([3603347](https://github.com/equinor/fusion-framework/commit/36033474991288983490f250726a551f7ce3dcbd))
1114
-
1115
- ## [2.0.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.4...@equinor/fusion-framework-module-http@2.0.5) (2022-09-14)
1116
-
1117
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1118
-
1119
- ## [2.0.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.3...@equinor/fusion-framework-module-http@2.0.4) (2022-09-13)
1120
-
1121
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1122
-
1123
- ## [2.0.3](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.2...@equinor/fusion-framework-module-http@2.0.3) (2022-09-13)
1124
-
1125
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1126
-
1127
- ## [2.0.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.1...@equinor/fusion-framework-module-http@2.0.2) (2022-09-13)
1128
-
1129
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1130
-
1131
- ## [2.0.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.1-next.1...@equinor/fusion-framework-module-http@2.0.1) (2022-09-12)
1132
-
1133
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1134
-
1135
- ## [2.0.1-next.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.1-next.0...@equinor/fusion-framework-module-http@2.0.1-next.1) (2022-09-12)
1136
-
1137
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1138
-
1139
- ## [2.0.1-next.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@2.0.0...@equinor/fusion-framework-module-http@2.0.1-next.0) (2022-09-12)
1140
-
1141
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1142
-
1143
- ## 2.0.0 (2022-09-12)
1144
-
1145
- ### Features
1146
-
1147
- - **module-http:** expose simple config ([94e4d6b](https://github.com/equinor/fusion-framework/commit/94e4d6bbb7fef010cd72e49242d68ed155592e11))
1148
-
1149
- ## [2.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@1.0.2...@equinor/fusion-framework-module-http@2.0.0-alpha.0) (2022-09-12)
1150
-
1151
- ### Features
1152
-
1153
- - **module-http:** expose simple config ([94e4d6b](https://github.com/equinor/fusion-framework/commit/94e4d6bbb7fef010cd72e49242d68ed155592e11))
1154
-
1155
- ## 1.0.2 (2022-09-05)
1156
-
1157
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1158
-
1159
- ## 1.0.1 (2022-09-05)
1160
-
1161
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1162
-
1163
- ## 1.0.0 (2022-08-29)
1164
-
1165
- ### ⚠ BREAKING CHANGES
1166
-
1167
- - rename fetch
1168
-
1169
- - fix(module-service-discovery): update http client consumer
1170
-
1171
- - build: update allowed branches
1172
-
1173
- - build: add conventional commit
1174
-
1175
- - build: use conventionalcommits
1176
-
1177
- - build(module-http): push major
1178
-
1179
- - build: update deps
1180
-
1181
- ### Features
1182
-
1183
- - rename fetch method ([#226](https://github.com/equinor/fusion-framework/issues/226)) ([f02df7c](https://github.com/equinor/fusion-framework/commit/f02df7cdd2b9098b0da49c5ea56ac3b6a17e9e32))
1184
-
1185
- ## 0.6.2 (2022-08-19)
1186
-
1187
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1188
-
1189
- ## [0.6.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.6.0...@equinor/fusion-framework-module-http@0.6.1) (2022-08-15)
1190
-
1191
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1192
-
1193
- # [0.6.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.5.0...@equinor/fusion-framework-module-http@0.6.0) (2022-08-11)
1194
-
1195
- - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
1196
-
1197
- ### BREAKING CHANGES
1198
-
1199
- - module.initialize now has object as arg
1200
-
1201
- # 0.5.0 (2022-08-08)
1202
-
1203
- ### Bug Fixes
1204
-
1205
- - **module-http:** expose FetchRequest ([3d14ead](https://github.com/equinor/fusion-framework/commit/3d14ead0d78b36db091c6645ff1b69101e1f911f))
1206
-
1207
- ### Features
1208
-
1209
- - **module-service-discovery:** resolve service to config ([3fa088d](https://github.com/equinor/fusion-framework/commit/3fa088d2ced8136447df6949928f1af9fc83407a))
1210
-
1211
- # [0.4.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.10...@equinor/fusion-framework-module-http@0.4.0) (2022-08-04)
1212
-
1213
- - feat(module)!: allow requireing module instnce (#190) ([3a7e67e](https://github.com/equinor/fusion-framework/commit/3a7e67e9accb5185100325c92d5850a44626e498)), closes [#190](https://github.com/equinor/fusion-framework/issues/190)
1214
-
1215
- ### BREAKING CHANGES
1216
-
1217
- - `deps` prop is remove from module object, use `await require('MODULE')`;
1218
-
1219
- - feat(module)!: allow requireing module instnce
1220
-
1221
- when module initiates it should be allowed to await an required module.
1222
-
1223
- - add method for awaiting required module
1224
- - add typing for config in initialize fase
1225
-
1226
- - update service discovery to await http module
1227
- - add service discovery client
1228
- - allow configuration of service discovery client
1229
-
1230
- * `deps` prop is remove from module object, use `await require('MODULE')`;
1231
-
1232
- * fix(module-http): add default interface for HttpClientOptions
1233
-
1234
- ## [0.3.10](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.9...@equinor/fusion-framework-module-http@0.3.10) (2022-08-01)
1235
-
1236
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1237
-
1238
- ## 0.3.9 (2022-08-01)
1239
-
1240
- ### Bug Fixes
1241
-
1242
- - change typo of exports ([b049503](https://github.com/equinor/fusion-framework/commit/b049503511fb1b37b920b00aed1468ed8385a67e))
1243
-
1244
- ## [0.3.8](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.7...@equinor/fusion-framework-module-http@0.3.8) (2022-07-01)
1245
-
1246
- ### Bug Fixes
1247
-
1248
- - **module-http:** fix selector of client ([dcc4774](https://github.com/equinor/fusion-framework/commit/dcc477489b51aa988a97494ff553eee34404469d))
1249
-
1250
- ## [0.3.7](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.6...@equinor/fusion-framework-module-http@0.3.7) (2022-07-01)
1251
-
1252
- ### Bug Fixes
1253
-
1254
- - **module-http:** make rxjs dependent ([a20286f](https://github.com/equinor/fusion-framework/commit/a20286f950ff10c84605c025354cb05280c7455a))
1255
-
1256
- ## [0.3.6](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.5...@equinor/fusion-framework-module-http@0.3.6) (2022-06-30)
1257
-
1258
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1259
-
1260
- ## [0.3.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.4...@equinor/fusion-framework-module-http@0.3.5) (2022-06-30)
1261
-
1262
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1263
-
1264
- ## [0.3.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.3...@equinor/fusion-framework-module-http@0.3.4) (2022-06-28)
1265
-
1266
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1267
-
1268
- ## [0.3.3](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.2...@equinor/fusion-framework-module-http@0.3.3) (2022-06-28)
1269
-
1270
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1271
-
1272
- ## [0.3.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-http@0.3.1...@equinor/fusion-framework-module-http@0.3.2) (2022-06-28)
1273
-
1274
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1275
-
1276
- ## 0.3.1 (2022-06-28)
1277
-
1278
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1279
-
1280
- # 0.3.0 (2022-06-14)
1281
-
1282
- ### Features
1283
-
1284
- - **module-http:** expose response processor ([e4551c5](https://github.com/equinor/fusion-framework/commit/e4551c549654ef25f33eef72ebc2fcc02ab552a2))
1285
-
1286
- ## 0.2.2 (2022-06-13)
1287
-
1288
- ### Bug Fixes
1289
-
1290
- - **module-http:** reutrn fallb ack config ([8ece469](https://github.com/equinor/fusion-framework/commit/8ece469e99bd64c10a7697d49fdcc5d396737ac8))
1291
-
1292
- ## 0.2.1 (2022-06-10)
1293
-
1294
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1295
-
1296
- # 0.2.0 (2022-05-31)
1297
-
1298
- ### Features
1299
-
1300
- - **module-http:** add json support ([a6adbbb](https://github.com/equinor/fusion-framework/commit/a6adbbb36ca1391f8813be6141ef963031098764))
1301
-
1302
- ## 0.1.1 (2022-02-09)
1303
-
1304
- **Note:** Version bump only for package @equinor/fusion-framework-module-http
1305
-
1306
- # 0.1.0 (2022-02-07)
1307
-
1308
- ### Bug Fixes
1309
-
1310
- - expose http client interface ([8660822](https://github.com/equinor/fusion-framework/commit/8660822b669e549bd454aa8a6a0adcaeb5e7917f))
1311
- - **module-http:** allow defaultScopes ([d476de9](https://github.com/equinor/fusion-framework/commit/d476de99e6289e60684f02bcd7b669e23f3789bb))
1312
- - **module-http:** fix check if config when creating client ([950ebc1](https://github.com/equinor/fusion-framework/commit/950ebc18f8f35bb7e6f97d6a98bd91d87616a94e))
1313
- - **module-http:** fix merge of process operators ([5a1d6d2](https://github.com/equinor/fusion-framework/commit/5a1d6d2942475c61c994f4ec26812c949cabbdf1))
1314
- - **module-http:** fix relative url resolve ([0d8c311](https://github.com/equinor/fusion-framework/commit/0d8c311c66b52eec22d465e0db57fa003506ab0c))
1315
-
1316
- ### Features
1317
-
1318
- - add module for http clients ([7b02db7](https://github.com/equinor/fusion-framework/commit/7b02db7c2e34b97659bc72af7b5b31307cf55e5f))
1319
- - http client base uri ([233cabf](https://github.com/equinor/fusion-framework/commit/233cabfea0f2b07955670e553472427ec27a3aa0))
1320
- - **module-http:** add check for registered client keys ([93b42f8](https://github.com/equinor/fusion-framework/commit/93b42f88ad092e24fe4f1a216394893128d35734))
1321
- - **module-http:** allow selector for http requests ([ea300c8](https://github.com/equinor/fusion-framework/commit/ea300c8ad5555e4514b35ac43a4c8494461afd91))