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