@squide/msw 3.2.2 → 3.2.3
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 +46 -37
- package/README.md +2 -2
- package/dist/mswPlugin.js +4 -4
- package/dist/mswPlugin.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
# @squide/msw
|
|
2
2
|
|
|
3
|
+
## 3.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#244](https://github.com/workleap/wl-squide/pull/244) [`5d13eb0`](https://github.com/workleap/wl-squide/commit/5d13eb038a724b499b820d7e1dc864c87954510b) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`5d13eb0`](https://github.com/workleap/wl-squide/commit/5d13eb038a724b499b820d7e1dc864c87954510b)]:
|
|
10
|
+
- @squide/core@5.4.3
|
|
11
|
+
|
|
3
12
|
## 3.2.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
6
15
|
|
|
7
|
-
- [#231](https://github.com/
|
|
16
|
+
- [#231](https://github.com/workleap/wl-squide/pull/231) [`3c6bce0`](https://github.com/workleap/wl-squide/commit/3c6bce0cd559d0b8517d644661b6fb2b818ab2f6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Packages now includes source code and sourcemap.
|
|
8
17
|
|
|
9
|
-
- Updated dependencies [[`3c6bce0`](https://github.com/
|
|
18
|
+
- Updated dependencies [[`3c6bce0`](https://github.com/workleap/wl-squide/commit/3c6bce0cd559d0b8517d644661b6fb2b818ab2f6)]:
|
|
10
19
|
- @squide/core@5.4.2
|
|
11
20
|
|
|
12
21
|
## 3.2.1
|
|
13
22
|
|
|
14
23
|
### Patch Changes
|
|
15
24
|
|
|
16
|
-
- [#221](https://github.com/
|
|
25
|
+
- [#221](https://github.com/workleap/wl-squide/pull/221) [`8411080`](https://github.com/workleap/wl-squide/commit/8411080dfd0df6d0eafb01888298154fa5e5d925) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fix deferred registrations.
|
|
17
26
|
|
|
18
|
-
- Updated dependencies [[`8411080`](https://github.com/
|
|
27
|
+
- Updated dependencies [[`8411080`](https://github.com/workleap/wl-squide/commit/8411080dfd0df6d0eafb01888298154fa5e5d925)]:
|
|
19
28
|
- @squide/core@5.4.1
|
|
20
29
|
|
|
21
30
|
## 3.2.0
|
|
22
31
|
|
|
23
32
|
### Minor Changes
|
|
24
33
|
|
|
25
|
-
- [#219](https://github.com/
|
|
34
|
+
- [#219](https://github.com/workleap/wl-squide/pull/219) [`25cb482`](https://github.com/workleap/wl-squide/commit/25cb482779ee280f3f7109de4607b92dcfeef7f3) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Now dispatching events to enable instrumentation packages for observability platforms.
|
|
26
35
|
|
|
27
36
|
### Patch Changes
|
|
28
37
|
|
|
29
|
-
- Updated dependencies [[`25cb482`](https://github.com/
|
|
38
|
+
- Updated dependencies [[`25cb482`](https://github.com/workleap/wl-squide/commit/25cb482779ee280f3f7109de4607b92dcfeef7f3)]:
|
|
30
39
|
- @squide/core@5.4.0
|
|
31
40
|
|
|
32
41
|
## 3.1.1
|
|
33
42
|
|
|
34
43
|
### Patch Changes
|
|
35
44
|
|
|
36
|
-
- Updated dependencies [[`8ee26fd`](https://github.com/
|
|
45
|
+
- Updated dependencies [[`8ee26fd`](https://github.com/workleap/wl-squide/commit/8ee26fd6ab7126bacf3dec900629fbd045dfd180)]:
|
|
37
46
|
- @squide/core@5.3.0
|
|
38
47
|
|
|
39
48
|
## 3.1.0
|
|
40
49
|
|
|
41
50
|
### Minor Changes
|
|
42
51
|
|
|
43
|
-
- [#204](https://github.com/
|
|
52
|
+
- [#204](https://github.com/workleap/wl-squide/pull/204) [`d3f7b9c`](https://github.com/workleap/wl-squide/commit/d3f7b9c6aa80249cd898916f6315ea27c4526812) Thanks [@patricklafrance](https://github.com/patricklafrance)! - The `registerNavigationItem` function now accepts a `sectionId` option to nest the item under a specific navigation section:
|
|
44
53
|
|
|
45
54
|
```ts
|
|
46
55
|
runtime.registerNavigationItem(
|
|
@@ -57,30 +66,30 @@
|
|
|
57
66
|
|
|
58
67
|
### Patch Changes
|
|
59
68
|
|
|
60
|
-
- Updated dependencies [[`d3f7b9c`](https://github.com/
|
|
69
|
+
- Updated dependencies [[`d3f7b9c`](https://github.com/workleap/wl-squide/commit/d3f7b9c6aa80249cd898916f6315ea27c4526812)]:
|
|
61
70
|
- @squide/core@5.2.0
|
|
62
71
|
|
|
63
72
|
## 3.0.2
|
|
64
73
|
|
|
65
74
|
### Patch Changes
|
|
66
75
|
|
|
67
|
-
- Updated dependencies [[`98e4839`](https://github.com/
|
|
76
|
+
- Updated dependencies [[`98e4839`](https://github.com/workleap/wl-squide/commit/98e48393fda27ebb2974ecc1e2f71b09f4e84953)]:
|
|
68
77
|
- @squide/core@5.1.0
|
|
69
78
|
|
|
70
79
|
## 3.0.1
|
|
71
80
|
|
|
72
81
|
### Patch Changes
|
|
73
82
|
|
|
74
|
-
- [#191](https://github.com/
|
|
83
|
+
- [#191](https://github.com/workleap/wl-squide/pull/191) [`2b62c53`](https://github.com/workleap/wl-squide/commit/2b62c539b0f3123cb47475566181e0b446ea6b40) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages description.
|
|
75
84
|
|
|
76
|
-
- Updated dependencies [[`2b62c53`](https://github.com/
|
|
85
|
+
- Updated dependencies [[`2b62c53`](https://github.com/workleap/wl-squide/commit/2b62c539b0f3123cb47475566181e0b446ea6b40)]:
|
|
77
86
|
- @squide/core@5.0.1
|
|
78
87
|
|
|
79
88
|
## 3.0.0
|
|
80
89
|
|
|
81
90
|
### Major Changes
|
|
82
91
|
|
|
83
|
-
- [#182](https://github.com/
|
|
92
|
+
- [#182](https://github.com/workleap/wl-squide/pull/182) [`58cf066`](https://github.com/workleap/wl-squide/commit/58cf066e87e23611510c254cca96016bd2bad08a) Thanks [@patricklafrance](https://github.com/patricklafrance)! - ## Firefly v9
|
|
84
93
|
|
|
85
94
|
This major version of @squide/firefly introduces TanStack Query as the official library for fetching the global data of a Squide's application and features a complete rewrite of the AppRouter component, which now uses a state machine to manage the application's bootstrapping flow.
|
|
86
95
|
|
|
@@ -88,7 +97,7 @@
|
|
|
88
97
|
|
|
89
98
|
Finally, with v9, Squide's philosophy has evolved. We used to describe Squide as a shell for federated applications. Now, we refer to Squide as a shell for modular applications. After playing with Squide's local module feature for a while, we discovered that Squide offers significant value even for non-federated applications, which triggered this shift in philosophy.
|
|
90
99
|
|
|
91
|
-
> For a full breakdown of the changres and a migration procedure, read the following [documentation](https://
|
|
100
|
+
> For a full breakdown of the changres and a migration procedure, read the following [documentation](https://workleap.github.io/wl-squide/guides/migrate-to-firefly-v9/).
|
|
92
101
|
|
|
93
102
|
## Breaking changes
|
|
94
103
|
|
|
@@ -130,124 +139,124 @@
|
|
|
130
139
|
- Navigation items now include a `$canRender` option, enabling modules to control whether a navigation item should be rendered.
|
|
131
140
|
- New `$key` option for navigation items.
|
|
132
141
|
|
|
133
|
-
For more details about the changes and a migration procedure, read the following [documentation](https://
|
|
142
|
+
For more details about the changes and a migration procedure, read the following [documentation](https://workleap.github.io/wl-squide/guides/migrate-to-firefly-v9/).
|
|
134
143
|
|
|
135
144
|
### Patch Changes
|
|
136
145
|
|
|
137
|
-
- Updated dependencies [[`58cf066`](https://github.com/
|
|
146
|
+
- Updated dependencies [[`58cf066`](https://github.com/workleap/wl-squide/commit/58cf066e87e23611510c254cca96016bd2bad08a)]:
|
|
138
147
|
- @squide/core@5.0.0
|
|
139
148
|
|
|
140
149
|
## 2.0.14
|
|
141
150
|
|
|
142
151
|
### Patch Changes
|
|
143
152
|
|
|
144
|
-
- Updated dependencies [[`89ace29`](https://github.com/
|
|
153
|
+
- Updated dependencies [[`89ace29`](https://github.com/workleap/wl-squide/commit/89ace29b9aeadbbe83cfa71dd137b9f1a115c283)]:
|
|
145
154
|
- @squide/core@4.0.0
|
|
146
155
|
|
|
147
156
|
## 2.0.13
|
|
148
157
|
|
|
149
158
|
### Patch Changes
|
|
150
159
|
|
|
151
|
-
- [#154](https://github.com/
|
|
160
|
+
- [#154](https://github.com/workleap/wl-squide/pull/154) [`e440515`](https://github.com/workleap/wl-squide/commit/e4405150a3c364fd4029c345399891614a434176) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages.
|
|
152
161
|
|
|
153
|
-
- Updated dependencies [[`e440515`](https://github.com/
|
|
162
|
+
- Updated dependencies [[`e440515`](https://github.com/workleap/wl-squide/commit/e4405150a3c364fd4029c345399891614a434176)]:
|
|
154
163
|
- @squide/core@3.4.0
|
|
155
164
|
|
|
156
165
|
## 2.0.12
|
|
157
166
|
|
|
158
167
|
### Patch Changes
|
|
159
168
|
|
|
160
|
-
- [#152](https://github.com/
|
|
169
|
+
- [#152](https://github.com/workleap/wl-squide/pull/152) [`d27fe71`](https://github.com/workleap/wl-squide/commit/d27fe717f899e395c3f01af86aac3e015159d719) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependency versions.
|
|
161
170
|
|
|
162
|
-
- Updated dependencies [[`d27fe71`](https://github.com/
|
|
171
|
+
- Updated dependencies [[`d27fe71`](https://github.com/workleap/wl-squide/commit/d27fe717f899e395c3f01af86aac3e015159d719)]:
|
|
163
172
|
- @squide/core@3.3.2
|
|
164
173
|
|
|
165
174
|
## 2.0.11
|
|
166
175
|
|
|
167
176
|
### Patch Changes
|
|
168
177
|
|
|
169
|
-
- Updated dependencies [[`d091846`](https://github.com/
|
|
178
|
+
- Updated dependencies [[`d091846`](https://github.com/workleap/wl-squide/commit/d091846502bed6b783b69ab8eff7ae36d8e25449)]:
|
|
170
179
|
- @squide/core@3.3.1
|
|
171
180
|
|
|
172
181
|
## 2.0.10
|
|
173
182
|
|
|
174
183
|
### Patch Changes
|
|
175
184
|
|
|
176
|
-
- Updated dependencies [[`39d0bbe4`](https://github.com/
|
|
185
|
+
- Updated dependencies [[`39d0bbe4`](https://github.com/workleap/wl-squide/commit/39d0bbe45902d54832e9aa8deb2c1949a2cf3c5f)]:
|
|
177
186
|
- @squide/core@3.3.0
|
|
178
187
|
|
|
179
188
|
## 2.0.9
|
|
180
189
|
|
|
181
190
|
### Patch Changes
|
|
182
191
|
|
|
183
|
-
- Updated dependencies [[`1cda1be`](https://github.com/
|
|
192
|
+
- Updated dependencies [[`1cda1be`](https://github.com/workleap/wl-squide/commit/1cda1be30779d1a1d5d2e21eac043baff20c0f7e)]:
|
|
184
193
|
- @squide/core@3.2.1
|
|
185
194
|
|
|
186
195
|
## 2.0.8
|
|
187
196
|
|
|
188
197
|
### Patch Changes
|
|
189
198
|
|
|
190
|
-
- Updated dependencies [[`7caa44b`](https://github.com/
|
|
199
|
+
- Updated dependencies [[`7caa44b`](https://github.com/workleap/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]:
|
|
191
200
|
- @squide/core@3.2.0
|
|
192
201
|
|
|
193
202
|
## 2.0.7
|
|
194
203
|
|
|
195
204
|
### Patch Changes
|
|
196
205
|
|
|
197
|
-
- [#128](https://github.com/
|
|
206
|
+
- [#128](https://github.com/workleap/wl-squide/pull/128) [`4c3b6f1`](https://github.com/workleap/wl-squide/commit/4c3b6f1929364844dda6c1190fc45c3b037e8df9) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Internally changed the usage of `setInterval` for `useSyncExternalStore`.
|
|
198
207
|
|
|
199
|
-
- Updated dependencies [[`4c3b6f1`](https://github.com/
|
|
208
|
+
- Updated dependencies [[`4c3b6f1`](https://github.com/workleap/wl-squide/commit/4c3b6f1929364844dda6c1190fc45c3b037e8df9)]:
|
|
200
209
|
- @squide/core@3.1.1
|
|
201
210
|
|
|
202
211
|
## 2.0.6
|
|
203
212
|
|
|
204
213
|
### Patch Changes
|
|
205
214
|
|
|
206
|
-
- [#122](https://github.com/
|
|
215
|
+
- [#122](https://github.com/workleap/wl-squide/pull/122) [`cda7873`](https://github.com/workleap/wl-squide/commit/cda7873dcffbf424a625cf40c56a12eacbb2632e) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Internal minor changes
|
|
207
216
|
|
|
208
217
|
## 2.0.5
|
|
209
218
|
|
|
210
219
|
### Patch Changes
|
|
211
220
|
|
|
212
|
-
- [#115](https://github.com/
|
|
221
|
+
- [#115](https://github.com/workleap/wl-squide/pull/115) [`568255a`](https://github.com/workleap/wl-squide/commit/568255a50a519e7d19c8c2b03909559686cd24c4) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - Request handlers registeration are now printed to the debug logs.
|
|
213
222
|
|
|
214
|
-
- Updated dependencies [[`568255a`](https://github.com/
|
|
223
|
+
- Updated dependencies [[`568255a`](https://github.com/workleap/wl-squide/commit/568255a50a519e7d19c8c2b03909559686cd24c4)]:
|
|
215
224
|
- @squide/core@3.1.0
|
|
216
225
|
|
|
217
226
|
## 2.0.4
|
|
218
227
|
|
|
219
228
|
### Patch Changes
|
|
220
229
|
|
|
221
|
-
- Updated dependencies [[`a9dda1c`](https://github.com/
|
|
230
|
+
- Updated dependencies [[`a9dda1c`](https://github.com/workleap/wl-squide/commit/a9dda1c3b010f616556fc3313c1934e20a26bc11)]:
|
|
222
231
|
- @squide/core@3.0.0
|
|
223
232
|
|
|
224
233
|
## 2.0.3
|
|
225
234
|
|
|
226
235
|
### Patch Changes
|
|
227
236
|
|
|
228
|
-
- [#108](https://github.com/
|
|
237
|
+
- [#108](https://github.com/workleap/wl-squide/pull/108) [`58097a2`](https://github.com/workleap/wl-squide/commit/58097a2fbaa7e5942cbe6f9b765fe471d52758d8) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated types in the function signatures for MSW 2.0
|
|
229
238
|
|
|
230
239
|
## 2.0.2
|
|
231
240
|
|
|
232
241
|
### Patch Changes
|
|
233
242
|
|
|
234
|
-
- [#103](https://github.com/
|
|
243
|
+
- [#103](https://github.com/workleap/wl-squide/pull/103) [`b72fca3`](https://github.com/workleap/wl-squide/commit/b72fca38385ddacbcd80376c9afd0c9485658d90) Thanks [@patricklafrance](https://github.com/patricklafrance)! - The `msw` dependency is now an optional `peerDependency`.
|
|
235
244
|
|
|
236
|
-
- Updated dependencies [[`b72fca3`](https://github.com/
|
|
245
|
+
- Updated dependencies [[`b72fca3`](https://github.com/workleap/wl-squide/commit/b72fca38385ddacbcd80376c9afd0c9485658d90)]:
|
|
237
246
|
- @squide/core@2.2.0
|
|
238
247
|
|
|
239
248
|
## 2.0.1
|
|
240
249
|
|
|
241
250
|
### Patch Changes
|
|
242
251
|
|
|
243
|
-
- Updated dependencies [[`1e77dca`](https://github.com/
|
|
252
|
+
- Updated dependencies [[`1e77dca`](https://github.com/workleap/wl-squide/commit/1e77dcaf26660e42f2d5054b3fa1cd018c2ec009)]:
|
|
244
253
|
- @squide/core@2.1.0
|
|
245
254
|
|
|
246
255
|
## 2.0.0
|
|
247
256
|
|
|
248
257
|
### Major Changes
|
|
249
258
|
|
|
250
|
-
- [#93](https://github.com/
|
|
259
|
+
- [#93](https://github.com/workleap/wl-squide/pull/93) [`d66a196`](https://github.com/workleap/wl-squide/commit/d66a196db9346803e1c996ef64089eda9aeff180) Thanks [@patricklafrance](https://github.com/patricklafrance)! - This is a new package to help with [Mock Service Worker](https://mswjs.io/) in a federated application.
|
|
251
260
|
|
|
252
261
|
It helps to register their request handlers:
|
|
253
262
|
|
|
@@ -276,5 +285,5 @@
|
|
|
276
285
|
|
|
277
286
|
### Patch Changes
|
|
278
287
|
|
|
279
|
-
- Updated dependencies [[`d66a196`](https://github.com/
|
|
288
|
+
- Updated dependencies [[`d66a196`](https://github.com/workleap/wl-squide/commit/d66a196db9346803e1c996ef64089eda9aeff180)]:
|
|
280
289
|
- @squide/core@2.0.0
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
View the [user's documentation](https://
|
|
5
|
+
View the [user's documentation](https://workleap.github.io/wl-squide/).
|
|
6
6
|
|
|
7
7
|
## 🤝 Contributing
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ View the [contributor's documentation](../../CONTRIBUTING.md).
|
|
|
10
10
|
|
|
11
11
|
## License
|
|
12
12
|
|
|
13
|
-
Copyright © 2024, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/
|
|
13
|
+
Copyright © 2024, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/workleap/workleap-license/blob/master/LICENSE.
|
package/dist/mswPlugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__ from "@squide/core";
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE__requestHandlerRegistry_js_564606de__ from "./requestHandlerRegistry.js";
|
|
3
3
|
|
|
4
|
-
;// CONCATENATED MODULE: external "
|
|
4
|
+
;// CONCATENATED MODULE: external "@squide/core"
|
|
5
5
|
|
|
6
6
|
;// CONCATENATED MODULE: external "./requestHandlerRegistry.js"
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__requestHandlerRegistry_js_564606de__ from
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
const MswPluginName = "msw-plugin";
|
|
12
|
-
class MswPlugin extends
|
|
12
|
+
class MswPlugin extends __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.Plugin {
|
|
13
13
|
#requestHandlerRegistry = new __WEBPACK_EXTERNAL_MODULE__requestHandlerRegistry_js_564606de__.RequestHandlerRegistry();
|
|
14
14
|
constructor(runtime){
|
|
15
15
|
super(MswPluginName, runtime);
|
|
@@ -24,7 +24,7 @@ class MswPlugin extends __WEBPACK_EXTERNAL_MODULE__core_src_index_js_d19dd8a6__.
|
|
|
24
24
|
}
|
|
25
25
|
function getMswPlugin(runtime) {
|
|
26
26
|
const plugin = runtime.getPlugin(MswPluginName);
|
|
27
|
-
if ((0,
|
|
27
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.isNil)(plugin)) {
|
|
28
28
|
throw new Error("[squide] The getMswPlugin function is called but no MswPlugin instance has been registered with the runtime.");
|
|
29
29
|
}
|
|
30
30
|
return plugin;
|
package/dist/mswPlugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mswPlugin.js","sources":["webpack://@squide/msw/./src/mswPlugin.ts"],"sourcesContent":["import { Plugin, isNil, type Runtime } from \"@squide/core\";\nimport type { RequestHandler } from \"msw\";\nimport { RequestHandlerRegistry } from \"./requestHandlerRegistry.ts\";\n\nexport const MswPluginName = \"msw-plugin\";\n\nexport class MswPlugin extends Plugin {\n readonly #requestHandlerRegistry = new RequestHandlerRegistry();\n\n constructor(runtime: Runtime) {\n super(MswPluginName, runtime);\n }\n\n registerRequestHandlers(handlers: RequestHandler[]) {\n this.#requestHandlerRegistry.add(handlers);\n\n this._runtime.logger.debug(\"[squide] The following MSW request handlers has been registered: \", handlers);\n }\n\n get requestHandlers(): RequestHandler[] {\n return this.#requestHandlerRegistry.handlers;\n }\n}\n\nexport function getMswPlugin(runtime: Runtime) {\n const plugin = runtime.getPlugin(MswPluginName);\n\n if (isNil(plugin)) {\n throw new Error(\"[squide] The getMswPlugin function is called but no MswPlugin instance has been registered with the runtime.\");\n }\n\n return plugin as MswPlugin;\n}\n"],"names":["Plugin","isNil","RequestHandlerRegistry","MswPluginName","MswPlugin","runtime","handlers","getMswPlugin","plugin","Error"],"mappings":";;;;;;;;AAA2D;AAEU;AAE9D,MAAMG,gBAAgB,aAAa;AAEnC,MAAMC,kBAAkBJ,
|
|
1
|
+
{"version":3,"file":"mswPlugin.js","sources":["webpack://@squide/msw/./src/mswPlugin.ts"],"sourcesContent":["import { Plugin, isNil, type Runtime } from \"@squide/core\";\nimport type { RequestHandler } from \"msw\";\nimport { RequestHandlerRegistry } from \"./requestHandlerRegistry.ts\";\n\nexport const MswPluginName = \"msw-plugin\";\n\nexport class MswPlugin extends Plugin {\n readonly #requestHandlerRegistry = new RequestHandlerRegistry();\n\n constructor(runtime: Runtime) {\n super(MswPluginName, runtime);\n }\n\n registerRequestHandlers(handlers: RequestHandler[]) {\n this.#requestHandlerRegistry.add(handlers);\n\n this._runtime.logger.debug(\"[squide] The following MSW request handlers has been registered: \", handlers);\n }\n\n get requestHandlers(): RequestHandler[] {\n return this.#requestHandlerRegistry.handlers;\n }\n}\n\nexport function getMswPlugin(runtime: Runtime) {\n const plugin = runtime.getPlugin(MswPluginName);\n\n if (isNil(plugin)) {\n throw new Error(\"[squide] The getMswPlugin function is called but no MswPlugin instance has been registered with the runtime.\");\n }\n\n return plugin as MswPlugin;\n}\n"],"names":["Plugin","isNil","RequestHandlerRegistry","MswPluginName","MswPlugin","runtime","handlers","getMswPlugin","plugin","Error"],"mappings":";;;;;;;;AAA2D;AAEU;AAE9D,MAAMG,gBAAgB,aAAa;AAEnC,MAAMC,kBAAkBJ,wDAAMA;IACxB,uBAAuB,GAAG,IAAIE,sFAAsBA,GAAG;IAEhE,YAAYG,OAAgB,CAAE;QAC1B,KAAK,CAACF,eAAeE;IACzB;IAEA,wBAAwBC,QAA0B,EAAE;QAChD,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAACA;QAEjC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,qEAAqEA;IACpG;IAEA,IAAI,kBAAoC;QACpC,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ;IAChD;AACJ;AAEO,SAASC,aAAaF,OAAgB;IACzC,MAAMG,SAASH,QAAQ,SAAS,CAACF;IAEjC,IAAIF,2DAAKA,CAACO,SAAS;QACf,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOD;AACX"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/msw",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.3",
|
|
5
5
|
"description": "Add support for MSW to @squide application shell.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/workleap/wl-squide.git",
|
|
10
10
|
"directory": "packages/msw"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@squide/core": "5.4.
|
|
39
|
+
"@squide/core": "5.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@rsbuild/core": "1.
|
|
43
|
-
"@rslib/core": "0.
|
|
44
|
-
"@typescript-eslint/parser": "8.
|
|
45
|
-
"@workleap/eslint-plugin": "3.
|
|
42
|
+
"@rsbuild/core": "1.2.19",
|
|
43
|
+
"@rslib/core": "0.5.4",
|
|
44
|
+
"@typescript-eslint/parser": "8.26.1",
|
|
45
|
+
"@workleap/eslint-plugin": "3.3.0",
|
|
46
46
|
"@workleap/rslib-configs": "1.0.2",
|
|
47
47
|
"@workleap/typescript-configs": "3.0.2",
|
|
48
48
|
"eslint": "8.57.0",
|
|
49
|
-
"msw": "2.7.
|
|
50
|
-
"typescript": "5.
|
|
49
|
+
"msw": "2.7.3",
|
|
50
|
+
"typescript": "5.8.2"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"engines": {
|