@itcase/storybook-config 1.2.3 → 1.2.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { http, HttpResponse } from 'msw'
|
|
1
|
+
import { http, HttpResponse, passthrough } from 'msw'
|
|
2
2
|
|
|
3
3
|
const serverErrorHandler = (errors) => {
|
|
4
4
|
return http.all('*', () => {
|
|
@@ -7,7 +7,12 @@ const serverErrorHandler = (errors) => {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const serverErrorDataHandler = (message) => {
|
|
10
|
-
return http.all('*', () => {
|
|
10
|
+
return http.all('*', (request, response, context) => {
|
|
11
|
+
console.log(response)
|
|
12
|
+
console.log(context)
|
|
13
|
+
if (request.method === 'GET') {
|
|
14
|
+
return request(passthrough())
|
|
15
|
+
}
|
|
11
16
|
return HttpResponse.json({ non_field_errors: message }, { status: 400 })
|
|
12
17
|
})
|
|
13
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Storybook configuration package",
|
|
6
6
|
"engines": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@storybook/addon-links": "^9.1.4",
|
|
82
82
|
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
83
83
|
"@storybook/addon-themes": "^9.1.4",
|
|
84
|
-
"@storybook/addon-webpack5-compiler-swc": "^
|
|
84
|
+
"@storybook/addon-webpack5-compiler-swc": "^4.0.0",
|
|
85
85
|
"@storybook/addon-vitest": "^9.1.4",
|
|
86
86
|
"@vitejs/plugin-react": "^5.0.2",
|
|
87
87
|
"@storybook/nextjs": "^9.1.4",
|