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

update master #57

Merged
merged 71 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f01973f
[Task] #6 provide fallback index.html
Type-Style Jan 12, 2024
9cc6446
Merge branch 'main' into dev
Type-Style Jan 12, 2024
c19508f
[Task] #6 production ready code (m)
Type-Style Jan 12, 2024
e09f978
[Task] #6 create github action for upload when main is updated (#21)
Type-Style Jan 12, 2024
ca85337
Merge remote-tracking branch 'origin/main' into dev
Type-Style Jan 12, 2024
9c2a2fc
[change] #6 new ftp upload action
Type-Style Jan 12, 2024
8e478d6
Merge branch 'main' into dev
Type-Style Jan 12, 2024
bae1b4e
[Fix] #6 replace host with server in ftp action
Type-Style Jan 12, 2024
de31448
Merge branch 'main' into dev
Type-Style Jan 12, 2024
861336b
[Task] #6 basic log (#26)
Type-Style Jan 12, 2024
63b3525
[CHANGE] #6 revert back to require output for production
Type-Style Jan 12, 2024
2de635c
Merge branch 'main' into dev
Type-Style Jan 12, 2024
7c5ad3c
Merge branch 'main' into dev
Type-Style Jan 12, 2024
95aec15
[Task] #6 add ability to manually upload to prod
Type-Style Jan 14, 2024
81cac92
[Task] #9 enable manual start of codechecks
Type-Style Jan 19, 2024
3e1fbbd
10 webhook for writing (#36)
Type-Style Jan 24, 2024
781d61d
[Task] #3 improve error handling, logger and added chalk
Type-Style Jan 25, 2024
6d84638
[Change] #3 nodemon to clear console when in dev mode
Type-Style Jan 25, 2024
63085ed
[!Task] #32 webhook creates folder and file based on date
Type-Style Jan 25, 2024
8873654
[Change] #35 relocated tests and refactor write, also added file check
Type-Style Jan 26, 2024
91fba3b
[Task] #18, installed helmet, configured self as CSP origin
Type-Style Jan 26, 2024
a22f970
[Fix] moved chalk out of dev dependency
Type-Style Jan 29, 2024
c779de6
[Task] #32 error logging and text output improvement, log string inst…
Type-Style Jan 29, 2024
8a5137d
[Task] #18 CSP Update to allow localhost for testing
Type-Style Jan 29, 2024
3e8dab1
[Fix] #3 debugging setup improvments
Type-Style Jan 29, 2024
ff7c287
[FIX] #10 Error Handling
Type-Style Jan 29, 2024
10391c5
[Task] #10 writing basic non calculated data to file
Type-Style Jan 29, 2024
552dc32
[Fix] #10 avoid Header Modification after sending the request
Type-Style Jan 30, 2024
7bfdced
[Task] #10 JSON Data pretty output
Type-Style Jan 30, 2024
0bee573
[Task] #32 update types to reflect subobjects of entry
Type-Style Jan 30, 2024
9e801fe
[Task] #10 write time
Type-Style Jan 30, 2024
b801af4
[Task] #32 added logging for time edgecases
Type-Style Jan 30, 2024
b7360b2
[Task] #10 output seconds
Type-Style Jan 30, 2024
4cd1c07
[Task] #10 calculate distance based on lat and lon
Type-Style Jan 30, 2024
f8799b2
[Task] #32 writing tests for time and distance
Type-Style Jan 30, 2024
e39b8a7
[Task] #32 change distance calculation to use pythagoras
Type-Style Jan 30, 2024
6393efc
[Task] #38 add favicon
Type-Style Jan 31, 2024
353817c
[Task] #32 time converted to seconds
Type-Style Jan 31, 2024
f7df2d8
[Taskk] #32 speed calculation and output and tests
Type-Style Jan 31, 2024
976096a
[Task] #32 speed tests
Type-Style Jan 31, 2024
e9d0bbe
[Task] #33 add ignore
Type-Style Jan 31, 2024
e97d965
[Task] #32 test finetuning
Type-Style Jan 31, 2024
1a89b42
[Task] #32 add angle between entries
Type-Style Jan 31, 2024
c346ffb
[Task] #32 test for angle, extracted getData function
Type-Style Jan 31, 2024
003e57d
[change] #32 test to include optional leading 0 for days
Type-Style Feb 1, 2024
dbbbb46
[!!!Task] #18 add uncaughtExeption handler as last resort
Type-Style Feb 1, 2024
50c9700
[Task] #7 enhance static options to include common filetypes; index …
Type-Style Feb 2, 2024
04e2761
[change] #32 validation to be used more explictly
Type-Style Feb 2, 2024
c0b9db6
[change] #32 add index to log while writing
Type-Style Feb 2, 2024
29cc03c
[Task] #32 test if 1000 calls can be made with randomized data
Type-Style Feb 2, 2024
1145e9e
[!!! Task] #32 limit JSON Data to be 1000 lines: replace last line wi…
Type-Style Feb 2, 2024
19aa8eb
[Change, Task] #32 if 1000 entries exceeded, only replace last if hdo…
Type-Style Feb 2, 2024
e1d6827
[Change] build action enable button to on manually
Type-Style Feb 2, 2024
df0711c
[temp] test y tests fail
Type-Style Feb 2, 2024
88413e1
Merge branch 'dev' into 32-enhance-writing-data
Type-Style Feb 2, 2024
9702002
Create node.js.yml
Type-Style Feb 5, 2024
62123b7
Merge remote-tracking branch 'origin/dev' into 32-enhance-writing-data
Type-Style Feb 5, 2024
32d5579
Create main.yml
Type-Style Feb 5, 2024
0ca2a85
[!!!Fix] Created new workflow to build / test node, commented tests b…
Type-Style Feb 5, 2024
8fb1057
[Task] #33 moved ignore to its own file since it creates data rather …
Type-Style Feb 6, 2024
5ddf951
42 output json (#44)
Type-Style Feb 6, 2024
f1a628c
41 add rate limiter (#45)
Type-Style Feb 13, 2024
ce6e636
Bump follow-redirects from 1.15.5 to 1.15.6 (#47)
dependabot[bot] Mar 19, 2024
45c3a89
43 secure output route (#46)
Type-Style Mar 21, 2024
da13c77
48 move login to seperate controller (#49)
Type-Style Mar 21, 2024
8ab8cba
50 integrate csrf protection for login form (#53)
Type-Style Mar 26, 2024
1018d2e
fix: upgrade express-rate-limit from 7.1.5 to 7.2.0 (#52)
Type-Style Mar 26, 2024
eb76667
fix: package.json & package-lock.json to reduce vulnerabilities (#54)
Type-Style Mar 26, 2024
ff66e39
[Snyk] Upgrade express from 4.18.2 to 4.18.3 (#51)
Type-Style Mar 26, 2024
2a81a2e
Merge remote-tracking branch 'origin/main' into dev
Type-Style Mar 28, 2024
5d616b4
[Task] update dev after main merge
Type-Style Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
//"@typescript-eslint/no-unused-vars": "warn"
"jest/no-conditional-expect": "off"
},
"ignorePatterns": ["dist", "jest.config.js"]
"ignorePatterns": ["dist", "jest.config.js", "httpdocs"]

}
25 changes: 0 additions & 25 deletions .github/workflows/build.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
with:
node-version: 16
- run: npm ci # or yarn install
- uses: sibiraj-s/action-eslint@v3
with:
eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js,jsx,ts,tsx'
annotations: true
- name: Lint server-side code
run: npx eslint src/ --fix
- name: Lint client-side code
run: npx eslint httpdocs/js/ --fix
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tests

on:
workflow_dispatch:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]

jobs:
build:
runs-on: ubuntu-latest
env:
NODE_ENV: ${{ vars.NODE_ENV }}
LOCALHOST: ${{ vars.LOCALHOST }}
LOCALHOSTV6: ${{ vars.LOCALHOSTV6 }}
KEYA: ${{ secrets.KEYA }}
KEYB: ${{ secrets.KEYB }}
USER_TEST: ${{ secrets.USER_TEST }}

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- run: echo "NODE_ENV = $NODE_ENV"
- run: npm ci
- run: npm run build --if-present
- name: Start server
run: |
sudo NODE_ENV=$NODE_ENV LOCALHOST=$LOCALHOST LOCALHOSTV6=$LOCALHOSTV6 KEYA=$KEYA KEYB=$KEYB USER_TEST=$USER_TEST npm start &
sleep 15 # Give server some time to start
- name: Check if server is running
run: |
curl --fail http://localhost:80 || exit 1
- name: Run app tests
run: npm run test:app
- name: Run login tests
run: npm run test:login
- name: Run unit tests
run: npm run test:unit
- name: Run integration tests
run: npm run test:integration



2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
data/

# Logs
logs
*.log
Expand Down
32 changes: 13 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug server.ts",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\src\\app.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
}
]
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug TypeScript",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\src\\app.ts",
"preLaunchTask": "build"
}
]
}
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "npx tsc -p tsconfig.json",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$tsc"
}
]
}
159 changes: 159 additions & 0 deletions httpdocs/color-table.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading