Merge pull request #1179 from zuiidea/cursor/upgrade-basic-lingui-deps-dc29

chore(deps): upgrade basic and with-lingui within current majors
This commit is contained in:
cursor[bot]
2026-10-17 08:37:57 +00:00
committed by GitHub
20 changed files with 7273 additions and 6653 deletions
+19 -20
View File
@@ -11,33 +11,32 @@
"fmt": "vp fmt", "fmt": "vp fmt",
"lint": "vp lint", "lint": "vp lint",
"check": "vp check --no-fmt", "check": "vp check --no-fmt",
"test:unit": "vitest run", "test:unit": "vp test run",
"test:e2e": "playwright test", "test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui" "test:e2e:ui": "playwright test --ui"
}, },
"dependencies": { "dependencies": {
"@tanstack/react-query": "^5.90.21", "@tanstack/react-query": "^5.104.3",
"@tanstack/react-router": "^1.167.4", "@tanstack/react-router": "^1.170.45",
"antd": "^6.3.3", "antd": "^6.6.6",
"lucide-react": "^1.7.0", "lucide-react": "^1.59.0",
"react": "^19.2.4", "react": "^19.3.1",
"react-dom": "^19.2.4", "react-dom": "^19.3.1",
"zod": "^4.3.6", "zod": "^4.6.7",
"zustand": "^5.0.12" "zustand": "^5.0.15"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.58.2", "@playwright/test": "^1.64.1",
"@tanstack/router-plugin": "^1.166.13", "@tanstack/router-plugin": "^1.168.47",
"@types/react": "^19.2.14", "@types/react": "^19.3.0",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.3.0",
"@vitejs/plugin-react-swc": "^4.3.0", "@vitejs/plugin-react-swc": "^4.3.3",
"msw": "^2.12.12", "msw": "^2.15.0",
"typescript": "~5.9.3", "typescript": "~6.0.3",
"vite": "npm:@voidzero-dev/vite-plus-core@latest", "vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
"vite-plus": "latest", "vite-plus": "0.3.3"
"vitest": "3.0.5"
}, },
"packageManager": "pnpm@10.32.1", "packageManager": "pnpm@10.33.2",
"msw": { "msw": {
"workerDirectory": [ "workerDirectory": [
"public" "public"
+1878 -2507
View File
File diff suppressed because it is too large Load Diff
+124 -99
View File
@@ -7,111 +7,114 @@
* - Please do NOT modify this file. * - Please do NOT modify this file.
*/ */
const PACKAGE_VERSION = "2.12.12"; const PACKAGE_VERSION = '2.15.0'
const INTEGRITY_CHECKSUM = "4db4a41e972cec1b64cc569c66952d82"; const INTEGRITY_CHECKSUM = '03cb67ac84128e63d7cd722a6e5b7f1e'
const IS_MOCKED_RESPONSE = Symbol("isMockedResponse"); const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set(); const activeClientIds = new Set()
addEventListener("install", function () { addEventListener('install', function () {
self.skipWaiting(); self.skipWaiting()
}); })
addEventListener("activate", function (event) { addEventListener('activate', function (event) {
event.waitUntil(self.clients.claim()); event.waitUntil(self.clients.claim())
}); })
addEventListener("message", async function (event) { addEventListener('message', async function (event) {
const clientId = Reflect.get(event.source || {}, "id"); const clientId = Reflect.get(event.source || {}, 'id')
if (!clientId || !self.clients) { if (!clientId || !self.clients) {
return; return
} }
const client = await self.clients.get(clientId); const client = await self.clients.get(clientId)
if (!client) { if (!client) {
return; return
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: "window", type: 'window',
}); })
switch (event.data) { switch (event.data) {
case "KEEPALIVE_REQUEST": { case 'KEEPALIVE_REQUEST': {
sendToClient(client, { sendToClient(client, {
type: "KEEPALIVE_RESPONSE", type: 'KEEPALIVE_RESPONSE',
}); })
break; break
} }
case "INTEGRITY_CHECK_REQUEST": { case 'INTEGRITY_CHECK_REQUEST': {
sendToClient(client, { sendToClient(client, {
type: "INTEGRITY_CHECK_RESPONSE", type: 'INTEGRITY_CHECK_RESPONSE',
payload: { payload: {
packageVersion: PACKAGE_VERSION, packageVersion: PACKAGE_VERSION,
checksum: INTEGRITY_CHECKSUM, checksum: INTEGRITY_CHECKSUM,
}, },
}); })
break; break
} }
case "MOCK_ACTIVATE": { case 'MOCK_ACTIVATE': {
activeClientIds.add(clientId); activeClientIds.add(clientId)
sendToClient(client, { sendToClient(client, {
type: "MOCKING_ENABLED", type: 'MOCKING_ENABLED',
payload: { payload: {
client: { client: {
id: client.id, id: client.id,
frameType: client.frameType, frameType: client.frameType,
}, },
}, },
}); })
break; break
} }
case "CLIENT_CLOSED": { case 'CLIENT_CLOSED': {
activeClientIds.delete(clientId); activeClientIds.delete(clientId)
const remainingClients = allClients.filter((client) => { const remainingClients = allClients.filter((client) => {
return client.id !== clientId; return client.id !== clientId
}); })
// Unregister itself when there are no more clients // Unregister itself when there are no more clients
if (remainingClients.length === 0) { if (remainingClients.length === 0) {
self.registration.unregister(); self.registration.unregister()
} }
break; break
} }
} }
}); })
addEventListener("fetch", function (event) { addEventListener('fetch', function (event) {
const requestInterceptedAt = Date.now(); const requestInterceptedAt = Date.now()
// Bypass navigation requests. // Bypass navigation requests.
if (event.request.mode === "navigate") { if (event.request.mode === 'navigate') {
return; return
} }
// Opening the DevTools triggers the "only-if-cached" request // Opening the DevTools triggers the "only-if-cached" request
// that cannot be handled by the worker. Bypass such requests. // that cannot be handled by the worker. Bypass such requests.
if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { if (
return; event.request.cache === 'only-if-cached' &&
event.request.mode !== 'same-origin'
) {
return
} }
// Bypass all requests when there are no active clients. // Bypass all requests when there are no active clients.
// Prevents the self-unregistered worked from handling requests // Prevents the self-unregistered worked from handling requests
// after it's been terminated (still remains active until the next reload). // after it's been terminated (still remains active until the next reload).
if (activeClientIds.size === 0) { if (activeClientIds.size === 0) {
return; return
} }
const requestId = crypto.randomUUID(); const requestId = crypto.randomUUID()
event.respondWith(handleRequest(event, requestId, requestInterceptedAt)); event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
}); })
/** /**
* @param {FetchEvent} event * @param {FetchEvent} event
@@ -119,23 +122,38 @@ addEventListener("fetch", function (event) {
* @param {number} requestInterceptedAt * @param {number} requestInterceptedAt
*/ */
async function handleRequest(event, requestId, requestInterceptedAt) { async function handleRequest(event, requestId, requestInterceptedAt) {
const client = await resolveMainClient(event); const client = await resolveMainClient(event)
const requestCloneForEvents = event.request.clone(); const requestCloneForEvents = event.request.clone()
const response = await getResponse(event, client, requestId, requestInterceptedAt); const response = await getResponse(
event,
client,
requestId,
requestInterceptedAt,
)
// Send back the response clone for the "response:*" life-cycle events. // Send back the response clone for the "response:*" life-cycle events.
// Ensure MSW is active and ready to handle the message, otherwise // Ensure MSW is active and ready to handle the message, otherwise
// this message will pend indefinitely. // this message will pend indefinitely.
if (client && activeClientIds.has(client.id)) { if (client && activeClientIds.has(client.id)) {
const serializedRequest = await serializeRequest(requestCloneForEvents); const serializedRequest = await serializeRequest(requestCloneForEvents)
// Omit the body of server-sent event stream responses.
// Cloning such responses would prevent client-side stream cancelations
// from reaching the original stream (a teed stream only cancels its
// source once both of its branches cancel) and would buffer the
// entire stream into the unconsumed clone indefinitely.
const isEventStreamResponse = response.headers
.get('content-type')
?.toLowerCase()
.startsWith('text/event-stream')
// Clone the response so both the client and the library could consume it. // Clone the response so both the client and the library could consume it.
const responseClone = response.clone(); const responseClone = isEventStreamResponse ? null : response.clone()
sendToClient( sendToClient(
client, client,
{ {
type: "RESPONSE", type: 'RESPONSE',
payload: { payload: {
isMockedResponse: IS_MOCKED_RESPONSE in response, isMockedResponse: IS_MOCKED_RESPONSE in response,
request: { request: {
@@ -143,19 +161,21 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
...serializedRequest, ...serializedRequest,
}, },
response: { response: {
type: responseClone.type, type: response.type,
status: responseClone.status, status: response.status,
statusText: responseClone.statusText, statusText: response.statusText,
headers: Object.fromEntries(responseClone.headers.entries()), headers: Object.fromEntries(response.headers.entries()),
body: responseClone.body, body: responseClone ? responseClone.body : null,
}, },
}, },
}, },
responseClone.body ? [serializedRequest.body, responseClone.body] : [], responseClone && responseClone.body
); ? [serializedRequest.body, responseClone.body]
: [],
)
} }
return response; return response
} }
/** /**
@@ -167,30 +187,30 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
* @returns {Promise<Client | undefined>} * @returns {Promise<Client | undefined>}
*/ */
async function resolveMainClient(event) { async function resolveMainClient(event) {
const client = await self.clients.get(event.clientId); const client = await self.clients.get(event.clientId)
if (activeClientIds.has(event.clientId)) { if (activeClientIds.has(event.clientId)) {
return client; return client
} }
if (client?.frameType === "top-level") { if (client?.frameType === 'top-level') {
return client; return client
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: "window", type: 'window',
}); })
return allClients return allClients
.filter((client) => { .filter((client) => {
// Get only those clients that are currently visible. // Get only those clients that are currently visible.
return client.visibilityState === "visible"; return client.visibilityState === 'visible'
}) })
.find((client) => { .find((client) => {
// Find the client ID that's recorded in the // Find the client ID that's recorded in the
// set of clients that have registered the worker. // set of clients that have registered the worker.
return activeClientIds.has(client.id); return activeClientIds.has(client.id)
}); })
} }
/** /**
@@ -203,34 +223,36 @@ async function resolveMainClient(event) {
async function getResponse(event, client, requestId, requestInterceptedAt) { async function getResponse(event, client, requestId, requestInterceptedAt) {
// Clone the request because it might've been already used // Clone the request because it might've been already used
// (i.e. its body has been read and sent to the client). // (i.e. its body has been read and sent to the client).
const requestClone = event.request.clone(); const requestClone = event.request.clone()
function passthrough() { function passthrough() {
// Cast the request headers to a new Headers instance // Cast the request headers to a new Headers instance
// so the headers can be manipulated with. // so the headers can be manipulated with.
const headers = new Headers(requestClone.headers); const headers = new Headers(requestClone.headers)
// Remove the "accept" header value that marked this request as passthrough. // Remove the "accept" header value that marked this request as passthrough.
// This prevents request alteration and also keeps it compliant with the // This prevents request alteration and also keeps it compliant with the
// user-defined CORS policies. // user-defined CORS policies.
const acceptHeader = headers.get("accept"); const acceptHeader = headers.get('accept')
if (acceptHeader) { if (acceptHeader) {
const values = acceptHeader.split(",").map((value) => value.trim()); const values = acceptHeader.split(',').map((value) => value.trim())
const filteredValues = values.filter((value) => value !== "msw/passthrough"); const filteredValues = values.filter(
(value) => value !== 'msw/passthrough',
)
if (filteredValues.length > 0) { if (filteredValues.length > 0) {
headers.set("accept", filteredValues.join(", ")); headers.set('accept', filteredValues.join(', '))
} else { } else {
headers.delete("accept"); headers.delete('accept')
} }
} }
return fetch(requestClone, { headers }); return fetch(requestClone, { headers })
} }
// Bypass mocking when the client is not active. // Bypass mocking when the client is not active.
if (!client) { if (!client) {
return passthrough(); return passthrough()
} }
// Bypass initial page load requests (i.e. static assets). // Bypass initial page load requests (i.e. static assets).
@@ -238,15 +260,15 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
// and is not ready to handle requests. // and is not ready to handle requests.
if (!activeClientIds.has(client.id)) { if (!activeClientIds.has(client.id)) {
return passthrough(); return passthrough()
} }
// Notify the client that a request has been intercepted. // Notify the client that a request has been intercepted.
const serializedRequest = await serializeRequest(event.request); const serializedRequest = await serializeRequest(event.request)
const clientMessage = await sendToClient( const clientMessage = await sendToClient(
client, client,
{ {
type: "REQUEST", type: 'REQUEST',
payload: { payload: {
id: requestId, id: requestId,
interceptedAt: requestInterceptedAt, interceptedAt: requestInterceptedAt,
@@ -254,19 +276,19 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
}, },
}, },
[serializedRequest.body], [serializedRequest.body],
); )
switch (clientMessage.type) { switch (clientMessage.type) {
case "MOCK_RESPONSE": { case 'MOCK_RESPONSE': {
return respondWithMock(clientMessage.data); return respondWithMock(clientMessage.data)
} }
case "PASSTHROUGH": { case 'PASSTHROUGH': {
return passthrough(); return passthrough()
} }
} }
return passthrough(); return passthrough()
} }
/** /**
@@ -277,18 +299,21 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
*/ */
function sendToClient(client, message, transferrables = []) { function sendToClient(client, message, transferrables = []) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const channel = new MessageChannel(); const channel = new MessageChannel()
channel.port1.onmessage = (event) => { channel.port1.onmessage = (event) => {
if (event.data && event.data.error) { if (event.data && event.data.error) {
return reject(event.data.error); return reject(event.data.error)
} }
resolve(event.data); resolve(event.data)
}; }
client.postMessage(message, [channel.port2, ...transferrables.filter(Boolean)]); client.postMessage(message, [
}); channel.port2,
...transferrables.filter(Boolean),
])
})
} }
/** /**
@@ -301,17 +326,17 @@ function respondWithMock(response) {
// instance will have status code set to 0. Since it's not possible to create // instance will have status code set to 0. Since it's not possible to create
// a Response instance with status code 0, handle that use-case separately. // a Response instance with status code 0, handle that use-case separately.
if (response.status === 0) { if (response.status === 0) {
return Response.error(); return Response.error()
} }
const mockedResponse = new Response(response.body, response); const mockedResponse = new Response(response.body, response)
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
value: true, value: true,
enumerable: true, enumerable: true,
}); })
return mockedResponse; return mockedResponse
} }
/** /**
@@ -332,5 +357,5 @@ async function serializeRequest(request) {
referrerPolicy: request.referrerPolicy, referrerPolicy: request.referrerPolicy,
body: await request.arrayBuffer(), body: await request.arrayBuffer(),
keepalive: request.keepalive, keepalive: request.keepalive,
}; }
} }
@@ -108,7 +108,7 @@ function mapSkeletonColumn<RecordType extends object>(
...c, ...c,
sorter: false, sorter: false,
sortOrder: undefined, sortOrder: undefined,
render: (_: unknown, __: RecordType) => { render: () => {
if (isActionColumn(c)) { if (isActionColumn(c)) {
const w = actionSkeletonDiameter(c); const w = actionSkeletonDiameter(c);
return ( return (
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vite-plus/test";
import { applyOptimisticListDelete, applyOptimisticListUpdate } from "./useResourceCRUD"; import { applyOptimisticListDelete, applyOptimisticListUpdate } from "./useResourceCRUD";
type Row = { id: string; title: string; n: number }; type Row = { id: string; title: string; n: number };
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vite-plus/test";
import { z } from "zod/v4"; import { z } from "zod/v4";
import { import {
paginatedListSchema, paginatedListSchema,
+52 -52
View File
@@ -9,32 +9,22 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root' import { Route as rootRouteImport } from './routes/__root'
import { Route as AuthRouteImport } from './routes/_auth'
import { Route as IndexRouteImport } from './routes/index' import { Route as IndexRouteImport } from './routes/index'
import { Route as RegisterIndexRouteImport } from './routes/register/index' import { Route as AuthRouteImport } from './routes/_auth'
import { Route as LoginIndexRouteImport } from './routes/login/index'
import { Route as R404IndexRouteImport } from './routes/404/index' import { Route as R404IndexRouteImport } from './routes/404/index'
import { Route as AuthUsersIndexRouteImport } from './routes/_auth/users/index' import { Route as LoginIndexRouteImport } from './routes/login/index'
import { Route as AuthDashboardIndexRouteImport } from './routes/_auth/dashboard/index' import { Route as RegisterIndexRouteImport } from './routes/register/index'
import { Route as Auth403IndexRouteImport } from './routes/_auth/403/index' import { Route as Auth403IndexRouteImport } from './routes/_auth/403/index'
import { Route as AuthDashboardIndexRouteImport } from './routes/_auth/dashboard/index'
import { Route as AuthUsersIndexRouteImport } from './routes/_auth/users/index'
const AuthRoute = AuthRouteImport.update({
id: '/_auth',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({ const IndexRoute = IndexRouteImport.update({
id: '/', id: '/',
path: '/', path: '/',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any) } as any)
const RegisterIndexRoute = RegisterIndexRouteImport.update({ const AuthRoute = AuthRouteImport.update({
id: '/register/', id: '/_auth',
path: '/register/',
getParentRoute: () => rootRouteImport,
} as any)
const LoginIndexRoute = LoginIndexRouteImport.update({
id: '/login/',
path: '/login/',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any) } as any)
const R404IndexRoute = R404IndexRouteImport.update({ const R404IndexRoute = R404IndexRouteImport.update({
@@ -42,9 +32,19 @@ const R404IndexRoute = R404IndexRouteImport.update({
path: '/404/', path: '/404/',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any) } as any)
const AuthUsersIndexRoute = AuthUsersIndexRouteImport.update({ const LoginIndexRoute = LoginIndexRouteImport.update({
id: '/users/', id: '/login/',
path: '/users/', path: '/login/',
getParentRoute: () => rootRouteImport,
} as any)
const RegisterIndexRoute = RegisterIndexRouteImport.update({
id: '/register/',
path: '/register/',
getParentRoute: () => rootRouteImport,
} as any)
const Auth403IndexRoute = Auth403IndexRouteImport.update({
id: '/403/',
path: '/403/',
getParentRoute: () => AuthRoute, getParentRoute: () => AuthRoute,
} as any) } as any)
const AuthDashboardIndexRoute = AuthDashboardIndexRouteImport.update({ const AuthDashboardIndexRoute = AuthDashboardIndexRouteImport.update({
@@ -52,9 +52,9 @@ const AuthDashboardIndexRoute = AuthDashboardIndexRouteImport.update({
path: '/dashboard/', path: '/dashboard/',
getParentRoute: () => AuthRoute, getParentRoute: () => AuthRoute,
} as any) } as any)
const Auth403IndexRoute = Auth403IndexRouteImport.update({ const AuthUsersIndexRoute = AuthUsersIndexRouteImport.update({
id: '/403/', id: '/users/',
path: '/403/', path: '/users/',
getParentRoute: () => AuthRoute, getParentRoute: () => AuthRoute,
} as any) } as any)
@@ -121,13 +121,6 @@ export interface RootRouteChildren {
declare module '@tanstack/react-router' { declare module '@tanstack/react-router' {
interface FileRoutesByPath { interface FileRoutesByPath {
'/_auth': {
id: '/_auth'
path: ''
fullPath: '/'
preLoaderRoute: typeof AuthRouteImport
parentRoute: typeof rootRouteImport
}
'/': { '/': {
id: '/' id: '/'
path: '/' path: '/'
@@ -135,18 +128,11 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport parentRoute: typeof rootRouteImport
} }
'/register/': { '/_auth': {
id: '/register/' id: '/_auth'
path: '/register' path: ''
fullPath: '/register/' fullPath: '/'
preLoaderRoute: typeof RegisterIndexRouteImport preLoaderRoute: typeof AuthRouteImport
parentRoute: typeof rootRouteImport
}
'/login/': {
id: '/login/'
path: '/login'
fullPath: '/login/'
preLoaderRoute: typeof LoginIndexRouteImport
parentRoute: typeof rootRouteImport parentRoute: typeof rootRouteImport
} }
'/404/': { '/404/': {
@@ -156,11 +142,25 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof R404IndexRouteImport preLoaderRoute: typeof R404IndexRouteImport
parentRoute: typeof rootRouteImport parentRoute: typeof rootRouteImport
} }
'/_auth/users/': { '/login/': {
id: '/_auth/users/' id: '/login/'
path: '/users' path: '/login'
fullPath: '/users/' fullPath: '/login/'
preLoaderRoute: typeof AuthUsersIndexRouteImport preLoaderRoute: typeof LoginIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/register/': {
id: '/register/'
path: '/register'
fullPath: '/register/'
preLoaderRoute: typeof RegisterIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/_auth/403/': {
id: '/_auth/403/'
path: '/403'
fullPath: '/403/'
preLoaderRoute: typeof Auth403IndexRouteImport
parentRoute: typeof AuthRoute parentRoute: typeof AuthRoute
} }
'/_auth/dashboard/': { '/_auth/dashboard/': {
@@ -170,11 +170,11 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AuthDashboardIndexRouteImport preLoaderRoute: typeof AuthDashboardIndexRouteImport
parentRoute: typeof AuthRoute parentRoute: typeof AuthRoute
} }
'/_auth/403/': { '/_auth/users/': {
id: '/_auth/403/' id: '/_auth/users/'
path: '/403' path: '/users'
fullPath: '/403/' fullPath: '/users/'
preLoaderRoute: typeof Auth403IndexRouteImport preLoaderRoute: typeof AuthUsersIndexRouteImport
parentRoute: typeof AuthRoute parentRoute: typeof AuthRoute
} }
} }
@@ -60,7 +60,7 @@ function DashboardSkeleton() {
active active
style={{ style={{
width: w, width: w,
height: Math.round(token.fontSizeHeading5 * token.lineHeightHeading5), height: Math.round(Number(token.fontSizeHeading5) * Number(token.lineHeightHeading5)),
}} }}
/> />
); );
+1 -1
View File
@@ -1,5 +1,5 @@
import path from "node:path"; import path from "node:path";
import { defineConfig } from "vitest/config"; import { defineConfig } from "vite-plus";
export default defineConfig({ export default defineConfig({
resolve: { resolve: {
+24 -25
View File
@@ -11,7 +11,7 @@
"fmt": "vp fmt", "fmt": "vp fmt",
"lint": "vp lint", "lint": "vp lint",
"check": "vp check --no-fmt", "check": "vp check --no-fmt",
"test:unit": "vitest run", "test:unit": "vp test run",
"test:e2e": "playwright test", "test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui", "test:e2e:ui": "playwright test --ui",
"i18n:extract": "vp exec lingui extract -- --clean", "i18n:extract": "vp exec lingui extract -- --clean",
@@ -19,34 +19,33 @@
"i18n:check": "pnpm run i18n:extract && git diff --exit-code -- src/locales" "i18n:check": "pnpm run i18n:extract && git diff --exit-code -- src/locales"
}, },
"dependencies": { "dependencies": {
"@lingui/core": "^6.0.0", "@lingui/core": "^6.10.0",
"@lingui/react": "^6.0.0", "@lingui/react": "^6.10.0",
"@tanstack/react-query": "^5.100.5", "@tanstack/react-query": "^5.104.3",
"@tanstack/react-router": "^1.168.25", "@tanstack/react-router": "^1.170.45",
"antd": "^6.3.7", "antd": "^6.6.6",
"lucide-react": "^1.11.0", "lucide-react": "^1.59.0",
"react": "^19.2.5", "react": "^19.3.1",
"react-dom": "^19.2.5", "react-dom": "^19.3.1",
"zod": "^4.3.6", "zod": "^4.6.7",
"zustand": "^5.0.12" "zustand": "^5.0.15"
}, },
"devDependencies": { "devDependencies": {
"@lingui/cli": "^6.0.0", "@lingui/cli": "^6.10.0",
"@lingui/format-po": "^6.0.0", "@lingui/format-po": "^6.10.0",
"@lingui/swc-plugin": "^6.0.0", "@lingui/swc-plugin": "^6.7.1",
"@lingui/vite-plugin": "^6.0.0", "@lingui/vite-plugin": "^6.10.0",
"@playwright/test": "^1.59.1", "@playwright/test": "^1.64.1",
"@tanstack/router-plugin": "^1.167.28", "@tanstack/router-plugin": "^1.168.47",
"@types/react": "^19.2.14", "@types/react": "^19.3.0",
"@types/react-dom": "^19.2.3", "@types/react-dom": "^19.3.0",
"@vitejs/plugin-react-swc": "^4.3.0", "@vitejs/plugin-react-swc": "^4.3.3",
"msw": "^2.13.6", "msw": "^2.15.0",
"typescript": "~6.0.3", "typescript": "~6.0.3",
"vite": "npm:@voidzero-dev/vite-plus-core@latest", "vite": "npm:@voidzero-dev/vite-plus-core@0.3.3",
"vite-plus": "latest", "vite-plus": "0.3.3"
"vitest": "4.1.5"
}, },
"packageManager": "pnpm@10.32.1", "packageManager": "pnpm@10.33.2",
"msw": { "msw": {
"workerDirectory": [ "workerDirectory": [
"public" "public"
+2362 -1951
View File
File diff suppressed because it is too large Load Diff
+124 -99
View File
@@ -7,111 +7,114 @@
* - Please do NOT modify this file. * - Please do NOT modify this file.
*/ */
const PACKAGE_VERSION = "2.12.12"; const PACKAGE_VERSION = '2.15.0'
const INTEGRITY_CHECKSUM = "4db4a41e972cec1b64cc569c66952d82"; const INTEGRITY_CHECKSUM = '03cb67ac84128e63d7cd722a6e5b7f1e'
const IS_MOCKED_RESPONSE = Symbol("isMockedResponse"); const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set(); const activeClientIds = new Set()
addEventListener("install", function () { addEventListener('install', function () {
self.skipWaiting(); self.skipWaiting()
}); })
addEventListener("activate", function (event) { addEventListener('activate', function (event) {
event.waitUntil(self.clients.claim()); event.waitUntil(self.clients.claim())
}); })
addEventListener("message", async function (event) { addEventListener('message', async function (event) {
const clientId = Reflect.get(event.source || {}, "id"); const clientId = Reflect.get(event.source || {}, 'id')
if (!clientId || !self.clients) { if (!clientId || !self.clients) {
return; return
} }
const client = await self.clients.get(clientId); const client = await self.clients.get(clientId)
if (!client) { if (!client) {
return; return
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: "window", type: 'window',
}); })
switch (event.data) { switch (event.data) {
case "KEEPALIVE_REQUEST": { case 'KEEPALIVE_REQUEST': {
sendToClient(client, { sendToClient(client, {
type: "KEEPALIVE_RESPONSE", type: 'KEEPALIVE_RESPONSE',
}); })
break; break
} }
case "INTEGRITY_CHECK_REQUEST": { case 'INTEGRITY_CHECK_REQUEST': {
sendToClient(client, { sendToClient(client, {
type: "INTEGRITY_CHECK_RESPONSE", type: 'INTEGRITY_CHECK_RESPONSE',
payload: { payload: {
packageVersion: PACKAGE_VERSION, packageVersion: PACKAGE_VERSION,
checksum: INTEGRITY_CHECKSUM, checksum: INTEGRITY_CHECKSUM,
}, },
}); })
break; break
} }
case "MOCK_ACTIVATE": { case 'MOCK_ACTIVATE': {
activeClientIds.add(clientId); activeClientIds.add(clientId)
sendToClient(client, { sendToClient(client, {
type: "MOCKING_ENABLED", type: 'MOCKING_ENABLED',
payload: { payload: {
client: { client: {
id: client.id, id: client.id,
frameType: client.frameType, frameType: client.frameType,
}, },
}, },
}); })
break; break
} }
case "CLIENT_CLOSED": { case 'CLIENT_CLOSED': {
activeClientIds.delete(clientId); activeClientIds.delete(clientId)
const remainingClients = allClients.filter((client) => { const remainingClients = allClients.filter((client) => {
return client.id !== clientId; return client.id !== clientId
}); })
// Unregister itself when there are no more clients // Unregister itself when there are no more clients
if (remainingClients.length === 0) { if (remainingClients.length === 0) {
self.registration.unregister(); self.registration.unregister()
} }
break; break
} }
} }
}); })
addEventListener("fetch", function (event) { addEventListener('fetch', function (event) {
const requestInterceptedAt = Date.now(); const requestInterceptedAt = Date.now()
// Bypass navigation requests. // Bypass navigation requests.
if (event.request.mode === "navigate") { if (event.request.mode === 'navigate') {
return; return
} }
// Opening the DevTools triggers the "only-if-cached" request // Opening the DevTools triggers the "only-if-cached" request
// that cannot be handled by the worker. Bypass such requests. // that cannot be handled by the worker. Bypass such requests.
if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { if (
return; event.request.cache === 'only-if-cached' &&
event.request.mode !== 'same-origin'
) {
return
} }
// Bypass all requests when there are no active clients. // Bypass all requests when there are no active clients.
// Prevents the self-unregistered worked from handling requests // Prevents the self-unregistered worked from handling requests
// after it's been terminated (still remains active until the next reload). // after it's been terminated (still remains active until the next reload).
if (activeClientIds.size === 0) { if (activeClientIds.size === 0) {
return; return
} }
const requestId = crypto.randomUUID(); const requestId = crypto.randomUUID()
event.respondWith(handleRequest(event, requestId, requestInterceptedAt)); event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
}); })
/** /**
* @param {FetchEvent} event * @param {FetchEvent} event
@@ -119,23 +122,38 @@ addEventListener("fetch", function (event) {
* @param {number} requestInterceptedAt * @param {number} requestInterceptedAt
*/ */
async function handleRequest(event, requestId, requestInterceptedAt) { async function handleRequest(event, requestId, requestInterceptedAt) {
const client = await resolveMainClient(event); const client = await resolveMainClient(event)
const requestCloneForEvents = event.request.clone(); const requestCloneForEvents = event.request.clone()
const response = await getResponse(event, client, requestId, requestInterceptedAt); const response = await getResponse(
event,
client,
requestId,
requestInterceptedAt,
)
// Send back the response clone for the "response:*" life-cycle events. // Send back the response clone for the "response:*" life-cycle events.
// Ensure MSW is active and ready to handle the message, otherwise // Ensure MSW is active and ready to handle the message, otherwise
// this message will pend indefinitely. // this message will pend indefinitely.
if (client && activeClientIds.has(client.id)) { if (client && activeClientIds.has(client.id)) {
const serializedRequest = await serializeRequest(requestCloneForEvents); const serializedRequest = await serializeRequest(requestCloneForEvents)
// Omit the body of server-sent event stream responses.
// Cloning such responses would prevent client-side stream cancelations
// from reaching the original stream (a teed stream only cancels its
// source once both of its branches cancel) and would buffer the
// entire stream into the unconsumed clone indefinitely.
const isEventStreamResponse = response.headers
.get('content-type')
?.toLowerCase()
.startsWith('text/event-stream')
// Clone the response so both the client and the library could consume it. // Clone the response so both the client and the library could consume it.
const responseClone = response.clone(); const responseClone = isEventStreamResponse ? null : response.clone()
sendToClient( sendToClient(
client, client,
{ {
type: "RESPONSE", type: 'RESPONSE',
payload: { payload: {
isMockedResponse: IS_MOCKED_RESPONSE in response, isMockedResponse: IS_MOCKED_RESPONSE in response,
request: { request: {
@@ -143,19 +161,21 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
...serializedRequest, ...serializedRequest,
}, },
response: { response: {
type: responseClone.type, type: response.type,
status: responseClone.status, status: response.status,
statusText: responseClone.statusText, statusText: response.statusText,
headers: Object.fromEntries(responseClone.headers.entries()), headers: Object.fromEntries(response.headers.entries()),
body: responseClone.body, body: responseClone ? responseClone.body : null,
}, },
}, },
}, },
responseClone.body ? [serializedRequest.body, responseClone.body] : [], responseClone && responseClone.body
); ? [serializedRequest.body, responseClone.body]
: [],
)
} }
return response; return response
} }
/** /**
@@ -167,30 +187,30 @@ async function handleRequest(event, requestId, requestInterceptedAt) {
* @returns {Promise<Client | undefined>} * @returns {Promise<Client | undefined>}
*/ */
async function resolveMainClient(event) { async function resolveMainClient(event) {
const client = await self.clients.get(event.clientId); const client = await self.clients.get(event.clientId)
if (activeClientIds.has(event.clientId)) { if (activeClientIds.has(event.clientId)) {
return client; return client
} }
if (client?.frameType === "top-level") { if (client?.frameType === 'top-level') {
return client; return client
} }
const allClients = await self.clients.matchAll({ const allClients = await self.clients.matchAll({
type: "window", type: 'window',
}); })
return allClients return allClients
.filter((client) => { .filter((client) => {
// Get only those clients that are currently visible. // Get only those clients that are currently visible.
return client.visibilityState === "visible"; return client.visibilityState === 'visible'
}) })
.find((client) => { .find((client) => {
// Find the client ID that's recorded in the // Find the client ID that's recorded in the
// set of clients that have registered the worker. // set of clients that have registered the worker.
return activeClientIds.has(client.id); return activeClientIds.has(client.id)
}); })
} }
/** /**
@@ -203,34 +223,36 @@ async function resolveMainClient(event) {
async function getResponse(event, client, requestId, requestInterceptedAt) { async function getResponse(event, client, requestId, requestInterceptedAt) {
// Clone the request because it might've been already used // Clone the request because it might've been already used
// (i.e. its body has been read and sent to the client). // (i.e. its body has been read and sent to the client).
const requestClone = event.request.clone(); const requestClone = event.request.clone()
function passthrough() { function passthrough() {
// Cast the request headers to a new Headers instance // Cast the request headers to a new Headers instance
// so the headers can be manipulated with. // so the headers can be manipulated with.
const headers = new Headers(requestClone.headers); const headers = new Headers(requestClone.headers)
// Remove the "accept" header value that marked this request as passthrough. // Remove the "accept" header value that marked this request as passthrough.
// This prevents request alteration and also keeps it compliant with the // This prevents request alteration and also keeps it compliant with the
// user-defined CORS policies. // user-defined CORS policies.
const acceptHeader = headers.get("accept"); const acceptHeader = headers.get('accept')
if (acceptHeader) { if (acceptHeader) {
const values = acceptHeader.split(",").map((value) => value.trim()); const values = acceptHeader.split(',').map((value) => value.trim())
const filteredValues = values.filter((value) => value !== "msw/passthrough"); const filteredValues = values.filter(
(value) => value !== 'msw/passthrough',
)
if (filteredValues.length > 0) { if (filteredValues.length > 0) {
headers.set("accept", filteredValues.join(", ")); headers.set('accept', filteredValues.join(', '))
} else { } else {
headers.delete("accept"); headers.delete('accept')
} }
} }
return fetch(requestClone, { headers }); return fetch(requestClone, { headers })
} }
// Bypass mocking when the client is not active. // Bypass mocking when the client is not active.
if (!client) { if (!client) {
return passthrough(); return passthrough()
} }
// Bypass initial page load requests (i.e. static assets). // Bypass initial page load requests (i.e. static assets).
@@ -238,15 +260,15 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
// means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
// and is not ready to handle requests. // and is not ready to handle requests.
if (!activeClientIds.has(client.id)) { if (!activeClientIds.has(client.id)) {
return passthrough(); return passthrough()
} }
// Notify the client that a request has been intercepted. // Notify the client that a request has been intercepted.
const serializedRequest = await serializeRequest(event.request); const serializedRequest = await serializeRequest(event.request)
const clientMessage = await sendToClient( const clientMessage = await sendToClient(
client, client,
{ {
type: "REQUEST", type: 'REQUEST',
payload: { payload: {
id: requestId, id: requestId,
interceptedAt: requestInterceptedAt, interceptedAt: requestInterceptedAt,
@@ -254,19 +276,19 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
}, },
}, },
[serializedRequest.body], [serializedRequest.body],
); )
switch (clientMessage.type) { switch (clientMessage.type) {
case "MOCK_RESPONSE": { case 'MOCK_RESPONSE': {
return respondWithMock(clientMessage.data); return respondWithMock(clientMessage.data)
} }
case "PASSTHROUGH": { case 'PASSTHROUGH': {
return passthrough(); return passthrough()
} }
} }
return passthrough(); return passthrough()
} }
/** /**
@@ -277,18 +299,21 @@ async function getResponse(event, client, requestId, requestInterceptedAt) {
*/ */
function sendToClient(client, message, transferrables = []) { function sendToClient(client, message, transferrables = []) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const channel = new MessageChannel(); const channel = new MessageChannel()
channel.port1.onmessage = (event) => { channel.port1.onmessage = (event) => {
if (event.data && event.data.error) { if (event.data && event.data.error) {
return reject(event.data.error); return reject(event.data.error)
} }
resolve(event.data); resolve(event.data)
}; }
client.postMessage(message, [channel.port2, ...transferrables.filter(Boolean)]); client.postMessage(message, [
}); channel.port2,
...transferrables.filter(Boolean),
])
})
} }
/** /**
@@ -301,17 +326,17 @@ function respondWithMock(response) {
// instance will have status code set to 0. Since it's not possible to create // instance will have status code set to 0. Since it's not possible to create
// a Response instance with status code 0, handle that use-case separately. // a Response instance with status code 0, handle that use-case separately.
if (response.status === 0) { if (response.status === 0) {
return Response.error(); return Response.error()
} }
const mockedResponse = new Response(response.body, response); const mockedResponse = new Response(response.body, response)
Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
value: true, value: true,
enumerable: true, enumerable: true,
}); })
return mockedResponse; return mockedResponse
} }
/** /**
@@ -332,5 +357,5 @@ async function serializeRequest(request) {
referrerPolicy: request.referrerPolicy, referrerPolicy: request.referrerPolicy,
body: await request.arrayBuffer(), body: await request.arrayBuffer(),
keepalive: request.keepalive, keepalive: request.keepalive,
}; }
} }
@@ -103,7 +103,7 @@ function mapSkeletonColumn<RecordType extends object>(
...c, ...c,
sorter: false, sorter: false,
sortOrder: undefined, sortOrder: undefined,
render: (_: unknown, __: RecordType) => { render: () => {
if (isActionColumn(c)) { if (isActionColumn(c)) {
const w = actionSkeletonDiameter(c); const w = actionSkeletonDiameter(c);
return ( return (
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vite-plus/test";
import { applyOptimisticListDelete, applyOptimisticListUpdate } from "./useResourceCRUD"; import { applyOptimisticListDelete, applyOptimisticListUpdate } from "./useResourceCRUD";
type Row = { id: string; title: string; n: number }; type Row = { id: string; title: string; n: number };
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vite-plus/test";
import { z } from "zod/v4"; import { z } from "zod/v4";
import { import {
paginatedListSchema, paginatedListSchema,
+154 -147
View File
@@ -8,184 +8,191 @@
// You should NOT make any changes in this file as it will be overwritten. // You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from "./routes/__root"; import { Route as rootRouteImport } from './routes/__root'
import { Route as AuthRouteImport } from "./routes/_auth"; import { Route as IndexRouteImport } from './routes/index'
import { Route as IndexRouteImport } from "./routes/index"; import { Route as AuthRouteImport } from './routes/_auth'
import { Route as RegisterIndexRouteImport } from "./routes/register/index"; import { Route as R404IndexRouteImport } from './routes/404/index'
import { Route as LoginIndexRouteImport } from "./routes/login/index"; import { Route as LoginIndexRouteImport } from './routes/login/index'
import { Route as R404IndexRouteImport } from "./routes/404/index"; import { Route as RegisterIndexRouteImport } from './routes/register/index'
import { Route as AuthUsersIndexRouteImport } from "./routes/_auth/users/index"; import { Route as Auth403IndexRouteImport } from './routes/_auth/403/index'
import { Route as AuthDashboardIndexRouteImport } from "./routes/_auth/dashboard/index"; import { Route as AuthDashboardIndexRouteImport } from './routes/_auth/dashboard/index'
import { Route as Auth403IndexRouteImport } from "./routes/_auth/403/index"; import { Route as AuthUsersIndexRouteImport } from './routes/_auth/users/index'
const AuthRoute = AuthRouteImport.update({
id: "/_auth",
getParentRoute: () => rootRouteImport,
} as any);
const IndexRoute = IndexRouteImport.update({ const IndexRoute = IndexRouteImport.update({
id: "/", id: '/',
path: "/", path: '/',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any); } as any)
const RegisterIndexRoute = RegisterIndexRouteImport.update({ const AuthRoute = AuthRouteImport.update({
id: "/register/", id: '/_auth',
path: "/register/",
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any); } as any)
const LoginIndexRoute = LoginIndexRouteImport.update({
id: "/login/",
path: "/login/",
getParentRoute: () => rootRouteImport,
} as any);
const R404IndexRoute = R404IndexRouteImport.update({ const R404IndexRoute = R404IndexRouteImport.update({
id: "/404/", id: '/404/',
path: "/404/", path: '/404/',
getParentRoute: () => rootRouteImport, getParentRoute: () => rootRouteImport,
} as any); } as any)
const AuthUsersIndexRoute = AuthUsersIndexRouteImport.update({ const LoginIndexRoute = LoginIndexRouteImport.update({
id: "/users/", id: '/login/',
path: "/users/", path: '/login/',
getParentRoute: () => AuthRoute, getParentRoute: () => rootRouteImport,
} as any); } as any)
const AuthDashboardIndexRoute = AuthDashboardIndexRouteImport.update({ const RegisterIndexRoute = RegisterIndexRouteImport.update({
id: "/dashboard/", id: '/register/',
path: "/dashboard/", path: '/register/',
getParentRoute: () => AuthRoute, getParentRoute: () => rootRouteImport,
} as any); } as any)
const Auth403IndexRoute = Auth403IndexRouteImport.update({ const Auth403IndexRoute = Auth403IndexRouteImport.update({
id: "/403/", id: '/403/',
path: "/403/", path: '/403/',
getParentRoute: () => AuthRoute, getParentRoute: () => AuthRoute,
} as any); } as any)
const AuthDashboardIndexRoute = AuthDashboardIndexRouteImport.update({
id: '/dashboard/',
path: '/dashboard/',
getParentRoute: () => AuthRoute,
} as any)
const AuthUsersIndexRoute = AuthUsersIndexRouteImport.update({
id: '/users/',
path: '/users/',
getParentRoute: () => AuthRoute,
} as any)
export interface FileRoutesByFullPath { export interface FileRoutesByFullPath {
"/": typeof IndexRoute; '/': typeof IndexRoute
"/404/": typeof R404IndexRoute; '/404/': typeof R404IndexRoute
"/login/": typeof LoginIndexRoute; '/login/': typeof LoginIndexRoute
"/register/": typeof RegisterIndexRoute; '/register/': typeof RegisterIndexRoute
"/403/": typeof Auth403IndexRoute; '/403/': typeof Auth403IndexRoute
"/dashboard/": typeof AuthDashboardIndexRoute; '/dashboard/': typeof AuthDashboardIndexRoute
"/users/": typeof AuthUsersIndexRoute; '/users/': typeof AuthUsersIndexRoute
} }
export interface FileRoutesByTo { export interface FileRoutesByTo {
"/": typeof IndexRoute; '/': typeof IndexRoute
"/404": typeof R404IndexRoute; '/404': typeof R404IndexRoute
"/login": typeof LoginIndexRoute; '/login': typeof LoginIndexRoute
"/register": typeof RegisterIndexRoute; '/register': typeof RegisterIndexRoute
"/403": typeof Auth403IndexRoute; '/403': typeof Auth403IndexRoute
"/dashboard": typeof AuthDashboardIndexRoute; '/dashboard': typeof AuthDashboardIndexRoute
"/users": typeof AuthUsersIndexRoute; '/users': typeof AuthUsersIndexRoute
} }
export interface FileRoutesById { export interface FileRoutesById {
__root__: typeof rootRouteImport; __root__: typeof rootRouteImport
"/": typeof IndexRoute; '/': typeof IndexRoute
"/_auth": typeof AuthRouteWithChildren; '/_auth': typeof AuthRouteWithChildren
"/404/": typeof R404IndexRoute; '/404/': typeof R404IndexRoute
"/login/": typeof LoginIndexRoute; '/login/': typeof LoginIndexRoute
"/register/": typeof RegisterIndexRoute; '/register/': typeof RegisterIndexRoute
"/_auth/403/": typeof Auth403IndexRoute; '/_auth/403/': typeof Auth403IndexRoute
"/_auth/dashboard/": typeof AuthDashboardIndexRoute; '/_auth/dashboard/': typeof AuthDashboardIndexRoute
"/_auth/users/": typeof AuthUsersIndexRoute; '/_auth/users/': typeof AuthUsersIndexRoute
} }
export interface FileRouteTypes { export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath; fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: "/" | "/404/" | "/login/" | "/register/" | "/403/" | "/dashboard/" | "/users/"; fullPaths:
fileRoutesByTo: FileRoutesByTo; | '/'
to: "/" | "/404" | "/login" | "/register" | "/403" | "/dashboard" | "/users"; | '/404/'
| '/login/'
| '/register/'
| '/403/'
| '/dashboard/'
| '/users/'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/404' | '/login' | '/register' | '/403' | '/dashboard' | '/users'
id: id:
| "__root__" | '__root__'
| "/" | '/'
| "/_auth" | '/_auth'
| "/404/" | '/404/'
| "/login/" | '/login/'
| "/register/" | '/register/'
| "/_auth/403/" | '/_auth/403/'
| "/_auth/dashboard/" | '/_auth/dashboard/'
| "/_auth/users/"; | '/_auth/users/'
fileRoutesById: FileRoutesById; fileRoutesById: FileRoutesById
} }
export interface RootRouteChildren { export interface RootRouteChildren {
IndexRoute: typeof IndexRoute; IndexRoute: typeof IndexRoute
AuthRoute: typeof AuthRouteWithChildren; AuthRoute: typeof AuthRouteWithChildren
R404IndexRoute: typeof R404IndexRoute; R404IndexRoute: typeof R404IndexRoute
LoginIndexRoute: typeof LoginIndexRoute; LoginIndexRoute: typeof LoginIndexRoute
RegisterIndexRoute: typeof RegisterIndexRoute; RegisterIndexRoute: typeof RegisterIndexRoute
} }
declare module "@tanstack/react-router" { declare module '@tanstack/react-router' {
interface FileRoutesByPath { interface FileRoutesByPath {
"/_auth": { '/': {
id: "/_auth"; id: '/'
path: ""; path: '/'
fullPath: "/"; fullPath: '/'
preLoaderRoute: typeof AuthRouteImport; preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport; parentRoute: typeof rootRouteImport
}; }
"/": { '/_auth': {
id: "/"; id: '/_auth'
path: "/"; path: ''
fullPath: "/"; fullPath: '/'
preLoaderRoute: typeof IndexRouteImport; preLoaderRoute: typeof AuthRouteImport
parentRoute: typeof rootRouteImport; parentRoute: typeof rootRouteImport
}; }
"/register/": { '/404/': {
id: "/register/"; id: '/404/'
path: "/register"; path: '/404'
fullPath: "/register/"; fullPath: '/404/'
preLoaderRoute: typeof RegisterIndexRouteImport; preLoaderRoute: typeof R404IndexRouteImport
parentRoute: typeof rootRouteImport; parentRoute: typeof rootRouteImport
}; }
"/login/": { '/login/': {
id: "/login/"; id: '/login/'
path: "/login"; path: '/login'
fullPath: "/login/"; fullPath: '/login/'
preLoaderRoute: typeof LoginIndexRouteImport; preLoaderRoute: typeof LoginIndexRouteImport
parentRoute: typeof rootRouteImport; parentRoute: typeof rootRouteImport
}; }
"/404/": { '/register/': {
id: "/404/"; id: '/register/'
path: "/404"; path: '/register'
fullPath: "/404/"; fullPath: '/register/'
preLoaderRoute: typeof R404IndexRouteImport; preLoaderRoute: typeof RegisterIndexRouteImport
parentRoute: typeof rootRouteImport; parentRoute: typeof rootRouteImport
}; }
"/_auth/users/": { '/_auth/403/': {
id: "/_auth/users/"; id: '/_auth/403/'
path: "/users"; path: '/403'
fullPath: "/users/"; fullPath: '/403/'
preLoaderRoute: typeof AuthUsersIndexRouteImport; preLoaderRoute: typeof Auth403IndexRouteImport
parentRoute: typeof AuthRoute; parentRoute: typeof AuthRoute
}; }
"/_auth/dashboard/": { '/_auth/dashboard/': {
id: "/_auth/dashboard/"; id: '/_auth/dashboard/'
path: "/dashboard"; path: '/dashboard'
fullPath: "/dashboard/"; fullPath: '/dashboard/'
preLoaderRoute: typeof AuthDashboardIndexRouteImport; preLoaderRoute: typeof AuthDashboardIndexRouteImport
parentRoute: typeof AuthRoute; parentRoute: typeof AuthRoute
}; }
"/_auth/403/": { '/_auth/users/': {
id: "/_auth/403/"; id: '/_auth/users/'
path: "/403"; path: '/users'
fullPath: "/403/"; fullPath: '/users/'
preLoaderRoute: typeof Auth403IndexRouteImport; preLoaderRoute: typeof AuthUsersIndexRouteImport
parentRoute: typeof AuthRoute; parentRoute: typeof AuthRoute
}; }
} }
} }
interface AuthRouteChildren { interface AuthRouteChildren {
Auth403IndexRoute: typeof Auth403IndexRoute; Auth403IndexRoute: typeof Auth403IndexRoute
AuthDashboardIndexRoute: typeof AuthDashboardIndexRoute; AuthDashboardIndexRoute: typeof AuthDashboardIndexRoute
AuthUsersIndexRoute: typeof AuthUsersIndexRoute; AuthUsersIndexRoute: typeof AuthUsersIndexRoute
} }
const AuthRouteChildren: AuthRouteChildren = { const AuthRouteChildren: AuthRouteChildren = {
Auth403IndexRoute: Auth403IndexRoute, Auth403IndexRoute: Auth403IndexRoute,
AuthDashboardIndexRoute: AuthDashboardIndexRoute, AuthDashboardIndexRoute: AuthDashboardIndexRoute,
AuthUsersIndexRoute: AuthUsersIndexRoute, AuthUsersIndexRoute: AuthUsersIndexRoute,
}; }
const AuthRouteWithChildren = AuthRoute._addFileChildren(AuthRouteChildren); const AuthRouteWithChildren = AuthRoute._addFileChildren(AuthRouteChildren)
const rootRouteChildren: RootRouteChildren = { const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute, IndexRoute: IndexRoute,
@@ -193,7 +200,7 @@ const rootRouteChildren: RootRouteChildren = {
R404IndexRoute: R404IndexRoute, R404IndexRoute: R404IndexRoute,
LoginIndexRoute: LoginIndexRoute, LoginIndexRoute: LoginIndexRoute,
RegisterIndexRoute: RegisterIndexRoute, RegisterIndexRoute: RegisterIndexRoute,
}; }
export const routeTree = rootRouteImport export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren) ._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>(); ._addFileTypes<FileRouteTypes>()
@@ -59,7 +59,7 @@ function DashboardSkeleton() {
active active
style={{ style={{
width: w, width: w,
height: Math.round(token.fontSizeHeading5 * token.lineHeightHeading5), height: Math.round(Number(token.fontSizeHeading5) * Number(token.lineHeightHeading5)),
}} }}
/> />
); );
+1 -1
View File
@@ -1,5 +1,5 @@
import path from "node:path"; import path from "node:path";
import { defineConfig } from "vitest/config"; import { defineConfig } from "vite-plus";
export default defineConfig({ export default defineConfig({
resolve: { resolve: {
+1 -2
View File
@@ -18,8 +18,7 @@
"packageManager": "pnpm@10.33.2", "packageManager": "pnpm@10.33.2",
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest", "vite@*": "npm:@voidzero-dev/vite-plus-core@0.3.3"
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
}, },
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"esbuild", "esbuild",
+2525 -1741
View File
File diff suppressed because it is too large Load Diff