strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
- node: ['20.x', '21.x']
+ node: ['20.x', 'latest']
name: Build simulator with Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
- node: ['18.x', '20.x', '21.x']
+ node: ['18.x', '20.x', 'latest']
name: Build dashboard with Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
export default {
'{src,tests}/**/*.{ts,tsx,cts,mts}': ['prettier --cache --write', 'eslint --cache --fix'],
'**/*.{json,md,yml,yaml}': ['prettier --cache --write'],
- '**/*.{js,jsx,cjs,mjs}': ['prettier --cache --write', 'eslint --cache --fix'],
+ '**/*.{js,jsx,cjs,mjs}': ['prettier --cache --write', 'eslint --cache --fix']
}
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
- "semi": false,
+ "arrowParens": "avoid",
"singleQuote": true,
- "trailingComma": "es5"
+ "semi": false,
+ "trailingComma": "none"
}
parties the right to use of access any SAP External Product, through API Calls.
Files: *
-Copyright: 2023 SAP SE or an SAP affiliate company and e-mobility-charging-stations-simulator contributors
+Copyright: 2021-2024 SAP SE or an SAP affiliate company and e-mobility-charging-stations-simulator contributors
License: Apache-2.0
# Changelog
-## [v1.2.31](https://github.com/sap/e-mobility-charging-stations-simulator/compare/v1.2.30...v1.2.31)
+## [v1.2.32](https://github.com/sap/e-mobility-charging-stations-simulator/compare/v1.2.31...v1.2.32)
+
+- Combined PRs [`#926`](https://github.com/sap/e-mobility-charging-stations-simulator/pull/926)
+- Combined PRs [`#921`](https://github.com/sap/e-mobility-charging-stations-simulator/pull/921)
+- build(deps): Bump vue from 3.4.3 to 3.4.4 in /ui/web [`#915`](https://github.com/sap/e-mobility-charging-stations-simulator/pull/915)
+- build(deps-dev): apply updates [`a223d9b`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a223d9be48ad8828e6aef060dd3c45d4f99ea9a9)
+- build(deps): apply updates [`aafba9d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/aafba9d8ca47c792cf4189c6594b45e1150e198d)
+- build(deps-dev): apply updates [`d360ae6`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/d360ae6e41017a4703051adf538bccd213b2857d)
+- refactor: improve types testing types definition [`5dc7c99`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/5dc7c990eff43659bd48589cfc5afe09f9ec6664)
+- build(deps-dev): apply updates [`f761ec2`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f761ec22b9274d1d017bb244db463a9474b881e5)
+- refactor: refine prettier configuration [`a974c8e`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a974c8e4b8a98c9450be49546a77be0d03e9f512)
+- refactor: cleanup nullish values handling [`f938317`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f938317f2902366a85a8f76de55ee51f1d4a662a)
+- build(deps): apply updates [`f0bede8`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f0bede86574750d1d894d16a86ef63f83948e7a0)
+- build(deps-dev): apply udpates [`dc29abc`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/dc29abc49d6de0daad76074be2cae1ab07440a3c)
+- refactor: use top level await in bundling code [`f36c247`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f36c2478a92ea04a096232c4060427438ad2cd79)
+- build(deps-dev): apply updates [`0b5c37b`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0b5c37bc7ec41b00eb1940ab8189ddf3a6ad2564)
+- build(deps-dev): apply updates [`ac1946e`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/ac1946e5ab0fe99c77c6cb72dc23fbe6880076d3)
+- refactor: update MikroORM entities definition [`43be4c0`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/43be4c0834fe806a68f99036805779f29058d74e)
+- build(deps-dev): apply updates [`29c1afe`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/29c1afe30ee15a978d85262852e41047bef4f5d0)
+- build(deps): apply udpates [`a6db51d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a6db51d4ce16e8c0eaffe9ad8101af6763f5995f)
+- refactor: cleanup MikroORM entities [`a8599ae`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a8599ae9ed113db82ee4857c7a660faca5ec7fb8)
+- refactor: rename cloneObject() -> clone() [`4061507`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/40615072ef972a19ec60372066d384f4e859a1c7)
+- refactor: prepare for MikroORM storage support [`789007b`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/789007bd09242370a9d3502da967deb414886504)
+- refactor: make storage init compliant with MikroORM 6 [`4ccf551`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/4ccf551d961ef001acef6fafe1165ad9b6dac4e3)
+- build(deps-dev): apply updates [`7274efb`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/7274efb72e3cef8204594d138c5cf092b3a4fc6e)
+- refactor: consistent arguments name in type utils [`bfcd3a8`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/bfcd3a878051b75b9ed43421fe872121c43175f7)
+- chore: update copyright years [`a19b897`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a19b897d3aa5cb0f12177a42d8168121ce6ada97)
+- fix: warn about reserved transaction started not found [`a095d7d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a095d7d7fc3f3e99d472b4c57f355414c5bcb852)
+- build(deps-dev): apply updates [`e595dd5`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/e595dd551f5293dc81422e03abcc6864c7f0ce31)
+- refactor: remove unneeded eslint-disable [`3423c8a`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/3423c8a57047b3da28558538712aca35611c8214)
+- fix: handle properly async performance storage [`be0a4d4`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/be0a4d4d8bd085fcfb86db9ad025de3f270bc31d)
+- build: add script to build MikroORM entities [`1552a66`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/1552a66625ca8840ce475d2393b5c251630adf00)
+- fix: ensure dates in ISO string format are properly converted to Date [`95dab6c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/95dab6cfb3e2de1f775f0a8648bccbc62c4a9214)
+- docs: improve configuration file documentation [`1021178`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/102117891a36935a7ea9df8514391e8bc7be7daf)
+- fix: update mikro-orm.config.ts template for version 6 [`d5f6469`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/d5f64697c0471d8f8873f97163fd15b2a2ceabf0)
+- refactor: silence linter [`b5977da`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/b5977da89e7a5d292b060c7af75802ee207eb2cc)
+- refactor: cleanup arguments namespace [`1e2ec4a`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/1e2ec4a6612809e178b5237bf6302562ba3c0512)
+- fix: fix nullish exception on boot notification handling [`01d2a2c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/01d2a2c71e1b235cd01ec53b2559b9fb99c67f4f)
+- fix: ensure convertToDate() convert null date to undefined [`79fd697`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/79fd697f69253d44e4b3df2b1edd7a73338d12b2)
+- docs: add missing evsesStatus section to configuration documentation [`0aa874c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0aa874ce92735af5e02a0f49ee17674ccc4a5689)
+- build(ci): use latest in node version matrix [`6dd374b`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/6dd374b27bcc17ead9622225dbc070d198c64f65)
+- refactor: cleanup eslint disablement rule [`0c1e4bc`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0c1e4bc1c3879a1379ea03e99fd021453e194511)
+- docs: update copyright year [`23f5af6`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/23f5af6d9db99172e15548e9f97c6d63e9a4ee57)
+- refactor: set CSs stop timeout to 60s [`98f5aa8`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/98f5aa8d9ce0cb1ba20fd6d703015907ce22b7d8)
+- fix: use MikroORM upsert [`70b73ed`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/70b73ed697936ef696b7b29691b7bdd6a9418251)
+- test: improve a bit isEmptyObject() coverage [`1c11470`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/1c1147036bb68c12685b2e182f910689646b3b11)
+- fix: ensure more date iso string are converted to Date [`48c7e1d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/48c7e1d6db4b3cbf82d17e191b2255066c462a71)
+- fix: fix nullish exception [`73b78a1`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/73b78a1f75b27bc503f90269690ad71b70f4f2eb)
+- Merge dependabot/npm_and_yarn/ui/web/types/node-20.10.8 into combined-prs-branch [`505937c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/505937c7f7d384f80631d5a3f211d621f8ff5751)
+- Merge dependabot/npm_and_yarn/types/node-20.10.8 into combined-prs-branch [`0c9f0f6`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0c9f0f67eb80d625536f4bc8a1cea58e00f35c2f)
+- refactor: switch eslint configuration to strict type checking [`5199f9f`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/5199f9fdf202eb534948f165a0994e1993675aa8)
+- refactor: cleanup type definition [`79534cc`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/79534cce02890e8fd936095cad0c1928d270b6f9)
+- build(deps-dev): apply updates [`f4e4680`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f4e468019d4ea226870ee22ef65dc4803b89816a)
+- build(deps): apply updates [`9dcbad0`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/9dcbad07234374104e859be21b51aa188cf0625b)
+- build(deps-dev): apply updates [`f0b146c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f0b146c517a1ee748bb973cc0e81391ae8085620)
+- build(deps-dev): apply udpates [`83f3e9b`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/83f3e9b1a6989662745109df50839dcac38995a8)
+- build(deps): apply updates [`47fd056`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/47fd05617d7e1c8eaaabc41b8e55e0a1d65ecdc8)
+- refactor: cleanup some unneeded conditions [`2466918`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/2466918c081644f9a1dc4722efbd002d7baf2925)
+- build(deps-dev): apply updates [`b534060`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/b534060f89e870eec91bfaab84a4ea6fc77ddd53)
+- build(deps): apply updates [`02d891d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/02d891dcc6de244bf1857dc64dbf2f173aac0228)
+- build(deps-dev): apply updates [`230f13e`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/230f13e33763a882c4ccaa2223fa5846419bb053)
+- build(deps): apply updates [`3a108cd`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/3a108cdde08c2ad2ba4b1b05376800b7463d0975)
+- fix: fix off-by-one in ATG statuses handling [`0a1dd74`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0a1dd746244cebb3633d88c6650839d9f32227fe)
+- fix: fix ATG connector statuses date handling [`6dde6c5`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/6dde6c5f02a9123001bafabbf3fa299d9d3b7797)
+- build(deps-dev): Bump @types/node from 20.10.7 to 20.10.8 [`80c22bf`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/80c22bf9efedb3618a5ce382770cf3e8b4c9985b)
+- build(deps-dev): Bump @types/node from 20.10.7 to 20.10.8 in /ui/web [`e1953d4`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/e1953d4a161071634ebddc74e75352236fda295b)
+- build(deps): apply updates [`81e2799`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/81e2799b378b3d06e292af082915a47712c0eac9)
+- fix: compute the ATG stop date only once [`0193fdd`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0193fdd350fa2b861631493bb2d3f857a69dda5f)
+- build(deps): apply updates [`93e1df4`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/93e1df46010b1f432ed5c3146746f592767b8592)
+- feat: add ATG absolute stop date support [`46a830d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/46a830d2173d93d4fc5e4bb46fb3591a27fb29dc)
+- Merge dependabot/npm_and_yarn/poolifier-3.1.17 into combined-prs-branch [`84d5469`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/84d546975604aac17662f55c0af4bf369b730c54)
+- Merge dependabot/npm_and_yarn/ui/web/jsdom-23.1.0 into combined-prs-branch [`68220b4`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/68220b423c52da387fdf41967dd8c738da0ff52e)
+- build(deps-dev): remove ts-standard [`40dc0c7`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/40dc0c793c4334410613e67fa30fc3a77d7bf794)
+- build(simulator): fix externals list [`48f1a85`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/48f1a85605fa89469daa124afb9566899d04020a)
+- build(deps-dev): Bump jsdom from 23.0.1 to 23.1.0 in /ui/web [`6f9618c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/6f9618c30217a9ddee12830fe5f77e6cabe7296e)
+- build(deps-dev): apply updates [`a39bdcf`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a39bdcf7a13dd1f04f1d5e88dec36280bf87337e)
+- refactor: cleanup a few unneeded type casting [`97608fb`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/97608fbd74bbcefe7733ab1a9f9612ae0811c438)
+- build(deps-dev): apply updates [`cebbf5a`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/cebbf5a854b7f34f47a1eecc081046779cab604d)
+- build(ui): add missing dependency [`ab48c1a`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/ab48c1ad333ac65f923664c910eedcf8902ec8ab)
+- build: fix mnemonist bundling as external [`a7d26b5`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a7d26b50a4e78fdad0da2f02c32b889fd82c94f0)
+- build(deps): Bump poolifier from 3.1.16 to 3.1.17 [`0d0bb80`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/0d0bb80a531679a6e324c18ccb8b8d44cc6bd4bb)
+- build(deps): apply updates [`8870264`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/88702641858698449f0388a3fae2d39367fe1c3a)
+- build: fix import error [`95e03ad`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/95e03ad147e276c61b03ab84902349dfe5084396)
+- fix: readd safety check in charging station log prefix helper [`41f1832`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/41f18326bd0c915a2390208ab1c1973cc6c82a6e)
+- fix: ensure graceful shutdown waits only for started stations stopping [`a01134e`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a01134ed215b62a0c82475b9fbb35306fa792bbc)
+- build: fix exports in package.json [`f3f0794`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f3f07945412554cf20e89be4022af5042a208a5d)
+- build: bump volta pnpm version [`fba1832`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/fba1832cd7a1b8ec29df9729ad8336377ca64a95)
+- refactor: code format cleanup [`77b4dcc`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/77b4dcc3d3fbd2148f2723df593cce10174e3358)
+- build: cleanup code extensions recommendation [`f255f33`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f255f33b39e91a28f149fc982dfae40209c56078)
+- build: cleanup recommended code extensions [`9eb0631`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/9eb06319c16ad498367e065c1399d7715367b1b0)
+- docs: add JS standard coding style badge [`b157a1d`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/b157a1dfa0d4cdf3298606b53e72e5c98104c7df)
+- build: cleanup bundling code [`3dfc5d5`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/3dfc5d5047e42a2d3e22ef4e6cc4739dbd127c3e)
+- refactor: cleanup bundling code [`7cfd426`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/7cfd4269447d562387125da081c83b5eaa7d63b8)
+
+## [v1.2.31](https://github.com/sap/e-mobility-charging-stations-simulator/compare/v1.2.30...v1.2.31) (2023-12-30)
- build(deps): Bump poolifier from 3.1.11 to 3.1.12 [`#908`](https://github.com/sap/e-mobility-charging-stations-simulator/pull/908)
- chore: switch coding style to JS standard [`66a7748`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/66a7748ddeda8c94d7562a1ce58d440319654a4c)
- refactor: remove isNullOrDefined() helper [`be9f397`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/be9f397bd55b221c24bacb110a64c21f012f36ab)
- fix: fix get composite schedule rejection condition [`a4385ed`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/a4385edc2344433c20fcb92d01cbe5a330b850b4)
- refactor: cleanup isNullOrdefined usage [`401fa92`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/401fa922baa555f5997732052918ae2ab5ff184c)
+- chore: version 1.2.31 [`62273e0`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/62273e049317c17cc485e0e9d9299bc47c3ecaf3)
- build: properly workaround Ajv TS type definitions bug [`f5a1ff8`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/f5a1ff8ce8f87a149791c2c98fe7c5e8a20b5392)
- fix: ensure configuration key visibility test does not alter configuration [`563e40c`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/563e40cecd34ed272e3c2610c11dc42d09384bf9)
- build(deps-dev): apply updates [`15af7ae`](https://github.com/sap/e-mobility-charging-stations-simulator/commit/15af7aeb4644fc37e8dcb35705d66e573f542615)
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2020 SAP SE or an SAP affiliate company
+ Copyright 2020-2024 SAP SE or an SAP affiliate company
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
The syntax is similar to charging station configuration template with some added fields like the charging station id (name) and the 'Configuration' section removed.
-#### configurationKey section
+That section is overwritten on matching charging station configuration template file changes.
-The syntax is similar to the charging station configuration template 'Configuration' section.
+#### connectorsStatus section
+
+The syntax is similar to charging station configuration template 'Connectors' section with some added fields.
+
+That section is overwritten on matching charging station configuration template file changes.
+
+#### evsesStatus section
+
+The syntax is similar to charging station configuration template 'Evses' section with some added fields.
+
+That section is overwritten on matching charging station configuration template file changes.
#### automaticTransactionGenerator section
The syntax is similar to the charging station configuration template 'AutomaticTransactionGenerator' section.
+That section is overwritten on matching charging station configuration template file changes.
+
+#### automaticTransactionGeneratorStatuses section
+
+That section is not overwritten on matching charging station configuration template file changes.
+
+#### configurationKey section
+
+The syntax is similar to the charging station configuration template 'Configuration' section.
+
+That section is not overwritten on matching charging station configuration template file changes.
+
## Docker
In the [docker](./docker) folder:
## Licensing
-Copyright 2020-2023 SAP SE or an SAP affiliate company and e-mobility-charging-stations-simulator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/e-mobility-charging-stations-simulator).
+Copyright 2020-2024 SAP SE or an SAP affiliate company and e-mobility-charging-stations-simulator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/e-mobility-charging-stations-simulator).
import { clean } from 'esbuild-plugin-clean'
import { copy } from 'esbuild-plugin-copy'
-;(async () => {
- const isDevelopmentBuild = env.BUILD === 'development'
- const sourcemap = !!isDevelopmentBuild
- console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`))
- console.time('Build time')
- await build({
- entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
- bundle: true,
- platform: 'node',
- format: 'esm',
- external: [
- '@mikro-orm/*',
- 'ajv',
- 'ajv-formats',
- 'basic-ftp',
- 'chalk',
- 'date-fns',
- 'http-status-codes',
- 'just-merge',
- 'logform',
- // 'mnemonist',
- 'mongodb',
- 'node:*',
- 'poolifier',
- 'tar',
- 'winston',
- 'winston/*',
- 'winston-daily-rotate-file',
- 'ws'
- ],
- minify: true,
- sourcemap,
- entryNames: '[name]',
- outdir: './dist',
- plugins: [
- clean({
- patterns: [
- './dist/*',
- '!./dist/assets',
- './dist/assets/*.json',
- './dist/assets/json-schemas',
- './dist/assets/station-templates',
- './dist/assets/ui-protocol'
- ]
- }),
- copy({
- assets: [
- {
- from: ['./src/assets/config.json'],
- to: ['./assets']
- },
- {
- from: ['./src/assets/idtags!(-template)*.json'],
- to: ['./assets']
- },
- {
- from: ['./src/assets/json-schemas/**/*.json'],
- to: ['./assets/json-schemas']
- },
- {
- from: ['./src/assets/station-templates/**/*.json'],
- to: ['./assets/station-templates']
- }
- ]
- })
- ]
- })
- console.timeEnd('Build time')
-})()
+const isDevelopmentBuild = env.BUILD === 'development'
+const sourcemap = !!isDevelopmentBuild
+console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`))
+console.time('Build time')
+await build({
+ entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
+ bundle: true,
+ platform: 'node',
+ format: 'esm',
+ external: [
+ '@mikro-orm/*',
+ 'ajv',
+ 'ajv-formats',
+ 'basic-ftp',
+ 'chalk',
+ 'date-fns',
+ 'http-status-codes',
+ 'just-merge',
+ 'logform',
+ // 'mnemonist',
+ 'mongodb',
+ 'node:*',
+ 'poolifier',
+ 'tar',
+ 'winston',
+ 'winston/*',
+ 'winston-daily-rotate-file',
+ 'ws'
+ ],
+ minify: true,
+ sourcemap,
+ entryNames: '[name]',
+ outdir: './dist',
+ plugins: [
+ clean({
+ patterns: [
+ './dist/*',
+ '!./dist/assets',
+ './dist/assets/*.json',
+ './dist/assets/json-schemas',
+ './dist/assets/station-templates',
+ './dist/assets/ui-protocol'
+ ]
+ }),
+ copy({
+ assets: [
+ {
+ from: ['./src/assets/config.json'],
+ to: ['./assets']
+ },
+ {
+ from: ['./src/assets/idtags!(-template)*.json'],
+ to: ['./assets']
+ },
+ {
+ from: ['./src/assets/json-schemas/**/*.json'],
+ to: ['./assets/json-schemas']
+ },
+ {
+ from: ['./src/assets/station-templates/**/*.json'],
+ to: ['./assets/station-templates']
+ }
+ ]
+ })
+ ]
+})
+console.timeEnd('Build time')
-import { dirname, join } from 'node:path'
-import { fileURLToPath } from 'node:url'
+import { defineConfig } from '@mikro-orm/sqlite'
-import { TsMorphMetadataProvider } from '@mikro-orm/reflection'
-
-import { PerformanceData, PerformanceRecord } from './src/types/index.js'
import { Constants } from './src/utils/index.js'
-export default {
- metadataProvider: TsMorphMetadataProvider,
- entities: [PerformanceRecord, PerformanceData],
- type: 'sqlite',
- clientUrl: `file://${join(
- dirname(fileURLToPath(import.meta.url)),
- `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`
- )}`
-}
+export default defineConfig({
+ dbName: `${Constants.DEFAULT_PERFORMANCE_DIRECTORY}/${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`,
+ entities: ['./dist/types/orm/entities/*.js'],
+ entitiesTs: ['./src/types/orm/entities/*.ts'],
+ debug: true
+})
{
"$schema": "https://json.schemastore.org/package",
"name": "e-mobility-charging-stations-simulator",
- "version": "1.2.31",
+ "version": "1.2.32",
"engines": {
"node": ">=18.18.0",
"pnpm": ">=8.6.0"
},
"volta": {
- "node": "20.10.0",
- "pnpm": "8.14.0"
+ "node": "20.11.0",
+ "pnpm": "8.14.1"
},
"repository": {
"type": "git",
"compareUrl": "https://github.com/sap/e-mobility-charging-stations-simulator/compare/{from}...{to}"
},
"mikro-orm": {
- "tsConfigPath": "./tsconfig-orm.json",
+ "tsConfigPath": "./tsconfig-mikro-orm.json",
"useTsNode": true
},
"scripts": {
"build:dev": "cross-env BUILD=development pnpm esbuild",
"build:cf": "pnpm clean:node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm build",
"build:cf:dev": "pnpm clean:node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm build:dev",
+ "build:entities": "tsc -p tsconfig-mikro-orm.json",
"clean:dist": "npx rimraf dist",
"clean:node_modules": "npx rimraf node_modules",
"lint": "cross-env TIMING=1 eslint --cache src tests .eslintrc.cjs bundle.js mikro-orm.config-template.ts",
}
},
"dependencies": {
- "@mikro-orm/core": "^6.0.1",
- "@mikro-orm/mariadb": "^6.0.1",
- "@mikro-orm/reflection": "^6.0.1",
- "@mikro-orm/sqlite": "^6.0.1",
+ "@mikro-orm/core": "^6.0.4",
+ "@mikro-orm/mariadb": "^6.0.4",
+ "@mikro-orm/reflection": "^6.0.4",
+ "@mikro-orm/sqlite": "^6.0.4",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"basic-ftp": "^5.0.4",
"logform": "^2.6.0",
"mnemonist": "^0.39.7",
"mongodb": "^6.3.0",
- "poolifier": "^3.1.18",
+ "poolifier": "^3.1.19",
"tar": "^6.2.0",
- "tslib": "^2.6.2",
"winston": "^3.11.0",
"winston-daily-rotate-file": "^4.7.1",
"ws": "^8.16.0"
"devDependencies": {
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
- "@mikro-orm/cli": "^6.0.1",
+ "@mikro-orm/cli": "^6.0.4",
"@release-it/bumper": "^6.0.1",
- "@types/node": "^20.10.8",
+ "@types/node": "^20.11.5",
"@types/tar": "^6.1.10",
"@types/ws": "^8.5.10",
- "@typescript-eslint/eslint-plugin": "^6.18.1",
- "@typescript-eslint/parser": "^6.18.1",
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
+ "@typescript-eslint/parser": "^6.19.0",
"auto-changelog": "^2.4.0",
- "c8": "^9.0.0",
+ "c8": "^9.1.0",
"clinic": "^13.0.0",
"cross-env": "^7.0.3",
"esbuild": "^0.19.11",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-n": "^16.6.2",
- "eslint-plugin-prettier": "^5.1.2",
+ "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"expect": "^29.7.0",
"glob": "^10.3.10",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
- "prettier": "^3.1.1",
+ "prettier": "^3.2.4",
"release-it": "^17.0.1",
"rimraf": "^5.0.5",
"semver": "^7.5.4",
dependencies:
'@mikro-orm/core':
- specifier: ^6.0.1
- version: 6.0.1
+ specifier: ^6.0.4
+ version: 6.0.4
'@mikro-orm/mariadb':
- specifier: ^6.0.1
- version: 6.0.1(@mikro-orm/core@6.0.1)
+ specifier: ^6.0.4
+ version: 6.0.4(@mikro-orm/core@6.0.4)
'@mikro-orm/reflection':
- specifier: ^6.0.1
- version: 6.0.1(@mikro-orm/core@6.0.1)
+ specifier: ^6.0.4
+ version: 6.0.4(@mikro-orm/core@6.0.4)
'@mikro-orm/sqlite':
- specifier: ^6.0.1
- version: 6.0.1(@mikro-orm/core@6.0.1)
+ specifier: ^6.0.4
+ version: 6.0.4(@mikro-orm/core@6.0.4)
ajv:
specifier: ^8.12.0
version: 8.12.0
specifier: ^6.3.0
version: 6.3.0
poolifier:
- specifier: ^3.1.18
- version: 3.1.18
+ specifier: ^3.1.19
+ version: 3.1.19
tar:
specifier: ^6.2.0
version: 6.2.0
- tslib:
- specifier: ^2.6.2
- version: 2.6.2
winston:
specifier: ^3.11.0
version: 3.11.0
devDependencies:
'@commitlint/cli':
specifier: ^18.4.4
- version: 18.4.4(@types/node@20.10.8)(typescript@5.3.3)
+ version: 18.4.4(@types/node@20.11.5)(typescript@5.3.3)
'@commitlint/config-conventional':
specifier: ^18.4.4
version: 18.4.4
'@mikro-orm/cli':
- specifier: ^6.0.1
- version: 6.0.1
+ specifier: ^6.0.4
+ version: 6.0.4
'@release-it/bumper':
specifier: ^6.0.1
version: 6.0.1(release-it@17.0.1)
'@types/node':
- specifier: ^20.10.8
- version: 20.10.8
+ specifier: ^20.11.5
+ version: 20.11.5
'@types/tar':
specifier: ^6.1.10
version: 6.1.10
specifier: ^8.5.10
version: 8.5.10
'@typescript-eslint/eslint-plugin':
- specifier: ^6.18.1
- version: 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3)
+ specifier: ^6.19.0
+ version: 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/parser':
- specifier: ^6.18.1
- version: 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ specifier: ^6.19.0
+ version: 6.19.0(eslint@8.56.0)(typescript@5.3.3)
auto-changelog:
specifier: ^2.4.0
version: 2.4.0
c8:
- specifier: ^9.0.0
- version: 9.0.0
+ specifier: ^9.1.0
+ version: 9.1.0
clinic:
specifier: ^13.0.0
version: 13.0.0
version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
eslint-config-standard-with-typescript:
specifier: ^43.0.0
- version: 43.0.0(@typescript-eslint/eslint-plugin@6.18.1)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
+ version: 43.0.0(@typescript-eslint/eslint-plugin@6.19.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
eslint-define-config:
specifier: ^2.1.0
version: 2.1.0
eslint-import-resolver-typescript:
specifier: ^3.6.1
- version: 3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
+ version: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
eslint-plugin-import:
specifier: ^2.29.1
- version: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ version: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-jsdoc:
specifier: ^48.0.2
version: 48.0.2(eslint@8.56.0)
specifier: ^16.6.2
version: 16.6.2(eslint@8.56.0)
eslint-plugin-prettier:
- specifier: ^5.1.2
- version: 5.1.2(eslint@8.56.0)(prettier@3.1.1)
+ specifier: ^5.1.3
+ version: 5.1.3(eslint@8.56.0)(prettier@3.2.4)
eslint-plugin-tsdoc:
specifier: ^0.2.17
version: 0.2.17
specifier: ^15.2.0
version: 15.2.0
prettier:
- specifier: ^3.1.1
- version: 3.1.1
+ specifier: ^3.2.4
+ version: 3.2.4
release-it:
specifier: ^17.0.1
version: 17.0.1(typescript@5.3.3)
version: 7.5.4
ts-node:
specifier: ^10.9.2
- version: 10.9.2(@types/node@20.10.8)(typescript@5.3.3)
+ version: 10.9.2(@types/node@20.11.5)(typescript@5.3.3)
tsx:
specifier: ^4.7.0
version: 4.7.0
engines: {node: '>=0.1.90'}
dev: false
- /@commitlint/cli@18.4.4(@types/node@20.10.8)(typescript@5.3.3):
+ /@commitlint/cli@18.4.4(@types/node@20.11.5)(typescript@5.3.3):
resolution: {integrity: sha512-Ro3wIo//fV3XiV1EkdpHog6huaEyNcUAVrSmtgKqYM5g982wOWmP4FXvEDFwRMVgz878CNBvvCc33dMZ5AQJ/g==}
engines: {node: '>=v18'}
hasBin: true
dependencies:
'@commitlint/format': 18.4.4
'@commitlint/lint': 18.4.4
- '@commitlint/load': 18.4.4(@types/node@20.10.8)(typescript@5.3.3)
+ '@commitlint/load': 18.4.4(@types/node@20.11.5)(typescript@5.3.3)
'@commitlint/read': 18.4.4
'@commitlint/types': 18.4.4
execa: 5.1.1
'@commitlint/types': 18.4.4
dev: true
- /@commitlint/load@18.4.4(@types/node@20.10.8)(typescript@5.3.3):
+ /@commitlint/load@18.4.4(@types/node@20.11.5)(typescript@5.3.3):
resolution: {integrity: sha512-RaDIa9qwOw2xRJ3Jr2DBXd14rmnHJIX2XdZF4kmoF1rgsg/+7cvrExLSUNAkQUNimyjCn1b/bKX2Omm+GdY0XQ==}
engines: {node: '>=v18'}
dependencies:
'@commitlint/types': 18.4.4
chalk: 4.1.2
cosmiconfig: 8.3.6(typescript@5.3.3)
- cosmiconfig-typescript-loader: 5.0.0(@types/node@20.10.8)(cosmiconfig@8.3.6)(typescript@5.3.3)
+ cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.5)(cosmiconfig@8.3.6)(typescript@5.3.3)
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
requiresBuild: true
optional: true
- /@humanwhocodes/config-array@0.11.13:
- resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
+ /@humanwhocodes/config-array@0.11.14:
+ resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
engines: {node: '>=10.10.0'}
dependencies:
- '@humanwhocodes/object-schema': 2.0.1
+ '@humanwhocodes/object-schema': 2.0.2
debug: 4.3.4
minimatch: 3.1.2
transitivePeerDependencies:
engines: {node: '>=12.22'}
dev: true
- /@humanwhocodes/object-schema@2.0.1:
- resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==}
+ /@humanwhocodes/object-schema@2.0.2:
+ resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==}
dev: true
/@iarna/toml@2.2.5:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
'@types/yargs': 17.0.32
chalk: 4.1.2
dev: true
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
dev: true
- /@jridgewell/trace-mapping@0.3.20:
- resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==}
+ /@jridgewell/trace-mapping@0.3.21:
+ resolution: {integrity: sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==}
dev: true
- /@mikro-orm/cli@6.0.1:
- resolution: {integrity: sha512-kZKv+Kx0gudSPfij7W4gOI/zgo7CERkHyKn6L6aoqsGD7Qsrz5cTAnFsfNHfmxg4uL3rU8XZYY5HfuoH/8HUbw==}
+ /@mikro-orm/cli@6.0.4:
+ resolution: {integrity: sha512-uqDM66Hg+a/f/InUzNwAh836wJn0ZLMqbc/8M9dAmgx0l5xY271zm5TRe+hogvYUyy/6mzQEx8Di5aN8+FJHhw==}
engines: {node: '>= 18.12.0'}
hasBin: true
dependencies:
'@jercle/yargonaut': 1.1.5
- '@mikro-orm/core': 6.0.1
- '@mikro-orm/knex': 6.0.1(@mikro-orm/core@6.0.1)(sqlite3@5.1.7)
+ '@mikro-orm/core': 6.0.4
+ '@mikro-orm/knex': 6.0.4(@mikro-orm/core@6.0.4)(sqlite3@5.1.7)
fs-extra: 11.2.0
tsconfig-paths: 4.2.0
yargs: 17.7.2
- tedious
dev: true
- /@mikro-orm/core@6.0.1:
- resolution: {integrity: sha512-c2UvSprTdRoL78nGIhY/itnRTmOFInUpvt55V/6NKiMxkEFuxmJggxPUxelTBa4a8BaLREYCqzYlrvzR/CPGRQ==}
+ /@mikro-orm/core@6.0.4:
+ resolution: {integrity: sha512-Kjrs5TPHEhh5sOjOa7kAy56aury03Xw6pPU/gE81gipGq4fNNUJAjYn3aC/9JVxVsZ/oB2eiqKsBSs4Gyvu9iw==}
engines: {node: '>= 18.12.0'}
dependencies:
dataloader: 2.2.2
esprima: 4.0.1
fs-extra: 11.2.0
globby: 11.1.0
- mikro-orm: 6.0.1
+ mikro-orm: 6.0.4
reflect-metadata: 0.2.1
- /@mikro-orm/knex@6.0.1(@mikro-orm/core@6.0.1)(sqlite3@5.1.7):
- resolution: {integrity: sha512-ehDvU+0OPvfSvJqVIfmLWMEeWrR4ukkrok9cyJpUXOtBt+bWXKyISMLfQWqiHq2M9E7aYl7S1HCkERs+AK4OFw==}
+ /@mikro-orm/knex@6.0.4(@mikro-orm/core@6.0.4)(sqlite3@5.1.7):
+ resolution: {integrity: sha512-OoNk6M4S7ZK+h1uOe6dk6dbdCxxOXnVcwRr9a+zspn/yz/zOxt3dqQlburEXevhbNDl4U/h99BWYQ9Jw1zPrjQ==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@mikro-orm/core': ^6.0.0
dependencies:
- '@mikro-orm/core': 6.0.1
+ '@mikro-orm/core': 6.0.4
fs-extra: 11.2.0
knex: 3.1.0(sqlite3@5.1.7)
sqlstring: 2.3.3
- supports-color
- tedious
- /@mikro-orm/mariadb@6.0.1(@mikro-orm/core@6.0.1):
- resolution: {integrity: sha512-lQZoO6plqP9ASBkTTeVLF+YA+hWJikcAS14UV41WrOHPlblmdj74CW07llc1XuWBwXNUyobw0f6J2Rt6x6kE5A==}
+ /@mikro-orm/mariadb@6.0.4(@mikro-orm/core@6.0.4):
+ resolution: {integrity: sha512-SFa1xg2shfmiLxLkCBtFsQaqdjtkIoWEryFSLusEAM7CPtIO3IgRDYQZBBjWVgTsuZ1DKkArA60nVXVwzB3fcw==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@mikro-orm/core': ^6.0.0
dependencies:
- '@mikro-orm/core': 6.0.1
- '@mikro-orm/knex': 6.0.1(@mikro-orm/core@6.0.1)(sqlite3@5.1.7)
+ '@mikro-orm/core': 6.0.4
+ '@mikro-orm/knex': 6.0.4(@mikro-orm/core@6.0.4)(sqlite3@5.1.7)
mariadb: 2.5.6
transitivePeerDependencies:
- better-sqlite3
- tedious
dev: false
- /@mikro-orm/reflection@6.0.1(@mikro-orm/core@6.0.1):
- resolution: {integrity: sha512-6YAGgLy/Mct1/uYmdeE2Ot9Kf41TZ/cMyQgvbDUwkhiTPOPChkxQKdDLuxYPQtrKg7uvHz1HTZBH7vogL8R4xA==}
+ /@mikro-orm/reflection@6.0.4(@mikro-orm/core@6.0.4):
+ resolution: {integrity: sha512-eDAVoSUrAQVsTVGB7IUmD3fHZrsk3fJbdk/9mAvCDCJrzG+G/Ng9TfHOdUCgH35Wzj1u6zxuftmYV7dnogKvaA==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@mikro-orm/core': ^6.0.0
dependencies:
- '@mikro-orm/core': 6.0.1
+ '@mikro-orm/core': 6.0.4
globby: 11.1.0
ts-morph: 21.0.1
dev: false
- /@mikro-orm/sqlite@6.0.1(@mikro-orm/core@6.0.1):
- resolution: {integrity: sha512-zUimvY201x8rAkucaK/+faWNeXTeE+k1JyKC15b9Zkl+PGjlQ+0AN/vx1tZZvO7rEHx+LWtzLErg6lTT3b0Ltw==}
+ /@mikro-orm/sqlite@6.0.4(@mikro-orm/core@6.0.4):
+ resolution: {integrity: sha512-gG+OWKY1rI/YTeAn5JGZlhA9PQ3NsAsp+zOLFOedvmNF8dK3cBZJV3TqCzKPYi/plVQH+dwxo1T4ZDORpt+3sg==}
engines: {node: '>= 18.12.0'}
peerDependencies:
'@mikro-orm/core': ^6.0.0
dependencies:
- '@mikro-orm/core': 6.0.1
- '@mikro-orm/knex': 6.0.1(@mikro-orm/core@6.0.1)(sqlite3@5.1.7)
+ '@mikro-orm/core': 6.0.4
+ '@mikro-orm/knex': 6.0.4(@mikro-orm/core@6.0.4)(sqlite3@5.1.7)
fs-extra: 11.2.0
sqlite3: 5.1.7
sqlstring-sqlite: 0.1.1
- tedious
dev: false
- /@mongodb-js/saslprep@1.1.3:
- resolution: {integrity: sha512-SyCxhJfmK6MoLNV5SbDpNdUy9SDv5H7y9/9rl3KpnwgTHWuNNMc87zWqbcIZXNWY+aUjxLGLEcvHoLagG4tWCg==}
+ /@mongodb-js/saslprep@1.1.4:
+ resolution: {integrity: sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==}
requiresBuild: true
dependencies:
sparse-bitfield: 3.0.3
dev: true
optional: true
- /@pkgr/core@0.1.0:
- resolution: {integrity: sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==}
+ /@pkgr/core@0.1.1:
+ resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
dev: true
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
dev: false
- /@types/node@20.10.8:
- resolution: {integrity: sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA==}
+ /@types/node@20.11.5:
+ resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==}
dependencies:
undici-types: 5.26.5
dev: true
/@types/tar@6.1.10:
resolution: {integrity: sha512-60ZO+W0tRKJ3ggdzJKp75xKVlNogKYMqGvr2bMH/+k3T0BagfYTnbmVDFMJB1BFttz6yRgP5MDGP27eh7brrqw==}
dependencies:
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
minipass: 4.2.8
dev: true
resolution: {integrity: sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==}
dev: false
- /@types/whatwg-url@11.0.3:
- resolution: {integrity: sha512-z1ELvMijRL1QmU7QuzDkeYXSF2+dXI0ITKoQsIoVKcNBOiK5RMmWy+pYYxJTHFt8vkpZe7UsvRErQwcxZkjoUw==}
+ /@types/whatwg-url@11.0.4:
+ resolution: {integrity: sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==}
dependencies:
'@types/webidl-conversions': 7.0.3
dev: false
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
dev: true
/@types/yargs-parser@21.0.3:
'@types/yargs-parser': 21.0.3
dev: true
- /@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA==}
+ /@typescript-eslint/eslint-plugin@6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
optional: true
dependencies:
'@eslint-community/regexpp': 4.10.0
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/type-utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/type-utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
graphemer: 1.4.0
- supports-color
dev: true
- /@typescript-eslint/parser@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==}
+ /@typescript-eslint/parser@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
typescript: 5.3.3
- supports-color
dev: true
- /@typescript-eslint/scope-manager@6.18.1:
- resolution: {integrity: sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==}
+ /@typescript-eslint/scope-manager@6.19.0:
+ resolution: {integrity: sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
dev: true
- /@typescript-eslint/type-utils@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q==}
+ /@typescript-eslint/type-utils@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
- '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
+ '@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
debug: 4.3.4
eslint: 8.56.0
ts-api-utils: 1.0.3(typescript@5.3.3)
- supports-color
dev: true
- /@typescript-eslint/types@6.18.1:
- resolution: {integrity: sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==}
+ /@typescript-eslint/types@6.19.0:
+ resolution: {integrity: sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
- /@typescript-eslint/typescript-estree@6.18.1(typescript@5.3.3):
- resolution: {integrity: sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA==}
+ /@typescript-eslint/typescript-estree@6.19.0(typescript@5.3.3):
+ resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
- supports-color
dev: true
- /@typescript-eslint/utils@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ==}
+ /@typescript-eslint/utils@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@types/json-schema': 7.0.15
'@types/semver': 7.5.6
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
eslint: 8.56.0
semver: 7.5.4
transitivePeerDependencies:
- typescript
dev: true
- /@typescript-eslint/visitor-keys@6.18.1:
- resolution: {integrity: sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==}
+ /@typescript-eslint/visitor-keys@6.19.0:
+ resolution: {integrity: sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.18.1
+ '@typescript-eslint/types': 6.19.0
eslint-visitor-keys: 3.4.3
dev: true
engines: {node: '>=0.4.0'}
dev: true
- /acorn-walk@8.3.1:
- resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==}
+ /acorn-walk@8.3.2:
+ resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
engines: {node: '>=0.4.0'}
dev: true
run-applescript: 5.0.0
dev: true
- /c8@9.0.0:
- resolution: {integrity: sha512-nFJhU2Cz6Frh2awk3IW7wwk3wx27/U2v8ojQCHGc1GWTCHS6aMu4lal327/ZnnYj7oSThGF1X3qUP1yzAJBcOQ==}
+ /c8@9.1.0:
+ resolution: {integrity: sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==}
engines: {node: '>=14.14.0'}
hasBin: true
dependencies:
dependencies:
function-bind: 1.1.2
get-intrinsic: 1.2.2
- set-function-length: 1.1.1
+ set-function-length: 1.2.0
dev: true
/callsites@3.1.0:
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
dev: true
- /cosmiconfig-typescript-loader@5.0.0(@types/node@20.10.8)(cosmiconfig@8.3.6)(typescript@5.3.3):
+ /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.5)(cosmiconfig@8.3.6)(typescript@5.3.3):
resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==}
engines: {node: '>=v16'}
peerDependencies:
cosmiconfig: '>=8.2'
typescript: '>=4'
dependencies:
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
cosmiconfig: 8.3.6(typescript@5.3.3)
jiti: 1.21.0
typescript: 5.3.3
end-of-stream: 1.4.4
inherits: 2.0.4
readable-stream: 3.6.2
- stream-shift: 1.0.1
+ stream-shift: 1.0.2
dev: true
/eastasianwidth@0.2.0:
object-keys: 1.1.1
object.assign: 4.1.5
regexp.prototype.flags: 1.5.1
- safe-array-concat: 1.0.1
- safe-regex-test: 1.0.0
+ safe-array-concat: 1.1.0
+ safe-regex-test: 1.0.2
string.prototype.trim: 1.2.8
string.prototype.trimend: 1.0.7
string.prototype.trimstart: 1.0.7
eslint: 8.56.0
dev: true
- /eslint-config-standard-with-typescript@43.0.0(@typescript-eslint/eslint-plugin@6.18.1)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3):
+ /eslint-config-standard-with-typescript@43.0.0(@typescript-eslint/eslint-plugin@6.19.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-AT0qK01M5bmsWiE3UZvaQO5da1y1n6uQckAKqGNe6zPW5IOzgMLXZxw77nnFm+C11nxAZXsCPrbsgJhSrGfX6Q==}
peerDependencies:
'@typescript-eslint/eslint-plugin': ^6.4.0
eslint-plugin-promise: ^6.0.0
typescript: '*'
dependencies:
- '@typescript-eslint/eslint-plugin': 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
eslint: 8.56.0
eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-n: 16.6.2(eslint@8.56.0)
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
typescript: 5.3.3
eslint-plugin-promise: ^6.0.0
dependencies:
eslint: 8.56.0
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-n: 16.6.2(eslint@8.56.0)
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
dev: true
- supports-color
dev: true
- /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
+ /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
debug: 4.3.4
enhanced-resolve: 5.15.0
eslint: 8.56.0
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.2
is-core-module: 2.13.1
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
debug: 3.2.7
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
+ eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
transitivePeerDependencies:
- supports-color
dev: true
eslint-compat-utils: 0.1.2(eslint@8.56.0)
dev: true
- /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
+ /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
array-includes: 3.1.7
array.prototype.findlastindex: 1.2.3
array.prototype.flat: 1.3.2
doctrine: 2.1.0
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
hasown: 2.0.0
is-core-module: 2.13.1
is-glob: 4.0.3
semver: 7.5.4
dev: true
- /eslint-plugin-prettier@5.1.2(eslint@8.56.0)(prettier@3.1.1):
- resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
+ /eslint-plugin-prettier@5.1.3(eslint@8.56.0)(prettier@3.2.4):
+ resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
'@types/eslint': '>=8.0.0'
optional: true
dependencies:
eslint: 8.56.0
- prettier: 3.1.1
+ prettier: 3.2.4
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
dev: true
'@eslint-community/regexpp': 4.10.0
'@eslint/eslintrc': 2.1.4
'@eslint/js': 8.56.0
- '@humanwhocodes/config-array': 0.11.13
+ '@humanwhocodes/config-array': 0.11.14
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
'@ungap/structured-clone': 1.2.0
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.6.3
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
braces: 3.0.2
picomatch: 2.3.1
- /mikro-orm@6.0.1:
- resolution: {integrity: sha512-IoVaKs6Ch57K/J7HjL26/AhgehF4GHo7j5l4zNTw3naJ54TJ6pGAtZmdwxdgqv1rHNTA99xTCQ6WXNe3hQpIsw==}
+ /mikro-orm@6.0.4:
+ resolution: {integrity: sha512-rhC9PJ6rhfOoBQgnVpC+3GeeILQf0cfU1mSZHA+74FjpurfrznS5AZmuTxSKBnfjpMzrPoTOOwMwQC6DE7aVaQ==}
engines: {node: '>= 18.12.0'}
/miller-rabin@4.0.1:
/mongodb-connection-string-url@3.0.0:
resolution: {integrity: sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==}
dependencies:
- '@types/whatwg-url': 11.0.3
+ '@types/whatwg-url': 11.0.4
whatwg-url: 13.0.0
dev: false
socks:
optional: true
dependencies:
- '@mongodb-js/saslprep': 1.1.3
+ '@mongodb-js/saslprep': 1.1.4
bson: 6.2.0
mongodb-connection-string-url: 3.0.0
dev: false
semver-compare: 1.0.0
dev: false
- /poolifier@3.1.18:
- resolution: {integrity: sha512-g+TtkVp5oOOZAa1ibTJBOksstPiAp+jAsHMaQMR6TxIVFm4uqpifGCI2qXonBU1p5WIZbVU+kpk9S3bbyCeHCw==}
+ /poolifier@3.1.19:
+ resolution: {integrity: sha512-H/tg/7FNLdZvL0vkJLy2hkjVQWp7QYaDJ0/lJbb4m1ZDtEhOQ4sKsQLlGGI4+jjyWqFlfieqP7FmJC98r4wWyw==}
engines: {node: '>=18.0.0', pnpm: '>=8.6.0'}
requiresBuild: true
dev: false
fast-diff: 1.3.0
dev: true
- /prettier@3.1.1:
- resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==}
+ /prettier@3.2.4:
+ resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==}
engines: {node: '>=14'}
hasBin: true
dev: true
tslib: 2.6.2
dev: true
- /safe-array-concat@1.0.1:
- resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==}
+ /safe-array-concat@1.1.0:
+ resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==}
engines: {node: '>=0.4'}
dependencies:
call-bind: 1.0.5
/safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
- /safe-regex-test@1.0.0:
- resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
+ /safe-regex-test@1.0.2:
+ resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==}
+ engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
get-intrinsic: 1.2.2
/set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
- /set-function-length@1.1.1:
- resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==}
+ /set-function-length@1.2.0:
+ resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==}
engines: {node: '>= 0.4'}
dependencies:
define-data-property: 1.1.1
+ function-bind: 1.1.2
get-intrinsic: 1.2.2
gopd: 1.0.1
has-property-descriptors: 1.0.1
xtend: 4.0.2
dev: true
- /stream-shift@1.0.1:
- resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==}
+ /stream-shift@1.0.2:
+ resolution: {integrity: sha512-rV4Bovi9xx0BFzOb/X0B2GqoIjvqPCttZdu0Wgtx2Dxkj7ETyWl9gmqJ4EutWRLvtZWm8dxE+InQZX1IryZn/w==}
dev: true
/stream-splicer@2.0.1:
resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
engines: {node: ^14.18.0 || >=16.0.0}
dependencies:
- '@pkgr/core': 0.1.0
+ '@pkgr/core': 0.1.1
tslib: 2.6.2
dev: true
code-block-writer: 12.0.0
dev: false
- /ts-node@10.9.2(@types/node@20.10.8)(typescript@5.3.3):
+ /ts-node@10.9.2(@types/node@20.11.5)(typescript@5.3.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
acorn: 8.11.3
- acorn-walk: 8.3.1
+ acorn-walk: 8.3.2
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
+ dev: true
/tsx@4.7.0:
resolution: {integrity: sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==}
resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==}
engines: {node: '>=10.12.0'}
dependencies:
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.21
'@types/istanbul-lib-coverage': 2.0.6
convert-source-map: 2.0.0
dev: true
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=e-mobility-charging-stations-simulator
-sonar.projectVersion=1.2.31
+sonar.projectVersion=1.2.32
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=src
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns'
} from '../types/index.js'
import {
Constants,
- cloneObject,
+ clone,
convertToDate,
formatDurationMilliSeconds,
getRandomInteger,
- isValidTime,
+ isValidDate,
logPrefix,
logger,
secureRandom,
)
)
logger.info(
- `${this.logPrefix(
- connectorId
- )} transaction started with id ${this.chargingStation.getConnectorStatus(connectorId)
- ?.transactionId} and will stop in ${formatDurationMilliSeconds(waitTrxEnd)}`
+ `${this.logPrefix(connectorId)} transaction started with id ${
+ this.chargingStation.getConnectorStatus(connectorId)?.transactionId
+ } and will stop in ${formatDurationMilliSeconds(waitTrxEnd)}`
)
await sleep(waitTrxEnd)
await this.stopTransaction(connectorId)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
++this.connectorsStatus.get(connectorId)!.skippedTransactions
logger.info(
- `${this.logPrefix(connectorId)} skipped consecutively ${this.connectorsStatus.get(
- connectorId
- )?.skippedConsecutiveTransactions}/${this.connectorsStatus.get(connectorId)
- ?.skippedTransactions} transaction(s)`
+ `${this.logPrefix(connectorId)} skipped consecutively ${
+ this.connectorsStatus.get(connectorId)?.skippedConsecutiveTransactions
+ }/${this.connectorsStatus.get(connectorId)?.skippedTransactions} transaction(s)`
)
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStation.getAutomaticTransactionGeneratorConfiguration()?.stopAbsoluteDuration ===
false ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- !isValidTime(this.connectorsStatus.get(connectorId)!.stopDate)
+ !isValidDate(this.connectorsStatus.get(connectorId)!.stopDate)
) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.connectorsStatus.get(connectorId)!.stopDate = new Date(
private getConnectorStatus (connectorId: number): Status {
const connectorStatus =
this.chargingStation.getAutomaticTransactionGeneratorStatuses()?.[connectorId - 1] != null
- ? cloneObject<Status>(
+ ? clone<Status>(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStation.getAutomaticTransactionGeneratorStatuses()![connectorId - 1]
)
: undefined
if (connectorStatus != null) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.startDate = convertToDate(connectorStatus.startDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.lastRunDate = convertToDate(connectorStatus.lastRunDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.stopDate = convertToDate(connectorStatus.stopDate)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus.stoppedDate = convertToDate(connectorStatus.stoppedDate)!
+ connectorStatus.startDate = convertToDate(connectorStatus.startDate)
+ connectorStatus.lastRunDate = convertToDate(connectorStatus.lastRunDate)
+ connectorStatus.stopDate = convertToDate(connectorStatus.stopDate)
+ connectorStatus.stoppedDate = convertToDate(connectorStatus.stoppedDate)
if (
!this.started &&
(connectorStatus.start ||
let stopResponse: StopTransactionResponse | undefined
if (this.chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
logger.info(
- `${this.logPrefix(
- connectorId
- )} stop transaction with id ${this.chargingStation.getConnectorStatus(connectorId)
- ?.transactionId}`
+ `${this.logPrefix(connectorId)} stop transaction with id ${
+ this.chargingStation.getConnectorStatus(connectorId)?.transactionId
+ }`
)
stopResponse = await this.chargingStation.stopTransactionOnConnector(connectorId, reason)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { EventEmitter } from 'node:events'
import { dirname, extname, join } from 'node:path'
generateUUID,
handleUncaughtException,
handleUnhandledRejection,
+ isAsyncFunction,
isNotEmptyArray,
logPrefix,
logger
succeeded = 0,
missingChargingStationsConfiguration = 1,
noChargingStationTemplates = 2,
- gracefulShutdownError = 3,
+ gracefulShutdownError = 3
}
export class Bootstrap extends EventEmitter {
}
private readonly workerEventPerformanceStatistics = (data: Statistics): void => {
- this.storage?.storePerformanceStatistics(data) as undefined
+ // eslint-disable-next-line @typescript-eslint/unbound-method
+ if (isAsyncFunction(this.storage?.storePerformanceStatistics)) {
+ (
+ this.storage.storePerformanceStatistics as (
+ performanceStatistics: Statistics
+ ) => Promise<void>
+ )(data).catch(Constants.EMPTY_FUNCTION)
+ } else {
+ (this.storage?.storePerformanceStatistics as (performanceStatistics: Statistics) => void)(
+ data
+ )
+ }
}
private initializeCounters (): void {
exit(exitCodes.gracefulShutdownError)
})
})
- .catch((error) => {
+ .catch(error => {
console.error(chalk.red('Error while shutdowning charging stations simulator: '), error)
exit(exitCodes.gracefulShutdownError)
})
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { createHash } from 'node:crypto'
import { EventEmitter } from 'node:events'
buildStartedMessage,
buildStoppedMessage,
buildUpdatedMessage,
- cloneObject,
+ clone,
convertToBoolean,
+ convertToDate,
convertToInt,
exponentialDelay,
formatDurationMilliSeconds,
`${
this.stationInfo?.supervisionUrlOcppConfiguration === true &&
isNotEmptyString(this.stationInfo.supervisionUrlOcppKey) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- isNotEmptyString(getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!)?.value)
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!)!.value
+ isNotEmptyString(getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey)?.value)
+ ? getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey)?.value
: this.configuredSupervisionUrl.href
}/${this.stationInfo?.chargingStationId}`
)
return numberOfRunningTransactions
}
- public getConnectorIdByTransactionId (transactionId: number): number | undefined {
- if (this.hasEvses) {
+ public getConnectorIdByTransactionId (transactionId: number | undefined): number | undefined {
+ if (transactionId == null) {
+ return undefined
+ } else if (this.hasEvses) {
for (const evseStatus of this.evses.values()) {
for (const [connectorId, connectorStatus] of evseStatus.connectors) {
if (connectorStatus.transactionId === transactionId) {
}
public getEnergyActiveImportRegisterByTransactionId (
- transactionId: number,
+ transactionId: number | undefined,
rounded = false
): number {
return this.getEnergyActiveImportRegister(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.getConnectorStatus(this.getConnectorIdByTransactionId(transactionId)!)!,
+ this.getConnectorStatus(this.getConnectorIdByTransactionId(transactionId)!),
rounded
)
}
public getEnergyActiveImportRegisterByConnectorId (connectorId: number, rounded = false): number {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- return this.getEnergyActiveImportRegister(this.getConnectorStatus(connectorId)!, rounded)
+ return this.getEnergyActiveImportRegister(this.getConnectorStatus(connectorId), rounded)
}
public getAuthorizeRemoteTxRequests (): boolean {
this.stationInfo?.supervisionUrlOcppConfiguration === true &&
isNotEmptyString(this.stationInfo.supervisionUrlOcppKey)
) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- setConfigurationKeyValue(this, this.stationInfo.supervisionUrlOcppKey!, url)
+ setConfigurationKeyValue(this, this.stationInfo.supervisionUrlOcppKey, url)
} else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.stationInfo!.supervisionUrls = url
this.heartbeatSetInterval = setInterval(() => {
this.ocppRequestService
.requestHandler<HeartbeatRequest, HeartbeatResponse>(this, RequestCommand.HEARTBEAT)
- .catch((error) => {
+ .catch(error => {
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.HEARTBEAT}':`,
error
logger.error(`${this.logPrefix()} Trying to start MeterValues on connector id ${connectorId}`)
return
}
- if (this.getConnectorStatus(connectorId) == null) {
+ const connectorStatus = this.getConnectorStatus(connectorId)
+ if (connectorStatus == null) {
logger.error(
`${this.logPrefix()} Trying to start MeterValues on non existing connector id
${connectorId}`
)
return
}
- if (this.getConnectorStatus(connectorId)?.transactionStarted === false) {
+ if (connectorStatus.transactionStarted === false) {
logger.error(
`${this.logPrefix()} Trying to start MeterValues on connector id ${connectorId} with no transaction started`
)
return
} else if (
- this.getConnectorStatus(connectorId)?.transactionStarted === true &&
- this.getConnectorStatus(connectorId)?.transactionId == null
+ connectorStatus.transactionStarted === true &&
+ connectorStatus.transactionId == null
) {
logger.error(
`${this.logPrefix()} Trying to start MeterValues on connector id ${connectorId} with no transaction id`
return
}
if (interval > 0) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.getConnectorStatus(connectorId)!.transactionSetInterval = setInterval(() => {
+ connectorStatus.transactionSetInterval = setInterval(() => {
const meterValue = buildMeterValue(
this,
connectorId,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.getConnectorStatus(connectorId)!.transactionId!,
+ connectorStatus.transactionId!,
interval
)
this.ocppRequestService
RequestCommand.METER_VALUES,
{
connectorId,
- transactionId: this.getConnectorStatus(connectorId)?.transactionId,
+ transactionId: connectorStatus.transactionId,
meterValue: [meterValue]
}
)
- .catch((error) => {
+ .catch(error => {
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.METER_VALUES}':`,
error
}
public stopMeterValues (connectorId: number): void {
- if (this.getConnectorStatus(connectorId)?.transactionSetInterval != null) {
- clearInterval(this.getConnectorStatus(connectorId)?.transactionSetInterval)
+ const connectorStatus = this.getConnectorStatus(connectorId)
+ if (connectorStatus?.transactionSetInterval != null) {
+ clearInterval(connectorStatus.transactionSetInterval)
}
}
public startAutomaticTransactionGenerator (connectorIds?: number[]): void {
this.automaticTransactionGenerator = AutomaticTransactionGenerator.getInstance(this)
if (isNotEmptyArray(connectorIds)) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- for (const connectorId of connectorIds!) {
+ for (const connectorId of connectorIds) {
this.automaticTransactionGenerator?.startConnector(connectorId)
}
} else {
public stopAutomaticTransactionGenerator (connectorIds?: number[]): void {
if (isNotEmptyArray(connectorIds)) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- for (const connectorId of connectorIds!) {
+ for (const connectorId of connectorIds) {
this.automaticTransactionGenerator?.stopConnector(connectorId)
}
} else {
connectorId: number,
reason?: StopTransactionReason
): Promise<StopTransactionResponse> {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const transactionId = this.getConnectorStatus(connectorId)!.transactionId!
+ const transactionId = this.getConnectorStatus(connectorId)?.transactionId
if (
this.stationInfo?.beginEndMeterValues === true &&
this.stationInfo.ocppStrictCompliance === true &&
createSerialNumber(stationTemplate, stationInfo)
stationInfo.voltageOut = this.getVoltageOut(stationInfo)
if (isNotEmptyArray(stationTemplate.power)) {
- stationTemplate.power = stationTemplate.power as number[]
const powerArrayRandomIndex = Math.floor(secureRandom() * stationTemplate.power.length)
stationInfo.maximumPower =
stationTemplate.powerUnit === PowerUnits.KILO_WATT
? stationTemplate.power[powerArrayRandomIndex] * 1000
: stationTemplate.power[powerArrayRandomIndex]
} else {
- stationTemplate.power = stationTemplate.power as number
stationInfo.maximumPower =
stationTemplate.powerUnit === PowerUnits.KILO_WATT
- ? stationTemplate.power * 1000
+ ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ stationTemplate.power! * 1000
: stationTemplate.power
}
stationInfo.maximumAmperage = this.getMaximumAmperage(stationInfo)
stationTemplate.firmwareVersionPattern ?? Constants.SEMVER_PATTERN
if (
isNotEmptyString(stationInfo.firmwareVersion) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- !new RegExp(stationInfo.firmwareVersionPattern).test(stationInfo.firmwareVersion!)
+ !new RegExp(stationInfo.firmwareVersionPattern).test(stationInfo.firmwareVersion)
) {
logger.warn(
`${this.logPrefix()} Firmware version '${stationInfo.firmwareVersion}' in template file ${
) {
const patternGroup =
this.stationInfo.firmwareUpgrade?.versionUpgrade?.patternGroup ??
- this.stationInfo.firmwareVersion?.split('.').length
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const match = new RegExp(this.stationInfo.firmwareVersionPattern!)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- .exec(this.stationInfo.firmwareVersion!)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ?.slice(1, patternGroup! + 1)
+ this.stationInfo.firmwareVersion.split('.').length
+ const match = new RegExp(this.stationInfo.firmwareVersionPattern)
+ .exec(this.stationInfo.firmwareVersion)
+ ?.slice(1, patternGroup + 1)
if (match != null) {
const patchLevelIndex = match.length - 1
match[patchLevelIndex] = (
this.initializeOcppConfiguration()
this.initializeOcppServices()
this.once(ChargingStationEvents.accepted, () => {
- this.startMessageSequence().catch((error) => {
+ this.startMessageSequence().catch(error => {
logger.error(`${this.logPrefix()} Error while starting the message sequence:`, error)
})
})
if (
this.stationInfo?.supervisionUrlOcppConfiguration === true &&
isNotEmptyString(this.stationInfo.supervisionUrlOcppKey) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!) == null
+ getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey) == null
) {
addConfigurationKey(
this,
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.stationInfo.supervisionUrlOcppKey!,
+ this.stationInfo.supervisionUrlOcppKey,
this.configuredSupervisionUrl.href,
{ reboot: true }
)
} else if (
this.stationInfo?.supervisionUrlOcppConfiguration === false &&
isNotEmptyString(this.stationInfo.supervisionUrlOcppKey) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!) != null
+ getConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey) != null
) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- deleteConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey!, { save: false })
+ deleteConfigurationKey(this, this.stationInfo.supervisionUrlOcppKey, { save: false })
}
if (
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!) == null
+ getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey) == null
) {
addConfigurationKey(
this,
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.stationInfo!.amperageLimitationOcppKey!,
+ this.stationInfo.amperageLimitationOcppKey,
// prettier-ignore
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- (this.stationInfo!.maximumAmperage! * getAmperageLimitationUnitDivider(this.stationInfo)).toString()
+ (this.stationInfo.maximumAmperage! * getAmperageLimitationUnitDivider(this.stationInfo)).toString()
)
}
if (getConfigurationKey(this, StandardParametersKey.SupportedFeatureProfiles) == null) {
private initializeConnectorsOrEvsesFromFile (configuration: ChargingStationConfiguration): void {
if (configuration.connectorsStatus != null && configuration.evsesStatus == null) {
for (const [connectorId, connectorStatus] of configuration.connectorsStatus.entries()) {
- this.connectors.set(connectorId, cloneObject<ConnectorStatus>(connectorStatus))
+ this.connectors.set(connectorId, clone<ConnectorStatus>(connectorStatus))
}
} else if (configuration.evsesStatus != null && configuration.connectorsStatus == null) {
for (const [evseId, evseStatusConfiguration] of configuration.evsesStatus.entries()) {
- const evseStatus = cloneObject<EvseStatusConfiguration>(evseStatusConfiguration)
+ const evseStatus = clone<EvseStatusConfiguration>(evseStatusConfiguration)
delete evseStatus.connectorsStatus
this.evses.set(evseId, {
...(evseStatus as EvseStatus),
this.logPrefix(),
this.templateFile
)
- this.connectors.set(connectorId, cloneObject<ConnectorStatus>(connectorStatus))
+ this.connectors.set(connectorId, clone<ConnectorStatus>(connectorStatus))
}
initializeConnectorsMapStatus(this.connectors, this.logPrefix())
this.saveConnectorsStatus()
const configurationFromFile = this.getConfigurationFromFile()
let configurationData: ChargingStationConfiguration =
configurationFromFile != null
- ? cloneObject<ChargingStationConfiguration>(configurationFromFile)
+ ? clone<ChargingStationConfiguration>(configurationFromFile)
: {}
if (this.stationInfo?.stationInfoPersistentConfiguration === true) {
configurationData.stationInfo = this.stationInfo
this.sharedLRUCache.deleteChargingStationConfiguration(this.configurationFileHash)
this.sharedLRUCache.setChargingStationConfiguration(configurationData)
this.configurationFileHash = configurationHash
- }).catch((error) => {
+ }).catch(error => {
handleFileException(
this.configurationFile,
FileType.ChargingStationConfiguration,
>(this, RequestCommand.BOOT_NOTIFICATION, this.bootNotificationRequest, {
skipBufferingOnError: true
})
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+ if (this.bootNotificationResponse?.currentTime != null) {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ this.bootNotificationResponse.currentTime = convertToDate(
+ this.bootNotificationResponse.currentTime
+ )!
+ }
if (!this.isRegistered()) {
this.stationInfo?.registrationMaxRetries !== -1 && ++registrationRetryCount
await sleep(
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
- this.bootNotificationResponse.interval != null
+ this.bootNotificationResponse?.interval != null
? secondsToMilliseconds(this.bootNotificationResponse.interval)
: Constants.DEFAULT_BOOT_NOTIFICATION_INTERVAL
)
}
} else {
logger.error(
- `${this.logPrefix()} Registration failure: maximum retries reached (${registrationRetryCount}) or retry disabled (${this
- .stationInfo?.registrationMaxRetries})`
+ `${this.logPrefix()} Registration failure: maximum retries reached (${registrationRetryCount}) or retry disabled (${
+ this.stationInfo?.registrationMaxRetries
+ })`
)
}
this.autoReconnectRetryCount = 0
logger.error(`${this.logPrefix()} WebSocket error:`, error)
}
- private getEnergyActiveImportRegister (connectorStatus: ConnectorStatus, rounded = false): number {
+ private getEnergyActiveImportRegister (
+ connectorStatus: ConnectorStatus | undefined,
+ rounded = false
+ ): number {
if (this.stationInfo?.meteringPerTransaction === true) {
return (
(rounded
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- Math.round(connectorStatus.transactionEnergyActiveImportRegisterValue!)
- : connectorStatus.transactionEnergyActiveImportRegisterValue) ?? 0
+ ? connectorStatus?.transactionEnergyActiveImportRegisterValue != null
+ ? Math.round(connectorStatus.transactionEnergyActiveImportRegisterValue)
+ : undefined
+ : connectorStatus?.transactionEnergyActiveImportRegisterValue) ?? 0
)
}
return (
(rounded
- ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- Math.round(connectorStatus.energyActiveImportRegisterValue!)
- : connectorStatus.energyActiveImportRegisterValue) ?? 0
+ ? connectorStatus?.energyActiveImportRegisterValue != null
+ ? Math.round(connectorStatus.energyActiveImportRegisterValue)
+ : undefined
+ : connectorStatus?.energyActiveImportRegisterValue) ?? 0
)
}
private getAmperageLimitation (): number | undefined {
if (
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo!.amperageLimitationOcppKey!) != null
+ getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey) != null
) {
return (
- convertToInt(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo!.amperageLimitationOcppKey!)!.value
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ) / getAmperageLimitationUnitDivider(this.stationInfo!)
+ convertToInt(getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey)?.value) /
+ getAmperageLimitationUnitDivider(this.stationInfo)
)
}
}
let configuredSupervisionUrlIndex: number
switch (Configuration.getSupervisionUrlDistribution()) {
case SupervisionUrlDistribution.RANDOM:
- configuredSupervisionUrlIndex = Math.floor(
- secureRandom() * (supervisionUrls as string[]).length
- )
+ configuredSupervisionUrlIndex = Math.floor(secureRandom() * supervisionUrls.length)
break
case SupervisionUrlDistribution.ROUND_ROBIN:
case SupervisionUrlDistribution.CHARGING_STATION_AFFINITY:
SupervisionUrlDistribution.CHARGING_STATION_AFFINITY
}`
)
- configuredSupervisionUrlIndex = (this.index - 1) % (supervisionUrls as string[]).length
+ configuredSupervisionUrlIndex = (this.index - 1) % supervisionUrls.length
break
}
- configuredSupervisionUrl = (supervisionUrls as string[])[configuredSupervisionUrlIndex]
+ configuredSupervisionUrl = supervisionUrls[configuredSupervisionUrlIndex]
} else {
- configuredSupervisionUrl = supervisionUrls as string
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ configuredSupervisionUrl = supervisionUrls!
}
if (isNotEmptyString(configuredSupervisionUrl)) {
return new URL(configuredSupervisionUrl)
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { parentPort } from 'node:worker_threads'
key: ConfigurationKeyType,
caseInsensitive = false
): ConfigurationKey | undefined => {
- return chargingStation.ocppConfiguration?.configurationKey?.find((configElement) => {
+ return chargingStation.ocppConfiguration?.configurationKey?.find(configElement => {
if (caseInsensitive) {
return configElement.key.toLowerCase() === key.toLowerCase()
}
ACElectricUtils,
Constants,
DCElectricUtils,
- cloneObject,
+ clone,
convertToDate,
convertToInt,
isArraySorted,
isEmptyString,
isNotEmptyArray,
isNotEmptyString,
- isValidTime,
+ isValidDate,
logger,
secureRandom
} from '../utils/index.js'
const connectorStatus = connectors[connector]
const connectorId = convertToInt(connector)
checkStationInfoConnectorStatus(connectorId, connectorStatus, logPrefix, templateFile)
- connectorsMap.set(connectorId, cloneObject<ConnectorStatus>(connectorStatus))
+ connectorsMap.set(connectorId, clone<ConnectorStatus>(connectorStatus))
}
} else {
logger.warn(
for (const connectorId of connectors.keys()) {
if (connectorId > 0 && connectors.get(connectorId)?.transactionStarted === true) {
logger.warn(
- `${logPrefix} Connector id ${connectorId} at initialization has a transaction started with id ${connectors.get(
- connectorId
- )?.transactionId}`
+ `${logPrefix} Connector id ${connectorId} at initialization has a transaction started with id ${
+ connectors.get(connectorId)?.transactionId
+ }`
)
}
if (connectorId === 0) {
}
}
-export const resetConnectorStatus = (connectorStatus: ConnectorStatus): void => {
+export const resetConnectorStatus = (connectorStatus: ConnectorStatus | undefined): void => {
+ if (connectorStatus == null) {
+ return
+ }
connectorStatus.chargingProfiles =
connectorStatus.transactionId != null && isNotEmptyArray(connectorStatus.chargingProfiles)
- ? connectorStatus.chargingProfiles?.filter(
- (chargingProfile) => chargingProfile.transactionId !== connectorStatus.transactionId
+ ? connectorStatus.chargingProfiles.filter(
+ chargingProfile => chargingProfile.transactionId !== connectorStatus.transactionId
)
: []
connectorStatus.idTagLocalAuthorized = false
export const stationTemplateToStationInfo = (
stationTemplate: ChargingStationTemplate
): ChargingStationInfo => {
- stationTemplate = cloneObject<ChargingStationTemplate>(stationTemplate)
+ stationTemplate = clone<ChargingStationTemplate>(stationTemplate)
delete stationTemplate.power
delete stationTemplate.powerUnit
delete stationTemplate.Connectors
chargingStation: ChargingStation,
connectorId: number
): ChargingProfile[] => {
- return cloneObject<ChargingProfile[]>(
+ return clone<ChargingProfile[]>(
(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles ?? [])
.sort((a, b) => b.stackLevel - a.stackLevel)
.concat(
event: ChargingStationWorkerMessageEvents,
eventsToWait: number
): Promise<number> => {
- return await new Promise<number>((resolve) => {
+ return await new Promise<number>(resolve => {
let events = 0
if (eventsToWait === 0) {
resolve(events)
const getConfiguredMaxNumberOfConnectors = (stationTemplate: ChargingStationTemplate): number => {
let configuredMaxNumberOfConnectors = 0
if (isNotEmptyArray(stationTemplate.numberOfConnectors)) {
- const numberOfConnectors = stationTemplate.numberOfConnectors as number[]
+ const numberOfConnectors = stationTemplate.numberOfConnectors
configuredMaxNumberOfConnectors =
numberOfConnectors[Math.floor(secureRandom() * numberOfConnectors.length)]
} else if (stationTemplate.numberOfConnectors != null) {
- configuredMaxNumberOfConnectors = stationTemplate.numberOfConnectors as number
+ configuredMaxNumberOfConnectors = stationTemplate.numberOfConnectors
} else if (stationTemplate.Connectors != null && stationTemplate.Evses == null) {
configuredMaxNumberOfConnectors =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
): ChargingProfilesLimit | undefined => {
const debugLogMsg = `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Matching charging profile found for power limitation: %j`
const currentDate = new Date()
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const connectorStatus = chargingStation.getConnectorStatus(connectorId)!
+ const connectorStatus = chargingStation.getConnectorStatus(connectorId)
for (const chargingProfile of chargingProfiles) {
const chargingSchedule = chargingProfile.chargingSchedule
if (chargingSchedule.startSchedule == null) {
`${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Charging profile id ${chargingProfile.chargingProfileId} has no startSchedule defined. Trying to set it to the connector current transaction start date`
)
// OCPP specifies that if startSchedule is not defined, it should be relative to start of the connector transaction
- chargingSchedule.startSchedule = connectorStatus.transactionStart
+ chargingSchedule.startSchedule = connectorStatus?.transactionStart
}
if (!isDate(chargingSchedule.startSchedule)) {
logger.warn(
}
export const prepareChargingProfileKind = (
- connectorStatus: ConnectorStatus,
+ connectorStatus: ConnectorStatus | undefined,
chargingProfile: ChargingProfile,
currentDate: string | number | Date,
logPrefix: string
)
delete chargingProfile.chargingSchedule.startSchedule
}
- if (connectorStatus.transactionStarted === true) {
+ if (connectorStatus?.transactionStarted === true) {
chargingProfile.chargingSchedule.startSchedule = connectorStatus.transactionStart
}
// FIXME: Handle relative charging profile duration
logPrefix: string
): boolean => {
if (
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- (isValidTime(chargingProfile.validFrom) && isBefore(currentDate, chargingProfile.validFrom!)) ||
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- (isValidTime(chargingProfile.validTo) && isAfter(currentDate, chargingProfile.validTo!))
+ (isValidDate(chargingProfile.validFrom) && isBefore(currentDate, chargingProfile.validFrom)) ||
+ (isValidDate(chargingProfile.validTo) && isAfter(currentDate, chargingProfile.validTo))
) {
logger.debug(
`${logPrefix} ${moduleName}.canProceedChargingProfile: Charging profile id ${
chargingProfile.chargingProfileId
} is not valid for the current date ${
- currentDate instanceof Date ? currentDate.toISOString() : currentDate
+ isDate(currentDate) ? currentDate.toISOString() : currentDate
}`
)
return false
)
return false
}
- if (!isValidTime(chargingProfile.chargingSchedule.startSchedule)) {
+ if (!isValidDate(chargingProfile.chargingSchedule.startSchedule)) {
logger.error(
`${logPrefix} ${moduleName}.canProceedChargingProfile: Charging profile id ${chargingProfile.chargingProfileId} has an invalid startSchedule date defined`
)
): boolean => {
const chargingSchedule = chargingProfile.chargingSchedule
let recurringIntervalTranslated = false
- let recurringInterval: Interval
+ let recurringInterval: Interval | undefined
switch (chargingProfile.recurrencyKind) {
case RecurrencyKindType.DAILY:
recurringInterval = {
`${logPrefix} ${moduleName}.prepareRecurringChargingProfile: Recurring ${
chargingProfile.recurrencyKind
} charging profile id ${chargingProfile.chargingProfileId} recurrency time interval [${toDate(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- recurringInterval!.start
+ recurringInterval?.start as Date
).toISOString()}, ${toDate(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- recurringInterval!.end
+ recurringInterval?.end as Date
).toISOString()}] has not been properly translated to current date ${
- currentDate instanceof Date ? currentDate.toISOString() : currentDate
+ isDate(currentDate) ? currentDate.toISOString() : currentDate
} `
)
}
deleted.push(this.idTagsCachesAddressableIndexes.delete(key))
}
}
- return !deleted.some((value) => !value)
+ return !deleted.some(value => !value)
}
private getIdTagsCacheIndexesAddressableKey (prefix: string, uid: string): string {
enum CacheType {
chargingStationTemplate = 'chargingStationTemplate',
- chargingStationConfiguration = 'chargingStationConfiguration',
+ chargingStationConfiguration = 'chargingStationConfiguration'
}
type CacheValueType = ChargingStationTemplate | ChargingStationConfiguration
RequestCommand.STOP_TRANSACTION,
{
meterStop: this.chargingStation.getEnergyActiveImportRegisterByTransactionId(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- requestPayload!.transactionId!,
+ requestPayload?.transactionId,
true
),
...requestPayload
await this.chargingStation.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(
- this.chargingStation,
- RequestCommand.STATUS_NOTIFICATION,
- requestPayload,
- requestParams
- )
+ >(this.chargingStation, RequestCommand.STATUS_NOTIFICATION, requestPayload, requestParams)
],
[
BroadcastChannelProcedureName.HEARTBEAT,
}
return undefined
})
- .filter((hashId) => hashId != null) as string[],
+ .filter(hashId => hashId != null) as string[],
...(responsesStatus === ResponseStatus.FAILURE && {
hashIdsFailed: this.responses
.get(uuid)
}
return undefined
})
- .filter((hashId) => hashId != null) as string[]
+ .filter(hashId => hashId != null) as string[]
}),
...(responsesStatus === ResponseStatus.FAILURE && {
responsesFailed: this.responses
.get(uuid)
- ?.responses.map((response) => {
+ ?.responses.map(response => {
if (response.status === ResponseStatus.FAILURE) {
return response
}
return undefined
})
- .filter((response) => response != null) as BroadcastChannelResponsePayload[]
+ .filter(response => response != null) as BroadcastChannelResponsePayload[]
})
}
}
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { createWriteStream, readdirSync } from 'node:fs'
import { dirname, join, resolve } from 'node:path'
`${chargingStation.logPrefix()} Get composite schedule with a specified rate unit is not yet supported, no conversion will be done`
)
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const connectorStatus = chargingStation.getConnectorStatus(connectorId)!
+ const connectorStatus = chargingStation.getConnectorStatus(connectorId)
if (
- isEmptyArray(connectorStatus.chargingProfiles) &&
+ isEmptyArray(connectorStatus?.chargingProfiles) &&
isEmptyArray(chargingStation.getConnectorStatus(0)?.chargingProfiles)
) {
return OCPP16Constants.OCPP_RESPONSE_REJECTED
} has no startSchedule defined. Trying to set it to the connector current transaction start date`
)
// OCPP specifies that if startSchedule is not defined, it should be relative to start of the connector transaction
- chargingProfile.chargingSchedule.startSchedule = connectorStatus.transactionStart
+ chargingProfile.chargingSchedule.startSchedule = connectorStatus?.transactionStart
}
if (!isDate(chargingProfile.chargingSchedule.startSchedule)) {
logger.warn(
chargingProfile.chargingProfileId
} startSchedule property is not a Date instance. Trying to convert it to a Date instance`
)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingProfile.chargingSchedule.startSchedule = convertToDate(
chargingProfile.chargingSchedule.startSchedule
- )!
+ )
}
if (chargingProfile.chargingSchedule.duration == null) {
logger.debug(
// OCPP specifies that if duration is not defined, it should be infinite
chargingProfile.chargingSchedule.duration = differenceInSeconds(
maxTime,
- chargingProfile.chargingSchedule.startSchedule
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ chargingProfile.chargingSchedule.startSchedule!
)
}
if (
if (compositeSchedule != null) {
return {
status: GenericStatus.Accepted,
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- scheduleStart: compositeSchedule.startSchedule!,
+ scheduleStart: compositeSchedule.startSchedule,
connectorId,
chargingSchedule: compositeSchedule
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const connectorStatus = chargingStation.getConnectorStatus(connectorId!)
if (connectorId != null && isNotEmptyArray(connectorStatus?.chargingProfiles)) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- connectorStatus!.chargingProfiles = []
+ connectorStatus.chargingProfiles = []
logger.debug(
`${chargingStation.logPrefix()} Charging profile(s) cleared on connector id ${connectorId}`
)
? OCPP16ChargePointStatus.Available
: OCPP16ChargePointStatus.Unavailable
if (connectorId === 0) {
- let response: OCPP16ChangeAvailabilityResponse
+ let response: OCPP16ChangeAvailabilityResponse | undefined
if (chargingStation.hasEvses) {
for (const evseStatus of chargingStation.evses.values()) {
response = await OCPP16ServiceUtils.changeAvailability(
)
}
const remoteStartTransactionLogMsg = `
- ${chargingStation.logPrefix()} Transaction remotely STARTED on ${chargingStation.stationInfo
- ?.chargingStationId}#${transactionConnectorId} for idTag '${idTag}'`
+ ${chargingStation.logPrefix()} Transaction remotely STARTED on ${
+ chargingStation.stationInfo?.chargingStationId
+ }#${transactionConnectorId} for idTag '${idTag}'`
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
chargingStation,
transactionConnectorId,
)
return OCPP16Constants.OCPP_RESPONSE_EMPTY
}
- let { retrieveDate } = commandPayload
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ commandPayload.retrieveDate = convertToDate(commandPayload.retrieveDate)!
+ const { retrieveDate } = commandPayload
if (chargingStation.stationInfo?.firmwareStatus !== OCPP16FirmwareStatus.Installed) {
logger.warn(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestUpdateFirmware: Cannot simulate firmware update: firmware update is already in progress`
)
return OCPP16Constants.OCPP_RESPONSE_EMPTY
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- retrieveDate = convertToDate(retrieveDate)!
const now = Date.now()
if (retrieveDate.getTime() <= now) {
this.updateFirmwareSimulation(chargingStation).catch(Constants.EMPTY_FUNCTION)
let ftpClient: Client | undefined
try {
const logFiles = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), '../'))
- .filter((file) => file.endsWith('.log'))
- .map((file) => join('./', file))
+ .filter(file => file.endsWith('.log'))
+ .map(file => join('./', file))
const diagnosticsArchive = `${chargingStation.stationInfo?.chargingStationId}_logs.tar.gz`
create({ gzip: true }, logFiles).pipe(createWriteStream(diagnosticsArchive))
ftpClient = new Client()
})
let uploadResponse: FTPResponse | undefined
if (accessResponse.code === 220) {
- ftpClient.trackProgress((info) => {
+ ftpClient.trackProgress(info => {
logger.info(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: ${
info.bytes / 1024
>(chargingStation, OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION, {
status: OCPP16DiagnosticsStatus.Uploading
})
- .catch((error) => {
+ .catch(error => {
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: Error while sending '${
OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION
chargingStation.bootNotificationRequest,
{ skipBufferingOnError: true, triggerMessage: true }
)
- .then((response) => {
+ .then(response => {
chargingStation.bootNotificationResponse = response
})
.catch(Constants.EMPTY_FUNCTION)
}
)
.catch(Constants.EMPTY_FUNCTION)
- } else {
- if (chargingStation.hasEvses) {
- for (const evseStatus of chargingStation.evses.values()) {
- for (const [id, connectorStatus] of evseStatus.connectors) {
- chargingStation.ocppRequestService
- .requestHandler<
- OCPP16StatusNotificationRequest,
- OCPP16StatusNotificationResponse
- >(
- chargingStation,
- OCPP16RequestCommand.STATUS_NOTIFICATION,
- {
- connectorId: id,
- errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: connectorStatus.status
- },
- {
- triggerMessage: true
- }
- )
- .catch(Constants.EMPTY_FUNCTION)
- }
- }
- } else {
- for (const id of chargingStation.connectors.keys()) {
+ } else if (chargingStation.hasEvses) {
+ for (const evseStatus of chargingStation.evses.values()) {
+ for (const [id, connectorStatus] of evseStatus.connectors) {
chargingStation.ocppRequestService
.requestHandler<
OCPP16StatusNotificationRequest,
{
connectorId: id,
errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: chargingStation.getConnectorStatus(id)?.status
+ status: connectorStatus.status
},
{
triggerMessage: true
.catch(Constants.EMPTY_FUNCTION)
}
}
+ } else {
+ for (const [id, connectorStatus] of chargingStation.connectors) {
+ chargingStation.ocppRequestService
+ .requestHandler<
+ OCPP16StatusNotificationRequest,
+ OCPP16StatusNotificationResponse
+ >(
+ chargingStation,
+ OCPP16RequestCommand.STATUS_NOTIFICATION,
+ {
+ connectorId: id,
+ errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
+ status: connectorStatus.status
+ },
+ {
+ triggerMessage: true
+ }
+ )
+ .catch(Constants.EMPTY_FUNCTION)
+ }
}
}, OCPP16Constants.OCPP_TRIGGER_MESSAGE_DELAY)
return OCPP16Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_ACCEPTED
) {
return OCPP16Constants.OCPP_RESERVATION_RESPONSE_REJECTED
}
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ commandPayload.expiryDate = convertToDate(commandPayload.expiryDate)!
const { reservationId, idTag, connectorId } = commandPayload
let response: OCPP16ReserveNowResponse
try {
return OCPP16Constants.OCPP_RESERVATION_RESPONSE_REJECTED
}
await removeExpiredReservations(chargingStation)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- switch (chargingStation.getConnectorStatus(connectorId)!.status) {
+ switch (chargingStation.getConnectorStatus(connectorId)?.status) {
case OCPP16ChargePointStatus.Faulted:
response = OCPP16Constants.OCPP_RESERVATION_RESPONSE_FAULTED
break
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
} as unknown as Request
case OCPP16RequestCommand.STOP_TRANSACTION:
chargingStation.stationInfo?.transactionDataMeterValues === true &&
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
(connectorId = chargingStation.getConnectorIdByTransactionId(
commandParams.transactionId as number
- )!)
+ ))
energyActiveImportRegister = chargingStation.getEnergyActiveImportRegisterByTransactionId(
commandParams.transactionId as number,
true
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
import { secondsToMilliseconds } from 'date-fns'
}
}
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const authorizeConnectorStatus = chargingStation.getConnectorStatus(authorizeConnectorId!)
- const authorizeConnectorIdDefined = authorizeConnectorId != null
- if (payload.idTagInfo.status === OCPP16AuthorizationStatus.ACCEPTED) {
- if (authorizeConnectorIdDefined) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- authorizeConnectorStatus!.idTagAuthorized = true
+ if (authorizeConnectorId != null) {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ const authorizeConnectorStatus = chargingStation.getConnectorStatus(authorizeConnectorId)!
+ if (payload.idTagInfo.status === OCPP16AuthorizationStatus.ACCEPTED) {
+ authorizeConnectorStatus.idTagAuthorized = true
+ logger.debug(
+ `${chargingStation.logPrefix()} idTag '${
+ requestPayload.idTag
+ }' accepted on connector id ${authorizeConnectorId}`
+ )
+ } else {
+ authorizeConnectorStatus.idTagAuthorized = false
+ delete authorizeConnectorStatus.authorizeIdTag
+ logger.debug(
+ `${chargingStation.logPrefix()} idTag '${requestPayload.idTag}' rejected with status '${
+ payload.idTagInfo.status
+ }`
+ )
}
- logger.debug(
- `${chargingStation.logPrefix()} idTag '${requestPayload.idTag}' accepted${
- authorizeConnectorIdDefined ? ` on connector id ${authorizeConnectorId}` : ''
- }`
- )
} else {
- if (authorizeConnectorIdDefined) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- authorizeConnectorStatus!.idTagAuthorized = false
- delete authorizeConnectorStatus?.authorizeIdTag
- }
- logger.debug(
- `${chargingStation.logPrefix()} idTag '${requestPayload.idTag}' rejected with status '${
- payload.idTagInfo.status
- }'${authorizeConnectorIdDefined ? ` on connector id ${authorizeConnectorId}` : ''}`
+ logger.error(
+ `${chargingStation.logPrefix()} idTag '${
+ requestPayload.idTag
+ }' has no authorize request pending`
)
}
}
requestPayload.meterStart
)
if (requestPayload.reservationId != null) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const reservation = chargingStation.getReservationBy(
'reservationId',
requestPayload.reservationId
- )!
- if (reservation.idTag !== requestPayload.idTag) {
- logger.warn(
- `${chargingStation.logPrefix()} Reserved transaction ${
- payload.transactionId
- } started with a different idTag ${requestPayload.idTag} than the reservation one ${
- reservation.idTag
- }`
+ )
+ if (reservation != null) {
+ if (reservation.idTag !== requestPayload.idTag) {
+ logger.warn(
+ `${chargingStation.logPrefix()} Reserved transaction ${
+ payload.transactionId
+ } started with a different idTag ${requestPayload.idTag} than the reservation one ${
+ reservation.idTag
+ }`
+ )
+ }
+ if (hasReservationExpired(reservation)) {
+ logger.warn(
+ `${chargingStation.logPrefix()} Reserved transaction ${
+ payload.transactionId
+ } started with expired reservation ${
+ requestPayload.reservationId
+ } (expiry date: ${reservation.expiryDate.toISOString()}))`
+ )
+ }
+ await chargingStation.removeReservation(
+ reservation,
+ ReservationTerminationReason.TRANSACTION_STARTED
)
- }
- if (hasReservationExpired(reservation)) {
+ } else {
logger.warn(
`${chargingStation.logPrefix()} Reserved transaction ${
payload.transactionId
- } started with expired reservation ${
- requestPayload.reservationId
- } (expiry date: ${reservation.expiryDate.toISOString()}))`
+ } started with unknown reservation ${requestPayload.reservationId}`
)
}
- await chargingStation.removeReservation(
- reservation,
- ReservationTerminationReason.TRANSACTION_STARTED
- )
}
chargingStation.stationInfo?.beginEndMeterValues === true &&
(await chargingStation.ocppRequestService.requestHandler<
logger.warn(
`${chargingStation.logPrefix()} Starting transaction with id ${
payload.transactionId
- } REJECTED on ${chargingStation.stationInfo
- ?.chargingStationId}#${connectorId} with status '${payload.idTagInfo.status}', idTag '${
+ } REJECTED on ${
+ chargingStation.stationInfo?.chargingStationId
+ }#${connectorId} with status '${payload.idTagInfo.status}', idTag '${
requestPayload.idTag
}'${
OCPP16ServiceUtils.hasReservation(chargingStation, connectorId, requestPayload.idTag)
connectorId: number
): Promise<void> {
const connectorStatus = chargingStation.getConnectorStatus(connectorId)
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- resetConnectorStatus(connectorStatus!)
+ resetConnectorStatus(connectorStatus)
chargingStation.stopMeterValues(connectorId)
if (connectorStatus?.status !== OCPP16ChargePointStatus.Available) {
await OCPP16ServiceUtils.sendAndSetConnectorStatus(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.powerDivider!--
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- resetConnectorStatus(chargingStation.getConnectorStatus(transactionConnectorId)!)
+ resetConnectorStatus(chargingStation.getConnectorStatus(transactionConnectorId))
chargingStation.stopMeterValues(transactionConnectorId)
const logMsg = `${chargingStation.logPrefix()} Transaction with id ${
requestPayload.transactionId
- } STOPPED on ${chargingStation.stationInfo
- ?.chargingStationId}#${transactionConnectorId} with status '${payload.idTagInfo?.status}'`
+ } STOPPED on ${
+ chargingStation.stationInfo?.chargingStationId
+ }#${transactionConnectorId} with status '${payload.idTagInfo?.status}'`
if (
payload.idTagInfo == null ||
payload.idTagInfo.status === OCPP16AuthorizationStatus.ACCEPTED
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
import {
type OCPP16SupportedFeatureProfiles,
OCPPVersion
} from '../../../types/index.js'
-import { isNotEmptyArray, logger, roundTo } from '../../../utils/index.js'
+import { convertToDate, isNotEmptyArray, logger, roundTo } from '../../../utils/index.js'
import { OCPPServiceUtils } from '../OCPPServiceUtils.js'
export class OCPP16ServiceUtils extends OCPPServiceUtils {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = []
}
+ cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)
+ cp.validFrom = convertToDate(cp.validFrom)
+ cp.validTo = convertToDate(cp.validTo)
let cpReplaced = false
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const { id, chargingProfilePurpose, stackLevel } = commandPayload
let clearedCP = false
if (isNotEmptyArray(chargingProfiles)) {
- chargingProfiles?.forEach((chargingProfile: OCPP16ChargingProfile, index: number) => {
+ chargingProfiles.forEach((chargingProfile: OCPP16ChargingProfile, index: number) => {
let clearCurrentCP = false
if (chargingProfile.chargingProfileId === id) {
clearCurrentCP = true
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map((schedulePeriod) => {
+ ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(schedulePeriod => {
return {
...schedulePeriod,
startPeriod: higherFirst
}
}),
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleLower!.chargingSchedulePeriod.map((schedulePeriod) => {
+ ...compositeChargingScheduleLower!.chargingSchedulePeriod.map(schedulePeriod => {
return {
...schedulePeriod,
startPeriod: higherFirst
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map((schedulePeriod) => {
+ ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(schedulePeriod => {
return {
...schedulePeriod,
startPeriod: higherFirst
.filter((schedulePeriod, index) => {
if (
isWithinInterval(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
+ addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod),
compositeInterval
)
) {
compositeInterval.end as Date,
chargingScheduleInterval.start
),
- chargingSchedulePeriod: chargingSchedule.chargingSchedulePeriod.filter((schedulePeriod) =>
+ chargingSchedulePeriod: chargingSchedule.chargingSchedulePeriod.filter(schedulePeriod =>
isWithinInterval(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
+ addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod),
compositeInterval
)
)
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
this.incomingRequestHandler = this.incomingRequestHandler.bind(this) as <
ReqType extends JsonType,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- ResType extends JsonType,
+ ResType extends JsonType
>(
chargingStation: ChargingStation,
messageId: string,
commandPayload: ReqType
) => Promise<void>
this.validateIncomingRequestPayload = this.validateIncomingRequestPayload.bind(this) as <
- T extends JsonType,
+ T extends JsonType
>(
chargingStation: ChargingStation,
commandName: IncomingRequestCommand,
type ResponseType
} from '../../types/index.js'
import {
- cloneObject,
+ clone,
formatDurationMilliSeconds,
handleSendMessageError,
logger
this.requestHandler = this.requestHandler.bind(this) as <
// eslint-disable-next-line @typescript-eslint/no-unused-vars
ReqType extends JsonType,
- ResType extends JsonType,
+ ResType extends JsonType
>(
chargingStation: ChargingStation,
commandName: RequestCommand,
return true
}
const validate = this.getJsonRequestValidateFunction<T>(commandName as RequestCommand)
- payload = cloneObject<T>(payload)
+ payload = clone<T>(payload)
OCPPServiceUtils.convertDateToISOString<T>(payload)
if (validate(payload)) {
return true
const validate = this.getJsonRequestResponseValidateFunction<T>(
commandName as IncomingRequestCommand
)
- payload = cloneObject<T>(payload)
+ payload = clone<T>(payload)
OCPPServiceUtils.convertDateToISOString<T>(payload)
if (validate(payload)) {
return true
>()
this.responseHandler = this.responseHandler.bind(this) as <
ReqType extends JsonType,
- ResType extends JsonType,
+ ResType extends JsonType
>(
chargingStation: ChargingStation,
commandName: RequestCommand,
`${chargingStation.logPrefix()} The charging station expects to authorize RFID tags but nor local authorization nor remote authorization are enabled. Misbehavior may occur`
)
}
- if (chargingStation.getLocalAuthListEnabled() && isIdTagLocalAuthorized(chargingStation, idTag)) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const connectorStatus = chargingStation.getConnectorStatus(connectorId)!
+ const connectorStatus = chargingStation.getConnectorStatus(connectorId)
+ if (
+ connectorStatus != null &&
+ chargingStation.getLocalAuthListEnabled() &&
+ isIdTagLocalAuthorized(chargingStation, idTag)
+ ) {
connectorStatus.localAuthorizeIdTag = idTag
connectorStatus.idTagLocalAuthorized = true
return true
chargingStation.idTagsCache
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
.getIdTags(getIdTagsFile(chargingStation.stationInfo!)!)
- ?.find((tag) => tag === idTag)
+ ?.find(tag => tag === idTag)
)
)
}
connectorId: number,
status: ConnectorStatusEnum
): boolean => {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const fromStatus = chargingStation.getConnectorStatus(connectorId)!.status
+ const fromStatus = chargingStation.getConnectorStatus(connectorId)?.status
let transitionAllowed = false
switch (chargingStation.stationInfo?.ocppVersion) {
case OCPPVersion.VERSION_16:
if (
(connectorId === 0 &&
OCPP16Constants.ChargePointStatusChargingStationTransitions.findIndex(
- (transition) => transition.from === fromStatus && transition.to === status
+ transition => transition.from === fromStatus && transition.to === status
) !== -1) ||
(connectorId > 0 &&
OCPP16Constants.ChargePointStatusConnectorTransitions.findIndex(
- (transition) => transition.from === fromStatus && transition.to === status
+ transition => transition.from === fromStatus && transition.to === status
) !== -1)
) {
transitionAllowed = true
if (
(connectorId === 0 &&
OCPP20Constants.ChargingStationStatusTransitions.findIndex(
- (transition) => transition.from === fromStatus && transition.to === status
+ transition => transition.from === fromStatus && transition.to === status
) !== -1) ||
(connectorId > 0 &&
OCPP20Constants.ConnectorStatusTransitions.findIndex(
- (transition) => transition.from === fromStatus && transition.to === status
+ transition => transition.from === fromStatus && transition.to === status
) !== -1)
) {
transitionAllowed = true
`${chargingStation.logPrefix()} OCPP ${
chargingStation.stationInfo.ocppVersion
} connector id ${connectorId} status transition from '${
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- chargingStation.getConnectorStatus(connectorId)!.status
+ chargingStation.getConnectorStatus(connectorId)?.status
}' to '${status}' is not allowed`
)
}
}
}
if (powerSampledValueTemplate != null) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
checkMeasurandPowerDivider(chargingStation, powerSampledValueTemplate.measurand)
const errMsg = `MeterValues measurand ${
powerSampledValueTemplate.measurand ?? MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- powerPerPhaseSampledValueTemplates.L1?.value,
+ powerPerPhaseSampledValueTemplates.L1.value,
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
{
fallbackValue: connectorMinimumPowerPerPhase / unitDivider
}
),
- powerPerPhaseSampledValueTemplates.L1?.fluctuationPercent ??
+ powerPerPhaseSampledValueTemplates.L1.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- powerPerPhaseSampledValueTemplates.L2?.value,
+ powerPerPhaseSampledValueTemplates.L2.value,
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
{
fallbackValue: connectorMinimumPowerPerPhase / unitDivider
}
),
- powerPerPhaseSampledValueTemplates.L2?.fluctuationPercent ??
+ powerPerPhaseSampledValueTemplates.L2.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- powerPerPhaseSampledValueTemplates.L3?.value,
+ powerPerPhaseSampledValueTemplates.L3.value,
connectorMaximumPowerPerPhase / unitDivider,
connectorMinimumPowerPerPhase / unitDivider,
{
fallbackValue: connectorMinimumPowerPerPhase / unitDivider
}
),
- powerPerPhaseSampledValueTemplates.L3?.fluctuationPercent ??
+ powerPerPhaseSampledValueTemplates.L3.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- currentPerPhaseSampledValueTemplates.L1?.value,
+ currentPerPhaseSampledValueTemplates.L1.value,
connectorMaximumAmperage,
connectorMinimumAmperage,
{
fallbackValue: connectorMinimumAmperage
}
),
- currentPerPhaseSampledValueTemplates.L1?.fluctuationPercent ??
+ currentPerPhaseSampledValueTemplates.L1.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- currentPerPhaseSampledValueTemplates.L2?.value,
+ currentPerPhaseSampledValueTemplates.L2.value,
connectorMaximumAmperage,
connectorMinimumAmperage,
{
fallbackValue: connectorMinimumAmperage
}
),
- currentPerPhaseSampledValueTemplates.L2?.fluctuationPercent ??
+ currentPerPhaseSampledValueTemplates.L2.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
)
? getRandomFloatFluctuatedRounded(
getLimitFromSampledValueTemplateCustomValue(
- currentPerPhaseSampledValueTemplates.L3?.value,
+ currentPerPhaseSampledValueTemplates.L3.value,
connectorMaximumAmperage,
connectorMinimumAmperage,
{
fallbackValue: connectorMinimumAmperage
}
),
- currentPerPhaseSampledValueTemplates.L3?.fluctuationPercent ??
+ currentPerPhaseSampledValueTemplates.L3.fluctuationPercent ??
Constants.DEFAULT_FLUCTUATION_PERCENT
)
: undefined
// Energy.Active.Import.Register measurand (default)
energySampledValueTemplate = getSampledValueTemplate(chargingStation, connectorId)
if (energySampledValueTemplate != null) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
checkMeasurandPowerDivider(chargingStation, energySampledValueTemplate.measurand)
const unitDivider =
energySampledValueTemplate.unit === MeterValueUnit.KILO_WATT_HOUR ? 1000 : 1
// This is intentional
}
- public static ajvErrorsToErrorType (errors: ErrorObject[] | null | undefined): ErrorType {
+ public static ajvErrorsToErrorType (errors: ErrorObject[] | undefined | null): ErrorType {
if (isNotEmptyArray(errors)) {
for (const error of errors as DefinedError[]) {
switch (error.keyword) {
return true
}
- public static convertDateToISOString<T extends JsonType>(obj: T): void {
- for (const key in obj) {
+ public static convertDateToISOString<T extends JsonType>(object: T): void {
+ for (const key in object) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-non-null-assertion
- if (isDate(obj![key])) {
+ if (isDate(object![key])) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-non-null-assertion
- (obj![key] as string) = (obj![key] as Date).toISOString()
+ (object![key] as string) = (object![key] as Date).toISOString()
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-condition
- } else if (typeof obj![key] === 'object' && obj![key] !== null) {
+ } else if (typeof object![key] === 'object' && object![key] !== null) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-non-null-assertion
- OCPPServiceUtils.convertDateToISOString<T>(obj![key] as T)
+ OCPPServiceUtils.convertDateToISOString<T>(object![key] as T)
}
}
}
GET = 'GET',
PUT = 'PUT',
POST = 'POST',
- PATCH = 'PATCH',
+ PATCH = 'PATCH'
}
export class UIHttpServer extends AbstractUIServer {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
- this.authenticate(req, (err) => {
+ this.authenticate(req, err => {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
const [protocol, version, procedureName] = req.url?.split('/').slice(1) as [
Protocol,
ProtocolVersion,
- ProcedureName,
+ ProcedureName
]
const uuid = generateUUID()
this.responseHandlers.set(uuid, res)
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
- req.on('error', (error) => {
+ req.on('error', error => {
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error
}
const [, version] = UIServerUtils.getProtocolAndVersion(ws.protocol)
this.registerProtocolVersionUIService(version)
- ws.on('message', (rawData) => {
+ ws.on('message', rawData => {
const request = this.validateRawDataRequest(rawData)
if (request === false) {
ws.close(WebSocketCloseEventStatusCode.CLOSE_INVALID_PAYLOAD)
})
.catch(Constants.EMPTY_FUNCTION)
})
- ws.on('error', (error) => {
+ ws.on('error', error => {
logger.error(`${this.logPrefix(moduleName, 'start.ws.onerror')} WebSocket error:`, error)
})
ws.on('close', (code, reason) => {
}
})
this.httpServer.on('upgrade', (req: IncomingMessage, socket: Duplex, head: Buffer): void => {
- this.authenticate(req, (err) => {
+ this.authenticate(req, err => {
if (err != null) {
socket.write(`HTTP/1.1 ${StatusCodes.UNAUTHORIZED} Unauthorized\r\n\r\n`)
socket.destroy()
): void {
if (isNotEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
- ?.map((hashId) => {
+ .map(hashId => {
if (this.uiServer.chargingStations.has(hashId)) {
return hashId
}
)
return undefined
})
- .filter((hashId) => hashId != null) as string[]
+ .filter(hashId => hashId != null) as string[]
} else {
delete payload.hashIds
}
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { BaseError } from './BaseError.js'
import {
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { type PerformanceEntry, PerformanceObserver, performance } from 'node:perf_hooks'
import type { URL } from 'node:url'
}
private initializePerformanceObserver (): void {
- this.performanceObserver = new PerformanceObserver((performanceObserverList) => {
+ this.performanceObserver = new PerformanceObserver(performanceObserverList => {
const lastPerformanceEntry = performanceObserverList.getEntries()[0]
// logger.debug(
// `${this.logPrefix()} '${lastPerformanceEntry.name}' performance entry: %j`,
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { closeSync, existsSync, mkdirSync, openSync, writeSync } from 'node:fs'
import { dirname } from 'node:path'
0,
'utf8'
)
- }).catch((error) => {
+ }).catch(error => {
handleFileException(
this.dbName,
FileType.PerformanceRecords,
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
-import { type Configuration, MikroORM, type Options } from '@mikro-orm/core'
-import { TsMorphMetadataProvider } from '@mikro-orm/reflection'
+import { MikroORM as MariaDbORM, type Options as MariaDbOptions } from '@mikro-orm/mariadb'
+import { MikroORM as SqliteORM, type Options as SqliteOptions } from '@mikro-orm/sqlite'
import { Storage } from './Storage.js'
-import {
- type MikroOrmDbType,
- PerformanceData,
- PerformanceRecord,
- type Statistics,
- StorageType
-} from '../../types/index.js'
+import { type PerformanceRecord, type Statistics, StorageType } from '../../types/index.js'
import { Constants } from '../../utils/index.js'
export class MikroOrmStorage extends Storage {
private readonly storageType: StorageType
- private orm?: MikroORM
+ private orm?: SqliteORM | MariaDbORM
constructor (storageUri: string, logPrefix: string, storageType: StorageType) {
super(storageUri, logPrefix)
public async storePerformanceStatistics (performanceStatistics: Statistics): Promise<void> {
try {
- const performanceRecord = new PerformanceRecord()
- await this.orm?.em.persistAndFlush(performanceRecord)
+ await this.orm?.em.upsert({
+ ...performanceStatistics,
+ statisticsData: Array.from(performanceStatistics.statisticsData, ([name, value]) => ({
+ name,
+ ...value
+ }))
+ } satisfies PerformanceRecord)
} catch (error) {
this.handleDBError(this.storageType, error as Error, Constants.PERFORMANCE_RECORDS_TABLE)
}
public async open (): Promise<void> {
try {
if (this.orm == null) {
- this.orm = await MikroORM.init(this.getOptions(), true)
+ switch (this.storageType) {
+ case StorageType.SQLITE:
+ this.orm = await SqliteORM.init(this.getOptions() as SqliteOptions)
+ break
+ case StorageType.MARIA_DB:
+ case StorageType.MYSQL:
+ this.orm = await MariaDbORM.init(this.getOptions() as MariaDbOptions)
+ break
+ }
}
} catch (error) {
this.handleDBError(this.storageType, error as Error)
private getDBName (): string {
if (this.storageType === StorageType.SQLITE) {
- return `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`
+ return `${Constants.DEFAULT_PERFORMANCE_DIRECTORY}/${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`
}
return this.storageUri.pathname.replace(/(?:^\/)|(?:\/$)/g, '')
}
- private getOptions (): Configuration | Options {
+ private getOptions (): SqliteOptions | MariaDbOptions {
return {
- metadataProvider: TsMorphMetadataProvider,
- entities: [PerformanceRecord, PerformanceData],
- type: this.storageType as MikroOrmDbType,
+ dbName: this.dbName,
+ entities: ['./dist/types/orm/entities/*.js'],
+ entitiesTs: ['./src/types/orm/entities/*.ts'],
clientUrl: this.getClientUrl()
}
}
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { MongoClient } from 'mongodb'
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { URL } from 'node:url'
protected getDBNameFromStorageType (type: StorageType): DBName | undefined {
switch (type) {
+ case StorageType.SQLITE:
+ return DBName.SQLITE
case StorageType.MARIA_DB:
return DBName.MARIA_DB
- case StorageType.MONGO_DB:
- return DBName.MONGO_DB
case StorageType.MYSQL:
return DBName.MYSQL
- case StorageType.SQLITE:
- return DBName.SQLITE
+ case StorageType.MONGO_DB:
+ return DBName.MONGO_DB
}
}
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { JsonFileStorage } from './JsonFileStorage.js'
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { MikroOrmStorage } from './MikroOrmStorage.js'
import { MongoDBStorage } from './MongoDBStorage.js'
import type { Storage } from './Storage.js'
case StorageType.MONGO_DB:
storageInstance = new MongoDBStorage(connectionUri, logPrefix)
break
- // case StorageType.MYSQL:
- // case StorageType.MARIA_DB:
- // case StorageType.SQLITE:
- // storageInstance = new MikroOrmStorage(connectionUri, logPrefix, type)
- // break
+ case StorageType.SQLITE:
+ case StorageType.MARIA_DB:
+ case StorageType.MYSQL:
+ storageInstance = new MikroOrmStorage(connectionUri, logPrefix, type)
+ break
default:
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new BaseError(`${logPrefix} Unknown storage type: ${type}`)
}
return storageInstance
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import chalk from 'chalk'
export enum IdTagDistribution {
RANDOM = 'random',
ROUND_ROBIN = 'round-robin',
- CONNECTOR_AFFINITY = 'connector-affinity',
+ CONNECTOR_AFFINITY = 'connector-affinity'
}
export interface AutomaticTransactionGeneratorConfiguration {
registered = 'registered',
accepted = 'accepted',
updated = 'updated',
- connectorStatusChanged = 'connectorStatusChanged',
+ connectorStatusChanged = 'connectorStatusChanged'
}
export enum CurrentType {
AC = 'AC',
- DC = 'DC',
+ DC = 'DC'
}
export enum PowerUnits {
WATT = 'W',
- KILO_WATT = 'kW',
+ KILO_WATT = 'kW'
}
export enum AmpereUnits {
MILLI_AMPERE = 'mA',
CENTI_AMPERE = 'cA',
DECI_AMPERE = 'dA',
- AMPERE = 'A',
+ AMPERE = 'A'
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
- VOLTAGE_800 = 800,
+ VOLTAGE_800 = 800
}
export type WsOptions = ClientOptions & ClientRequestArgs
CSMSRootCertificate = 'CSMSRootCertificate',
ManufacturerRootCertificate = 'ManufacturerRootCertificate',
ChargingStationCertificate = 'ChargingStationCertificate',
- V2GCertificate = 'V2GCertificate',
+ V2GCertificate = 'V2GCertificate'
}
export interface ChargingStationTemplate {
}
enum ChargingStationMessageEvents {
- performanceStatistics = 'performanceStatistics',
+ performanceStatistics = 'performanceStatistics'
}
export const ChargingStationWorkerMessageEvents = {
log = 'log',
performanceStorage = 'performanceStorage',
worker = 'worker',
- uiServer = 'uiServer',
+ uiServer = 'uiServer'
}
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
RANDOM = 'random',
- CHARGING_STATION_AFFINITY = 'charging-station-affinity',
+ CHARGING_STATION_AFFINITY = 'charging-station-affinity'
}
export interface StationTemplateUrl {
export enum ApplicationProtocolVersion {
VERSION_11 = 1.1,
- VERSION_20 = 2.0,
+ VERSION_20 = 2.0
}
export interface UIServerConfiguration {
ChargingStationConfiguration = 'charging station configuration',
ChargingStationTemplate = 'charging station template',
PerformanceRecords = 'performance records',
- JsonSchema = 'json schema',
+ JsonSchema = 'json schema'
}
-import type { Configuration } from '@mikro-orm/core'
-
-export type MikroOrmDbType = keyof typeof Configuration.PLATFORMS
-
export enum StorageType {
JSON_FILE = 'jsonfile',
MONGO_DB = 'mongodb',
MYSQL = 'mysql',
MARIA_DB = 'mariadb',
- SQLITE = 'sqlite',
+ SQLITE = 'sqlite'
}
export enum DBName {
MONGO_DB = 'MongoDB',
MYSQL = 'MySQL',
MARIA_DB = 'MariaDB',
- SQLITE = 'SQLite',
+ SQLITE = 'SQLite'
}
import type { BroadcastChannelResponsePayload } from './WorkerBroadcastChannel.js'
export enum Protocol {
- UI = 'ui',
+ UI = 'ui'
}
export enum ApplicationProtocol {
HTTP = 'http',
- WS = 'ws',
+ WS = 'ws'
}
export enum AuthenticationType {
- BASIC_AUTH = 'basic-auth',
+ BASIC_AUTH = 'basic-auth'
}
export enum ProtocolVersion {
- '0.0.1' = '0.0.1',
+ '0.0.1' = '0.0.1'
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
METER_VALUES = 'meterValues',
DATA_TRANSFER = 'dataTransfer',
DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification',
- FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification',
+ FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification'
}
export interface RequestPayload extends JsonObject {
export enum ResponseStatus {
SUCCESS = 'success',
- FAILURE = 'failure',
+ FAILURE = 'failure'
}
export interface ResponsePayload extends JsonObject {
CLOSE_SERVICE_RESTART = 1012,
CLOSE_TRY_AGAIN_LATER = 1013,
CLOSE_BAD_GATEWAY = 1014,
- CLOSE_TLS_HANDSHAKE = 1015,
+ CLOSE_TLS_HANDSHAKE = 1015
}
export interface WSError extends Error {
export type BroadcastChannelRequest = [
string,
BroadcastChannelProcedureName,
- BroadcastChannelRequestPayload,
+ BroadcastChannelRequestPayload
]
export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload]
METER_VALUES = 'meterValues',
DATA_TRANSFER = 'dataTransfer',
DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification',
- FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification',
+ FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification'
}
export interface BroadcastChannelRequestPayload extends RequestPayload {
} from './ocpp/Configuration.js'
export type { ConnectorStatus } from './ConnectorStatus.js'
export { ConnectorStatusEnum, type ConnectorStatusTransition } from './ocpp/ConnectorStatusEnum.js'
-export { DBName, type MikroOrmDbType, StorageType } from './Storage.js'
+export { DBName, StorageType } from './Storage.js'
export type { EmptyObject } from './EmptyObject.js'
export { ErrorType } from './ocpp/ErrorType.js'
export type { EvseTemplate, EvseStatus } from './Evse.js'
} from './ocpp/2.0/Responses.js'
export { OCPP20OptionalVariableName } from './ocpp/2.0/Variables.js'
export { OCPPVersion } from './ocpp/OCPPVersion.js'
-export { PerformanceData } from './orm/entities/PerformanceData.js'
export { PerformanceRecord } from './orm/entities/PerformanceRecord.js'
export type { Statistics, TimestampedData } from './Statistics.js'
export {
READER_FAILURE = 'ReaderFailure',
RESET_FAILURE = 'ResetFailure',
UNDER_VOLTAGE = 'UnderVoltage',
- WEAK_SIGNAL = 'WeakSignal',
+ WEAK_SIGNAL = 'WeakSignal'
}
Finishing = 'Finishing',
Reserved = 'Reserved',
Unavailable = 'Unavailable',
- Faulted = 'Faulted',
+ Faulted = 'Faulted'
}
export enum OCPP16ChargingRateUnitType {
WATT = 'W',
- AMPERE = 'A',
+ AMPERE = 'A'
}
export enum OCPP16ChargingProfileKindType {
ABSOLUTE = 'Absolute',
RECURRING = 'Recurring',
- RELATIVE = 'Relative',
+ RELATIVE = 'Relative'
}
export enum OCPP16ChargingProfilePurposeType {
CHARGE_POINT_MAX_PROFILE = 'ChargePointMaxProfile',
TX_DEFAULT_PROFILE = 'TxDefaultProfile',
- TX_PROFILE = 'TxProfile',
+ TX_PROFILE = 'TxProfile'
}
export enum OCPP16RecurrencyKindType {
DAILY = 'Daily',
- WEEKLY = 'Weekly',
+ WEEKLY = 'Weekly'
}
LocalAuthListManagement = 'LocalAuthListManagement',
Reservation = 'Reservation',
SmartCharging = 'SmartCharging',
- RemoteTrigger = 'RemoteTrigger',
+ RemoteTrigger = 'RemoteTrigger'
}
export enum OCPP16StandardParametersKey {
ChargingScheduleAllowedChargingRateUnit = 'ChargingScheduleAllowedChargingRateUnit',
ChargingScheduleMaxPeriods = 'ChargingScheduleMaxPeriods',
ConnectorSwitch3to1PhaseSupported = 'ConnectorSwitch3to1PhaseSupported',
- MaxChargingProfilesInstalled = 'MaxChargingProfilesInstalled',
+ MaxChargingProfilesInstalled = 'MaxChargingProfilesInstalled'
}
export enum OCPP16VendorParametersKey {
- ConnectionUrl = 'ConnectionUrl',
+ ConnectionUrl = 'ConnectionUrl'
}
Idle = 'Idle',
Uploaded = 'Uploaded',
UploadFailed = 'UploadFailed',
- Uploading = 'Uploading',
+ Uploading = 'Uploading'
}
TEMP_CELSIUS = 'Celsius',
TEMP_FAHRENHEIT = 'Fahrenheit',
TEMP_KELVIN = 'K',
- PERCENT = 'Percent',
+ PERCENT = 'Percent'
}
export enum OCPP16MeterValueContext {
SAMPLE_PERIODIC = 'Sample.Periodic',
TRANSACTION_BEGIN = 'Transaction.Begin',
TRANSACTION_END = 'Transaction.End',
- TRIGGER = 'Trigger',
+ TRIGGER = 'Trigger'
}
export enum OCPP16MeterValueMeasurand {
FAN_RPM = 'RPM',
STATE_OF_CHARGE = 'SoC',
TEMPERATURE = 'Temperature',
- VOLTAGE = 'Voltage',
+ VOLTAGE = 'Voltage'
}
export enum OCPP16MeterValueLocation {
CABLE = 'Cable',
EV = 'EV',
INLET = 'Inlet',
- OUTLET = 'Outlet',
+ OUTLET = 'Outlet'
}
export enum OCPP16MeterValuePhase {
L3_N = 'L3-N',
L1_L2 = 'L1-L2',
L2_L3 = 'L2-L3',
- L3_L1 = 'L3-L1',
+ L3_L1 = 'L3-L1'
}
enum OCPP16MeterValueFormat {
RAW = 'Raw',
- SIGNED_DATA = 'SignedData',
+ SIGNED_DATA = 'SignedData'
}
export interface OCPP16SampledValue extends JsonObject {
METER_VALUES = 'MeterValues',
DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
FIRMWARE_STATUS_NOTIFICATION = 'FirmwareStatusNotification',
- DATA_TRANSFER = 'DataTransfer',
+ DATA_TRANSFER = 'DataTransfer'
}
export enum OCPP16IncomingRequestCommand {
DATA_TRANSFER = 'DataTransfer',
UPDATE_FIRMWARE = 'UpdateFirmware',
RESERVE_NOW = 'ReserveNow',
- CANCEL_RESERVATION = 'CancelReservation',
+ CANCEL_RESERVATION = 'CancelReservation'
}
export type OCPP16HeartbeatRequest = EmptyObject
enum ResetType {
HARD = 'Hard',
- SOFT = 'Soft',
+ SOFT = 'Soft'
}
export interface ResetRequest extends JsonObject {
export enum OCPP16AvailabilityType {
Inoperative = 'Inoperative',
- Operative = 'Operative',
+ Operative = 'Operative'
}
export interface OCPP16ChangeAvailabilityRequest extends JsonObject {
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
- Installed = 'Installed',
+ Installed = 'Installed'
}
export type OCPP16FirmwareStatusNotificationRequest = {
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
- StatusNotification = 'StatusNotification',
+ StatusNotification = 'StatusNotification'
}
export interface OCPP16TriggerMessageRequest extends JsonObject {
export enum OCPP16UnlockStatus {
UNLOCKED = 'Unlocked',
UNLOCK_FAILED = 'UnlockFailed',
- NOT_SUPPORTED = 'NotSupported',
+ NOT_SUPPORTED = 'NotSupported'
}
export interface UnlockConnectorResponse extends JsonObject {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
REBOOT_REQUIRED = 'RebootRequired',
- NOT_SUPPORTED = 'NotSupported',
+ NOT_SUPPORTED = 'NotSupported'
}
export interface ChangeConfigurationResponse extends JsonObject {
export enum OCPP16ChargingProfileStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- NOT_SUPPORTED = 'NotSupported',
+ NOT_SUPPORTED = 'NotSupported'
}
export interface OCPP16GetCompositeScheduleResponse extends JsonObject {
export enum OCPP16AvailabilityStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- SCHEDULED = 'Scheduled',
+ SCHEDULED = 'Scheduled'
}
export interface OCPP16ChangeAvailabilityResponse extends JsonObject {
export enum OCPP16ClearChargingProfileStatus {
ACCEPTED = 'Accepted',
- UNKNOWN = 'Unknown',
+ UNKNOWN = 'Unknown'
}
export interface OCPP16ClearChargingProfileResponse extends JsonObject {
export enum OCPP16TriggerMessageStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- NOT_IMPLEMENTED = 'NotImplemented',
+ NOT_IMPLEMENTED = 'NotImplemented'
}
export interface OCPP16TriggerMessageResponse extends JsonObject {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
UNKNOWN_MESSAGE_ID = 'UnknownMessageId',
- UNKNOWN_VENDOR_ID = 'UnknownVendorId',
+ UNKNOWN_VENDOR_ID = 'UnknownVendorId'
}
export interface OCPP16DataTransferResponse extends JsonObject {
OCCUPIED = 'Occupied',
REJECTED = 'Rejected',
UNAVAILABLE = 'Unavailable',
- NOT_SUPPORTED = 'NotSupported',
+ NOT_SUPPORTED = 'NotSupported'
}
export interface OCPP16ReserveNowResponse extends JsonObject {
REMOTE = 'Remote',
SOFT_RESET = 'SoftReset',
UNLOCK_COMMAND = 'UnlockCommand',
- DE_AUTHORIZED = 'DeAuthorized',
+ DE_AUTHORIZED = 'DeAuthorized'
}
export enum OCPP16AuthorizationStatus {
BLOCKED = 'Blocked',
EXPIRED = 'Expired',
INVALID = 'Invalid',
- CONCURRENT_TX = 'ConcurrentTx',
+ CONCURRENT_TX = 'ConcurrentTx'
}
interface IdTagInfo extends JsonObject {
boolean = 'boolean',
OptionList = 'OptionList',
SequenceList = 'SequenceList',
- MemberList = 'MemberList',
+ MemberList = 'MemberList'
}
export enum BootReasonEnumType {
ScheduledReset = 'ScheduledReset',
Triggered = 'Triggered',
Unknown = 'Unknown',
- Watchdog = 'Watchdog',
+ Watchdog = 'Watchdog'
}
export enum OperationalStatusEnumType {
Operative = 'Operative',
- Inoperative = 'Inoperative',
+ Inoperative = 'Inoperative'
}
export enum OCPP20ConnectorStatusEnumType {
Occupied = 'Occupied',
Reserved = 'Reserved',
Unavailable = 'Unavailable',
- Faulted = 'Faulted',
+ Faulted = 'Faulted'
}
export type GenericStatusEnumType = GenericStatus
export enum HashAlgorithmEnumType {
SHA256 = 'SHA256',
SHA384 = 'SHA384',
- SHA512 = 'SHA512',
+ SHA512 = 'SHA512'
}
export enum GetCertificateIdUseEnumType {
MORootCertificate = 'MORootCertificate',
CSMSRootCertificate = 'CSMSRootCertificate',
V2GCertificateChain = 'V2GCertificateChain',
- ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+ ManufacturerRootCertificate = 'ManufacturerRootCertificate'
}
export enum GetCertificateStatusEnumType {
Accepted = 'Accepted',
- Failed = 'Failed',
+ Failed = 'Failed'
}
export enum GetInstalledCertificateStatusEnumType {
Accepted = 'Accepted',
- NotFound = 'NotFound',
+ NotFound = 'NotFound'
}
export enum InstallCertificateStatusEnumType {
Accepted = 'Accepted',
Rejected = 'Rejected',
- Failed = 'Failed',
+ Failed = 'Failed'
}
export enum InstallCertificateUseEnumType {
V2GRootCertificate = 'V2GRootCertificate',
MORootCertificate = 'MORootCertificate',
CSMSRootCertificate = 'CSMSRootCertificate',
- ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+ ManufacturerRootCertificate = 'ManufacturerRootCertificate'
}
export enum DeleteCertificateStatusEnumType {
Accepted = 'Accepted',
Failed = 'Failed',
- NotFound = 'NotFound',
+ NotFound = 'NotFound'
}
export enum CertificateActionEnumType {
Install = 'Install',
- Update = 'Update',
+ Update = 'Update'
}
export enum CertificateSigningUseEnumType {
ChargingStationCertificate = 'ChargingStationCertificate',
- V2GCertificate = 'V2GCertificate',
+ V2GCertificate = 'V2GCertificate'
}
export type CertificateSignedStatusEnumType = GenericStatusEnumType
export enum OCPP20RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
HEARTBEAT = 'Heartbeat',
- STATUS_NOTIFICATION = 'StatusNotification',
+ STATUS_NOTIFICATION = 'StatusNotification'
}
export enum OCPP20IncomingRequestCommand {
CLEAR_CACHE = 'ClearCache',
REQUEST_START_TRANSACTION = 'RequestStartTransaction',
- REQUEST_STOP_TRANSACTION = 'RequestStopTransaction',
+ REQUEST_STOP_TRANSACTION = 'RequestStopTransaction'
}
type ModemType = {
SecurityCtrlr = 'SecurityCtrlr',
SmartChargingCtrlr = 'SmartChargingCtrlr',
TariffCostCtrlr = 'TariffCostCtrlr',
- TxCtrlr = 'TxCtrlr',
+ TxCtrlr = 'TxCtrlr'
}
export enum OCPP20RequiredVariableName {
TxEndedMeasurands = 'TxEndedMeasurands',
TxStartedMeasurands = 'TxStartedMeasurands',
TxUpdatedMeasurands = 'TxUpdatedMeasurands',
- TxUpdatedInterval = 'TxUpdatedInterval',
+ TxUpdatedInterval = 'TxUpdatedInterval'
}
export enum OCPP20OptionalVariableName {
HeartbeatInterval = 'HeartbeatInterval',
- WebSocketPingInterval = 'WebSocketPingInterval',
+ WebSocketPingInterval = 'WebSocketPingInterval'
}
export enum OCPP20VendorVariableName {
- ConnectionUrl = 'ConnectionUrl',
+ ConnectionUrl = 'ConnectionUrl'
}
enum AttributeEnumType {
Actual = 'Actual',
Target = 'Target',
MinSet = 'MinSet',
- MaxSet = 'MaxSet',
+ MaxSet = 'MaxSet'
}
type ComponentType = {
UnknownComponent = 'UnknownComponent',
UnknownVariable = 'UnknownVariable',
NotSupportedAttributeType = 'NotSupportedAttributeType',
- RebootRequired = 'RebootRequired',
+ RebootRequired = 'RebootRequired'
}
export type OCPP20SetVariableResultType = {
export enum GenericStatus {
Accepted = 'Accepted',
- Rejected = 'Rejected',
+ Rejected = 'Rejected'
}
export interface GenericResponse extends JsonObject {
export enum RegistrationStatusEnumType {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
- REJECTED = 'Rejected',
+ REJECTED = 'Rejected'
}
SRT = 'SRT',
STR = 'STR',
TRS = 'TRS',
- TSR = 'TSR',
+ TSR = 'TSR'
}
export type ConfigurationKeyType = string | StandardParametersKey | VendorParametersKey
// Payload for Action is syntactically correct but at least one of the fields violates data type constraints (e.g. "somestring" = 12)
TYPE_CONSTRAINT_VIOLATION = 'TypeConstraintViolation',
// Any other error not covered by the previous ones
- GENERIC_ERROR = 'GenericError',
+ GENERIC_ERROR = 'GenericError'
}
export enum MessageType {
CALL_MESSAGE = 2, // Caller to Callee
CALL_RESULT_MESSAGE = 3, // Callee to Caller
- CALL_ERROR_MESSAGE = 4, // Callee to Caller
+ CALL_ERROR_MESSAGE = 4 // Callee to Caller
}
export enum OCPPProtocol {
- JSON = 'json',
+ JSON = 'json'
}
export enum OCPPVersion {
VERSION_16 = '1.6',
VERSION_20 = '2.0',
- VERSION_201 = '2.0.1',
+ VERSION_201 = '2.0.1'
}
ResponseCallback,
ErrorCallback,
RequestCommand | IncomingRequestCommand,
- JsonType,
+ JsonType
]
export const MessageTrigger = {
TRANSACTION_STARTED = 'TransactionStarted',
CONNECTOR_STATE_CHANGED = 'ConnectorStateChanged',
RESERVATION_CANCELED = 'ReservationCanceled',
- REPLACE_EXISTING = 'ReplaceExisting',
+ REPLACE_EXISTING = 'ReplaceExisting'
}
+++ /dev/null
-// 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 { PerformanceRecord } from './PerformanceRecord.js'
-
-@Entity()
-export class PerformanceData {
- // @PrimaryKey()
- // pk!: number
- // @Property()
- // commandName!: string
- // @Property()
- // countRequest!: number
- // @Property()
- // countResponse!: number
- // @Property()
- // countError!: number
- // @Property()
- // countTimeMeasurement!: number
- // @Property()
- // timeMeasurementSeries!: number[]
- // @Property()
- // currentTimeMeasurement!: number
- // @Property()
- // minTimeMeasurement!: number
- // @Property()
- // maxTimeMeasurement!: number
- // @Property()
- // totalTimeMeasurement!: number
- // @Property()
- // avgTimeMeasurement!: number
- // @Property()
- // medTimeMeasurement!: number
- // @Property()
- // ninetyFiveThPercentileTimeMeasurement!: number
- // @Property()
- // stdDevTimeMeasurement!: number
- // @ManyToOne('PerformanceRecord')
- // performanceRecord!: PerformanceRecord
-}
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
+import { Entity, PrimaryKey, Property } from '@mikro-orm/core'
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import type { PerformanceData } from './PerformanceData.js'
+interface StatisticsData {
+ name: string
+ requestCount: number
+ responseCount: number
+ errorCount: number
+ timeMeasurementCount: number
+ measurementTimeSeries: Array<{
+ timestamp: number
+ value: number
+ }>
+ currentTimeMeasurement: number
+ minTimeMeasurement: number
+ maxTimeMeasurement: number
+ totalTimeMeasurement: number
+ avgTimeMeasurement: number
+ medTimeMeasurement: number
+ ninetyFiveThPercentileTimeMeasurement: number
+ stdDevTimeMeasurement: number
+}
@Entity()
export class PerformanceRecord {
- // @PrimaryKey()
- // pk!: number
- // @Property()
- // id!: string
- // @Property()
- // URI!: string
- // @Property()
- // createdAt!: Date
- // @Property()
- // updatedAt?: Date
- // @OneToMany('PerformanceData', 'performanceRecord')
- // performanceData? = new Collection<PerformanceData>(this)
+ @PrimaryKey()
+ id!: string
+
+ @Property()
+ name!: string
+
+ @Property()
+ uri!: string
+
+ @Property()
+ createdAt!: Date
+
+ @Property()
+ updatedAt?: Date
+
+ @Property()
+ statisticsData!: Array<Partial<StatisticsData>>
}
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { Queue } from 'mnemonist'
export enum AsyncLockType {
configuration = 'configuration',
- performance = 'performance',
+ performance = 'performance'
}
type ResolveType = (value: void | PromiseLike<void>) => void
asyncLock.acquired = true
return
}
- await new Promise<void>((resolve) => {
+ await new Promise<void>(resolve => {
asyncLock.resolveQueue.enqueue(resolve)
})
}
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const queuedResolve = asyncLock.resolveQueue.dequeue()!
- await new Promise<void>((resolve) => {
+ await new Promise<void>(resolve => {
queuedResolve()
resolve()
})
export const enum OutputFormat {
configuration = 'configuration',
- worker = 'worker',
+ worker = 'worker'
}
export const buildEvsesStatus = (
outputFormat: OutputFormat = OutputFormat.configuration
): Array<EvseStatusWorkerType | EvseStatusConfiguration> => {
// eslint-disable-next-line array-callback-return
- return [...chargingStation.evses.values()].map((evseStatus) => {
+ return [...chargingStation.evses.values()].map(evseStatus => {
const connectorsStatus = [...evseStatus.connectors.values()].map(
({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest
)
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
export const DEFAULT_CIRCULAR_ARRAY_SIZE = 1024
}
private static buildPerformanceStorageSection (): StorageConfiguration {
- let storageConfiguration: StorageConfiguration = {
- enabled: false,
- type: StorageType.JSON_FILE,
- uri: getDefaultPerformanceStorageUri(StorageType.JSON_FILE)
+ let storageConfiguration: StorageConfiguration
+ switch (Configuration.getConfigurationData()?.performanceStorage?.type) {
+ case StorageType.SQLITE:
+ storageConfiguration = {
+ enabled: false,
+ type: StorageType.SQLITE,
+ uri: getDefaultPerformanceStorageUri(StorageType.SQLITE)
+ }
+ break
+ case StorageType.JSON_FILE:
+ default:
+ storageConfiguration = {
+ enabled: false,
+ type: StorageType.JSON_FILE,
+ uri: getDefaultPerformanceStorageUri(StorageType.JSON_FILE)
+ }
+ break
}
if (hasOwnProp(Configuration.getConfigurationData(), ConfigurationSection.performanceStorage)) {
storageConfiguration = {
...storageConfiguration,
...Configuration.getConfigurationData()?.performanceStorage,
- ...(Configuration.getConfigurationData()?.performanceStorage?.type ===
- StorageType.JSON_FILE &&
+ ...((Configuration.getConfigurationData()?.performanceStorage?.type ===
+ StorageType.JSON_FILE ||
+ Configuration.getConfigurationData()?.performanceStorage?.type === StorageType.SQLITE) &&
Configuration.getConfigurationData()?.performanceStorage?.uri != null && {
uri: buildPerformanceUriFilePath(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (
!Configuration.configurationFileReloading &&
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- filename!.trim()!.length > 0 &&
+ filename!.trim().length > 0 &&
event === 'change'
) {
Configuration.configurationFileReloading = true
Configuration.configurationSectionCache.clear()
if (Configuration.configurationChangeCallback !== undefined) {
Configuration.configurationChangeCallback()
- .catch((error) => {
+ .catch(error => {
throw typeof error === 'string' ? new Error(error) : error
})
.finally(() => {
static readonly MAX_RANDOM_INTEGER = 281474976710654
- static readonly STOP_CHARGING_STATIONS_TIMEOUT = 120000 // Ms
+ static readonly STOP_CHARGING_STATIONS_TIMEOUT = 60000 // Ms
static readonly EMPTY_FROZEN_OBJECT = Object.freeze({})
static readonly EMPTY_FUNCTION = Object.freeze(() => {
-// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
/**
* Rationale: https://wiki.piment-noir.org/doku.php/en:cs:modelling_multi-phased_electrical_system_interconnexion
-import { isEmptyArray } from './Utils.js'
-
/**
* Computes the average of the given data set.
*
export const average = (dataSet: number[]): number => {
if (Array.isArray(dataSet) && dataSet.length === 0) {
return 0
- }
- if (Array.isArray(dataSet) && dataSet.length === 1) {
+ } else if (Array.isArray(dataSet) && dataSet.length === 1) {
return dataSet[0]
}
return dataSet.reduce((accumulator, nb) => accumulator + nb, 0) / dataSet.length
* @internal
*/
export const median = (dataSet: number[]): number => {
- if (isEmptyArray(dataSet)) {
+ if (Array.isArray(dataSet) && dataSet.length === 0) {
return 0
- }
- if (Array.isArray(dataSet) && dataSet.length === 1) {
+ } else if (Array.isArray(dataSet) && dataSet.length === 1) {
return dataSet[0]
}
const sortedDataSet = dataSet.slice().sort((a, b) => a - b)
if (percentile < 0 && percentile > 100) {
throw new RangeError('Percentile is not between 0 and 100')
}
- if (isEmptyArray(dataSet)) {
+ if (Array.isArray(dataSet) && dataSet.length === 0) {
return 0
}
const sortedDataSet = dataSet.slice().sort((a, b) => a - b)
dataSet: number[],
dataSetAverage: number = average(dataSet)
): number => {
- if (isEmptyArray(dataSet)) {
+ if (Array.isArray(dataSet) && dataSet.length === 0) {
return 0
- }
- if (Array.isArray(dataSet) && dataSet.length === 1) {
+ } else if (Array.isArray(dataSet) && dataSet.length === 1) {
return 0
}
return Math.sqrt(
} from 'date-fns'
import { Constants } from './Constants.js'
-import { type TimestampedData, WebSocketCloseEventStatusString } from '../types/index.js'
+import {
+ type EmptyObject,
+ type TimestampedData,
+ WebSocketCloseEventStatusString
+} from '../types/index.js'
export const logPrefix = (prefixString = ''): string => {
return `${new Date().toLocaleString()}${prefixString}`
}
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
- return await new Promise<NodeJS.Timeout>((resolve) =>
+ return await new Promise<NodeJS.Timeout>(resolve =>
setTimeout(resolve as () => void, milliSeconds)
)
}
}
// More efficient time validation function than the one provided by date-fns
-export const isValidTime = (date: unknown): boolean => {
+export const isValidDate = (date: Date | number | undefined): date is Date | number => {
if (typeof date === 'number') {
return !isNaN(date)
} else if (isDate(date)) {
}
export const convertToDate = (
- value: Date | string | number | null | undefined
-): Date | null | undefined => {
+ value: Date | string | number | undefined | null
+): Date | undefined => {
if (value == null) {
- return value
+ return undefined
}
if (isDate(value)) {
return value
return Math.trunc(value)
}
if (isString(value)) {
- changedValue = parseInt(value as string)
+ changedValue = parseInt(value)
}
if (isNaN(changedValue)) {
throw new Error(`Cannot convert to integer: '${String(value)}'`)
}
let changedValue: number = value as number
if (isString(value)) {
- changedValue = parseFloat(value as string)
+ changedValue = parseFloat(value)
}
if (isNaN(changedValue)) {
throw new Error(`Cannot convert to float: '${String(value)}'`)
// Check the type
if (typeof value === 'boolean') {
return value
- } else if (isString(value) && ((value as string).toLowerCase() === 'true' || value === '1')) {
+ } else if (isString(value) && (value.toLowerCase() === 'true' || value === '1')) {
result = true
} else if (typeof value === 'number' && value === 1) {
result = true
}
export const extractTimeSeriesValues = (timeSeries: TimestampedData[]): number[] => {
- return timeSeries.map((timeSeriesItem) => timeSeriesItem.value)
-}
-
-export const isObject = (item: unknown): boolean => {
- return item != null && typeof item === 'object' && !Array.isArray(item)
+ return timeSeries.map(timeSeriesItem => timeSeriesItem.value)
}
type CloneableData =
return clone as O
}
if (value instanceof Date) {
- return new Date(value.valueOf()) as O
+ return new Date(value.getTime()) as O
}
if (typeof value !== 'object' || value === null) {
return value as unknown as O
return clone as O
}
-export const cloneObject = <T>(object: T): T => {
+export const clone = <T>(object: T): T => {
return deepClone(object as CloneableData) as T
}
-export const hasOwnProp = (object: unknown, property: PropertyKey): boolean => {
- return isObject(object) && Object.hasOwn(object as object, property)
+/**
+ * Detects whether the given value is an asynchronous function or not.
+ *
+ * @param fn - Unknown value.
+ * @returns `true` if `fn` was an asynchronous function, otherwise `false`.
+ * @internal
+ */
+export const isAsyncFunction = (fn: unknown): fn is (...args: unknown[]) => Promise<unknown> => {
+ return typeof fn === 'function' && fn.constructor.name === 'AsyncFunction'
}
-export const isCFEnvironment = (): boolean => {
- return env.VCAP_APPLICATION != null
+export const isObject = (value: unknown): value is object => {
+ return value != null && typeof value === 'object' && !Array.isArray(value)
}
-export const isIterable = <T>(obj: T): boolean => {
- return obj != null ? typeof obj[Symbol.iterator as keyof T] === 'function' : false
+export const isEmptyObject = (object: object): object is EmptyObject => {
+ if (object.constructor !== Object) {
+ return false
+ }
+ // Iterates over the keys of an object, if
+ // any exist, return false.
+ // eslint-disable-next-line no-unreachable-loop
+ for (const _ in object) {
+ return false
+ }
+ return true
}
-const isString = (value: unknown): boolean => {
- return typeof value === 'string'
+export const hasOwnProp = (value: unknown, property: PropertyKey): boolean => {
+ return isObject(value) && Object.hasOwn(value, property)
}
-export const isEmptyString = (value: unknown): boolean => {
- return value == null || (isString(value) && (value as string).trim().length === 0)
+export const isCFEnvironment = (): boolean => {
+ return env.VCAP_APPLICATION != null
}
-export const isNotEmptyString = (value: unknown): boolean => {
- return isString(value) && (value as string).trim().length > 0
+const isString = (value: unknown): value is string => {
+ return typeof value === 'string'
}
-export const isEmptyArray = (object: unknown): boolean => {
- return Array.isArray(object) && object.length === 0
+export const isEmptyString = (value: unknown): value is '' | undefined | null => {
+ return value == null || (isString(value) && value.trim().length === 0)
}
-export const isNotEmptyArray = (object: unknown): boolean => {
- return Array.isArray(object) && object.length > 0
+export const isNotEmptyString = (value: unknown): value is string => {
+ return isString(value) && value.trim().length > 0
}
-export const isEmptyObject = (obj: object): boolean => {
- if (obj.constructor !== Object) {
- return false
- }
- // Iterates over the keys of an object, if
- // any exist, return false.
- // eslint-disable-next-line no-unreachable-loop
- for (const _ in obj) {
- return false
- }
- return true
+export const isEmptyArray = (value: unknown): value is never[] => {
+ return Array.isArray(value) && value.length === 0
+}
+
+export const isNotEmptyArray = (value: unknown): value is unknown[] => {
+ return Array.isArray(value) && value.length > 0
}
export const insertAt = (str: string, subStr: string, pos: number): string =>
}
export const JSONStringifyWithMapSupport = (
- obj: Record<string, unknown> | Array<Record<string, unknown>> | Map<unknown, unknown>,
+ object: Record<string, unknown> | Array<Record<string, unknown>> | Map<unknown, unknown>,
space?: number
): string => {
return JSON.stringify(
- obj,
+ object,
(_, value: Record<string, unknown>) => {
if (value instanceof Map) {
return {
buildStoppedMessage
} from './MessageChannelUtils.js'
export {
+ isAsyncFunction,
JSONStringifyWithMapSupport,
- cloneObject,
+ clone,
convertToBoolean,
convertToDate,
convertToFloat,
isEmptyString,
isNotEmptyArray,
isNotEmptyString,
- isValidTime,
+ isValidDate,
logPrefix,
max,
min,
-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import { EventEmitterAsyncResource } from 'node:events'
import { SHARE_ENV, Worker } from 'node:worker_threads'
public async stop (): Promise<void> {
for (const workerSetElement of this.workerSet) {
const worker = workerSetElement.worker
- const waitWorkerExit = new Promise<void>((resolve) => {
+ const waitWorkerExit = new Promise<void>(resolve => {
worker.once('exit', () => {
resolve()
})
}
})
worker.on('error', this.workerOptions.poolOptions?.errorHandler ?? EMPTY_FUNCTION)
- worker.on('error', (error) => {
+ worker.on('error', error => {
this.emitter?.emit(WorkerSetEvents.error, error)
if (
this.workerOptions.poolOptions?.restartWorkerOnError === true &&
workerSet = 'workerSet',
/** @experimental */
dynamicPool = 'dynamicPool',
- fixedPool = 'fixedPool',
+ fixedPool = 'fixedPool'
}
export interface SetInfo {
stopped = 'stopped',
error = 'error',
elementStarted = 'elementStarted',
- elementError = 'elementError',
+ elementError = 'elementError'
}
export const WorkerEvents = {
export enum WorkerMessageEvents {
startWorkerElement = 'startWorkerElement',
startWorkerElementError = 'startWorkerElementError',
- startedWorkerElement = 'startedWorkerElement',
+ startedWorkerElement = 'startedWorkerElement'
}
import chalk from 'chalk'
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
- return await new Promise<NodeJS.Timeout>((resolve) =>
+ return await new Promise<NodeJS.Timeout>(resolve =>
setTimeout(resolve as () => void, milliSeconds)
)
}
import { Constants } from '../../src/utils/Constants.js'
import {
- cloneObject,
+ clone,
convertToBoolean,
convertToDate,
convertToFloat,
isEmptyArray,
isEmptyObject,
isEmptyString,
- isIterable,
isNotEmptyArray,
isNotEmptyString,
isObject,
- isValidTime,
+ isValidDate,
max,
min,
once,
expect(formatDurationSeconds(hoursToSeconds(4380))).toBe('182 days 12 hours')
})
- await it('Verify isValidTime()', () => {
- expect(isValidTime(undefined)).toBe(false)
- expect(isValidTime(null)).toBe(false)
- expect(isValidTime('')).toBe(false)
- expect(isValidTime({})).toBe(false)
- expect(isValidTime([])).toBe(false)
- expect(isValidTime(new Map())).toBe(false)
- expect(isValidTime(new Set())).toBe(false)
- expect(isValidTime(new WeakMap())).toBe(false)
- expect(isValidTime(new WeakSet())).toBe(false)
- expect(isValidTime(-1)).toBe(true)
- expect(isValidTime(0)).toBe(true)
- expect(isValidTime(1)).toBe(true)
- expect(isValidTime(-0.5)).toBe(true)
- expect(isValidTime(0.5)).toBe(true)
- expect(isValidTime(new Date())).toBe(true)
+ await it('Verify isValidDate()', () => {
+ expect(isValidDate(undefined)).toBe(false)
+ expect(isValidDate(-1)).toBe(true)
+ expect(isValidDate(0)).toBe(true)
+ expect(isValidDate(1)).toBe(true)
+ expect(isValidDate(-0.5)).toBe(true)
+ expect(isValidDate(0.5)).toBe(true)
+ expect(isValidDate(new Date())).toBe(true)
})
await it('Verify convertToDate()', () => {
expect(convertToDate(undefined)).toBe(undefined)
- expect(convertToDate(null)).toBe(null)
+ expect(convertToDate(null)).toBe(undefined)
expect(() => convertToDate('')).toThrow(new Error("Cannot convert to date: ''"))
expect(() => convertToDate('00:70:61')).toThrow(new Error("Cannot convert to date: '00:70:61'"))
expect(convertToDate(0)).toStrictEqual(new Date('1970-01-01T00:00:00.000Z'))
expect(isObject(new WeakSet())).toBe(true)
})
- await it('Verify cloneObject()', () => {
+ await it('Verify clone()', () => {
const obj = { 1: 1 }
- expect(cloneObject(obj)).toStrictEqual(obj)
- expect(cloneObject(obj) === obj).toBe(false)
+ expect(clone(obj)).toStrictEqual(obj)
+ expect(clone(obj) === obj).toBe(false)
const nestedObj = { 1: obj, 2: obj }
- expect(cloneObject(nestedObj)).toStrictEqual(nestedObj)
- expect(cloneObject(nestedObj) === nestedObj).toBe(false)
+ expect(clone(nestedObj)).toStrictEqual(nestedObj)
+ expect(clone(nestedObj) === nestedObj).toBe(false)
const array = [1, 2]
- expect(cloneObject(array)).toStrictEqual(array)
- expect(cloneObject(array) === array).toBe(false)
+ expect(clone(array)).toStrictEqual(array)
+ expect(clone(array) === array).toBe(false)
const objArray = [obj, obj]
- expect(cloneObject(objArray)).toStrictEqual(objArray)
- expect(cloneObject(objArray) === objArray).toBe(false)
+ expect(clone(objArray)).toStrictEqual(objArray)
+ expect(clone(objArray) === objArray).toBe(false)
const date = new Date()
- expect(cloneObject(date)).toStrictEqual(date)
- expect(cloneObject(date) === date).toBe(false)
+ expect(clone(date)).toStrictEqual(date)
+ expect(clone(date) === date).toBe(false)
const map = new Map([['1', '2']])
- expect(cloneObject(map)).toStrictEqual({})
+ expect(clone(map)).toStrictEqual({})
const set = new Set(['1'])
- expect(cloneObject(set)).toStrictEqual({})
+ expect(clone(set)).toStrictEqual({})
// The URL object seems to have not enumerable properties
const url = new URL('https://domain.tld')
- expect(cloneObject(url)).toStrictEqual({})
+ expect(clone(url)).toStrictEqual({})
const weakMap = new WeakMap([[{ 1: 1 }, { 2: 2 }]])
- expect(cloneObject(weakMap)).toStrictEqual({})
+ expect(clone(weakMap)).toStrictEqual({})
const weakSet = new WeakSet([{ 1: 1 }, { 2: 2 }])
- expect(cloneObject(weakSet)).toStrictEqual({})
+ expect(clone(weakSet)).toStrictEqual({})
})
await it('Verify hasOwnProp()', () => {
expect(hasOwnProp({ 1: '1' }, 2)).toBe(false)
})
- await it('Verify isIterable()', () => {
- expect(isIterable('')).toBe(true)
- expect(isIterable(' ')).toBe(true)
- expect(isIterable('test')).toBe(true)
- expect(isIterable(undefined)).toBe(false)
- expect(isIterable(null)).toBe(false)
- expect(isIterable(0)).toBe(false)
- expect(isIterable([0, 1])).toBe(true)
- expect(isIterable({ 1: 1 })).toBe(false)
- expect(isIterable(new Map())).toBe(true)
- expect(isIterable(new Set())).toBe(true)
- expect(isIterable(new WeakMap())).toBe(false)
- expect(isIterable(new WeakSet())).toBe(false)
- })
-
await it('Verify isEmptyString()', () => {
expect(isEmptyString('')).toBe(true)
expect(isEmptyString(' ')).toBe(true)
await it('Verify isEmptyObject()', () => {
expect(isEmptyObject({})).toBe(true)
expect(isEmptyObject({ 1: 1, 2: 2 })).toBe(false)
+ expect(isEmptyObject([])).toBe(false)
+ expect(isEmptyObject([1, 2])).toBe(false)
expect(isEmptyObject(new Map())).toBe(false)
expect(isEmptyObject(new Set())).toBe(false)
expect(isEmptyObject(new WeakMap())).toBe(false)
--- /dev/null
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "./src/types/orm/entities",
+ "outDir": "./dist/types/orm/entities",
+ "declaration": true,
+ "sourceMap": true
+ },
+ "include": ["src/types/orm/entities/*.ts"],
+ "ts-node": {
+ "esm": true,
+ "transpileOnly": true
+ }
+}
+++ /dev/null
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "sourceMap": true
- }
-}
"module": "NodeNext",
"lib": ["es2022"],
"removeComments": true,
- "importHelpers": true,
"strict": true,
root: true,
env: {
- node: true,
+ node: true
},
plugins: ['import'],
'plugin:import/recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
- '@vue/eslint-config-prettier',
+ '@vue/eslint-config-prettier'
],
settings: {
'import/resolver': {
typescript: {
- project: './tsconfig.json',
- },
- },
+ project: './tsconfig.json'
+ }
+ }
},
parserOptions: {
- ecmaVersion: 'latest',
+ ecmaVersion: 'latest'
},
rules: {
'sort-imports': [
'error',
{
- ignoreDeclarationSort: true,
- },
+ ignoreDeclarationSort: true
+ }
],
- 'import/order': 'error',
- },
+ 'import/order': 'error'
+ }
})
export default {
'*.{.css,json,md,yml,yaml,html,js,jsx,cjs,mjs,ts,tsx,cts,mts}': 'prettier --cache --write',
'*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}':
- 'eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore',
+ 'eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore'
}
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
- "semi": false,
+ "arrowParens": "avoid",
"singleQuote": true,
- "trailingComma": "es5"
+ "semi": false,
+ "trailingComma": "none"
}
"pnpm": ">=8.6.0"
},
"volta": {
- "node": "20.10.0",
- "pnpm": "8.14.0"
+ "node": "20.11.0",
+ "pnpm": "8.14.1"
},
"pnpm": {
"overrides": {
"dependencies": {
"finalhandler": "^1.2.0",
"serve-static": "^1.15.0",
- "vue": "^3.4.7",
+ "vue": "^3.4.14",
"vue-router": "^4.2.5"
},
"devDependencies": {
- "@rushstack/eslint-patch": "^1.6.1",
+ "@rushstack/eslint-patch": "^1.7.0",
"@tsconfig/node20": "^20.1.2",
"@types/jsdom": "^21.1.6",
- "@types/node": "^20.10.8",
- "@typescript-eslint/eslint-plugin": "^6.18.1",
- "@typescript-eslint/parser": "^6.18.1",
- "@vitejs/plugin-vue": "^5.0.2",
+ "@types/node": "^20.11.5",
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
+ "@typescript-eslint/parser": "^6.19.0",
+ "@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
- "@vitest/coverage-v8": "^1.1.3",
+ "@vitest/coverage-v8": "^1.2.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.3",
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
- "eslint-plugin-vue": "^9.19.2",
+ "eslint-plugin-vue": "^9.20.1",
"jsdom": "^23.2.0",
- "prettier": "^3.1.1",
+ "prettier": "^3.2.3",
"rimraf": "^5.0.5",
"typescript": "~5.3.3",
"vite": "^5.0.11",
- "vitest": "^1.1.3"
+ "vitest": "^1.2.0"
},
"_id": "webui@0.1.1"
}
specifier: ^1.15.0
version: 1.15.0
vue:
- specifier: ^3.4.7
- version: 3.4.7(typescript@5.3.3)
+ specifier: ^3.4.14
+ version: 3.4.14(typescript@5.3.3)
vue-router:
specifier: ^4.2.5
- version: 4.2.5(vue@3.4.7)
+ version: 4.2.5(vue@3.4.14)
devDependencies:
'@rushstack/eslint-patch':
- specifier: ^1.6.1
- version: 1.6.1
+ specifier: ^1.7.0
+ version: 1.7.0
'@tsconfig/node20':
specifier: ^20.1.2
version: 20.1.2
specifier: ^21.1.6
version: 21.1.6
'@types/node':
- specifier: ^20.10.8
- version: 20.10.8
+ specifier: ^20.11.5
+ version: 20.11.5
'@typescript-eslint/eslint-plugin':
- specifier: ^6.18.1
- version: 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3)
+ specifier: ^6.19.0
+ version: 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/parser':
- specifier: ^6.18.1
- version: 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ specifier: ^6.19.0
+ version: 6.19.0(eslint@8.56.0)(typescript@5.3.3)
'@vitejs/plugin-vue':
- specifier: ^5.0.2
- version: 5.0.2(vite@5.0.11)(vue@3.4.7)
+ specifier: ^5.0.3
+ version: 5.0.3(vite@5.0.11)(vue@3.4.14)
'@vitejs/plugin-vue-jsx':
specifier: ^3.1.0
- version: 3.1.0(vite@5.0.11)(vue@3.4.7)
+ version: 3.1.0(vite@5.0.11)(vue@3.4.14)
'@vitest/coverage-v8':
- specifier: ^1.1.3
- version: 1.1.3(vitest@1.1.3)
+ specifier: ^1.2.0
+ version: 1.2.0(vitest@1.2.0)
'@vue/eslint-config-prettier':
specifier: ^9.0.0
- version: 9.0.0(eslint@8.56.0)(prettier@3.1.1)
+ version: 9.0.0(eslint@8.56.0)(prettier@3.2.3)
'@vue/eslint-config-typescript':
specifier: ^12.0.0
- version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3)
+ version: 12.0.0(eslint-plugin-vue@9.20.1)(eslint@8.56.0)(typescript@5.3.3)
'@vue/test-utils':
specifier: ^2.4.3
- version: 2.4.3(vue@3.4.7)
+ version: 2.4.3(vue@3.4.14)
'@vue/tsconfig':
specifier: ^0.5.1
version: 0.5.1
version: 2.1.0
eslint-import-resolver-typescript:
specifier: ^3.6.1
- version: 3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
+ version: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
eslint-plugin-import:
specifier: ^2.29.1
- version: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ version: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-vue:
- specifier: ^9.19.2
- version: 9.19.2(eslint@8.56.0)
+ specifier: ^9.20.1
+ version: 9.20.1(eslint@8.56.0)
jsdom:
specifier: ^23.2.0
version: 23.2.0
prettier:
- specifier: ^3.1.1
- version: 3.1.1
+ specifier: ^3.2.3
+ version: 3.2.3
rimraf:
specifier: ^5.0.5
version: 5.0.5
version: 5.3.3
vite:
specifier: ^5.0.11
- version: 5.0.11(@types/node@20.10.8)
+ version: 5.0.11(@types/node@20.11.5)
vitest:
- specifier: ^1.1.3
- version: 1.1.3(@types/node@20.10.8)(jsdom@23.2.0)
+ specifier: ^1.2.0
+ version: 1.2.0(@types/node@20.11.5)(jsdom@23.2.0)
packages:
engines: {node: '>=6.0.0'}
dependencies:
'@jridgewell/gen-mapping': 0.3.3
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.21
dev: true
- /@asamuzakjp/dom-selector@2.0.1:
- resolution: {integrity: sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==}
+ /@asamuzakjp/dom-selector@2.0.2:
+ resolution: {integrity: sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==}
dependencies:
bidi-js: 1.0.3
css-tree: 2.3.1
dependencies:
'@babel/types': 7.23.6
'@jridgewell/gen-mapping': 0.3.3
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.21
jsesc: 2.5.2
dev: true
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /@humanwhocodes/config-array@0.11.13:
- resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
+ /@humanwhocodes/config-array@0.11.14:
+ resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==}
engines: {node: '>=10.10.0'}
dependencies:
- '@humanwhocodes/object-schema': 2.0.1
+ '@humanwhocodes/object-schema': 2.0.2
debug: 4.3.4
minimatch: 3.1.2
transitivePeerDependencies:
engines: {node: '>=12.22'}
dev: true
- /@humanwhocodes/object-schema@2.0.1:
- resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==}
+ /@humanwhocodes/object-schema@2.0.2:
+ resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==}
dev: true
/@isaacs/cliui@8.0.2:
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.21
dev: true
/@jridgewell/resolve-uri@3.1.1:
/@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
- /@jridgewell/trace-mapping@0.3.20:
- resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==}
+ /@jridgewell/trace-mapping@0.3.21:
+ resolution: {integrity: sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==}
dependencies:
'@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
optional: true
- /@pkgr/core@0.1.0:
- resolution: {integrity: sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==}
+ /@pkgr/core@0.1.1:
+ resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
dev: true
- /@rollup/rollup-android-arm-eabi@4.9.4:
- resolution: {integrity: sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==}
+ /@rollup/rollup-android-arm-eabi@4.9.5:
+ resolution: {integrity: sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==}
cpu: [arm]
os: [android]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-android-arm64@4.9.4:
- resolution: {integrity: sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==}
+ /@rollup/rollup-android-arm64@4.9.5:
+ resolution: {integrity: sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-darwin-arm64@4.9.4:
- resolution: {integrity: sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==}
+ /@rollup/rollup-darwin-arm64@4.9.5:
+ resolution: {integrity: sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-darwin-x64@4.9.4:
- resolution: {integrity: sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==}
+ /@rollup/rollup-darwin-x64@4.9.5:
+ resolution: {integrity: sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-arm-gnueabihf@4.9.4:
- resolution: {integrity: sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==}
+ /@rollup/rollup-linux-arm-gnueabihf@4.9.5:
+ resolution: {integrity: sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-arm64-gnu@4.9.4:
- resolution: {integrity: sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==}
+ /@rollup/rollup-linux-arm64-gnu@4.9.5:
+ resolution: {integrity: sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-arm64-musl@4.9.4:
- resolution: {integrity: sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==}
+ /@rollup/rollup-linux-arm64-musl@4.9.5:
+ resolution: {integrity: sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-riscv64-gnu@4.9.4:
- resolution: {integrity: sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==}
+ /@rollup/rollup-linux-riscv64-gnu@4.9.5:
+ resolution: {integrity: sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==}
cpu: [riscv64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-x64-gnu@4.9.4:
- resolution: {integrity: sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==}
+ /@rollup/rollup-linux-x64-gnu@4.9.5:
+ resolution: {integrity: sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-linux-x64-musl@4.9.4:
- resolution: {integrity: sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==}
+ /@rollup/rollup-linux-x64-musl@4.9.5:
+ resolution: {integrity: sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-win32-arm64-msvc@4.9.4:
- resolution: {integrity: sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==}
+ /@rollup/rollup-win32-arm64-msvc@4.9.5:
+ resolution: {integrity: sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-win32-ia32-msvc@4.9.4:
- resolution: {integrity: sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==}
+ /@rollup/rollup-win32-ia32-msvc@4.9.5:
+ resolution: {integrity: sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /@rollup/rollup-win32-x64-msvc@4.9.4:
- resolution: {integrity: sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==}
+ /@rollup/rollup-win32-x64-msvc@4.9.5:
+ resolution: {integrity: sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
- /@rushstack/eslint-patch@1.6.1:
- resolution: {integrity: sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==}
+ /@rushstack/eslint-patch@1.7.0:
+ resolution: {integrity: sha512-Jh4t/593gxs0lJZ/z3NnasKlplXT2f+4y/LZYuaKZW5KAaiVFL/fThhs+17EbUd53jUVJ0QudYCBGbN/psvaqg==}
dev: true
/@sinclair/typebox@0.27.8:
/@types/jsdom@21.1.6:
resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==}
dependencies:
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
'@types/tough-cookie': 4.0.5
parse5: 7.1.2
dev: true
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
dev: true
- /@types/node@20.10.8:
- resolution: {integrity: sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA==}
+ /@types/node@20.11.5:
+ resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==}
dependencies:
undici-types: 5.26.5
dev: true
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
dev: true
- /@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA==}
+ /@typescript-eslint/eslint-plugin@6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
optional: true
dependencies:
'@eslint-community/regexpp': 4.10.0
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/type-utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/type-utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
graphemer: 1.4.0
- supports-color
dev: true
- /@typescript-eslint/parser@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==}
+ /@typescript-eslint/parser@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript:
optional: true
dependencies:
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
eslint: 8.56.0
typescript: 5.3.3
- supports-color
dev: true
- /@typescript-eslint/scope-manager@6.18.1:
- resolution: {integrity: sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==}
+ /@typescript-eslint/scope-manager@6.19.0:
+ resolution: {integrity: sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
dev: true
- /@typescript-eslint/type-utils@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q==}
+ /@typescript-eslint/type-utils@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
- '@typescript-eslint/utils': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
+ '@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
debug: 4.3.4
eslint: 8.56.0
ts-api-utils: 1.0.3(typescript@5.3.3)
- supports-color
dev: true
- /@typescript-eslint/types@6.18.1:
- resolution: {integrity: sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==}
+ /@typescript-eslint/types@6.19.0:
+ resolution: {integrity: sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
- /@typescript-eslint/typescript-estree@6.18.1(typescript@5.3.3):
- resolution: {integrity: sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA==}
+ /@typescript-eslint/typescript-estree@6.19.0(typescript@5.3.3):
+ resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/visitor-keys': 6.18.1
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/visitor-keys': 6.19.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
- supports-color
dev: true
- /@typescript-eslint/utils@6.18.1(eslint@8.56.0)(typescript@5.3.3):
- resolution: {integrity: sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ==}
+ /@typescript-eslint/utils@6.19.0(eslint@8.56.0)(typescript@5.3.3):
+ resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@types/json-schema': 7.0.15
'@types/semver': 7.5.6
- '@typescript-eslint/scope-manager': 6.18.1
- '@typescript-eslint/types': 6.18.1
- '@typescript-eslint/typescript-estree': 6.18.1(typescript@5.3.3)
+ '@typescript-eslint/scope-manager': 6.19.0
+ '@typescript-eslint/types': 6.19.0
+ '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3)
eslint: 8.56.0
semver: 7.5.4
transitivePeerDependencies:
- typescript
dev: true
- /@typescript-eslint/visitor-keys@6.18.1:
- resolution: {integrity: sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==}
+ /@typescript-eslint/visitor-keys@6.19.0:
+ resolution: {integrity: sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
- '@typescript-eslint/types': 6.18.1
+ '@typescript-eslint/types': 6.19.0
eslint-visitor-keys: 3.4.3
dev: true
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true
- /@vitejs/plugin-vue-jsx@3.1.0(vite@5.0.11)(vue@3.4.7):
+ /@vitejs/plugin-vue-jsx@3.1.0(vite@5.0.11)(vue@3.4.14):
resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
dependencies:
'@babel/core': 7.23.7
'@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.7)
- '@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.7)
- vite: 5.0.11(@types/node@20.10.8)
- vue: 3.4.7(typescript@5.3.3)
+ '@vue/babel-plugin-jsx': 1.1.6(@babel/core@7.23.7)
+ vite: 5.0.11(@types/node@20.11.5)
+ vue: 3.4.14(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
- /@vitejs/plugin-vue@5.0.2(vite@5.0.11)(vue@3.4.7):
- resolution: {integrity: sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==}
+ /@vitejs/plugin-vue@5.0.3(vite@5.0.11)(vue@3.4.14):
+ resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
vite: ^5.0.0
vue: ^3.2.25
dependencies:
- vite: 5.0.11(@types/node@20.10.8)
- vue: 3.4.7(typescript@5.3.3)
+ vite: 5.0.11(@types/node@20.11.5)
+ vue: 3.4.14(typescript@5.3.3)
dev: true
- /@vitest/coverage-v8@1.1.3(vitest@1.1.3):
- resolution: {integrity: sha512-Uput7t3eIcbSTOTQBzGtS+0kah96bX+szW9qQrLeGe3UmgL2Akn8POnyC2lH7XsnREZOds9aCUTxgXf+4HX5RA==}
+ /@vitest/coverage-v8@1.2.0(vitest@1.2.0):
+ resolution: {integrity: sha512-YvX8ULTUm1+zkvkl14IqXYGxE1h13OXKPoDsxazARKlp4YLrP28hHEBdplaU7ZTN/Yn6zy6Z3JadWNRJwcmyrQ==}
peerDependencies:
vitest: ^1.0.0
dependencies:
istanbul-lib-source-maps: 4.0.1
istanbul-reports: 3.1.6
magic-string: 0.30.5
- magicast: 0.3.2
+ magicast: 0.3.3
picocolors: 1.0.0
std-env: 3.7.0
test-exclude: 6.0.0
v8-to-istanbul: 9.2.0
- vitest: 1.1.3(@types/node@20.10.8)(jsdom@23.2.0)
+ vitest: 1.2.0(@types/node@20.11.5)(jsdom@23.2.0)
transitivePeerDependencies:
- supports-color
dev: true
- /@vitest/expect@1.1.3:
- resolution: {integrity: sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==}
+ /@vitest/expect@1.2.0:
+ resolution: {integrity: sha512-H+2bHzhyvgp32o7Pgj2h9RTHN0pgYaoi26Oo3mE+dCi1PAqV31kIIVfTbqMO3Bvshd5mIrJLc73EwSRrbol9Lw==}
dependencies:
- '@vitest/spy': 1.1.3
- '@vitest/utils': 1.1.3
- chai: 4.4.0
+ '@vitest/spy': 1.2.0
+ '@vitest/utils': 1.2.0
+ chai: 4.4.1
dev: true
- /@vitest/runner@1.1.3:
- resolution: {integrity: sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==}
+ /@vitest/runner@1.2.0:
+ resolution: {integrity: sha512-vaJkDoQaNUTroT70OhM0NPznP7H3WyRwt4LvGwCVYs/llLaqhoSLnlIhUClZpbF5RgAee29KRcNz0FEhYcgxqA==}
dependencies:
- '@vitest/utils': 1.1.3
+ '@vitest/utils': 1.2.0
p-limit: 5.0.0
- pathe: 1.1.1
+ pathe: 1.1.2
dev: true
- /@vitest/snapshot@1.1.3:
- resolution: {integrity: sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==}
+ /@vitest/snapshot@1.2.0:
+ resolution: {integrity: sha512-P33EE7TrVgB3HDLllrjK/GG6WSnmUtWohbwcQqmm7TAk9AVHpdgf7M3F3qRHKm6vhr7x3eGIln7VH052Smo6Kw==}
dependencies:
magic-string: 0.30.5
- pathe: 1.1.1
+ pathe: 1.1.2
pretty-format: 29.7.0
dev: true
- /@vitest/spy@1.1.3:
- resolution: {integrity: sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==}
+ /@vitest/spy@1.2.0:
+ resolution: {integrity: sha512-MNxSAfxUaCeowqyyGwC293yZgk7cECZU9wGb8N1pYQ0yOn/SIr8t0l9XnGRdQZvNV/ZHBYu6GO/W3tj5K3VN1Q==}
dependencies:
tinyspy: 2.2.0
dev: true
- /@vitest/utils@1.1.3:
- resolution: {integrity: sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==}
+ /@vitest/utils@1.2.0:
+ resolution: {integrity: sha512-FyD5bpugsXlwVpTcGLDf3wSPYy8g541fQt14qtzo8mJ4LdEpDKZ9mQy2+qdJm2TZRpjY5JLXihXCgIxiRJgi5g==}
dependencies:
diff-sequences: 29.6.3
estree-walker: 3.0.3
pretty-format: 29.7.0
dev: true
- /@vue/babel-helper-vue-transform-on@1.1.5:
- resolution: {integrity: sha512-SgUymFpMoAyWeYWLAY+MkCK3QEROsiUnfaw5zxOVD/M64KQs8D/4oK6Q5omVA2hnvEOE0SCkH2TZxs/jnnUj7w==}
+ /@vue/babel-helper-vue-transform-on@1.1.6:
+ resolution: {integrity: sha512-XxM2tZHjYHTd9yiKHHt7fKCN0e2BK2z78UxU5rpjH3YCstEV/tcrW29CaOdrxIdeD0c/9mHHebvXWwDxlphjKA==}
dev: true
- /@vue/babel-plugin-jsx@1.1.5(@babel/core@7.23.7):
- resolution: {integrity: sha512-nKs1/Bg9U1n3qSWnsHhCVQtAzI6aQXqua8j/bZrau8ywT1ilXQbK4FwEJGmU8fV7tcpuFvWmmN7TMmV1OBma1g==}
+ /@vue/babel-plugin-jsx@1.1.6(@babel/core@7.23.7):
+ resolution: {integrity: sha512-s2pK8Wwg0LiR25lyCKWGJePt8aXF0DsXOmTHYJnlKNdT3yTKfdvkKmsWjaHBctFvwWmetedObrAoINc9BeYZlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
+ peerDependenciesMeta:
+ '@babel/core':
+ optional: true
dependencies:
'@babel/core': 7.23.7
'@babel/helper-module-imports': 7.22.15
'@babel/template': 7.22.15
'@babel/traverse': 7.23.7
'@babel/types': 7.23.6
- '@vue/babel-helper-vue-transform-on': 1.1.5
+ '@vue/babel-helper-vue-transform-on': 1.1.6
camelcase: 6.3.0
html-tags: 3.3.1
svg-tags: 1.0.0
- supports-color
dev: true
- /@vue/compiler-core@3.4.7:
- resolution: {integrity: sha512-hhCaE3pTMrlIJK7M/o3Xf7HV8+JoNTGOQ/coWS+V+pH6QFFyqtoXqQzpqsNp7UK17xYKua/MBiKj4e1vgZOBYw==}
+ /@vue/compiler-core@3.4.14:
+ resolution: {integrity: sha512-ro4Zzl/MPdWs7XwxT7omHRxAjMbDFRZEEjD+2m3NBf8YzAe3HuoSEZosXQo+m1GQ1G3LQ1LdmNh1RKTYe+ssEg==}
dependencies:
'@babel/parser': 7.23.6
- '@vue/shared': 3.4.7
+ '@vue/shared': 3.4.14
entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.0.2
- /@vue/compiler-dom@3.4.7:
- resolution: {integrity: sha512-qDKBAIurCTub4n/6jDYkXwgsFuriqqmmLrIq1N2QDfYJA/mwiwvxi09OGn28g+uDdERX9NaKDLji0oTjE3sScg==}
+ /@vue/compiler-dom@3.4.14:
+ resolution: {integrity: sha512-nOZTY+veWNa0DKAceNWxorAbWm0INHdQq7cejFaWM1WYnoNSJbSEKYtE7Ir6lR/+mo9fttZpPVI9ZFGJ1juUEQ==}
dependencies:
- '@vue/compiler-core': 3.4.7
- '@vue/shared': 3.4.7
+ '@vue/compiler-core': 3.4.14
+ '@vue/shared': 3.4.14
- /@vue/compiler-sfc@3.4.7:
- resolution: {integrity: sha512-Gec6CLkReVswDYjQFq79O5rktri4R7TsD/VPCiUoJw40JhNNxaNJJa8mrQrWoJluW4ETy6QN0NUyC/JO77OCOw==}
+ /@vue/compiler-sfc@3.4.14:
+ resolution: {integrity: sha512-1vHc9Kv1jV+YBZC/RJxQJ9JCxildTI+qrhtDh6tPkR1O8S+olBUekimY0km0ZNn8nG1wjtFAe9XHij+YLR8cRQ==}
dependencies:
'@babel/parser': 7.23.6
- '@vue/compiler-core': 3.4.7
- '@vue/compiler-dom': 3.4.7
- '@vue/compiler-ssr': 3.4.7
- '@vue/shared': 3.4.7
+ '@vue/compiler-core': 3.4.14
+ '@vue/compiler-dom': 3.4.14
+ '@vue/compiler-ssr': 3.4.14
+ '@vue/shared': 3.4.14
estree-walker: 2.0.2
magic-string: 0.30.5
postcss: 8.4.33
source-map-js: 1.0.2
- /@vue/compiler-ssr@3.4.7:
- resolution: {integrity: sha512-PvYeSOvnCkST5mGS0TLwEn5w+4GavtEn6adcq8AspbHaIr+mId5hp7cG3ASy3iy8b+LuXEG2/QaV/nj5BQ/Aww==}
+ /@vue/compiler-ssr@3.4.14:
+ resolution: {integrity: sha512-bXT6+oAGlFjTYVOTtFJ4l4Jab1wjsC0cfSfOe2B4Z0N2vD2zOBSQ9w694RsCfhjk+bC2DY5Gubb1rHZVii107Q==}
dependencies:
- '@vue/compiler-dom': 3.4.7
- '@vue/shared': 3.4.7
+ '@vue/compiler-dom': 3.4.14
+ '@vue/shared': 3.4.14
/@vue/devtools-api@6.5.1:
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
dev: false
- /@vue/eslint-config-prettier@9.0.0(eslint@8.56.0)(prettier@3.1.1):
+ /@vue/eslint-config-prettier@9.0.0(eslint@8.56.0)(prettier@3.2.3):
resolution: {integrity: sha512-z1ZIAAUS9pKzo/ANEfd2sO+v2IUalz7cM/cTLOZ7vRFOPk5/xuRKQteOu1DErFLAh/lYGXMVZ0IfYKlyInuDVg==}
peerDependencies:
eslint: '>= 8.0.0'
dependencies:
eslint: 8.56.0
eslint-config-prettier: 9.1.0(eslint@8.56.0)
- eslint-plugin-prettier: 5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1)
- prettier: 3.1.1
+ eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.3)
+ prettier: 3.2.3
transitivePeerDependencies:
- '@types/eslint'
dev: true
- /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3):
+ /@vue/eslint-config-typescript@12.0.0(eslint-plugin-vue@9.20.1)(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
typescript:
optional: true
dependencies:
- '@typescript-eslint/eslint-plugin': 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3)
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
eslint: 8.56.0
- eslint-plugin-vue: 9.19.2(eslint@8.56.0)
+ eslint-plugin-vue: 9.20.1(eslint@8.56.0)
typescript: 5.3.3
vue-eslint-parser: 9.4.0(eslint@8.56.0)
transitivePeerDependencies:
- supports-color
dev: true
- /@vue/reactivity@3.4.7:
- resolution: {integrity: sha512-F539DO0ogH0+L8F9Pnw7cjqibcmSOh5UTk16u5f4MKQ8fraqepI9zdh+sozPX6VmEHOcjo8qw3Or9ZcFFw4SZA==}
+ /@vue/reactivity@3.4.14:
+ resolution: {integrity: sha512-xRYwze5Q4tK7tT2J4uy4XLhK/AIXdU5EBUu9PLnIHcOKXO0uyXpNNMzlQKuq7B+zwtq6K2wuUL39pHA6ZQzObw==}
dependencies:
- '@vue/shared': 3.4.7
+ '@vue/shared': 3.4.14
- /@vue/runtime-core@3.4.7:
- resolution: {integrity: sha512-QMMsWRQaD3BpGyjjChthpl4Mji4Fjx1qfdufsXlDkKU3HV+hWNor2z+29F+E1MmVcP0ZfRZUfqYgtsQoL7IGwQ==}
+ /@vue/runtime-core@3.4.14:
+ resolution: {integrity: sha512-qu+NMkfujCoZL6cfqK5NOfxgXJROSlP2ZPs4CTcVR+mLrwl4TtycF5Tgo0QupkdBL+2kigc6EsJlTcuuZC1NaQ==}
dependencies:
- '@vue/reactivity': 3.4.7
- '@vue/shared': 3.4.7
+ '@vue/reactivity': 3.4.14
+ '@vue/shared': 3.4.14
- /@vue/runtime-dom@3.4.7:
- resolution: {integrity: sha512-XwegyUY1rw8zxsX1Z36vwYcqo+uOgih5ti7y9vx+pPFhNdSQmN4LqK2RmSeAJG1oKV8NqSUmjpv92f/x6h0SeQ==}
+ /@vue/runtime-dom@3.4.14:
+ resolution: {integrity: sha512-B85XmcR4E7XsirEHVqhmy4HPbRT9WLFWV9Uhie3OapV9m1MEN9+Er6hmUIE6d8/l2sUygpK9RstFM2bmHEUigA==}
dependencies:
- '@vue/runtime-core': 3.4.7
- '@vue/shared': 3.4.7
+ '@vue/runtime-core': 3.4.14
+ '@vue/shared': 3.4.14
csstype: 3.1.3
- /@vue/server-renderer@3.4.7(vue@3.4.7):
- resolution: {integrity: sha512-3bWnYLEkLLhkDWqvNk7IvbQD4UcxvFKxELBiOO2iG3m6AniFIsBWfHOO5tLVQnjdWkODu4rq0GipmfEenVAK5Q==}
+ /@vue/server-renderer@3.4.14(vue@3.4.14):
+ resolution: {integrity: sha512-pwSKXQfYdJBTpvWHGEYI+akDE18TXAiLcGn+Q/2Fj8wQSHWztoo7PSvfMNqu6NDhp309QXXbPFEGCU5p85HqkA==}
peerDependencies:
- vue: 3.4.7
+ vue: 3.4.14
dependencies:
- '@vue/compiler-ssr': 3.4.7
- '@vue/shared': 3.4.7
- vue: 3.4.7(typescript@5.3.3)
+ '@vue/compiler-ssr': 3.4.14
+ '@vue/shared': 3.4.14
+ vue: 3.4.14(typescript@5.3.3)
- /@vue/shared@3.4.7:
- resolution: {integrity: sha512-G+i4glX1dMJk88sbJEcQEGWRQnVm9eIY7CcQbO5dpdsD9SF8jka3Mr5OqZYGjczGN1+D6EUwdu6phcmcx9iuPA==}
+ /@vue/shared@3.4.14:
+ resolution: {integrity: sha512-nmi3BtLpvqXAWoRZ6HQ+pFJOHBU4UnH3vD3opgmwXac7vhaHKA9nj1VeGjMggdB9eLtW83eHyPCmOU1qzdsC7Q==}
- /@vue/test-utils@2.4.3(vue@3.4.7):
+ /@vue/test-utils@2.4.3(vue@3.4.14):
resolution: {integrity: sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==}
peerDependencies:
'@vue/server-renderer': ^3.0.1
optional: true
dependencies:
js-beautify: 1.14.11
- vue: 3.4.7(typescript@5.3.3)
+ vue: 3.4.14(typescript@5.3.3)
vue-component-type-helpers: 1.8.27
dev: true
acorn: 8.11.3
dev: true
- /acorn-walk@8.3.1:
- resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==}
+ /acorn-walk@8.3.2:
+ resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
engines: {node: '>=0.4.0'}
dev: true
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
- caniuse-lite: 1.0.30001576
- electron-to-chromium: 1.4.625
+ caniuse-lite: 1.0.30001578
+ electron-to-chromium: 1.4.634
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.2)
dev: true
dependencies:
function-bind: 1.1.2
get-intrinsic: 1.2.2
- set-function-length: 1.1.1
+ set-function-length: 1.2.0
dev: true
/callsites@3.1.0:
engines: {node: '>=10'}
dev: true
- /caniuse-lite@1.0.30001576:
- resolution: {integrity: sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==}
+ /caniuse-lite@1.0.30001578:
+ resolution: {integrity: sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg==}
dev: true
- /chai@4.4.0:
- resolution: {integrity: sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==}
+ /chai@4.4.1:
+ resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==}
engines: {node: '>=4'}
dependencies:
assertion-error: 1.1.0
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
dev: false
- /electron-to-chromium@1.4.625:
- resolution: {integrity: sha512-DENMhh3MFgaPDoXWrVIqSPInQoLImywfCwrSmVl3cf9QHzoZSiutHwGaB/Ql3VkqcQV30rzgdM+BjKqBAJxo5Q==}
+ /electron-to-chromium@1.4.634:
+ resolution: {integrity: sha512-gQNahJfF5AE4MZo+pMSwmnwkzVZ+F4ZGGj4Z/MMddOXVQM0y9OHy6ts3W9SDzAJaiZM3p6eixn5ABCQ+AfXzcQ==}
dev: true
/emoji-regex@8.0.0:
object-keys: 1.1.1
object.assign: 4.1.5
regexp.prototype.flags: 1.5.1
- safe-array-concat: 1.0.1
- safe-regex-test: 1.0.0
+ safe-array-concat: 1.1.0
+ safe-regex-test: 1.0.2
string.prototype.trim: 1.2.8
string.prototype.trimend: 1.0.7
string.prototype.trimstart: 1.0.7
- supports-color
dev: true
- /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
+ /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
debug: 4.3.4
enhanced-resolve: 5.15.0
eslint: 8.56.0
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.2
is-core-module: 2.13.1
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
debug: 3.2.7
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
+ eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.0)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
+ /eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3)
+ '@typescript-eslint/parser': 6.19.0(eslint@8.56.0)(typescript@5.3.3)
array-includes: 3.1.7
array.prototype.findlastindex: 1.2.3
array.prototype.flat: 1.3.2
doctrine: 2.1.0
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.18.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
hasown: 2.0.0
is-core-module: 2.13.1
is-glob: 4.0.3
- supports-color
dev: true
- /eslint-plugin-prettier@5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1):
- resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
+ /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.3):
+ resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
'@types/eslint': '>=8.0.0'
dependencies:
eslint: 8.56.0
eslint-config-prettier: 9.1.0(eslint@8.56.0)
- prettier: 3.1.1
+ prettier: 3.2.3
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
dev: true
- /eslint-plugin-vue@9.19.2(eslint@8.56.0):
- resolution: {integrity: sha512-CPDqTOG2K4Ni2o4J5wixkLVNwgctKXFu6oBpVJlpNq7f38lh9I80pRTouZSJ2MAebPJlINU/KTFSXyQfBUlymA==}
+ /eslint-plugin-vue@9.20.1(eslint@8.56.0):
+ resolution: {integrity: sha512-GyCs8K3lkEvoyC1VV97GJhP1SvqsKCiWGHnbn0gVUYiUhaH2+nB+Dv1uekv1THFMPbBfYxukrzQdltw950k+LQ==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
'@eslint-community/regexpp': 4.10.0
'@eslint/eslintrc': 2.1.4
'@eslint/js': 8.56.0
- '@humanwhocodes/config-array': 0.11.13
+ '@humanwhocodes/config-array': 0.11.14
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
'@ungap/structured-clone': 1.2.0
canvas:
optional: true
dependencies:
- '@asamuzakjp/dom-selector': 2.0.1
+ '@asamuzakjp/dom-selector': 2.0.2
cssstyle: 4.0.1
data-urls: 5.0.0
decimal.js: 10.4.3
resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
engines: {node: '>=14'}
dependencies:
- mlly: 1.4.2
+ mlly: 1.5.0
pkg-types: 1.0.3
dev: true
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
- /magicast@0.3.2:
- resolution: {integrity: sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==}
+ /magicast@0.3.3:
+ resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==}
dependencies:
'@babel/parser': 7.23.6
'@babel/types': 7.23.6
engines: {node: '>=16 || 14 >=14.17'}
dev: true
- /mlly@1.4.2:
- resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
+ /mlly@1.5.0:
+ resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==}
dependencies:
acorn: 8.11.3
- pathe: 1.1.1
+ pathe: 1.1.2
pkg-types: 1.0.3
ufo: 1.3.2
dev: true
engines: {node: '>=8'}
dev: true
- /pathe@1.1.1:
- resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==}
+ /pathe@1.1.2:
+ resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
dev: true
/pathval@1.1.1:
resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
dependencies:
jsonc-parser: 3.2.0
- mlly: 1.4.2
- pathe: 1.1.1
+ mlly: 1.5.0
+ pathe: 1.1.2
dev: true
/postcss-selector-parser@6.0.15:
fast-diff: 1.3.0
dev: true
- /prettier@3.1.1:
- resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==}
+ /prettier@3.2.3:
+ resolution: {integrity: sha512-QNhUTBq+mqt1oH1dTfY3phOKNhcDdJkfttHI6u0kj7M2+c+7fmNKlgh2GhnHiqMcbxJ+a0j2igz/2jfl9QKLuw==}
engines: {node: '>=14'}
hasBin: true
dev: true
glob: 10.3.10
dev: true
- /rollup@4.9.4:
- resolution: {integrity: sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==}
+ /rollup@4.9.5:
+ resolution: {integrity: sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
dependencies:
'@types/estree': 1.0.5
optionalDependencies:
- '@rollup/rollup-android-arm-eabi': 4.9.4
- '@rollup/rollup-android-arm64': 4.9.4
- '@rollup/rollup-darwin-arm64': 4.9.4
- '@rollup/rollup-darwin-x64': 4.9.4
- '@rollup/rollup-linux-arm-gnueabihf': 4.9.4
- '@rollup/rollup-linux-arm64-gnu': 4.9.4
- '@rollup/rollup-linux-arm64-musl': 4.9.4
- '@rollup/rollup-linux-riscv64-gnu': 4.9.4
- '@rollup/rollup-linux-x64-gnu': 4.9.4
- '@rollup/rollup-linux-x64-musl': 4.9.4
- '@rollup/rollup-win32-arm64-msvc': 4.9.4
- '@rollup/rollup-win32-ia32-msvc': 4.9.4
- '@rollup/rollup-win32-x64-msvc': 4.9.4
+ '@rollup/rollup-android-arm-eabi': 4.9.5
+ '@rollup/rollup-android-arm64': 4.9.5
+ '@rollup/rollup-darwin-arm64': 4.9.5
+ '@rollup/rollup-darwin-x64': 4.9.5
+ '@rollup/rollup-linux-arm-gnueabihf': 4.9.5
+ '@rollup/rollup-linux-arm64-gnu': 4.9.5
+ '@rollup/rollup-linux-arm64-musl': 4.9.5
+ '@rollup/rollup-linux-riscv64-gnu': 4.9.5
+ '@rollup/rollup-linux-x64-gnu': 4.9.5
+ '@rollup/rollup-linux-x64-musl': 4.9.5
+ '@rollup/rollup-win32-arm64-msvc': 4.9.5
+ '@rollup/rollup-win32-ia32-msvc': 4.9.5
+ '@rollup/rollup-win32-x64-msvc': 4.9.5
fsevents: 2.3.3
dev: true
queue-microtask: 1.2.3
dev: true
- /safe-array-concat@1.0.1:
- resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==}
+ /safe-array-concat@1.1.0:
+ resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==}
engines: {node: '>=0.4'}
dependencies:
call-bind: 1.0.5
isarray: 2.0.5
dev: true
- /safe-regex-test@1.0.0:
- resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
+ /safe-regex-test@1.0.2:
+ resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==}
+ engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.5
get-intrinsic: 1.2.2
- supports-color
dev: false
- /set-function-length@1.1.1:
- resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==}
+ /set-function-length@1.2.0:
+ resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==}
engines: {node: '>= 0.4'}
dependencies:
define-data-property: 1.1.1
+ function-bind: 1.1.2
get-intrinsic: 1.2.2
gopd: 1.0.1
has-property-descriptors: 1.0.1
resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
engines: {node: ^14.18.0 || >=16.0.0}
dependencies:
- '@pkgr/core': 0.1.0
+ '@pkgr/core': 0.1.1
tslib: 2.6.2
dev: true
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true
- /tinybench@2.5.1:
- resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==}
+ /tinybench@2.6.0:
+ resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}
dev: true
/tinypool@0.8.1:
resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==}
engines: {node: '>=10.12.0'}
dependencies:
- '@jridgewell/trace-mapping': 0.3.20
+ '@jridgewell/trace-mapping': 0.3.21
'@types/istanbul-lib-coverage': 2.0.6
convert-source-map: 2.0.0
dev: true
- /vite-node@1.1.3(@types/node@20.10.8):
- resolution: {integrity: sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==}
+ /vite-node@1.2.0(@types/node@20.11.5):
+ resolution: {integrity: sha512-ETnQTHeAbbOxl7/pyBck9oAPZZZo+kYnFt1uQDD+hPReOc+wCjXw4r4jHriBRuVDB5isHmPXxrfc1yJnfBERqg==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4
- pathe: 1.1.1
+ pathe: 1.1.2
picocolors: 1.0.0
- vite: 5.0.11(@types/node@20.10.8)
+ vite: 5.0.11(@types/node@20.11.5)
transitivePeerDependencies:
- '@types/node'
- less
- terser
dev: true
- /vite@5.0.11(@types/node@20.10.8):
+ /vite@5.0.11(@types/node@20.11.5):
resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
terser:
optional: true
dependencies:
- '@types/node': 20.10.8
+ '@types/node': 20.11.5
esbuild: 0.19.11
postcss: 8.4.33
- rollup: 4.9.4
+ rollup: 4.9.5
optionalDependencies:
fsevents: 2.3.3
dev: true
- /vitest@1.1.3(@types/node@20.10.8)(jsdom@23.2.0):
- resolution: {integrity: sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==}
+ /vitest@1.2.0(@types/node@20.11.5)(jsdom@23.2.0):
+ resolution: {integrity: sha512-Ixs5m7BjqvLHXcibkzKRQUvD/XLw0E3rvqaCMlrm/0LMsA0309ZqYvTlPzkhh81VlEyVZXFlwWnkhb6/UMtcaQ==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
jsdom:
optional: true
dependencies:
- '@types/node': 20.10.8
- '@vitest/expect': 1.1.3
- '@vitest/runner': 1.1.3
- '@vitest/snapshot': 1.1.3
- '@vitest/spy': 1.1.3
- '@vitest/utils': 1.1.3
- acorn-walk: 8.3.1
+ '@types/node': 20.11.5
+ '@vitest/expect': 1.2.0
+ '@vitest/runner': 1.2.0
+ '@vitest/snapshot': 1.2.0
+ '@vitest/spy': 1.2.0
+ '@vitest/utils': 1.2.0
+ acorn-walk: 8.3.2
cac: 6.7.14
- chai: 4.4.0
+ chai: 4.4.1
debug: 4.3.4
execa: 8.0.1
jsdom: 23.2.0
local-pkg: 0.5.0
magic-string: 0.30.5
- pathe: 1.1.1
+ pathe: 1.1.2
picocolors: 1.0.0
std-env: 3.7.0
strip-literal: 1.3.0
- tinybench: 2.5.1
+ tinybench: 2.6.0
tinypool: 0.8.1
- vite: 5.0.11(@types/node@20.10.8)
- vite-node: 1.1.3(@types/node@20.10.8)
+ vite: 5.0.11(@types/node@20.11.5)
+ vite-node: 1.2.0(@types/node@20.11.5)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- supports-color
dev: true
- /vue-router@4.2.5(vue@3.4.7):
+ /vue-router@4.2.5(vue@3.4.14):
resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.5.1
- vue: 3.4.7(typescript@5.3.3)
+ vue: 3.4.14(typescript@5.3.3)
dev: false
- /vue@3.4.7(typescript@5.3.3):
- resolution: {integrity: sha512-4urmkWpudekq0CPNMO7p6mBGa9qmTXwJMO2r6CT4EzIJVG7WoSReiysiNb7OSi/WI113oX0Srn9Rz1k/DCXKFQ==}
+ /vue@3.4.14(typescript@5.3.3):
+ resolution: {integrity: sha512-Rop5Al/ZcBbBz+KjPZaZDgHDX0kUP4duEzDbm+1o91uxYUNmJrZSBuegsNIJvUGy+epLevNRNhLjm08VKTgGyw==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@vue/compiler-dom': 3.4.7
- '@vue/compiler-sfc': 3.4.7
- '@vue/runtime-dom': 3.4.7
- '@vue/server-renderer': 3.4.7(vue@3.4.7)
- '@vue/shared': 3.4.7
+ '@vue/compiler-dom': 3.4.14
+ '@vue/compiler-sfc': 3.4.14
+ '@vue/runtime-dom': 3.4.14
+ '@vue/server-renderer': 3.4.14(vue@3.4.14)
+ '@vue/shared': 3.4.14
typescript: 5.3.3
/w3c-xmlserializer@5.0.0:
uiServer: {
host: 'localhost',
port: 8080,
- protocol: 'ui0.0.1',
- },
+ protocol: 'ui0.0.1'
+ }
}
export default config
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus,
+ ResponseStatus
} from '@/types'
import config from '@/assets/config'
public async openConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
- hashIds: [hashId],
+ hashIds: [hashId]
})
}
public async closeConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
- hashIds: [hashId],
+ hashIds: [hashId]
})
}
return this.sendRequest(ProcedureName.START_TRANSACTION, {
hashIds: [hashId],
connectorId,
- idTag,
+ idTag
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_TRANSACTION, {
hashIds: [hashId],
- transactionId,
+ transactionId
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId],
+ connectorIds: [connectorId]
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId],
+ connectorIds: [connectorId]
})
}
config.uiServer.protocol
)
this.ws.onmessage = this.responseHandler.bind(this)
- this.ws.onerror = (errorEvent) => {
+ this.ws.onerror = errorEvent => {
console.error('WebSocket error: ', errorEvent)
}
- this.ws.onclose = (closeEvent) => {
+ this.ws.onclose = closeEvent => {
console.info('WebSocket closed: ', closeEvent)
}
}
return value as T
}
-// const isIterable = <T>(obj: T): boolean => {
-// if (obj == null) {
-// return false
-// }
-// return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function'
-// }
-
-// const ifNotIterableDo = <T>(obj: T, cb: () => void): void => {
-// if (isIterable(obj) === false) cb()
-// }
-
// export const compose = <T>(...fns: ((arg: T) => T)[]): ((x: T) => T) => {
// return (x: T) => fns.reduceRight((y, fn) => fn(y), x)
// }
{
path: '/',
name: 'charging-stations',
- component: ChargingStationsView,
- },
+ component: ChargingStationsView
+ }
]
const router = createRouter({
history: createWebHistory(),
- routes,
+ routes
})
export default router
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
- Installed = 'Installed',
+ Installed = 'Installed'
}
export const FirmwareStatus = {
- ...OCPP16FirmwareStatus,
+ ...OCPP16FirmwareStatus
} as const
export type FirmwareStatus = OCPP16FirmwareStatus
REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
GET_DIAGNOSTICS = 'GetDiagnostics',
- TRIGGER_MESSAGE = 'TriggerMessage',
+ TRIGGER_MESSAGE = 'TriggerMessage'
}
export const IncomingRequestCommand = {
- ...OCPP16IncomingRequestCommand,
+ ...OCPP16IncomingRequestCommand
} as const
export type IncomingRequestCommand = OCPP16IncomingRequestCommand
START_TRANSACTION = 'StartTransaction',
STOP_TRANSACTION = 'StopTransaction',
METER_VALUES = 'MeterValues',
- DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
+ DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification'
}
export const RequestCommand = {
- ...OCPP16RequestCommand,
+ ...OCPP16RequestCommand
} as const
export type RequestCommand = OCPP16RequestCommand
export enum OCPP16RegistrationStatus {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
- REJECTED = 'Rejected',
+ REJECTED = 'Rejected'
}
export interface OCPP16BootNotificationResponse extends JsonObject {
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
- StatusNotification = 'StatusNotification',
+ StatusNotification = 'StatusNotification'
}
export const MessageTrigger = {
- ...OCPP16MessageTrigger,
+ ...OCPP16MessageTrigger
} as const
export type MessageTrigger = OCPP16MessageTrigger
export enum OCPPVersion {
VERSION_16 = '1.6',
- VERSION_20 = '2.0',
+ VERSION_20 = '2.0'
}
export enum OCPPProtocol {
- JSON = 'json',
+ JSON = 'json'
}
export enum CurrentType {
AC = 'AC',
- DC = 'DC',
+ DC = 'DC'
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
- VOLTAGE_800 = 800,
+ VOLTAGE_800 = 800
}
export enum AmpereUnits {
MILLI_AMPERE = 'mA',
CENTI_AMPERE = 'cA',
DECI_AMPERE = 'dA',
- AMPERE = 'A',
+ AMPERE = 'A'
}
export type ConnectorStatus = {
export enum OCPP16AvailabilityType {
INOPERATIVE = 'Inoperative',
- OPERATIVE = 'Operative',
+ OPERATIVE = 'Operative'
}
export type AvailabilityType = OCPP16AvailabilityType
FINISHING = 'Finishing',
RESERVED = 'Reserved',
UNAVAILABLE = 'Unavailable',
- FAULTED = 'Faulted',
+ FAULTED = 'Faulted'
}
export type ChargePointStatus = OCPP16ChargePointStatus
import type { JsonObject } from './JsonType'
export enum Protocol {
- UI = 'ui',
+ UI = 'ui'
}
export enum ApplicationProtocol {
HTTP = 'http',
- WS = 'ws',
+ WS = 'ws'
}
export enum ProtocolVersion {
- '0.0.1' = '0.0.1',
+ '0.0.1' = '0.0.1'
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator',
STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator',
START_TRANSACTION = 'startTransaction',
- STOP_TRANSACTION = 'stopTransaction',
+ STOP_TRANSACTION = 'stopTransaction'
}
export interface RequestPayload extends JsonObject {
export enum ResponseStatus {
SUCCESS = 'success',
- FAILURE = 'failure',
+ FAILURE = 'failure'
}
export interface ResponsePayload extends JsonObject {
export type {
ChargingStationData,
ChargingStationInfo,
- ConnectorStatus,
+ ConnectorStatus
} from './ChargingStationType'
export type { BaseConfig } from './ConfigurationType'
export {
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus,
+ ResponseStatus
} from './UIProtocol'
const state: State = reactive({
isLoading: false,
chargingStations: [],
- idTag: '',
+ idTag: ''
})
async function load(): Promise<void> {
test('renders CS table columns name', () => {
const chargingStations: ChargingStationData[] = []
const wrapper = shallowMount(CSTable, {
- props: { chargingStations, idTag: '0' },
+ props: { chargingStations, idTag: '0' }
})
expect(wrapper.text()).to.include('Action')
expect(wrapper.text()).to.include('Connector')
plugins: [vue(), vueJsx()],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
- },
- },
+ '@': fileURLToPath(new URL('./src', import.meta.url))
+ }
+ }
})
root: fileURLToPath(new URL('./', import.meta.url)),
coverage: {
provider: 'v8',
- reporter: ['text', 'lcov'],
- },
- },
+ reporter: ['text', 'lcov']
+ }
+ }
})
)