Phase 18 - Globe State Sync (v2.27.0):
- ioredis singleton (src/lib/redis.ts), GlobeStateSnapshot type, globeStateStore ZSET session registry
- POST /api/globe/state with dual auth (NextAuth session primary, Bearer fallback per R-2)
- useSessionId + useGlobeStateSync browser hooks with 500ms debounce + 10s heartbeat
- GlobeView wiring for real-time state push
- registerGlobeResources MCP module: RSRC-02 (globe://state/{sessionId}), RSRC-03 (globe://sessions), RSRC-04 (globe://layers)
- Route.ts first R-1 serialized edit
Phase 20 - Data Query Tools:
- Transport-neutral service layer (src/lib/data-query/service.ts): searchEntities, getEntitiesInRegion, getEntityDetails, getPluginData
- REST routes: GET /api/v1/entities/search, GET /api/v1/entities/region
- registerDataQueryTools MCP module: TOOL-01 search_entities, TOOL-02 get_entities_in_region, TOOL-03 get_entity_details, TOOL-04 get_plugin_data
- Route.ts second R-1 serialized edit
- vitest global setup (src/test/setup.ts) for next-auth jsdom compatibility
498/498 tests GREEN. Zero new TypeScript errors.
37 lines
1016 B
TypeScript
37 lines
1016 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
clearMocks: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
include: [
|
|
'src/lib/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
'src/core/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
'src/plugins/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
'src/app/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
'packages/**/*.{test,spec}.{js,ts,jsx,tsx}',
|
|
],
|
|
exclude: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/.next/**',
|
|
'**/.git/**',
|
|
],
|
|
coverage: {
|
|
thresholds: {
|
|
branches: 80,
|
|
functions: 80,
|
|
statements: 80,
|
|
}
|
|
}
|
|
},
|
|
});
|