- Delete unused dataMerger, formatter, Device model, dead service exports, and the empty agents/ + .gitkeep placeholders. - Extract STORE_MODES and MDM device-type filters into a shared constants.js. - Anchor bot regexes (^help|^store|^analyze) so "analyze store 305" no longer fires both handlers; replace catch-all noise. - Hoist inline require() calls in integrations to top-of-file imports. - Harden WebSocket server: Authorization header support, single-agent enforcement, bounded pending requests, server-level error handler, coalesced cache refresh in Meraki client. - Wrap Meraki/MDM network calls with withRetry; add request timeouts. - Migrate all console.* calls onto utils/logger.js (LOG_LEVEL aware); drive Webex framework logLevel from env. - Refactor storeDetail.js: shared renderClientLine + buildMdmSection helpers cut duplication roughly in half. - Refresh README structure, document LOG_LEVEL, add npm run agent script, add jest testMatch + new tests (handlers, HealthReport, Store, ws). Verified: npm run lint clean, 7 suites / 31 tests passing. Co-authored-by: Cursor <cursoragent@cursor.com>
56 lines
1.4 KiB
JSON
56 lines
1.4 KiB
JSON
{
|
|
"name": "netanalyzer",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"main": "server.js",
|
|
"type": "commonjs",
|
|
"description": "NetAnalyzer - Webex bot for store network and device health analysis using Meraki, SIW, and MDM integrations",
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"agent": "node remoteAgent.js",
|
|
"dev": "nodemon server.js",
|
|
"dev:agent": "nodemon remoteAgent.js",
|
|
"lint": "eslint . --ext .js",
|
|
"lint:fix": "eslint . --ext .js --fix",
|
|
"format": "prettier --write \"**/*.{js,json,md}\"",
|
|
"format:check": "prettier --check \"**/*.{js,json,md}\"",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch"
|
|
},
|
|
"keywords": [
|
|
"webex",
|
|
"bot",
|
|
"meraki",
|
|
"network-analysis",
|
|
"store-health"
|
|
],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"dependencies": {
|
|
"axios": "^1.16.1",
|
|
"dotenv": "^17.4.2",
|
|
"express": "^5.2.1",
|
|
"webex-node-bot-framework": "^2.5.1",
|
|
"ws": "^8.20.1"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"eslint": "^10.5.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.6",
|
|
"globals": "^17.7.0",
|
|
"jest": "^30.4.2",
|
|
"nodemon": "^3.1.14",
|
|
"prettier": "^3.8.4"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"testMatch": [
|
|
"<rootDir>/tests/**/*.test.js"
|
|
],
|
|
"verbose": true
|
|
}
|
|
}
|