@squide/msw 3.3.0 → 3.5.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 +22 -0
- package/dist/mswPlugin.js +1 -1
- package/dist/mswPlugin.js.map +1 -1
- package/package.json +2 -2
- package/src/mswPlugin.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @squide/msw
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#302](https://github.com/workleap/wl-squide/pull/302) [`e55c60b`](https://github.com/workleap/wl-squide/commit/e55c60b8e5a3c258a5a7d667ce990f73021f8e5d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the logging API.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`e55c60b`](https://github.com/workleap/wl-squide/commit/e55c60b8e5a3c258a5a7d667ce990f73021f8e5d)]:
|
|
12
|
+
- @squide/core@5.7.0
|
|
13
|
+
|
|
14
|
+
## 3.4.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#300](https://github.com/workleap/wl-squide/pull/300) [`8d3eae2`](https://github.com/workleap/wl-squide/commit/8d3eae2ee4dc0331f83047e3ef313c6abb15dc3f) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the logging API.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`8d3eae2`](https://github.com/workleap/wl-squide/commit/8d3eae2ee4dc0331f83047e3ef313c6abb15dc3f)]:
|
|
23
|
+
- @squide/core@5.6.0
|
|
24
|
+
|
|
3
25
|
## 3.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/mswPlugin.js
CHANGED
|
@@ -16,7 +16,7 @@ class MswPlugin extends Plugin {
|
|
|
16
16
|
}
|
|
17
17
|
registerRequestHandlers(handlers) {
|
|
18
18
|
this.#requestHandlerRegistry.add(handlers);
|
|
19
|
-
this._runtime.logger.
|
|
19
|
+
this._runtime.logger.withText("[squide] The following MSW request handlers has been registered:").withObject(handlers).debug();
|
|
20
20
|
}
|
|
21
21
|
get requestHandlers() {
|
|
22
22
|
return this.#requestHandlerRegistry.handlers;
|
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.
|
|
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\n .withText(\"[squide] The following MSW request handlers has been registered:\")\n .withObject(handlers)\n .debug();\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,MAAMA;IACxB,uBAAuB,GAAG,IAAIE,sBAAsBA,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,CACf,QAAQ,CAAC,oEACT,UAAU,CAACA,UACX,KAAK;IACd;IAEA,IAAI,kBAAoC;QACpC,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ;IAChD;AACJ;AAEO,SAASC,aAAaF,OAAgB;IACzC,MAAMG,SAASH,QAAQ,SAAS,CAACF;IAEjC,IAAIF,KAAKA,CAACO,SAAS;QACf,MAAM,IAAIC,MAAM;IACpB;IAEA,OAAOD;AACX"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/msw",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.0",
|
|
5
5
|
"description": "Add support for MSW to @squide application shell.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"msw": "^2.10.4"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@squide/core": "5.
|
|
34
|
+
"@squide/core": "5.7.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rsbuild/core": "1.4.7",
|
package/src/mswPlugin.ts
CHANGED
|
@@ -14,7 +14,10 @@ export class MswPlugin extends Plugin {
|
|
|
14
14
|
registerRequestHandlers(handlers: RequestHandler[]) {
|
|
15
15
|
this.#requestHandlerRegistry.add(handlers);
|
|
16
16
|
|
|
17
|
-
this._runtime.logger
|
|
17
|
+
this._runtime.logger
|
|
18
|
+
.withText("[squide] The following MSW request handlers has been registered:")
|
|
19
|
+
.withObject(handlers)
|
|
20
|
+
.debug();
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
get requestHandlers(): RequestHandler[] {
|