Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

chore: v2.0.0-canary.64

vholika76450674183
diff --git a/packages/admin/package.json b/packages/admin/package.json
index 7c259f75a..11b0fbcde 100644
--- a/packages/admin/package.json
+++ b/packages/admin/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/admin",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/cli/package.json b/packages/cli/package.json
index b58f59a70..24ba8d9cd 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/cli",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/client/package.json b/packages/client/package.json
index fd758d8a1..2321d7e02 100644
--- a/packages/client/package.json
+++ b/packages/client/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/client",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/core-plugin/package.json b/packages/core-plugin/package.json
index b73ad6570..21176cf5b 100644
--- a/packages/core-plugin/package.json
+++ b/packages/core-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/core-plugin",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/core-plugin/src/api/middlewares.ts b/packages/core-plugin/src/api/middlewares.ts
index 0a8243258..f0fa76bfa 100644
--- a/packages/core-plugin/src/api/middlewares.ts
+++ b/packages/core-plugin/src/api/middlewares.ts
@@ -6,6 +6,19 @@ import { vendorMiddlewares } from "./vendor/middlewares"
import { MedusaNextFunction, MedusaRequest, MedusaResponse } from "@medusajs/framework"
import { MercurModules } from "@mercurjs/types"
import VendorUIModuleService from "../modules/vendor-ui/services/vendor-ui-module-service"
+import AdminUIModuleService from "../modules/admin-ui/services/admin-ui-module-service"
+import { DashboardBase } from "../utils/dashboard/dashboard-base"
+
+function dashboardMiddleware(service: DashboardBase) {
+ return (req: MedusaRequest, res: MedusaResponse, next: MedusaNextFunction) => {
+ const options = service.getOptions()
+ if (options.disable) {
+ return next()
+ }
+ const app = service.getApp()
+ app(req, res, next)
+ }
+}
export default defineMiddlewares({
routes: [
@@ -16,13 +29,13 @@ export default defineMiddlewares({
matcher: "*",
method: ["GET"],
middlewares: [(req: MedusaRequest, res: MedusaResponse, next: MedusaNextFunction) => {
- const service = req.scope.resolve<VendorUIModuleService>(MercurModules.VENDOR_UI)
- const options = service.getOptions()
- if (options.disable) {
- return next()
- }
- const app = service.getApp()
- app(req, res, next)
+ const adminUI = req.scope.resolve<AdminUIModuleService>(MercurModules.ADMIN_UI)
+ const vendorUI = req.scope.resolve<VendorUIModuleService>(MercurModules.VENDOR_UI)
+
+ dashboardMiddleware(adminUI)(req, res, (err?: any) => {
+ if (err) return next(err)
+ dashboardMiddleware(vendorUI)(req, res, next)
+ })
}],
},
],
diff --git a/packages/dashboard-sdk/package.json b/packages/dashboard-sdk/package.json
index e334e165d..27d89a512 100644
--- a/packages/dashboard-sdk/package.json
+++ b/packages/dashboard-sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/dashboard-sdk",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/dashboard-shared/package.json b/packages/dashboard-shared/package.json
index 97bb2cce0..075276580 100644
--- a/packages/dashboard-shared/package.json
+++ b/packages/dashboard-shared/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/dashboard-shared",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/types/package.json b/packages/types/package.json
index 23754a0be..b9d9d74a5 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/types",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/packages/vendor/package.json b/packages/vendor/package.json
index fc388ee28..db4e51675 100644
--- a/packages/vendor/package.json
+++ b/packages/vendor/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/vendor",
- "version": "2.0.0-canary.63",
+ "version": "2.0.0-canary.64",
"repository": {
"type": "git",
"url": "https://github.com/mercurjs/mercur",
diff --git a/templates/basic/apps/admin/package.json b/templates/basic/apps/admin/package.json
index 937deb4e4..9e796b345 100644
--- a/templates/basic/apps/admin/package.json
+++ b/templates/basic/apps/admin/package.json
@@ -11,16 +11,16 @@
},
"dependencies": {
"@medusajs/icons": "^2.13.3",
- "@mercurjs/dashboard-sdk": "2.0.0-canary.63",
- "@mercurjs/dashboard-shared": "2.0.0-canary.63",
- "@mercurjs/admin": "2.0.0-canary.63",
+ "@mercurjs/dashboard-sdk": "2.0.0-canary.64",
+ "@mercurjs/dashboard-shared": "2.0.0-canary.64",
+ "@mercurjs/admin": "2.0.0-canary.64",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-i18next": "13.5.0",
"@tanstack/react-query": "5.64.2",
"@medusajs/ui": "4.1.1",
"react-router-dom": "6.30.3",
- "@mercurjs/client": "2.0.0-canary.63",
+ "@mercurjs/client": "2.0.0-canary.64",
"@acme/api": "*",
"@tanstack/react-table": "8.20.5",
"react-hook-form": "7.49.1",
diff --git a/templates/basic/apps/vendor/package.json b/templates/basic/apps/vendor/package.json
index 36995d4dd..9fd344305 100644
--- a/templates/basic/apps/vendor/package.json
+++ b/templates/basic/apps/vendor/package.json
@@ -11,16 +11,16 @@
},
"dependencies": {
"@medusajs/icons": "^2.13.3",
- "@mercurjs/dashboard-sdk": "2.0.0-canary.63",
- "@mercurjs/dashboard-shared": "2.0.0-canary.63",
- "@mercurjs/vendor": "2.0.0-canary.63",
+ "@mercurjs/dashboard-sdk": "2.0.0-canary.64",
+ "@mercurjs/dashboard-shared": "2.0.0-canary.64",
+ "@mercurjs/vendor": "2.0.0-canary.64",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-i18next": "13.5.0",
"@tanstack/react-query": "5.64.2",
"@medusajs/ui": "4.1.1",
"react-router-dom": "6.30.3",
- "@mercurjs/client": "2.0.0-canary.63",
+ "@mercurjs/client": "2.0.0-canary.64",
"@acme/api": "*",
"@tanstack/react-table": "8.20.5",
"react-hook-form": "7.49.1",
diff --git a/templates/basic/packages/api/package.json b/templates/basic/packages/api/package.json
index 6a32ac829..8055c9a21 100644
--- a/templates/basic/packages/api/package.json
+++ b/templates/basic/packages/api/package.json
@@ -36,8 +36,8 @@
"@medusajs/admin-shared": "^2.13.3",
"@medusajs/medusa": "^2.13.3",
"@medusajs/draft-order": "2.13.3",
- "@mercurjs/core-plugin": "2.0.0-canary.63",
- "@mercurjs/types": "2.0.0-canary.63",
+ "@mercurjs/core-plugin": "2.0.0-canary.64",
+ "@mercurjs/types": "2.0.0-canary.64",
"zod": "3.25.76",
"http-proxy-middleware": "^3.0.3"
},