Skip to content

Commit

Permalink
build(deps-dev): apply updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
Jérôme Benoit committed May 8, 2023
1 parent 7a5cfff commit 7436ee0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^43.2.0",
"eslint-plugin-jsdoc": "^44.0.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/charging-station/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ export class Bootstrap {
const stationTemplateUrls = Configuration.getStationTemplateUrls();
if (Utils.isNotEmptyArray(stationTemplateUrls)) {
this.numberOfChargingStationTemplates = stationTemplateUrls.length;
stationTemplateUrls.forEach((stationTemplateUrl) => {
for (const stationTemplateUrl of stationTemplateUrls) {
this.numberOfChargingStations += stationTemplateUrl.numberOfStations ?? 0;
});
}
} else {
console.warn(
chalk.yellow("'stationTemplateUrls' not defined or empty in configuration, exiting")
Expand Down
18 changes: 10 additions & 8 deletions src/utils/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,17 @@ export class Configuration {
(Configuration.getConfig().stationTemplateUrls = Configuration.getConfig()[
'stationTemplateURLs'
] as StationTemplateUrl[]);
Configuration.getConfig().stationTemplateUrls.forEach((stationUrl: StationTemplateUrl) => {
if (!Utils.isUndefined(stationUrl['numberOfStation'])) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key 'numberOfStation' usage for template file '${
stationUrl.file
}' in 'stationTemplateUrls'. Use 'numberOfStations' instead}`
);
Configuration.getConfig().stationTemplateUrls.forEach(
(stationTemplateUrl: StationTemplateUrl) => {
if (!Utils.isUndefined(stationTemplateUrl['numberOfStation'])) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key 'numberOfStation' usage for template file '${
stationTemplateUrl.file
}' in 'stationTemplateUrls'. Use 'numberOfStations' instead}`
);
}
}
});
);
// Read conf
return Configuration.getConfig()?.stationTemplateUrls;
}
Expand Down

0 comments on commit 7436ee0

Please sign in to comment.