@twin.org/web 0.0.1 → 0.0.2-next.10
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/dist/cjs/index.cjs +23 -8
- package/dist/esm/index.mjs +23 -8
- package/dist/types/errors/fetchError.d.ts +2 -2
- package/docs/changelog.md +232 -0
- package/docs/reference/classes/FetchError.md +3 -3
- package/docs/reference/variables/HeaderTypes.md +1 -1
- package/docs/reference/variables/HttpMethod.md +1 -1
- package/docs/reference/variables/HttpStatusCode.md +1 -1
- package/docs/reference/variables/MimeTypes.md +1 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -20,13 +20,13 @@ class FetchError extends core.BaseError {
|
|
|
20
20
|
* @param message The message as a code.
|
|
21
21
|
* @param httpStatus The http status code.
|
|
22
22
|
* @param properties Any additional information for the error.
|
|
23
|
-
* @param
|
|
23
|
+
* @param cause The cause of the error if we have wrapped another error.
|
|
24
24
|
*/
|
|
25
|
-
constructor(source, message, httpStatus, properties,
|
|
25
|
+
constructor(source, message, httpStatus, properties, cause) {
|
|
26
26
|
super(FetchError.CLASS_NAME, source, message, {
|
|
27
27
|
httpStatus,
|
|
28
28
|
...properties
|
|
29
|
-
},
|
|
29
|
+
}, cause);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -521,11 +521,20 @@ class FetchHelper {
|
|
|
521
521
|
}
|
|
522
522
|
}, options?.timeoutMs);
|
|
523
523
|
}
|
|
524
|
+
let finalBody;
|
|
525
|
+
if (method === HttpMethod.POST || method === HttpMethod.PUT) {
|
|
526
|
+
if (core.Is.string(body)) {
|
|
527
|
+
finalBody = body;
|
|
528
|
+
}
|
|
529
|
+
else if (core.Is.uint8Array(body)) {
|
|
530
|
+
finalBody = new Uint8Array(body);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
524
533
|
try {
|
|
525
534
|
const requestOptions = {
|
|
526
535
|
method,
|
|
527
536
|
headers: options?.headers,
|
|
528
|
-
body:
|
|
537
|
+
body: finalBody,
|
|
529
538
|
signal: controller ? controller.signal : undefined
|
|
530
539
|
};
|
|
531
540
|
if (core.Is.boolean(options?.includeCredentials)) {
|
|
@@ -619,12 +628,15 @@ class FetchHelper {
|
|
|
619
628
|
}
|
|
620
629
|
}
|
|
621
630
|
const errorResponseData = await response.json();
|
|
631
|
+
const errorResponse = core.BaseError.fromError(errorResponseData);
|
|
632
|
+
const isErrorEmpty = core.BaseError.isEmpty(errorResponse);
|
|
622
633
|
// False positive as FetchError is derived from Error
|
|
623
634
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
624
635
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
625
636
|
statusText: response.statusText,
|
|
626
|
-
url
|
|
627
|
-
|
|
637
|
+
url,
|
|
638
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
639
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
628
640
|
}
|
|
629
641
|
/**
|
|
630
642
|
* Perform a request for binary data.
|
|
@@ -669,12 +681,15 @@ class FetchHelper {
|
|
|
669
681
|
}
|
|
670
682
|
}
|
|
671
683
|
const errorResponseData = await response.json();
|
|
684
|
+
const errorResponse = core.BaseError.fromError(errorResponseData);
|
|
685
|
+
const isErrorEmpty = core.BaseError.isEmpty(errorResponse);
|
|
672
686
|
// False positive as FetchError is derived from Error
|
|
673
687
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
674
688
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
675
689
|
statusText: response.statusText,
|
|
676
|
-
url
|
|
677
|
-
|
|
690
|
+
url,
|
|
691
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
692
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
678
693
|
}
|
|
679
694
|
/**
|
|
680
695
|
* Clears the cache.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -18,13 +18,13 @@ class FetchError extends BaseError {
|
|
|
18
18
|
* @param message The message as a code.
|
|
19
19
|
* @param httpStatus The http status code.
|
|
20
20
|
* @param properties Any additional information for the error.
|
|
21
|
-
* @param
|
|
21
|
+
* @param cause The cause of the error if we have wrapped another error.
|
|
22
22
|
*/
|
|
23
|
-
constructor(source, message, httpStatus, properties,
|
|
23
|
+
constructor(source, message, httpStatus, properties, cause) {
|
|
24
24
|
super(FetchError.CLASS_NAME, source, message, {
|
|
25
25
|
httpStatus,
|
|
26
26
|
...properties
|
|
27
|
-
},
|
|
27
|
+
}, cause);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -519,11 +519,20 @@ class FetchHelper {
|
|
|
519
519
|
}
|
|
520
520
|
}, options?.timeoutMs);
|
|
521
521
|
}
|
|
522
|
+
let finalBody;
|
|
523
|
+
if (method === HttpMethod.POST || method === HttpMethod.PUT) {
|
|
524
|
+
if (Is.string(body)) {
|
|
525
|
+
finalBody = body;
|
|
526
|
+
}
|
|
527
|
+
else if (Is.uint8Array(body)) {
|
|
528
|
+
finalBody = new Uint8Array(body);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
522
531
|
try {
|
|
523
532
|
const requestOptions = {
|
|
524
533
|
method,
|
|
525
534
|
headers: options?.headers,
|
|
526
|
-
body:
|
|
535
|
+
body: finalBody,
|
|
527
536
|
signal: controller ? controller.signal : undefined
|
|
528
537
|
};
|
|
529
538
|
if (Is.boolean(options?.includeCredentials)) {
|
|
@@ -617,12 +626,15 @@ class FetchHelper {
|
|
|
617
626
|
}
|
|
618
627
|
}
|
|
619
628
|
const errorResponseData = await response.json();
|
|
629
|
+
const errorResponse = BaseError.fromError(errorResponseData);
|
|
630
|
+
const isErrorEmpty = BaseError.isEmpty(errorResponse);
|
|
620
631
|
// False positive as FetchError is derived from Error
|
|
621
632
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
622
633
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
623
634
|
statusText: response.statusText,
|
|
624
|
-
url
|
|
625
|
-
|
|
635
|
+
url,
|
|
636
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
637
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
626
638
|
}
|
|
627
639
|
/**
|
|
628
640
|
* Perform a request for binary data.
|
|
@@ -667,12 +679,15 @@ class FetchHelper {
|
|
|
667
679
|
}
|
|
668
680
|
}
|
|
669
681
|
const errorResponseData = await response.json();
|
|
682
|
+
const errorResponse = BaseError.fromError(errorResponseData);
|
|
683
|
+
const isErrorEmpty = BaseError.isEmpty(errorResponse);
|
|
670
684
|
// False positive as FetchError is derived from Error
|
|
671
685
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
672
686
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
673
687
|
statusText: response.statusText,
|
|
674
|
-
url
|
|
675
|
-
|
|
688
|
+
url,
|
|
689
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
690
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
676
691
|
}
|
|
677
692
|
/**
|
|
678
693
|
* Clears the cache.
|
|
@@ -14,9 +14,9 @@ export declare class FetchError extends BaseError {
|
|
|
14
14
|
* @param message The message as a code.
|
|
15
15
|
* @param httpStatus The http status code.
|
|
16
16
|
* @param properties Any additional information for the error.
|
|
17
|
-
* @param
|
|
17
|
+
* @param cause The cause of the error if we have wrapped another error.
|
|
18
18
|
*/
|
|
19
19
|
constructor(source: string, message: string, httpStatus: HttpStatusCode, properties?: {
|
|
20
20
|
[id: string]: unknown;
|
|
21
|
-
},
|
|
21
|
+
}, cause?: unknown);
|
|
22
22
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,237 @@
|
|
|
1
1
|
# @twin.org/web - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.9...web-v0.0.2-next.10) (2025-09-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **web:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/core bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
16
|
+
* @twin.org/crypto bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
17
|
+
* @twin.org/nameof bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
20
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
21
|
+
|
|
22
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.8...web-v0.0.2-next.9) (2025-09-08)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* **web:** Synchronize repo versions
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @twin.org/core bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
35
|
+
* @twin.org/crypto bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
36
|
+
* @twin.org/nameof bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
37
|
+
* devDependencies
|
|
38
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
39
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
40
|
+
|
|
41
|
+
## [0.0.2-next.8](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.7...web-v0.0.2-next.8) (2025-09-05)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Miscellaneous Chores
|
|
45
|
+
|
|
46
|
+
* **web:** Synchronize repo versions
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Dependencies
|
|
50
|
+
|
|
51
|
+
* The following workspace dependencies were updated
|
|
52
|
+
* dependencies
|
|
53
|
+
* @twin.org/core bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
54
|
+
* @twin.org/crypto bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
55
|
+
* @twin.org/nameof bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
56
|
+
* devDependencies
|
|
57
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
58
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
59
|
+
|
|
60
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.6...web-v0.0.2-next.7) (2025-08-29)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Dependencies
|
|
69
|
+
|
|
70
|
+
* The following workspace dependencies were updated
|
|
71
|
+
* dependencies
|
|
72
|
+
* @twin.org/core bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
73
|
+
* @twin.org/crypto bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
74
|
+
* @twin.org/nameof bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
75
|
+
* devDependencies
|
|
76
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
77
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
78
|
+
|
|
79
|
+
## [0.0.2-next.6](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.5...web-v0.0.2-next.6) (2025-08-27)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Miscellaneous Chores
|
|
83
|
+
|
|
84
|
+
* **web:** Synchronize repo versions
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Dependencies
|
|
88
|
+
|
|
89
|
+
* The following workspace dependencies were updated
|
|
90
|
+
* dependencies
|
|
91
|
+
* @twin.org/core bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
92
|
+
* @twin.org/crypto bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
93
|
+
* @twin.org/nameof bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
94
|
+
* devDependencies
|
|
95
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
96
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
97
|
+
|
|
98
|
+
## [0.0.2-next.5](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.4...web-v0.0.2-next.5) (2025-08-19)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Dependencies
|
|
107
|
+
|
|
108
|
+
* The following workspace dependencies were updated
|
|
109
|
+
* dependencies
|
|
110
|
+
* @twin.org/core bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
111
|
+
* @twin.org/crypto bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
112
|
+
* @twin.org/nameof bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
113
|
+
* devDependencies
|
|
114
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
115
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
116
|
+
|
|
117
|
+
## [0.0.2-next.4](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.3...web-v0.0.2-next.4) (2025-08-15)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Miscellaneous Chores
|
|
121
|
+
|
|
122
|
+
* **web:** Synchronize repo versions
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Dependencies
|
|
126
|
+
|
|
127
|
+
* The following workspace dependencies were updated
|
|
128
|
+
* dependencies
|
|
129
|
+
* @twin.org/core bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
130
|
+
* @twin.org/crypto bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
131
|
+
* @twin.org/nameof bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
132
|
+
* devDependencies
|
|
133
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
134
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
135
|
+
|
|
136
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.2...web-v0.0.2-next.3) (2025-08-06)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Features
|
|
140
|
+
|
|
141
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
142
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
143
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
144
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
145
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
146
|
+
* ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
|
|
147
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
148
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
149
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
150
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### Bug Fixes
|
|
154
|
+
|
|
155
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Dependencies
|
|
159
|
+
|
|
160
|
+
* The following workspace dependencies were updated
|
|
161
|
+
* dependencies
|
|
162
|
+
* @twin.org/core bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
163
|
+
* @twin.org/crypto bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
164
|
+
* @twin.org/nameof bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
165
|
+
* devDependencies
|
|
166
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
167
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
168
|
+
|
|
169
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.1...web-v0.0.2-next.2) (2025-08-06)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Features
|
|
173
|
+
|
|
174
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
175
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
176
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
177
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
178
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
179
|
+
* ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
|
|
180
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
181
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
182
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
183
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
### Bug Fixes
|
|
187
|
+
|
|
188
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Dependencies
|
|
192
|
+
|
|
193
|
+
* The following workspace dependencies were updated
|
|
194
|
+
* dependencies
|
|
195
|
+
* @twin.org/core bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
196
|
+
* @twin.org/crypto bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
197
|
+
* @twin.org/nameof bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
198
|
+
* devDependencies
|
|
199
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
200
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
201
|
+
|
|
202
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.0...web-v0.0.2-next.1) (2025-08-06)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### Features
|
|
206
|
+
|
|
207
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
208
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
209
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
210
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
211
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
212
|
+
* ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
|
|
213
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
214
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
215
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
216
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Bug Fixes
|
|
220
|
+
|
|
221
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Dependencies
|
|
225
|
+
|
|
226
|
+
* The following workspace dependencies were updated
|
|
227
|
+
* dependencies
|
|
228
|
+
* @twin.org/core bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
229
|
+
* @twin.org/crypto bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
230
|
+
* @twin.org/nameof bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
231
|
+
* devDependencies
|
|
232
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
233
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
234
|
+
|
|
3
235
|
## 0.0.1 (2025-07-03)
|
|
4
236
|
|
|
5
237
|
|
|
@@ -10,7 +10,7 @@ Class to represent errors from fetch.
|
|
|
10
10
|
|
|
11
11
|
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new FetchError**(`source`, `message`, `httpStatus`, `properties?`, `
|
|
13
|
+
> **new FetchError**(`source`, `message`, `httpStatus`, `properties?`, `cause?`): `FetchError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of FetchError.
|
|
16
16
|
|
|
@@ -38,11 +38,11 @@ The http status code.
|
|
|
38
38
|
|
|
39
39
|
Any additional information for the error.
|
|
40
40
|
|
|
41
|
-
#####
|
|
41
|
+
##### cause?
|
|
42
42
|
|
|
43
43
|
`unknown`
|
|
44
44
|
|
|
45
|
-
The
|
|
45
|
+
The cause of the error if we have wrapped another error.
|
|
46
46
|
|
|
47
47
|
#### Returns
|
|
48
48
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.10",
|
|
4
4
|
"description": "Contains classes for use with web operations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/crypto": "
|
|
19
|
-
"@twin.org/nameof": "
|
|
20
|
-
"jose": "6.0
|
|
17
|
+
"@twin.org/core": "0.0.2-next.10",
|
|
18
|
+
"@twin.org/crypto": "0.0.2-next.10",
|
|
19
|
+
"@twin.org/nameof": "0.0.2-next.10",
|
|
20
|
+
"jose": "6.1.0"
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/cjs/index.cjs",
|
|
23
23
|
"module": "./dist/esm/index.mjs",
|