// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
- {
- "type": "node",
- "request": "launch",
- "name": "Debug Simulator via npm",
- "cwd": "${workspaceFolder}",
- "runtimeExecutable": "npm",
- "runtimeArgs": ["run-script", "start:debug"],
- "skipFiles": ["<node_internals>/**"],
- "stopOnEntry": true
- },
{
"type": "node",
"request": "launch",
"prepare": "node prepare.js",
"build-requirements": "node build-requirements.js",
"start": "npm run build && cross-env NODE_ENV=production node -r source-map-support/register dist/start.cjs",
- "start:debug": "npm run build && cross-env NODE_ENV=production node -r source-map-support/register --inspect dist/start.cjs",
+ "start:esm": "npm run build && cross-env NODE_ENV=production node -r source-map-support/register dist/start.mjs",
"start:dev": "npm run build:dev && cross-env NODE_ENV=development node -r source-map-support/register dist/start.cjs",
"start:dev:debug": "npm run build:dev && cross-env NODE_ENV=development node -r source-map-support/register --inspect dist/start.cjs",
"start:dev:esm": "npm run build:dev && cross-env NODE_ENV=development node -r source-map-support/register dist/start.mjs",
+ "start:dev:esm:debug": "npm run build:dev && cross-env NODE_ENV=development node -r source-map-support/register --inspect dist/start.mjs",
"start:prof": "cross-env NODE_ENV=production node -r source-map-support/register --prof dist/start.cjs",
"start:doctorprof": "cross-env NODE_ENV=production clinic doctor -- node -r source-map-support/register dist/start.cjs",
"start:flameprof": "cross-env NODE_ENV=production clinic flame -- node -r source-map-support/register dist/start.cjs",
export default {
input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
+ strictDeprecations: true,
output: [
{
dir: 'dist',
'http-status-codes',
'just-clone',
'just-merge',
- 'mnemonist/lru-map-with-delete',
+ 'mnemonist/lru-map-with-delete.js',
'moment',
'mongodb',
'node:async_hooks',
'tar',
'winston',
'winston-daily-rotate-file',
- 'winston/lib/winston/transports',
+ 'winston/lib/winston/transports/index.js',
'ws',
],
plugins: [
-import LRUCache from 'mnemonist/lru-map-with-delete';
+import LRUCache from 'mnemonist/lru-map-with-delete.js';
import { Bootstrap } from './internal';
import type { ChargingStationConfiguration, ChargingStationTemplate } from '../types';
private incomingRequestHandlers: Map<OCPP16IncomingRequestCommand, IncomingRequestHandler>;
public constructor() {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_16);
this.incomingRequestHandlers = new Map<OCPP16IncomingRequestCommand, IncomingRequestHandler>([
[OCPP16IncomingRequestCommand.RESET, this.handleRequestReset.bind(this)],
protected jsonSchemas: Map<OCPP16RequestCommand, JSONSchemaType<JsonObject>>;
public constructor(ocppResponseService: OCPPResponseService) {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_16, ocppResponseService);
this.jsonSchemas = new Map<OCPP16RequestCommand, JSONSchemaType<JsonObject>>([
[
private jsonSchemas: Map<OCPP16RequestCommand, JSONSchemaType<JsonObject>>;
public constructor() {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_16);
this.responseHandlers = new Map<OCPP16RequestCommand, ResponseHandler>([
[OCPP16RequestCommand.BOOT_NOTIFICATION, this.handleResponseBootNotification.bind(this)],
private incomingRequestHandlers: Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>;
public constructor() {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_20);
this.incomingRequestHandlers = new Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>([
[OCPP20IncomingRequestCommand.CLEAR_CACHE, this.handleRequestClearCache.bind(this)],
protected jsonSchemas: Map<OCPP20RequestCommand, JSONSchemaType<JsonObject>>;
public constructor(ocppResponseService: OCPPResponseService) {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_20, ocppResponseService);
this.jsonSchemas = new Map<OCPP20RequestCommand, JSONSchemaType<JsonObject>>([
[
private jsonSchemas: Map<OCPP20RequestCommand, JSONSchemaType<JsonObject>>;
public constructor() {
- if (new.target?.name === moduleName) {
- throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
- }
+ // if (new.target?.name === moduleName) {
+ // throw new TypeError(`Cannot construct ${new.target?.name} instances directly`);
+ // }
super(OCPPVersion.VERSION_20);
this.responseHandlers = new Map<OCPP20RequestCommand, ResponseHandler>([
[OCPP20RequestCommand.BOOT_NOTIFICATION, this.handleResponseBootNotification.bind(this)],
import type { FormatWrap } from 'logform';
import { type Logger, createLogger, format, type transport } from 'winston';
-import TransportType from 'winston/lib/winston/transports';
+import TransportType from 'winston/lib/winston/transports/index.js';
import DailyRotateFile from 'winston-daily-rotate-file';
// import { Configuration, Utils } from './internal';