3009 Commits

Author SHA1 Message Date
Raccoon
c7b03623a9
lint: lib/models/note.ts
- add Authorship type

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:38 +08:00
Raccoon
3eca23810f
lint: lib/workers/dmpWorker.ts
- add diff-match-patch typing
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:38 +08:00
Raccoon
9ef827f7d7
lint: lib/note/noteActions.ts
- reactive pandoc
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:38 +08:00
Raccoon
075a8f9bae
lib/auth/oauth2/strategy.ts
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:38 +08:00
Raccoon
6d04d6003e
add .eslintignore file
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
13e64b0237
lint: lib/realtime/realtime
- add more typing annotate
- add some references to models

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
dee7bf2188
realtimeClientConnection.ts add RealtimeUserData type
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
ab2ed4ab65
realtime RealtimeUserData
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
a095cd3448
lint: lib/realtime/realtimeClientConnection
- add socket type
- add user status and cursor data

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
7e963e71f7
lint: lib/user/index.ts
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
2944da0415
lint: lib/realtime/realtime.ts
- add typing annotate
- install @types/socket.io, @types/randomcolor, @types/passport.socketio

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
fc2658b5ce
lint: lib/utils.ts
- add options.dialect in MySequelize type

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:37 +08:00
Raccoon
0427b1ba74
web/middleware/checkVersion.ts
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
534492e82b
lint: lib/note/index.ts
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
ee04b2fb74
lint: lib/note/noteAction.ts
- install @types/markdown-pdf
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
10e5cd8de1
lint: lib/realtime
- add JobWorker type
- add typing annotate in:
  - realtimeUpdateDirtyNoteJob
  - realtimeSaveRevisionJob
  - realtimeClientConnection
  - processQueue

lint: lib/realtime/realtimeCleanDanglingUserJob.ts

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
7dbb1efbd2
lint: lib/models
- add more typing annotate
- install @types/cheerio

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
e6b9ab099f
lint lib/config
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
d19908d46f
lint lib/auth/index.ts
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
c7f712d035
lint: lib/auth/oauth2/strategy.ts
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
d6c9c66699
refactor: lib/models
- move all interfaces to baseModel.ts
- remove unused import

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:36 +08:00
Raccoon
bc417043ed
lint: lib/utils.ts
- install @types/mime-types
- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
a5376a472a
lint: lib/auth/utils.ts
- install @types/express-session for req.session
- add returnTo into sessionData
- add typing annotate in passportGeneralCallback and remove unused var

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
016e16968d
lint: lib/services/note.ts
- add typing annotate in checkAllNotesRevision and
saveAllNotesRevision
- passing string in error constructor in app.ts

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
738a4b4ca9
lint: lib/history/index.ts
- add History typing
- add typing annotate in history/index.ts
- fix incorrect argument when update history in newNote

history

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
6d70f79c21
lib/homepage/index.ts
lint: lib/homepage/index.ts

- add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
eaf54c4239
lint: lib/imageRouter
- add typing annotate
- remove unused vars

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
f08097fbbf
lint: lib/middleware
add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
90ab2d0979
lint: lib/csp.ts
add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:35 +08:00
Raccoon
7429d5eaae
lint: lib/status/index.ts
add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
ba8b1f1fe2
lint: lib/response.ts
- add typing for req.user.id
- add typing annotate in response.ts and fix type error in errorPage/index.ts

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
5a7c38cff5
lint: lib/letter-avatars.ts
add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
dded39c2d4
lint: lib/string.ts
add typing annotate

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
a965ba8336
lint: lib/auth/saml/index.ts
remove unused vars

lib/auth/saml

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
08fb6855f9
lint: lib/auth/openid/index.ts
unused vars

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
8f0337af7d
lint: lib/auth/ldap.index.ts
remove unused vars

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
adc0a62acd
lint: lib/auth/email/index.ts
remove unused vars

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:34 +08:00
Raccoon
375de57af6
fix: guest note not save
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
3494922cdb
fix: docker
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
05cd6dd240
fix: heroku
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
cb1f263780
format
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
6e8ff98039
remove * as models
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
ff90fd0fe1
test: fix test case
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
638a8872c8
refactor: use strong type in models
export missing

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
db55d00823
refactor: use config insted of * as config
config

Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:33 +08:00
Raccoon
d1a440e7bd
refactor logger export
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:32 +08:00
Raccoon
aaf019e2b4
enable esModuleInterop
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:32 +08:00
Raccoon
f73e72b865
fix: i18n path
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:32 +08:00
Raccoon
41f0e61049
use winston.http to log morgan, and adjust development output
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:32 +08:00
Raccoon
8fb31bd018
upgrade morgan to 1.10
Signed-off-by: Raccoon <raccoon@hackmd.io>
2021-06-16 18:35:32 +08:00