"files": ["**/*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
- "project": "./tsconfig.json"
+ "project": true,
+ "tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
"extends": [
- "plugin:@typescript-eslint/recommended",
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
+ "plugin:@typescript-eslint/recommended-type-checked",
+ "plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/typescript"
],
"rules": {
+**Markdown**
-
- **Markdown**
-
- ```markdown
+```markdown
[![GitHub Clones](https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/jerome-benoit/c7c669b881d5b27dc0b44a639504ff93/raw/clone.json&logo=github)](https://github.com/MShawon/github-clone-count-badge)
+```
- ```
+**HTML**
- **HTML**
- ```html
-<a href='https://github.com/MShawon/github-clone-count-badge'><img alt='GitHub Clones' src='https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/jerome-benoit/c7c669b881d5b27dc0b44a639504ff93/raw/clone.json&logo=github'></a>
+```html
+<a href="https://github.com/MShawon/github-clone-count-badge"
+ ><img
+ alt="GitHub Clones"
+ src="https://img.shields.io/badge/dynamic/json?color=success&label=Clone&query=count&url=https://gist.githubusercontent.com/jerome-benoit/c7c669b881d5b27dc0b44a639504ff93/raw/clone.json&logo=github"
+/></a>
```
#### Smart Charging Profile
- :white_check_mark: ClearChargingProfile
-- :x: GetCompositeSchedule
+- :white_check_mark: GetCompositeSchedule
- :white_check_mark: SetChargingProfile
#### Remote Trigger Profile
"@types/sinon": "^10.0.15",
"@types/tar": "^6.1.5",
"@types/ws": "^8.5.5",
- "@typescript-eslint/eslint-plugin": "^5.62.0",
- "@typescript-eslint/parser": "^5.62.0",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
"@web/rollup-plugin-copy": "^0.4.0",
"auto-changelog": "^2.4.0",
"c8": "^8.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
- "eslint-plugin-jsdoc": "^46.4.3",
+ "eslint-plugin-jsdoc": "^46.4.4",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"mocha": "^10.2.0",
"mochawesome": "^7.1.3",
"prettier": "^3.0.0",
- "release-it": "^16.1.0",
+ "release-it": "^16.1.2",
"rimraf": "^5.0.1",
"robohydra": "^0.6.9",
"rollup": "^3.26.2",
version: 5.7.12(@mikro-orm/mariadb@5.7.12)(@mikro-orm/sqlite@5.7.12)
'@release-it/bumper':
specifier: ^5.0.0
- version: 5.0.0(release-it@16.1.0)
+ version: 5.0.0(release-it@16.1.2)
'@rollup/plugin-json':
specifier: ^6.0.0
version: 6.0.0(rollup@3.26.2)
specifier: ^8.5.5
version: 8.5.5
'@typescript-eslint/eslint-plugin':
- specifier: ^5.62.0
- version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.45.0)(typescript@5.1.6)
+ specifier: ^6.0.0
+ version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.45.0)(typescript@5.1.6)
'@typescript-eslint/parser':
- specifier: ^5.62.0
- version: 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ specifier: ^6.0.0
+ version: 6.0.0(eslint@8.45.0)(typescript@5.1.6)
'@web/rollup-plugin-copy':
specifier: ^0.4.0
version: 0.4.0
version: 8.8.0(eslint@8.45.0)
eslint-import-resolver-typescript:
specifier: ^3.5.5
- version: 3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
+ version: 3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
eslint-plugin-import:
specifier: ^2.27.5
- version: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ version: 2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
eslint-plugin-jsdoc:
- specifier: ^46.4.3
- version: 46.4.3(eslint@8.45.0)
+ specifier: ^46.4.4
+ version: 46.4.4(eslint@8.45.0)
eslint-plugin-n:
specifier: ^16.0.1
version: 16.0.1(eslint@8.45.0)
specifier: ^3.0.0
version: 3.0.0
release-it:
- specifier: ^16.1.0
- version: 16.1.0
+ specifier: ^16.1.2
+ version: 16.1.2
rimraf:
specifier: ^5.0.1
version: 5.0.1
config-chain: 1.1.13
dev: true
- /@release-it/bumper@5.0.0(release-it@16.1.0):
+ /@release-it/bumper@5.0.0(release-it@16.1.2):
resolution: {integrity: sha512-s5DNaLhM177WSaV8GtHTKbEmkKmszsqChktFUVpAmoLDlUW4WmXq/S92DSfC9BHdM7SFhVTHsjgZBYReRpp3zw==}
engines: {node: '>=16'}
peerDependencies:
lodash.castarray: 4.4.0
lodash.get: 4.4.2
lodash.set: 4.3.2
- release-it: 16.1.0
+ release-it: 16.1.2
semver: 7.5.4
dev: true
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
dev: true
- /@sindresorhus/is@5.4.1:
- resolution: {integrity: sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==}
+ /@sindresorhus/is@5.5.0:
+ resolution: {integrity: sha512-3rO1QIz6mL0MvFVTOxqhDJRVsLfG/vK2VSlKKPghALA6FhJqU7L+RUHnFvH5BP5HhkWiMQqq514i9ZFTcqoGCQ==}
engines: {node: '>=14.16'}
dev: true
'@types/yargs-parser': 21.0.0
dev: true
- /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.45.0)(typescript@5.1.6):
- resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==}
+ engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
- '@typescript-eslint/parser': ^5.0.0
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
+ eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@eslint-community/regexpp': 4.5.1
- '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/type-utils': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
- '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/type-utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.45.0
+ grapheme-splitter: 1.0.4
graphemer: 1.4.0
ignore: 5.2.4
+ natural-compare: 1.4.0
natural-compare-lite: 1.4.0
semver: 7.5.4
- tsutils: 3.21.0(typescript@5.1.6)
+ ts-api-utils: 1.0.1(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6):
- resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/parser@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
+ '@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.45.0
typescript: 5.1.6
- supports-color
dev: true
- /@typescript-eslint/scope-manager@5.62.0:
- resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/scope-manager@6.0.0:
+ resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/visitor-keys': 5.62.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/visitor-keys': 6.0.0
dev: true
- /@typescript-eslint/type-utils@5.62.0(eslint@8.45.0)(typescript@5.1.6):
- resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/type-utils@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
- eslint: '*'
+ eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
- '@typescript-eslint/utils': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
+ '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.45.0
- tsutils: 3.21.0(typescript@5.1.6)
+ ts-api-utils: 1.0.1(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/types@5.62.0:
- resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/types@6.0.0:
+ resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
dev: true
- /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6):
- resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.6):
+ resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/visitor-keys': 5.62.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/visitor-keys': 6.0.0
debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
- tsutils: 3.21.0(typescript@5.1.6)
+ ts-api-utils: 1.0.1(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/utils@5.62.0(eslint@8.45.0)(typescript@5.1.6):
- resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/utils@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ eslint: ^7.0.0 || ^8.0.0
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0)
'@types/json-schema': 7.0.12
'@types/semver': 7.5.0
- '@typescript-eslint/scope-manager': 5.62.0
- '@typescript-eslint/types': 5.62.0
- '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6)
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
eslint: 8.45.0
eslint-scope: 5.1.1
semver: 7.5.4
- typescript
dev: true
- /@typescript-eslint/visitor-keys@5.62.0:
- resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ /@typescript-eslint/visitor-keys@6.0.0:
+ resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==}
+ engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 5.62.0
+ '@typescript-eslint/types': 6.0.0
eslint-visitor-keys: 3.4.1
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
get-intrinsic: 1.2.1
is-string: 1.0.7
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
es-shim-unscopables: 1.0.0
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
es-shim-unscopables: 1.0.0
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
es-array-method-boxes-properly: 1.0.0
is-string: 1.0.7
dev: true
+ /arraybuffer.prototype.slice@1.0.1:
+ resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ array-buffer-byte-length: 1.0.0
+ call-bind: 1.0.2
+ define-properties: 1.2.0
+ get-intrinsic: 1.2.1
+ is-array-buffer: 3.0.2
+ is-shared-array-buffer: 1.0.2
+ dev: true
+
/arrify@1.0.1:
resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==}
engines: {node: '>=0.10.0'}
is-arrayish: 0.2.1
dev: true
- /es-abstract@1.21.3:
- resolution: {integrity: sha512-ZU4miiY1j3sGPFLJ34VJXEqhpmL+HGByCinGHv4HC+Fxl2fI2Z4yR6tl0mORnDr6PA8eihWo4LmSWDbvhALckg==}
+ /es-abstract@1.22.1:
+ resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==}
engines: {node: '>= 0.4'}
dependencies:
array-buffer-byte-length: 1.0.0
+ arraybuffer.prototype.slice: 1.0.1
available-typed-arrays: 1.0.5
call-bind: 1.0.2
es-set-tostringtag: 2.0.1
object-keys: 1.1.1
object.assign: 4.1.4
regexp.prototype.flags: 1.5.0
+ safe-array-concat: 1.0.0
safe-regex-test: 1.0.0
string.prototype.trim: 1.2.7
string.prototype.trimend: 1.0.6
string.prototype.trimstart: 1.0.6
+ typed-array-buffer: 1.0.0
+ typed-array-byte-length: 1.0.0
typed-array-byte-offset: 1.0.0
typed-array-length: 1.0.4
unbox-primitive: 1.0.2
- supports-color
dev: true
- /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0):
+ /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0):
resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
debug: 4.3.4(supports-color@8.1.1)
enhanced-resolve: 5.15.0
eslint: 8.45.0
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
get-tsconfig: 4.6.2
globby: 13.2.2
is-core-module: 2.12.1
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
debug: 3.2.7
eslint: 8.45.0
eslint-import-resolver-node: 0.3.7
- eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
+ eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
transitivePeerDependencies:
- supports-color
dev: true
eslint: 8.45.0
dev: true
- /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
+ /eslint-plugin-import@2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
array-includes: 3.1.6
array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1
doctrine: 2.1.0
eslint: 8.45.0
eslint-import-resolver-node: 0.3.7
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
has: 1.0.3
is-core-module: 2.12.1
is-glob: 4.0.3
- supports-color
dev: true
- /eslint-plugin-jsdoc@46.4.3(eslint@8.45.0):
- resolution: {integrity: sha512-Prc7ol+vCIghPeECpwZq5+P+VZfoi87suywvbYCiCnkI1kTmVSdcOC2M8mioglWxBbd28wbb1OVjg/8OzGzatA==}
+ /eslint-plugin-jsdoc@46.4.4(eslint@8.45.0):
+ resolution: {integrity: sha512-D8TGPOkq3bnzmYmA7Q6jdsW+Slx7CunhJk1tlouVq6wJjlP1p6eigZPvxFn7aufud/D66xBsNVMhkDQEuqumMg==}
engines: {node: '>=16'}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
functions-have-names: 1.2.3
dev: true
merge2: 1.4.1
slash: 3.0.0
- /globby@13.2.1:
- resolution: {integrity: sha512-DPCBxctI7dN4EeIqjW2KGqgdcUMbrhJ9AzON+PlxCtvppWhubTLD4+a0GFxiym14ZvacUydTPjLPc2DlKz7EIg==}
- engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- dependencies:
- dir-glob: 3.0.1
- fast-glob: 3.3.0
- ignore: 5.2.4
- merge2: 1.4.1
- slash: 4.0.0
- dev: true
-
/globby@13.2.2:
resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==}
engines: {node: '>=14.16'}
dependencies:
- '@sindresorhus/is': 5.4.1
+ '@sindresorhus/is': 5.5.0
'@szmarczak/http-timer': 5.0.1
cacheable-lookup: 7.0.0
cacheable-request: 10.2.12
/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
+ /grapheme-splitter@1.0.4:
+ resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
+ dev: true
+
/graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
through: 2.3.8
dev: true
- /inquirer@9.2.7:
- resolution: {integrity: sha512-Bf52lnfvNxGPJPltiNO2tLBp3zC339KNlGMqOkW+dsvNikBhcVDK5kqU2lVX2FTPzuXUFX5WJDlsw//w3ZwoTw==}
+ /inquirer@9.2.8:
+ resolution: {integrity: sha512-SJ0fVfgIzZL1AD6WvFhivlh5/3hN6WeAvpvPrpPXH/8MOcQHeXhinmSm5CDJNRC2Q+sLh9YJ5k8F8/5APMXSfw==}
engines: {node: '>=14.18.0'}
dependencies:
ansi-escapes: 4.3.2
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/obliterator@2.0.4:
array.prototype.map: 1.0.5
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
get-intrinsic: 1.2.1
iterate-value: 1.0.2
dev: true
resolution: {integrity: sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==}
dev: true
- /proxy-agent@6.2.1:
- resolution: {integrity: sha512-OIbBKlRAT+ycCm6wAYIzMwPejzRtjy8F3QiDX0eKOA3e4pe3U9F/IvzcHP42bmgQxVv97juG+J8/gx+JIeCX/Q==}
+ /proxy-agent@6.2.2:
+ resolution: {integrity: sha512-wPQ+zf4bFG3wtqX9L8xNEK6vfOmaZABbpN2NslLLSlbfTKbUL7X1LqwpPVdbsbloAFvtWAmnVhJQ3vkagxKUTA==}
engines: {node: '>= 14'}
dependencies:
agent-base: 7.1.0
resolution: {integrity: sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ==}
dev: true
- /release-it@16.1.0:
- resolution: {integrity: sha512-d2XpGtPAIUoN/v0nJkfdx9GyFkgTXRj+7HATaZRmS+a0IhnE/qRDQ4kMVuDh8UCX1CKV6SRiFdV/vEpKpzZzxA==}
+ /release-it@16.1.2:
+ resolution: {integrity: sha512-dRamWBWMLJcsPl0G3M7q/hkwPv4i0buUEKWwNp/MY9mBIBcUmBSCvm4B1CdN28LUgqrBzWVurnnNCcz6IPeQKQ==}
engines: {node: '>=16'}
hasBin: true
dependencies:
cosmiconfig: 8.2.0
execa: 7.1.1
git-url-parse: 13.1.0
- globby: 13.2.1
+ globby: 13.2.2
got: 12.6.1
- inquirer: 9.2.7
+ inquirer: 9.2.8
is-ci: 3.0.1
issue-parser: 6.0.0
lodash: 4.17.21
ora: 6.3.1
os-name: 5.1.0
promise.allsettled: 1.0.6
- proxy-agent: 6.2.1
+ proxy-agent: 6.2.2
semver: 7.5.4
shelljs: 0.8.5
update-notifier: 6.0.2
tslib: 2.6.0
dev: true
+ /safe-array-concat@1.0.0:
+ resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==}
+ engines: {node: '>=0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.1
+ has-symbols: 1.0.3
+ isarray: 2.0.5
+ dev: true
+
/safe-buffer@5.1.2:
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/string.prototype.trimend@1.0.6:
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/string.prototype.trimstart@1.0.6:
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/string_decoder@1.1.1:
engines: {node: '>= 14.0.0'}
dev: false
+ /ts-api-utils@1.0.1(typescript@5.1.6):
+ resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==}
+ engines: {node: '>=16.13.0'}
+ peerDependencies:
+ typescript: '>=4.2.0'
+ dependencies:
+ typescript: 5.1.6
+ dev: true
+
/ts-morph@18.0.0:
resolution: {integrity: sha512-Kg5u0mk19PIIe4islUI/HWRvm9bC1lHejK4S0oh1zaZ77TMZAEmQC0sHQYiu2RgCQFZKXz1fMVi/7nOOeirznA==}
dependencies:
/tslib@2.6.0:
resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==}
- /tsutils@3.21.0(typescript@5.1.6):
- resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
- engines: {node: '>= 6'}
- peerDependencies:
- typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
- dependencies:
- tslib: 1.14.1
- typescript: 5.1.6
- dev: true
-
/ttest@3.0.0:
resolution: {integrity: sha512-bLo+LdYokiDZHVFIWJmC5afoh7wZ+o1h++0XXKh01+yprzz8CnaiGNcbcbqP0e3+iyDqclLI+rM0j/9AwmRljw==}
dependencies:
resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==}
dev: true
+ /typed-array-buffer@1.0.0:
+ resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.1
+ is-typed-array: 1.1.10
+ dev: true
+
+ /typed-array-byte-length@1.0.0:
+ resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ for-each: 0.3.3
+ has-proto: 1.0.1
+ is-typed-array: 1.1.10
+ dev: true
+
/typed-array-byte-offset@1.0.0:
resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
engines: {node: '>= 0.4'}
throw new BaseError(`Connector ${connectorId} does not exist`);
}
if (this.connectorsStatus.get(connectorId)?.start === true) {
- this.connectorsStatus.get(connectorId).start = false;
+ this.connectorsStatus.get(connectorId)!.start = false;
} else if (this.connectorsStatus.get(connectorId)?.start === false) {
logger.warn(`${this.logPrefix(connectorId)} is already stopped on connector`);
}
`${this.logPrefix(
connectorId,
)} started on connector and will run for ${formatDurationMilliSeconds(
- this.connectorsStatus.get(connectorId).stopDate.getTime() -
- this.connectorsStatus.get(connectorId).startDate.getTime(),
+ this.connectorsStatus.get(connectorId)!.stopDate!.getTime() -
+ this.connectorsStatus.get(connectorId)!.startDate!.getTime(),
)}`,
);
while (this.connectorsStatus.get(connectorId)?.start === true) {
- if (new Date() > this.connectorsStatus.get(connectorId).stopDate) {
+ if (new Date() > this.connectorsStatus.get(connectorId)!.stopDate!) {
this.stopConnector(connectorId);
break;
}
start <
this.chargingStation.getAutomaticTransactionGeneratorConfiguration().probabilityOfStart
) {
- this.connectorsStatus.get(connectorId).skippedConsecutiveTransactions = 0;
+ this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions = 0;
// Start transaction
const startResponse = await this.startTransaction(connectorId);
if (startResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
await this.stopTransaction(connectorId);
}
} else {
- ++this.connectorsStatus.get(connectorId).skippedConsecutiveTransactions;
- ++this.connectorsStatus.get(connectorId).skippedTransactions;
+ ++this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions!;
+ ++this.connectorsStatus.get(connectorId)!.skippedTransactions!;
logger.info(
`${this.logPrefix(connectorId)} skipped consecutively ${this.connectorsStatus
.get(connectorId)
?.skippedTransactions?.toString()} transaction(s)`,
);
}
- this.connectorsStatus.get(connectorId).lastRunDate = new Date();
+ this.connectorsStatus.get(connectorId)!.lastRunDate = new Date();
}
- this.connectorsStatus.get(connectorId).stoppedDate = new Date();
+ this.connectorsStatus.get(connectorId)!.stoppedDate = new Date();
logger.info(
`${this.logPrefix(
connectorId,
)} stopped on connector and lasted for ${formatDurationMilliSeconds(
- this.connectorsStatus.get(connectorId).stoppedDate.getTime() -
- this.connectorsStatus.get(connectorId).startDate.getTime(),
+ this.connectorsStatus.get(connectorId)!.stoppedDate!.getTime() -
+ this.connectorsStatus.get(connectorId)!.startDate!.getTime(),
)}`,
);
logger.debug(
}
private setStartConnectorStatus(connectorId: number): void {
- this.connectorsStatus.get(connectorId).skippedConsecutiveTransactions = 0;
+ this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions = 0;
const previousRunDuration =
this.connectorsStatus.get(connectorId)?.startDate &&
this.connectorsStatus.get(connectorId)?.lastRunDate
- ? this.connectorsStatus.get(connectorId).lastRunDate.getTime() -
- this.connectorsStatus.get(connectorId).startDate.getTime()
+ ? this.connectorsStatus.get(connectorId)!.lastRunDate!.getTime() -
+ this.connectorsStatus.get(connectorId)!.startDate!.getTime()
: 0;
- this.connectorsStatus.get(connectorId).startDate = new Date();
- this.connectorsStatus.get(connectorId).stopDate = new Date(
- this.connectorsStatus.get(connectorId).startDate.getTime() +
+ this.connectorsStatus.get(connectorId)!.startDate = new Date();
+ this.connectorsStatus.get(connectorId)!.stopDate = new Date(
+ this.connectorsStatus.get(connectorId)!.startDate!.getTime() +
this.chargingStation.getAutomaticTransactionGeneratorConfiguration().stopAfterHours *
3600 *
1000 -
previousRunDuration,
);
- this.connectorsStatus.get(connectorId).start = true;
+ this.connectorsStatus.get(connectorId)!.start = true;
}
private initializeConnectorsStatus(): void {
private getConnectorStatus(connectorId: number): Status {
const connectorStatus = cloneObject(
- this.chargingStation.getAutomaticTransactionGeneratorStatuses(),
+ this.chargingStation.getAutomaticTransactionGeneratorStatuses()!,
)[connectorId];
delete connectorStatus?.startDate;
delete connectorStatus?.lastRunDate;
): Promise<StartTransactionResponse | undefined> {
const measureId = 'StartTransaction with ATG';
const beginId = PerformanceStatistics.beginMeasure(measureId);
- let startResponse: StartTransactionResponse;
+ let startResponse: StartTransactionResponse | undefined;
if (this.chargingStation.hasIdTags()) {
const idTag = IdTagsCache.getInstance().getIdTag(
- this.chargingStation.getAutomaticTransactionGeneratorConfiguration()?.idTagDistribution,
+ this.chargingStation.getAutomaticTransactionGeneratorConfiguration().idTagDistribution!,
this.chargingStation,
connectorId,
);
connectorId,
)} start transaction with an idTag '${idTag}'`;
if (this.getRequireAuthorize()) {
- this.chargingStation.getConnectorStatus(connectorId).authorizeIdTag = idTag;
+ this.chargingStation.getConnectorStatus(connectorId)!.authorizeIdTag = idTag;
// Authorize idTag
const authorizeResponse: AuthorizeResponse =
await this.chargingStation.ocppRequestService.requestHandler<
>(this.chargingStation, RequestCommand.AUTHORIZE, {
idTag,
});
- ++this.connectorsStatus.get(connectorId).authorizeRequests;
+ ++this.connectorsStatus.get(connectorId)!.authorizeRequests!;
if (authorizeResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- ++this.connectorsStatus.get(connectorId).acceptedAuthorizeRequests;
+ ++this.connectorsStatus.get(connectorId)!.acceptedAuthorizeRequests!;
logger.info(startTransactionLogMsg);
// Start transaction
startResponse = await this.chargingStation.ocppRequestService.requestHandler<
PerformanceStatistics.endMeasure(measureId, beginId);
return startResponse;
}
- ++this.connectorsStatus.get(connectorId).rejectedAuthorizeRequests;
+ ++this.connectorsStatus.get(connectorId)!.rejectedAuthorizeRequests!;
PerformanceStatistics.endMeasure(measureId, beginId);
return startResponse;
}
private async stopTransaction(
connectorId: number,
reason: StopTransactionReason = StopTransactionReason.LOCAL,
- ): Promise<StopTransactionResponse> {
+ ): Promise<StopTransactionResponse | undefined> {
const measureId = 'StopTransaction with ATG';
const beginId = PerformanceStatistics.beginMeasure(measureId);
- let stopResponse: StopTransactionResponse;
+ let stopResponse: StopTransactionResponse | undefined;
if (this.chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
stopResponse = await this.chargingStation.stopTransactionOnConnector(connectorId, reason);
- ++this.connectorsStatus.get(connectorId).stopTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.stopTransactionRequests!;
if (stopResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- ++this.connectorsStatus.get(connectorId).acceptedStopTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.acceptedStopTransactionRequests!;
} else {
- ++this.connectorsStatus.get(connectorId).rejectedStopTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.rejectedStopTransactionRequests!;
}
} else {
const transactionId = this.chargingStation.getConnectorStatus(connectorId)?.transactionId;
private logPrefix = (connectorId?: number): string => {
return logPrefix(
` ${this.chargingStation.stationInfo.chargingStationId} | ATG${
- !isNullOrUndefined(connectorId) ? ` on connector #${connectorId.toString()}` : ''
+ !isNullOrUndefined(connectorId) ? ` on connector #${connectorId!.toString()}` : ''
}:`,
);
};
connectorId: number,
startResponse: StartTransactionResponse,
): void {
- ++this.connectorsStatus.get(connectorId).startTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.startTransactionRequests!;
if (startResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- ++this.connectorsStatus.get(connectorId).acceptedStartTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.acceptedStartTransactionRequests!;
} else {
logger.warn(`${this.logPrefix(connectorId)} start transaction rejected`);
- ++this.connectorsStatus.get(connectorId).rejectedStartTransactionRequests;
+ ++this.connectorsStatus.get(connectorId)!.rejectedStartTransactionRequests!;
}
}
}
(this.uiServer = UIServerFactory.getUIServerImplementation(Configuration.getUIServer()));
Configuration.getPerformanceStorage().enabled === true &&
(this.storage = StorageFactory.getStorage(
- Configuration.getPerformanceStorage().type,
- Configuration.getPerformanceStorage().uri,
+ Configuration.getPerformanceStorage().type!,
+ Configuration.getPerformanceStorage().uri!,
this.logPrefix(),
));
Configuration.setConfigurationChangeCallback(async () => Bootstrap.getInstance().restart());
await this.storage?.open();
this.uiServer?.start();
// Start ChargingStation object instance in worker thread
- for (const stationTemplateUrl of Configuration.getStationTemplateUrls()) {
+ for (const stationTemplateUrl of Configuration.getStationTemplateUrls()!) {
try {
const nbStations = stationTemplateUrl.numberOfStations ?? 0;
for (let index = 1; index <= nbStations; index++) {
}
private initializeWorkerImplementation(): void {
- let elementsPerWorker: number;
+ let elementsPerWorker: number | undefined;
if (Configuration.getWorker()?.elementsPerWorker === 'auto') {
elementsPerWorker =
this.numberOfChargingStations > availableParallelism()
this.workerImplementation === null &&
(this.workerImplementation = WorkerFactory.getWorkerImplementation<ChargingStationWorkerData>(
this.workerScript,
- Configuration.getWorker().processType,
+ Configuration.getWorker().processType!,
{
workerStartDelay: Configuration.getWorker().startDelay,
elementStartDelay: Configuration.getWorker().elementStartDelay,
- poolMaxSize: Configuration.getWorker().poolMaxSize,
- poolMinSize: Configuration.getWorker().poolMinSize,
+ poolMaxSize: Configuration.getWorker().poolMaxSize!,
+ poolMinSize: Configuration.getWorker().poolMinSize!,
elementsPerWorker:
elementsPerWorker ?? (Configuration.getWorker().elementsPerWorker as number),
poolOptions: {
// `${this.logPrefix()} ${moduleName}.messageHandler: Worker channel message received: ${JSON.stringify(
// msg,
// null,
- // 2
- // )}`
+ // 2,
+ // )}`,
// );
try {
switch (msg.id) {
private initializeCounters() {
if (this.initializedCounters === false) {
this.resetCounters();
- const stationTemplateUrls = Configuration.getStationTemplateUrls();
+ const stationTemplateUrls = Configuration.getStationTemplateUrls()!;
if (isNotEmptyArray(stationTemplateUrls)) {
this.numberOfChargingStationTemplates = stationTemplateUrls.length;
for (const stationTemplateUrl of stationTemplateUrls) {
public readonly evses: Map<number, EvseStatus>;
public readonly requests: Map<string, CachedRequest>;
public performanceStatistics!: PerformanceStatistics | undefined;
- public heartbeatSetInterval!: NodeJS.Timeout;
+ public heartbeatSetInterval?: NodeJS.Timeout;
public ocppRequestService!: OCPPRequestService;
public bootNotificationRequest!: BootNotificationRequest;
public bootNotificationResponse!: BootNotificationResponse | undefined;
private templateFileWatcher!: FSWatcher | undefined;
private templateFileHash!: string;
private readonly sharedLRUCache: SharedLRUCache;
- private webSocketPingSetInterval!: NodeJS.Timeout;
+ private webSocketPingSetInterval?: NodeJS.Timeout;
private readonly chargingStationWorkerBroadcastChannel: ChargingStationWorkerBroadcastChannel;
private reservationExpirationSetInterval?: NodeJS.Timeout;
? ChargingStationConfigurationUtils.getConfigurationKey(
this,
this.getSupervisionUrlOcppKey(),
- ).value
+ )!.value
: this.configuredSupervisionUrl.href
}/${this.stationInfo.chargingStationId}`,
);
` ${
(isNotEmptyString(this?.stationInfo?.chargingStationId)
? this?.stationInfo?.chargingStationId
- : getChargingStationId(this.index, this.getTemplateFromFile())) ??
+ : getChargingStationId(this.index, this.getTemplateFromFile()!)) ??
'Error at building log prefix'
} |`,
);
};
public hasIdTags(): boolean {
- return isNotEmptyArray(this.idTagsCache.getIdTags(getIdTagsFile(this.stationInfo)));
+ return isNotEmptyArray(this.idTagsCache.getIdTags(getIdTagsFile(this.stationInfo)!));
}
public getEnableStatistics(): boolean {
return this.stationInfo.mustAuthorizeAtRemoteStart ?? true;
}
- public getNumberOfPhases(stationInfo?: ChargingStationInfo): number | undefined {
+ public getNumberOfPhases(stationInfo?: ChargingStationInfo): number {
const localStationInfo: ChargingStationInfo = stationInfo ?? this.stationInfo;
switch (this.getCurrentOutType(stationInfo)) {
case CurrentType.AC:
- return !isUndefined(localStationInfo.numberOfPhases) ? localStationInfo.numberOfPhases : 3;
+ return !isUndefined(localStationInfo.numberOfPhases) ? localStationInfo.numberOfPhases! : 3;
case CurrentType.DC:
return 0;
}
return this.stationInfo?.ocppStrictCompliance ?? true;
}
- public getVoltageOut(stationInfo?: ChargingStationInfo): number | undefined {
+ public getVoltageOut(stationInfo?: ChargingStationInfo): number {
const defaultVoltageOut = getDefaultVoltageOut(
this.getCurrentOutType(stationInfo),
this.logPrefix(),
public getMaximumPower(stationInfo?: ChargingStationInfo): number {
const localStationInfo = stationInfo ?? this.stationInfo;
+ // eslint-disable-next-line @typescript-eslint/dot-notation
return (localStationInfo['maxPower'] as number) ?? localStationInfo.maximumPower;
}
public getConnectorMaximumAvailablePower(connectorId: number): number {
- let connectorAmperageLimitationPowerLimit: number;
+ let connectorAmperageLimitationPowerLimit: number | undefined;
if (
!isNullOrUndefined(this.getAmperageLimitation()) &&
- this.getAmperageLimitation() < this.stationInfo?.maximumAmperage
+ this.getAmperageLimitation()! < this.stationInfo.maximumAmperage!
) {
connectorAmperageLimitationPowerLimit =
(this.getCurrentOutType() === CurrentType.AC
? ACElectricUtils.powerTotal(
this.getNumberOfPhases(),
this.getVoltageOut(),
- this.getAmperageLimitation() *
+ this.getAmperageLimitation()! *
(this.hasEvses ? this.getNumberOfEvses() : this.getNumberOfConnectors()),
)
- : DCElectricUtils.power(this.getVoltageOut(), this.getAmperageLimitation())) /
+ : DCElectricUtils.power(this.getVoltageOut(), this.getAmperageLimitation()!)) /
this.powerDivider;
}
const connectorMaximumPower = this.getMaximumPower() / this.powerDivider;
getChargingStationConnectorChargingProfilesPowerLimit(this, connectorId);
return Math.min(
isNaN(connectorMaximumPower) ? Infinity : connectorMaximumPower,
- isNaN(connectorAmperageLimitationPowerLimit)
+ isNaN(connectorAmperageLimitationPowerLimit!)
? Infinity
- : connectorAmperageLimitationPowerLimit,
- isNaN(connectorChargingProfilesPowerLimit) ? Infinity : connectorChargingProfilesPowerLimit,
+ : connectorAmperageLimitationPowerLimit!,
+ isNaN(connectorChargingProfilesPowerLimit!) ? Infinity : connectorChargingProfilesPowerLimit!,
);
}
rounded = false,
): number {
return this.getEnergyActiveImportRegister(
- this.getConnectorStatus(this.getConnectorIdByTransactionId(transactionId)),
+ this.getConnectorStatus(this.getConnectorIdByTransactionId(transactionId)!)!,
rounded,
);
}
public getEnergyActiveImportRegisterByConnectorId(connectorId: number, rounded = false): number {
- return this.getEnergyActiveImportRegister(this.getConnectorStatus(connectorId), rounded);
+ return this.getEnergyActiveImportRegister(this.getConnectorStatus(connectorId)!, rounded);
}
public getAuthorizeRemoteTxRequests(): boolean {
return;
}
if (interval > 0) {
- this.getConnectorStatus(connectorId).transactionSetInterval = setInterval(() => {
+ this.getConnectorStatus(connectorId)!.transactionSetInterval = setInterval(() => {
// FIXME: Implement OCPP version agnostic helpers
const meterValue: MeterValue = OCPP16ServiceUtils.buildMeterValue(
this,
connectorId,
- this.getConnectorStatus(connectorId).transactionId,
+ this.getConnectorStatus(connectorId)!.transactionId!,
interval,
);
this.ocppRequestService
this.sharedLRUCache.deleteChargingStationTemplate(this.templateFileHash);
// Initialize
this.initialize();
- this.idTagsCache.deleteIdTags(getIdTagsFile(this.stationInfo));
+ this.idTagsCache.deleteIdTags(getIdTagsFile(this.stationInfo)!);
// Restart the ATG
this.stopAutomaticTransactionGenerator();
if (this.getAutomaticTransactionGeneratorConfiguration()?.enable === true) {
public async reset(reason?: StopTransactionReason): Promise<void> {
await this.stop(reason);
- await sleep(this.stationInfo.resetTime);
+ await sleep(this.stationInfo.resetTime!);
this.initialize();
this.start();
}
}
}
- public getAutomaticTransactionGeneratorConfiguration():
- | AutomaticTransactionGeneratorConfiguration
- | undefined {
+ public getAutomaticTransactionGeneratorConfiguration(): AutomaticTransactionGeneratorConfiguration {
let automaticTransactionGeneratorConfiguration:
| AutomaticTransactionGeneratorConfiguration
| undefined;
public startAutomaticTransactionGenerator(connectorIds?: number[]): void {
this.automaticTransactionGenerator = AutomaticTransactionGenerator.getInstance(this);
if (isNotEmptyArray(connectorIds)) {
- for (const connectorId of connectorIds) {
+ for (const connectorId of connectorIds!) {
this.automaticTransactionGenerator?.startConnector(connectorId);
}
} else {
public stopAutomaticTransactionGenerator(connectorIds?: number[]): void {
if (isNotEmptyArray(connectorIds)) {
- for (const connectorId of connectorIds) {
+ for (const connectorId of connectorIds!) {
this.automaticTransactionGenerator?.stopConnector(connectorId);
}
} else {
const transactionEndMeterValue = OCPP16ServiceUtils.buildTransactionEndMeterValue(
this,
connectorId,
- this.getEnergyActiveImportRegisterByTransactionId(transactionId),
+ this.getEnergyActiveImportRegisterByTransactionId(transactionId!),
);
await this.ocppRequestService.requestHandler<MeterValuesRequest, MeterValuesResponse>(
this,
RequestCommand.STOP_TRANSACTION,
{
transactionId,
- meterStop: this.getEnergyActiveImportRegisterByTransactionId(transactionId, true),
+ meterStop: this.getEnergyActiveImportRegisterByTransactionId(transactionId!, true),
reason,
},
);
ChargingStationConfigurationUtils.getConfigurationKey(
this,
StandardParametersKey.ReserveConnectorZeroSupported,
- ).value,
+ )!.value,
);
}
public async addReservation(reservation: Reservation): Promise<void> {
const [exists, reservationFound] = this.doesReservationExists(reservation);
if (exists) {
- await this.removeReservation(reservationFound, ReservationTerminationReason.REPLACE_EXISTING);
+ await this.removeReservation(
+ reservationFound!,
+ ReservationTerminationReason.REPLACE_EXISTING,
+ );
}
- this.getConnectorStatus(reservation.connectorId).reservation = reservation;
+ this.getConnectorStatus(reservation.connectorId)!.reservation = reservation;
await OCPPServiceUtils.sendAndSetConnectorStatus(
this,
reservation.connectorId,
ConnectorStatusEnum.Reserved,
- null,
+ undefined,
{ send: reservation.connectorId !== 0 },
);
}
reservation: Reservation,
reason?: ReservationTerminationReason,
): Promise<void> {
- const connector = this.getConnectorStatus(reservation.connectorId);
+ const connector = this.getConnectorStatus(reservation.connectorId)!;
switch (reason) {
case ReservationTerminationReason.CONNECTOR_STATE_CHANGED:
delete connector.reservation;
this,
reservation.connectorId,
ConnectorStatusEnum.Available,
- null,
+ undefined,
{ send: reservation.connectorId !== 0 },
);
delete connector.reservation;
}
}
- public doesReservationExists(reservation: Partial<Reservation>): [boolean, Reservation] {
+ public doesReservationExists(
+ reservation: Partial<Reservation>,
+ ): [boolean, Reservation | undefined] {
const foundReservation = this.getReservationBy(
ReservationFilterKey.RESERVATION_ID,
- reservation?.id,
+ reservation.id!,
);
- return isUndefined(foundReservation) ? [false, null] : [true, foundReservation];
+ return isUndefined(foundReservation) ? [false, undefined] : [true, foundReservation];
}
public startReservationExpirationSetInterval(customInterval?: number): void {
if (this.hasEvses) {
for (const evseStatus of this.evses.values()) {
for (const connectorStatus of evseStatus.connectors.values()) {
- if (connectorStatus?.reservation?.expiryDate < now) {
+ if (connectorStatus.reservation!.expiryDate < now) {
await this.removeReservation(
- connectorStatus.reservation,
+ connectorStatus.reservation!,
ReservationTerminationReason.EXPIRED,
);
}
}
} else {
for (const connectorStatus of this.connectors.values()) {
- if (connectorStatus?.reservation?.expiryDate < now) {
+ if (connectorStatus.reservation!.expiryDate < now) {
await this.removeReservation(
- connectorStatus.reservation,
+ connectorStatus.reservation!,
ReservationTerminationReason.EXPIRED,
);
}
return alreadyExists;
}
const userReservedAlready = isUndefined(
- this.getReservationBy(ReservationFilterKey.ID_TAG, idTag),
+ this.getReservationBy(ReservationFilterKey.ID_TAG, idTag!),
)
? false
: true;
- const notConnectorZero = isUndefined(connectorId) ? true : connectorId > 0;
+ const notConnectorZero = isUndefined(connectorId) ? true : connectorId! > 0;
const freeConnectorsAvailable = this.getNumberOfReservableConnectors() > 0;
return !alreadyExists && !userReservedAlready && notConnectorZero && freeConnectorsAvailable;
}
private flushMessageBuffer(): void {
if (this.messageBuffer.size > 0) {
for (const message of this.messageBuffer.values()) {
- let beginId: string;
- let commandName: RequestCommand;
+ let beginId: string | undefined;
+ let commandName: RequestCommand | undefined;
const [messageType] = JSON.parse(message) as OutgoingRequest | Response | ErrorResponse;
const isRequest = messageType === MessageType.CALL_MESSAGE;
if (isRequest) {
beginId = PerformanceStatistics.beginMeasure(commandName);
}
this.wsConnection?.send(message);
- isRequest && PerformanceStatistics.endMeasure(commandName, beginId);
+ isRequest && PerformanceStatistics.endMeasure(commandName!, beginId!);
logger.debug(
`${this.logPrefix()} >> Buffered ${OCPPServiceUtils.getMessageTypeString(
messageType,
}
private getTemplateFromFile(): ChargingStationTemplate | undefined {
- let template: ChargingStationTemplate;
+ let template: ChargingStationTemplate | undefined;
try {
if (this.sharedLRUCache.hasChargingStationTemplate(this.templateFileHash)) {
template = this.sharedLRUCache.getChargingStationTemplate(this.templateFileHash);
}
private getStationInfoFromTemplate(): ChargingStationInfo {
- const stationTemplate: ChargingStationTemplate | undefined = this.getTemplateFromFile();
+ const stationTemplate: ChargingStationTemplate = this.getTemplateFromFile()!;
checkTemplate(stationTemplate, this.logPrefix(), this.templateFile);
warnTemplateKeysDeprecation(stationTemplate, this.logPrefix(), this.templateFile);
if (stationTemplate?.Connectors) {
stationTemplate?.firmwareVersionPattern ?? Constants.SEMVER_PATTERN;
if (
isNotEmptyString(stationInfo.firmwareVersion) &&
- new RegExp(stationInfo.firmwareVersionPattern).test(stationInfo.firmwareVersion) === false
+ new RegExp(stationInfo.firmwareVersionPattern).test(stationInfo.firmwareVersion!) === false
) {
logger.warn(
`${this.logPrefix()} Firmware version '${stationInfo.firmwareVersion}' in template file ${
stationTemplate?.firmwareUpgrade ?? {},
);
stationInfo.resetTime = !isNullOrUndefined(stationTemplate?.resetTime)
- ? stationTemplate.resetTime * 1000
+ ? stationTemplate.resetTime! * 1000
: Constants.CHARGING_STATION_DEFAULT_RESET_TIME;
stationInfo.maximumAmperage = this.getMaximumAmperage(stationInfo);
return stationInfo;
// 1. charging station info from template
// 2. charging station info from configuration file
if (stationInfoFromFile?.templateHash === stationInfoFromTemplate.templateHash) {
- return stationInfoFromFile;
+ return stationInfoFromFile!;
}
stationInfoFromFile &&
propagateSerialNumber(
- this.getTemplateFromFile(),
+ this.getTemplateFromFile()!,
stationInfoFromFile,
stationInfoFromTemplate,
);
}
private initialize(): void {
- const stationTemplate = this.getTemplateFromFile();
+ const stationTemplate = this.getTemplateFromFile()!;
checkTemplate(stationTemplate, this.logPrefix(), this.templateFile);
this.configurationFile = join(
dirname(this.templateFile.replace('station-templates', 'configurations')),
const chargingStationConfiguration = this.getConfigurationFromFile();
if (
chargingStationConfiguration?.stationInfo?.templateHash === stationTemplate?.templateHash &&
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
(chargingStationConfiguration?.connectorsStatus || chargingStationConfiguration?.evsesStatus)
) {
this.initializeConnectorsOrEvsesFromFile(chargingStationConfiguration);
const patternGroup: number | undefined =
this.stationInfo.firmwareUpgrade?.versionUpgrade?.patternGroup ??
this.stationInfo.firmwareVersion?.split('.').length;
- const match = this.stationInfo?.firmwareVersion
- ?.match(new RegExp(this.stationInfo.firmwareVersionPattern))
- ?.slice(1, patternGroup + 1);
+ const match = this.stationInfo
+ .firmwareVersion!.match(new RegExp(this.stationInfo.firmwareVersionPattern!))!
+ .slice(1, patternGroup! + 1);
const patchLevelIndex = match.length - 1;
match[patchLevelIndex] = (
convertToInt(match[patchLevelIndex]) +
- this.stationInfo.firmwareUpgrade?.versionUpgrade?.step
+ this.stationInfo.firmwareUpgrade!.versionUpgrade!.step!
).toString();
this.stationInfo.firmwareVersion = match?.join('.');
}
if (this.getEnableStatistics() === true) {
this.performanceStatistics = PerformanceStatistics.getInstance(
this.stationInfo.hashId,
- this.stationInfo.chargingStationId,
+ this.stationInfo.chargingStationId!,
this.configuredSupervisionUrl,
);
}
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
!ChargingStationConfigurationUtils.getConfigurationKey(
this,
- this.stationInfo.amperageLimitationOcppKey,
+ this.stationInfo.amperageLimitationOcppKey!,
)
) {
ChargingStationConfigurationUtils.addConfigurationKey(
this,
- this.stationInfo.amperageLimitationOcppKey,
+ this.stationInfo.amperageLimitationOcppKey!,
(
- this.stationInfo.maximumAmperage * getAmperageLimitationUnitDivider(this.stationInfo)
+ this.stationInfo.maximumAmperage! * getAmperageLimitationUnitDivider(this.stationInfo)
).toString(),
);
}
for (const evseStatus of this.evses.values()) {
for (const connectorId of evseStatus.connectors.keys()) {
connectorsPhaseRotation.push(
- getPhaseRotationValue(connectorId, this.getNumberOfPhases()),
+ getPhaseRotationValue(connectorId, this.getNumberOfPhases())!,
);
}
}
} else {
for (const connectorId of this.connectors.keys()) {
connectorsPhaseRotation.push(
- getPhaseRotationValue(connectorId, this.getNumberOfPhases()),
+ getPhaseRotationValue(connectorId, this.getNumberOfPhases())!,
);
}
}
this.evses.set(evseId, {
...(evseStatus as EvseStatus),
connectors: new Map<number, ConnectorStatus>(
- evseStatusConfiguration.connectorsStatus.map((connectorStatus, connectorId) => [
+ evseStatusConfiguration.connectorsStatus!.map((connectorStatus, connectorId) => [
connectorId,
connectorStatus,
]),
logger.error(`${this.logPrefix()} ${errorMsg}`);
throw new BaseError(errorMsg);
}
- if (!stationTemplate?.Connectors[0]) {
+ if (!stationTemplate?.Connectors?.[0]) {
logger.warn(
`${this.logPrefix()} Charging station information from template ${
this.templateFile
logger.error(`${this.logPrefix()} ${errorMsg}`);
throw new BaseError(errorMsg);
}
- if (!stationTemplate?.Evses[0]) {
+ if (!stationTemplate?.Evses?.[0]) {
logger.warn(
`${this.logPrefix()} Charging station information from template ${
this.templateFile
} with no evse id 0 configuration`,
);
}
- if (!stationTemplate?.Evses[0]?.Connectors[0]) {
+ if (!stationTemplate?.Evses?.[0]?.Connectors?.[0]) {
logger.warn(
`${this.logPrefix()} Charging station information from template ${
this.templateFile
),
availability: AvailabilityType.Operative,
});
- initializeConnectorsMapStatus(this.evses.get(evseId)?.connectors, this.logPrefix());
+ initializeConnectorsMapStatus(this.evses.get(evseId)!.connectors, this.logPrefix());
}
this.saveEvsesStatus();
} else {
) as ChargingStationConfiguration;
PerformanceStatistics.endMeasure(measureId, beginId);
this.sharedLRUCache.setChargingStationConfiguration(configuration);
- this.configurationFileHash = configuration.configurationHash;
+ this.configurationFileHash = configuration.configurationHash!;
}
} catch (error) {
handleFileException(
mkdirSync(dirname(this.configurationFile), { recursive: true });
}
let configurationData: ChargingStationConfiguration =
- cloneObject<ChargingStationConfiguration>(this.getConfigurationFromFile()) ?? {};
+ cloneObject<ChargingStationConfiguration>(this.getConfigurationFromFile()!) ?? {};
if (this.getStationInfoPersistentConfiguration() && this.stationInfo) {
configurationData.stationInfo = this.stationInfo;
} else {
}
} while (
this.isRegistered() === false &&
- (registrationRetryCount <= this.getRegistrationMaxRetries() ||
+ (registrationRetryCount <= this.getRegistrationMaxRetries()! ||
this.getRegistrationMaxRetries() === -1)
);
}
const [responseCallback, , requestCommandName, requestPayload] = this.getCachedRequest(
messageType,
messageId,
- );
+ )!;
logger.debug(
`${this.logPrefix()} << Command '${
requestCommandName ?? Constants.UNKNOWN_COMMAND
{ errorType, errorMessage, errorDetails },
);
}
- const [, errorCallback, requestCommandName] = this.getCachedRequest(messageType, messageId);
+ const [, errorCallback, requestCommandName] = this.getCachedRequest(messageType, messageId)!;
logger.debug(
`${this.logPrefix()} << Command '${
requestCommandName ?? Constants.UNKNOWN_COMMAND
}
private async onMessage(data: RawData): Promise<void> {
- let request: IncomingRequest | Response | ErrorResponse;
- let messageType: number;
+ let request: IncomingRequest | Response | ErrorResponse | undefined;
+ let messageType: number | undefined;
let errorMsg: string;
try {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
request = JSON.parse(data.toString()) as IncomingRequest | Response | ErrorResponse;
if (Array.isArray(request) === true) {
[messageType] = request;
}
parentPort?.postMessage(buildUpdatedMessage(this));
} else {
- throw new OCPPError(ErrorType.PROTOCOL_ERROR, 'Incoming message is not an array', null, {
- request,
- });
+ throw new OCPPError(
+ ErrorType.PROTOCOL_ERROR,
+ 'Incoming message is not an array',
+ undefined,
+ {
+ request,
+ },
+ );
}
} catch (error) {
- let commandName: IncomingRequestCommand;
- let requestCommandName: RequestCommand | IncomingRequestCommand;
+ let commandName: IncomingRequestCommand | undefined;
+ let requestCommandName: RequestCommand | IncomingRequestCommand | undefined;
let errorCallback: ErrorCallback;
- const [, messageId] = request;
+ const [, messageId] = request!;
switch (messageType) {
case MessageType.CALL_MESSAGE:
[, , commandName] = request as IncomingRequest;
case MessageType.CALL_RESULT_MESSAGE:
case MessageType.CALL_ERROR_MESSAGE:
if (this.requests.has(messageId) === true) {
- [, errorCallback, requestCommandName] = this.getCachedRequest(messageType, messageId);
+ [, errorCallback, requestCommandName] = this.getCachedRequest(messageType, messageId)!;
// Reject the deferred promise in case of error at response handling (rejecting an already fulfilled promise is a no-op)
errorCallback(error as OCPPError, false);
} else {
logger.warn(
`${this.logPrefix()} Error thrown at incoming OCPP command '${
commandName ?? requestCommandName ?? Constants.UNKNOWN_COMMAND
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
}' message '${data.toString()}' handling is not an OCPPError:`,
error,
);
logger.error(
`${this.logPrefix()} Incoming OCPP command '${
commandName ?? requestCommandName ?? Constants.UNKNOWN_COMMAND
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
}' message '${data.toString()}'${
messageType !== MessageType.CALL_MESSAGE
? ` matching cached request '${JSON.stringify(this.requests.get(messageId))}'`
if (this.getMeteringPerTransaction() === true) {
return (
(rounded === true
- ? Math.round(connectorStatus?.transactionEnergyActiveImportRegisterValue)
+ ? Math.round(connectorStatus.transactionEnergyActiveImportRegisterValue!)
: connectorStatus?.transactionEnergyActiveImportRegisterValue) ?? 0
);
}
return (
(rounded === true
- ? Math.round(connectorStatus?.energyActiveImportRegisterValue)
+ ? Math.round(connectorStatus.energyActiveImportRegisterValue!)
: connectorStatus?.energyActiveImportRegisterValue) ?? 0
);
}
ChargingStationConfigurationUtils.getConfigurationKey(
this,
StandardParametersKey.ConnectionTimeOut,
- ).value,
+ )!.value!,
) ?? Constants.DEFAULT_CONNECTION_TIMEOUT
);
}
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
ChargingStationConfigurationUtils.getConfigurationKey(
this,
- this.stationInfo.amperageLimitationOcppKey,
+ this.stationInfo.amperageLimitationOcppKey!,
)
) {
return (
convertToInt(
ChargingStationConfigurationUtils.getConfigurationKey(
this,
- this.stationInfo.amperageLimitationOcppKey,
+ this.stationInfo.amperageLimitationOcppKey!,
)?.value,
) / getAmperageLimitationUnitDivider(this.stationInfo)
);
const connectorBootStatus = getBootConnectorStatus(
this,
connectorId,
- this.getConnectorStatus(connectorId),
+ this.getConnectorStatus(connectorId)!,
);
await OCPPServiceUtils.sendAndSetConnectorStatus(this, connectorId, connectorBootStatus);
}
let configuredSupervisionUrlIndex: number;
switch (Configuration.getSupervisionUrlDistribution()) {
case SupervisionUrlDistribution.RANDOM:
- configuredSupervisionUrlIndex = Math.floor(secureRandom() * supervisionUrls.length);
+ configuredSupervisionUrlIndex = Math.floor(
+ secureRandom() * (supervisionUrls as string[]).length,
+ );
break;
case SupervisionUrlDistribution.ROUND_ROBIN:
case SupervisionUrlDistribution.CHARGING_STATION_AFFINITY:
default:
Object.values(SupervisionUrlDistribution).includes(
- Configuration.getSupervisionUrlDistribution(),
+ Configuration.getSupervisionUrlDistribution()!,
) === false &&
logger.error(
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
`${this.logPrefix()} Unknown supervision url distribution '${Configuration.getSupervisionUrlDistribution()}' from values '${SupervisionUrlDistribution.toString()}', defaulting to ${
SupervisionUrlDistribution.CHARGING_STATION_AFFINITY
}`,
);
- configuredSupervisionUrlIndex = (this.index - 1) % supervisionUrls.length;
+ configuredSupervisionUrlIndex = (this.index - 1) % (supervisionUrls as string[]).length;
break;
}
- configuredSupervisionUrl = supervisionUrls[configuredSupervisionUrlIndex];
+ configuredSupervisionUrl = (supervisionUrls as string[])[configuredSupervisionUrlIndex];
} else {
configuredSupervisionUrl = supervisionUrls as string;
}
this.stopAutomaticTransactionGenerator();
}
if (
- this.autoReconnectRetryCount < this.getAutoReconnectMaxRetries() ||
+ this.autoReconnectRetryCount < this.getAutoReconnectMaxRetries()! ||
this.getAutoReconnectMaxRetries() === -1
) {
++this.autoReconnectRetryCount;
import type { ConfigurationKey, ConfigurationKeyType } from '../types';
import { logger } from '../utils';
-type ConfigurationKeyOptions = { readonly?: boolean; visible?: boolean; reboot?: boolean };
-type DeleteConfigurationKeyParams = { save?: boolean; caseInsensitive?: boolean };
-type AddConfigurationKeyParams = { overwrite?: boolean; save?: boolean };
+interface ConfigurationKeyOptions {
+ readonly?: boolean;
+ visible?: boolean;
+ reboot?: boolean;
+}
+interface DeleteConfigurationKeyParams {
+ save?: boolean;
+ caseInsensitive?: boolean;
+}
+interface AddConfigurationKeyParams {
+ overwrite?: boolean;
+ save?: boolean;
+}
export class ChargingStationConfigurationUtils {
private constructor() {
if (!keyFound) {
chargingStation.ocppConfiguration?.configurationKey?.push({
key,
- readonly: options.readonly,
+ readonly: options.readonly!,
value,
visible: options.visible,
reboot: options.reboot,
key,
caseInsensitive,
);
- if (keyFound) {
+ if (keyFound && chargingStation.ocppConfiguration?.configurationKey) {
chargingStation.ocppConfiguration.configurationKey[
chargingStation.ocppConfiguration.configurationKey.indexOf(keyFound)
].value = value;
logger.error(`${logPrefix} ${errorMsg}`);
throw new BaseError(errorMsg);
}
- if (isEmptyObject(stationTemplate.AutomaticTransactionGenerator)) {
+ if (isEmptyObject(stationTemplate.AutomaticTransactionGenerator!)) {
stationTemplate.AutomaticTransactionGenerator = Constants.DEFAULT_ATG_CONFIGURATION;
logger.warn(
`${logPrefix} Empty automatic transaction generator configuration from template file ${templateFile}, set to default: %j`,
} => {
const configuredMaxConnectors = getConfiguredNumberOfConnectors(stationTemplate);
checkConfiguredMaxConnectors(configuredMaxConnectors, logPrefix, templateFile);
- const templateMaxConnectors = getMaxNumberOfConnectors(stationTemplate.Connectors);
+ const templateMaxConnectors = getMaxNumberOfConnectors(stationTemplate.Connectors!);
checkTemplateMaxConnectors(templateMaxConnectors, logPrefix, templateFile);
- const templateMaxAvailableConnectors = stationTemplate?.Connectors[0]
+ const templateMaxAvailableConnectors = stationTemplate.Connectors![0]
? templateMaxConnectors - 1
: templateMaxConnectors;
if (
);
}
if (connectorId === 0) {
- connectors.get(connectorId).availability = AvailabilityType.Operative;
+ connectors.get(connectorId)!.availability = AvailabilityType.Operative;
if (isUndefined(connectors.get(connectorId)?.chargingProfiles)) {
- connectors.get(connectorId).chargingProfiles = [];
+ connectors.get(connectorId)!.chargingProfiles = [];
}
} else if (
connectorId > 0 &&
isNullOrUndefined(connectors.get(connectorId)?.transactionStarted)
) {
- initializeConnectorStatus(connectors.get(connectorId));
+ initializeConnectorStatus(connectors.get(connectorId)!);
}
}
};
templateKey.deprecatedKey,
logPrefix,
templateFile,
- !isUndefined(templateKey.key) && `Use '${templateKey.key}' instead`,
+ !isUndefined(templateKey.key) ? `Use '${templateKey.key}' instead` : undefined,
);
convertDeprecatedTemplateKey(stationTemplate, templateKey.deprecatedKey, templateKey.key);
}
stationTemplate = cloneObject<ChargingStationTemplate>(stationTemplate);
delete stationTemplate.power;
delete stationTemplate.powerUnit;
- delete stationTemplate?.Connectors;
- delete stationTemplate?.Evses;
+ delete stationTemplate.Connectors;
+ delete stationTemplate.Evses;
delete stationTemplate.Configuration;
delete stationTemplate.AutomaticTransactionGenerator;
delete stationTemplate.chargeBoxSerialNumberPrefix;
chargingStation: ChargingStation,
connectorId: number,
): number | undefined => {
- let limit: number, matchingChargingProfile: ChargingProfile;
+ let limit: number | undefined, matchingChargingProfile: ChargingProfile | undefined;
// Get charging profiles for connector and sort by stack level
const chargingProfiles =
cloneObject<ChargingProfile[]>(
- chargingStation.getConnectorStatus(connectorId)?.chargingProfiles,
+ chargingStation.getConnectorStatus(connectorId)!.chargingProfiles!,
)?.sort((a, b) => b.stackLevel - a.stackLevel) ?? [];
// Get profiles on connector 0
if (chargingStation.getConnectorStatus(0)?.chargingProfiles) {
chargingProfiles.push(
...cloneObject<ChargingProfile[]>(
- chargingStation.getConnectorStatus(0).chargingProfiles,
+ chargingStation.getConnectorStatus(0)!.chargingProfiles!,
).sort((a, b) => b.stackLevel - a.stackLevel),
);
}
switch (chargingStation.getCurrentOutType()) {
case CurrentType.AC:
limit =
- matchingChargingProfile.chargingSchedule.chargingRateUnit === ChargingRateUnitType.WATT
+ matchingChargingProfile?.chargingSchedule?.chargingRateUnit ===
+ ChargingRateUnitType.WATT
? limit
: ACElectricUtils.powerTotal(
chargingStation.getNumberOfPhases(),
chargingStation.getVoltageOut(),
- limit,
+ limit!,
);
break;
case CurrentType.DC:
limit =
- matchingChargingProfile.chargingSchedule.chargingRateUnit === ChargingRateUnitType.WATT
+ matchingChargingProfile?.chargingSchedule?.chargingRateUnit ===
+ ChargingRateUnitType.WATT
? limit
- : DCElectricUtils.power(chargingStation.getVoltageOut(), limit);
+ : DCElectricUtils.power(chargingStation.getVoltageOut(), limit!);
}
const connectorMaximumPower =
chargingStation.getMaximumPower() / chargingStation.powerDivider;
- if (limit > connectorMaximumPower) {
+ if (limit! > connectorMaximumPower) {
logger.error(
- `${chargingStation.logPrefix()} Charging profile id ${
- matchingChargingProfile.chargingProfileId
- } limit ${limit} is greater than connector id ${connectorId} maximum ${connectorMaximumPower}: %j`,
+ `${chargingStation.logPrefix()} Charging profile id ${matchingChargingProfile?.chargingProfileId} limit ${limit} is greater than connector id ${connectorId} maximum ${connectorMaximumPower}: %j`,
result,
);
limit = connectorMaximumPower;
};
const getConfiguredNumberOfConnectors = (stationTemplate: ChargingStationTemplate): number => {
- let configuredMaxConnectors: number;
+ let configuredMaxConnectors = 0;
if (isNotEmptyArray(stationTemplate.numberOfConnectors) === true) {
const numberOfConnectors = stationTemplate.numberOfConnectors as number[];
configuredMaxConnectors =
} else if (isUndefined(stationTemplate.numberOfConnectors) === false) {
configuredMaxConnectors = stationTemplate.numberOfConnectors as number;
} else if (stationTemplate.Connectors && !stationTemplate.Evses) {
- configuredMaxConnectors = stationTemplate?.Connectors[0]
+ configuredMaxConnectors = stationTemplate.Connectors[0]
? getMaxNumberOfConnectors(stationTemplate.Connectors) - 1
: getMaxNumberOfConnectors(stationTemplate.Connectors);
} else if (stationTemplate.Evses && !stationTemplate.Connectors) {
const convertDeprecatedTemplateKey = (
template: ChargingStationTemplate,
deprecatedKey: string,
- key: string,
+ key?: string,
): void => {
if (!isUndefined(template[deprecatedKey])) {
- template[key] = template[deprecatedKey] as unknown;
+ if (!isUndefined(key)) {
+ template[key!] = template[deprecatedKey] as unknown;
+ }
delete template[deprecatedKey];
}
};
logger.warn(
`${logPrefix} ${moduleName}.getLimitFromChargingProfiles: startSchedule is not a Date object in charging profile id ${chargingProfile.chargingProfileId}. Trying to convert it to a Date object`,
);
- chargingSchedule.startSchedule = new Date(chargingSchedule.startSchedule);
+ chargingSchedule.startSchedule = new Date(chargingSchedule.startSchedule!);
}
chargingSchedule.startSchedule.setFullYear(
currentDate.getFullYear(),
.add(chargingSchedule.duration, 's')
.isAfter(currentMoment)
) {
- let lastButOneSchedule: ChargingSchedulePeriod;
+ let lastButOneSchedule: ChargingSchedulePeriod | undefined;
// Search the right schedule period
for (const schedulePeriod of chargingSchedule.chargingSchedulePeriod) {
// Handling of only one period
) {
// Found the schedule: last but one is the correct one
const result = {
- limit: lastButOneSchedule.limit,
+ limit: lastButOneSchedule!.limit,
matchingChargingProfile: chargingProfile,
};
logger.debug(debugLogMsg, result);
watchJsonFile,
} from '../utils';
-type IdTagsCacheValueType = {
+interface IdTagsCacheValueType {
idTags: string[];
idTagsFileWatcher: FSWatcher | undefined;
-};
+}
export class IdTagsCache {
private static instance: IdTagsCache | null = null;
connectorId: number,
): string {
const hashId = chargingStation.stationInfo.hashId;
- const idTagsFile = getIdTagsFile(chargingStation.stationInfo);
+ const idTagsFile = getIdTagsFile(chargingStation.stationInfo)!;
switch (distribution) {
case IdTagDistribution.RANDOM:
return this.getRandomIdTag(hashId, idTagsFile);
}
private getRandomIdTag(hashId: string, file: string): string {
- const idTags = this.getIdTags(file);
+ const idTags = this.getIdTags(file)!;
const addressableKey = this.getIdTagsCacheIndexesAddressableKey(file, hashId);
this.idTagsCachesAddressableIndexes.set(
addressableKey,
Math.floor(secureRandom() * idTags.length),
);
- return idTags[this.idTagsCachesAddressableIndexes.get(addressableKey)];
+ return idTags[this.idTagsCachesAddressableIndexes.get(addressableKey)!];
}
private getRoundRobinIdTag(hashId: string, file: string): string {
- const idTags = this.getIdTags(file);
+ const idTags = this.getIdTags(file)!;
const addressableKey = this.getIdTagsCacheIndexesAddressableKey(file, hashId);
const idTagIndex = this.idTagsCachesAddressableIndexes.get(addressableKey) ?? 0;
const idTag = idTags[idTagIndex];
}
private getConnectorAffinityIdTag(chargingStation: ChargingStation, connectorId: number): string {
- const file = getIdTagsFile(chargingStation.stationInfo);
- const idTags = this.getIdTags(file);
+ const file = getIdTagsFile(chargingStation.stationInfo)!;
+ const idTags = this.getIdTags(file)!;
const addressableKey = this.getIdTagsCacheIndexesAddressableKey(
file,
chargingStation.stationInfo.hashId,
addressableKey,
(chargingStation.index - 1 + (connectorId - 1)) % idTags.length,
);
- return idTags[this.idTagsCachesAddressableIndexes.get(addressableKey)];
+ return idTags[this.idTagsCachesAddressableIndexes.get(addressableKey)!];
}
private hasIdTagsCache(file: string): boolean {
}
private deleteIdTagsCacheIndexes(file: string): boolean {
- let deleted: boolean[];
+ const deleted: boolean[] = [];
for (const [key] of this.idTagsCachesAddressableIndexes) {
if (key.startsWith(file)) {
deleted.push(this.idTagsCachesAddressableIndexes.delete(key));
): void {
if (this.isChargingStationConfigurationCacheable(chargingStationConfiguration)) {
this.set(
- this.getChargingStationConfigurationKey(chargingStationConfiguration.configurationHash),
+ this.getChargingStationConfigurationKey(chargingStationConfiguration.configurationHash!),
chargingStationConfiguration,
);
}
public setChargingStationTemplate(chargingStationTemplate: ChargingStationTemplate): void {
this.set(
- this.getChargingStationTemplateKey(chargingStationTemplate.templateHash),
+ this.getChargingStationTemplateKey(chargingStationTemplate.templateHash!),
chargingStationTemplate,
);
}
isNullOrUndefined(chargingStationConfiguration?.automaticTransactionGenerator) === false &&
isNullOrUndefined(chargingStationConfiguration?.configurationHash) === false &&
isNotEmptyArray(chargingStationConfiguration?.configurationKey) === true &&
- isEmptyObject(chargingStationConfiguration?.stationInfo) === false &&
- isEmptyObject(chargingStationConfiguration?.automaticTransactionGenerator) === false &&
+ isEmptyObject(chargingStationConfiguration.stationInfo!) === false &&
+ isEmptyObject(chargingStationConfiguration.automaticTransactionGenerator!) === false &&
isNotEmptyString(chargingStationConfiguration?.configurationHash) === true
);
}
| BootNotificationResponse
| StatusNotificationResponse
| HeartbeatResponse
- | MeterValuesResponse
- | DataTransferResponse
- | DiagnosticsStatusNotificationResponse
- | FirmwareStatusNotificationResponse;
+ | DataTransferResponse;
type CommandHandler = (
requestPayload?: BroadcastChannelRequestPayload,
RequestCommand.STOP_TRANSACTION,
{
meterStop: this.chargingStation.getEnergyActiveImportRegisterByTransactionId(
- requestPayload.transactionId,
+ requestPayload!.transactionId!,
true,
),
...requestPayload,
// FIXME: Implement OCPP version agnostic helpers
OCPP16ServiceUtils.buildMeterValue(
this.chargingStation,
- requestPayload.connectorId,
- this.chargingStation.getConnectorStatus(requestPayload.connectorId)
- ?.transactionId,
+ requestPayload!.connectorId!,
+ this.chargingStation.getConnectorStatus(requestPayload!.connectorId!)!
+ .transactionId!,
configuredMeterValueSampleInterval
? convertToInt(configuredMeterValueSampleInterval.value) * 1000
: Constants.DEFAULT_METER_VALUES_INTERVAL,
);
return;
}
- let responsePayload: BroadcastChannelResponsePayload;
- let commandResponse: CommandResponse | void;
+ let responsePayload: BroadcastChannelResponsePayload | undefined;
+ let commandResponse: CommandResponse | void | undefined;
try {
commandResponse = await this.commandHandler(command, requestPayload);
if (isNullOrUndefined(commandResponse) || isEmptyObject(commandResponse as CommandResponse)) {
errorDetails: (error as OCPPError).details,
};
} finally {
- this.sendResponse([uuid, responsePayload]);
+ this.sendResponse([uuid, responsePayload!]);
}
}
): Promise<CommandResponse | void> {
if (this.commandHandlers.has(command) === true) {
this.cleanRequestPayload(command, requestPayload);
- return this.commandHandlers.get(command)(requestPayload);
+ return this.commandHandlers.get(command)!(requestPayload);
}
throw new BaseError(`Unknown worker broadcast channel command: ${command}`);
}
const moduleName = 'UIServiceWorkerBroadcastChannel';
-type Responses = {
+interface Responses {
responsesExpected: number;
responsesReceived: number;
responses: BroadcastChannelResponsePayload[];
-};
+}
export class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChannel {
private readonly uiService: AbstractUIService;
responses: [responsePayload],
});
} else if (
- this.responses.get(uuid)?.responsesReceived <= this.responses.get(uuid)?.responsesExpected
+ this.responses.get(uuid)!.responsesReceived <= this.responses.get(uuid)!.responsesExpected
) {
- ++this.responses.get(uuid).responsesReceived;
+ ++this.responses.get(uuid)!.responsesReceived;
this.responses.get(uuid)?.responses.push(responsePayload);
}
if (
if (status === ResponseStatus.SUCCESS) {
return hashId;
}
- }),
+ }) as string[],
...(responsesStatus === ResponseStatus.FAILURE && {
hashIdsFailed: this.responses
.get(uuid)
if (status === ResponseStatus.FAILURE) {
return hashId;
}
- }),
+ }) as string[],
}),
...(responsesStatus === ResponseStatus.FAILURE && {
responsesFailed: this.responses
if (response.status === ResponseStatus.FAILURE) {
return response;
}
- }),
+ }) as BroadcastChannelResponsePayload[],
}),
};
}
try {
this.validatePayload(chargingStation, commandName, commandPayload);
// Call the method to build the response
- response = await this.incomingRequestHandlers.get(commandName)(
+ response = await this.incomingRequestHandlers.get(commandName)!(
chargingStation,
commandPayload,
);
return this.validateIncomingRequestPayload(
chargingStation,
commandName,
- this.jsonSchemas.get(commandName),
+ this.jsonSchemas.get(commandName)!,
commandPayload,
);
}
`${chargingStation.logPrefix()} ${
commandPayload.type
} reset command received, simulating it. The station will be
- back online in ${formatDurationMilliSeconds(chargingStation.stationInfo.resetTime)}`,
+ back online in ${formatDurationMilliSeconds(chargingStation.stationInfo.resetTime!)}`,
);
return OCPP16Constants.OCPP_RESPONSE_ACCEPTED;
}
): GetConfigurationResponse {
const configurationKey: OCPPConfigurationKey[] = [];
const unknownKey: string[] = [];
- if (isUndefined(commandPayload.key) === true) {
+ if (
+ chargingStation.ocppConfiguration?.configurationKey &&
+ isUndefined(commandPayload.key) === true
+ ) {
for (const configuration of chargingStation.ocppConfiguration.configurationKey) {
if (isUndefined(configuration.visible) === true) {
configuration.visible = true;
value: configuration.value,
});
}
- } else if (isNotEmptyArray(commandPayload.key) === true) {
+ } else if (commandPayload.key && isNotEmptyArray(commandPayload.key) === true) {
for (const key of commandPayload.key) {
const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
chargingStation,
commandPayload.key,
true,
);
- if (!keyToChange) {
- return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED;
- } else if (keyToChange?.readonly === true) {
+ if (keyToChange?.readonly === true) {
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_REJECTED;
} else if (keyToChange?.readonly === false) {
let valueChanged = false;
valueChanged = true;
}
let triggerHeartbeatRestart = false;
- if (keyToChange.key === OCPP16StandardParametersKey.HeartBeatInterval && valueChanged) {
+ if (
+ (keyToChange.key as OCPP16StandardParametersKey) ===
+ OCPP16StandardParametersKey.HeartBeatInterval &&
+ valueChanged
+ ) {
ChargingStationConfigurationUtils.setConfigurationKeyValue(
chargingStation,
OCPP16StandardParametersKey.HeartbeatInterval,
);
triggerHeartbeatRestart = true;
}
- if (keyToChange.key === OCPP16StandardParametersKey.HeartbeatInterval && valueChanged) {
+ if (
+ (keyToChange.key as OCPP16StandardParametersKey) ===
+ OCPP16StandardParametersKey.HeartbeatInterval &&
+ valueChanged
+ ) {
ChargingStationConfigurationUtils.setConfigurationKeyValue(
chargingStation,
OCPP16StandardParametersKey.HeartBeatInterval,
if (triggerHeartbeatRestart) {
chargingStation.restartHeartbeat();
}
- if (keyToChange.key === OCPP16StandardParametersKey.WebSocketPingInterval && valueChanged) {
+ if (
+ (keyToChange.key as OCPP16StandardParametersKey) ===
+ OCPP16StandardParametersKey.WebSocketPingInterval &&
+ valueChanged
+ ) {
chargingStation.restartWebSocketPing();
}
if (keyToChange.reboot) {
}
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_ACCEPTED;
}
+ return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED;
}
private handleRequestSetChargingProfile(
OCPP16ServiceUtils.checkFeatureProfile(
chargingStation,
OCPP16SupportedFeatureProfiles.SmartCharging,
- OCPP16IncomingRequestCommand.CLEAR_CHARGING_PROFILE,
+ OCPP16IncomingRequestCommand.GET_COMPOSITE_SCHEDULE,
) === false
) {
return OCPP16Constants.OCPP_RESPONSE_REJECTED;
}
const startDate = new Date();
const endDate = new Date(startDate.getTime() + commandPayload.duration * 1000);
- let compositeSchedule: OCPP16ChargingSchedule;
- for (const chargingProfile of chargingStation.getConnectorStatus(commandPayload.connectorId)
- .chargingProfiles) {
+ let compositeSchedule: OCPP16ChargingSchedule | undefined;
+ for (const chargingProfile of chargingStation.getConnectorStatus(commandPayload.connectorId)!
+ .chargingProfiles!) {
// FIXME: build the composite schedule including the local power limit, the stack level, the charging rate unit, etc.
if (
- chargingProfile.chargingSchedule?.startSchedule >= startDate &&
- chargingProfile.chargingSchedule?.startSchedule <= endDate
+ chargingProfile.chargingSchedule.startSchedule! >= startDate &&
+ chargingProfile.chargingSchedule.startSchedule! <= endDate
) {
compositeSchedule = chargingProfile.chargingSchedule;
break;
) {
return OCPP16Constants.OCPP_CLEAR_CHARGING_PROFILE_RESPONSE_UNKNOWN;
}
- if (chargingStation.hasConnector(commandPayload.connectorId) === false) {
+ if (chargingStation.hasConnector(commandPayload.connectorId!) === false) {
logger.error(
`${chargingStation.logPrefix()} Trying to clear a charging profile(s) to
a non existing connector id ${commandPayload.connectorId}`,
if (
!isNullOrUndefined(commandPayload.connectorId) &&
isNotEmptyArray(
- chargingStation.getConnectorStatus(commandPayload.connectorId)?.chargingProfiles,
+ chargingStation.getConnectorStatus(commandPayload.connectorId!)?.chargingProfiles,
)
) {
- chargingStation.getConnectorStatus(commandPayload.connectorId).chargingProfiles = [];
+ chargingStation.getConnectorStatus(commandPayload.connectorId!)!.chargingProfiles = [];
logger.debug(
`${chargingStation.logPrefix()} Charging profile(s) cleared on connector id ${
commandPayload.connectorId
}
} else {
for (const connectorId of chargingStation.connectors.keys()) {
- clearChargingProfiles(chargingStation.getConnectorStatus(connectorId));
+ clearChargingProfiles(chargingStation.getConnectorStatus(connectorId)!);
}
}
if (clearedCP) {
}
} else {
for (const id of chargingStation.connectors.keys()) {
- await changeAvailability(id, chargingStation.getConnectorStatus(id));
+ await changeAvailability(id, chargingStation.getConnectorStatus(id)!);
}
}
return response;
commandPayload.type === OCPP16AvailabilityType.Inoperative))
) {
if (chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
- chargingStation.getConnectorStatus(connectorId).availability = commandPayload.type;
+ chargingStation.getConnectorStatus(connectorId)!.availability = commandPayload.type;
return OCPP16Constants.OCPP_AVAILABILITY_RESPONSE_SCHEDULED;
}
- chargingStation.getConnectorStatus(connectorId).availability = commandPayload.type;
+ chargingStation.getConnectorStatus(connectorId)!.availability = commandPayload.type;
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
chargingStation,
connectorId,
): Promise<GenericResponse> {
const { connectorId: transactionConnectorId, idTag, chargingProfile } = commandPayload;
const reserved =
- chargingStation.getConnectorStatus(transactionConnectorId).status ===
+ chargingStation.getConnectorStatus(transactionConnectorId)!.status ===
OCPP16ChargePointStatus.Reserved;
const reservedOnConnectorZero =
- chargingStation.getConnectorStatus(0).status === OCPP16ChargePointStatus.Reserved;
+ chargingStation.getConnectorStatus(0)!.status === OCPP16ChargePointStatus.Reserved;
if (
(reserved &&
!chargingStation.validateIncomingRequestWithReservation(transactionConnectorId, idTag)) ||
transactionConnectorId,
OCPP16ChargePointStatus.Preparing,
);
- const connectorStatus = chargingStation.getConnectorStatus(transactionConnectorId);
+ const connectorStatus = chargingStation.getConnectorStatus(transactionConnectorId)!;
// Check if authorized
if (
chargingStation.getAuthorizeRemoteTxRequests() &&
this.setRemoteStartTransactionChargingProfile(
chargingStation,
transactionConnectorId,
- chargingProfile,
+ chargingProfile!,
) === true
) {
connectorStatus.transactionRemoteStarted = true;
const reservation = chargingStation.getReservationBy(
ReservationFilterKey.CONNECTOR_ID,
reservedOnConnectorZero ? 0 : transactionConnectorId,
- );
+ )!;
startTransactionPayload.reservationId = reservation.id;
await chargingStation.removeReservation(
reservation,
this.setRemoteStartTransactionChargingProfile(
chargingStation,
transactionConnectorId,
- chargingProfile,
+ chargingProfile!,
) === true
) {
connectorStatus.transactionRemoteStarted = true;
} charging profile(s) at remote start transaction`,
);
return false;
- } else if (!cp) {
- return true;
}
+ return true;
}
private async handleRequestRemoteStopTransaction(
);
return OCPP16Constants.OCPP_RESPONSE_EMPTY;
}
- const retrieveDate = convertToDate(commandPayload.retrieveDate);
+ const retrieveDate = convertToDate(commandPayload.retrieveDate)!;
const now = Date.now();
if (retrieveDate?.getTime() <= now) {
this.runInAsyncScope(
}
const uri = new URL(commandPayload.location);
if (uri.protocol.startsWith('ftp:')) {
- let ftpClient: Client;
+ let ftpClient: Client | undefined;
try {
const logFiles = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), '../'))
.filter((file) => file.endsWith('.log'))
...(isNotEmptyString(uri.username) && { user: uri.username }),
...(isNotEmptyString(uri.password) && { password: uri.password }),
});
- let uploadResponse: FTPResponse;
+ let uploadResponse: FTPResponse | undefined;
if (accessResponse.code === 220) {
ftpClient.trackProgress((info) => {
logger.info(
if (ftpClient) {
ftpClient.close();
}
- return this.handleIncomingRequestError(
+ return this.handleIncomingRequestError<GetDiagnosticsResponse>(
chargingStation,
OCPP16IncomingRequestCommand.GET_DIAGNOSTICS,
error as Error,
{ errorResponse: OCPP16Constants.OCPP_RESPONSE_EMPTY },
- );
+ )!;
}
} else {
logger.error(
!OCPP16ServiceUtils.isConnectorIdValid(
chargingStation,
OCPP16IncomingRequestCommand.TRIGGER_MESSAGE,
- commandPayload.connectorId,
+ commandPayload.connectorId!,
)
) {
return OCPP16Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_REJECTED;
{
connectorId: commandPayload.connectorId,
errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: chargingStation.getConnectorStatus(commandPayload.connectorId)?.status,
+ status: chargingStation.getConnectorStatus(commandPayload.connectorId!)?.status,
},
{
triggerMessage: true,
return OCPP16Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_NOT_IMPLEMENTED;
}
} catch (error) {
- return this.handleIncomingRequestError(
+ return this.handleIncomingRequestError<OCPP16TriggerMessageResponse>(
chargingStation,
OCPP16IncomingRequestCommand.TRIGGER_MESSAGE,
error as Error,
{ errorResponse: OCPP16Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_REJECTED },
- );
+ )!;
}
}
}
return OCPP16Constants.OCPP_DATA_TRANSFER_RESPONSE_UNKNOWN_VENDOR_ID;
} catch (error) {
- return this.handleIncomingRequestError(
+ return this.handleIncomingRequestError<OCPP16DataTransferResponse>(
chargingStation,
OCPP16IncomingRequestCommand.DATA_TRANSFER,
error as Error,
{ errorResponse: OCPP16Constants.OCPP_DATA_TRANSFER_RESPONSE_REJECTED },
- );
+ )!;
}
}
if (!(await OCPP16ServiceUtils.isIdTagAuthorized(chargingStation, connectorId, idTag))) {
return OCPP16Constants.OCPP_RESERVATION_RESPONSE_REJECTED;
}
- switch (chargingStation.getConnectorStatus(connectorId).status) {
+ switch (chargingStation.getConnectorStatus(connectorId)!.status) {
case OCPP16ChargePointStatus.Faulted:
response = OCPP16Constants.OCPP_RESERVATION_RESPONSE_FAULTED;
break;
}
return response;
} catch (error) {
- chargingStation.getConnectorStatus(connectorId).status = OCPP16ChargePointStatus.Available;
- return this.handleIncomingRequestError(
+ chargingStation.getConnectorStatus(connectorId)!.status = OCPP16ChargePointStatus.Available;
+ return this.handleIncomingRequestError<OCPP16ReserveNowResponse>(
chargingStation,
OCPP16IncomingRequestCommand.RESERVE_NOW,
error as Error,
{ errorResponse: OCPP16Constants.OCPP_RESERVATION_RESPONSE_FAULTED },
- );
+ )!;
}
}
return OCPP16Constants.OCPP_CANCEL_RESERVATION_RESPONSE_REJECTED;
}
await chargingStation.removeReservation(
- reservation,
+ reservation!,
ReservationTerminationReason.RESERVATION_CANCELED,
);
return OCPP16Constants.OCPP_CANCEL_RESERVATION_RESPONSE_ACCEPTED;
} catch (error) {
- return this.handleIncomingRequestError(
+ return this.handleIncomingRequestError<GenericResponse>(
chargingStation,
OCPP16IncomingRequestCommand.CANCEL_RESERVATION,
error as Error,
{ errorResponse: OCPP16Constants.OCPP_CANCEL_RESERVATION_RESPONSE_REJECTED },
- );
+ )!;
}
}
}
commandName: OCPP16RequestCommand,
commandParams?: JsonType,
): Request {
- let connectorId: number;
+ let connectorId: number | undefined;
let energyActiveImportRegister: number;
commandParams = commandParams as JsonObject;
switch (commandName) {
chargingStation.getTransactionDataMeterValues() &&
(connectorId = chargingStation.getConnectorIdByTransactionId(
commandParams?.transactionId as number,
- ));
+ )!);
energyActiveImportRegister = chargingStation.getEnergyActiveImportRegisterByTransactionId(
commandParams?.transactionId as number,
true,
timestamp: new Date(),
...(chargingStation.getTransactionDataMeterValues() && {
transactionData: OCPP16ServiceUtils.buildTransactionDataMeterValues(
- chargingStation.getConnectorStatus(connectorId).transactionBeginMeterValue,
+ chargingStation.getConnectorStatus(connectorId!)!.transactionBeginMeterValue!,
OCPP16ServiceUtils.buildTransactionEndMeterValue(
chargingStation,
- connectorId,
+ connectorId!,
energyActiveImportRegister,
),
),
) {
try {
this.validatePayload(chargingStation, commandName, payload);
- await this.responseHandlers.get(commandName)(chargingStation, payload, requestPayload);
+ await this.responseHandlers.get(commandName)!(chargingStation, payload, requestPayload);
} catch (error) {
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.responseHandler: Handle response error:`,
return this.validateResponsePayload(
chargingStation,
commandName,
- this.jsonSchemas.get(commandName),
+ this.jsonSchemas.get(commandName)!,
payload,
);
}
payload: OCPP16AuthorizeResponse,
requestPayload: OCPP16AuthorizeRequest,
): void {
- let authorizeConnectorId: number;
+ let authorizeConnectorId: number | undefined;
if (chargingStation.hasEvses) {
for (const [evseId, evseStatus] of chargingStation.evses) {
if (evseId > 0) {
const authorizeConnectorIdDefined = !isNullOrUndefined(authorizeConnectorId);
if (payload.idTagInfo.status === OCPP16AuthorizationStatus.ACCEPTED) {
authorizeConnectorIdDefined &&
- (chargingStation.getConnectorStatus(authorizeConnectorId).idTagAuthorized = true);
+ (chargingStation.getConnectorStatus(authorizeConnectorId!)!.idTagAuthorized = true);
logger.debug(
`${chargingStation.logPrefix()} idTag '${requestPayload.idTag}' accepted${
authorizeConnectorIdDefined ? ` on connector id ${authorizeConnectorId}` : ''
);
} else {
if (authorizeConnectorIdDefined) {
- chargingStation.getConnectorStatus(authorizeConnectorId).idTagAuthorized = false;
- delete chargingStation.getConnectorStatus(authorizeConnectorId)?.authorizeIdTag;
+ chargingStation.getConnectorStatus(authorizeConnectorId!)!.idTagAuthorized = false;
+ delete chargingStation.getConnectorStatus(authorizeConnectorId!)?.authorizeIdTag;
}
logger.debug(
`${chargingStation.logPrefix()} idTag '${requestPayload.idTag}' rejected with status '${
}
if (payload.idTagInfo?.status === OCPP16AuthorizationStatus.ACCEPTED) {
- chargingStation.getConnectorStatus(transactionConnectorId).transactionStarted = true;
- chargingStation.getConnectorStatus(transactionConnectorId).transactionId =
+ chargingStation.getConnectorStatus(transactionConnectorId)!.transactionStarted = true;
+ chargingStation.getConnectorStatus(transactionConnectorId)!.transactionId =
payload.transactionId;
- chargingStation.getConnectorStatus(transactionConnectorId).transactionIdTag =
+ chargingStation.getConnectorStatus(transactionConnectorId)!.transactionIdTag =
requestPayload.idTag;
chargingStation.getConnectorStatus(
transactionConnectorId,
- ).transactionEnergyActiveImportRegisterValue = 0;
- chargingStation.getConnectorStatus(transactionConnectorId).transactionBeginMeterValue =
+ )!.transactionEnergyActiveImportRegisterValue = 0;
+ chargingStation.getConnectorStatus(transactionConnectorId)!.transactionBeginMeterValue =
OCPP16ServiceUtils.buildTransactionBeginMeterValue(
chargingStation,
transactionConnectorId,
connectorId: transactionConnectorId,
transactionId: payload.transactionId,
meterValue: [
- chargingStation.getConnectorStatus(transactionConnectorId).transactionBeginMeterValue,
+ chargingStation.getConnectorStatus(transactionConnectorId)!.transactionBeginMeterValue,
],
- }));
+ } as OCPP16MeterValuesRequest));
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
chargingStation,
transactionConnectorId,
chargingStation: ChargingStation,
connectorId: number,
): Promise<void> {
- resetConnectorStatus(chargingStation.getConnectorStatus(connectorId));
+ resetConnectorStatus(chargingStation.getConnectorStatus(connectorId)!);
chargingStation.stopMeterValues(connectorId);
parentPort?.postMessage(buildUpdatedMessage(chargingStation));
if (
meterValue: [
OCPP16ServiceUtils.buildTransactionEndMeterValue(
chargingStation,
- transactionConnectorId,
+ transactionConnectorId!,
requestPayload.meterStop,
),
],
}));
if (
chargingStation.isChargingStationAvailable() === false ||
- chargingStation.isConnectorAvailable(transactionConnectorId) === false
+ chargingStation.isConnectorAvailable(transactionConnectorId!) === false
) {
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
chargingStation,
- transactionConnectorId,
+ transactionConnectorId!,
OCPP16ChargePointStatus.Unavailable,
);
} else {
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
chargingStation,
- transactionConnectorId,
+ transactionConnectorId!,
OCPP16ChargePointStatus.Available,
);
}
if (chargingStation.stationInfo.powerSharedByConnectors) {
chargingStation.powerDivider--;
}
- resetConnectorStatus(chargingStation.getConnectorStatus(transactionConnectorId));
- chargingStation.stopMeterValues(transactionConnectorId);
+ resetConnectorStatus(chargingStation.getConnectorStatus(transactionConnectorId!)!);
+ chargingStation.stopMeterValues(transactionConnectorId!);
parentPort?.postMessage(buildUpdatedMessage(chargingStation));
const logMsg = `${chargingStation.logPrefix()} Transaction with id ${requestPayload.transactionId.toString()} STOPPED on ${
chargingStation.stationInfo.chargingStationId
import { type ChargingStation, getIdTagsFile } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
+ type ConnectorStatus,
CurrentType,
ErrorType,
type JsonType,
OCPP16MeterValueMeasurand.VOLTAGE,
phaseLineToNeutralValue as OCPP16MeterValuePhase,
);
- let voltagePhaseLineToNeutralMeasurandValue: number;
+ let voltagePhaseLineToNeutralMeasurandValue: number | undefined;
if (voltagePhaseLineToNeutralSampledValueTemplate) {
const voltagePhaseLineToNeutralSampledValueTemplateValue =
voltagePhaseLineToNeutralSampledValueTemplate.value
OCPP16MeterValueMeasurand.VOLTAGE,
phaseLineToLineValue as OCPP16MeterValuePhase,
);
- let voltagePhaseLineToLineMeasurandValue: number;
+ let voltagePhaseLineToLineMeasurandValue: number | undefined;
if (voltagePhaseLineToLineSampledValueTemplate) {
const voltagePhaseLineToLineSampledValueTemplateValue =
voltagePhaseLineToLineSampledValueTemplate.value
if (powerSampledValueTemplate) {
OCPP16ServiceUtils.checkMeasurandPowerDivider(
chargingStation,
- powerSampledValueTemplate.measurand,
+ powerSampledValueTemplate.measurand!,
);
const errMsg = `MeterValues measurand ${
powerSampledValueTemplate.measurand ??
powerSampledValueTemplate.measurand ??
OCPP16MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
} measurand value`;
- const powerMeasurandValues = {} as MeasurandValues;
+ const powerMeasurandValues: MeasurandValues = {} as MeasurandValues;
const unitDivider = powerSampledValueTemplate?.unit === MeterValueUnit.KILO_WATT ? 1000 : 1;
const connectorMaximumAvailablePower =
chargingStation.getConnectorMaximumAvailablePower(connectorId);
const connectorMaximumPowerPerPhase = Math.round(
connectorMaximumAvailablePower / chargingStation.getNumberOfPhases(),
);
- const connectorMinimumPower = Math.round(powerSampledValueTemplate.minimumValue) ?? 0;
+ const connectorMinimumPower = Math.round(powerSampledValueTemplate.minimumValue!) ?? 0;
const connectorMinimumPowerPerPhase = Math.round(
connectorMinimumPower / chargingStation.getNumberOfPhases(),
);
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase1FluctuatedValue =
- powerPerPhaseSampledValueTemplates?.L1?.value &&
+ powerPerPhaseSampledValueTemplates.L1?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
powerPerPhaseSampledValueTemplates.L1.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase2FluctuatedValue =
- powerPerPhaseSampledValueTemplates?.L2?.value &&
+ powerPerPhaseSampledValueTemplates.L2?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
powerPerPhaseSampledValueTemplates.L2.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase3FluctuatedValue =
- powerPerPhaseSampledValueTemplates?.L3?.value &&
+ powerPerPhaseSampledValueTemplates.L3?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
powerPerPhaseSampledValueTemplates.L3.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
powerMeasurandValues.L1 =
- phase1FluctuatedValue ??
- defaultFluctuatedPowerPerPhase ??
+ (phase1FluctuatedValue as number) ??
+ (defaultFluctuatedPowerPerPhase as number) ??
getRandomFloatRounded(
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
);
powerMeasurandValues.L2 =
- phase2FluctuatedValue ??
- defaultFluctuatedPowerPerPhase ??
+ (phase2FluctuatedValue as number) ??
+ (defaultFluctuatedPowerPerPhase as number) ??
getRandomFloatRounded(
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
);
powerMeasurandValues.L3 =
- phase3FluctuatedValue ??
- defaultFluctuatedPowerPerPhase ??
+ (phase3FluctuatedValue as number) ??
+ (defaultFluctuatedPowerPerPhase as number) ??
getRandomFloatRounded(
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
if (currentSampledValueTemplate) {
OCPP16ServiceUtils.checkMeasurandPowerDivider(
chargingStation,
- currentSampledValueTemplate.measurand,
+ currentSampledValueTemplate.measurand!,
);
const errMsg = `MeterValues measurand ${
currentSampledValueTemplate.measurand ??
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase1FluctuatedValue =
- currentPerPhaseSampledValueTemplates?.L1?.value &&
+ currentPerPhaseSampledValueTemplates.L1?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
currentPerPhaseSampledValueTemplates.L1.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase2FluctuatedValue =
- currentPerPhaseSampledValueTemplates?.L2?.value &&
+ currentPerPhaseSampledValueTemplates.L2?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
currentPerPhaseSampledValueTemplates.L2.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
const phase3FluctuatedValue =
- currentPerPhaseSampledValueTemplates?.L3?.value &&
+ currentPerPhaseSampledValueTemplates.L3?.value &&
getRandomFloatFluctuatedRounded(
OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
currentPerPhaseSampledValueTemplates.L3.value,
Constants.DEFAULT_FLUCTUATION_PERCENT,
);
currentMeasurandValues.L1 =
- phase1FluctuatedValue ??
- defaultFluctuatedAmperagePerPhase ??
+ (phase1FluctuatedValue as number) ??
+ (defaultFluctuatedAmperagePerPhase as number) ??
getRandomFloatRounded(connectorMaximumAmperage, connectorMinimumAmperage);
currentMeasurandValues.L2 =
- phase2FluctuatedValue ??
- defaultFluctuatedAmperagePerPhase ??
+ (phase2FluctuatedValue as number) ??
+ (defaultFluctuatedAmperagePerPhase as number) ??
getRandomFloatRounded(connectorMaximumAmperage, connectorMinimumAmperage);
currentMeasurandValues.L3 =
- phase3FluctuatedValue ??
- defaultFluctuatedAmperagePerPhase ??
+ (phase3FluctuatedValue as number) ??
+ (defaultFluctuatedAmperagePerPhase as number) ??
getRandomFloatRounded(connectorMaximumAmperage, connectorMinimumAmperage);
} else {
currentMeasurandValues.L1 = currentSampledValueTemplate.value
if (energySampledValueTemplate) {
OCPP16ServiceUtils.checkMeasurandPowerDivider(
chargingStation,
- energySampledValueTemplate.measurand,
+ energySampledValueTemplate.measurand!,
);
const unitDivider =
energySampledValueTemplate?.unit === MeterValueUnit.KILO_WATT_HOUR ? 1000 : 1;
)
: getRandomFloatRounded(connectorMaximumEnergyRounded);
// Persist previous value on connector
- if (
- connector &&
- isNullOrUndefined(connector.energyActiveImportRegisterValue) === false &&
- connector.energyActiveImportRegisterValue >= 0 &&
- isNullOrUndefined(connector.transactionEnergyActiveImportRegisterValue) === false &&
- connector.transactionEnergyActiveImportRegisterValue >= 0
- ) {
- connector.energyActiveImportRegisterValue += energyValueRounded;
- connector.transactionEnergyActiveImportRegisterValue += energyValueRounded;
- } else {
- connector.energyActiveImportRegisterValue = 0;
- connector.transactionEnergyActiveImportRegisterValue = 0;
+ if (connector) {
+ if (
+ isNullOrUndefined(connector.energyActiveImportRegisterValue) === false &&
+ connector.energyActiveImportRegisterValue! >= 0 &&
+ isNullOrUndefined(connector.transactionEnergyActiveImportRegisterValue) === false &&
+ connector.transactionEnergyActiveImportRegisterValue! >= 0
+ ) {
+ connector.energyActiveImportRegisterValue! += energyValueRounded;
+ connector.transactionEnergyActiveImportRegisterValue! += energyValueRounded;
+ } else {
+ connector.energyActiveImportRegisterValue = 0;
+ connector.transactionEnergyActiveImportRegisterValue = 0;
+ }
}
meterValue.sampledValue.push(
OCPP16ServiceUtils.buildSampledValue(
const unitDivider = sampledValueTemplate?.unit === MeterValueUnit.KILO_WATT_HOUR ? 1000 : 1;
meterValue.sampledValue.push(
OCPP16ServiceUtils.buildSampledValue(
- sampledValueTemplate,
+ sampledValueTemplate!,
roundTo((meterStart ?? 0) / unitDivider, 4),
MeterValueContext.TRANSACTION_BEGIN,
),
const unitDivider = sampledValueTemplate?.unit === MeterValueUnit.KILO_WATT_HOUR ? 1000 : 1;
meterValue.sampledValue.push(
OCPP16ServiceUtils.buildSampledValue(
- sampledValueTemplate,
+ sampledValueTemplate!,
roundTo((meterStop ?? 0) / unitDivider, 4),
MeterValueContext.TRANSACTION_END,
),
logger.error(
`${chargingStation.logPrefix()} Trying to set a charging profile on connector id ${connectorId} with an uninitialized charging profiles array attribute, applying deferred initialization`,
);
- chargingStation.getConnectorStatus(connectorId).chargingProfiles = [];
+ chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = [];
}
if (
Array.isArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles) === false
logger.error(
`${chargingStation.logPrefix()} Trying to set a charging profile on connector id ${connectorId} with an improper attribute type for the charging profiles array, applying proper type initialization`,
);
- chargingStation.getConnectorStatus(connectorId).chargingProfiles = [];
+ chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = [];
}
let cpReplaced = false;
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
(chargingProfile.stackLevel === cp.stackLevel &&
chargingProfile.chargingProfilePurpose === cp.chargingProfilePurpose)
) {
- chargingStation.getConnectorStatus(connectorId).chargingProfiles[index] = cp;
+ chargingStation.getConnectorStatus(connectorId)!.chargingProfiles![index] = cp;
cpReplaced = true;
}
});
idTag: string,
): Promise<boolean> {
let authorized = false;
- const connectorStatus = chargingStation.getConnectorStatus(connectorId);
+ const connectorStatus: ConnectorStatus = chargingStation.getConnectorStatus(connectorId)!;
if (OCPP16ServiceUtils.isIdTagLocalAuthorized(chargingStation, idTag)) {
connectorStatus.localAuthorizeIdTag = idTag;
connectorStatus.idTagLocalAuthorized = true;
const sampledValueContext = context ?? sampledValueTemplate?.context ?? null;
const sampledValueLocation =
sampledValueTemplate?.location ??
- OCPP16ServiceUtils.getMeasurandDefaultLocation(sampledValueTemplate?.measurand ?? null);
+ OCPP16ServiceUtils.getMeasurandDefaultLocation(sampledValueTemplate.measurand!);
const sampledValuePhase = phase ?? sampledValueTemplate?.phase ?? null;
return {
...(!isNullOrUndefined(sampledValueTemplate.unit) && {
...(!isNullOrUndefined(sampledValueLocation) && { location: sampledValueLocation }),
...(!isNullOrUndefined(sampledValueValue) && { value: sampledValueValue.toString() }),
...(!isNullOrUndefined(sampledValuePhase) && { phase: sampledValuePhase }),
- };
+ } as OCPP16SampledValue;
}
private static checkMeasurandPowerDivider(
chargingStation.hasIdTags() === true &&
isNotEmptyString(
chargingStation.idTagsCache
- .getIdTags(getIdTagsFile(chargingStation.stationInfo))
+ .getIdTags(getIdTagsFile(chargingStation.stationInfo)!)
?.find((tag) => tag === idTag),
)
);
try {
this.validatePayload(chargingStation, commandName, commandPayload);
// Call the method to build the response
- response = await this.incomingRequestHandlers.get(commandName)(
+ response = await this.incomingRequestHandlers.get(commandName)!(
chargingStation,
commandPayload,
);
return this.validateIncomingRequestPayload(
chargingStation,
commandName,
- this.jsonSchemas.get(commandName),
+ this.jsonSchemas.get(commandName)!,
commandPayload,
);
}
) {
try {
this.validatePayload(chargingStation, commandName, payload);
- await this.responseHandlers.get(commandName)(chargingStation, payload, requestPayload);
+ await this.responseHandlers.get(commandName)!(chargingStation, payload, requestPayload);
} catch (error) {
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.responseHandler: Handle response error:`,
return this.validateResponsePayload(
chargingStation,
commandName,
- this.jsonSchemas.get(commandName),
+ this.jsonSchemas.get(commandName)!,
payload,
);
}
validate.errors,
);
throw new OCPPError(
- OCPPServiceUtils.ajvErrorsToErrorType(validate.errors),
+ OCPPServiceUtils.ajvErrorsToErrorType(validate.errors!),
'Incoming request PDU is invalid',
commandName,
JSON.stringify(validate.errors, null, 2),
}
protected handleRequestClearCache(chargingStation: ChargingStation): ClearCacheResponse {
- if (chargingStation.idTagsCache.deleteIdTags(getIdTagsFile(chargingStation.stationInfo))) {
+ if (chargingStation.idTagsCache.deleteIdTags(getIdTagsFile(chargingStation.stationInfo)!)) {
return OCPPConstants.OCPP_RESPONSE_ACCEPTED;
}
return OCPPConstants.OCPP_RESPONSE_REJECTED;
ajvFormats(this.ajv);
this.ocppResponseService = ocppResponseService;
this.requestHandler = this.requestHandler.bind(this) as <
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
ReqType extends JsonType,
ResType extends JsonType,
>(
handleSendMessageError(chargingStation, commandName, error as Error, {
throwError: true,
});
+ return null;
}
}
);
} catch (error) {
handleSendMessageError(chargingStation, commandName, error as Error);
+ return null;
}
}
handleSendMessageError(chargingStation, commandName, error as Error, {
throwError: params.throwError,
});
+ return null;
}
}
);
return true;
}
- const validate = this.ajv.compile(this.jsonSchemas.get(commandName as RequestCommand));
+ const validate = this.ajv.compile(this.jsonSchemas.get(commandName as RequestCommand)!);
payload = cloneObject<T>(payload);
OCPPServiceUtils.convertDateToISOString<T>(payload);
if (validate(payload)) {
);
// OCPPError usage here is debatable: it's an error in the OCPP stack but not targeted to sendError().
throw new OCPPError(
- OCPPServiceUtils.ajvErrorsToErrorType(validate.errors),
+ OCPPServiceUtils.ajvErrorsToErrorType(validate.errors!),
'Request PDU is invalid',
commandName,
JSON.stringify(validate.errors, null, 2),
const validate = this.ajv.compile(
this.ocppResponseService.jsonIncomingRequestResponseSchemas.get(
commandName as IncomingRequestCommand,
- ),
+ )!,
);
payload = cloneObject<T>(payload);
OCPPServiceUtils.convertDateToISOString<T>(payload);
);
// OCPPError usage here is debatable: it's an error in the OCPP stack but not targeted to sendError().
throw new OCPPError(
- OCPPServiceUtils.ajvErrorsToErrorType(validate.errors),
+ OCPPServiceUtils.ajvErrorsToErrorType(validate.errors!),
'Response PDU is invalid',
commandName,
JSON.stringify(validate.errors, null, 2),
public abstract requestHandler<ReqType extends JsonType, ResType extends JsonType>(
chargingStation: ChargingStation,
commandName: RequestCommand,
+ // FIXME: should be ReqType
commandParams?: JsonType,
params?: RequestParams,
): Promise<ResType>;
validate.errors,
);
throw new OCPPError(
- OCPPServiceUtils.ajvErrorsToErrorType(validate.errors),
+ OCPPServiceUtils.ajvErrorsToErrorType(validate.errors!),
'Response PDU is invalid',
commandName,
JSON.stringify(validate.errors, null, 2),
}
public static convertDateToISOString<T extends JsonType>(obj: T): void {
- for (const key in obj) {
- if (obj[key] instanceof Date) {
- (obj as JsonObject)[key] = (obj[key] as Date).toISOString();
- } else if (obj[key] !== null && typeof obj[key] === 'object') {
- OCPPServiceUtils.convertDateToISOString<T>(obj[key] as T);
+ for (const key in obj as JsonObject) {
+ if (obj![key] instanceof Date) {
+ obj![key] = (obj![key] as Date).toISOString();
+ } else if (obj![key] !== null && typeof obj![key] === 'object') {
+ OCPPServiceUtils.convertDateToISOString<T>(obj![key] as T);
}
}
}
connectorId: number,
status: ConnectorStatusEnum,
evseId?: number,
- options: { send: boolean } = { send: true },
+ options?: { send: boolean },
) {
options = { send: true, ...options };
if (options.send) {
),
);
}
- chargingStation.getConnectorStatus(connectorId).status = status;
+ chargingStation.getConnectorStatus(connectorId)!.status = status;
}
protected static checkConnectorStatusTransition(
connectorId: number,
status: ConnectorStatusEnum,
): boolean {
- const fromStatus = chargingStation.getConnectorStatus(connectorId).status;
+ const fromStatus = chargingStation.getConnectorStatus(connectorId)!.status;
let transitionAllowed = false;
switch (chargingStation.stationInfo.ocppVersion) {
case OCPPVersion.VERSION_16:
`${chargingStation.logPrefix()} OCPP ${
chargingStation.stationInfo.ocppVersion
} connector id ${connectorId} status transition from '${
- chargingStation.getConnectorStatus(connectorId).status
+ chargingStation.getConnectorStatus(connectorId)!.status
}' to '${status}' is not allowed`,
);
}
OCPPServiceUtils.logPrefix(ocppVersion, moduleName, methodName),
{ throwError: false },
);
+ return {} as JSONSchemaType<T>;
}
}
return;
}
const sampledValueTemplates: SampledValueTemplate[] =
- chargingStation.getConnectorStatus(connectorId)?.MeterValues;
+ chargingStation.getConnectorStatus(connectorId)!.MeterValues;
for (
let index = 0;
isNotEmptyArray(sampledValueTemplates) === true && index < sampledValueTemplates.length;
const parsedInt = parseInt(value);
const numberValue = isNaN(parsedInt) ? Infinity : parsedInt;
return options?.limitationEnabled
- ? Math.min(numberValue * options.unitMultiplier, limit)
- : numberValue * options.unitMultiplier;
+ ? Math.min(numberValue * options.unitMultiplier!, limit)
+ : numberValue * options.unitMultiplier!;
}
private static logPrefix = (
public async sendInternalRequest(request: ProtocolRequest): Promise<ProtocolResponse> {
const protocolVersion = ProtocolVersion['0.0.1'];
this.registerProtocolVersionUIService(protocolVersion);
- return this.uiServices.get(protocolVersion)?.requestHandler(request);
+ return this.uiServices
+ .get(protocolVersion)
+ ?.requestHandler(request) as Promise<ProtocolResponse>;
}
public hasResponseHandler(id: string): boolean {
);
});
if (req.method === HttpMethods.POST) {
- const bodyBuffer = [];
+ const bodyBuffer: Uint8Array[] = [];
req
- .on('data', (chunk) => {
+ .on('data', (chunk: Uint8Array) => {
bodyBuffer.push(chunk);
})
.on('end', () => {
public static getUIServerImplementation(
uiServerConfiguration?: UIServerConfiguration,
): AbstractUIServer | null {
- if (UIServerUtils.isLoopback(uiServerConfiguration.options?.host) === false) {
+ if (UIServerUtils.isLoopback(uiServerConfiguration!.options!.host!) === false) {
console.warn(
chalk.yellow(
'Loopback address not detected in UI server configuration. This is not recommended.',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
request: IncomingMessage,
): string | false => {
- let protocol: Protocol;
- let version: ProtocolVersion;
+ let protocol: Protocol | undefined;
+ let version: ProtocolVersion | undefined;
if (protocols.size === 0) {
return false;
}
// logger.debug(
// `${this.logPrefix(
// moduleName,
- // 'validateRawDataRequest'
- // )} Raw data received in string format: ${rawData.toString()}`
+ // 'validateRawDataRequest',
+ // // eslint-disable-next-line @typescript-eslint/no-base-to-string
+ // )} Raw data received in string format: ${rawData.toString()}`,
// );
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
const request = JSON.parse(rawData.toString()) as ProtocolRequest;
if (Array.isArray(request) === false) {
}
public async requestHandler(request: ProtocolRequest): Promise<ProtocolResponse | undefined> {
- let messageId: string;
- let command: ProcedureName;
+ let messageId: string | undefined;
+ let command: ProcedureName | undefined;
let requestPayload: RequestPayload | undefined;
let responsePayload: ResponsePayload | undefined;
try {
}
// Call the request handler to build the response payload
- responsePayload = await this.requestHandlers.get(command)(messageId, command, requestPayload);
+ responsePayload = await this.requestHandlers.get(command)!(
+ messageId,
+ command,
+ requestPayload,
+ );
} catch (error) {
// Log
logger.error(`${this.logPrefix(moduleName, 'requestHandler')} Handle request error:`, error);
};
}
if (!isNullOrUndefined(responsePayload)) {
- return this.uiServer.buildProtocolResponse(messageId, responsePayload);
+ return this.uiServer.buildProtocolResponse(messageId!, responsePayload!);
}
}
): void {
if (isNotEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
- .filter((hashId) => !isNullOrUndefined(hashId))
- .map((hashId) => {
+ ?.filter((hashId) => !isNullOrUndefined(hashId))
+ ?.map((hashId) => {
if (this.uiServer.chargingStations.has(hashId) === true) {
return hashId;
}
'sendBroadcastChannelRequest',
)} Charging station with hashId '${hashId}' not found`,
);
- });
+ }) as string[];
}
const expectedNumberOfResponses = isNotEmptyArray(payload.hashIds)
- ? payload.hashIds.length
+ ? payload.hashIds!.length
: this.uiServer.chargingStations.size;
this.uiServiceWorkerBroadcastChannel.sendRequest([uuid, procedureName, payload]);
this.broadcastChannelRequests.set(uuid, expectedNumberOfResponses);
private readonly objName: string;
private performanceObserver!: PerformanceObserver;
private readonly statistics: Statistics;
- private displayInterval!: NodeJS.Timeout;
+ private displayInterval?: NodeJS.Timeout;
private constructor(objId: string, objName: string, uri: URL) {
this.objId = objId;
this.statistics.statisticsData.has(command) &&
this.statistics.statisticsData.get(command)?.requestCount
) {
- ++this.statistics.statisticsData.get(command).requestCount;
+ ++this.statistics.statisticsData.get(command)!.requestCount!;
} else {
this.statistics.statisticsData.set(command, {
...this.statistics.statisticsData.get(command),
this.statistics.statisticsData.has(command) &&
this.statistics.statisticsData.get(command)?.responseCount
) {
- ++this.statistics.statisticsData.get(command).responseCount;
+ ++this.statistics.statisticsData.get(command)!.responseCount!;
} else {
this.statistics.statisticsData.set(command, {
...this.statistics.statisticsData.get(command),
this.statistics.statisticsData.has(command) &&
this.statistics.statisticsData.get(command)?.errorCount
) {
- ++this.statistics.statisticsData.get(command).errorCount;
+ ++this.statistics.statisticsData.get(command)!.errorCount!;
} else {
this.statistics.statisticsData.set(command, {
...this.statistics.statisticsData.get(command),
const lastPerformanceEntry = performanceObserverList.getEntries()[0];
// logger.debug(
// `${this.logPrefix()} '${lastPerformanceEntry.name}' performance entry: %j`,
- // lastPerformanceEntry
+ // lastPerformanceEntry,
// );
this.addPerformanceEntryToStatistics(lastPerformanceEntry);
});
private startLogStatisticsInterval(): void {
const logStatisticsInterval = Configuration.getLog().enabled
- ? Configuration.getLog().statisticsInterval
+ ? Configuration.getLog().statisticsInterval!
: 0;
if (logStatisticsInterval > 0 && !this.displayInterval) {
this.displayInterval = setInterval(() => {
}
// Update current statistics
this.statistics.updatedAt = new Date();
- this.statistics.statisticsData.get(entryName).timeMeasurementCount =
+ this.statistics.statisticsData.get(entryName)!.timeMeasurementCount =
(this.statistics.statisticsData.get(entryName)?.timeMeasurementCount ?? 0) + 1;
- this.statistics.statisticsData.get(entryName).currentTimeMeasurement = entry.duration;
- this.statistics.statisticsData.get(entryName).minTimeMeasurement = Math.min(
+ this.statistics.statisticsData.get(entryName)!.currentTimeMeasurement = entry.duration;
+ this.statistics.statisticsData.get(entryName)!.minTimeMeasurement = Math.min(
entry.duration,
this.statistics.statisticsData.get(entryName)?.minTimeMeasurement ?? Infinity,
);
- this.statistics.statisticsData.get(entryName).maxTimeMeasurement = Math.max(
+ this.statistics.statisticsData.get(entryName)!.maxTimeMeasurement = Math.max(
entry.duration,
this.statistics.statisticsData.get(entryName)?.maxTimeMeasurement ?? -Infinity,
);
- this.statistics.statisticsData.get(entryName).totalTimeMeasurement =
+ this.statistics.statisticsData.get(entryName)!.totalTimeMeasurement =
(this.statistics.statisticsData.get(entryName)?.totalTimeMeasurement ?? 0) + entry.duration;
- this.statistics.statisticsData.get(entryName).avgTimeMeasurement =
- this.statistics.statisticsData.get(entryName).totalTimeMeasurement /
- this.statistics.statisticsData.get(entryName).timeMeasurementCount;
+ this.statistics.statisticsData.get(entryName)!.avgTimeMeasurement =
+ this.statistics.statisticsData.get(entryName)!.totalTimeMeasurement! /
+ this.statistics.statisticsData.get(entryName)!.timeMeasurementCount!;
this.statistics.statisticsData.get(entryName)?.measurementTimeSeries instanceof CircularArray
? this.statistics.statisticsData
.get(entryName)
?.measurementTimeSeries?.push({ timestamp: entry.startTime, value: entry.duration })
- : (this.statistics.statisticsData.get(entryName).measurementTimeSeries =
+ : (this.statistics.statisticsData.get(entryName)!.measurementTimeSeries =
new CircularArray<TimestampedData>(Constants.DEFAULT_CIRCULAR_BUFFER_CAPACITY, {
timestamp: entry.startTime,
value: entry.duration,
}));
- this.statistics.statisticsData.get(entryName).medTimeMeasurement = median(
- extractTimeSeriesValues(this.statistics.statisticsData.get(entryName).measurementTimeSeries),
+ this.statistics.statisticsData.get(entryName)!.medTimeMeasurement = median(
+ extractTimeSeriesValues(
+ this.statistics.statisticsData.get(entryName)!.measurementTimeSeries as TimestampedData[],
+ ),
);
- this.statistics.statisticsData.get(entryName).ninetyFiveThPercentileTimeMeasurement =
+ this.statistics.statisticsData.get(entryName)!.ninetyFiveThPercentileTimeMeasurement =
nthPercentile(
extractTimeSeriesValues(
- this.statistics.statisticsData.get(entryName).measurementTimeSeries,
+ this.statistics.statisticsData.get(entryName)!.measurementTimeSeries as TimestampedData[],
),
95,
);
- this.statistics.statisticsData.get(entryName).stdDevTimeMeasurement = stdDeviation(
- extractTimeSeriesValues(this.statistics.statisticsData.get(entryName).measurementTimeSeries),
+ this.statistics.statisticsData.get(entryName)!.stdDevTimeMeasurement = stdDeviation(
+ extractTimeSeriesValues(
+ this.statistics.statisticsData.get(entryName)!.measurementTimeSeries as TimestampedData[],
+ ),
);
if (Configuration.getPerformanceStorage().enabled) {
parentPort?.postMessage(buildPerformanceStatisticsMessage(this.statistics));
this.dbName = this.getDBName();
}
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
public async storePerformanceStatistics(performanceStatistics: Statistics): Promise<void> {
try {
const performanceRecord = new PerformanceRecord();
// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
import { JsonFileStorage } from './JsonFileStorage';
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { MikroOrmStorage } from './MikroOrmStorage';
import { MongoDBStorage } from './MongoDBStorage';
import type { Storage } from './Storage';
CONNECTOR_AFFINITY = 'connector-affinity',
}
-export type AutomaticTransactionGeneratorConfiguration = {
+export interface AutomaticTransactionGeneratorConfiguration {
enable: boolean;
minDuration: number;
maxDuration: number;
stopOnConnectionFailure: boolean;
requireAuthorize?: boolean;
idTagDistribution?: IdTagDistribution;
-};
+}
-export type Status = {
+export interface Status {
start: boolean;
startDate?: Date;
lastRunDate?: Date;
rejectedStopTransactionRequests?: number;
skippedConsecutiveTransactions?: number;
skippedTransactions?: number;
-};
+}
-export type ChargingStationAutomaticTransactionGeneratorConfiguration = {
+export interface ChargingStationAutomaticTransactionGeneratorConfiguration {
automaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
automaticTransactionGeneratorStatuses?: Status[];
-};
+}
import type { ConnectorStatus } from './ConnectorStatus';
import type { EvseStatus } from './Evse';
-type ConnectorsConfiguration = {
+interface ConnectorsConfiguration {
connectorsStatus?: ConnectorStatus[];
-};
+}
export type EvseStatusConfiguration = Omit<EvseStatus, 'connectors'> & {
connectorsStatus?: ConnectorStatus[];
};
-type EvsesConfiguration = {
+interface EvsesConfiguration {
evsesStatus?: EvseStatusConfiguration[];
-};
+}
export type ChargingStationConfiguration = ChargingStationInfoConfiguration &
ChargingStationOcppConfiguration &
firmwareStatus?: FirmwareStatus;
};
-export type ChargingStationInfoConfiguration = {
+export interface ChargingStationInfoConfiguration {
stationInfo?: ChargingStationInfo;
-};
+}
reboot?: boolean;
};
-export type ChargingStationOcppConfiguration = {
+export interface ChargingStationOcppConfiguration {
configurationKey?: ConfigurationKey[];
-};
+}
export type WsOptions = ClientOptions & ClientRequestArgs;
-export type FirmwareUpgrade = {
+export interface FirmwareUpgrade {
versionUpgrade?: {
patternGroup?: number;
step?: number;
};
reset?: boolean;
failureStatus?: FirmwareStatus;
-};
+}
-type CommandsSupport = {
+interface CommandsSupport {
incomingCommands: Record<IncomingRequestCommand, boolean>;
outgoingCommands?: Record<RequestCommand, boolean>;
-};
+}
enum x509CertificateType {
V2GRootCertificate = 'V2GRootCertificate',
V2GCertificate = 'V2GCertificate',
}
-export type ChargingStationTemplate = {
+export interface ChargingStationTemplate {
templateHash?: string;
supervisionUrls?: string | string[];
supervisionUrlOcppConfiguration?: boolean;
imsi?: string;
meterSerialNumberPrefix?: string;
meterType?: string;
- power: number | number[];
+ power?: number | number[];
+ powerUnit?: PowerUnits;
powerSharedByConnectors?: boolean;
- powerUnit: PowerUnits;
currentOutType?: CurrentType;
voltageOut?: Voltage;
numberOfPhases?: number;
Evses?: Record<string, EvseTemplate>;
Connectors?: Record<string, ConnectorStatus>;
x509Certificates?: Record<x509CertificateType, string>;
-};
+}
CHARGING_STATION_AFFINITY = 'charging-station-affinity',
}
-export type StationTemplateUrl = {
+export interface StationTemplateUrl {
file: string;
numberOfStations: number;
-};
+}
-export type LogConfiguration = {
+export interface LogConfiguration {
enabled?: boolean;
file?: string;
errorFile?: string;
rotate?: boolean;
maxFiles?: string | number;
maxSize?: string | number;
-};
+}
-export type UIServerConfiguration = {
+export interface UIServerConfiguration {
enabled?: boolean;
type?: ApplicationProtocol;
options?: ServerOptions;
username?: string;
password?: string;
};
-};
+}
-export type StorageConfiguration = {
+export interface StorageConfiguration {
enabled?: boolean;
type?: StorageType;
uri?: string;
-};
+}
-export type WorkerConfiguration = {
+export interface WorkerConfiguration {
processType?: WorkerProcessType;
startDelay?: number;
elementsPerWorker?: number | 'auto';
poolMaxSize?: number;
/** @deprecated Not publicly exposed to end users. */
poolStrategy?: WorkerChoiceStrategy;
-};
+}
-export type ConfigurationData = {
+export interface ConfigurationData {
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
logFile?: string;
/** @deprecated Moved to log configuration section. */
logErrorFile?: string;
-};
+}
import type { AvailabilityType } from './ocpp/Requests';
import type { Reservation } from './ocpp/Reservation';
-export type ConnectorStatus = {
+export interface ConnectorStatus {
availability: AvailabilityType;
bootStatus?: ConnectorStatusEnum;
status?: ConnectorStatusEnum;
transactionBeginMeterValue?: MeterValue;
chargingProfiles?: ChargingProfile[];
reservation?: Reservation;
-};
+}
import type { JsonType } from './JsonType';
-export type HandleErrorParams<T extends JsonType> = {
+export interface HandleErrorParams<T extends JsonType> {
throwError?: boolean;
consoleOut?: boolean;
errorResponse?: T;
-};
+}
import type { ConnectorStatus } from './ConnectorStatus';
import type { AvailabilityType } from './ocpp/Requests';
-export type EvseTemplate = {
+export interface EvseTemplate {
Connectors: Record<string, ConnectorStatus>;
-};
+}
-export type EvseStatus = {
+export interface EvseStatus {
connectors: Map<number, ConnectorStatus>;
availability: AvailabilityType;
-};
+}
minimumValue?: number;
};
-export type MeasurandPerPhaseSampledValueTemplates = {
+export interface MeasurandPerPhaseSampledValueTemplates {
L1?: SampledValueTemplate;
L2?: SampledValueTemplate;
L3?: SampledValueTemplate;
-};
+}
-export type MeasurandValues = {
+export interface MeasurandValues {
L1: number;
L2: number;
L3: number;
allPhases: number;
-};
+}
import type { CircularArray } from '../utils';
import type { WorkerData } from '../worker';
-export type TimestampedData = {
+export interface TimestampedData {
timestamp: number;
value: number;
-};
+}
-type StatisticsData = Partial<{
+export type StatisticsData = Partial<{
requestCount: number;
responseCount: number;
errorCount: number;
hashId: string;
}
-export type MessageEvent = { data: BroadcastChannelRequest | BroadcastChannelResponse };
+export interface MessageEvent {
+ data: BroadcastChannelRequest | BroadcastChannelResponse;
+}
attributeStatusInfo?: StatusInfoType;
} & JsonObject;
-type OCPP20ComponentVariableType = {
+export type OCPP20ComponentVariableType = {
component: ComponentType;
variable?: VariableType;
} & JsonObject;
export type OutgoingRequest = [MessageType.CALL_MESSAGE, string, RequestCommand, JsonType];
-export type RequestParams = {
+export interface RequestParams {
skipBufferingOnError?: boolean;
triggerMessage?: boolean;
throwError?: boolean;
-};
+}
export const IncomingRequestCommand = {
...OCPP16IncomingRequestCommand,
OCPP16TriggerMessageStatus,
OCPP16UnlockStatus,
} from './1.6/Responses';
-import type {
- OCPP20BootNotificationResponse,
- OCPP20ClearCacheResponse,
- OCPP20StatusNotificationResponse,
-} from './2.0/Responses';
+import type { OCPP20BootNotificationResponse, OCPP20ClearCacheResponse } from './2.0/Responses';
import type { ErrorType } from './ErrorType';
import type { MessageType } from './MessageType';
import type { ChargingStation } from '../../charging-station';
-import type { JsonType } from '../JsonType';
+import type { JsonObject, JsonType } from '../JsonType';
export type Response = [MessageType.CALL_RESULT_MESSAGE, string, JsonType];
export type ClearCacheResponse = GenericResponse | OCPP20ClearCacheResponse;
-export type StatusNotificationResponse =
- | OCPP16StatusNotificationResponse
- | OCPP20StatusNotificationResponse;
+export type StatusNotificationResponse = OCPP16StatusNotificationResponse;
export type MeterValuesResponse = OCPP16MeterValuesResponse;
Rejected = 'Rejected',
}
-export type GenericResponse = {
+export interface GenericResponse extends JsonObject {
status: GenericStatus;
-};
+}
export enum RegistrationStatusEnumType {
ACCEPTED = 'Accepted',
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { PerformanceRecord } from './PerformanceRecord';
@Entity()
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { PerformanceData } from './PerformanceData';
@Entity()
asyncLock.acquired = false;
return;
}
- const queuedResolve = asyncLock.resolveQueue.dequeue();
+ const queuedResolve = asyncLock.resolveQueue.dequeue()!;
return new Promise((resolve) => {
queuedResolve();
resolve();
if (!AsyncLock.asyncLocks.has(type)) {
AsyncLock.asyncLocks.set(type, new AsyncLock());
}
- return AsyncLock.asyncLocks.get(type);
+ return AsyncLock.asyncLocks.get(type)!;
}
}
automaticTransactionGenerator: chargingStation.getAutomaticTransactionGeneratorConfiguration(),
...(!isNullOrUndefined(chargingStation.automaticTransactionGenerator?.connectorsStatus) && {
automaticTransactionGeneratorStatuses: [
- ...chargingStation.automaticTransactionGenerator.connectorsStatus.values(),
+ ...chargingStation.automaticTransactionGenerator!.connectorsStatus.values(),
],
}),
};
if (hasOwnProp(Configuration.getConfig(), 'uiServer')) {
uiServerConfiguration = merge<UIServerConfiguration>(
uiServerConfiguration,
- Configuration.getConfig()?.uiServer,
+ Configuration.getConfig()!.uiServer!,
);
}
if (isCFEnvironment() === true) {
delete uiServerConfiguration.options?.host;
- uiServerConfiguration.options.port = parseInt(process.env.PORT);
+ uiServerConfiguration.options!.port = parseInt(process.env.PORT!);
}
return uiServerConfiguration;
}
...(Configuration.getConfig()?.performanceStorage?.type === StorageType.JSON_FILE &&
Configuration.getConfig()?.performanceStorage?.uri && {
uri: Configuration.buildPerformanceUriFilePath(
- new URL(Configuration.getConfig()?.performanceStorage?.uri).pathname,
+ new URL(Configuration.getConfig()!.performanceStorage!.uri!).pathname,
),
}),
};
undefined,
"Use 'stationTemplateUrls' instead",
);
- !isUndefined(Configuration.getConfig()['stationTemplateURLs']) &&
- (Configuration.getConfig().stationTemplateUrls = Configuration.getConfig()[
+ // eslint-disable-next-line @typescript-eslint/dot-notation
+ !isUndefined(Configuration.getConfig()!['stationTemplateURLs']) &&
+ (Configuration.getConfig()!.stationTemplateUrls = Configuration.getConfig()![
+ // eslint-disable-next-line @typescript-eslint/dot-notation
'stationTemplateURLs'
] as StationTemplateUrl[]);
- Configuration.getConfig().stationTemplateUrls.forEach(
+ Configuration.getConfig()!.stationTemplateUrls.forEach(
(stationTemplateUrl: StationTemplateUrl) => {
+ // eslint-disable-next-line @typescript-eslint/dot-notation
if (!isUndefined(stationTemplateUrl['numberOfStation'])) {
console.error(
`${chalk.green(Configuration.logPrefix())} ${chalk.red(
public static workerPoolInUse(): boolean {
return [WorkerProcessType.dynamicPool, WorkerProcessType.staticPool].includes(
- Configuration.getWorker().processType,
+ Configuration.getWorker().processType!,
);
}
undefined,
"Use 'supervisionUrls' instead",
);
- !isUndefined(Configuration.getConfig()['supervisionURLs']) &&
- (Configuration.getConfig().supervisionUrls = Configuration.getConfig()['supervisionURLs'] as
+ // eslint-disable-next-line @typescript-eslint/dot-notation
+ if (!isUndefined(Configuration.getConfig()!['supervisionURLs'])) {
+ // eslint-disable-next-line @typescript-eslint/dot-notation
+ Configuration.getConfig()!.supervisionUrls = Configuration.getConfig()!['supervisionURLs'] as
| string
- | string[]);
+ | string[];
+ }
// Read conf
return Configuration.getConfig()?.supervisionUrls;
}
) {
if (
sectionName &&
- !isUndefined(Configuration.getConfig()[sectionName]) &&
- !isUndefined((Configuration.getConfig()[sectionName] as Record<string, unknown>)[key])
+ !isUndefined(Configuration.getConfig()![sectionName]) &&
+ !isUndefined((Configuration.getConfig()![sectionName] as object)[key])
) {
console.error(
`${chalk.green(Configuration.logPrefix())} ${chalk.red(
}`,
)}`,
);
- } else if (!isUndefined(Configuration.getConfig()[key])) {
+ } else if (!isUndefined(Configuration.getConfig()![key])) {
console.error(
`${chalk.green(Configuration.logPrefix())} ${chalk.red(
`Deprecated configuration key '${key}' usage${
private static getConfigurationFileWatcher(): FSWatcher | undefined {
try {
return watch(Configuration.configurationFile, (event, filename): void => {
- if (filename?.trim().length > 0 && event === 'change') {
+ if (filename!.trim()!.length > 0 && event === 'change') {
// Nullify to force configuration file reading
Configuration.configuration = null;
if (!isUndefined(Configuration.configurationChangeCallback)) {
transports = [
new DailyRotateFile({
filename: insertAt(
- Configuration.getLog().errorFile,
+ Configuration.getLog().errorFile!,
'-%DATE%',
- Configuration.getLog().errorFile?.indexOf('.log'),
+ Configuration.getLog().errorFile!.indexOf('.log'),
),
level: 'error',
...(logMaxFiles && { maxFiles: logMaxFiles }),
}),
new DailyRotateFile({
filename: insertAt(
- Configuration.getLog().file,
+ Configuration.getLog().file!,
'-%DATE%',
- Configuration.getLog().file?.indexOf('.log'),
+ Configuration.getLog().file!.indexOf('.log'),
),
...(logMaxFiles && { maxFiles: logMaxFiles }),
...(logMaxSize && { maxSize: logMaxSize }),
export const logger = createLogger({
silent: !Configuration.getLog().enabled,
level: Configuration.getLog().level,
- format: format.combine(format.splat(), (format[Configuration.getLog().format] as FormatWrap)()),
+ format: format.combine(format.splat(), (format[Configuration.getLog().format!] as FormatWrap)()),
transports,
});
new TransportType.Console({
format: format.combine(
format.splat(),
- (format[Configuration.getLog().format] as FormatWrap)(),
+ (format[Configuration.getLog().format!] as FormatWrap)(),
),
}),
);
stationInfo: chargingStation.stationInfo,
connectors: buildConnectorsStatus(chargingStation),
evses: buildEvsesStatus(chargingStation, OutputFormat.worker),
- ocppConfiguration: chargingStation.ocppConfiguration,
+ ocppConfiguration: chargingStation.ocppConfiguration!,
wsState: chargingStation?.wsConnection?.readyState,
bootNotificationResponse: chargingStation.bootNotificationResponse,
...(chargingStation.automaticTransactionGenerator && {
return value;
}
if (isString(value) || typeof value === 'number') {
- return new Date(value);
+ return new Date(value!);
}
return null;
};
changedValue = parseInt(value as string);
}
if (isNaN(changedValue)) {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
throw new Error(`Cannot convert to integer: ${value.toString()}`);
}
return changedValue;
changedValue = parseFloat(value as string);
}
if (isNaN(changedValue)) {
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
throw new Error(`Cannot convert to float: ${value.toString()}`);
}
return changedValue;
this.workerScript = workerScript;
this.workerOptions = workerOptions;
this.workerOptions.poolOptions?.messageHandler?.bind(this);
- this.workerOptions.poolOptions.errorHandler = (
+ this.workerOptions.poolOptions!.errorHandler = (
this.workerOptions?.poolOptions?.errorHandler ?? defaultErrorHandler
).bind(this) as ErrorHandler<Worker>;
this.workerOptions.poolOptions?.onlineHandler?.bind(this);
- this.workerOptions.poolOptions.exitHandler = (
+ this.workerOptions.poolOptions!.exitHandler = (
this.workerOptions?.poolOptions?.exitHandler ?? defaultExitHandler
).bind(this) as ExitHandler<Worker>;
}
public async addElement(elementData: WorkerData): Promise<void> {
await this.pool.execute(elementData);
// Start element sequentially to optimize memory at startup
- this.workerOptions.elementStartDelay > 0 && (await sleep(this.workerOptions.elementStartDelay));
+ this.workerOptions.elementStartDelay! > 0 &&
+ (await sleep(this.workerOptions.elementStartDelay!));
}
}
(accumulator, workerSetElement) => accumulator + workerSetElement.numberOfWorkerElements,
0,
),
- elementsPerWorker: this.maxElementsPerWorker,
+ elementsPerWorker: this.maxElementsPerWorker!,
};
}
public async start(): Promise<void> {
this.addWorkerSetElement();
// Add worker set element sequentially to optimize memory at startup
- this.workerOptions.workerStartDelay > 0 && (await sleep(this.workerOptions.workerStartDelay));
+ this.workerOptions.workerStartDelay! > 0 && (await sleep(this.workerOptions.workerStartDelay!));
}
/** @inheritDoc */
});
++workerSetElement.numberOfWorkerElements;
// Add element sequentially to optimize memory at startup
- if (this.workerOptions.elementStartDelay > 0) {
- await sleep(this.workerOptions.elementStartDelay);
+ if (this.workerOptions.elementStartDelay! > 0) {
+ await sleep(this.workerOptions.elementStartDelay!);
}
}
private addWorkerSetElement(): WorkerSetElement {
const worker = new Worker(this.workerScript, {
env: SHARE_ENV,
- ...this.workerOptions.poolOptions.workerOptions,
+ ...this.workerOptions.poolOptions?.workerOptions,
});
worker.on(
'message',
this.workerOptions?.poolOptions?.exitHandler ?? WorkerConstants.EMPTY_FUNCTION,
);
worker.once('exit', () =>
- this.removeWorkerSetElement(this.getWorkerSetElementByWorker(worker)),
+ this.removeWorkerSetElement(this.getWorkerSetElementByWorker(worker)!),
);
const workerSetElement: WorkerSetElement = { worker, numberOfWorkerElements: 0 };
this.workerSet.add(workerSetElement);
}
private async getWorkerSetElement(): Promise<WorkerSetElement> {
- let chosenWorkerSetElement: WorkerSetElement;
+ let chosenWorkerSetElement: WorkerSetElement | undefined;
for (const workerSetElement of this.workerSet) {
- if (workerSetElement.numberOfWorkerElements < this.workerOptions.elementsPerWorker) {
+ if (workerSetElement.numberOfWorkerElements < this.workerOptions.elementsPerWorker!) {
chosenWorkerSetElement = workerSetElement;
break;
}
if (!chosenWorkerSetElement) {
chosenWorkerSetElement = this.addWorkerSetElement();
// Add worker set element sequentially to optimize memory at startup
- this.workerOptions.workerStartDelay > 0 && (await sleep(this.workerOptions.workerStartDelay));
+ this.workerOptions.workerStartDelay! > 0 &&
+ (await sleep(this.workerOptions.workerStartDelay!));
}
return chosenWorkerSetElement;
}
private getWorkerSetElementByWorker(worker: Worker): WorkerSetElement | undefined {
- let workerSetElt: WorkerSetElement;
+ let workerSetElt: WorkerSetElement | undefined;
for (const workerSetElement of this.workerSet) {
if (workerSetElement.worker.threadId === worker.threadId) {
workerSetElt = workerSetElement;
public async addElement(elementData: WorkerData): Promise<void> {
await this.pool.execute(elementData);
// Start element sequentially to optimize memory at startup
- this.workerOptions.elementStartDelay > 0 && (await sleep(this.workerOptions.elementStartDelay));
+ this.workerOptions.elementStartDelay! > 0 &&
+ (await sleep(this.workerOptions.elementStartDelay!));
}
}
staticPool = 'staticPool',
}
-export type SetInfo = {
+export interface SetInfo {
version: string;
type: string;
worker: string;
size: number;
elementsExecuting: number;
elementsPerWorker: number;
-};
+}
export enum WorkerSetEvents {
error = 'error',
} as const;
export type WorkerEvents = PoolEvent | WorkerSetEvents;
-export type WorkerOptions = {
+export interface WorkerOptions {
workerStartDelay?: number;
elementStartDelay?: number;
poolMaxSize: number;
poolMinSize: number;
elementsPerWorker?: number;
poolOptions?: ThreadPoolOptions;
-};
+}
export type WorkerData = Record<string, unknown>;
-export type WorkerSetElement = {
+export interface WorkerSetElement {
worker: Worker;
numberOfWorkerElements: number;
-};
+}
-export type WorkerMessage<T extends WorkerData> = {
+export interface WorkerMessage<T extends WorkerData> {
id: WorkerMessageEvents;
data: T;
-};
+}
export enum WorkerMessageEvents {
startWorkerElement = 'startWorkerElement',
it('Verify isEmptyObject()', () => {
expect(isEmptyObject({})).toBe(true);
expect(isEmptyObject({ 1: 1, 2: 2 })).toBe(false);
- expect(isEmptyObject(undefined)).toBe(false);
- expect(isEmptyObject(null)).toBe(false);
expect(isEmptyObject(new Map())).toBe(false);
expect(isEmptyObject(new Set())).toBe(false);
expect(isEmptyObject(new WeakMap())).toBe(false);
/* Strict Type-Checking Options */
// "strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
- // "strictNullChecks": true, /* Enable strict null checks. */
+ "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
"vue-router": "^4.2.4"
},
"devDependencies": {
- "@tsconfig/node20": "^1.0.2",
+ "@tsconfig/node20": "^20.1.0",
"@types/jsdom": "^21.1.1",
"@types/node": "^20.4.2",
- "@typescript-eslint/eslint-plugin": "^5.62.0",
- "@typescript-eslint/parser": "^5.62.0",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vitest/coverage-c8": "^0.33.0",
devDependencies:
'@tsconfig/node20':
- specifier: ^1.0.2
- version: 1.0.2
+ specifier: ^20.1.0
+ version: 20.1.0
'@types/jsdom':
specifier: ^21.1.1
version: 21.1.1
specifier: ^20.4.2
version: 20.4.2
'@typescript-eslint/eslint-plugin':
- specifier: ^5.62.0
- version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.45.0)(typescript@5.1.6)
+ specifier: ^6.0.0
+ version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.45.0)(typescript@5.1.6)
'@typescript-eslint/parser':
- specifier: ^5.62.0
- version: 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ specifier: ^6.0.0
+ version: 6.0.0(eslint@8.45.0)(typescript@5.1.6)
'@vitejs/plugin-vue':
specifier: ^4.2.3
version: 4.2.3(vite@4.4.4)(vue@3.3.4)
version: 1.21.0
eslint-import-resolver-typescript:
specifier: ^3.5.5
- version: 3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
+ version: 3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
eslint-plugin-import:
specifier: ^2.27.5
- version: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ version: 2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
eslint-plugin-vue:
specifier: ^9.15.1
version: 9.15.1(eslint@8.45.0)
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true
- /@esbuild/android-arm64@0.18.12:
- resolution: {integrity: sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==}
+ /@esbuild/android-arm64@0.18.13:
+ resolution: {integrity: sha512-j7NhycJUoUAG5kAzGf4fPWfd17N6SM3o1X6MlXVqfHvs2buFraCJzos9vbeWjLxOyBKHyPOnuCuipbhvbYtTAg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
dev: true
optional: true
- /@esbuild/android-arm@0.18.12:
- resolution: {integrity: sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==}
+ /@esbuild/android-arm@0.18.13:
+ resolution: {integrity: sha512-KwqFhxRFMKZINHzCqf8eKxE0XqWlAVPRxwy6rc7CbVFxzUWB2sA/s3hbMZeemPdhN3fKBkqOaFhTbS8xJXYIWQ==}
engines: {node: '>=12'}
cpu: [arm]
os: [android]
dev: true
optional: true
- /@esbuild/android-x64@0.18.12:
- resolution: {integrity: sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==}
+ /@esbuild/android-x64@0.18.13:
+ resolution: {integrity: sha512-M2eZkRxR6WnWfVELHmv6MUoHbOqnzoTVSIxgtsyhm/NsgmL+uTmag/VVzdXvmahak1I6sOb1K/2movco5ikDJg==}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
dev: true
optional: true
- /@esbuild/darwin-arm64@0.18.12:
- resolution: {integrity: sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==}
+ /@esbuild/darwin-arm64@0.18.13:
+ resolution: {integrity: sha512-f5goG30YgR1GU+fxtaBRdSW3SBG9pZW834Mmhxa6terzcboz7P2R0k4lDxlkP7NYRIIdBbWp+VgwQbmMH4yV7w==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
dev: true
optional: true
- /@esbuild/darwin-x64@0.18.12:
- resolution: {integrity: sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==}
+ /@esbuild/darwin-x64@0.18.13:
+ resolution: {integrity: sha512-RIrxoKH5Eo+yE5BtaAIMZaiKutPhZjw+j0OCh8WdvKEKJQteacq0myZvBDLU+hOzQOZWJeDnuQ2xgSScKf1Ovw==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
dev: true
optional: true
- /@esbuild/freebsd-arm64@0.18.12:
- resolution: {integrity: sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==}
+ /@esbuild/freebsd-arm64@0.18.13:
+ resolution: {integrity: sha512-AfRPhHWmj9jGyLgW/2FkYERKmYR+IjYxf2rtSLmhOrPGFh0KCETFzSjx/JX/HJnvIqHt/DRQD/KAaVsUKoI3Xg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
dev: true
optional: true
- /@esbuild/freebsd-x64@0.18.12:
- resolution: {integrity: sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==}
+ /@esbuild/freebsd-x64@0.18.13:
+ resolution: {integrity: sha512-pGzWWZJBInhIgdEwzn8VHUBang8UvFKsvjDkeJ2oyY5gZtAM6BaxK0QLCuZY+qoj/nx/lIaItH425rm/hloETA==}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
dev: true
optional: true
- /@esbuild/linux-arm64@0.18.12:
- resolution: {integrity: sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==}
+ /@esbuild/linux-arm64@0.18.13:
+ resolution: {integrity: sha512-hCzZbVJEHV7QM77fHPv2qgBcWxgglGFGCxk6KfQx6PsVIdi1u09X7IvgE9QKqm38OpkzaAkPnnPqwRsltvLkIQ==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-arm@0.18.12:
- resolution: {integrity: sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==}
+ /@esbuild/linux-arm@0.18.13:
+ resolution: {integrity: sha512-4iMxLRMCxGyk7lEvkkvrxw4aJeC93YIIrfbBlUJ062kilUUnAiMb81eEkVvCVoh3ON283ans7+OQkuy1uHW+Hw==}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-ia32@0.18.12:
- resolution: {integrity: sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==}
+ /@esbuild/linux-ia32@0.18.13:
+ resolution: {integrity: sha512-I3OKGbynl3AAIO6onXNrup/ttToE6Rv2XYfFgLK/wnr2J+1g+7k4asLrE+n7VMhaqX+BUnyWkCu27rl+62Adug==}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-loong64@0.18.12:
- resolution: {integrity: sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==}
+ /@esbuild/linux-loong64@0.18.13:
+ resolution: {integrity: sha512-8pcKDApAsKc6WW51ZEVidSGwGbebYw2qKnO1VyD8xd6JN0RN6EUXfhXmDk9Vc4/U3Y4AoFTexQewQDJGsBXBpg==}
engines: {node: '>=12'}
cpu: [loong64]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-mips64el@0.18.12:
- resolution: {integrity: sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==}
+ /@esbuild/linux-mips64el@0.18.13:
+ resolution: {integrity: sha512-6GU+J1PLiVqWx8yoCK4Z0GnfKyCGIH5L2KQipxOtbNPBs+qNDcMJr9euxnyJ6FkRPyMwaSkjejzPSISD9hb+gg==}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-ppc64@0.18.12:
- resolution: {integrity: sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==}
+ /@esbuild/linux-ppc64@0.18.13:
+ resolution: {integrity: sha512-pfn/OGZ8tyR8YCV7MlLl5hAit2cmS+j/ZZg9DdH0uxdCoJpV7+5DbuXrR+es4ayRVKIcfS9TTMCs60vqQDmh+w==}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-riscv64@0.18.12:
- resolution: {integrity: sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==}
+ /@esbuild/linux-riscv64@0.18.13:
+ resolution: {integrity: sha512-aIbhU3LPg0lOSCfVeGHbmGYIqOtW6+yzO+Nfv57YblEK01oj0mFMtvDJlOaeAZ6z0FZ9D13oahi5aIl9JFphGg==}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-s390x@0.18.12:
- resolution: {integrity: sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==}
+ /@esbuild/linux-s390x@0.18.13:
+ resolution: {integrity: sha512-Pct1QwF2sp+5LVi4Iu5Y+6JsGaV2Z2vm4O9Dd7XZ5tKYxEHjFtb140fiMcl5HM1iuv6xXO8O1Vrb1iJxHlv8UA==}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
dev: true
optional: true
- /@esbuild/linux-x64@0.18.12:
- resolution: {integrity: sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==}
+ /@esbuild/linux-x64@0.18.13:
+ resolution: {integrity: sha512-zTrIP0KzYP7O0+3ZnmzvUKgGtUvf4+piY8PIO3V8/GfmVd3ZyHJGz7Ht0np3P1wz+I8qJ4rjwJKqqEAbIEPngA==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
dev: true
optional: true
- /@esbuild/netbsd-x64@0.18.12:
- resolution: {integrity: sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==}
+ /@esbuild/netbsd-x64@0.18.13:
+ resolution: {integrity: sha512-I6zs10TZeaHDYoGxENuksxE1sxqZpCp+agYeW039yqFwh3MgVvdmXL5NMveImOC6AtpLvE4xG5ujVic4NWFIDQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
dev: true
optional: true
- /@esbuild/openbsd-x64@0.18.12:
- resolution: {integrity: sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==}
+ /@esbuild/openbsd-x64@0.18.13:
+ resolution: {integrity: sha512-W5C5nczhrt1y1xPG5bV+0M12p2vetOGlvs43LH8SopQ3z2AseIROu09VgRqydx5qFN7y9qCbpgHLx0kb0TcW7g==}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
dev: true
optional: true
- /@esbuild/sunos-x64@0.18.12:
- resolution: {integrity: sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==}
+ /@esbuild/sunos-x64@0.18.13:
+ resolution: {integrity: sha512-X/xzuw4Hzpo/yq3YsfBbIsipNgmsm8mE/QeWbdGdTTeZ77fjxI2K0KP3AlhZ6gU3zKTw1bKoZTuKLnqcJ537qw==}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
dev: true
optional: true
- /@esbuild/win32-arm64@0.18.12:
- resolution: {integrity: sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==}
+ /@esbuild/win32-arm64@0.18.13:
+ resolution: {integrity: sha512-4CGYdRQT/ILd+yLLE5i4VApMPfGE0RPc/wFQhlluDQCK09+b4JDbxzzjpgQqTPrdnP7r5KUtGVGZYclYiPuHrw==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
dev: true
optional: true
- /@esbuild/win32-ia32@0.18.12:
- resolution: {integrity: sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==}
+ /@esbuild/win32-ia32@0.18.13:
+ resolution: {integrity: sha512-D+wKZaRhQI+MUGMH+DbEr4owC2D7XnF+uyGiZk38QbgzLcofFqIOwFs7ELmIeU45CQgfHNy9Q+LKW3cE8g37Kg==}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
dev: true
optional: true
- /@esbuild/win32-x64@0.18.12:
- resolution: {integrity: sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==}
+ /@esbuild/win32-x64@0.18.13:
+ resolution: {integrity: sha512-iVl6lehAfJS+VmpF3exKpNQ8b0eucf5VWfzR8S7xFve64NBNz2jPUgx1X93/kfnkfgP737O+i1k54SVQS7uVZA==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
engines: {node: '>= 10'}
dev: true
- /@tsconfig/node20@1.0.2:
- resolution: {integrity: sha512-pw0MmECiSTbBfIlT0x3iQLuJ8s3i2mwYoGxJ3vzqTNMdc4nO2VeqfCOQ/doGFa8iyPlqmBd98/5pBctWz7uN2A==}
+ /@tsconfig/node20@20.1.0:
+ resolution: {integrity: sha512-7Yz1xDv3sot8+NwiYA8wkx60qr3Tr+soJwlqVQSkiEqqgYoNmMmqSPiYs1vMmTxneB3igHAD11dGOR2+BShzTA==}
dev: true
/@types/chai-subset@1.3.3:
- supports-color
dev: true
+ /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
+ eslint: ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@eslint-community/regexpp': 4.5.1
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/type-utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/visitor-keys': 6.0.0
+ debug: 4.3.4
+ eslint: 8.45.0
+ grapheme-splitter: 1.0.4
+ graphemer: 1.4.0
+ ignore: 5.2.4
+ natural-compare: 1.4.0
+ natural-compare-lite: 1.4.0
+ semver: 7.5.4
+ ts-api-utils: 1.0.1(typescript@5.1.6)
+ typescript: 5.1.6
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6):
resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- supports-color
dev: true
+ /@typescript-eslint/parser@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
+ '@typescript-eslint/visitor-keys': 6.0.0
+ debug: 4.3.4
+ eslint: 8.45.0
+ typescript: 5.1.6
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/scope-manager@5.62.0:
resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
'@typescript-eslint/visitor-keys': 5.62.0
dev: true
+ /@typescript-eslint/scope-manager@6.0.0:
+ resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/visitor-keys': 6.0.0
+ dev: true
+
/@typescript-eslint/type-utils@5.62.0(eslint@8.45.0)(typescript@5.1.6):
resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- supports-color
dev: true
+ /@typescript-eslint/type-utils@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
+ '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
+ debug: 4.3.4
+ eslint: 8.45.0
+ ts-api-utils: 1.0.1(typescript@5.1.6)
+ typescript: 5.1.6
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/types@5.62.0:
resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@typescript-eslint/types@6.0.0:
+ resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dev: true
+
/@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6):
resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- supports-color
dev: true
+ /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.6):
+ resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/visitor-keys': 6.0.0
+ debug: 4.3.4
+ globby: 11.1.0
+ is-glob: 4.0.3
+ semver: 7.5.4
+ ts-api-utils: 1.0.1(typescript@5.1.6)
+ typescript: 5.1.6
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/utils@5.62.0(eslint@8.45.0)(typescript@5.1.6):
resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- typescript
dev: true
+ /@typescript-eslint/utils@6.0.0(eslint@8.45.0)(typescript@5.1.6):
+ resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ peerDependencies:
+ eslint: ^7.0.0 || ^8.0.0
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0)
+ '@types/json-schema': 7.0.12
+ '@types/semver': 7.5.0
+ '@typescript-eslint/scope-manager': 6.0.0
+ '@typescript-eslint/types': 6.0.0
+ '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6)
+ eslint: 8.45.0
+ eslint-scope: 5.1.1
+ semver: 7.5.4
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
/@typescript-eslint/visitor-keys@5.62.0:
resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
eslint-visitor-keys: 3.4.1
dev: true
+ /@typescript-eslint/visitor-keys@6.0.0:
+ resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==}
+ engines: {node: ^16.0.0 || >=18.0.0}
+ dependencies:
+ '@typescript-eslint/types': 6.0.0
+ eslint-visitor-keys: 3.4.1
+ dev: true
+
/@vitejs/plugin-vue-jsx@3.0.1(vite@4.4.4)(vue@3.3.4):
resolution: {integrity: sha512-+Jb7ggL48FSPS1uhPnJbJwWa9Sr90vQ+d0InW+AhBM22n+cfuYqJZDckBc+W3QSHe1WDvewMZfa4wZOtk5pRgw==}
engines: {node: ^14.18.0 || >=16.0.0}
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
get-intrinsic: 1.2.1
is-string: 1.0.7
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
es-shim-unscopables: 1.0.0
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
es-shim-unscopables: 1.0.0
dev: true
+ /arraybuffer.prototype.slice@1.0.1:
+ resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ array-buffer-byte-length: 1.0.0
+ call-bind: 1.0.2
+ define-properties: 1.2.0
+ get-intrinsic: 1.2.1
+ is-array-buffer: 3.0.2
+ is-shared-array-buffer: 1.0.2
+ dev: true
+
/assertion-error@1.1.0:
resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}
dev: true
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
- caniuse-lite: 1.0.30001515
+ caniuse-lite: 1.0.30001516
electron-to-chromium: 1.4.461
node-releases: 2.0.13
update-browserslist-db: 1.0.11(browserslist@4.21.9)
engines: {node: '>=10'}
dev: true
- /caniuse-lite@1.0.30001515:
- resolution: {integrity: sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==}
+ /caniuse-lite@1.0.30001516:
+ resolution: {integrity: sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==}
dev: true
/chai@4.3.7:
engines: {node: '>=0.12'}
dev: true
- /es-abstract@1.21.3:
- resolution: {integrity: sha512-ZU4miiY1j3sGPFLJ34VJXEqhpmL+HGByCinGHv4HC+Fxl2fI2Z4yR6tl0mORnDr6PA8eihWo4LmSWDbvhALckg==}
+ /es-abstract@1.22.1:
+ resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==}
engines: {node: '>= 0.4'}
dependencies:
array-buffer-byte-length: 1.0.0
+ arraybuffer.prototype.slice: 1.0.1
available-typed-arrays: 1.0.5
call-bind: 1.0.2
es-set-tostringtag: 2.0.1
object-keys: 1.1.1
object.assign: 4.1.4
regexp.prototype.flags: 1.5.0
+ safe-array-concat: 1.0.0
safe-regex-test: 1.0.0
string.prototype.trim: 1.2.7
string.prototype.trimend: 1.0.6
string.prototype.trimstart: 1.0.6
+ typed-array-buffer: 1.0.0
+ typed-array-byte-length: 1.0.0
typed-array-byte-offset: 1.0.0
typed-array-length: 1.0.4
unbox-primitive: 1.0.2
is-symbol: 1.0.4
dev: true
- /esbuild@0.18.12:
- resolution: {integrity: sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==}
+ /esbuild@0.18.13:
+ resolution: {integrity: sha512-vhg/WR/Oiu4oUIkVhmfcc23G6/zWuEQKFS+yiosSHe4aN6+DQRXIfeloYGibIfVhkr4wyfuVsGNLr+sQU1rWWw==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
- '@esbuild/android-arm': 0.18.12
- '@esbuild/android-arm64': 0.18.12
- '@esbuild/android-x64': 0.18.12
- '@esbuild/darwin-arm64': 0.18.12
- '@esbuild/darwin-x64': 0.18.12
- '@esbuild/freebsd-arm64': 0.18.12
- '@esbuild/freebsd-x64': 0.18.12
- '@esbuild/linux-arm': 0.18.12
- '@esbuild/linux-arm64': 0.18.12
- '@esbuild/linux-ia32': 0.18.12
- '@esbuild/linux-loong64': 0.18.12
- '@esbuild/linux-mips64el': 0.18.12
- '@esbuild/linux-ppc64': 0.18.12
- '@esbuild/linux-riscv64': 0.18.12
- '@esbuild/linux-s390x': 0.18.12
- '@esbuild/linux-x64': 0.18.12
- '@esbuild/netbsd-x64': 0.18.12
- '@esbuild/openbsd-x64': 0.18.12
- '@esbuild/sunos-x64': 0.18.12
- '@esbuild/win32-arm64': 0.18.12
- '@esbuild/win32-ia32': 0.18.12
- '@esbuild/win32-x64': 0.18.12
+ '@esbuild/android-arm': 0.18.13
+ '@esbuild/android-arm64': 0.18.13
+ '@esbuild/android-x64': 0.18.13
+ '@esbuild/darwin-arm64': 0.18.13
+ '@esbuild/darwin-x64': 0.18.13
+ '@esbuild/freebsd-arm64': 0.18.13
+ '@esbuild/freebsd-x64': 0.18.13
+ '@esbuild/linux-arm': 0.18.13
+ '@esbuild/linux-arm64': 0.18.13
+ '@esbuild/linux-ia32': 0.18.13
+ '@esbuild/linux-loong64': 0.18.13
+ '@esbuild/linux-mips64el': 0.18.13
+ '@esbuild/linux-ppc64': 0.18.13
+ '@esbuild/linux-riscv64': 0.18.13
+ '@esbuild/linux-s390x': 0.18.13
+ '@esbuild/linux-x64': 0.18.13
+ '@esbuild/netbsd-x64': 0.18.13
+ '@esbuild/openbsd-x64': 0.18.13
+ '@esbuild/sunos-x64': 0.18.13
+ '@esbuild/win32-arm64': 0.18.13
+ '@esbuild/win32-ia32': 0.18.13
+ '@esbuild/win32-x64': 0.18.13
dev: true
/escalade@3.1.1:
- supports-color
dev: true
- /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0):
+ /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0):
resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
debug: 4.3.4
enhanced-resolve: 5.15.0
eslint: 8.45.0
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
get-tsconfig: 4.6.2
globby: 13.2.2
is-core-module: 2.12.1
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
debug: 3.2.7
eslint: 8.45.0
eslint-import-resolver-node: 0.3.7
- eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
+ eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.0.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0)
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
+ /eslint-plugin-import@2.27.5(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0):
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.1.6)
+ '@typescript-eslint/parser': 6.0.0(eslint@8.45.0)(typescript@5.1.6)
array-includes: 3.1.6
array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1
doctrine: 2.1.0
eslint: 8.45.0
eslint-import-resolver-node: 0.3.7
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.0.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0)
has: 1.0.3
is-core-module: 2.12.1
is-glob: 4.0.3
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
functions-have-names: 1.2.3
dev: true
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
dev: true
+ /grapheme-splitter@1.0.4:
+ resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
+ dev: true
+
/graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
dev: true
is-docker: 2.2.1
dev: true
+ /isarray@2.0.5:
+ resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
+ dev: true
+
/isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
dev: true
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/on-finished@2.4.1:
queue-microtask: 1.2.3
dev: true
+ /safe-array-concat@1.0.0:
+ resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==}
+ engines: {node: '>=0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.1
+ has-symbols: 1.0.3
+ isarray: 2.0.5
+ dev: true
+
/safe-regex-test@1.0.0:
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
dependencies:
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/string.prototype.trimend@1.0.6:
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/string.prototype.trimstart@1.0.6:
dependencies:
call-bind: 1.0.2
define-properties: 1.2.0
- es-abstract: 1.21.3
+ es-abstract: 1.22.1
dev: true
/strip-ansi@6.0.1:
punycode: 2.3.0
dev: true
+ /ts-api-utils@1.0.1(typescript@5.1.6):
+ resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==}
+ engines: {node: '>=16.13.0'}
+ peerDependencies:
+ typescript: '>=4.2.0'
+ dependencies:
+ typescript: 5.1.6
+ dev: true
+
/tsconfig-paths@3.14.2:
resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==}
dependencies:
engines: {node: '>=10'}
dev: true
+ /typed-array-buffer@1.0.0:
+ resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.1
+ is-typed-array: 1.1.10
+ dev: true
+
+ /typed-array-byte-length@1.0.0:
+ resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ for-each: 0.3.3
+ has-proto: 1.0.1
+ is-typed-array: 1.1.10
+ dev: true
+
/typed-array-byte-offset@1.0.0:
resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==}
engines: {node: '>= 0.4'}
optional: true
dependencies:
'@types/node': 20.4.2
- esbuild: 0.18.12
+ esbuild: 0.18.13
postcss: 8.4.26
rollup: 3.26.2
optionalDependencies: