Skip to content

Commit

Permalink
feat(gewisdb): GEWISDB User Sync (#177)
Browse files Browse the repository at this point in the history
* feat: implemented GewisDBService which syncs users against the GEWISDB
  • Loading branch information
JustSamuel authored Jun 2, 2024
1 parent 79443cb commit d64c201
Show file tree
Hide file tree
Showing 17 changed files with 9,146 additions and 866 deletions.
3 changes: 3 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ URL = https://sudosos.gewis.nl/
CURRENCY_CODE = EUR
CURRENCY_PRECISION = 2

GEWISDB_API_KEY =
GEWISDB_API_URL =

GEWISWEB_JWT_SECRET = ChangeMe
JWT_KEY_PATH = config/jwt.key

Expand Down
66 changes: 42 additions & 24 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,48 @@ module.exports = {
root: true,
env: {
node: true,
mocha: true
mocha: true,
},
plugins: [
'chai-friendly',
'header',
'import',
overrides: [
{
files: ['package.json'],
parser: 'jsonc-eslint-parser',
plugins: ['github-commit-hash'],
extends: [],
rules: {
'github-commit-hash/check-git-commit-hash': 'error',
},
},
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'linebreak-style': process.env.NODE_ENV === 'production' ? ['error', 'windows'] : ['off', 'windows'],
'@typescript-eslint/no-empty-function': ['error', { allow: ['constructors'] }],
'@typescript-eslint/no-unused-expressions': 'off',
'chai-friendly/no-unused-expressions': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/await-thenable': 'warn',
'header/header': [2, 'NOTICE'],
'class-methods-use-this': 'off',
},
plugins: [
'chai-friendly',
'header',
'import',
],
extends: [
'airbnb-typescript/base',
'plugin:chai-expect/recommended',
],
}
],
extends: [
'airbnb-typescript/base',
'plugin:chai-expect/recommended',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'linebreak-style': process.env.NODE_ENV === 'production' ? ['error', 'windows'] : ['off', 'windows'],
'@typescript-eslint/no-empty-function': ['error', { allow: ['constructors'] }],
'@typescript-eslint/no-unused-expressions': 'off',
'chai-friendly/no-unused-expressions': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/await-thenable' : 'warn',
"header/header": [2, 'NOTICE'],
'class-methods-use-this': 'off',
},
parserOptions: {
project: './tsconfig.json',
},
};
16 changes: 16 additions & 0 deletions .eslintrc.package.json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
parser: 'jsonc-eslint-parser',
rules: {
'github-commit-hash/check-git-commit-hash': 'error',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/return-await': 'off',
'header/header': 'off',
},
};
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ jobs:
- run: openssl genrsa -out ./config/jwt.key 2048 && chmod 0777 ./config/jwt.key
- run: npm run swagger:validate
- run: npm run coverage-ci # Separate command to limit the number of workers to prevent timeouts
- name: "Post Migration test-suite"
if: ${{ matrix.typeorm-connection == 'mariadb' }}
run: npm run test-ci-migrate
- run: git config --global --add safe.directory $GITHUB_WORKSPACE # To avoid dubious ownership
if: ${{ matrix.typeorm-connection == 'mariadb' }}

Expand Down
Loading

0 comments on commit d64c201

Please sign in to comment.