Add compile-time type information and improve runtime assert checking

Repository details (botten-nappet)
Project page
botten-nappet
Project log category
(195 entries)
Owner
@joelpurra
Contributors
Contributors on Github
Project status
💤 This project is inactive.
📂 This project is open.
🤷 This project is not particularly popular.
Repository activity period
🗓
Commits
209 commits
Stars
5 stars
Commit details (2c3beb3e)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Add compile-time type information and improve runtime assert checking

  • Add more static type information using typescript.
  • Replace power-assert with check-types to get better typescript support for runtime checks.
Raw text
Add compile-time type information and improve runtime assert checking

- Add more static type information using typescript.
- Replace `power-assert` with `check-types` to get better typescript support for runtime checks.

Changed files (49)

Path Additions Deletions
.vscode/settings.json +3 -0
index.ts +128 -75
package-lock.json +21 -322
package.json +2 -3
rollup.config.index.js +18 -7
src/storage/database-connection.ts +28 -14
src/storage/iuser-camo.ts +30 -0
src/storage/iuser.ts +28 -0
src/storage/manager/user-storage-manager.ts +37 -33
src/storage/repository/embedded-documents/augmented-token-embedded-document.ts +62 -0
src/storage/repository/embedded-documents/raw-token-embedded-document.ts +66 -0
src/storage/repository/user-repository.ts +21 -65
src/twitch/authentication/application-token-manager.ts +74 -55
src/twitch/authentication/iaugmented-token.ts +28 -0
src/twitch/authentication/iraw-token.ts +26 -0
src/twitch/authentication/polling-application-token-connection.ts +39 -20
src/twitch/authentication/user-token-manager.ts +28 -13
src/twitch/connection-manager.ts +30 -20
src/twitch/helper/csrf-helper.ts +12 -6
src/twitch/helper/request-helper.ts +18 -10
src/twitch/helper/token-helper.ts +98 -85
src/twitch/helper/user-helper.ts +41 -25
src/twitch/helper/user-token-helper.ts +114 -112
src/twitch/iconnection.ts +24 -0
src/twitch/irc/handler/follow-reminder.ts +32 -23
src/twitch/irc/handler/greeting.ts +22 -15
src/twitch/irc/handler/logging.ts +17 -12
src/twitch/irc/handler/new-chatter.ts +33 -14
src/twitch/irc/handler/ping.ts +17 -12
src/twitch/irc/handler/reconnect.ts +17 -12
src/twitch/irc/handler/subscribing.ts +41 -18
src/twitch/irc/handler/text-response-command.ts +27 -17
src/twitch/irc/iirc-connection.ts +25 -0
src/twitch/irc/iparsed-message.ts +30 -0
src/twitch/irc/irc-connection.ts +234 -162
src/twitch/irc/irc-manager.ts +15 -7
src/twitch/iweb-socket-error.ts +26 -0
src/twitch/polling/connection/polling-clientid-connection.ts +39 -31
src/twitch/polling/handler/following.ts +29 -17
src/twitch/polling/ihttp-data.ts +23 -0
src/twitch/polling/ihttp-header.ts +23 -0
src/twitch/polling/polling-connection.ts +132 -88
src/twitch/polling/polling-manager.ts +11 -7
src/twitch/pubsub/handler/logging.ts +23 -19
src/twitch/pubsub/pubsub-connection.ts +110 -47
src/twitch/pubsub/pubsub-manager.ts +21 -12
src/util/graceful-shutdown-manager.ts +99 -59
src/util/pino-logger.ts +81 -34
tsconfig.json +28 -3

Commit categories (3)