@equinor/fusion-framework-module-http 7.0.6-next.0 → 7.0.7-msal-v5.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,14 +1,22 @@
1
1
  # Change Log
2
2
 
3
- ## 7.0.6-next.0
3
+ ## 7.0.7-msal-v5.0
4
4
 
5
5
  ### Patch Changes
6
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
7
+ - Updated dependencies [[`f373ec5`](https://github.com/equinor/fusion-framework/commit/f373ec5573d70a1b23e2b6261c831d3b23a8cf98)]:
8
+ - @equinor/fusion-framework-module-msal@7.0.0-msal-v5.0
8
9
 
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
10
+ ## 7.0.6
11
+
12
+ ### Patch Changes
13
+
14
+ - [#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
15
+
16
+ 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.
17
+
18
+ - Updated dependencies [[`f70d66f`](https://github.com/equinor/fusion-framework/commit/f70d66f1bc826e614140adb2c6ee052f98e3b3da)]:
19
+ - @equinor/fusion-framework-module-msal@6.0.5
12
20
 
13
21
  ## 7.0.5
14
22
 
@@ -59,6 +67,7 @@
59
67
  ### Patch Changes
60
68
 
61
69
  - [#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
70
+
62
71
  - **v4.1.10**: Fixed shape caching issue (#5263) improving validation performance for complex schemas
63
72
  - **v4.1.11**: Maintenance release with general improvements
64
73
 
@@ -77,6 +86,7 @@
77
86
  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.
78
87
 
79
88
  Key changes in source code:
89
+
80
90
  - Updated ZodError `.errors` to `.issues` property in capitalize-request-method operator
81
91
  - Replaced `z.custom()` with `z.string().refine()` for better v4 compatibility in request method casing validation
82
92
  - Simplified error message configuration in request method verb validation
@@ -85,6 +95,7 @@
85
95
  Breaking changes: Error handling structure has changed to use new zod v4 error format.
86
96
 
87
97
  Links:
98
+
88
99
  - [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
89
100
  - [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
90
101
 
@@ -100,6 +111,7 @@
100
111
  - [#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.
101
112
 
102
113
  ## Breaking Changes
114
+
103
115
  - **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
104
116
  - **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
105
117
  - **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
@@ -107,15 +119,18 @@
107
119
  - **TypeScript Support**: Enhanced TypeScript integration and type definitions
108
120
 
109
121
  ## Security Updates
122
+
110
123
  - CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
111
124
  - CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
112
125
 
113
126
  ## Migration Notes
127
+
114
128
  - Test snapshots may need regeneration due to quote format changes
115
129
  - Some test configurations might need updates for new TypeScript support
116
130
  - Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
117
131
 
118
132
  ## Links
133
+
119
134
  - [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
120
135
  - [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
121
136
 
@@ -127,6 +142,7 @@
127
142
  ### Patch Changes
128
143
 
129
144
  - [#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
145
+
130
146
  - The HTTP module now uses the correct method `acquireAccessToken` from the auth provider to retrieve the access token for requests with scopes.
131
147
  - This fixes compatibility with the new MSAL node module interface, which no longer exposes `acquireToken` but instead provides `acquireAccessToken` for token retrieval.
132
148
  - Ensures the Authorization header is set correctly for authenticated HTTP requests.
@@ -144,6 +160,7 @@
144
160
  ### Patch Changes
145
161
 
146
162
  - [#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
163
+
147
164
  - Updated package.json typesVersions.
148
165
  - Ensures backward compatibility with older node versions.
149
166
  - Ensured consistency with workspace and repository configuration.
@@ -174,6 +191,7 @@
174
191
  ### Minor Changes
175
192
 
176
193
  - [#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
194
+
177
195
  - Introduced support for Server-Sent Events (SSE) in the HTTP module.
178
196
  - Added `sse# Change Log method to `HttpClient` for subscribing to SSE streams.
179
197
  - Added `sseMap` operator for handling SSE in RxJS pipelines.
@@ -181,6 +199,7 @@
181
199
  - Enhanced error handling with `ServerSentEventResponseError`.
182
200
 
183
201
  ### Documentation
202
+
184
203
  - Updated README with examples and usage details for SSE support.
185
204
 
186
205
  ### Patch Changes
@@ -243,6 +262,7 @@
243
262
  ### Minor Changes
244
263
 
245
264
  - [#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.
265
+
246
266
  - Introduced `capitalizeRequestMethodOperator` which processes an HTTP request object and converts its method to uppercase.
247
267
  - Logs a warning if the HTTP method was converted, providing information about the change and a reference to RFC 7231 Section 4.1.
248
268
 
@@ -263,7 +283,7 @@
263
283
  const httpClient = new HttpClient();
264
284
  httpClient.requestHandler.add(
265
285
  "capatalize-method",
266
- capitalizeRequestMethodOperator(),
286
+ capitalizeRequestMethodOperator()
267
287
  );
268
288
 
269
289
  // transforms `method` to uppercase and logs a warning.
@@ -381,7 +401,7 @@
381
401
  // Add the request validation operator to the HttpClient.
382
402
  httpClient.requestHandler.add(
383
403
  "validate-init",
384
- requestValidationOperator({ parse: true }),
404
+ requestValidationOperator({ parse: true })
385
405
  );
386
406
 
387
407
  // will throw an error because of invalid method.
@@ -439,6 +459,7 @@
439
459
  ### Patch Changes
440
460
 
441
461
  - [#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.
462
+
442
463
  - added introduction to http module
443
464
  - added concepts section which highlights the key concepts of http module
444
465
  - added sequence diagram for http request execution
@@ -452,12 +473,14 @@
452
473
  - [#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
453
474
 
454
475
  - [#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`.
476
+
455
477
  - Updated the `FetchRequestInit` type to include a new property `selector` of type `ResponseSelector<TReturn, TResponse>`, which allows specifying a response selector function.
456
478
  - Updated the blob-selector and json-selector functions to use the new `ResponseSelector` type.
457
479
 
458
480
  - [#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.
459
481
 
460
482
  Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
483
+
461
484
  1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
462
485
  2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
463
486
  3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
@@ -506,6 +529,7 @@
506
529
  ### Major Changes
507
530
 
508
531
  - [#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.
532
+
509
533
  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.
510
534
  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.
511
535
  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.
@@ -528,7 +552,7 @@
528
552
 
529
553
  ```typescript
530
554
  const customBlobSelector = async (
531
- response: Response,
555
+ response: Response
532
556
  ): Promise<{ filename: string; blob: Blob }> => {
533
557
  // Extract filename and blob from the response
534
558
  const { filename, blob } = await blobSelector(response);
@@ -572,12 +596,12 @@
572
596
  if (data) {
573
597
  console.error(
574
598
  "the request was not `ok`, see provided error data",
575
- data,
599
+ data
576
600
  );
577
601
  } else {
578
602
  console.error(
579
603
  "failed to parse data from response, see provided cause",
580
- cause,
604
+ cause
581
605
  );
582
606
  }
583
607
  }
@@ -629,7 +653,7 @@
629
653
 
630
654
  // generate a RequestInit object
631
655
  const fooRequest = await lastValueFrom(
632
- fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri }),
656
+ fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri })
633
657
  );
634
658
 
635
659
  expect((fooRequest.headers as Headers)?.get("x-foo")).toBe("bar");
@@ -639,7 +663,7 @@
639
663
 
640
664
  // generate a RequestInit object
641
665
  const barRequest = await lastValueFrom(
642
- barClient.requestHandler.process({ path: "/api", uri: barClient.uri }),
666
+ barClient.requestHandler.process({ path: "/api", uri: barClient.uri })
643
667
  );
644
668
 
645
669
  // expect the request header to not been modified
@@ -705,6 +729,7 @@
705
729
  - [#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**
706
730
 
707
731
  In packages/modules/http/src/errors.ts:
732
+
708
733
  - The class HttpResponseError now has a generic parameter TResponse.
709
734
  - Added a static property Name to the class.
710
735
  - Added a new class HttpJsonResponseError which extends HttpResponseError and also has generic parameters TType and TResponse.
@@ -713,6 +738,7 @@
713
738
  - Modified the constructor to accept an optional data parameter.
714
739
 
715
740
  In packages/modules/http/src/lib/selectors/json-selector.ts:
741
+
716
742
  - Added an import statement for HttpJsonResponseError.
717
743
  - Modified the jsonSelector function to handle errors when parsing the response.
718
744
  - Added a try-catch block.
@@ -745,6 +771,7 @@
745
771
  ### Minor Changes
746
772
 
747
773
  - [#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
774
+
748
775
  - added selector for extracting blob from response
749
776
  - added function for fetching blob as stream or promise on the http client
750
777
 
@@ -797,6 +824,7 @@
797
824
  ### Patch Changes
798
825
 
799
826
  - [#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**
827
+
800
828
  - align all versions of typescript
801
829
  - update types to build
802
830
  - 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 +1 @@
1
- {"version":3,"file":"configurator.js","sourceRoot":"","sources":["../../src/configurator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAwHzB,kBAAkB;AAClB,MAAM,OAAO,sBAAsB;IAGvB,QAAQ,GAA+C,EAAE,CAAC;IAEpE,4CAA4C;IAC5C,IAAW,OAAO;QAChB,OAAO,EAA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AC;IAEpE,4CAA4C;IAC5C,IAAW,OAAO;QAChB,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;IAED,iDAAiD;IACxC,qBAAqB,CAAiC;IAE/D,oEAAoE;IAC3D,yBAAyB,GAAG,IAAI,kBAAkB,CAAqC;QAC9F,2CAA2C;QAC3C,mBAAmB,EAAE,+BAA+B,EAAE;QACtD,8BAA8B;QAC9B,oBAAoB,EAAE,yBAAyB,EAAE;KAClD,CAAC,CAAC;IAEH;;;OAGG;IACH,YAAY,MAAsC;QAChD,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAAC;IACtC,CAAC;IAED,kBAAkB;IAClB,SAAS,CAAC,IAAY;QACpB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,kBAAkB;IAClB,eAAe,CACb,IAAY,EACZ,IAAsE;QAEtE,MAAM,KAAK,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAE,OAAO,EAAE,IAAI,EAA2B,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5F,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG;YACpB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;YACtB,GAAI,OAAiD;SACtD,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,eAAe,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '7.0.6-next.0';
2
+ export const version = '7.0.7-msal-v5.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,cAAc,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC"}