Skip to content

Commit 522754c

Browse files
authored
Develop (#41)
* refactor: common, config, core, db and middleware * refactor: utils * feat: updated new structure * refactor: user module * refactor: platform module * fix: template and logger * refactor: notification module * refactor: auth module * refactor: router and server * refactor: server connect * refactor: docker * refactor: eslint * refactor: github-action * refactor: github-action * refactor(test): replace mocha with jest * refactor: di * refactor: async middleware * refactor: unit test * feat: add unit test * chore: docs, github-action
1 parent 32d272c commit 522754c

File tree

488 files changed

+13842
-7797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

488 files changed

+13842
-7797
lines changed

.commitlintrc.json

100644100755
File mode changed.

.devcontainer/Dockerfile

-33
This file was deleted.

.devcontainer/devcontainer.json

-13
This file was deleted.

.dockerignore

100644100755
File mode changed.

.editorconfig

100644100755
File mode changed.

.env.example

100644100755
+10-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ JWT_EXPIRES_IN_ACCESS_TOKEN=15m
1212
JWT_SECRET_REFRESH_TOKEN=
1313
JWT_EXPIRES_IN_REFRESH_TOKEN=30d
1414

15+
# LOGGER
16+
LOG_API_KEY=
17+
LOG_CLIENT=console
18+
LOG_ENABLED=false
19+
LOG_URL=
20+
LOG_SSL_CA_BASE64=
21+
1522
# DATABASE
1623
DB_CLIENT=postgres
1724
DB_HOST=127.0.0.1
@@ -22,7 +29,8 @@ DB_NAME=
2229
DB_CHARSET=utf8
2330
DB_DEBUG=true
2431
DB_CACHE_TIME=5000
25-
DB_SSL_CERT=
32+
DB_SSL_ENABLED=false
33+
DB_SSL_CA_BASE64=
2634

2735
# REDIS
2836
REDIS_HOST=127.0.0.1
@@ -41,11 +49,6 @@ MAIL_USERNAME=
4149
MAIL_PASSWORD=
4250
MAIL_ENCRYPTION=ssl
4351

44-
# SEQ
45-
SEQ_ENABLED=false
46-
SEQ_SERVER_URL=
47-
SEQ_API_KEY=
48-
4952
# FACEBOOK
5053
FACEBOOK_URL=https://graph.facebook.com/me
5154
FACEBOOK_FIELDS=id,first_name,last_name,email
@@ -54,7 +57,7 @@ FACEBOOK_FIELDS=id,first_name,last_name,email
5457
APPLE_URL=https://appleid.apple.com/auth/keys
5558

5659
# GOOGLE
57-
GOOGLE_CLIENT_ID=
60+
GOOGLE_URL=https://www.googleapis.com/oauth2/v3/userinfo
5861

5962
# GITHUB
6063
GITHUB_URL=https://api.github.com/user

.env.test

100644100755
+10-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ JWT_EXPIRES_IN_ACCESS_TOKEN=15m
1212
JWT_SECRET_REFRESH_TOKEN=JWT_SECRET_REFRESH_TOKEN
1313
JWT_EXPIRES_IN_REFRESH_TOKEN=30d
1414

15+
# LOGGER
16+
LOG_API_KEY=
17+
LOG_CLIENT=console
18+
LOG_ENABLED=false
19+
LOG_URL=
20+
LOG_SSL_CA_BASE64=
21+
1522
# DATABASE
1623
DB_CLIENT=postgres
1724
DB_HOST=127.0.0.1
@@ -22,7 +29,8 @@ DB_NAME=DB_NAME
2229
DB_CHARSET=utf8
2330
DB_DEBUG=false
2431
DB_CACHE_TIME=5000
25-
DB_SSL_CERT=false
32+
DB_SSL_ENABLED=false
33+
DB_SSL_CA_BASE64=
2634

2735
# REDIS
2836
REDIS_HOST=127.0.0.1
@@ -41,11 +49,6 @@ MAIL_USERNAME=MAIL_USERNAME
4149
MAIL_PASSWORD=MAIL_PASSWORD
4250
MAIL_ENCRYPTION=ssl
4351

44-
# SEQ
45-
SEQ_ENABLED=false
46-
SEQ_SERVER_URL=SEQ_SERVER_URL
47-
SEQ_API_KEY=SEQ_API_KEY
48-
4952
# FACEBOOK
5053
FACEBOOK_URL=https://graph.facebook.com/me
5154
FACEBOOK_FIELDS=id,first_name,last_name,email
@@ -54,7 +57,7 @@ FACEBOOK_FIELDS=id,first_name,last_name,email
5457
APPLE_URL=https://appleid.apple.com/auth/keys
5558

5659
# GOOGLE
57-
GOOGLE_CLIENT_ID=GOOGLE_CLIENT_ID
60+
GOOGLE_URL=https://www.googleapis.com/oauth2/v3/userinfo
5861

5962
# GITHUB
6063
GITHUB_URL=https://api.github.com/user

.eslintignore

100644100755
+45
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1+
# js files
2+
**/*.js
3+
4+
# compiled output
5+
build
6+
**/build
7+
8+
dist
9+
**/dist
10+
11+
# dependencies
112
node_modules
13+
**/node_modules
14+
15+
package-lock.json
16+
**/package-lock.json
17+
18+
# tests
19+
coverage
20+
**/coverage
21+
22+
# git, vs config
23+
.git
24+
**/.git
25+
26+
.github
27+
**/.github
28+
29+
.husky
30+
**/.husky
31+
32+
.vscode
33+
**/.vscode
34+
35+
.devcontainer
36+
**/.devcontainer
37+
38+
# docs
39+
CHANGELOG.md
40+
README.md
41+
42+
docs
43+
**/docs
44+
45+
reports
46+
**/reports

.eslintrc

100644100755
+20-18
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,33 @@
55
}
66
},
77
"parser": "@typescript-eslint/parser",
8-
"plugins": ["prettier", "import", "typescript-sort-keys"],
8+
"plugins": [
9+
"import",
10+
"prettier",
11+
"@typescript-eslint",
12+
"typescript-sort-keys"
13+
],
914
"extends": [
1015
"airbnb-typescript/base",
1116
"plugin:@typescript-eslint/recommended",
1217
"plugin:@typescript-eslint/recommended-requiring-type-checking",
13-
"plugin:prettier/recommended",
14-
"prettier"
18+
"plugin:prettier/recommended"
1519
],
1620
"parserOptions": {
17-
"ecmaVersion": 2022,
21+
"ecmaVersion": 2023,
1822
"project": "./tsconfig.json",
1923
"tsconfigRootDir": "./"
2024
},
2125
"root": true,
2226
"env": {
2327
"node": true,
24-
"es6": true,
25-
"mocha": true
28+
"es6": true
2629
},
2730
"rules": {
28-
"no-return-await": "off",
31+
"no-return-await": "error",
2932
"no-var": "error",
3033
"no-debugger": "error",
31-
"no-console": "off",
34+
"no-console": "warn",
3235
"no-restricted-syntax": ["off", "ForOfStatement"],
3336
"lines-between-class-members": "off",
3437
"class-methods-use-this": "off",
@@ -66,9 +69,14 @@
6669
],
6770
"prettier/prettier": "error",
6871
"@typescript-eslint/return-await": ["error", "in-try-catch"],
69-
"@typescript-eslint/no-explicit-any": "off",
70-
"@typescript-eslint/unbound-method": "off",
71-
"@typescript-eslint/no-misused-promises": "off",
72+
"@typescript-eslint/no-explicit-any": "warn",
73+
"@typescript-eslint/unbound-method": "error",
74+
"@typescript-eslint/no-misused-promises": [
75+
"error",
76+
{ "checksVoidReturn": false }
77+
],
78+
"@typescript-eslint/no-unsafe-member-access": "error",
79+
"@typescript-eslint/no-unsafe-call": "error",
7280
"@typescript-eslint/member-ordering": [
7381
"error",
7482
{
@@ -136,13 +144,7 @@
136144
"always",
137145
{ "exceptAfterSingleLine": true }
138146
],
139-
"import/extensions": [
140-
"error",
141-
"ignorePackages",
142-
{
143-
"ts": "never"
144-
}
145-
],
147+
"import/extensions": ["error", "ignorePackages", { "ts": "never" }],
146148
"typescript-sort-keys/interface": "off",
147149
"typescript-sort-keys/string-enum": "error"
148150
}

.gitattributes

100644100755
File mode changed.

.gitconfig

100644100755
File mode changed.

.github/ISSUE_TEMPLATE/bug-report.md

100644100755
File mode changed.

.github/ISSUE_TEMPLATE/pull-request.md

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ assignees: ''
1616
**Any relevant logs, error output, etc?**
1717

1818
**Environment:**
19-
- Node.js: [e.g. 18]
19+
- Node.js: [e.g. 18 | 20]
2020

2121
**Any other comments?**
2222

.github/dependabot.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
reviewers:
8+
- neverovski
9+
labels:
10+
- "github action"
11+
- "dependencies"
12+
open-pull-requests-limit: 10
13+
14+
- package-ecosystem: "npm"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
versioning-strategy: increase
19+
labels:
20+
- "npm"
21+
- "dependencies"
22+
reviewers:
23+
- neverovski
24+
open-pull-requests-limit: 10
25+
ignore:
26+
- dependency-name: '*'
27+
update-types: ["version-update:semver-major"]

.github/release-drafter.yml

100644100755
File mode changed.

.github/semantic.yml

100644100755
File mode changed.

.github/workflows/build.yml

-39
This file was deleted.

0 commit comments

Comments
 (0)