@equinor/fusion-framework-module-http 7.0.6-cli-search-index.0 → 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 +12 -32
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 7.0.6-
|
|
3
|
+
## 7.0.6-next.0
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
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
8
|
|
|
9
|
-
- Updated dependencies [[`
|
|
10
|
-
- @equinor/fusion-framework-module@5.0.6-
|
|
11
|
-
- @equinor/fusion-framework-module-msal@
|
|
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
12
|
|
|
13
13
|
## 7.0.5
|
|
14
14
|
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
### Patch Changes
|
|
60
60
|
|
|
61
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
|
|
62
|
-
|
|
63
62
|
- **v4.1.10**: Fixed shape caching issue (#5263) improving validation performance for complex schemas
|
|
64
63
|
- **v4.1.11**: Maintenance release with general improvements
|
|
65
64
|
|
|
@@ -78,7 +77,6 @@
|
|
|
78
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.
|
|
79
78
|
|
|
80
79
|
Key changes in source code:
|
|
81
|
-
|
|
82
80
|
- Updated ZodError `.errors` to `.issues` property in capitalize-request-method operator
|
|
83
81
|
- Replaced `z.custom()` with `z.string().refine()` for better v4 compatibility in request method casing validation
|
|
84
82
|
- Simplified error message configuration in request method verb validation
|
|
@@ -87,7 +85,6 @@
|
|
|
87
85
|
Breaking changes: Error handling structure has changed to use new zod v4 error format.
|
|
88
86
|
|
|
89
87
|
Links:
|
|
90
|
-
|
|
91
88
|
- [Zod v4 Migration Guide](https://github.com/colinhacks/zod/releases/tag/v4.0.0)
|
|
92
89
|
- [Zod v4.1.8 Release Notes](https://github.com/colinhacks/zod/releases/tag/v4.1.8)
|
|
93
90
|
|
|
@@ -103,7 +100,6 @@
|
|
|
103
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.
|
|
104
101
|
|
|
105
102
|
## Breaking Changes
|
|
106
|
-
|
|
107
103
|
- **Node.js Requirements**: Requires Node.js 18+ (already satisfied)
|
|
108
104
|
- **Vite Compatibility**: Updated to work with Vite 7.x (already using Vite 7.1.5)
|
|
109
105
|
- **Snapshot Format**: Snapshots now use backtick quotes (\`) instead of single quotes
|
|
@@ -111,18 +107,15 @@
|
|
|
111
107
|
- **TypeScript Support**: Enhanced TypeScript integration and type definitions
|
|
112
108
|
|
|
113
109
|
## Security Updates
|
|
114
|
-
|
|
115
110
|
- CVE-2025-24963: Browser mode serves arbitrary files (fixed in 2.1.9)
|
|
116
111
|
- CVE-2025-24964: Remote Code Execution vulnerability (fixed in 2.1.9)
|
|
117
112
|
|
|
118
113
|
## Migration Notes
|
|
119
|
-
|
|
120
114
|
- Test snapshots may need regeneration due to quote format changes
|
|
121
115
|
- Some test configurations might need updates for new TypeScript support
|
|
122
116
|
- Peer dependency warnings for @vitest/coverage-v8 are expected and safe to ignore
|
|
123
117
|
|
|
124
118
|
## Links
|
|
125
|
-
|
|
126
119
|
- [Vitest 3.0 Migration Guide](https://vitest.dev/guide/migration)
|
|
127
120
|
- [Vitest 3.2.4 Release Notes](https://github.com/vitest-dev/vitest/releases/tag/v3.2.4)
|
|
128
121
|
|
|
@@ -134,7 +127,6 @@
|
|
|
134
127
|
### Patch Changes
|
|
135
128
|
|
|
136
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
|
|
137
|
-
|
|
138
130
|
- The HTTP module now uses the correct method `acquireAccessToken` from the auth provider to retrieve the access token for requests with scopes.
|
|
139
131
|
- This fixes compatibility with the new MSAL node module interface, which no longer exposes `acquireToken` but instead provides `acquireAccessToken` for token retrieval.
|
|
140
132
|
- Ensures the Authorization header is set correctly for authenticated HTTP requests.
|
|
@@ -152,7 +144,6 @@
|
|
|
152
144
|
### Patch Changes
|
|
153
145
|
|
|
154
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
|
|
155
|
-
|
|
156
147
|
- Updated package.json typesVersions.
|
|
157
148
|
- Ensures backward compatibility with older node versions.
|
|
158
149
|
- Ensured consistency with workspace and repository configuration.
|
|
@@ -183,7 +174,6 @@
|
|
|
183
174
|
### Minor Changes
|
|
184
175
|
|
|
185
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
|
|
186
|
-
|
|
187
177
|
- Introduced support for Server-Sent Events (SSE) in the HTTP module.
|
|
188
178
|
- Added `sse# Change Log method to `HttpClient` for subscribing to SSE streams.
|
|
189
179
|
- Added `sseMap` operator for handling SSE in RxJS pipelines.
|
|
@@ -191,7 +181,6 @@
|
|
|
191
181
|
- Enhanced error handling with `ServerSentEventResponseError`.
|
|
192
182
|
|
|
193
183
|
### Documentation
|
|
194
|
-
|
|
195
184
|
- Updated README with examples and usage details for SSE support.
|
|
196
185
|
|
|
197
186
|
### Patch Changes
|
|
@@ -254,7 +243,6 @@
|
|
|
254
243
|
### Minor Changes
|
|
255
244
|
|
|
256
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.
|
|
257
|
-
|
|
258
246
|
- Introduced `capitalizeRequestMethodOperator` which processes an HTTP request object and converts its method to uppercase.
|
|
259
247
|
- Logs a warning if the HTTP method was converted, providing information about the change and a reference to RFC 7231 Section 4.1.
|
|
260
248
|
|
|
@@ -275,7 +263,7 @@
|
|
|
275
263
|
const httpClient = new HttpClient();
|
|
276
264
|
httpClient.requestHandler.add(
|
|
277
265
|
"capatalize-method",
|
|
278
|
-
capitalizeRequestMethodOperator()
|
|
266
|
+
capitalizeRequestMethodOperator(),
|
|
279
267
|
);
|
|
280
268
|
|
|
281
269
|
// transforms `method` to uppercase and logs a warning.
|
|
@@ -393,7 +381,7 @@
|
|
|
393
381
|
// Add the request validation operator to the HttpClient.
|
|
394
382
|
httpClient.requestHandler.add(
|
|
395
383
|
"validate-init",
|
|
396
|
-
requestValidationOperator({ parse: true })
|
|
384
|
+
requestValidationOperator({ parse: true }),
|
|
397
385
|
);
|
|
398
386
|
|
|
399
387
|
// will throw an error because of invalid method.
|
|
@@ -451,7 +439,6 @@
|
|
|
451
439
|
### Patch Changes
|
|
452
440
|
|
|
453
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.
|
|
454
|
-
|
|
455
442
|
- added introduction to http module
|
|
456
443
|
- added concepts section which highlights the key concepts of http module
|
|
457
444
|
- added sequence diagram for http request execution
|
|
@@ -465,14 +452,12 @@
|
|
|
465
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
|
|
466
453
|
|
|
467
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`.
|
|
468
|
-
|
|
469
455
|
- Updated the `FetchRequestInit` type to include a new property `selector` of type `ResponseSelector<TReturn, TResponse>`, which allows specifying a response selector function.
|
|
470
456
|
- Updated the blob-selector and json-selector functions to use the new `ResponseSelector` type.
|
|
471
457
|
|
|
472
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.
|
|
473
459
|
|
|
474
460
|
Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
|
|
475
|
-
|
|
476
461
|
1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
|
|
477
462
|
2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
|
|
478
463
|
3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
|
|
@@ -521,7 +506,6 @@
|
|
|
521
506
|
### Major Changes
|
|
522
507
|
|
|
523
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.
|
|
524
|
-
|
|
525
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.
|
|
526
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.
|
|
527
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.
|
|
@@ -544,7 +528,7 @@
|
|
|
544
528
|
|
|
545
529
|
```typescript
|
|
546
530
|
const customBlobSelector = async (
|
|
547
|
-
response: Response
|
|
531
|
+
response: Response,
|
|
548
532
|
): Promise<{ filename: string; blob: Blob }> => {
|
|
549
533
|
// Extract filename and blob from the response
|
|
550
534
|
const { filename, blob } = await blobSelector(response);
|
|
@@ -588,12 +572,12 @@
|
|
|
588
572
|
if (data) {
|
|
589
573
|
console.error(
|
|
590
574
|
"the request was not `ok`, see provided error data",
|
|
591
|
-
data
|
|
575
|
+
data,
|
|
592
576
|
);
|
|
593
577
|
} else {
|
|
594
578
|
console.error(
|
|
595
579
|
"failed to parse data from response, see provided cause",
|
|
596
|
-
cause
|
|
580
|
+
cause,
|
|
597
581
|
);
|
|
598
582
|
}
|
|
599
583
|
}
|
|
@@ -645,7 +629,7 @@
|
|
|
645
629
|
|
|
646
630
|
// generate a RequestInit object
|
|
647
631
|
const fooRequest = await lastValueFrom(
|
|
648
|
-
fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri })
|
|
632
|
+
fooClient.requestHandler.process({ path: "/api", uri: fooClient.uri }),
|
|
649
633
|
);
|
|
650
634
|
|
|
651
635
|
expect((fooRequest.headers as Headers)?.get("x-foo")).toBe("bar");
|
|
@@ -655,7 +639,7 @@
|
|
|
655
639
|
|
|
656
640
|
// generate a RequestInit object
|
|
657
641
|
const barRequest = await lastValueFrom(
|
|
658
|
-
barClient.requestHandler.process({ path: "/api", uri: barClient.uri })
|
|
642
|
+
barClient.requestHandler.process({ path: "/api", uri: barClient.uri }),
|
|
659
643
|
);
|
|
660
644
|
|
|
661
645
|
// expect the request header to not been modified
|
|
@@ -721,7 +705,6 @@
|
|
|
721
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**
|
|
722
706
|
|
|
723
707
|
In packages/modules/http/src/errors.ts:
|
|
724
|
-
|
|
725
708
|
- The class HttpResponseError now has a generic parameter TResponse.
|
|
726
709
|
- Added a static property Name to the class.
|
|
727
710
|
- Added a new class HttpJsonResponseError which extends HttpResponseError and also has generic parameters TType and TResponse.
|
|
@@ -730,7 +713,6 @@
|
|
|
730
713
|
- Modified the constructor to accept an optional data parameter.
|
|
731
714
|
|
|
732
715
|
In packages/modules/http/src/lib/selectors/json-selector.ts:
|
|
733
|
-
|
|
734
716
|
- Added an import statement for HttpJsonResponseError.
|
|
735
717
|
- Modified the jsonSelector function to handle errors when parsing the response.
|
|
736
718
|
- Added a try-catch block.
|
|
@@ -763,7 +745,6 @@
|
|
|
763
745
|
### Minor Changes
|
|
764
746
|
|
|
765
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
|
|
766
|
-
|
|
767
748
|
- added selector for extracting blob from response
|
|
768
749
|
- added function for fetching blob as stream or promise on the http client
|
|
769
750
|
|
|
@@ -816,7 +797,6 @@
|
|
|
816
797
|
### Patch Changes
|
|
817
798
|
|
|
818
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**
|
|
819
|
-
|
|
820
800
|
- align all versions of typescript
|
|
821
801
|
- update types to build
|
|
822
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
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}
|