Some checks failed
CI/CD Pipeline / Test Suite (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Benchmarks (push) Has been cancelled
CI/CD Pipeline / Cleanup (push) Has been cancelled
200 lines
5.6 KiB
JSON
200 lines
5.6 KiB
JSON
{
|
|
"_comment": "Analytics Feature - Package.json Template",
|
|
"_description": "This file demonstrates layered override system for feature-specific dependencies. It will be merged with base package.json when analytics feature is enabled. Layer: Feature > Template > Framework",
|
|
|
|
"scripts": {
|
|
"analytics:dev": "concurrently \"npm run analytics:server\" \"npm run analytics:ui\"",
|
|
"analytics:server": "node scripts/features/analytics/dev-server.js",
|
|
"analytics:ui": "node scripts/features/analytics/dashboard-ui.js",
|
|
"analytics:build": "node scripts/features/analytics/build-dashboard.js",
|
|
"analytics:test": "jest tests/analytics --coverage --verbose",
|
|
"analytics:e2e": "playwright test tests/e2e/analytics.spec.js",
|
|
"analytics:report": "node scripts/features/analytics/generate-report.js",
|
|
"analytics:monitor": "node scripts/features/analytics/monitor.js --daemon",
|
|
"analytics:export": "node scripts/features/analytics/export-data.js",
|
|
"analytics:validate": "node scripts/features/analytics/validate-config.js",
|
|
"analytics:benchmark": "node scripts/features/analytics/benchmark.js",
|
|
"analytics:docs": "typedoc src/analytics --out docs/analytics",
|
|
"analytics:lint": "eslint src/analytics scripts/features/analytics --fix",
|
|
"analytics:format": "prettier src/analytics scripts/features/analytics --write"
|
|
},
|
|
|
|
"dependencies": {
|
|
"@analytics/core": "^2.9.0",
|
|
"@analytics/google-analytics": "^1.0.7",
|
|
"@analytics/segment": "^1.2.4",
|
|
"chart.js": "^4.4.0",
|
|
"chartjs-adapter-date-fns": "^3.0.0",
|
|
"date-fns": "^2.30.0",
|
|
"d3": "^7.8.5",
|
|
"d3-scale": "^4.0.2",
|
|
"d3-array": "^3.2.4",
|
|
"recharts": "^2.8.0",
|
|
"victory": "^37.0.2",
|
|
"plotly.js": "^2.27.0",
|
|
"apache-arrow": "^14.0.1",
|
|
"web-vitals": "^3.5.0",
|
|
"performance-observer": "^1.0.1",
|
|
"@sentry/browser": "^7.81.1",
|
|
"mixpanel-browser": "^2.47.0",
|
|
"amplitude-js": "^8.21.6",
|
|
"hotjar-js": "^1.0.1"
|
|
},
|
|
|
|
"devDependencies": {
|
|
"@types/d3": "^7.4.3",
|
|
"@types/d3-scale": "^4.0.6",
|
|
"@types/d3-array": "^3.0.9",
|
|
"@types/chart.js": "^2.9.37",
|
|
"@testing-library/jest-dom": "^6.1.4",
|
|
"@testing-library/dom": "^9.3.4",
|
|
"jest": "^29.7.0",
|
|
"jest-environment-jsdom": "^29.7.0",
|
|
"@playwright/test": "^1.40.0",
|
|
"playwright": "^1.40.0",
|
|
"puppeteer": "^21.5.2",
|
|
"jsdom": "^23.0.1",
|
|
"canvas": "^2.11.2",
|
|
"chartjs-node-canvas": "^4.1.6",
|
|
"webpack": "^5.89.0",
|
|
"webpack-cli": "^5.1.4",
|
|
"webpack-dev-server": "^4.15.1",
|
|
"babel-loader": "^9.1.3",
|
|
"@babel/core": "^7.23.3",
|
|
"@babel/preset-env": "^7.23.3",
|
|
"@babel/preset-typescript": "^7.23.3",
|
|
"typescript": "^5.2.2",
|
|
"ts-loader": "^9.5.1",
|
|
"ts-jest": "^29.1.1",
|
|
"typedoc": "^0.25.4",
|
|
"eslint": "^8.54.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
"@typescript-eslint/parser": "^6.12.0",
|
|
"prettier": "^3.1.0",
|
|
"concurrently": "^8.2.2",
|
|
"nodemon": "^3.0.1",
|
|
"cross-env": "^7.0.3"
|
|
},
|
|
|
|
"optionalDependencies": {
|
|
"sharp": "^0.32.6",
|
|
"canvas": "^2.11.2",
|
|
"@node-rs/jieba": "^1.7.0"
|
|
},
|
|
|
|
"peerDependencies": {
|
|
"react": "^18.0.0",
|
|
"react-dom": "^18.0.0"
|
|
},
|
|
|
|
"jest": {
|
|
"testEnvironment": "jsdom",
|
|
"setupFilesAfterEnv": ["<rootDir>/tests/analytics/setup.js"],
|
|
"testMatch": [
|
|
"<rootDir>/tests/analytics/**/*.test.{js,ts}",
|
|
"<rootDir>/src/analytics/**/*.test.{js,ts}"
|
|
],
|
|
"collectCoverageFrom": [
|
|
"src/analytics/**/*.{js,ts}",
|
|
"scripts/features/analytics/**/*.{js,ts}",
|
|
"!**/*.d.ts",
|
|
"!**/node_modules/**"
|
|
],
|
|
"coverageThreshold": {
|
|
"global": {
|
|
"branches": 80,
|
|
"functions": 80,
|
|
"lines": 80,
|
|
"statements": 80
|
|
}
|
|
},
|
|
"transform": {
|
|
"^.+\\.(ts|tsx)$": "ts-jest",
|
|
"^.+\\.(js|jsx)$": "babel-jest"
|
|
}
|
|
},
|
|
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"@typescript-eslint/recommended"
|
|
],
|
|
"parser": "@typescript-eslint/parser",
|
|
"plugins": ["@typescript-eslint"],
|
|
"rules": {
|
|
"@typescript-eslint/no-unused-vars": "error",
|
|
"@typescript-eslint/explicit-function-return-type": "warn",
|
|
"prefer-const": "error",
|
|
"no-console": "warn"
|
|
},
|
|
"ignorePatterns": [
|
|
"dist/",
|
|
"node_modules/",
|
|
"coverage/"
|
|
]
|
|
},
|
|
|
|
"prettier": {
|
|
"semi": false,
|
|
"singleQuote": true,
|
|
"tabWidth": 2,
|
|
"trailingComma": "es5",
|
|
"printWidth": 100,
|
|
"arrowParens": "avoid"
|
|
},
|
|
|
|
"browserslist": [
|
|
"> 1%",
|
|
"last 2 versions",
|
|
"not dead",
|
|
"not ie 11"
|
|
],
|
|
|
|
"engines": {
|
|
"node": ">=18.0.0",
|
|
"npm": ">=9.0.0"
|
|
},
|
|
|
|
"_rustelo_feature": {
|
|
"name": "analytics",
|
|
"version": "1.0.0",
|
|
"description": "Comprehensive analytics and monitoring system",
|
|
"category": "monitoring",
|
|
"dependencies": {
|
|
"rust_crates": [
|
|
"serde_json",
|
|
"chrono",
|
|
"tokio",
|
|
"reqwest",
|
|
"prometheus",
|
|
"tracing"
|
|
],
|
|
"system_deps": [
|
|
"postgresql-client",
|
|
"redis-tools"
|
|
]
|
|
},
|
|
"scripts": {
|
|
"post_install": "node scripts/features/analytics/post-install.js",
|
|
"pre_uninstall": "node scripts/features/analytics/pre-uninstall.js"
|
|
},
|
|
"config": {
|
|
"dashboard_port": 3001,
|
|
"api_endpoints": [
|
|
"/api/analytics/metrics",
|
|
"/api/analytics/events",
|
|
"/api/analytics/reports"
|
|
],
|
|
"default_retention_days": 30,
|
|
"max_events_per_minute": 1000
|
|
}
|
|
},
|
|
|
|
"_layered_merge": {
|
|
"strategy": "deep_merge",
|
|
"precedence": "feature_over_base",
|
|
"conflict_resolution": "feature_wins",
|
|
"array_merge": "concat_unique",
|
|
"script_merge": "feature_prefix"
|
|
}
|
|
} |