@squide/msw 3.2.2 → 3.2.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/CHANGELOG.md +53 -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,62 @@
|
|
|
1
1
|
# @squide/msw
|
|
2
2
|
|
|
3
|
+
## 3.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`ddcb106`](https://github.com/workleap/wl-squide/commit/ddcb106a6b3522e09d1ab92c417725185ffc64e6)]:
|
|
8
|
+
- @squide/core@5.4.4
|
|
9
|
+
|
|
10
|
+
## 3.2.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#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.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`5d13eb0`](https://github.com/workleap/wl-squide/commit/5d13eb038a724b499b820d7e1dc864c87954510b)]:
|
|
17
|
+
- @squide/core@5.4.3
|
|
18
|
+
|
|
3
19
|
## 3.2.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
7
|
-
- [#231](https://github.com/
|
|
23
|
+
- [#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
24
|
|
|
9
|
-
- Updated dependencies [[`3c6bce0`](https://github.com/
|
|
25
|
+
- Updated dependencies [[`3c6bce0`](https://github.com/workleap/wl-squide/commit/3c6bce0cd559d0b8517d644661b6fb2b818ab2f6)]:
|
|
10
26
|
- @squide/core@5.4.2
|
|
11
27
|
|
|
12
28
|
## 3.2.1
|
|
13
29
|
|
|
14
30
|
### Patch Changes
|
|
15
31
|
|
|
16
|
-
- [#221](https://github.com/
|
|
32
|
+
- [#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
33
|
|
|
18
|
-
- Updated dependencies [[`8411080`](https://github.com/
|
|
34
|
+
- Updated dependencies [[`8411080`](https://github.com/workleap/wl-squide/commit/8411080dfd0df6d0eafb01888298154fa5e5d925)]:
|
|
19
35
|
- @squide/core@5.4.1
|
|
20
36
|
|
|
21
37
|
## 3.2.0
|
|
22
38
|
|
|
23
39
|
### Minor Changes
|
|
24
40
|
|
|
25
|
-
- [#219](https://github.com/
|
|
41
|
+
- [#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
42
|
|
|
27
43
|
### Patch Changes
|
|
28
44
|
|
|
29
|
-
- Updated dependencies [[`25cb482`](https://github.com/
|
|
45
|
+
- Updated dependencies [[`25cb482`](https://github.com/workleap/wl-squide/commit/25cb482779ee280f3f7109de4607b92dcfeef7f3)]:
|
|
30
46
|
- @squide/core@5.4.0
|
|
31
47
|
|
|
32
48
|
## 3.1.1
|
|
33
49
|
|
|
34
50
|
### Patch Changes
|
|
35
51
|
|
|
36
|
-
- Updated dependencies [[`8ee26fd`](https://github.com/
|
|
52
|
+
- Updated dependencies [[`8ee26fd`](https://github.com/workleap/wl-squide/commit/8ee26fd6ab7126bacf3dec900629fbd045dfd180)]:
|
|
37
53
|
- @squide/core@5.3.0
|
|
38
54
|
|
|
39
55
|
## 3.1.0
|
|
40
56
|
|
|
41
57
|
### Minor Changes
|
|
42
58
|
|
|
43
|
-
- [#204](https://github.com/
|
|
59
|
+
- [#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
60
|
|
|
45
61
|
```ts
|
|
46
62
|
runtime.registerNavigationItem(
|
|
@@ -57,30 +73,30 @@
|
|
|
57
73
|
|
|
58
74
|
### Patch Changes
|
|
59
75
|
|
|
60
|
-
- Updated dependencies [[`d3f7b9c`](https://github.com/
|
|
76
|
+
- Updated dependencies [[`d3f7b9c`](https://github.com/workleap/wl-squide/commit/d3f7b9c6aa80249cd898916f6315ea27c4526812)]:
|
|
61
77
|
- @squide/core@5.2.0
|
|
62
78
|
|
|
63
79
|
## 3.0.2
|
|
64
80
|
|
|
65
81
|
### Patch Changes
|
|
66
82
|
|
|
67
|
-
- Updated dependencies [[`98e4839`](https://github.com/
|
|
83
|
+
- Updated dependencies [[`98e4839`](https://github.com/workleap/wl-squide/commit/98e48393fda27ebb2974ecc1e2f71b09f4e84953)]:
|
|
68
84
|
- @squide/core@5.1.0
|
|
69
85
|
|
|
70
86
|
## 3.0.1
|
|
71
87
|
|
|
72
88
|
### Patch Changes
|
|
73
89
|
|
|
74
|
-
- [#191](https://github.com/
|
|
90
|
+
- [#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
91
|
|
|
76
|
-
- Updated dependencies [[`2b62c53`](https://github.com/
|
|
92
|
+
- Updated dependencies [[`2b62c53`](https://github.com/workleap/wl-squide/commit/2b62c539b0f3123cb47475566181e0b446ea6b40)]:
|
|
77
93
|
- @squide/core@5.0.1
|
|
78
94
|
|
|
79
95
|
## 3.0.0
|
|
80
96
|
|
|
81
97
|
### Major Changes
|
|
82
98
|
|
|
83
|
-
- [#182](https://github.com/
|
|
99
|
+
- [#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
100
|
|
|
85
101
|
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
102
|
|
|
@@ -88,7 +104,7 @@
|
|
|
88
104
|
|
|
89
105
|
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
106
|
|
|
91
|
-
> For a full breakdown of the changres and a migration procedure, read the following [documentation](https://
|
|
107
|
+
> 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
108
|
|
|
93
109
|
## Breaking changes
|
|
94
110
|
|
|
@@ -130,124 +146,124 @@
|
|
|
130
146
|
- Navigation items now include a `$canRender` option, enabling modules to control whether a navigation item should be rendered.
|
|
131
147
|
- New `$key` option for navigation items.
|
|
132
148
|
|
|
133
|
-
For more details about the changes and a migration procedure, read the following [documentation](https://
|
|
149
|
+
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
150
|
|
|
135
151
|
### Patch Changes
|
|
136
152
|
|
|
137
|
-
- Updated dependencies [[`58cf066`](https://github.com/
|
|
153
|
+
- Updated dependencies [[`58cf066`](https://github.com/workleap/wl-squide/commit/58cf066e87e23611510c254cca96016bd2bad08a)]:
|
|
138
154
|
- @squide/core@5.0.0
|
|
139
155
|
|
|
140
156
|
## 2.0.14
|
|
141
157
|
|
|
142
158
|
### Patch Changes
|
|
143
159
|
|
|
144
|
-
- Updated dependencies [[`89ace29`](https://github.com/
|
|
160
|
+
- Updated dependencies [[`89ace29`](https://github.com/workleap/wl-squide/commit/89ace29b9aeadbbe83cfa71dd137b9f1a115c283)]:
|
|
145
161
|
- @squide/core@4.0.0
|
|
146
162
|
|
|
147
163
|
## 2.0.13
|
|
148
164
|
|
|
149
165
|
### Patch Changes
|
|
150
166
|
|
|
151
|
-
- [#154](https://github.com/
|
|
167
|
+
- [#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
168
|
|
|
153
|
-
- Updated dependencies [[`e440515`](https://github.com/
|
|
169
|
+
- Updated dependencies [[`e440515`](https://github.com/workleap/wl-squide/commit/e4405150a3c364fd4029c345399891614a434176)]:
|
|
154
170
|
- @squide/core@3.4.0
|
|
155
171
|
|
|
156
172
|
## 2.0.12
|
|
157
173
|
|
|
158
174
|
### Patch Changes
|
|
159
175
|
|
|
160
|
-
- [#152](https://github.com/
|
|
176
|
+
- [#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
177
|
|
|
162
|
-
- Updated dependencies [[`d27fe71`](https://github.com/
|
|
178
|
+
- Updated dependencies [[`d27fe71`](https://github.com/workleap/wl-squide/commit/d27fe717f899e395c3f01af86aac3e015159d719)]:
|
|
163
179
|
- @squide/core@3.3.2
|
|
164
180
|
|
|
165
181
|
## 2.0.11
|
|
166
182
|
|
|
167
183
|
### Patch Changes
|
|
168
184
|
|
|
169
|
-
- Updated dependencies [[`d091846`](https://github.com/
|
|
185
|
+
- Updated dependencies [[`d091846`](https://github.com/workleap/wl-squide/commit/d091846502bed6b783b69ab8eff7ae36d8e25449)]:
|
|
170
186
|
- @squide/core@3.3.1
|
|
171
187
|
|
|
172
188
|
## 2.0.10
|
|
173
189
|
|
|
174
190
|
### Patch Changes
|
|
175
191
|
|
|
176
|
-
- Updated dependencies [[`39d0bbe4`](https://github.com/
|
|
192
|
+
- Updated dependencies [[`39d0bbe4`](https://github.com/workleap/wl-squide/commit/39d0bbe45902d54832e9aa8deb2c1949a2cf3c5f)]:
|
|
177
193
|
- @squide/core@3.3.0
|
|
178
194
|
|
|
179
195
|
## 2.0.9
|
|
180
196
|
|
|
181
197
|
### Patch Changes
|
|
182
198
|
|
|
183
|
-
- Updated dependencies [[`1cda1be`](https://github.com/
|
|
199
|
+
- Updated dependencies [[`1cda1be`](https://github.com/workleap/wl-squide/commit/1cda1be30779d1a1d5d2e21eac043baff20c0f7e)]:
|
|
184
200
|
- @squide/core@3.2.1
|
|
185
201
|
|
|
186
202
|
## 2.0.8
|
|
187
203
|
|
|
188
204
|
### Patch Changes
|
|
189
205
|
|
|
190
|
-
- Updated dependencies [[`7caa44b`](https://github.com/
|
|
206
|
+
- Updated dependencies [[`7caa44b`](https://github.com/workleap/wl-squide/commit/7caa44ba81a97d0705caf2f56e6536ae285c920d)]:
|
|
191
207
|
- @squide/core@3.2.0
|
|
192
208
|
|
|
193
209
|
## 2.0.7
|
|
194
210
|
|
|
195
211
|
### Patch Changes
|
|
196
212
|
|
|
197
|
-
- [#128](https://github.com/
|
|
213
|
+
- [#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
214
|
|
|
199
|
-
- Updated dependencies [[`4c3b6f1`](https://github.com/
|
|
215
|
+
- Updated dependencies [[`4c3b6f1`](https://github.com/workleap/wl-squide/commit/4c3b6f1929364844dda6c1190fc45c3b037e8df9)]:
|
|
200
216
|
- @squide/core@3.1.1
|
|
201
217
|
|
|
202
218
|
## 2.0.6
|
|
203
219
|
|
|
204
220
|
### Patch Changes
|
|
205
221
|
|
|
206
|
-
- [#122](https://github.com/
|
|
222
|
+
- [#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
223
|
|
|
208
224
|
## 2.0.5
|
|
209
225
|
|
|
210
226
|
### Patch Changes
|
|
211
227
|
|
|
212
|
-
- [#115](https://github.com/
|
|
228
|
+
- [#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
229
|
|
|
214
|
-
- Updated dependencies [[`568255a`](https://github.com/
|
|
230
|
+
- Updated dependencies [[`568255a`](https://github.com/workleap/wl-squide/commit/568255a50a519e7d19c8c2b03909559686cd24c4)]:
|
|
215
231
|
- @squide/core@3.1.0
|
|
216
232
|
|
|
217
233
|
## 2.0.4
|
|
218
234
|
|
|
219
235
|
### Patch Changes
|
|
220
236
|
|
|
221
|
-
- Updated dependencies [[`a9dda1c`](https://github.com/
|
|
237
|
+
- Updated dependencies [[`a9dda1c`](https://github.com/workleap/wl-squide/commit/a9dda1c3b010f616556fc3313c1934e20a26bc11)]:
|
|
222
238
|
- @squide/core@3.0.0
|
|
223
239
|
|
|
224
240
|
## 2.0.3
|
|
225
241
|
|
|
226
242
|
### Patch Changes
|
|
227
243
|
|
|
228
|
-
- [#108](https://github.com/
|
|
244
|
+
- [#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
245
|
|
|
230
246
|
## 2.0.2
|
|
231
247
|
|
|
232
248
|
### Patch Changes
|
|
233
249
|
|
|
234
|
-
- [#103](https://github.com/
|
|
250
|
+
- [#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
251
|
|
|
236
|
-
- Updated dependencies [[`b72fca3`](https://github.com/
|
|
252
|
+
- Updated dependencies [[`b72fca3`](https://github.com/workleap/wl-squide/commit/b72fca38385ddacbcd80376c9afd0c9485658d90)]:
|
|
237
253
|
- @squide/core@2.2.0
|
|
238
254
|
|
|
239
255
|
## 2.0.1
|
|
240
256
|
|
|
241
257
|
### Patch Changes
|
|
242
258
|
|
|
243
|
-
- Updated dependencies [[`1e77dca`](https://github.com/
|
|
259
|
+
- Updated dependencies [[`1e77dca`](https://github.com/workleap/wl-squide/commit/1e77dcaf26660e42f2d5054b3fa1cd018c2ec009)]:
|
|
244
260
|
- @squide/core@2.1.0
|
|
245
261
|
|
|
246
262
|
## 2.0.0
|
|
247
263
|
|
|
248
264
|
### Major Changes
|
|
249
265
|
|
|
250
|
-
- [#93](https://github.com/
|
|
266
|
+
- [#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
267
|
|
|
252
268
|
It helps to register their request handlers:
|
|
253
269
|
|
|
@@ -276,5 +292,5 @@
|
|
|
276
292
|
|
|
277
293
|
### Patch Changes
|
|
278
294
|
|
|
279
|
-
- Updated dependencies [[`d66a196`](https://github.com/
|
|
295
|
+
- Updated dependencies [[`d66a196`](https://github.com/workleap/wl-squide/commit/d66a196db9346803e1c996ef64089eda9aeff180)]:
|
|
280
296
|
- @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.4",
|
|
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.4"
|
|
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": {
|