Commit graph

128 commits

Author SHA1 Message Date
Bruce Berrios 46d7a78ffe
Add Monkey CI (#3799)
* Split PR checks

* Split Jobs

* Test

* Fix path check

* Use checkout

* Undo

* oh boy

* .

* .

* .

* .

* test

* .

* .

* .

* .

* .

* .

* .

* yay

* Remove jsonschema from global dep

* monkey ci

* .

* oops

* test

* .

* .

* .

* .

* .

* .

* .

* ayy

* add permissions
2022-12-05 18:52:15 +01:00
Miodec 3d90c398d0 updated to husky 8 2022-10-21 14:51:44 +02:00
Miodec 58e7a92e23 updated package 2022-08-30 16:24:16 +02:00
Rizwan Mustafa 431d4117d5
Bump up concurrently version (#3072) 2022-06-05 14:41:46 +02:00
Rizwan Mustafa fd002f1553
Save exact for all packages (#2853) 2022-04-23 19:42:20 +02:00
Bruce Berrios ad8c433e45
Save exact (#2769) 2022-03-25 16:01:45 +01:00
Rizwan Mustafa 47c7fd42c7
Improve webpack - Reduced filesize by 18% by converting from node-object-hash to object-hash (#2768) rizwanmustafa
* Refreshed the PR

* not sending stringified result anymore

* removed length check

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-03-25 15:36:04 +01:00
Bruce Berrios 3567c15ffe
Remove unused packages (#2724) 2022-03-17 21:49:34 +01:00
Bruce Berrios 1ba7a76b86
Migrate middlewares to TypeScript (#2574)
* Migrate middlewares

* Update workflow

* Fix ignore

* Fix

* Fix

* Remove babel loader from root dependencies

* Remove mongoDb
2022-02-23 10:03:38 -05:00
Ferotiq b99a979370
remove run-script-os and change the script back (#2573) 2022-02-23 01:07:48 +01:00
Bruce Berrios f9d6f52c15
Api overhaul (#2555) by Bruception
* Feat:Update response structure (#2427)

* Fix:response and error structure

* update:response message

* update:response class

* update

* Update response message

Co-authored-by: Mustafiz Kaifee Mumtaz <mustafiz.mumtaz@freecharge.com>

* Add MonkeyToken foundation (#2487) by Bruception

* Api changes (#2492)

* API changes

* Remove unused import

* Add Ape client (#2513)

* Add all endpoints (#2514)

* Merged backend typescript into api overhaul (#2515)

* Install typescript and add backend tsconfig

Cannot yet build due to a number of compilation errors in JS code

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Fix typescript compilation errors

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Migrated backend to ES modules

Switched to import export syntax

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add typescript declaration for anticheat

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Rename top level files to .ts

Fix service account json file typing

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add dev build scripts for backend typescript

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Removed empty lines and switched to using db

Cleaned up imports by removing needless empty lines and migrated to the new db.js instead of mongodb.js.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Fixed backend commonjs syntax to ES module syntax

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add build to backend start script

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Migrate some endpoints to Ape

* Strict equals

* Remove artifact

* ape -> Ape

* Ape migration p2 (#2522)

* Migrate leaderboard endpoints to ape

* Fixed comment

* Init backend types

* Fail

* Return

* Migrate Quotes to Ape (#2528)

* Migrate quotes to Ape

* Fix backend response

* Fix issue

* Fix rate limit (#2533)

* fix rate limit

* Fix import

* Fix issues

* Ape migration p4 (#2547)

* Migrate results endpoints to ape

* Remove unused import

* Remove unused import

* Fix loaders

* Make function async

* Hide try saving results

* Migrate some users endpoints to Ape (#2548)

* Complete Ape Migration (#2553)

* Complete ape migration

* Fix preset

* Return preset data

* Add typings

* Move captcha reset

* Read from params

* Fix result tags endpoint

* Fix stuck loader

* fixed lb memory not saving

* fixed quote rating popup not showing up for new users

Co-authored-by: Mustafiz Kaifee <49086821+Mustafiz04@users.noreply.github.com>
Co-authored-by: Mustafiz Kaifee Mumtaz <mustafiz.mumtaz@freecharge.com>
Co-authored-by: Brian Evans <53117772+mrbrianevans@users.noreply.github.com>
Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-22 20:55:48 +01:00
Ferotiq 7cbd9d2722
Allow the process for setting up project and committing code on Windows to be much smoother (#2549)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Create install.cmd

* Update package.json

* Update CONTRIBUTING.md

* Update install.cmd

* Update install.cmd

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update package.json

* fix lint script so windows users can use it correctly

* adFd

* rename
2022-02-20 20:47:24 +00:00
Miodec 3891ddbe14 moved dependencies to frontend 2022-02-19 22:30:41 +01:00
Miodec cfe7f9bd3e added tinycolor types 2022-02-19 22:17:37 +01:00
Miodec 0a9140ac09 added howler type 2022-02-19 21:56:49 +01:00
Ferotiq 71cdce20e3
TypeScript FrontEnd: Add Account Files (#2494)
* add account files, config, and db, fix other files, and make lint script work on cmd

* fuck operating systems

* remove project from eslint

* Merging and fixing some bugs

* fixed result ordering

* fixed quote filter stopping all results

* fixed words filter not working

* corrected type

* Update commandline-lists.ts

* Update types.d.ts

* removing explicit tag types

* mfing prettier

* small changes

* stuff

* fixes

* fix cannot read properties of undefined

* another check just to be safe

* okay that works

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-19 17:44:27 +01:00
Miodec c85b644b88 added json schema validation. part of #2516 2022-02-17 23:36:40 +01:00
Ferotiq 319e179600
TypeScript FrontEnd: Some Changes (#2486)
* some changes

* f*** you select2

* Change type roots

* hopefully work

* change commonjs to es6

* parserOptions.project

* as;dfllaksdkjsadadfsldkjsfkdljdsfafdsk;alfsdjf
2022-02-13 18:35:06 +01:00
Bruce Berrios eb2350bb1f
Move dependencies (#2483)
* Move dependencies

* Fixes

* Add stale pr action

* Update

* Fix cron schedule
2022-02-12 15:02:29 -05:00
Miodec 912ec63644 added select2 types 2022-02-12 19:14:27 +01:00
Rizwan Mustafa 1877cc31e7
(Draft) Replace Browserify with Webpack (Draft) (#2461) by rizwanmustafa
* Replaced browserify with webpack

* Modified gulpfile and webpack config

* Removed attempts of using undefined variables and functions

* fixed some incorrect changes

* setfunbox fix

* Added fallback for crypto-browserify and stream-browserify

* added circular dependency detection

* Created production tasks for gulp and updated webpack config

* fixed circular dependency in misc

* not failing on circular dependency

* Removed unused imports

* Added babel loader and plugins to webpack

* Removed unused dependencies and removed babel's plugins

* Workaround for test logic import in random quote

* Created a separate webpack config file for production

* Changed relative paths to absolute ones in webpack

* Added colored output for circular import number

* Removed comment from .eslintrc.json

* Added eslint plugin to webpack

* Moved 'buffer' and 'stream-browserify' to devDependencies

* Started using promises in webpack tasks

* Removed unused dependencies

* Updated package-lock.json

* Removed eslint plugin from webpack and added circular dependency detection in dev config as well

* Removed unrelated changes

* Updated production build command

* Added ability for webpack to be run with typescript conversion of project in process

* added gulp typscript dev dependency

* using const

* modified console logs on circular imports

* missing dev dependency

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-12 14:47:36 +01:00
Miodec f66e872d68 installed jquery types 2022-02-11 19:06:12 +01:00
Sondre Kjempekjenn 26c57d2ad3
Compile both JS and TS (#2464) by sondrekje
* Compile both JS and TS

Builds upon Ferotiq's PR

* Compile both JS and TS

Builds upon Ferotiq's PR

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-11 19:02:21 +01:00
Rizwan Mustafa 759ff88de7
Created webpack config file for detecting circular imports (#2463)
* Created webpack config file for detecting circular imports

* missing packages, added script to run webpack to find circular dependencies

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-10 17:21:24 +01:00
Bruce Berrios f4a9147308
Setup PR check action (#2445) by Bruception 2022-02-08 21:27:14 +01:00
Bruce Berrios 345740db5f
Separate backend and frontend dependencies (#2441) by Bruception
* Add request validation to user endpoints

* Remove tag id log

* Remove verbs from endpoints

* Remove old code

* Remove uid

* Fix

* Remove name from URI

* Rename utils

* Fix

* Move prettier

* Update gulp file

* Add additional scripts

* Update package-lock

* Update contributing.md

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-02-08 20:33:41 +01:00
Cameron e0ca6cec43
chore: updated node/npm versions (#2440) 2022-02-08 00:28:56 +01:00
Miodec 79c5b432fc moved eslint to root directory
using file eslint config
keeping folder structure when moving to dist/gen
updated some imports
2022-02-07 18:47:24 +01:00
Miodec 6c31faab0c added package to update a files modified date
this fixes issues where firebase deploy would not upload the file (because gulp doesnt update the modified date)
2022-02-01 13:34:05 +01:00
Miodec 0cc74791fb switched hashing package
now using node-object-hash
added a configuratoin property to enable/disable hashing
part of #2389 and #2250
2022-02-01 13:13:59 +01:00
Bruce Berrios 101c227599
Add Dynamic Server Configuration (#2385) by Bruception
* Add no frontend script

* Define context middleware

* Define base configuration schema

* Define configuration DAO

* Setup context middleware and live configuration fetch

* Remove patch configuration method

* Rename files for consistency

* Use plain object check

* Use plain object

* modified base configuration

* renamed config property

* brought back 2 properties

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-01-31 22:47:58 +01:00
Miodec 272a02b622 npm install 2022-01-31 16:09:19 +01:00
Miodec 68de7cfb89 exact package version 2022-01-31 16:08:15 +01:00
Miodec 28b59945ee Merge branch 'master' of https://github.com/Miodec/monkeytype 2022-01-29 22:03:37 +01:00
Bruce Berrios 7ce9146c7d
Add initial report quote endpoint (#2367) by Bruception
* Add initial report quote endpoint

* Tune rate limiter for report quote

* Tune rate limiter

* Increase max comment size

* Add supported languages to schema validation

* Fix naming
2022-01-29 22:03:02 +01:00
Miodec d9b9fd64b5 minifying js 2022-01-29 21:00:08 +01:00
dependabot[bot] 09a25e1b8b
Bump cached-path-relative from 1.0.2 to 1.1.0 (#2359)
Bumps [cached-path-relative](https://github.com/ashaffer/cached-path-relative) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/ashaffer/cached-path-relative/releases)
- [Commits](https://github.com/ashaffer/cached-path-relative/commits)

---
updated-dependencies:
- dependency-name: cached-path-relative
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-28 16:51:08 +01:00
Miodec bc96330ae9 moved node fetch to 2.6.7 2022-01-26 23:38:48 +01:00
dependabot[bot] 566b44df28
Bump node-fetch from 2.6.1 to 3.1.1 (#2338)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 3.1.1.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v3.1.1)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-25 11:26:19 +01:00
Miodec 90ea8b4626 Merge branch 'master' of https://github.com/Miodec/monkeytype 2022-01-15 20:56:20 +01:00
Miodec f64660174d added dynamic sw cache name that changes on compile 2022-01-15 20:34:42 +01:00
dependabot[bot] 1e3357980f
Bump follow-redirects from 1.14.4 to 1.14.7 (#2310)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-15 14:53:48 +01:00
Miodec ecaff47af9 Revert "added word definition fetching on click"
This reverts commit 80ed5f3d63.
2022-01-04 12:44:22 +01:00
Miodec adf358e1b3 added word definition fetching on click 2022-01-04 12:43:43 +01:00
Miodec b8ef24485e Revert "added word definition fetching on click"
This reverts commit 80ed5f3d63.
2022-01-04 12:30:08 +01:00
Miodec 80ed5f3d63 added word definition fetching on click 2022-01-04 12:28:19 +01:00
Miodec a11aef772f npm i 2021-12-30 16:04:54 +01:00
Jack 9fd6b03696 regenerated package lock 2021-10-13 20:25:01 +01:00
Jack 5cc3982a9c rerunning npm i 2021-10-10 23:30:29 +01:00
Jack cf8d258400
Quote submission (#1984)
* added new-quotes get and add routes

* added new-quotes/approve route to api

* Added front-end for quote submission

* fix language typo, force lowercase language

* Check for duplicate quote

* added unknown language handling to quote-submit

* npm i

* npm i

* language dropdown instead of input field

* mouse down instead click

* styling changes

* moved quotemod check to the controller,
added refuse endpoint,
added ability to approve and edit

* limiting quotes

* added log to quote approve

* added approve quotes button

* typo

* using the correct function, lowered limit

* added quote approve popup

* getting quotes and showing them

* error checking

* error checking

* removed console log

* stylng changes,
added refresh list button

* added disabled class

* styling changes

* handling button clicks
showing langauge and timestamp

* check if user is a quote mod

* approve button handling

* handling quote edit

* showing short quotes in red

* post, not get

* not parsing quote id to int

* parsing to objectid

* updated styling

* fixed lint warnings

* fixed up new quotes dao

* showing loader

* calling function correctly

* typo fix

* fixed wrong path,
fix broken newid,
saving file when file exists,
searching for the quote correctly when attempting to delete

* showing message

* blocking buttons and inputs when waiting for response,
unlocking after response

* deleted workflow

Co-authored-by: lukew3 <lukew25073@gmail.com>
2021-10-10 22:46:35 +01:00