@equinor/fusion-framework-module-http 7.0.5 → 7.0.6-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.0.6-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b) Thanks [@odinr](https://github.com/odinr)! - relase next
8
+
9
+ - Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b)]:
10
+ - @equinor/fusion-framework-module@5.0.6-next.0
11
+ - @equinor/fusion-framework-module-msal@7.0.0-next.0
12
+
3
13
  ## 7.0.5
4
14
 
5
15
  ### Patch Changes
@@ -49,7 +59,6 @@
49
59
  ### Patch Changes
50
60
 
51
61
  - [#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
52
-
53
62
  - **v4.1.10**: Fixed shape caching issue (#5263) improving validation performance for complex schemas
54
63
  - **v4.1.11**: Maintenance release with general improvements
55
64
 
@@ -68,7 +77,6 @@
68
77
  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.
69
78
 
70
79
  Key changes in source code:
71
-
72
80
  - Updated ZodError `.errors` to `.issues` property in capitalize-request-method operator
73
81
  - Replaced `z.custom()` with `z.string().refine()` for better v4 compatibility in request method casing validation
74
82
  - Simplified error message configuration in request method verb validation
@@ -77,7 +85,6 @@
77
85
  Breaking changes: Error handling structure has changed to use new zod v4 error format.
78
86
 
79
87
  Links:
80
-
81
88
  - [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
82
89
  - [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
83
90
 
@@ -93,7 +100,6 @@
93
100
  - [#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.
94
101
 
95
102
  ## Breaking Changes
96
-
97
103
  - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
98
104
  - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
99
105
  - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
@@ -101,18 +107,15 @@
101
107
  - **TypeScript Support**: Enhanced TypeScript integration and type definitions
102
108
 
103
109
  ## Security Updates
104
-
105
110
  - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
106
111
  - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
107
112
 
108
113
  ## Migration Notes
109
-
110
114
  - Test snapshots may need regeneration due to quote format changes
111
115
  - Some test configurations might need updates for new TypeScript support
112
116
  - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
113
117
 
114
118
  ## Links
115
-
116
119
  - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
117
120
  - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
118
121
 
@@ -124,7 +127,6 @@
124
127
  ### Patch Changes
125
128
 
126
129
  - [#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
127
-
128
130
  - The HTTP module now uses the correct method `acquireAccessToken` from the auth provider to retrieve the access token for requests with scopes.
129
131
  - This fixes compatibility with the new MSAL node module interface, which no longer exposes `acquireToken` but instead provides `acquireAccessToken` for token retrieval.
130
132
  - Ensures the Authorization header is set correctly for authenticated HTTP requests.
@@ -142,7 +144,6 @@
142
144
  ### Patch Changes
143
145
 
144
146
  - [#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
145
-
146
147
  - Updated package.json typesVersions.
147
148
  - Ensures backward compatibility with older node versions.
148
149
  - Ensured consistency with workspace and repository configuration.
@@ -173,7 +174,6 @@
173
174
  ### Minor Changes
174
175
 
175
176
  - [#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
176
-
177
177
  - Introduced support for Server-Sent Events (SSE) in the HTTP module.
178
178
  - Added `sse# Change Log method to `HttpClient` for subscribing to SSE streams.
179
179
  - Added `sseMap` operator for handling SSE in RxJS pipelines.
@@ -181,7 +181,6 @@
181
181
  - Enhanced error handling with `ServerSentEventResponseError`.
182
182
 
183
183
  ### Documentation
184
-
185
184
  - Updated README with examples and usage details for SSE support.
186
185
 
187
186
  ### Patch Changes
@@ -244,7 +243,6 @@
244
243
  ### Minor Changes
245
244
 
246
245
  - [#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.
247
-
248
246
  - Introduced `capitalizeRequestMethodOperator` which processes an HTTP request object and converts its method to uppercase.
249
247
  - Logs a warning if the HTTP method was converted, providing information about the change and a reference to RFC 7231 Section 4.1.
250
248
 
@@ -265,7 +263,7 @@
265
263
  const httpClient = new HttpClient();
266
264
  httpClient.requestHandler.add(
267
265
  "capatalize-method",
268
- capitalizeRequestMethodOperator()
266
+ capitalizeRequestMethodOperator(),
269
267
  );
270
268
 
271
269
  // transforms `method` to uppercase and logs a warning.
@@ -383,7 +381,7 @@
383
381
  // Add the request validation operator to the HttpClient.
384
382
  httpClient.requestHandler.add(
385
383
  "validate-init",
386
- requestValidationOperator({ parse: true })
384
+ requestValidationOperator({ parse: true }),
387
385
  );
388
386
 
389
387
  // will throw an error because of invalid method.
@@ -441,7 +439,6 @@
441
439
  ### Patch Changes
442
440
 
443
441
  - [#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.
444
-
445
442
  - added introduction to http module
446
443
  - added concepts section which highlights the key concepts of http module
447
444
  - added sequence diagram for http request execution
@@ -455,14 +452,12 @@
455
452
  - [#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
456
453
 
457
454
  - [#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`.
458
-
459
455
  - Updated the `FetchRequestInit` type to include a new property `selector` of type `ResponseSelector<TReturn, TResponse>`, which allows specifying a response selector function.
460
456
  - Updated the blob-selector and json-selector functions to use the new `ResponseSelector` type.
461
457
 
462
458
  - [#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.
463
459
 
464
460
  Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
465
-
466
461
  1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
467
462
  2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
468
463
  3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
@@ -511,7 +506,6 @@
511
506
  ### Major Changes
512
507
 
513
508
  - [#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.
514
-
515
509
  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.
516
510
  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.
517
511
  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.
@@ -534,7 +528,7 @@
534
528
 
535
529
  ```typescript
536
530
  const customBlobSelector = async (
537
- response: Response
531
+ response: Response,
538
532
  ): Promise<{ filename: string; blob: Blob }> => {
539
533
  // Extract filename and blob from the response
540
534
  const { filename, blob } = await blobSelector(response);
@@ -578,12 +572,12 @@
578
572
  if (data) {
579
573
  console.error(
580
574
  "the request was not `ok`, see provided error data",
581
- data
575
+ data,
582
576
  );
583
577
  } else {
584
578
  console.error(
585
579
  "failed to parse data from response, see provided cause",
586
- cause
580
+ cause,
587
581
  );
588
582
  }
589
583
  }
@@ -635,7 +629,7 @@
635
629
 
636
630
  // generate a RequestInit object
637
631
  const fooRequest = await lastValueFrom(
638
- fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri })
632
+ fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri }),
639
633
  );
640
634
 
641
635
  expect((fooRequest.headers as Headers)?.get("x-foo")).toBe("bar");
@@ -645,7 +639,7 @@
645
639
 
646
640
  // generate a RequestInit object
647
641
  const barRequest = await lastValueFrom(
648
- barClient.requestHandler.process({ path: "/api", uri: barClient.uri })
642
+ barClient.requestHandler.process({ path: "/api", uri: barClient.uri }),
649
643
  );
650
644
 
651
645
  // expect the request header to not been modified
@@ -711,7 +705,6 @@
711
705
  - [#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**
712
706
 
713
707
  In packages/modules/http/src/errors.ts:
714
-
715
708
  - The class HttpResponseError now has a generic parameter TResponse.
716
709
  - Added a static property Name to the class.
717
710
  - Added a new class HttpJsonResponseError which extends HttpResponseError and also has generic parameters TType and TResponse.
@@ -720,7 +713,6 @@
720
713
  - Modified the constructor to accept an optional data parameter.
721
714
 
722
715
  In packages/modules/http/src/lib/selectors/json-selector.ts:
723
-
724
716
  - Added an import statement for HttpJsonResponseError.
725
717
  - Modified the jsonSelector function to handle errors when parsing the response.
726
718
  - Added a try-catch block.
@@ -753,7 +745,6 @@
753
745
  ### Minor Changes
754
746
 
755
747
  - [#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
756
-
757
748
  - added selector for extracting blob from response
758
749
  - added function for fetching blob as stream or promise on the http client
759
750
 
@@ -806,7 +797,6 @@
806
797
  ### Patch Changes
807
798
 
808
799
  - [#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**
809
-
810
800
  - align all versions of typescript
811
801
  - update types to build
812
802
  - 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
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '7.0.5';
2
+ export const version = '7.0.6-next.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}