@podium/client 5.0.0-next.8 → 5.0.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 +543 -0
- package/README.md +31 -9
- package/client.d.ts +140 -0
- package/lib/client.js +10 -7
- package/lib/http-outgoing.js +25 -0
- package/lib/http.js +23 -0
- package/lib/resolver.content.js +213 -198
- package/lib/resolver.fallback.js +91 -96
- package/lib/resolver.js +5 -3
- package/lib/resolver.manifest.js +164 -132
- package/lib/resource.js +9 -16
- package/lib/response.js +5 -9
- package/lib/utils.js +40 -0
- package/package.json +29 -36
- package/dist/client.js +0 -237
- package/dist/http-outgoing.js +0 -227
- package/dist/resolver.cache.js +0 -67
- package/dist/resolver.content.js +0 -320
- package/dist/resolver.fallback.js +0 -167
- package/dist/resolver.js +0 -80
- package/dist/resolver.manifest.js +0 -241
- package/dist/resource.js +0 -130
- package/dist/response.js +0 -82
- package/dist/state.js +0 -124
- package/dist/utils.js +0 -26
- package/index.d.ts +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,461 @@
|
|
|
1
|
+
# [5.0.0](https://github.com/podium-lib/client/compare/v4.6.1...v5.0.0) (2023-11-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency readable-stream to v4 ([d3aff96](https://github.com/podium-lib/client/commit/d3aff9608ebfefc294ab0b79563a96670019311f))
|
|
7
|
+
* **deps:** update dependency readable-stream to v4 ([9c7303a](https://github.com/podium-lib/client/commit/9c7303aea267f951a8359f3d0640588d8d82b21a))
|
|
8
|
+
* Fix inspect method on response object ([#294](https://github.com/podium-lib/client/issues/294)) ([94d1485](https://github.com/podium-lib/client/commit/94d14856ca2280888aa50e9cb7e7f782cd49666a))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Convert to ESM ([#206](https://github.com/podium-lib/client/issues/206)) ([d31298f](https://github.com/podium-lib/client/commit/d31298fac7e1b84dc401c5832bce132a68a84943))
|
|
14
|
+
* Drop node 10.x support ([a71c3b0](https://github.com/podium-lib/client/commit/a71c3b08198f9a20de5e6af042d5a78f85c33c4f))
|
|
15
|
+
* Make HttpIncoming required first argument to .fetch() and .stream() ([9b80ee7](https://github.com/podium-lib/client/commit/9b80ee715397e780d2df267483b6bc2db32b1c62))
|
|
16
|
+
* Remove .js() and .css() methods ([#128](https://github.com/podium-lib/client/issues/128)) ([db6d306](https://github.com/podium-lib/client/commit/db6d30617160db76d85e8839c7f896ef3dc97b41))
|
|
17
|
+
* Remove deprecated 'change' and 'dispose' events ([#129](https://github.com/podium-lib/client/issues/129)) ([449fff1](https://github.com/podium-lib/client/commit/449fff13323d4f7f76fd406dbee1f2532701916b))
|
|
18
|
+
* replace request with undici for http requests ([31163db](https://github.com/podium-lib/client/commit/31163db538d87cb797135d7febcc6cc244eac17a))
|
|
19
|
+
* Support new proxy structure in manifest ([#295](https://github.com/podium-lib/client/issues/295)) ([d8aa28a](https://github.com/podium-lib/client/commit/d8aa28a59c8ab3fe66b146eecaaf487717599972))
|
|
20
|
+
* Use ES private properties instead of Symbols and defineProperty for privacy ([#131](https://github.com/podium-lib/client/issues/131)) ([2787a6c](https://github.com/podium-lib/client/commit/2787a6c406f9fb2bb2e85583082b818c2c247b63))
|
|
21
|
+
* Use native streams ([#215](https://github.com/podium-lib/client/issues/215)) ([f949c9c](https://github.com/podium-lib/client/commit/f949c9cc0d66431685138ca2c0367aec622bce78))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### BREAKING CHANGES
|
|
25
|
+
|
|
26
|
+
* Convert from CommonJS to ESM
|
|
27
|
+
|
|
28
|
+
* fix: Remove outcommented code
|
|
29
|
+
|
|
30
|
+
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
|
|
31
|
+
* Due to dropping node 10.x support we use ES private properties instead of Symbols and `.defineProperty()`.
|
|
32
|
+
|
|
33
|
+
We've been using Symbols and `.defineProperty()` to define private properties in classes up until now. This has the downside that they are not true private and in later versions of node.js one would see these Symbols when inspecting an object. What we want is proper private properties.
|
|
34
|
+
|
|
35
|
+
This PR does also add a pretty printer which outputs an object literal or the object so when debugging one can see the getters and setters of the object.
|
|
36
|
+
|
|
37
|
+
Example: printing a object with `console.log()` would previously print the following:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
PodiumClientResponse {
|
|
41
|
+
[Symbol(podium:client:response:redirect)]: '',
|
|
42
|
+
[Symbol(podium:client:response:content)]: '',
|
|
43
|
+
[Symbol(podium:client:response:headers)]: {},
|
|
44
|
+
[Symbol(podium:client:response:css)]: [],
|
|
45
|
+
[Symbol(podium:client:response:js)]: []
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Now the following will be printed:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
{
|
|
53
|
+
redirect: '',
|
|
54
|
+
content: '',
|
|
55
|
+
headers: {},
|
|
56
|
+
css: [],
|
|
57
|
+
js: []
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
|
|
62
|
+
* This removes the deprecated `change` and `dispose` events.
|
|
63
|
+
|
|
64
|
+
Resolves: https://github.com/podium-lib/issues/issues/24
|
|
65
|
+
|
|
66
|
+
* chore: lint love
|
|
67
|
+
|
|
68
|
+
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
|
|
69
|
+
* Remove .js() and .css() methods to retrieve fetched js and css for all podlets. Also removes the `resolveJs` and `resolveCss` arguments when registering a podlet.
|
|
70
|
+
|
|
71
|
+
Resolves: https://github.com/podium-lib/issues/issues/25
|
|
72
|
+
|
|
73
|
+
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
|
|
74
|
+
* Only support node 12 and 14.
|
|
75
|
+
* `HttpIncoming` must now be passed as the first argument to .fetch() and .stream()
|
|
76
|
+
|
|
77
|
+
# [5.0.0-next.15](https://github.com/podium-lib/client/compare/v5.0.0-next.14...v5.0.0-next.15) (2023-11-28)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
* **deps:** update dependency readable-stream to v4 ([d3aff96](https://github.com/podium-lib/client/commit/d3aff9608ebfefc294ab0b79563a96670019311f))
|
|
83
|
+
* **deps:** update dependency readable-stream to v4 ([9c7303a](https://github.com/podium-lib/client/commit/9c7303aea267f951a8359f3d0640588d8d82b21a))
|
|
84
|
+
|
|
85
|
+
# [5.0.0-next.14](https://github.com/podium-lib/client/compare/v5.0.0-next.13...v5.0.0-next.14) (2023-11-28)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* **deps:** update dependency @metrics/client to v2.5.1 ([c7f6b5b](https://github.com/podium-lib/client/commit/c7f6b5b1f22f700e17b86b031412955a77fdbc07))
|
|
91
|
+
* **deps:** update dependency @metrics/client to v2.5.2 ([764886f](https://github.com/podium-lib/client/commit/764886fe374bc364c9b3efd83a35d3fd041e6c43))
|
|
92
|
+
* **deps:** update dependency @podium/schemas to v4.1.33 ([9ee1fba](https://github.com/podium-lib/client/commit/9ee1fba908ed68cba8db8b98b6bf06b4f9a90e73))
|
|
93
|
+
* **deps:** update dependency @podium/schemas to v4.1.34 ([e95650f](https://github.com/podium-lib/client/commit/e95650f178192fdbd086cc82afa5fc22bdc5d838))
|
|
94
|
+
* **deps:** update dependency @podium/utils to v4.4.37 ([6d7fa24](https://github.com/podium-lib/client/commit/6d7fa2474ba5ea17d548783365a6cbe51c3e51af))
|
|
95
|
+
* **deps:** update dependency @podium/utils to v4.4.38 ([05b14df](https://github.com/podium-lib/client/commit/05b14dfdb20609c461b0a91aae4a6d7faf358dbc))
|
|
96
|
+
* **deps:** update dependency @podium/utils to v4.4.39 ([39289a0](https://github.com/podium-lib/client/commit/39289a02098950c54b1049e17f0269b8f85aa900))
|
|
97
|
+
* **deps:** update dependency @podium/utils to v4.4.41 ([e316c43](https://github.com/podium-lib/client/commit/e316c4328c2e66706a1b9c09ede50cdf75537b57))
|
|
98
|
+
* **deps:** update dependency @podium/utils to v4.5.1 ([3632899](https://github.com/podium-lib/client/commit/3632899f76254f78baf6e76430659dc0d507d3eb))
|
|
99
|
+
* Replace .abort() with .destroy() ([a41f44a](https://github.com/podium-lib/client/commit/a41f44a6c4aff7aec8201d05ce220dbdbb648cfd))
|
|
100
|
+
* return correct type in typescript definition. ([#311](https://github.com/podium-lib/client/issues/311)) ([e06f610](https://github.com/podium-lib/client/commit/e06f6103413b1c87761ad5cfde5fbb0488dd1099))
|
|
101
|
+
* Set log level for network errors to debug when throwable ([#298](https://github.com/podium-lib/client/issues/298)) ([3ba5d67](https://github.com/podium-lib/client/commit/3ba5d67192f417b4627d9f411a1fe4ffd2c98775))
|
|
102
|
+
* update type definitions ([d63a621](https://github.com/podium-lib/client/commit/d63a621762909e01acd6d29629c6061a757df146))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
* use manifest asset scope field to filter assets ([fd83d64](https://github.com/podium-lib/client/commit/fd83d6486f9454f4fef2cdbcf3a05b86c81205c5))
|
|
108
|
+
|
|
109
|
+
## [4.6.1](https://github.com/podium-lib/client/compare/v4.6.0...v4.6.1) (2023-11-20)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Bug Fixes
|
|
113
|
+
|
|
114
|
+
* **deps:** update dependency @podium/utils to v4.5.1 ([3632899](https://github.com/podium-lib/client/commit/3632899f76254f78baf6e76430659dc0d507d3eb))
|
|
115
|
+
|
|
116
|
+
# [4.6.0](https://github.com/podium-lib/client/compare/v4.5.35...v4.6.0) (2023-11-16)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Features
|
|
120
|
+
|
|
121
|
+
* use manifest asset scope field to filter assets ([fd83d64](https://github.com/podium-lib/client/commit/fd83d6486f9454f4fef2cdbcf3a05b86c81205c5))
|
|
122
|
+
|
|
123
|
+
## [4.5.35](https://github.com/podium-lib/client/compare/v4.5.34...v4.5.35) (2023-10-19)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Bug Fixes
|
|
127
|
+
|
|
128
|
+
* **deps:** update dependency @podium/utils to v4.4.41 ([e316c43](https://github.com/podium-lib/client/commit/e316c4328c2e66706a1b9c09ede50cdf75537b57))
|
|
129
|
+
|
|
130
|
+
## [4.5.34](https://github.com/podium-lib/client/compare/v4.5.33...v4.5.34) (2023-10-09)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* update type definitions ([d63a621](https://github.com/podium-lib/client/commit/d63a621762909e01acd6d29629c6061a757df146))
|
|
136
|
+
|
|
137
|
+
## [4.5.33](https://github.com/podium-lib/client/compare/v4.5.32...v4.5.33) (2023-09-19)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Bug Fixes
|
|
141
|
+
|
|
142
|
+
* **deps:** update dependency @metrics/client to v2.5.2 ([764886f](https://github.com/podium-lib/client/commit/764886fe374bc364c9b3efd83a35d3fd041e6c43))
|
|
143
|
+
|
|
144
|
+
## [4.5.32](https://github.com/podium-lib/client/compare/v4.5.31...v4.5.32) (2023-09-14)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Bug Fixes
|
|
148
|
+
|
|
149
|
+
* **deps:** update dependency @metrics/client to v2.5.1 ([c7f6b5b](https://github.com/podium-lib/client/commit/c7f6b5b1f22f700e17b86b031412955a77fdbc07))
|
|
150
|
+
|
|
151
|
+
## [4.5.31](https://github.com/podium-lib/client/compare/v4.5.30...v4.5.31) (2023-05-11)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### Bug Fixes
|
|
155
|
+
|
|
156
|
+
* Replace .abort() with .destroy() ([a41f44a](https://github.com/podium-lib/client/commit/a41f44a6c4aff7aec8201d05ce220dbdbb648cfd))
|
|
157
|
+
|
|
158
|
+
## [4.5.30](https://github.com/podium-lib/client/compare/v4.5.29...v4.5.30) (2023-02-15)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Bug Fixes
|
|
162
|
+
|
|
163
|
+
* return correct type in typescript definition. ([#311](https://github.com/podium-lib/client/issues/311)) ([e06f610](https://github.com/podium-lib/client/commit/e06f6103413b1c87761ad5cfde5fbb0488dd1099))
|
|
164
|
+
|
|
165
|
+
## [4.5.29](https://github.com/podium-lib/client/compare/v4.5.28...v4.5.29) (2023-01-04)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
|
|
170
|
+
* **deps:** update dependency @podium/utils to v4.4.39 ([39289a0](https://github.com/podium-lib/client/commit/39289a02098950c54b1049e17f0269b8f85aa900))
|
|
171
|
+
|
|
172
|
+
## [4.5.28](https://github.com/podium-lib/client/compare/v4.5.27...v4.5.28) (2023-01-04)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Bug Fixes
|
|
176
|
+
|
|
177
|
+
* **deps:** update dependency @podium/schemas to v4.1.34 ([e95650f](https://github.com/podium-lib/client/commit/e95650f178192fdbd086cc82afa5fc22bdc5d838))
|
|
178
|
+
|
|
179
|
+
## [4.5.27](https://github.com/podium-lib/client/compare/v4.5.26...v4.5.27) (2022-12-07)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Bug Fixes
|
|
183
|
+
|
|
184
|
+
* **deps:** update dependency @podium/utils to v4.4.38 ([05b14df](https://github.com/podium-lib/client/commit/05b14dfdb20609c461b0a91aae4a6d7faf358dbc))
|
|
185
|
+
|
|
186
|
+
## [4.5.26](https://github.com/podium-lib/client/compare/v4.5.25...v4.5.26) (2022-11-14)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Bug Fixes
|
|
190
|
+
|
|
191
|
+
* **deps:** update dependency @podium/utils to v4.4.37 ([6d7fa24](https://github.com/podium-lib/client/commit/6d7fa2474ba5ea17d548783365a6cbe51c3e51af))
|
|
192
|
+
|
|
193
|
+
## [4.5.25](https://github.com/podium-lib/client/compare/v4.5.24...v4.5.25) (2022-11-14)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
### Bug Fixes
|
|
197
|
+
|
|
198
|
+
* **deps:** update dependency @podium/schemas to v4.1.33 ([9ee1fba](https://github.com/podium-lib/client/commit/9ee1fba908ed68cba8db8b98b6bf06b4f9a90e73))
|
|
199
|
+
|
|
200
|
+
## [4.5.24](https://github.com/podium-lib/client/compare/v4.5.23...v4.5.24) (2022-10-18)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
### Bug Fixes
|
|
204
|
+
|
|
205
|
+
* Set log level for network errors to debug when throwable ([#298](https://github.com/podium-lib/client/issues/298)) ([3ba5d67](https://github.com/podium-lib/client/commit/3ba5d67192f417b4627d9f411a1fe4ffd2c98775))
|
|
206
|
+
|
|
207
|
+
## [4.5.23](https://github.com/podium-lib/client/compare/v4.5.22...v4.5.23) (2022-09-01)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### Bug Fixes
|
|
211
|
+
|
|
212
|
+
* Lower log level when throwable is true ([#291](https://github.com/podium-lib/client/issues/291)) ([c0d779b](https://github.com/podium-lib/client/commit/c0d779b3e22b671e5f7c6496c504b38cd9da5125))
|
|
213
|
+
|
|
214
|
+
# [5.0.0-next.13](https://github.com/podium-lib/client/compare/v5.0.0-next.12...v5.0.0-next.13) (2022-09-21)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Features
|
|
218
|
+
|
|
219
|
+
* Support new proxy structure in manifest ([#295](https://github.com/podium-lib/client/issues/295)) ([d8aa28a](https://github.com/podium-lib/client/commit/d8aa28a59c8ab3fe66b146eecaaf487717599972))
|
|
220
|
+
|
|
221
|
+
# [5.0.0-next.12](https://github.com/podium-lib/client/compare/v5.0.0-next.11...v5.0.0-next.12) (2022-09-20)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Features
|
|
225
|
+
|
|
226
|
+
* replace request with undici for http requests ([31163db](https://github.com/podium-lib/client/commit/31163db538d87cb797135d7febcc6cc244eac17a))
|
|
227
|
+
|
|
228
|
+
# [5.0.0-next.11](https://github.com/podium-lib/client/compare/v5.0.0-next.10...v5.0.0-next.11) (2022-09-08)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
### Bug Fixes
|
|
232
|
+
|
|
233
|
+
* Fix inspect method on response object ([#294](https://github.com/podium-lib/client/issues/294)) ([94d1485](https://github.com/podium-lib/client/commit/94d14856ca2280888aa50e9cb7e7f782cd49666a))
|
|
234
|
+
|
|
235
|
+
# [5.0.0-next.10](https://github.com/podium-lib/client/compare/v5.0.0-next.9...v5.0.0-next.10) (2022-09-07)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
* Lower log level when throwable is true ([#291](https://github.com/podium-lib/client/issues/291)) ([c0d779b](https://github.com/podium-lib/client/commit/c0d779b3e22b671e5f7c6496c504b38cd9da5125))
|
|
241
|
+
|
|
242
|
+
# [5.0.0-next.9](https://github.com/podium-lib/client/compare/v5.0.0-next.8...v5.0.0-next.9) (2022-05-09)
|
|
243
|
+
## [4.5.23](https://github.com/podium-lib/client/compare/v4.5.22...v4.5.23) (2022-09-01)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### Bug Fixes
|
|
247
|
+
|
|
248
|
+
* add 'redirect' to 'PodiumClientResponse' interface ([#235](https://github.com/podium-lib/client/issues/235)) ([6670007](https://github.com/podium-lib/client/commit/667000727187402d112c1087a4356492489a4003))
|
|
249
|
+
* **deps:** update dependency @podium/schemas to v4.1.17 ([6d249ed](https://github.com/podium-lib/client/commit/6d249ed8c3718642e78e71be6022feb113635ba8))
|
|
250
|
+
* **deps:** update dependency @podium/schemas to v4.1.18 ([36ca4a1](https://github.com/podium-lib/client/commit/36ca4a1425e227e30fd487a7e60908075628c32b))
|
|
251
|
+
* **deps:** update dependency @podium/schemas to v4.1.19 ([8a7f288](https://github.com/podium-lib/client/commit/8a7f288a57ce2d09d4cace08b836ef6c934a802c))
|
|
252
|
+
* **deps:** update dependency @podium/schemas to v4.1.20 ([b9c7ef4](https://github.com/podium-lib/client/commit/b9c7ef4665eb7aa852e9e3576bf89a0ee45c5fee))
|
|
253
|
+
* **deps:** update dependency @podium/schemas to v4.1.21 ([5a12fbd](https://github.com/podium-lib/client/commit/5a12fbdadd9a0f8ae1b4343ca33267852aa49aa0))
|
|
254
|
+
* **deps:** update dependency @podium/schemas to v4.1.22 ([a6ca70a](https://github.com/podium-lib/client/commit/a6ca70a87fdd264cfbefb0f5ecbe60c871606b00))
|
|
255
|
+
* **deps:** update dependency @podium/schemas to v4.1.23 ([0ad1042](https://github.com/podium-lib/client/commit/0ad104279a9a299737db5bbc5c2e65e43bacbc03))
|
|
256
|
+
* **deps:** update dependency @podium/schemas to v4.1.24 ([4cbad88](https://github.com/podium-lib/client/commit/4cbad88fc1a6b79627d0901e877fa9422292161d))
|
|
257
|
+
* **deps:** update dependency @podium/schemas to v4.1.25 ([8a8caa1](https://github.com/podium-lib/client/commit/8a8caa1c114c49b48a91383d45a75eb157e30140))
|
|
258
|
+
* **deps:** update dependency @podium/schemas to v4.1.26 ([a11d701](https://github.com/podium-lib/client/commit/a11d7019f9faeba1327af6df1b8377ae464c71b2))
|
|
259
|
+
* **deps:** update dependency @podium/schemas to v4.1.27 ([9b1d8d7](https://github.com/podium-lib/client/commit/9b1d8d711b435af1d517dc5d8e924d257cef529b))
|
|
260
|
+
* **deps:** update dependency @podium/schemas to v4.1.28 ([36e5398](https://github.com/podium-lib/client/commit/36e539822af10998a16c332b1303e1c8919f0ab3))
|
|
261
|
+
* **deps:** update dependency @podium/schemas to v4.1.29 ([7664934](https://github.com/podium-lib/client/commit/7664934071f7244a6c0213ea6c0a64153c435ed9))
|
|
262
|
+
* **deps:** update dependency @podium/schemas to v4.1.30 ([1a1c18e](https://github.com/podium-lib/client/commit/1a1c18e63a7a8130fcd450ffd9a03c11967d7416))
|
|
263
|
+
* **deps:** update dependency @podium/schemas to v4.1.31 ([563ebb7](https://github.com/podium-lib/client/commit/563ebb7c731f962250b56ba75d85689ebd92241e))
|
|
264
|
+
* **deps:** update dependency @podium/schemas to v4.1.32 ([fc13291](https://github.com/podium-lib/client/commit/fc13291ca3b6366d878bdd6bfdf10406dff11e74))
|
|
265
|
+
* **deps:** update dependency @podium/utils to v4.4.18 ([0448d3e](https://github.com/podium-lib/client/commit/0448d3ef39bfef8715b4e66ef8dc41a9634cd4cb))
|
|
266
|
+
* **deps:** update dependency @podium/utils to v4.4.19 ([e0c2c34](https://github.com/podium-lib/client/commit/e0c2c349fbf4d2db4efe060c0b883b07d6f0bcd8))
|
|
267
|
+
* **deps:** update dependency @podium/utils to v4.4.20 ([6b9b3f6](https://github.com/podium-lib/client/commit/6b9b3f630d521c189dca3b0acaecc46afe995036))
|
|
268
|
+
* **deps:** update dependency @podium/utils to v4.4.21 ([c007b67](https://github.com/podium-lib/client/commit/c007b67d118f3b88a8f91b915173dadb2b9026d0))
|
|
269
|
+
* **deps:** update dependency @podium/utils to v4.4.22 ([f65fbd0](https://github.com/podium-lib/client/commit/f65fbd00f2fe8256cc6290193dabd346907a1bda))
|
|
270
|
+
* **deps:** update dependency @podium/utils to v4.4.23 ([81200ea](https://github.com/podium-lib/client/commit/81200eabf600006f5c208e984acb4b81b28a725e))
|
|
271
|
+
* **deps:** update dependency @podium/utils to v4.4.24 ([747e73a](https://github.com/podium-lib/client/commit/747e73a7e737734b28520546bd6d449ab05497c8))
|
|
272
|
+
* **deps:** update dependency @podium/utils to v4.4.25 ([8e82542](https://github.com/podium-lib/client/commit/8e8254212ee69a01ba5b35c39aca2a2f558491b9))
|
|
273
|
+
* **deps:** update dependency @podium/utils to v4.4.26 ([9487380](https://github.com/podium-lib/client/commit/948738052a9d34294d52a0651c46b01043fa7852))
|
|
274
|
+
* **deps:** update dependency @podium/utils to v4.4.27 ([556a158](https://github.com/podium-lib/client/commit/556a158d1a341cca6f5e550de5882719b5169ac0))
|
|
275
|
+
* **deps:** update dependency @podium/utils to v4.4.28 ([581bdc6](https://github.com/podium-lib/client/commit/581bdc667d09d2b71e899691109a88b39b2b6847))
|
|
276
|
+
* **deps:** update dependency @podium/utils to v4.4.29 ([f33f1d9](https://github.com/podium-lib/client/commit/f33f1d93c33c7984b413b4781663a80c5dc52237))
|
|
277
|
+
* **deps:** update dependency @podium/utils to v4.4.30 ([954b607](https://github.com/podium-lib/client/commit/954b60788ca1d5677b143a473058e92c7ffcfef1))
|
|
278
|
+
* **deps:** update dependency @podium/utils to v4.4.31 ([0afdb26](https://github.com/podium-lib/client/commit/0afdb2648742e78b25e72bd46b6d345675574993))
|
|
279
|
+
* **deps:** update dependency @podium/utils to v4.4.32 ([798ed3a](https://github.com/podium-lib/client/commit/798ed3a5a89ccc046240f61f7bb85cc21045d0cf))
|
|
280
|
+
* **deps:** update dependency @podium/utils to v4.4.33 ([1136b6f](https://github.com/podium-lib/client/commit/1136b6f76d28229746f91b2fb1d44945c469dfd4))
|
|
281
|
+
* **deps:** update dependency @podium/utils to v4.4.34 ([81967fc](https://github.com/podium-lib/client/commit/81967fce15722ccfaab1ea64a6da475a319c5ab3))
|
|
282
|
+
* **deps:** update dependency @podium/utils to v4.4.35 ([9ba9720](https://github.com/podium-lib/client/commit/9ba9720698f1ce8548e8f76c07636a9f1ad44ac1))
|
|
283
|
+
* **deps:** update dependency @podium/utils to v4.4.36 ([6ca8bee](https://github.com/podium-lib/client/commit/6ca8bee3a3e49cfc10b55116ea8dd359ac3d2ebc))
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
### Features
|
|
287
|
+
|
|
288
|
+
* Support mixed protocols ([#228](https://github.com/podium-lib/client/issues/228)) ([f1e42fe](https://github.com/podium-lib/client/commit/f1e42feb298e755b1274e5cf79cf77243457c538))
|
|
289
|
+
|
|
1
290
|
# [5.0.0-next.8](https://github.com/podium-lib/client/compare/v5.0.0-next.7...v5.0.0-next.8) (2021-05-17)
|
|
2
291
|
|
|
292
|
+
* Lower log level when throwable is true ([#291](https://github.com/podium-lib/client/issues/291)) ([c0d779b](https://github.com/podium-lib/client/commit/c0d779b3e22b671e5f7c6496c504b38cd9da5125))
|
|
293
|
+
|
|
294
|
+
## [4.5.22](https://github.com/podium-lib/client/compare/v4.5.21...v4.5.22) (2022-03-23)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Bug Fixes
|
|
298
|
+
|
|
299
|
+
* **deps:** update dependency @podium/utils to v4.4.36 ([6ca8bee](https://github.com/podium-lib/client/commit/6ca8bee3a3e49cfc10b55116ea8dd359ac3d2ebc))
|
|
300
|
+
|
|
301
|
+
## [4.5.21](https://github.com/podium-lib/client/compare/v4.5.20...v4.5.21) (2022-03-23)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
### Bug Fixes
|
|
305
|
+
|
|
306
|
+
* **deps:** update dependency @podium/schemas to v4.1.32 ([fc13291](https://github.com/podium-lib/client/commit/fc13291ca3b6366d878bdd6bfdf10406dff11e74))
|
|
307
|
+
|
|
308
|
+
## [4.5.20](https://github.com/podium-lib/client/compare/v4.5.19...v4.5.20) (2022-02-05)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Bug Fixes
|
|
312
|
+
|
|
313
|
+
* **deps:** update dependency @podium/utils to v4.4.35 ([9ba9720](https://github.com/podium-lib/client/commit/9ba9720698f1ce8548e8f76c07636a9f1ad44ac1))
|
|
314
|
+
|
|
315
|
+
## [4.5.19](https://github.com/podium-lib/client/compare/v4.5.18...v4.5.19) (2022-02-05)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
### Bug Fixes
|
|
319
|
+
|
|
320
|
+
* **deps:** update dependency @podium/schemas to v4.1.31 ([563ebb7](https://github.com/podium-lib/client/commit/563ebb7c731f962250b56ba75d85689ebd92241e))
|
|
321
|
+
|
|
322
|
+
## [4.5.18](https://github.com/podium-lib/client/compare/v4.5.17...v4.5.18) (2022-01-15)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
### Bug Fixes
|
|
326
|
+
|
|
327
|
+
* **deps:** update dependency @podium/utils to v4.4.34 ([81967fc](https://github.com/podium-lib/client/commit/81967fce15722ccfaab1ea64a6da475a319c5ab3))
|
|
328
|
+
|
|
329
|
+
## [4.5.17](https://github.com/podium-lib/client/compare/v4.5.16...v4.5.17) (2022-01-15)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
### Bug Fixes
|
|
333
|
+
|
|
334
|
+
* **deps:** update dependency @podium/schemas to v4.1.30 ([1a1c18e](https://github.com/podium-lib/client/commit/1a1c18e63a7a8130fcd450ffd9a03c11967d7416))
|
|
335
|
+
|
|
336
|
+
## [4.5.16](https://github.com/podium-lib/client/compare/v4.5.15...v4.5.16) (2022-01-02)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
### Bug Fixes
|
|
340
|
+
|
|
341
|
+
* **deps:** update dependency @podium/utils to v4.4.33 ([1136b6f](https://github.com/podium-lib/client/commit/1136b6f76d28229746f91b2fb1d44945c469dfd4))
|
|
342
|
+
|
|
343
|
+
## [4.5.15](https://github.com/podium-lib/client/compare/v4.5.14...v4.5.15) (2021-11-22)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### Bug Fixes
|
|
347
|
+
|
|
348
|
+
* **deps:** update dependency @podium/utils to v4.4.32 ([798ed3a](https://github.com/podium-lib/client/commit/798ed3a5a89ccc046240f61f7bb85cc21045d0cf))
|
|
349
|
+
|
|
350
|
+
## [4.5.14](https://github.com/podium-lib/client/compare/v4.5.13...v4.5.14) (2021-11-22)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
### Bug Fixes
|
|
354
|
+
|
|
355
|
+
* **deps:** update dependency @podium/schemas to v4.1.29 ([7664934](https://github.com/podium-lib/client/commit/7664934071f7244a6c0213ea6c0a64153c435ed9))
|
|
356
|
+
|
|
357
|
+
## [4.5.13](https://github.com/podium-lib/client/compare/v4.5.12...v4.5.13) (2021-11-17)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
### Bug Fixes
|
|
361
|
+
|
|
362
|
+
* **deps:** update dependency @podium/utils to v4.4.31 ([0afdb26](https://github.com/podium-lib/client/commit/0afdb2648742e78b25e72bd46b6d345675574993))
|
|
363
|
+
|
|
364
|
+
## [4.5.12](https://github.com/podium-lib/client/compare/v4.5.11...v4.5.12) (2021-11-17)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
### Bug Fixes
|
|
368
|
+
|
|
369
|
+
* **deps:** update dependency @podium/schemas to v4.1.28 ([36e5398](https://github.com/podium-lib/client/commit/36e539822af10998a16c332b1303e1c8919f0ab3))
|
|
370
|
+
|
|
371
|
+
## [4.5.11](https://github.com/podium-lib/client/compare/v4.5.10...v4.5.11) (2021-11-15)
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### Bug Fixes
|
|
375
|
+
|
|
376
|
+
* **deps:** update dependency @podium/utils to v4.4.30 ([954b607](https://github.com/podium-lib/client/commit/954b60788ca1d5677b143a473058e92c7ffcfef1))
|
|
377
|
+
|
|
378
|
+
## [4.5.10](https://github.com/podium-lib/client/compare/v4.5.9...v4.5.10) (2021-11-14)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
### Bug Fixes
|
|
382
|
+
|
|
383
|
+
* **deps:** update dependency @podium/utils to v4.4.29 ([f33f1d9](https://github.com/podium-lib/client/commit/f33f1d93c33c7984b413b4781663a80c5dc52237))
|
|
384
|
+
|
|
385
|
+
## [4.5.9](https://github.com/podium-lib/client/compare/v4.5.8...v4.5.9) (2021-11-14)
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
### Bug Fixes
|
|
389
|
+
|
|
390
|
+
* **deps:** update dependency @podium/schemas to v4.1.27 ([9b1d8d7](https://github.com/podium-lib/client/commit/9b1d8d711b435af1d517dc5d8e924d257cef529b))
|
|
391
|
+
|
|
392
|
+
## [4.5.8](https://github.com/podium-lib/client/compare/v4.5.7...v4.5.8) (2021-11-09)
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
### Bug Fixes
|
|
396
|
+
|
|
397
|
+
* **deps:** update dependency @podium/utils to v4.4.28 ([581bdc6](https://github.com/podium-lib/client/commit/581bdc667d09d2b71e899691109a88b39b2b6847))
|
|
398
|
+
|
|
399
|
+
## [4.5.7](https://github.com/podium-lib/client/compare/v4.5.6...v4.5.7) (2021-11-09)
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
### Bug Fixes
|
|
403
|
+
|
|
404
|
+
* **deps:** update dependency @podium/schemas to v4.1.26 ([a11d701](https://github.com/podium-lib/client/commit/a11d7019f9faeba1327af6df1b8377ae464c71b2))
|
|
405
|
+
|
|
406
|
+
## [4.5.6](https://github.com/podium-lib/client/compare/v4.5.5...v4.5.6) (2021-10-27)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
### Bug Fixes
|
|
410
|
+
|
|
411
|
+
* **deps:** update dependency @podium/utils to v4.4.27 ([556a158](https://github.com/podium-lib/client/commit/556a158d1a341cca6f5e550de5882719b5169ac0))
|
|
412
|
+
|
|
413
|
+
## [4.5.5](https://github.com/podium-lib/client/compare/v4.5.4...v4.5.5) (2021-10-27)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### Bug Fixes
|
|
417
|
+
|
|
418
|
+
* add 'redirect' to 'PodiumClientResponse' interface ([#235](https://github.com/podium-lib/client/issues/235)) ([6670007](https://github.com/podium-lib/client/commit/667000727187402d112c1087a4356492489a4003))
|
|
419
|
+
|
|
420
|
+
## [4.5.4](https://github.com/podium-lib/client/compare/v4.5.3...v4.5.4) (2021-09-13)
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
### Bug Fixes
|
|
424
|
+
|
|
425
|
+
* **deps:** update dependency @podium/utils to v4.4.26 ([9487380](https://github.com/podium-lib/client/commit/948738052a9d34294d52a0651c46b01043fa7852))
|
|
426
|
+
|
|
427
|
+
## [4.5.3](https://github.com/podium-lib/client/compare/v4.5.2...v4.5.3) (2021-09-13)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
### Bug Fixes
|
|
431
|
+
|
|
432
|
+
* **deps:** update dependency @podium/schemas to v4.1.25 ([8a8caa1](https://github.com/podium-lib/client/commit/8a8caa1c114c49b48a91383d45a75eb157e30140))
|
|
433
|
+
|
|
434
|
+
## [4.5.2](https://github.com/podium-lib/client/compare/v4.5.1...v4.5.2) (2021-08-14)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
### Bug Fixes
|
|
438
|
+
|
|
439
|
+
* **deps:** update dependency @podium/utils to v4.4.25 ([8e82542](https://github.com/podium-lib/client/commit/8e8254212ee69a01ba5b35c39aca2a2f558491b9))
|
|
440
|
+
|
|
441
|
+
## [4.5.1](https://github.com/podium-lib/client/compare/v4.5.0...v4.5.1) (2021-08-14)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
### Bug Fixes
|
|
445
|
+
|
|
446
|
+
* **deps:** update dependency @podium/schemas to v4.1.24 ([4cbad88](https://github.com/podium-lib/client/commit/4cbad88fc1a6b79627d0901e877fa9422292161d))
|
|
447
|
+
|
|
448
|
+
# [4.5.0](https://github.com/podium-lib/client/compare/v4.4.33...v4.5.0) (2021-07-19)
|
|
449
|
+
|
|
3
450
|
|
|
4
451
|
### Features
|
|
5
452
|
|
|
6
453
|
* Use native streams ([#215](https://github.com/podium-lib/client/issues/215)) ([f949c9c](https://github.com/podium-lib/client/commit/f949c9cc0d66431685138ca2c0367aec622bce78))
|
|
7
454
|
|
|
8
455
|
# [5.0.0-next.7](https://github.com/podium-lib/client/compare/v5.0.0-next.6...v5.0.0-next.7) (2021-05-05)
|
|
456
|
+
* Support mixed protocols ([#228](https://github.com/podium-lib/client/issues/228)) ([f1e42fe](https://github.com/podium-lib/client/commit/f1e42feb298e755b1274e5cf79cf77243457c538))
|
|
457
|
+
|
|
458
|
+
## [4.4.33](https://github.com/podium-lib/client/compare/v4.4.32...v4.4.33) (2021-07-16)
|
|
9
459
|
|
|
10
460
|
|
|
11
461
|
### Bug Fixes
|
|
@@ -43,6 +493,99 @@
|
|
|
43
493
|
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
|
|
44
494
|
|
|
45
495
|
# [5.0.0-next.6](https://github.com/podium-lib/client/compare/v5.0.0-next.5...v5.0.0-next.6) (2020-10-06)
|
|
496
|
+
* **deps:** update dependency @podium/utils to v4.4.24 ([747e73a](https://github.com/podium-lib/client/commit/747e73a7e737734b28520546bd6d449ab05497c8))
|
|
497
|
+
|
|
498
|
+
## [4.4.32](https://github.com/podium-lib/client/compare/v4.4.31...v4.4.32) (2021-07-16)
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
### Bug Fixes
|
|
502
|
+
|
|
503
|
+
* **deps:** update dependency @podium/schemas to v4.1.23 ([0ad1042](https://github.com/podium-lib/client/commit/0ad104279a9a299737db5bbc5c2e65e43bacbc03))
|
|
504
|
+
|
|
505
|
+
## [4.4.31](https://github.com/podium-lib/client/compare/v4.4.30...v4.4.31) (2021-07-04)
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
### Bug Fixes
|
|
509
|
+
|
|
510
|
+
* **deps:** update dependency @podium/schemas to v4.1.22 ([a6ca70a](https://github.com/podium-lib/client/commit/a6ca70a87fdd264cfbefb0f5ecbe60c871606b00))
|
|
511
|
+
|
|
512
|
+
## [4.4.30](https://github.com/podium-lib/client/compare/v4.4.29...v4.4.30) (2021-07-04)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
### Bug Fixes
|
|
516
|
+
|
|
517
|
+
* **deps:** update dependency @podium/utils to v4.4.23 ([81200ea](https://github.com/podium-lib/client/commit/81200eabf600006f5c208e984acb4b81b28a725e))
|
|
518
|
+
|
|
519
|
+
## [4.4.29](https://github.com/podium-lib/client/compare/v4.4.28...v4.4.29) (2021-06-07)
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
### Bug Fixes
|
|
523
|
+
|
|
524
|
+
* **deps:** update dependency @podium/utils to v4.4.22 ([f65fbd0](https://github.com/podium-lib/client/commit/f65fbd00f2fe8256cc6290193dabd346907a1bda))
|
|
525
|
+
|
|
526
|
+
## [4.4.28](https://github.com/podium-lib/client/compare/v4.4.27...v4.4.28) (2021-06-06)
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
### Bug Fixes
|
|
530
|
+
|
|
531
|
+
* **deps:** update dependency @podium/schemas to v4.1.21 ([5a12fbd](https://github.com/podium-lib/client/commit/5a12fbdadd9a0f8ae1b4343ca33267852aa49aa0))
|
|
532
|
+
|
|
533
|
+
## [4.4.27](https://github.com/podium-lib/client/compare/v4.4.26...v4.4.27) (2021-05-24)
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
### Bug Fixes
|
|
537
|
+
|
|
538
|
+
* **deps:** update dependency @podium/utils to v4.4.21 ([c007b67](https://github.com/podium-lib/client/commit/c007b67d118f3b88a8f91b915173dadb2b9026d0))
|
|
539
|
+
|
|
540
|
+
## [4.4.26](https://github.com/podium-lib/client/compare/v4.4.25...v4.4.26) (2021-05-24)
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
### Bug Fixes
|
|
544
|
+
|
|
545
|
+
* **deps:** update dependency @podium/schemas to v4.1.20 ([b9c7ef4](https://github.com/podium-lib/client/commit/b9c7ef4665eb7aa852e9e3576bf89a0ee45c5fee))
|
|
546
|
+
|
|
547
|
+
## [4.4.25](https://github.com/podium-lib/client/compare/v4.4.24...v4.4.25) (2021-05-15)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
### Bug Fixes
|
|
551
|
+
|
|
552
|
+
* **deps:** update dependency @podium/utils to v4.4.20 ([6b9b3f6](https://github.com/podium-lib/client/commit/6b9b3f630d521c189dca3b0acaecc46afe995036))
|
|
553
|
+
|
|
554
|
+
## [4.4.24](https://github.com/podium-lib/client/compare/v4.4.23...v4.4.24) (2021-05-14)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
### Bug Fixes
|
|
558
|
+
|
|
559
|
+
* **deps:** update dependency @podium/schemas to v4.1.19 ([8a7f288](https://github.com/podium-lib/client/commit/8a7f288a57ce2d09d4cace08b836ef6c934a802c))
|
|
560
|
+
|
|
561
|
+
## [4.4.23](https://github.com/podium-lib/client/compare/v4.4.22...v4.4.23) (2021-05-09)
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
### Bug Fixes
|
|
565
|
+
|
|
566
|
+
* **deps:** update dependency @podium/utils to v4.4.19 ([e0c2c34](https://github.com/podium-lib/client/commit/e0c2c349fbf4d2db4efe060c0b883b07d6f0bcd8))
|
|
567
|
+
|
|
568
|
+
## [4.4.22](https://github.com/podium-lib/client/compare/v4.4.21...v4.4.22) (2021-05-09)
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
### Bug Fixes
|
|
572
|
+
|
|
573
|
+
* **deps:** update dependency @podium/schemas to v4.1.18 ([36ca4a1](https://github.com/podium-lib/client/commit/36ca4a1425e227e30fd487a7e60908075628c32b))
|
|
574
|
+
|
|
575
|
+
## [4.4.21](https://github.com/podium-lib/client/compare/v4.4.20...v4.4.21) (2021-05-05)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
### Bug Fixes
|
|
579
|
+
|
|
580
|
+
* **deps:** update dependency @podium/utils to v4.4.18 ([0448d3e](https://github.com/podium-lib/client/commit/0448d3ef39bfef8715b4e66ef8dc41a9634cd4cb))
|
|
581
|
+
|
|
582
|
+
## [4.4.20](https://github.com/podium-lib/client/compare/v4.4.19...v4.4.20) (2021-05-05)
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
### Bug Fixes
|
|
586
|
+
|
|
587
|
+
* **deps:** update dependency @podium/schemas to v4.1.17 ([6d249ed](https://github.com/podium-lib/client/commit/6d249ed8c3718642e78e71be6022feb113635ba8))
|
|
588
|
+
|
|
46
589
|
## [4.4.19](https://github.com/podium-lib/client/compare/v4.4.18...v4.4.19) (2021-04-27)
|
|
47
590
|
|
|
48
591
|
|
package/README.md
CHANGED
|
@@ -31,12 +31,12 @@ const component = client.register({
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const stream = component.stream(new HttpIncoming());
|
|
34
|
-
stream.once('beforeStream', res => {
|
|
34
|
+
stream.once('beforeStream', (res) => {
|
|
35
35
|
console.log(res.headers);
|
|
36
36
|
console.log(res.css);
|
|
37
37
|
console.log(res.js);
|
|
38
38
|
});
|
|
39
|
-
stream.on('error', error => {
|
|
39
|
+
stream.on('error', (error) => {
|
|
40
40
|
console.log(error);
|
|
41
41
|
});
|
|
42
42
|
stream.pipe(process.stdout);
|
|
@@ -58,13 +58,13 @@ const component = client.register({
|
|
|
58
58
|
|
|
59
59
|
component
|
|
60
60
|
.fetch(new HttpIncoming())
|
|
61
|
-
.then(res => {
|
|
61
|
+
.then((res) => {
|
|
62
62
|
console.log(res.content);
|
|
63
63
|
console.log(res.headers);
|
|
64
64
|
console.log(res.css);
|
|
65
65
|
console.log(res.js);
|
|
66
66
|
})
|
|
67
|
-
.catch(error => {
|
|
67
|
+
.catch((error) => {
|
|
68
68
|
console.log(error);
|
|
69
69
|
});
|
|
70
70
|
```
|
|
@@ -299,7 +299,7 @@ When there is a change in state. See the section
|
|
|
299
299
|
|
|
300
300
|
```js
|
|
301
301
|
const client = new Client();
|
|
302
|
-
client.on('state', state => {
|
|
302
|
+
client.on('state', (state) => {
|
|
303
303
|
console.log(state);
|
|
304
304
|
});
|
|
305
305
|
|
|
@@ -330,7 +330,7 @@ Emits the new manifest.
|
|
|
330
330
|
|
|
331
331
|
```js
|
|
332
332
|
const client = new Client();
|
|
333
|
-
client.on('change', manifest => {
|
|
333
|
+
client.on('change', (manifest) => {
|
|
334
334
|
console.log(manifest);
|
|
335
335
|
});
|
|
336
336
|
|
|
@@ -384,6 +384,8 @@ the content of the component. Before the stream starts flowing a `beforeStream`
|
|
|
384
384
|
with a Response object, containing `headers`, `css` and `js` references is
|
|
385
385
|
emitted.
|
|
386
386
|
|
|
387
|
+
**Note:** If the podlet is unavailable, the client will not receive `headers` and therefore will not set `headers` on the response.
|
|
388
|
+
|
|
387
389
|
#### incoming (required)
|
|
388
390
|
|
|
389
391
|
A HttpIncoming object. See https://github.com/podium-lib/utils/blob/master/lib/http-incoming.js
|
|
@@ -421,13 +423,33 @@ otherwise `css` will be an empty string.
|
|
|
421
423
|
|
|
422
424
|
```js
|
|
423
425
|
const stream = component.stream();
|
|
424
|
-
stream.once('beforeStream', data => {
|
|
426
|
+
stream.once('beforeStream', (data) => {
|
|
425
427
|
console.log(data.headers);
|
|
426
428
|
console.log(data.css);
|
|
427
429
|
console.log(data.js);
|
|
428
430
|
});
|
|
429
431
|
```
|
|
430
432
|
|
|
433
|
+
**Note:** If the podlet is unavailable, the client will not receive `headers` and therefore `data.headers` will be undefined.
|
|
434
|
+
|
|
435
|
+
### Asset Scope
|
|
436
|
+
|
|
437
|
+
Both the .fetch() method and the .stream() method give you access to podlet asset objects and these CSS and JS asset objects will be filtered if the asset objects contain a `scope` property and that `scope` property matches the current response type (either content or fallback).
|
|
438
|
+
|
|
439
|
+
For example, if the podlet manifest contains a JavaScript asset definition of the form:
|
|
440
|
+
```
|
|
441
|
+
{
|
|
442
|
+
js: [{ value: "https://assets.com/path/to/file.js", scope: "content" }],
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
And the client performs a fetch like so:
|
|
446
|
+
```js
|
|
447
|
+
const result = await component.fetch();
|
|
448
|
+
```
|
|
449
|
+
Then, if the podlet successfully responds from its content route, the `result.js` property will contain the asset defined above. If, however, the podlet's content route errors and the client is forced to use the podlet's fallback content, then `result.js` property will be an empty array.
|
|
450
|
+
|
|
451
|
+
Possible `scope` values are `content`, `fallback` and `all`. For backwards compatibility reasons, when assets do not provide a `scope` property, they will always be included in both `content` and `fallback` responses.
|
|
452
|
+
|
|
431
453
|
## Controlling caching of the manifest
|
|
432
454
|
|
|
433
455
|
The client has an internal cache where it keeps a cached version of the manifest
|
|
@@ -492,10 +514,10 @@ const bar = client.register({
|
|
|
492
514
|
});
|
|
493
515
|
|
|
494
516
|
Promise.all([foo.fetch(), bar.fetch()])
|
|
495
|
-
.then(res => {
|
|
517
|
+
.then((res) => {
|
|
496
518
|
console.log(res.content);
|
|
497
519
|
})
|
|
498
|
-
.catch(error => {
|
|
520
|
+
.catch((error) => {
|
|
499
521
|
console.log(error);
|
|
500
522
|
});
|
|
501
523
|
```
|