Display node info in all npm commands
MODIFY
package.json
package.json
"git:supdate": "git submodule update --remote --recursive --merge",
"git:spush": "git push --recurse-submodules=on-demand",
"git:sreset": "git submodule foreach 'git reset --hard'",
- "start": "npm run start:prod",
+ "start": "npm version && npm run start:prod",
"prestart": "npm run build:prod",
"config:batch": "ncp src/assets/configs-scp/e-Mobility-config/config_batch_server.json dist/assets/config.json",
"config:oData": "ncp src/assets/configs-scp/e-Mobility-config/config_odata_server.json dist/assets/config.json",
"config:rest": "ncp src/assets/configs-scp/e-Mobility-config/config_rest_server.json dist/assets/config.json",
"config:chargebox-json": "ncp src/assets/configs-scp/e-Mobility-config/config_chargebox_json_server.json dist/assets/config.json",
"config:chargebox-soap": "ncp src/assets/configs-scp/e-Mobility-config/config_chargebox_soap_server.json dist/assets/config.json",
- "start:dev": "cross-env NODE_ENV=development ts-node-dev --files --max-old-space-size=4096 -- src/start.ts",
- "start:dev:debug": "cross-env NODE_ENV=development ts-node-dev --inspect --files --max-old-space-size=4096 -- src/start.ts",
- "start:dev:nodemon": "nodemon --exec 'ts-node --files' src/start.ts",
- "start:dev:debug:nodemon": "nodemon --exec 'ts-node --files' src/start.ts 9229",
- "start:dev:prof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development node -r source-map-support/register --prof -- dist/start.js",
- "start:dev:doctorprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic doctor -- node -r source-map-support/register dist/start.js",
- "start:dev:flameprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic flame -- node -r source-map-support/register dist/start.js",
- "start:dev:bubbleprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic bubbleprof -- node -r source-map-support/register dist/start.js",
- "start:devbuild": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development-build node -r source-map-support/register dist/start.js",
- "start:prod": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register dist/start.js",
- "start:prod:prof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register --prof dist/start.js",
- "start:prod:doctorprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic doctor -- node -r source-map-support/register dist/start.js",
- "start:prod:flameprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic flame -- node -r source-map-support/register dist/start.js",
- "start:prod:bubbleprof": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic bubbleprof -- node -r source-map-support/register dist/start.js",
+ "start:dev": "npm version && cross-env NODE_ENV=development ts-node-dev --files --max-old-space-size=4096 -- src/start.ts",
+ "start:dev:debug": "npm version && cross-env NODE_ENV=development ts-node-dev --inspect --files --max-old-space-size=4096 -- src/start.ts",
+ "start:dev:nodemon": "npm version && nodemon --exec 'ts-node --files' src/start.ts",
+ "start:dev:debug:nodemon": "npm version && nodemon --exec 'ts-node --files' src/start.ts 9229",
+ "start:dev:prof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development node -r source-map-support/register --prof -- dist/start.js",
+ "start:dev:doctorprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic doctor -- node -r source-map-support/register dist/start.js",
+ "start:dev:flameprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic flame -- node -r source-map-support/register dist/start.js",
+ "start:dev:bubbleprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development clinic bubbleprof -- node -r source-map-support/register dist/start.js",
+ "start:devbuild": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=development-build node -r source-map-support/register dist/start.js",
+ "start:prod": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register dist/start.js",
+ "start:prod:prof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production node -r source-map-support/register --prof dist/start.js",
+ "start:prod:doctorprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic doctor -- node -r source-map-support/register dist/start.js",
+ "start:prod:flameprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic flame -- node -r source-map-support/register dist/start.js",
+ "start:prod:bubbleprof": "npm version && cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" NODE_ENV=production clinic bubbleprof -- node -r source-map-support/register dist/start.js",
"start:email": "maildev --web 1080 --web-ip 127.0.0.1 --smtp 1025 --verbose --incoming-user evse-mail-user --incoming-pass evse-mail-pwd",
"start:emailBackup": "maildev --web 2080 --web-ip 127.0.0.1 --smtp 2025 --verbose --incoming-user evse-mail-user --incoming-pass evse-mail-pwd",
- "build": "npm run build:prod",
- "build:dev": "webpack --env dev",
- "build:prod": "webpack --env prod",
- "clean-install": "rimraf package-lock.json && rimraf node_modules && npm cache clear --force && npm install",
+ "build": "npm version && npm run build:prod",
+ "build:dev": "npm version && webpack --env dev",
+ "build:prod": "npm version && webpack --env prod",
+ "clean-install": "npm version && rimraf package-lock.json && rimraf node_modules && npm cache clear --force && npm install",
"eslint": "cross-env TIMING=1 eslint --ext .js,.ts types src test",
"eslint:fix": "cross-env TIMING=1 eslint --ext .js,.ts --fix types src test",
"autocannon": "autocannon",
- "mochatest": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*Test.ts",
- "mochatest:parallel": "cross-env TS_NODE_FILES=true mocha --parallel test/**/*Test.ts",
- "mochatest:nyc": "cross-env TS_NODE_FILES=true nyc mocha --no-parallel test/**/*Test.ts",
- "mochatest:nyc:parallel": "cross-env TS_NODE_FILES=true nyc mocha --parallel test/**/*Test.ts",
- "mochatest:chargingStation": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
- "mochatest:ocpi": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPI*Test.ts",
- "mochatest:tenant": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*TenantTest.ts",
- "mochatest:org": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*OrgTest.ts",
- "mochatest:setting": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*SettingTest.ts",
- "mochatest:user": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/UserTest.ts",
- "mochatest:siteorg": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteOrgTest.ts",
- "mochatest:siteareaorg": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteAreaOrgTest.ts",
- "mochatest:transaction": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TransactionTest.ts",
- "mochatest:stat": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/StatisticsTest.ts",
- "mochatest:auth": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
- "mochatest:ocpp": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
- "mochatest:authentication": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
- "mochatest:createContext": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ContextBuilderRunner.ts",
- "mochatest:crypto": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/EncryptionSettingTest.ts",
- "mochatest:filter": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FilterTest.ts",
- "mochatest:tenantsetting": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ComponentActivationTenantTest.ts",
- "mochatest:billing": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingTest.ts",
- "mochatest:stripe": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingStripeIntegrationTest.ts",
- "mochatest:asset": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AssetTest.ts",
- "mochatest:car": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CarTest.ts",
- "mochatest:tag": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TagTest.ts",
- "mochatest:locking": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/LockingTest.ts",
- "mochatest:firmwareUpdateStatus": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FirmwareUpdateStatusTest.ts",
- "mochatest:smartCharging": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SmartChargingTest.ts",
- "mochatest:security": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SecurityTest.ts",
- "mochatest:registrationToken": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/RegistrationTokenTest.ts",
- "mochatest:company": "cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CompanyOrgTest.ts",
- "mochatest:create:utbilling": "cross-env TS_NODE_FILES=true TENANT_FILTER=utbilling mocha --no-parallel test/**/ContextBuilderRunner.ts",
+ "mochatest:createContext": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ContextBuilderRunner.ts",
+ "mochatest": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*Test.ts",
+ "mochatest:parallel": "npm version && cross-env TS_NODE_FILES=true mocha --parallel test/**/*Test.ts",
+ "mochatest:nyc": "npm version && cross-env TS_NODE_FILES=true nyc mocha --no-parallel test/**/*Test.ts",
+ "mochatest:nyc:parallel": "npm version && cross-env TS_NODE_FILES=true nyc mocha --parallel test/**/*Test.ts",
+ "mochatest:chargingStation": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
+ "mochatest:ocpi": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPI*Test.ts",
+ "mochatest:tenant": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*TenantTest.ts",
+ "mochatest:org": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*OrgTest.ts",
+ "mochatest:setting": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*SettingTest.ts",
+ "mochatest:user": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/UserTest.ts",
+ "mochatest:siteorg": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteOrgTest.ts",
+ "mochatest:siteareaorg": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteAreaOrgTest.ts",
+ "mochatest:transaction": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TransactionTest.ts",
+ "mochatest:stat": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/StatisticsTest.ts",
+ "mochatest:auth": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
+ "mochatest:ocpp": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
+ "mochatest:authentication": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
+ "mochatest:crypto": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/EncryptionSettingTest.ts",
+ "mochatest:filter": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FilterTest.ts",
+ "mochatest:tenantsetting": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ComponentActivationTenantTest.ts",
+ "mochatest:billing": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingTest.ts",
+ "mochatest:stripe": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingStripeIntegrationTest.ts",
+ "mochatest:asset": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AssetTest.ts",
+ "mochatest:car": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CarTest.ts",
+ "mochatest:tag": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TagTest.ts",
+ "mochatest:locking": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/LockingTest.ts",
+ "mochatest:firmwareUpdateStatus": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FirmwareUpdateStatusTest.ts",
+ "mochatest:smartCharging": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SmartChargingTest.ts",
+ "mochatest:security": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SecurityTest.ts",
+ "mochatest:registrationToken": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/RegistrationTokenTest.ts",
+ "mochatest:company": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CompanyOrgTest.ts",
+ "mochatest:create:utbilling": "npm version && cross-env TS_NODE_FILES=true TENANT_FILTER=utbilling mocha --no-parallel test/**/ContextBuilderRunner.ts",
"coverage": "nyc report --reporter=lcov",
"coverage:html": "nyc report --reporter=html",
"clinic:clean": "clinic clean",

MODIFY
src/server/ocpp/json/WSConnection.ts
src/server/ocpp/json/WSConnection.ts
@@ -5,8 +5,6 @@ import WebSocket, { CLOSED, CLOSING, CONNECTING, CloseEvent, ErrorEvent, Message
import BackendError from '../../../exception/BackendError';
import Constants from '../../../utils/Constants';
import JsonCentralSystemServer from './JsonCentralSystemServer';
-import LockingHelper from '../../../locking/LockingHelper';
-import LockingManager from '../../../locking/LockingManager';
import Logging from '../../../utils/Logging';
import OCPPError from '../../../exception/OcppError';
import OCPPUtils from '../utils/OCPPUtils';

Display node info in all npm commands