feat(router-phase7): App + routes/index für phase7 Routes [tsc:fail]
This commit is contained in:
parent
47a34e49d2
commit
a3c24339ae
@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "api-client-phase7",
|
"current_feature": "router-phase7",
|
||||||
"started_at": "2026-05-23T05:40:09.997191",
|
"started_at": "2026-05-23T05:40:09.997191",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"documents-upload",
|
"documents-upload",
|
||||||
"search-everywhere",
|
"search-everywhere",
|
||||||
"email-notification-stub",
|
"email-notification-stub",
|
||||||
"mobile-responsive-polish"
|
"mobile-responsive-polish",
|
||||||
|
"api-client-phase7"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -846,3 +846,24 @@ src/routes/documents.ts(36,25): error TS2339: Property 'size' does not exist on
|
|||||||
src/routes/documents.ts(46,32): error TS2339: Property 'file' does not exist on type 'FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<...>>'.
|
src/routes/documents.ts(46,32): error TS2339: Property 'file' does not exist on type 'FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<...>>'.
|
||||||
src/routes/documents.ts(56,9): error TS2769: No overload matches this call.
|
src/routes/documents.ts(56,9): error TS2769: No overload matches this call.
|
||||||
Overload 1 of 2, '(value: { filename: string | SQL<unknown> | Placeholder<string, any>; contentType: string | SQL<unknown> | Placeholder<string, any>; sizeBytes: number | SQL<...> | Placeholder<...>; id?: string | ... 2 more ... | undefined; createdAt?: SQL<...> | ... 2 more ... | undefined; userId?: string | ... 3 more ... | undefined; c
|
Overload 1 of 2, '(value: { filename: string | SQL<unknown> | Placeholder<string, any>; contentType: string | SQL<unknown> | Placeholder<string, any>; sizeBytes: number | SQL<...> | Placeholder<...>; id?: string | ... 2 more ... | undefined; createdAt?: SQL<...> | ... 2 more ... | undefined; userId?: string | ... 3 more ... | undefined; c
|
||||||
|
- `05:45:00` **INFO** Committed feature api-client-phase7
|
||||||
|
- `05:45:00` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: router-phase7 (2026-05-23 05:45:00)
|
||||||
|
|
||||||
|
- `05:45:00` **INFO** Description: App + routes/index für phase7 Routes
|
||||||
|
- `05:45:00` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — behalte alle. Füge documentsRoutes ('/api/documents'), sea…)
|
||||||
|
- `05:45:08` **INFO** wrote 1010 chars in 8.1s (attempt 1)
|
||||||
|
- `05:45:08` **INFO** Generating apps/api/src/index.ts (ERWEITERT — behalte alles. Registriere @fastify/multipart Plugin: `awa…)
|
||||||
|
- `05:45:18` **INFO** wrote 963 chars in 9.7s (attempt 1)
|
||||||
|
- `05:45:18` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /documents (Documents Page) Route hinzu. Auth-Check.…)
|
||||||
|
- `05:45:52` **INFO** wrote 4100 chars in 34.6s (attempt 1)
|
||||||
|
- `05:45:52` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `05:45:54` **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
|
||||||
|
|||||||
@ -24,6 +24,10 @@ async function start() {
|
|||||||
cookie: { cookieName: "token", signed: false }
|
cookie: { cookieName: "token", signed: false }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await server.register(import('@fastify/multipart').then(m => m.default), {
|
||||||
|
limits: { fileSize: 20 * 1024 * 1024 }
|
||||||
|
})
|
||||||
|
|
||||||
server.get("/health", async () => {
|
server.get("/health", async () => {
|
||||||
return { status: "ok" }
|
return { status: "ok" }
|
||||||
})
|
})
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import timeEntryRoutes from "./time-entries"
|
|||||||
import userRoutes from "./users"
|
import userRoutes from "./users"
|
||||||
import settingsRoutes from "./settings"
|
import settingsRoutes from "./settings"
|
||||||
import auditLogRoutes from "./audit-log"
|
import auditLogRoutes from "./audit-log"
|
||||||
|
import documentsRoutes from "./documents"
|
||||||
|
import searchRoutes from "./search"
|
||||||
|
|
||||||
export async function setupRoutes(server: FastifyInstance) {
|
export async function setupRoutes(server: FastifyInstance) {
|
||||||
server.register(authRoutes, { prefix: "/api/auth" })
|
server.register(authRoutes, { prefix: "/api/auth" })
|
||||||
@ -15,4 +17,6 @@ export async function setupRoutes(server: FastifyInstance) {
|
|||||||
server.register(userRoutes, { prefix: "/api/users" })
|
server.register(userRoutes, { prefix: "/api/users" })
|
||||||
server.register(settingsRoutes, { prefix: "/api/settings" })
|
server.register(settingsRoutes, { prefix: "/api/settings" })
|
||||||
server.register(auditLogRoutes, { prefix: "/api/audit-log" })
|
server.register(auditLogRoutes, { prefix: "/api/audit-log" })
|
||||||
|
server.register(documentsRoutes, { prefix: "/api/documents" })
|
||||||
|
server.register(searchRoutes, { prefix: "/api/search" })
|
||||||
}
|
}
|
||||||
@ -11,6 +11,7 @@ import AdminUsers from "./pages/AdminUsers"
|
|||||||
import Settings from "./pages/Settings"
|
import Settings from "./pages/Settings"
|
||||||
import Calendar from "./pages/Calendar"
|
import Calendar from "./pages/Calendar"
|
||||||
import AuditLog from "./pages/AuditLog"
|
import AuditLog from "./pages/AuditLog"
|
||||||
|
import Documents from "./pages/Documents"
|
||||||
import Nav from "./components/Nav"
|
import Nav from "./components/Nav"
|
||||||
import CommandPalette from "./components/CommandPalette"
|
import CommandPalette from "./components/CommandPalette"
|
||||||
import { ToastProvider } from "./components/Toast"
|
import { ToastProvider } from "./components/Toast"
|
||||||
@ -108,6 +109,13 @@ const projectDetailRoute = createRoute({
|
|||||||
component: ProjectDetail
|
component: ProjectDetail
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const documentsRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/documents",
|
||||||
|
beforeLoad: authCheck,
|
||||||
|
component: Documents
|
||||||
|
})
|
||||||
|
|
||||||
const profileRoute = createRoute({
|
const profileRoute = createRoute({
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRoute,
|
||||||
path: "/profile",
|
path: "/profile",
|
||||||
@ -145,6 +153,7 @@ const routeTree = rootRoute.addChildren([
|
|||||||
customerDetailRoute,
|
customerDetailRoute,
|
||||||
projectsRoute,
|
projectsRoute,
|
||||||
projectDetailRoute,
|
projectDetailRoute,
|
||||||
|
documentsRoute,
|
||||||
profileRoute,
|
profileRoute,
|
||||||
adminRoute,
|
adminRoute,
|
||||||
auditLogRoute,
|
auditLogRoute,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user