Commit graph

22 commits

Author SHA1 Message Date
Miodec 642a2b22a1 chore: update backend out dir 2024-07-25 19:59:05 +02:00
Jack 3e88ac2f12
refactor: restructure project to a true monorepo (#5626)
* split ts files

* packages

* nomore workspace?

* blah

* build, exports

* declaration

* blargh

* turrrrbo

* fix fontawesome paths

* allow file in eslint, fix ts errors

* optimise package, update tsconfig

* fix ts

* update turbo config

* eslint split

* fix imports

* fix types

* lock

* add turbo task

* script

* test task

* pretty scripts

* update prettier ignore

* no cache for tests

* lint task

* turbo

* no out

* depend on env

* fix mono breaking things

* odl

* fix version dependency of mongodb-memory-server

* Revert "fix version dependency of mongodb-memory-server"

This reverts commit 52ffac47b1.

* update vitest-mongodb

* release scripts

* update ci

* update dev script

* ignore issues around firebase config

* add check ts tasks

* import isaxioserror

* shared types package

* replace tsnodedev with tsx

* fix import

* shared types

* module

* backend imports

* declaration

* node version

* test code

* assert json

* verbatim

* type

* lodash

* ts ver

* fix fix fix?

* remove assert

* remove module and resolution

* cleanup

* tsconfig

* fix frontend

* remove unecessary props

* more unused

* remove skiplib

* declaration map, dev script

* remove install scripts

* fix regex

* move shared types to package

* dont include shared types

* remove path

* update scripts

* test code

* test code

* fix backend types

* fully fix backend

* fix frontend d.ts

* add .js to imports

* remove module

* revert add .js

* update tsconfig

* use bundler module resolution

* almost all frontend types

* mooore

* date fns

* fix backend docker

* fix ape keys

* fix type

* clean rimraf type

* fix shared-types in workspace

* fix import resolving

* fix docker builds

* ignore type problems on slim-select until new version is released

* turrrrbo

* fix npm ci

* fix lint task

* expose env variables needed by frontend build

* fix dependencies

* package-lock

* backend watch ts and lint

* add fe and be build scripts to root

* fix dev not building packages

* shared-types missing eslint

* move shared types back to dev-deps

* add packages to labeler

* add packages step to ci

* typo

* filter update

* remove concurrently from root

* add scripts

* abbreviate

* rename

* yeet

* fixed path

* test pkg

* consistent ordering

* rename

* Revert "backend imports"

This reverts commit d715198829.

* fix missing imports, remove last .js

* remove test package

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2024-07-22 15:08:11 +02:00
Jack 8f4d291fcf
Revert "impr: use tsrest/zod for type-safety on both ends (@fehmer) (#5479)" (#5619)
This reverts commit 4c9e949f10.
2024-07-16 17:29:09 +02:00
Christian Fehmer 4c9e949f10
impr: use tsrest/zod for type-safety on both ends (@fehmer) (#5479)
!nuf
2024-07-16 15:24:06 +02:00
Miodec 57ff186f91 build: add @shared alias pointing to the shared directory 2024-05-29 14:29:47 +02:00
Jack cdfc7833e3
refactor(types): shared config and preset types (#5024)
* build: include all shared types files instead of just one

* move config property value types to a shared file

* backend build issues

* shared preset and config types
preset and config ape types

* typo

* ignoring unused warnings

* fixed merge
2024-02-08 14:32:04 +01:00
Miodec e7f021a37c build: fix backend build fail 2024-02-08 14:02:14 +01:00
Miodec aa011b6b99 build: include all shared types files instead of just one 2024-02-08 13:49:11 +01:00
Jack 0751375ab6
refactor: shared types (miodec) (#4978)
* rework shared types

* revert one small change
2024-01-29 15:53:42 +01:00
Jack ee629db5b5
build: enable noUncheckedIndexedAccess compiler rule (Miodec) (#4958)
* added rule to backend and fixed all the errors

* setup frontend and start fixing some warnings

* more fixes

* fixes

* fixes

* fixes

* more refactoring

* fixes

* pain

* more pain

* ouch

* mooore

* 10 hours later

* ugghhh

* another one

* last element can be undefined duh

* smol one

* absolute typescript gigachad

* moooore fixes

* chart stuff

* almost done

* its... done

* remove console log

* use for of instead
2024-01-29 13:27:36 +01:00
Miodec 33d0812019 build(backend): enable more ts flags 2024-01-18 23:33:50 +01:00
Miodec abbe77b01b build(backend): enable noPropertyAccessFromIndexSignature flag 2024-01-18 23:24:33 +01:00
Miodec e1dcd29419 build: add ts compiler flag 2024-01-18 23:20:44 +01:00
Christian Fehmer 4b3059bdc7
refactor: Import shared types back into MonkeyTypes namespace (fehmer) (#4800)
* impr: Import shared types back into MonkeyTypes namespace, partially reverts #4769

* down to 6 errors

* fixes

* cleanup
2023-11-20 14:56:28 +00:00
Bruce Berrios a79a6be8b5
chore: update tsconfig and docker compose (#4530)
* config changes

* add types

* ebadengine
2023-08-12 16:41:36 +02:00
Miodec 17cfb2ad7b build: resolve ts-node-dev compile errors 2023-08-11 16:28:20 +02:00
Bruce Berrios 91220a5bdc
Move backend source files into src folder (#2943) 2022-05-05 19:27:00 +02:00
Sondre Kjempekjenn 88a587c5c2
Feature/backend test (#2937) sondrekje
* Switch to ts-node-dev for development

* Minimal setup for backend testing

* Basic controller test

* __tests__ directory

* Delete old DB client

* Improve tests, ensure DB cleanup only runs for inMemory DB
2022-05-05 15:19:31 +02:00
Bruce Berrios 2dba957adc
Add public api docs (#2656) by bruce
* Add public documentation

* typo

* added hard limit on the leaderboards

* ignoring worker when compiling

* added leaderboard routes

* leaderboards accept apekeys

* Fix docs

* Fix

* Specify parse base

* Add ape rate limiter

* added documentation link

* updated message

Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-03-09 13:02:37 +01:00
Bruce Berrios 3240abc22e
Enable strict null checks in backend (#2639)
* Enable strict null checks in backend

* Fix

* Use non-null assertion

* Add none
2022-03-07 11:10:07 -05:00
Miodec 80f822c76a removed unnecessary types 2022-02-22 23:39:21 +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