@spree/seller-dashboard 1.0.0-rc.1 → 1.0.0-rc.2
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/dist/vite-plugin/index.js +2 -9
- package/package.json +3 -3
- package/src/vite/index.ts +2 -12
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import {
|
|
4
3
|
spreeDashboardPlugin as spreeDashboardCorePlugin
|
|
5
4
|
} from "@spree/dashboard-core/vite";
|
|
6
|
-
import {
|
|
5
|
+
import { resolveShellRoutesDir } from "@spree/dashboard-core/vite/discover";
|
|
7
6
|
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
|
|
8
7
|
import { index, layout, physical, rootRoute, route } from "@tanstack/virtual-file-routes";
|
|
9
8
|
function spreeSellerDashboardPlugin(options = {}) {
|
|
@@ -22,13 +21,7 @@ function spreeSellerDashboardPlugin(options = {}) {
|
|
|
22
21
|
];
|
|
23
22
|
}
|
|
24
23
|
function sellerRouterPlugin(hostRoot, options) {
|
|
25
|
-
const
|
|
26
|
-
const shellEntry = fromHost.resolve("@spree/seller-dashboard");
|
|
27
|
-
const shellRoutesDir = linkedPackagePath(
|
|
28
|
-
hostRoot,
|
|
29
|
-
"@spree/seller-dashboard",
|
|
30
|
-
path.join(path.dirname(shellEntry), "routes")
|
|
31
|
-
);
|
|
24
|
+
const shellRoutesDir = resolveShellRoutesDir(hostRoot, "@spree/seller-dashboard");
|
|
32
25
|
const virtualRouteConfig = rootRoute("__root.tsx", [
|
|
33
26
|
route("/login", "login.tsx"),
|
|
34
27
|
route("/forgot-password", "forgot-password.tsx"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spree/seller-dashboard",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Spree marketplace seller panel — the seller-facing counterpart to the admin dashboard.",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"react-hook-form": "^7.65.0",
|
|
50
50
|
"react-i18next": "^17.0.8",
|
|
51
51
|
"zod": "^4.4.3",
|
|
52
|
-
"@spree/dashboard-core": "1.0.0-rc.
|
|
53
|
-
"@spree/dashboard-ui": "1.0.0-rc.
|
|
52
|
+
"@spree/dashboard-core": "1.0.0-rc.2",
|
|
53
|
+
"@spree/dashboard-ui": "1.0.0-rc.2",
|
|
54
54
|
"@spree/seller-sdk": "1.0.0-rc.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/src/vite/index.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { createRequire } from 'node:module'
|
|
2
1
|
import path from 'node:path'
|
|
3
2
|
import {
|
|
4
3
|
type SpreeDashboardPluginOptions as CoreOptions,
|
|
5
4
|
spreeDashboardPlugin as spreeDashboardCorePlugin,
|
|
6
5
|
} from '@spree/dashboard-core/vite'
|
|
7
|
-
import {
|
|
6
|
+
import { resolveShellRoutesDir } from '@spree/dashboard-core/vite/discover'
|
|
8
7
|
import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
|
|
9
8
|
import { index, layout, physical, rootRoute, route } from '@tanstack/virtual-file-routes'
|
|
10
9
|
import type { PluginOption } from 'vite'
|
|
@@ -56,16 +55,7 @@ export function spreeSellerDashboardPlugin(
|
|
|
56
55
|
* authenticated branch whose pages all hang off a seller.
|
|
57
56
|
*/
|
|
58
57
|
function sellerRouterPlugin(hostRoot: string, options: SpreeSellerDashboardPluginOptions) {
|
|
59
|
-
const
|
|
60
|
-
// Resolve the shell's routes directory from wherever the host's
|
|
61
|
-
// `@spree/seller-dashboard` lives (workspace symlink or npm install). The
|
|
62
|
-
// `.` export maps to a file in src/, so `routes/` is its sibling.
|
|
63
|
-
const shellEntry = fromHost.resolve('@spree/seller-dashboard')
|
|
64
|
-
const shellRoutesDir = linkedPackagePath(
|
|
65
|
-
hostRoot,
|
|
66
|
-
'@spree/seller-dashboard',
|
|
67
|
-
path.join(path.dirname(shellEntry), 'routes'),
|
|
68
|
-
)
|
|
58
|
+
const shellRoutesDir = resolveShellRoutesDir(hostRoot, '@spree/seller-dashboard')
|
|
69
59
|
|
|
70
60
|
const virtualRouteConfig = rootRoute('__root.tsx', [
|
|
71
61
|
route('/login', 'login.tsx'),
|