Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPP 1.6 ReserveNow and Cancel Reservation + Custom Reservation Module #3551

Open
wants to merge 1 commit into
base: master-qa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ indent_size = 2
tab_width = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# insert_final_newline = true
end_of_line = lf
max_line_length = 100

Expand Down
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/Users/julianbuecher/Projects/master-thesis/ev-server/prepare.cjs":"1","/Users/julianbuecher/Projects/master-thesis/ev-server/skip-preinstall.cjs":"2"},{"size":271,"mtime":1686776546776,"results":"3","hashOfConfig":"4"},{"size":265,"mtime":1686776546776,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","suppressedMessages":"8","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1hu8o6n",{"filePath":"9","messages":"10","suppressedMessages":"11","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/julianbuecher/Projects/master-thesis/ev-server/prepare.cjs",[],["12"],"/Users/julianbuecher/Projects/master-thesis/ev-server/skip-preinstall.cjs",[],["13","14"],{"ruleId":"15","severity":2,"message":"16","line":5,"column":11,"nodeType":"17","messageId":"18","endLine":5,"endColumn":18,"suppressions":"19"},{"ruleId":"20","severity":2,"message":"21","line":4,"column":3,"nodeType":"22","messageId":"23","endLine":4,"endColumn":18,"suppressions":"24"},{"ruleId":"20","severity":2,"message":"21","line":7,"column":3,"nodeType":"22","messageId":"23","endLine":7,"endColumn":18,"suppressions":"25"},"n/no-unpublished-require","\"husky\" is not published.","Literal","notPublished",["26"],"n/no-process-exit","Don't use process.exit(); throw an error instead.","CallExpression","noProcessExit",["27"],["28"],{"kind":"29","justification":"30"},{"kind":"29","justification":"30"},{"kind":"29","justification":"30"},"directive",""]
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
# FIXME: ESM import parse error
build-requirements.mjs
*.cjs
*.js
36 changes: 9 additions & 27 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"parserOptions": {
"project": [
"tsconfig.json"
],
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
Expand Down Expand Up @@ -42,9 +36,7 @@
"error",
{
"selector": "enumMember",
"format": [
"UPPER_CASE"
]
"format": ["UPPER_CASE"]
}
],
"@typescript-eslint/indent": [
Expand Down Expand Up @@ -73,18 +65,12 @@
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-await": "error",
"brace-style": [
"error",
"1tbs"
],
"brace-style": ["error", "1tbs"],
"complexity": "error",
"import/order": "error",
"linebreak-style": [
"error",
"unix"
],
"linebreak-style": ["error", "unix"],
"max-len": [
"error",
"warn",
{
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
Expand All @@ -102,12 +88,8 @@
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci --force
- name: npm run build:prod
run: npm run build:prod
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci --force
- name: npm build:prod
run: npm build:prod

docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build docker image
run: |
cd docker
make SUBMODULES_INIT=false
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build docker image
run: |
cd docker
make SUBMODULES_INIT=false
18 changes: 9 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install --force
run: npm ci
- name: npm run eslint
run: npm run eslint
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install --force
run: npm ci
- name: npm eslint
run: npm eslint
48 changes: 24 additions & 24 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.ACTION_ACCESS_SUB_MODULES_PRIVATE_REPOS }}
submodules: true
- name: Install NodeJs ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install NodeJs Packages
run: npm ci --force
- name: Build sources
run: |
cp src/assets/configs-ci/config.json src/assets
npm run build:dev
- name: Start Dashboard
run: |
npm run start & sleep 60
- name: Initialize integration test configuration
run: |
if [ ! -d test/config ]; then mkdir -p test/config; fi
cp src/assets/configs-ci/local-dashboard.json test/config/local.json
- name: Run Integration Tests
run: npm run test
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.ACTION_ACCESS_SUB_MODULES_PRIVATE_REPOS }}
submodules: true
- name: Install NodeJs ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install NodeJs Packages
run: npm ci --force
- name: Build sources
run: |
cp src/assets/configs-ci/config.json src/assets
npm build:dev
- name: Start Dashboard
run: |
npm start & sleep 60
- name: Initialize integration test configuration
run: |
if [ ! -d test/config ]; then mkdir -p test/config; fi
cp src/assets/configs-ci/local-dashboard.json test/config/local.json
- name: Run Integration Tests
run: npm test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ Thumbs.db
# MTA
*.mta
mta_archives/

# ESLint Cache
.eslintcache
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --config commitlint.config.cjs --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"{src,test}/**/*.{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"]
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use-node-version=16.15.1
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage
dist
outputs
.nyc_output
ui/web
tsconfig-base.json
npm-lock.yaml
package-lock.json
performanceRecords.json
*.clinic-*
*-audit.json
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"christian-kohler.npm-intellisense",
"quicktype.quicktype"
]
}
}
23 changes: 16 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,39 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Super Admin",
"request": "launch",
"type": "msedge",
"url": "http://localhost:45000",
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Build & Serve"
},
{
"name": "Debug Tenant 'slf'",
"request": "launch",
"type": "pwa-chrome",
"type": "msedge",
"url": "http://slf.localhost:45000",
"webRoot": "${workspaceFolder}"
"webRoot": "${workspaceFolder}",
"preLaunchTask": "Build & Serve"
},
{
"name": "Debug Tenant 'utbilling'",
"type": "pwa-chrome",
"type": "msedge",
"request": "launch",
"url": "http://utbilling.localhost:45000",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug Tenant 'utbillingplatform'",
"type": "pwa-chrome",
"type": "msedge",
"request": "launch",
"url": "http://utbillingplatform.localhost:45000",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug Tenant 'salvatore'",
"type": "pwa-chrome",
"type": "msedge",
"request": "launch",
"url": "http://salvatore.localhost:45000",
"webRoot": "${workspaceFolder}"
Expand All @@ -44,7 +53,7 @@
"--config='./jest.config.ts'",
"--reporters='default'",
"--reporters='./test/JestEvseReporter'",
"--watchAll=false",
"--watchAll=false"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
Expand All @@ -53,6 +62,6 @@
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
},
}
]
}
7 changes: 2 additions & 5 deletions .vscode/settings-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"typescript"
],
"jest.jestCommandLine": "npm run test -- ",
"eslint.validate": ["javascript", "typescript"],
"jest.jestCommandLine": "npm test -- ",
"jest.autoRun": { "watch": "false" }
}
19 changes: 14 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "angular-update",
"problemMatcher": []
"label": "Build & Serve",
"type": "shell",
"command": "npm",
"args": ["start"],
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}"
}
},
{
"type": "npm",
"script": "material-update",
"label": "Material Version Update",
"command": "npm",
"args": ["material-update"],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
}
]
Expand Down
Loading