Finishes the master-cms-module feature (Units 1-4): runs Build and Test across master-backend, slave-availability-extension and frontend-cms-page, fixes a missing Availability EF migration for MasterRegistration and a TanStack Query v5 mutation-callback type break, adds the missing MasterModule appsettings section, and documents the module in README.md. Also seeds a tech-debt-backlog feature to track dead config and pre-existing/introduced frontend lint findings for later cleanup.
33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
# Build Instructions
|
|
|
|
## Prerequisites
|
|
- **Build Tool**: .NET SDK 10 (backend), Node.js + npm/pnpm (frontend)
|
|
- **Dependencies**: NuGet packages (restored automatically), npm packages in `frontend/`
|
|
- **Environment Variables**: None required for build
|
|
- **System Requirements**: Windows/Linux/macOS, .NET 10 runtime
|
|
|
|
## Build Steps
|
|
|
|
### 1. Backend — Install Dependencies & Build
|
|
```bash
|
|
dotnet build SlpModularCms.sln
|
|
```
|
|
|
|
### 2. Frontend — Install Dependencies & Build
|
|
```bash
|
|
cd frontend
|
|
npm install
|
|
npm run build # tsc -b && vite build
|
|
```
|
|
|
|
## Verify Build Success
|
|
- **Backend**: `Build succeeded. 0 Error(s)` — all 9 projects compile (Core, Modules.Identity, Modules.Availability, Modules.Master, Api, plus 4 test projects)
|
|
- **Frontend**: Vite produces a `dist/` bundle with no TypeScript errors
|
|
- **Build Artifacts**: `src/**/bin/Debug/net10.0/*.dll`, `frontend/dist/`
|
|
|
|
## Troubleshooting
|
|
|
|
### TypeScript build fails with mutation callback arity errors
|
|
- **Cause**: `@tanstack/react-query` v5.101 changed the `onSuccess` mutation callback signature to include a 4th `context` parameter. Manually calling `options?.onSuccess?.(data, variables, context)` with only 3 args now under-supplies the callback's expected arity.
|
|
- **Solution**: Forward all trailing callback args with a rest parameter, e.g. `onSuccess: (data, variables, ...rest) => { ...; options?.onSuccess?.(data, variables, ...rest); }`. Fixed in `frontend/src/api/useUpdateCmsInstanceStatus.ts`.
|