feat(router-phase19): Mount invitations + accept-invite public route [tsc:fail]
This commit is contained in:
parent
8b1755b085
commit
002007a4c8
@ -1,11 +1,12 @@
|
||||
{
|
||||
"completed_features": [],
|
||||
"current_feature": "api-client-phase19",
|
||||
"current_feature": "router-phase19",
|
||||
"started_at": "2026-05-23T07:42:47.919364",
|
||||
"attempted_features": [
|
||||
"invitation-flow",
|
||||
"rate-limiting-stub",
|
||||
"search-history",
|
||||
"presence-stub"
|
||||
"presence-stub",
|
||||
"api-client-phase19"
|
||||
]
|
||||
}
|
||||
@ -2343,3 +2343,22 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||
- `07:48:04` **INFO** Committed feature api-client-phase19
|
||||
- `07:48:04` **INFO** Pushed: rc=0
|
||||
|
||||
## Phase-3 Feature: router-phase19 (2026-05-23 07:48:04)
|
||||
|
||||
- `07:48:04` **INFO** Description: Mount invitations + accept-invite public route
|
||||
- `07:48:04` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — füge invitationRoutes ('/api/invitations'). Behalte alles.…)
|
||||
- `07:48:22` **INFO** wrote 2176 chars in 17.2s (attempt 1)
|
||||
- `07:48:22` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /accept-invite Route (public). Behalte alles.…)
|
||||
- `07:49:17` **INFO** wrote 6774 chars in 55.5s (attempt 1)
|
||||
- `07:49:17` **INFO** Running tsc --noEmit on api…
|
||||
- `07:49:19` **WARN** tsc errors:
|
||||
src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'.
|
||||
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||
|
||||
@ -17,6 +17,7 @@ import invoiceRoutes from "./invoices"
|
||||
import savedViewRoutes from "./saved-views"
|
||||
import notificationRoutes from "./notifications"
|
||||
import apiKeyRoutes from "./api-keys"
|
||||
import invitationRoutes from "./invitations"
|
||||
|
||||
export async function setupRoutes(server: FastifyInstance) {
|
||||
server.register(authRoutes, { prefix: "/api/auth" })
|
||||
@ -37,4 +38,5 @@ export async function setupRoutes(server: FastifyInstance) {
|
||||
server.register(savedViewRoutes, { prefix: "/api/saved-views" })
|
||||
server.register(notificationRoutes, { prefix: "/api/notifications" })
|
||||
server.register(apiKeyRoutes, { prefix: "/api/api-keys" })
|
||||
server.register(invitationRoutes, { prefix: "/api/invitations" })
|
||||
}
|
||||
@ -21,6 +21,7 @@ import Integrations from "./pages/Integrations"
|
||||
import ProjectTemplates from "./pages/ProjectTemplates"
|
||||
import Invoices from "./pages/Invoices"
|
||||
import ApiKeys from "./pages/ApiKeys"
|
||||
import AcceptInvite from "./pages/AcceptInvite"
|
||||
import Nav from "./components/Nav"
|
||||
import CommandPalette from "./components/CommandPalette"
|
||||
import KeyboardHelp from "./components/KeyboardHelp"
|
||||
@ -71,6 +72,12 @@ const resetPasswordRoute = createRoute({
|
||||
component: ResetPassword
|
||||
})
|
||||
|
||||
const acceptInviteRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/accept-invite",
|
||||
component: AcceptInvite
|
||||
})
|
||||
|
||||
const authCheck = async () => {
|
||||
try {
|
||||
await api.getMe()
|
||||
@ -169,7 +176,7 @@ const settingsRoute = createRoute({
|
||||
|
||||
const auditLogRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/audit-log",
|
||||
path: "/admin/audit-log",
|
||||
beforeLoad: adminCheck,
|
||||
component: AuditLog
|
||||
})
|
||||
@ -183,8 +190,8 @@ const documentsRoute = createRoute({
|
||||
|
||||
const webhooksRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/webhooks",
|
||||
beforeLoad: authCheck,
|
||||
path: "/admin/webhooks",
|
||||
beforeLoad: adminCheck,
|
||||
component: Webhooks
|
||||
})
|
||||
|
||||
@ -211,30 +218,31 @@ const integrationsRoute = createRoute({
|
||||
|
||||
const projectTemplatesRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/projects/templates",
|
||||
beforeLoad: authCheck,
|
||||
path: "/admin/project-templates",
|
||||
beforeLoad: adminCheck,
|
||||
component: ProjectTemplates
|
||||
})
|
||||
|
||||
const invoicesRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/invoices",
|
||||
path: "/billing/invoices",
|
||||
beforeLoad: authCheck,
|
||||
component: Invoices
|
||||
})
|
||||
|
||||
const apiKeysRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/api-keys",
|
||||
path: "/settings/api-keys",
|
||||
beforeLoad: authCheck,
|
||||
component: ApiKeys
|
||||
})
|
||||
|
||||
const routeTree = [
|
||||
const routeTree = rootRoute.addChildren([
|
||||
indexRoute,
|
||||
loginRoute,
|
||||
forgotPasswordRoute,
|
||||
resetPasswordRoute,
|
||||
acceptInviteRoute,
|
||||
timeEntriesRoute,
|
||||
calendarRoute,
|
||||
customersRoute,
|
||||
@ -253,12 +261,9 @@ const routeTree = [
|
||||
projectTemplatesRoute,
|
||||
invoicesRoute,
|
||||
apiKeysRoute
|
||||
]
|
||||
])
|
||||
|
||||
const router = createRouter({
|
||||
routeTree,
|
||||
defaultPreload: 'intent'
|
||||
})
|
||||
const router = createRouter({ routeTree })
|
||||
|
||||
declare module "@tanstack/react-router" {
|
||||
interface Register {
|
||||
@ -268,9 +273,8 @@ declare module "@tanstack/react-router" {
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<RouterProvider
|
||||
router={router}
|
||||
fallback={<div>Loading...</div>}
|
||||
/>
|
||||
<ErrorBoundary>
|
||||
<RouterProvider router={router} />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user