diff --git a/.changeset/chatty-beds-smoke.md b/.changeset/chatty-beds-smoke.md
new file mode 100644
index 000000000000..da8b3af69f7a
--- /dev/null
+++ b/.changeset/chatty-beds-smoke.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/cli": patch
+---
+
+fix(cli): prevent exit on devtools error
+
+Updated the `dev` command's devtools runner logic to prevent the process from exiting when devtools server fails to start. Previously, the process would exit if devtools server failed to start regardless of the development server's status.
diff --git a/.changeset/clever-tigers-notice.md b/.changeset/clever-tigers-notice.md
new file mode 100644
index 000000000000..ba399bf17399
--- /dev/null
+++ b/.changeset/clever-tigers-notice.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/antd": patch
+---
+
+chore: unpin `antd` version that was causing build issues
+
+With `antd`'s `5.17.0` version, Next.js apps were stuck in the build process. To prevent this from breaking all Refine apps with Next.js, we've pinned the version to `5.16.5` as a workaround. Since then, the issue has been resolved by updating an internal dependency of `antd`, we no longer need to pin the version.
diff --git a/.changeset/ninety-cameras-give.md b/.changeset/ninety-cameras-give.md
new file mode 100644
index 000000000000..c8570f63093c
--- /dev/null
+++ b/.changeset/ninety-cameras-give.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/core": patch
+---
+
+refactor: omit `to` parameter if at root when unauthenticated
+
+If user is not authenticated, `` redirects to the provided route and appends the current route to the `to` parameter. With this change, if the current route is the root (`/`), the `to` parameter will be omitted.
diff --git a/.changeset/ninety-pots-smell.md b/.changeset/ninety-pots-smell.md
new file mode 100644
index 000000000000..c5b67f6612b4
--- /dev/null
+++ b/.changeset/ninety-pots-smell.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/mui": patch
+---
+
+fix: `transformMuiOperatorToCrudOperator` return type is wrong.
+
+This PR fixes the return type of `transformMuiOperatorToCrudOperator` function. It has return type `Exclude` but it also should exclude `and` operator to satisfy `LogicalFilter` type.
diff --git a/.changeset/shiny-cougars-visit.md b/.changeset/shiny-cougars-visit.md
new file mode 100644
index 000000000000..9ea9c65e68dc
--- /dev/null
+++ b/.changeset/shiny-cougars-visit.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/devtools-shared": patch
+---
+
+chore: prevent websocket closing errors in console
+
+When `` component is mounted in apps with React's strict mode, it will try to initialize the websocket connection twice and first one will be closed immediately before the connection is established. This PR will delay closing the websocket connection until it's established properly to prevent these errors from appearing in the console.
diff --git a/.changeset/stupid-rules-pull.md b/.changeset/stupid-rules-pull.md
new file mode 100644
index 000000000000..345d3152e808
--- /dev/null
+++ b/.changeset/stupid-rules-pull.md
@@ -0,0 +1,8 @@
+---
+"@refinedev/devtools-server": patch
+"@refinedev/devtools-shared": patch
+---
+
+refactor: use same port for ws and http servers
+
+This PR merges WebSocket and Http server ports into one (5001) to simplify the configuration and avoid port conflicts. Previously the WebSocket server was running on port 5002 and the Http server on port 5001. Now both servers are running on port 5001.
diff --git a/.changeset/tender-hats-lick.md b/.changeset/tender-hats-lick.md
new file mode 100644
index 000000000000..91d2d5097b5f
--- /dev/null
+++ b/.changeset/tender-hats-lick.md
@@ -0,0 +1,7 @@
+---
+"@refinedev/devtools-server": patch
+---
+
+chore(devtools-server): customizable exit function
+
+This change allows you to customize the exit function of the devtools server when using it via API.
diff --git a/.changeset/wise-dots-agree.md b/.changeset/wise-dots-agree.md
new file mode 100644
index 000000000000..59c4f5b65b8a
--- /dev/null
+++ b/.changeset/wise-dots-agree.md
@@ -0,0 +1,8 @@
+---
+"@refinedev/devtools-server": patch
+"@refinedev/devtools-ui": patch
+---
+
+fix: remove annoying auth error at initial project loads
+
+When users create a new project or their devtools token expires, their console is polluted with network errors due to missing authentication. This PR removes these errors by handling auth requests in a user-friendly way.
diff --git a/documentation/docs/guides-concepts/development/index.md b/documentation/docs/guides-concepts/development/index.md
index 1995f279bffe..92e8a9bbc042 100644
--- a/documentation/docs/guides-concepts/development/index.md
+++ b/documentation/docs/guides-concepts/development/index.md
@@ -277,7 +277,7 @@ As an alternative, you can also install the `@refinedev/devtools-server` package
**Required Ports**
-Devtools server will run on port `5001` and also run a WebSocket server on port `5002`. Make sure these ports are available on your machine. Both of these ports are required for devtools to work properly and maintain a connection between your app and the devtools interface.
+Devtools server will run on port `5001`. Devtools will serve HTTP and WebSocket connections on this port. Make sure the port is available on your machine.
## Using Inferencer
diff --git a/examples/access-control-casbin/package.json b/examples/access-control-casbin/package.json
index 5c6b4291fa43..595d04a88c54 100644
--- a/examples/access-control-casbin/package.json
+++ b/examples/access-control-casbin/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"casbin": "^5.15.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/access-control-cerbos/package.json b/examples/access-control-cerbos/package.json
index 79a06b6604de..e1194c915dfd 100644
--- a/examples/access-control-cerbos/package.json
+++ b/examples/access-control-cerbos/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/access-control-permify/package.json b/examples/access-control-permify/package.json
index e36e330f5b40..5841e3d9c33d 100644
--- a/examples/access-control-permify/package.json
+++ b/examples/access-control-permify/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/app-crm-minimal/package.json b/examples/app-crm-minimal/package.json
index bf9dbd8e5768..bb141fe25631 100644
--- a/examples/app-crm-minimal/package.json
+++ b/examples/app-crm-minimal/package.json
@@ -27,7 +27,7 @@
"@refinedev/nestjs-query": "^1.1.5",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"classnames": "^2.3.2",
"cross-env": "^7.0.3",
"dayjs": "^1.10.7",
diff --git a/examples/app-crm/package.json b/examples/app-crm/package.json
index a6e0da65747b..20f59c97fa74 100644
--- a/examples/app-crm/package.json
+++ b/examples/app-crm/package.json
@@ -33,7 +33,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
"algoliasearch": "^4.19.1",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"classnames": "^2.3.2",
"cross-env": "^7.0.3",
diff --git a/examples/auth-antd/package.json b/examples/auth-antd/package.json
index d45a041a7877..b711a174d12e 100644
--- a/examples/auth-antd/package.json
+++ b/examples/auth-antd/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/auth-auth0/package.json b/examples/auth-auth0/package.json
index d0d62aa5f74d..edf60b0bb817 100644
--- a/examples/auth-auth0/package.json
+++ b/examples/auth-auth0/package.json
@@ -31,7 +31,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/auth-google-login/package.json b/examples/auth-google-login/package.json
index b818bfc157f3..1d9502e43b90 100644
--- a/examples/auth-google-login/package.json
+++ b/examples/auth-google-login/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/auth-keycloak/package.json b/examples/auth-keycloak/package.json
index 985e13941809..960ca384f01c 100644
--- a/examples/auth-keycloak/package.json
+++ b/examples/auth-keycloak/package.json
@@ -31,7 +31,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"keycloak-js": "^20.0.3",
"react": "^18.0.0",
diff --git a/examples/auth-kinde/package.json b/examples/auth-kinde/package.json
index 85d2a99c9d0c..b0bf67cabbf6 100644
--- a/examples/auth-kinde/package.json
+++ b/examples/auth-kinde/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/auth-otp/package.json b/examples/auth-otp/package.json
index 1c742d4fca51..210c86f1a3f1 100644
--- a/examples/auth-otp/package.json
+++ b/examples/auth-otp/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/base-antd/package.json b/examples/base-antd/package.json
index fd6dc9267560..19b82ceeedc6 100644
--- a/examples/base-antd/package.json
+++ b/examples/base-antd/package.json
@@ -31,7 +31,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/blog-invoice-generator/package.json b/examples/blog-invoice-generator/package.json
index 7adfa50c5641..2c4566533dbf 100644
--- a/examples/blog-invoice-generator/package.json
+++ b/examples/blog-invoice-generator/package.json
@@ -30,7 +30,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/strapi-v4": "^6.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/blog-issue-tracker/package.json b/examples/blog-issue-tracker/package.json
index c2bc48c2831b..056a5c7366a5 100644
--- a/examples/blog-issue-tracker/package.json
+++ b/examples/blog-issue-tracker/package.json
@@ -36,7 +36,7 @@
"@types/node": "^18.16.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/blog-job-posting/package.json b/examples/blog-job-posting/package.json
index 45b760d6acc9..5c45be68c5d8 100644
--- a/examples/blog-job-posting/package.json
+++ b/examples/blog-job-posting/package.json
@@ -31,7 +31,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/blog-react-dnd/package.json b/examples/blog-react-dnd/package.json
index df48f07701b0..9286addbbb89 100644
--- a/examples/blog-react-dnd/package.json
+++ b/examples/blog-react-dnd/package.json
@@ -35,7 +35,7 @@
"@testing-library/user-event": "^14.1.1",
"@types/jest": "^29.2.4",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"immutability-helper": "^3.1.1",
"next": "^14.1.0",
diff --git a/examples/blog-refine-antd-dynamic-form/package.json b/examples/blog-refine-antd-dynamic-form/package.json
index 5ed697149100..c922b660e2f0 100644
--- a/examples/blog-refine-antd-dynamic-form/package.json
+++ b/examples/blog-refine-antd-dynamic-form/package.json
@@ -33,7 +33,7 @@
"@testing-library/react": "^13.1.1",
"@testing-library/user-event": "^14.1.1",
"@types/jest": "^29.2.4",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/blog-refine-digital-ocean/package.json b/examples/blog-refine-digital-ocean/package.json
index 6282a88de903..561f9e6771af 100644
--- a/examples/blog-refine-digital-ocean/package.json
+++ b/examples/blog-refine-digital-ocean/package.json
@@ -31,7 +31,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/nestjs-query": "^1.1.5",
"@refinedev/react-router-v6": "^4.5.9",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dayjs": "^1.10.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/blog-refine-markdown/package.json b/examples/blog-refine-markdown/package.json
index a1d0812a1596..edd2a270ad6b 100644
--- a/examples/blog-refine-markdown/package.json
+++ b/examples/blog-refine-markdown/package.json
@@ -31,7 +31,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/calendar-app/package.json b/examples/calendar-app/package.json
index 6263131e6dff..97275eb12f2a 100644
--- a/examples/calendar-app/package.json
+++ b/examples/calendar-app/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/command-palette-kbar/package.json b/examples/command-palette-kbar/package.json
index d75db1c73284..15eac6e71e4a 100644
--- a/examples/command-palette-kbar/package.json
+++ b/examples/command-palette-kbar/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-footer/package.json b/examples/customization-footer/package.json
index 9134478077e4..f0ad3035554f 100644
--- a/examples/customization-footer/package.json
+++ b/examples/customization-footer/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-login/package.json b/examples/customization-login/package.json
index 6c0eaf9086a0..6c7a9924d65c 100644
--- a/examples/customization-login/package.json
+++ b/examples/customization-login/package.json
@@ -31,7 +31,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/customization-offlayout-area/package.json b/examples/customization-offlayout-area/package.json
index 07eed9b8127b..b816e667cbc3 100644
--- a/examples/customization-offlayout-area/package.json
+++ b/examples/customization-offlayout-area/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-rtl/package.json b/examples/customization-rtl/package.json
index d79593f0548c..5166cce746bc 100644
--- a/examples/customization-rtl/package.json
+++ b/examples/customization-rtl/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-sider/package.json b/examples/customization-sider/package.json
index 01bfa868c231..1eb70799fed3 100644
--- a/examples/customization-sider/package.json
+++ b/examples/customization-sider/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-theme-antd/package.json b/examples/customization-theme-antd/package.json
index e79c37957c6c..7121cd34fb43 100644
--- a/examples/customization-theme-antd/package.json
+++ b/examples/customization-theme-antd/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/customization-top-menu-layout/package.json b/examples/customization-top-menu-layout/package.json
index fd2a1b523b0b..d1e5e9570940 100644
--- a/examples/customization-top-menu-layout/package.json
+++ b/examples/customization-top-menu-layout/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/data-provider-airtable/package.json b/examples/data-provider-airtable/package.json
index 1ed4108e97b6..29d96d84fc54 100644
--- a/examples/data-provider-airtable/package.json
+++ b/examples/data-provider-airtable/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/data-provider-appwrite-tutorial-docs/package.json b/examples/data-provider-appwrite-tutorial-docs/package.json
index c2d9b8096405..383700ecbf03 100644
--- a/examples/data-provider-appwrite-tutorial-docs/package.json
+++ b/examples/data-provider-appwrite-tutorial-docs/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@types/uuid": "^9.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/data-provider-appwrite/package.json b/examples/data-provider-appwrite/package.json
index fbeacb260cf8..95e6cd5acf3c 100644
--- a/examples/data-provider-appwrite/package.json
+++ b/examples/data-provider-appwrite/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/data-provider-hasura/package.json b/examples/data-provider-hasura/package.json
index b5380f8696d2..b5a0fabfb3c7 100644
--- a/examples/data-provider-hasura/package.json
+++ b/examples/data-provider-hasura/package.json
@@ -29,7 +29,7 @@
"@refinedev/hasura": "^6.6.2",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"graphql": "^15.6.1",
"graphql-tag": "^2.12.6",
"react": "^18.0.0",
diff --git a/examples/data-provider-multiple/package.json b/examples/data-provider-multiple/package.json
index 109c85cb2513..fc224d55245d 100644
--- a/examples/data-provider-multiple/package.json
+++ b/examples/data-provider-multiple/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/data-provider-nestjs-query/package.json b/examples/data-provider-nestjs-query/package.json
index e618b45097bc..c71c4b34272a 100644
--- a/examples/data-provider-nestjs-query/package.json
+++ b/examples/data-provider-nestjs-query/package.json
@@ -29,7 +29,7 @@
"@refinedev/nestjs-query": "^1.1.5",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"graphql": "^15.6.1",
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.9.1",
diff --git a/examples/data-provider-nestjsx-crud/package.json b/examples/data-provider-nestjsx-crud/package.json
index b807692e88be..8456453d4b32 100644
--- a/examples/data-provider-nestjsx-crud/package.json
+++ b/examples/data-provider-nestjsx-crud/package.json
@@ -28,7 +28,7 @@
"@refinedev/nestjsx-crud": "^5.0.6",
"@refinedev/react-router-v6": "^4.5.9",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/data-provider-sanity/package.json b/examples/data-provider-sanity/package.json
index 461a2bff642a..7fc15f1c1ea8 100644
--- a/examples/data-provider-sanity/package.json
+++ b/examples/data-provider-sanity/package.json
@@ -30,7 +30,7 @@
"@refinedev/simple-rest": "^5.0.6",
"@sanity/client": "^6.6.0",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/data-provider-strapi-v4/package.json b/examples/data-provider-strapi-v4/package.json
index 7175b44d4fb8..2cfed7ee5ef7 100644
--- a/examples/data-provider-strapi-v4/package.json
+++ b/examples/data-provider-strapi-v4/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/strapi-v4": "^6.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/data-provider-strapi/package.json b/examples/data-provider-strapi/package.json
index a507c39ef32d..5c8a5d242c02 100644
--- a/examples/data-provider-strapi/package.json
+++ b/examples/data-provider-strapi/package.json
@@ -32,7 +32,7 @@
"@testing-library/user-event": "^14.1.1",
"@types/jest": "^29.2.4",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/data-provider-supabase/package.json b/examples/data-provider-supabase/package.json
index 865c16048366..c69af9e365bb 100644
--- a/examples/data-provider-supabase/package.json
+++ b/examples/data-provider-supabase/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/supabase": "^5.7.10",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/field-antd-use-checkbox-group/package.json b/examples/field-antd-use-checkbox-group/package.json
index 25b6a0194396..e8549f7b0bee 100644
--- a/examples/field-antd-use-checkbox-group/package.json
+++ b/examples/field-antd-use-checkbox-group/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/field-antd-use-radio-group/package.json b/examples/field-antd-use-radio-group/package.json
index f2b10d874b48..e6a64edaa1b7 100644
--- a/examples/field-antd-use-radio-group/package.json
+++ b/examples/field-antd-use-radio-group/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/field-antd-use-select-basic/package.json b/examples/field-antd-use-select-basic/package.json
index b0bcec768723..e0be0737cb06 100644
--- a/examples/field-antd-use-select-basic/package.json
+++ b/examples/field-antd-use-select-basic/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/field-antd-use-select-infinite/package.json b/examples/field-antd-use-select-infinite/package.json
index 7200e13f6c8f..e05f79bf4913 100644
--- a/examples/field-antd-use-select-infinite/package.json
+++ b/examples/field-antd-use-select-infinite/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/finefoods-antd/package.json b/examples/finefoods-antd/package.json
index 8b3bcd461bb8..2f7311b697b6 100644
--- a/examples/finefoods-antd/package.json
+++ b/examples/finefoods-antd/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"antd-style": "^3.6.1",
"dayjs": "^1.10.7",
"google-map-react": "^2.1.10",
diff --git a/examples/form-antd-custom-validation/package.json b/examples/form-antd-custom-validation/package.json
index ad8d6ec85695..95ed8480b550 100644
--- a/examples/form-antd-custom-validation/package.json
+++ b/examples/form-antd-custom-validation/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/form-antd-mutation-mode/package.json b/examples/form-antd-mutation-mode/package.json
index fc4bfaecd8e2..9cae45d757e4 100644
--- a/examples/form-antd-mutation-mode/package.json
+++ b/examples/form-antd-mutation-mode/package.json
@@ -33,7 +33,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/form-antd-use-drawer-form/package.json b/examples/form-antd-use-drawer-form/package.json
index e523d73f0eb3..2a57b91d0b5d 100644
--- a/examples/form-antd-use-drawer-form/package.json
+++ b/examples/form-antd-use-drawer-form/package.json
@@ -29,7 +29,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/form-antd-use-form/package.json b/examples/form-antd-use-form/package.json
index e4da1bb7a8a1..4fdb07b5d99e 100644
--- a/examples/form-antd-use-form/package.json
+++ b/examples/form-antd-use-form/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/form-antd-use-modal-form/package.json b/examples/form-antd-use-modal-form/package.json
index 66e156d8a672..e0f477ba604a 100644
--- a/examples/form-antd-use-modal-form/package.json
+++ b/examples/form-antd-use-modal-form/package.json
@@ -32,7 +32,7 @@
"@types/node": "^18.16.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/form-antd-use-steps-form/package.json b/examples/form-antd-use-steps-form/package.json
index d00e87e3531d..e6285a0a501d 100644
--- a/examples/form-antd-use-steps-form/package.json
+++ b/examples/form-antd-use-steps-form/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/i18n-nextjs/package.json b/examples/i18n-nextjs/package.json
index 524aea133455..71b281fd7868 100644
--- a/examples/i18n-nextjs/package.json
+++ b/examples/i18n-nextjs/package.json
@@ -18,7 +18,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/nextjs-router": "^6.0.4",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"i18next": "^20.1.0",
"i18next-browser-languagedetector": "^6.1.1",
diff --git a/examples/i18n-react/package.json b/examples/i18n-react/package.json
index 6954aef4a3e3..49b419440ed6 100644
--- a/examples/i18n-react/package.json
+++ b/examples/i18n-react/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"i18next": "^20.1.0",
"i18next-browser-languagedetector": "^6.1.1",
"i18next-xhr-backend": "^3.2.2",
diff --git a/examples/import-export-antd/package.json b/examples/import-export-antd/package.json
index 022b78196afb..8d12728b3ff6 100644
--- a/examples/import-export-antd/package.json
+++ b/examples/import-export-antd/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/inferencer-antd/package.json b/examples/inferencer-antd/package.json
index 4e4ad1815255..e91db200130a 100644
--- a/examples/inferencer-antd/package.json
+++ b/examples/inferencer-antd/package.json
@@ -32,7 +32,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"i18next": "^20.1.0",
"i18next-browser-languagedetector": "^6.1.1",
"i18next-xhr-backend": "^3.2.2",
diff --git a/examples/inferencer-graphql-hasura/package.json b/examples/inferencer-graphql-hasura/package.json
index 46443e3af2b4..25df3c73789c 100644
--- a/examples/inferencer-graphql-hasura/package.json
+++ b/examples/inferencer-graphql-hasura/package.json
@@ -32,7 +32,7 @@
"@refinedev/inferencer": "^4.6.2",
"@refinedev/kbar": "^1.3.10",
"@refinedev/react-router-v6": "^4.5.9",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"graphql": "^15.6.1",
"graphql-request": "^5.2.0",
"react": "^18.0.0",
diff --git a/examples/input-custom/package.json b/examples/input-custom/package.json
index 350692007331..d145d593e730 100644
--- a/examples/input-custom/package.json
+++ b/examples/input-custom/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/input-date-picker/package.json b/examples/input-date-picker/package.json
index 4906ba353bfc..80af877fb653 100644
--- a/examples/input-date-picker/package.json
+++ b/examples/input-date-picker/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/live-provider-ably/package.json b/examples/live-provider-ably/package.json
index f76da78f0cf3..0d4bc3dd4338 100644
--- a/examples/live-provider-ably/package.json
+++ b/examples/live-provider-ably/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/loading-overtime/package.json b/examples/loading-overtime/package.json
index 34eb2630c902..0cbc989020cc 100644
--- a/examples/loading-overtime/package.json
+++ b/examples/loading-overtime/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-module-federation/apps/blog-posts/package.json b/examples/monorepo-module-federation/apps/blog-posts/package.json
index 5f7a55ea32bd..00d8225159a9 100644
--- a/examples/monorepo-module-federation/apps/blog-posts/package.json
+++ b/examples/monorepo-module-federation/apps/blog-posts/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
"@uiw/react-md-editor": "^3.23.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-module-federation/apps/categories/package.json b/examples/monorepo-module-federation/apps/categories/package.json
index 2e5743963861..2343d208f403 100644
--- a/examples/monorepo-module-federation/apps/categories/package.json
+++ b/examples/monorepo-module-federation/apps/categories/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
"@uiw/react-md-editor": "^3.23.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-module-federation/apps/host/package.json b/examples/monorepo-module-federation/apps/host/package.json
index 4dbd44c981c6..70c1891a0b9a 100644
--- a/examples/monorepo-module-federation/apps/host/package.json
+++ b/examples/monorepo-module-federation/apps/host/package.json
@@ -28,7 +28,7 @@
"@refinedev/kbar": "^1.1.0",
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-with-lerna-bootstrap/apps/my-refine-app/package.json b/examples/monorepo-with-lerna-bootstrap/apps/my-refine-app/package.json
index 9fbe7aef2a25..1e447c82063a 100644
--- a/examples/monorepo-with-lerna-bootstrap/apps/my-refine-app/package.json
+++ b/examples/monorepo-with-lerna-bootstrap/apps/my-refine-app/package.json
@@ -29,7 +29,7 @@
"@refinedev/kbar": "^1.1.0",
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-with-lerna/apps/my-refine-app/package.json b/examples/monorepo-with-lerna/apps/my-refine-app/package.json
index 9fbe7aef2a25..1e447c82063a 100644
--- a/examples/monorepo-with-lerna/apps/my-refine-app/package.json
+++ b/examples/monorepo-with-lerna/apps/my-refine-app/package.json
@@ -29,7 +29,7 @@
"@refinedev/kbar": "^1.1.0",
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/monorepo-with-turbo/apps/my-refine-app/package.json b/examples/monorepo-with-turbo/apps/my-refine-app/package.json
index 9fbe7aef2a25..1e447c82063a 100644
--- a/examples/monorepo-with-turbo/apps/my-refine-app/package.json
+++ b/examples/monorepo-with-turbo/apps/my-refine-app/package.json
@@ -29,7 +29,7 @@
"@refinedev/kbar": "^1.1.0",
"@refinedev/react-router-v6": "^4.1.0",
"@refinedev/simple-rest": "^4.5.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/multi-level-menu/package.json b/examples/multi-level-menu/package.json
index 9aebdafc3b57..79d50169c4a7 100644
--- a/examples/multi-level-menu/package.json
+++ b/examples/multi-level-menu/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/multi-tenancy-appwrite/package.json b/examples/multi-tenancy-appwrite/package.json
index bdc9bc930bfc..188c5a9310e0 100644
--- a/examples/multi-tenancy-appwrite/package.json
+++ b/examples/multi-tenancy-appwrite/package.json
@@ -28,7 +28,7 @@
"@refinedev/cli": "^2.16.31",
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/multi-tenancy-strapi/package.json b/examples/multi-tenancy-strapi/package.json
index ab09dbf169f2..f899e81bae03 100644
--- a/examples/multi-tenancy-strapi/package.json
+++ b/examples/multi-tenancy-strapi/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/strapi-v4": "^6.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/new-routing-example/package.json b/examples/new-routing-example/package.json
index bf24c77b81f4..43674d1cd85e 100644
--- a/examples/new-routing-example/package.json
+++ b/examples/new-routing-example/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/pixels-admin/package.json b/examples/pixels-admin/package.json
index 418be4ab87a2..7cfb46caba6d 100644
--- a/examples/pixels-admin/package.json
+++ b/examples/pixels-admin/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/supabase": "^5.7.10",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"casbin": "^5.15.2",
"dotenv": "^16.0.3",
"react": "^18.0.0",
diff --git a/examples/pixels/package.json b/examples/pixels/package.json
index cce705e51566..a3c7105a67aa 100644
--- a/examples/pixels/package.json
+++ b/examples/pixels/package.json
@@ -28,7 +28,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/supabase": "^5.7.10",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dotenv": "^16.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/refine-week-invoice-generator/package.json b/examples/refine-week-invoice-generator/package.json
index 56fc69a938ad..aa4f80bef61f 100644
--- a/examples/refine-week-invoice-generator/package.json
+++ b/examples/refine-week-invoice-generator/package.json
@@ -31,7 +31,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/strapi-v4": "^6.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/search/package.json b/examples/search/package.json
index 53af3f3c6110..ee5c64133b39 100644
--- a/examples/search/package.json
+++ b/examples/search/package.json
@@ -29,7 +29,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"lodash": "^4.17.21",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/server-side-form-validation-antd/package.json b/examples/server-side-form-validation-antd/package.json
index 80baffd01332..3825957cda50 100644
--- a/examples/server-side-form-validation-antd/package.json
+++ b/examples/server-side-form-validation-antd/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/table-antd-advanced/package.json b/examples/table-antd-advanced/package.json
index c60c75f45915..e65f5f47ffb9 100644
--- a/examples/table-antd-advanced/package.json
+++ b/examples/table-antd-advanced/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/table-antd-table-filter/package.json b/examples/table-antd-table-filter/package.json
index 6ac1926c8282..56465831685f 100644
--- a/examples/table-antd-table-filter/package.json
+++ b/examples/table-antd-table-filter/package.json
@@ -31,7 +31,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dayjs": "^1.10.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/table-antd-use-delete-many/package.json b/examples/table-antd-use-delete-many/package.json
index 77056cebfddc..57bb8d13f79e 100644
--- a/examples/table-antd-use-delete-many/package.json
+++ b/examples/table-antd-use-delete-many/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/table-antd-use-editable-table/package.json b/examples/table-antd-use-editable-table/package.json
index 5792d98335a4..2c90e807ec49 100644
--- a/examples/table-antd-use-editable-table/package.json
+++ b/examples/table-antd-use-editable-table/package.json
@@ -29,7 +29,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/table-antd-use-table/package.json b/examples/table-antd-use-table/package.json
index 9818d6cbeda4..3fab9a68720b 100644
--- a/examples/table-antd-use-table/package.json
+++ b/examples/table-antd-use-table/package.json
@@ -29,7 +29,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/table-antd-use-update-many/package.json b/examples/table-antd-use-update-many/package.json
index 09a913c8814a..7d6c2626688c 100644
--- a/examples/table-antd-use-update-many/package.json
+++ b/examples/table-antd-use-update-many/package.json
@@ -30,7 +30,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/theme-antd-demo/package.json b/examples/theme-antd-demo/package.json
index 1d26dae4f5de..8316fb3ed778 100644
--- a/examples/theme-antd-demo/package.json
+++ b/examples/theme-antd-demo/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/tutorial-antd/package.json b/examples/tutorial-antd/package.json
index 8fc4f2c26f37..06e5a61b5aeb 100644
--- a/examples/tutorial-antd/package.json
+++ b/examples/tutorial-antd/package.json
@@ -29,7 +29,7 @@
"@refinedev/inferencer": "^4.6.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/upload-antd-base64/package.json b/examples/upload-antd-base64/package.json
index 5e5bbfe2e58c..13e711308ef7 100644
--- a/examples/upload-antd-base64/package.json
+++ b/examples/upload-antd-base64/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/upload-antd-multipart/package.json b/examples/upload-antd-multipart/package.json
index aecbb76f8054..53af1b4dba91 100644
--- a/examples/upload-antd-multipart/package.json
+++ b/examples/upload-antd-multipart/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/use-modal-antd/package.json b/examples/use-modal-antd/package.json
index 0f360bff01e8..b821df02fc19 100644
--- a/examples/use-modal-antd/package.json
+++ b/examples/use-modal-antd/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/use-simple-list-antd/package.json b/examples/use-simple-list-antd/package.json
index 0ca2b8d74f09..aa811d2b0a13 100644
--- a/examples/use-simple-list-antd/package.json
+++ b/examples/use-simple-list-antd/package.json
@@ -27,7 +27,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dayjs": "^1.10.7",
"react": "^18.0.0",
"react-dom": "^18.0.0",
diff --git a/examples/with-custom-pages/package.json b/examples/with-custom-pages/package.json
index 4c8547cb78a2..449c29b50791 100644
--- a/examples/with-custom-pages/package.json
+++ b/examples/with-custom-pages/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/with-javascript/package.json b/examples/with-javascript/package.json
index c3fbc6144f3d..8de82103ba34 100644
--- a/examples/with-javascript/package.json
+++ b/examples/with-javascript/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/with-meta-properties/package.json b/examples/with-meta-properties/package.json
index 767089f9da41..f76e2c7599ab 100644
--- a/examples/with-meta-properties/package.json
+++ b/examples/with-meta-properties/package.json
@@ -15,7 +15,7 @@
"@refinedev/core": "^4.49.2",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/with-nextjs-next-auth/package.json b/examples/with-nextjs-next-auth/package.json
index ae8a2e003699..79402a8ebc1e 100644
--- a/examples/with-nextjs-next-auth/package.json
+++ b/examples/with-nextjs-next-auth/package.json
@@ -21,7 +21,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/nextjs-router": "^6.0.4",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"js-cookie": "^3.0.1",
"next": "^14.1.0",
diff --git a/examples/with-nextjs/package.json b/examples/with-nextjs/package.json
index 474b7f6a71f2..7783993d15e1 100644
--- a/examples/with-nextjs/package.json
+++ b/examples/with-nextjs/package.json
@@ -20,7 +20,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/nextjs-router": "^6.0.4",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cross-env": "^7.0.3",
"js-cookie": "^3.0.1",
"next": "^14.1.0",
diff --git a/examples/with-nx/package.json b/examples/with-nx/package.json
index c1047375e7c7..39b67b76941e 100644
--- a/examples/with-nx/package.json
+++ b/examples/with-nx/package.json
@@ -30,7 +30,7 @@
"@refinedev/kbar": "^1.3.10",
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/examples/with-remix-antd/package.json b/examples/with-remix-antd/package.json
index af25a86cf769..e86238b573e5 100644
--- a/examples/with-remix-antd/package.json
+++ b/examples/with-remix-antd/package.json
@@ -19,7 +19,7 @@
"@remix-run/node": "^2.4.0",
"@remix-run/react": "^2.4.0",
"@remix-run/serve": "^2.4.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cookie": "^0.5.0",
"js-cookie": "^3.0.1",
"react": "^18.0.0",
diff --git a/examples/with-remix-auth/package.json b/examples/with-remix-auth/package.json
index dc3fa0d29441..79f90fb3107d 100644
--- a/examples/with-remix-auth/package.json
+++ b/examples/with-remix-auth/package.json
@@ -18,7 +18,7 @@
"@remix-run/node": "^2.4.0",
"@remix-run/react": "^2.4.0",
"@remix-run/serve": "^2.4.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"cookie": "^0.5.0",
"js-cookie": "^3.0.1",
"react": "^18.0.0",
diff --git a/examples/with-storybook-antd/package.json b/examples/with-storybook-antd/package.json
index 0d952ccc29e4..a464b92312ae 100644
--- a/examples/with-storybook-antd/package.json
+++ b/examples/with-storybook-antd/package.json
@@ -41,7 +41,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1"
diff --git a/examples/with-web3/package.json b/examples/with-web3/package.json
index 6938fc760eca..461e0da22656 100644
--- a/examples/with-web3/package.json
+++ b/examples/with-web3/package.json
@@ -28,7 +28,7 @@
"@refinedev/react-router-v6": "^4.5.9",
"@refinedev/simple-rest": "^5.0.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.8.1",
diff --git a/packages/antd/package.json b/packages/antd/package.json
index 82fadd1e6f1d..ea5c0af8320e 100644
--- a/packages/antd/package.json
+++ b/packages/antd/package.json
@@ -46,7 +46,7 @@
"@ant-design/pro-layout": "7.17.12",
"@refinedev/ui-types": "^1.22.7",
"@tanstack/react-query": "^4.10.1",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dayjs": "^1.10.7",
"react-markdown": "^6.0.1",
"remark-gfm": "^1.0.0",
@@ -81,7 +81,7 @@
"@refinedev/core": "^4.46.1",
"@types/react": "^17.0.0 || ^18.0.0",
"@types/react-dom": "^17.0.0 || ^18.0.0",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"dayjs": "^1.10.7",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
diff --git a/packages/cli/src/commands/devtools/index.ts b/packages/cli/src/commands/devtools/index.ts
index 8d23825c37ba..6070bbd0aaa4 100644
--- a/packages/cli/src/commands/devtools/index.ts
+++ b/packages/cli/src/commands/devtools/index.ts
@@ -164,7 +164,9 @@ const devtoolsInstaller = async () => {
}
};
-export const devtoolsRunner = async () => {
+export const devtoolsRunner = async ({
+ exitOnError = true,
+}: { exitOnError?: boolean } = {}) => {
const corePackage = await getRefineCorePackage();
if (corePackage) {
@@ -184,7 +186,13 @@ export const devtoolsRunner = async () => {
}
}
- server();
+ server({
+ onError: () => {
+ if (exitOnError) {
+ process.exit(1);
+ }
+ },
+ }).catch((e) => {});
};
const getRefineCorePackage = async () => {
diff --git a/packages/cli/src/commands/runner/dev/index.ts b/packages/cli/src/commands/runner/dev/index.ts
index 4c3a88a9e440..1a7a455e511b 100644
--- a/packages/cli/src/commands/runner/dev/index.ts
+++ b/packages/cli/src/commands/runner/dev/index.ts
@@ -49,7 +49,7 @@ const action = async (
const devtools = params.devtools === "false" ? false : devtoolsDefault;
if (devtools) {
- devtoolsRunner();
+ devtoolsRunner({ exitOnError: false });
}
runScript(binPath, command);
diff --git a/packages/core/src/components/authenticated/index.spec.tsx b/packages/core/src/components/authenticated/index.spec.tsx
index 214f5789e3fd..9c60f1938d16 100644
--- a/packages/core/src/components/authenticated/index.spec.tsx
+++ b/packages/core/src/components/authenticated/index.spec.tsx
@@ -517,4 +517,93 @@ describe("Authenticated", () => {
),
);
});
+
+ it("should redirect to `/login` without `to` query if at root", async () => {
+ const mockGo = jest.fn();
+
+ const { queryByText } = render(
+
+ Custom Authenticated
+ ,
+ {
+ wrapper: TestWrapper({
+ dataProvider: MockJSONServer,
+ authProvider: {
+ ...mockAuthProvider,
+ check: async () => {
+ return {
+ authenticated: false,
+ redirectTo: "/login",
+ };
+ },
+ },
+ routerProvider: {
+ go: () => mockGo,
+ },
+ resources: [{ name: "posts", route: "posts" }],
+ }),
+ },
+ );
+
+ await act(async () => {
+ expect(queryByText("Custom Authenticated")).toBeNull();
+ });
+
+ await waitFor(() =>
+ expect(mockGo).toBeCalledWith(
+ expect.objectContaining({
+ to: "/login",
+ type: "replace",
+ query: undefined,
+ }),
+ ),
+ );
+ });
+
+ it("should redirect to `/login?to=/dashboard` if at /dashboard route", async () => {
+ const mockGo = jest.fn();
+
+ // Mocking first return value to simulate that user's location is at /dashboard
+ mockGo.mockReturnValueOnce("/dashboard");
+
+ const { queryByText } = render(
+
+ Custom Authenticated
+ ,
+ {
+ wrapper: TestWrapper({
+ dataProvider: MockJSONServer,
+ authProvider: {
+ ...mockAuthProvider,
+ check: async () => {
+ return {
+ authenticated: false,
+ redirectTo: "/login",
+ };
+ },
+ },
+ routerProvider: {
+ go: () => mockGo,
+ },
+ resources: [{ name: "posts", route: "posts" }],
+ }),
+ },
+ );
+
+ await act(async () => {
+ expect(queryByText("Custom Authenticated")).toBeNull();
+ });
+
+ await waitFor(() =>
+ expect(mockGo).toBeCalledWith(
+ expect.objectContaining({
+ to: "/login",
+ type: "replace",
+ query: expect.objectContaining({
+ to: "/dashboard",
+ }),
+ }),
+ ),
+ );
+ });
});
diff --git a/packages/core/src/components/authenticated/index.tsx b/packages/core/src/components/authenticated/index.tsx
index 0d4758f0172d..8eaee14e0c78 100644
--- a/packages/core/src/components/authenticated/index.tsx
+++ b/packages/core/src/components/authenticated/index.tsx
@@ -175,21 +175,25 @@ export function Authenticated({
: "";
return ;
}
+
+ const queryToValue: string | undefined = parsed.params?.to
+ ? parsed.params.to
+ : go({
+ to: pathname,
+ options: { keepQuery: true },
+ type: "path",
+ });
+
return (
1
+ ? {
+ to: queryToValue,
+ }
+ : undefined,
type: "replace",
}}
/>
diff --git a/packages/devtools-server/src/cli.ts b/packages/devtools-server/src/cli.ts
index f22f84ea1efb..3a424b92bcf9 100644
--- a/packages/devtools-server/src/cli.ts
+++ b/packages/devtools-server/src/cli.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env node
import { server } from "./index";
-server();
+server().catch(() => 0);
diff --git a/packages/devtools-server/src/constants.ts b/packages/devtools-server/src/constants.ts
index ef64601d563e..d99f874d7f07 100644
--- a/packages/devtools-server/src/constants.ts
+++ b/packages/devtools-server/src/constants.ts
@@ -1,7 +1,4 @@
-export const DEFAULT_WS_PORT = 5002;
export const DEFAULT_SERVER_PORT = 5001;
-
-export const WS_PORT = DEFAULT_WS_PORT;
export const SERVER_PORT = DEFAULT_SERVER_PORT;
export const REFINE_API_URL = __DEVELOPMENT__
diff --git a/packages/devtools-server/src/index.ts b/packages/devtools-server/src/index.ts
index e769fba97a18..41f305ace23d 100644
--- a/packages/devtools-server/src/index.ts
+++ b/packages/devtools-server/src/index.ts
@@ -1,7 +1,5 @@
import express from "express";
-import { cyanBright, bold } from "chalk";
-
import { DevtoolsEvent, receive, send } from "@refinedev/devtools-shared";
import { serveClient } from "./serve-client";
@@ -10,128 +8,145 @@ import { reloadOnChange } from "./reload-on-change";
import { setupServer } from "./setup-server";
import { Activity, createDb } from "./create-db";
import { serveApi } from "./serve-api";
-import { SERVER_PORT } from "./constants";
import { serveProxy } from "./serve-proxy";
import { serveOpenInEditor } from "./serve-open-in-editor";
type Options = {
projectPath?: string;
+ onError?: () => void;
};
-export const server = async ({ projectPath = process.cwd() }: Options = {}) => {
- const app = express();
- const ws = serveWs();
-
- const db = createDb();
+export const server = async ({
+ projectPath = process.cwd(),
+ onError = () => {
+ process.exit(1);
+ },
+}: Options = {}) => {
+ return new Promise((_, reject) => {
+ const app = express();
+ const server = setupServer(app, () => {
+ reject();
+ onError();
+ });
+ const ws = serveWs(server, () => {
+ reject();
+ onError();
+ });
- ws.on("connection", (client) => {
- // Initialize development client
- receive(client as any, DevtoolsEvent.DEVTOOLS_INIT, (data) => {
- if (db.connectedApp) {
- // send client the devtools client url if already connected
- send(client as any, DevtoolsEvent.DEVTOOLS_ALREADY_CONNECTED, {
- url: db.connectedApp,
- });
- } else {
- db.connectedApp = data.url;
- db.clientWs = client;
+ const db = createDb();
- ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_CONNECTED_APP, {
+ ws.on("connection", (client) => {
+ // Initialize development client
+ receive(client as any, DevtoolsEvent.DEVTOOLS_INIT, (data) => {
+ if (db.connectedApp) {
+ // send client the devtools client url if already connected
+ send(client as any, DevtoolsEvent.DEVTOOLS_ALREADY_CONNECTED, {
url: db.connectedApp,
});
- });
- }
- });
+ } else {
+ db.connectedApp = data.url;
+ db.clientWs = client;
- receive(client as any, DevtoolsEvent.ACTIVITY, (data) => {
- // match by identifier, if identifier is same, update data instead of pushing
- const index = db.activities.findIndex(
- (activity) => activity.identifier === data.identifier,
- );
+ ws.clients.forEach((c) => {
+ send(c as any, DevtoolsEvent.DEVTOOLS_CONNECTED_APP, {
+ url: db.connectedApp,
+ });
+ });
+ }
+ });
- const record: Activity = {
- ...data,
- createdAt: Date.now(),
- updatedAt: Date.now(),
- };
+ receive(client as any, DevtoolsEvent.ACTIVITY, (data) => {
+ // match by identifier, if identifier is same, update data instead of pushing
+ const index = db.activities.findIndex(
+ (activity) => activity.identifier === data.identifier,
+ );
- if (index > -1) {
- record.createdAt = db.activities[index].createdAt;
+ const record: Activity = {
+ ...data,
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ };
- db.activities[index] = record;
- } else {
- db.activities.push(record);
- }
+ if (index > -1) {
+ record.createdAt = db.activities[index].createdAt;
- ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_ACTIVITY_UPDATE, {
- updatedActivities: [record],
- });
- });
- });
+ db.activities[index] = record;
+ } else {
+ db.activities.push(record);
+ }
- receive(
- client as any,
- DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,
- ({ name }) => {
ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR_ACTION, {
- name,
+ send(c as any, DevtoolsEvent.DEVTOOLS_ACTIVITY_UPDATE, {
+ updatedActivities: [record],
});
});
- },
- );
+ });
- receive(
- client as any,
- DevtoolsEvent.DEVTOOLS_INVALIDATE_QUERY,
- ({ queryKey }) => {
- ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_INVALIDATE_QUERY_ACTION, {
- queryKey,
+ receive(
+ client as any,
+ DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,
+ ({ name }) => {
+ ws.clients.forEach((c) => {
+ send(c as any, DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR_ACTION, {
+ name,
+ });
});
- });
- },
- );
+ },
+ );
+
+ receive(
+ client as any,
+ DevtoolsEvent.DEVTOOLS_INVALIDATE_QUERY,
+ ({ queryKey }) => {
+ ws.clients.forEach((c) => {
+ send(c as any, DevtoolsEvent.DEVTOOLS_INVALIDATE_QUERY_ACTION, {
+ queryKey,
+ });
+ });
+ },
+ );
- receive(client as any, DevtoolsEvent.DEVTOOLS_LOGIN_SUCCESS, () => {
- ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_RELOAD_AFTER_LOGIN, {});
+ receive(client as any, DevtoolsEvent.DEVTOOLS_LOGIN_SUCCESS, () => {
+ ws.clients.forEach((c) => {
+ send(c as any, DevtoolsEvent.DEVTOOLS_RELOAD_AFTER_LOGIN, {});
+ });
});
- });
- // close connected app if client disconnects
- client.on("close", (_, reason) => {
- if (__DEVELOPMENT__) {
- console.log("Client disconnected", ws.clients.size);
- }
+ // close connected app if client disconnects
+ client.on("close", (_, reason) => {
+ if (__DEVELOPMENT__) {
+ console.log("Client disconnected", ws.clients.size);
+ }
- if (db.clientWs) {
- if (!ws.clients.has(db.clientWs)) {
- db.clientWs = null;
- db.connectedApp = null;
+ if (db.clientWs) {
+ if (!ws.clients.has(db.clientWs)) {
+ db.clientWs = null;
+ db.connectedApp = null;
- db.activities = [];
+ db.activities = [];
- ws.clients.forEach((c) => {
- send(c as any, DevtoolsEvent.DEVTOOLS_DISCONNECTED_APP, {
- url: db.connectedApp,
+ ws.clients.forEach((c) => {
+ send(c as any, DevtoolsEvent.DEVTOOLS_DISCONNECTED_APP, {
+ url: db.connectedApp,
+ });
});
- });
+ }
}
+ });
+
+ if (__DEVELOPMENT__) {
+ console.log("Client connected", ws.clients.size);
}
});
- if (__DEVELOPMENT__) {
- console.log("Client connected", ws.clients.size);
- }
- });
+ reloadOnChange(ws);
+ serveClient(app);
+ serveApi(app, db);
+ serveProxy(app);
+ serveOpenInEditor(app, projectPath);
- reloadOnChange(ws);
- serveClient(app);
- setupServer(app);
- serveApi(app, db);
- serveProxy(app);
- serveOpenInEditor(app, projectPath);
+ process.on("SIGTERM", () => {
+ reject();
+ });
+ });
};
diff --git a/packages/devtools-server/src/serve-proxy.ts b/packages/devtools-server/src/serve-proxy.ts
index d70bbdc2d0ca..7dd2f58f7792 100644
--- a/packages/devtools-server/src/serve-proxy.ts
+++ b/packages/devtools-server/src/serve-proxy.ts
@@ -137,7 +137,6 @@ export const serveProxy = async (app: Express) => {
const authProxy = createProxyMiddleware({
target: REFINE_API_URL,
- // secure: false,
changeOrigin: true,
pathRewrite: { "^/api/.auth": "/.auth" },
cookieDomainRewrite: {
@@ -170,7 +169,16 @@ export const serveProxy = async (app: Express) => {
saveAuth(token, jwt);
})(proxyRes, req, res);
}
- res.writeHead(proxyRes.statusCode || 500, proxyRes.headers);
+
+ if (proxyRes.statusCode === 401) {
+ res.writeHead(200, {
+ ...proxyRes.headers,
+ "Access-Control-Expose-Headers": `Refine-Is-Authenticated, ${proxyRes.headers["Access-Control-Expose-Headers"]}`,
+ });
+ } else {
+ res.writeHead(proxyRes.statusCode || 500, proxyRes.headers);
+ }
+
proxyRes.pipe(res, { end: true });
},
});
diff --git a/packages/devtools-server/src/serve-ws.ts b/packages/devtools-server/src/serve-ws.ts
index 2a6d86e385b0..4c95d14fef15 100644
--- a/packages/devtools-server/src/serve-ws.ts
+++ b/packages/devtools-server/src/serve-ws.ts
@@ -1,34 +1,35 @@
import WebSocket from "ws";
-import { SERVER_PORT, WS_PORT } from "./constants";
+import { SERVER_PORT } from "./constants";
import { DevtoolsEvent, send } from "@refinedev/devtools-shared";
import { bold, cyanBright } from "chalk";
+import http from "http";
-export const serveWs = () => {
- const ws = new WebSocket.Server({ port: WS_PORT }).on(
- "error",
- (error: any) => {
- if (error?.code === "EADDRINUSE") {
- console.error(
- `\n${cyanBright.bold("\u2717 ")}${bold(
- "Refine Devtools",
- )} failed to start. Port ${WS_PORT} is already in use, please make sure no other devtools server is running\n`,
- );
- } else {
- console.error(
- `\n${cyanBright.bold("\u2717 ")}${bold(
- "error from Refine Devtools",
- )}`,
- error,
- );
+export const serveWs = (
+ server: http.Server,
+ onError: () => void,
+) => {
+ const ws = new WebSocket.Server({ server }).on("error", (error: any) => {
+ if (error?.code === "EADDRINUSE") {
+ console.error(
+ `\n${cyanBright.bold("\u2717 ")}${bold(
+ "Refine Devtools server",
+ )} (websocket) failed to start. Port ${SERVER_PORT} is already in use.\n`,
+ );
+ } else {
+ console.error(
+ `\n${cyanBright.bold("\u2717 ")}${bold("error from refine devtools")}`,
+ error,
+ );
+ }
+ ws.close(() => {
+ if (__DEVELOPMENT__) {
+ console.log("Process terminated");
}
- process.exit(1);
- },
- );
+ });
+ onError();
+ });
ws.on("connection", (client) => {
- if (__DEVELOPMENT__) {
- console.log(`WebSocket server started on PORT ${WS_PORT}`);
- }
// send client the devtools client url
send(client as any, DevtoolsEvent.DEVTOOLS_HANDSHAKE, {
url: `http://localhost:${SERVER_PORT}`,
diff --git a/packages/devtools-server/src/setup-server.ts b/packages/devtools-server/src/setup-server.ts
index f391525416ff..ba23d7623f3f 100644
--- a/packages/devtools-server/src/setup-server.ts
+++ b/packages/devtools-server/src/setup-server.ts
@@ -1,20 +1,18 @@
import type { Express } from "express";
import { SERVER_PORT } from "./constants";
import { bold, cyanBright } from "chalk";
+import http from "http";
-export const setupServer = (app: Express) => {
- const server = app
- .listen(SERVER_PORT, () => {
- if (__DEVELOPMENT__) {
- console.log(`Server started on PORT ${SERVER_PORT}`);
- }
- })
+export const setupServer = (app: Express, onError: () => void) => {
+ const server = http.createServer(app);
+
+ server
.on("error", (error: any) => {
if (error?.code === "EADDRINUSE") {
console.error(
`\n${cyanBright.bold("\u2717 ")}${bold(
- "Refine Devtools",
- )} failed to start. Port ${SERVER_PORT} is already in use, please make sure no other devtools server is running\n`,
+ "Refine Devtools server",
+ )} (http) failed to start. Port ${SERVER_PORT} is already in use.\n`,
);
} else {
console.error(
@@ -24,7 +22,12 @@ export const setupServer = (app: Express) => {
error,
);
}
- process.exit(1);
+ server.close(() => {
+ if (__DEVELOPMENT__) {
+ console.log("Process terminated");
+ }
+ });
+ onError();
})
.on("listening", () => {
console.log(
@@ -41,4 +44,12 @@ export const setupServer = (app: Express) => {
}
});
});
+
+ server.listen(SERVER_PORT, undefined, undefined, () => {
+ if (__DEVELOPMENT__) {
+ console.log(`Server started on PORT ${SERVER_PORT}`);
+ }
+ });
+
+ return server;
};
diff --git a/packages/devtools-shared/src/context.tsx b/packages/devtools-shared/src/context.tsx
index 8e3b14c01467..2cfcdb470df7 100644
--- a/packages/devtools-shared/src/context.tsx
+++ b/packages/devtools-shared/src/context.tsx
@@ -14,7 +14,7 @@ type DevToolsContextValue = {
export const DevToolsContext = React.createContext({
__devtools: false,
- port: 5002,
+ port: 5001,
url: "localhost",
secure: false,
ws: null,
@@ -31,7 +31,7 @@ export const DevToolsContextProvider: React.FC = ({
}) => {
const [values, setValues] = React.useState({
__devtools: __devtools ?? false,
- port: port ?? 5002,
+ port: port ?? 5001,
url: "localhost",
secure: false,
ws: null,
@@ -69,7 +69,16 @@ export const DevToolsContextProvider: React.FC = ({
return () => {
unsubscribe();
- wsInstance.close(1000, window.location.origin);
+ // In strict mode, the WebSocket instance might not be connected yet
+ // so we need to wait for it to connect before closing it
+ // otherwise it will log an unnecessary error in the console
+ if (wsInstance.readyState === WebSocket.CONNECTING) {
+ wsInstance.addEventListener("open", () => {
+ wsInstance.close(1000, window.location.origin);
+ });
+ } else {
+ wsInstance.close(1000, window.location.origin);
+ }
};
}, []);
diff --git a/packages/devtools-ui/src/utils/auth.ts b/packages/devtools-ui/src/utils/auth.ts
index 295b8e4f7289..30a8c8de7d43 100644
--- a/packages/devtools-ui/src/utils/auth.ts
+++ b/packages/devtools-ui/src/utils/auth.ts
@@ -2,8 +2,9 @@ import { ory } from "./ory";
export const isAuthenticated = async () => {
try {
- await ory.toSession();
- return true;
+ const response = await ory.toSession();
+ const headerAuth = Boolean(response.headers["Refine-Is-Authenticated"]);
+ return headerAuth;
} catch (error: any) {
return false;
}
diff --git a/packages/live-previews/package.json b/packages/live-previews/package.json
index e9fed40df28c..8eed67de9326 100644
--- a/packages/live-previews/package.json
+++ b/packages/live-previews/package.json
@@ -49,7 +49,7 @@
"@tabler/icons-react": "^3.1.0",
"@tanstack/react-table": "^8.2.6",
"@uiw/react-md-editor": "^3.19.5",
- "antd": "5.16.5",
+ "antd": "^5.17.0",
"axios": "^1.6.2",
"base64url": "^3.0.1",
"casbin": "^5.15.2",
diff --git a/packages/mui/src/definitions/dataGrid/index.ts b/packages/mui/src/definitions/dataGrid/index.ts
index 6b4cd119c875..915f14217627 100644
--- a/packages/mui/src/definitions/dataGrid/index.ts
+++ b/packages/mui/src/definitions/dataGrid/index.ts
@@ -34,7 +34,7 @@ export const transformCrudSortingToSortModel = (
export const transformMuiOperatorToCrudOperator = (
operatorValue?: string,
-): Exclude => {
+): Exclude => {
if (!operatorValue) {
return "eq";
}
@@ -72,7 +72,7 @@ export const transformMuiOperatorToCrudOperator = (
case "isNotEmpty":
return "nnull";
default:
- return operatorValue as Exclude;
+ return operatorValue as Exclude;
}
};
@@ -81,11 +81,13 @@ export const transformFilterModelToCrudFilters = ({
logicOperator,
}: GridFilterModel): CrudFilters => {
const filters = items.map(({ field, value, operator }) => {
- return {
+ const filter: LogicalFilter = {
field: field,
value: ["isEmpty", "isNotEmpty"].includes(operator) ? true : value ?? "",
operator: transformMuiOperatorToCrudOperator(operator),
};
+
+ return filter;
});
if (logicOperator === GridLogicOperator.Or) {