@twin.org/web 0.0.1 → 0.0.2-next.4
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 +10 -4
- package/dist/esm/index.mjs +10 -4
- package/docs/changelog.md +118 -0
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -619,12 +619,15 @@ class FetchHelper {
|
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
const errorResponseData = await response.json();
|
|
622
|
+
const errorResponse = core.BaseError.fromError(errorResponseData);
|
|
623
|
+
const isErrorEmpty = core.BaseError.isEmpty(errorResponse);
|
|
622
624
|
// False positive as FetchError is derived from Error
|
|
623
625
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
624
626
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
625
627
|
statusText: response.statusText,
|
|
626
|
-
url
|
|
627
|
-
|
|
628
|
+
url,
|
|
629
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
630
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
628
631
|
}
|
|
629
632
|
/**
|
|
630
633
|
* Perform a request for binary data.
|
|
@@ -669,12 +672,15 @@ class FetchHelper {
|
|
|
669
672
|
}
|
|
670
673
|
}
|
|
671
674
|
const errorResponseData = await response.json();
|
|
675
|
+
const errorResponse = core.BaseError.fromError(errorResponseData);
|
|
676
|
+
const isErrorEmpty = core.BaseError.isEmpty(errorResponse);
|
|
672
677
|
// False positive as FetchError is derived from Error
|
|
673
678
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
674
679
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
675
680
|
statusText: response.statusText,
|
|
676
|
-
url
|
|
677
|
-
|
|
681
|
+
url,
|
|
682
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
683
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
678
684
|
}
|
|
679
685
|
/**
|
|
680
686
|
* Clears the cache.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -617,12 +617,15 @@ class FetchHelper {
|
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
const errorResponseData = await response.json();
|
|
620
|
+
const errorResponse = BaseError.fromError(errorResponseData);
|
|
621
|
+
const isErrorEmpty = BaseError.isEmpty(errorResponse);
|
|
620
622
|
// False positive as FetchError is derived from Error
|
|
621
623
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
622
624
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
623
625
|
statusText: response.statusText,
|
|
624
|
-
url
|
|
625
|
-
|
|
626
|
+
url,
|
|
627
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
628
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
626
629
|
}
|
|
627
630
|
/**
|
|
628
631
|
* Perform a request for binary data.
|
|
@@ -667,12 +670,15 @@ class FetchHelper {
|
|
|
667
670
|
}
|
|
668
671
|
}
|
|
669
672
|
const errorResponseData = await response.json();
|
|
673
|
+
const errorResponse = BaseError.fromError(errorResponseData);
|
|
674
|
+
const isErrorEmpty = BaseError.isEmpty(errorResponse);
|
|
670
675
|
// False positive as FetchError is derived from Error
|
|
671
676
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
672
677
|
throw new FetchError(source, `${FetchHelper._CLASS_NAME_CAMEL_CASE}.failureStatusText`, response.status, {
|
|
673
678
|
statusText: response.statusText,
|
|
674
|
-
url
|
|
675
|
-
|
|
679
|
+
url,
|
|
680
|
+
data: isErrorEmpty ? errorResponseData : undefined
|
|
681
|
+
}, isErrorEmpty ? undefined : errorResponse);
|
|
676
682
|
}
|
|
677
683
|
/**
|
|
678
684
|
* Clears the cache.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,123 @@
|
|
|
1
1
|
# @twin.org/web - Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
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.3 to 0.0.2-next.4
|
|
16
|
+
* @twin.org/crypto bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
17
|
+
* @twin.org/nameof bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
20
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
21
|
+
|
|
22
|
+
## [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)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
28
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
29
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
30
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
31
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
32
|
+
* 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))
|
|
33
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
34
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
35
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
36
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Dependencies
|
|
45
|
+
|
|
46
|
+
* The following workspace dependencies were updated
|
|
47
|
+
* dependencies
|
|
48
|
+
* @twin.org/core bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
49
|
+
* @twin.org/crypto bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
50
|
+
* @twin.org/nameof bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
51
|
+
* devDependencies
|
|
52
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
53
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
54
|
+
|
|
55
|
+
## [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)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
61
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
62
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
63
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
64
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
65
|
+
* 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))
|
|
66
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
67
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
68
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
69
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Dependencies
|
|
78
|
+
|
|
79
|
+
* The following workspace dependencies were updated
|
|
80
|
+
* dependencies
|
|
81
|
+
* @twin.org/core bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
82
|
+
* @twin.org/crypto bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
83
|
+
* @twin.org/nameof bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
84
|
+
* devDependencies
|
|
85
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
86
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
87
|
+
|
|
88
|
+
## [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)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Features
|
|
92
|
+
|
|
93
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
94
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
95
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
96
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
97
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
98
|
+
* 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))
|
|
99
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
100
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
101
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
102
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Bug Fixes
|
|
106
|
+
|
|
107
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Dependencies
|
|
111
|
+
|
|
112
|
+
* The following workspace dependencies were updated
|
|
113
|
+
* dependencies
|
|
114
|
+
* @twin.org/core bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
115
|
+
* @twin.org/crypto bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
116
|
+
* @twin.org/nameof bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
117
|
+
* devDependencies
|
|
118
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
119
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
120
|
+
|
|
3
121
|
## 0.0.1 (2025-07-03)
|
|
4
122
|
|
|
5
123
|
|
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.4",
|
|
4
4
|
"description": "Contains classes for use with web operations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/crypto": "
|
|
19
|
-
"@twin.org/nameof": "
|
|
17
|
+
"@twin.org/core": "0.0.2-next.4",
|
|
18
|
+
"@twin.org/crypto": "0.0.2-next.4",
|
|
19
|
+
"@twin.org/nameof": "0.0.2-next.4",
|
|
20
20
|
"jose": "6.0.11"
|
|
21
21
|
},
|
|
22
22
|
"main": "./dist/cjs/index.cjs",
|