Add support for filtering search results by tags in the main search endpoint. Changes: - Add tags parameter to SearchQueryDto (comma-separated tag slugs) - Implement tag filtering in SearchService.search() method - Update SQL query to join with knowledge_entry_tags when tags provided - Entries must have ALL specified tags (AND logic) - Add tests for tag filtering (2 controller tests, 2 service tests) - Update endpoint documentation - Fix non-null assertion linting error The search endpoint now supports: - Full-text search with ranking (ts_rank) - Snippet generation with highlighting (ts_headline) - Status filtering - Tag filtering (new) - Pagination Example: GET /api/knowledge/search?q=api&tags=documentation,tutorial All tests pass (25 total), type checking passes, linting passes. Fixes #66 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
58 lines
2.0 KiB
JSON
58 lines
2.0 KiB
JSON
{
|
|
"name": "mosaic-stack",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"packageManager": "pnpm@10.19.0",
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
},
|
|
"scripts": {
|
|
"build": "turbo run build",
|
|
"dev": "turbo run dev",
|
|
"dev:api": "turbo run dev --filter @mosaic/api",
|
|
"dev:web": "turbo run dev --filter @mosaic/web",
|
|
"dev:orchestrator": "turbo run dev --filter @mosaic/orchestrator",
|
|
"lint": "turbo run lint",
|
|
"lint:fix": "turbo run lint:fix",
|
|
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
"test": "turbo run test",
|
|
"test:watch": "turbo run test:watch",
|
|
"test:coverage": "turbo run test:coverage",
|
|
"test:docker": "vitest run --config tests/integration/vitest.config.ts",
|
|
"test:docker:watch": "vitest --config tests/integration/vitest.config.ts",
|
|
"clean": "turbo run clean && rm -rf node_modules",
|
|
"typecheck": "turbo run typecheck",
|
|
"docker:up": "docker compose up -d",
|
|
"docker:down": "docker compose down",
|
|
"docker:logs": "docker compose logs -f",
|
|
"docker:logs:api": "docker compose logs -f api",
|
|
"docker:logs:web": "docker compose logs -f web",
|
|
"docker:logs:orchestrator": "docker compose logs -f orchestrator",
|
|
"docker:logs:coordinator": "docker compose logs -f coordinator",
|
|
"docker:ps": "docker compose ps",
|
|
"docker:build": "docker compose build",
|
|
"docker:restart": "docker compose restart",
|
|
"prepare": "husky || true"
|
|
},
|
|
"devDependencies": {
|
|
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
|
"@typescript-eslint/parser": "^8.26.0",
|
|
"@vitest/coverage-v8": "^4.0.18",
|
|
"eslint": "^9.21.0",
|
|
"eslint-config-prettier": "^10.1.0",
|
|
"eslint-plugin-prettier": "^5.2.3",
|
|
"eslint-plugin-security": "^3.0.1",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.2.7",
|
|
"prettier": "^3.5.3",
|
|
"turbo": "^2.8.0",
|
|
"typescript": "^5.8.2",
|
|
"vitest": "^3.0.8"
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/resources": "^1.30.1"
|
|
}
|
|
}
|