mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-14 20:15:28 +10:00
2b31cc2ae9f2b7846536477543f812604218dfcb
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 2b31cc2ae9 |
perf: Merge develop into main (#36)
* Update dockerfile for standalone deployment (#23) * Add files via upload * Update Docker image for pluralflux service * removing unnecessary network and container name definitions --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com> * Converting ES6 back to CJS (#25) converting back to cjs Co-authored-by: Aster Fialla <asterfialla@gmail.com> * Fix: Further converting ES6 to CJS - Making exports named instead of default (#26) * adding to git ignore * making imports named not default to not break all my tests * adjusted setup for memberhelper test --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com> * feat: add db migrations with typeORM (#28) * adding typescript packages for typeORM * add typeORM initial files * updating package scripts * updating compose.yaml to have an exposed port for the postgres * modifying setup for typeORM * update database stuff and and package.json to help generate migrations * made models and migrations in typeORM * delete unneeded database.js * made database pattern ignored by jest * remove sequelize * separate member repo from member helper * not sure why i made everything numbers in the model but it's fixed now * edited package.json script * remove unused index.ts * adjusted files to reference repository correctly and appdatasource * made appdatasource export as named * removed start-db script * added init to appdatasource in bot.js * migrations finally! * new migration matching model names I want * updating tests * removing testpathignore patterns since it seems to be unecessary? * adjusting migrations to match current schema * removed reference to secrets file * delete old migration * Revert "delete old migration" This reverts commit |
|||
| df80eca0ec |
refactor: Removing then/catch from async/await calls (#22)
* refactored async/await for import helper to not also use then/catch * added enum * refactor webhookHelper and tests to not use then/catch * changed docstring * refactoring bot and tests to not use then/catch * refactoring commands.js and tests to not use then/catch * refactoring memberHelper.js and tests to not use then/catch * removing then/catch from messageHelper.test.js * fixed set up for commands tests * edited bot to have top level main function * one more test in commands.js, and removed console.error * fixed typo in webhookHelper * forgot to switch over some tests in bot.test and commands.test * removed console.log from import helper * put console.error in commands * converted utils.js to not use then/catch * tested utils checkImageFormatValidity * removed jest-fetch-mock since it turns out I was just manually mocking it anyway * refactored database to not use then/catch * added dash to commands.js and test to pass * added the remaining webhook tests * changed utils to check for 10MB size not 1MB * removed unnecessary try/catch from utils * Simplify getWebhook to use .find() instead of foreach logic * make memberCommand exit when error occurs with parseMemberCommand * changed commands.js to not have user interaction within the catch * updated console.error message in database.js * made importHelper mock throw error instead of "resolve" error * replaced "pk;" with "pf;" in test * Got rid of unnecessary check for empty message from user (Fluxer doesn't allow this to happen) Removed export of token * getAllMembersInfo checks for fields.length * added default case to memberCommandHandler to throw error if command is not recognized * reversed check for valid proxy (was returning valid if the proxy existed and invalid if it didn't) * pushes e.message instead of full error object to errors array in importHelper * adjusted tests to properly use mockRejectedValue for async rejections * changed getAllMembersInfo map to say `index` not `name` as it actually gets the index of a member and then the member object * adjusted importHelper to properly test throwing of aggregate error * revamped setting of expiration warning (moved to utils and changed logic, wrote tests) --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com> |
|||
| 7fead5e3d7 |
feat: Add unit tests (#21)
Tests are mostly complete (though some are failing -- to be fixed in the async/await refactor. Also refactored, fixed bugs found while testing, and added ability to type `pf;m` instead of `pf;member`. --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com> |
|||
| 8fc590c062 |
feat: add tests and other such features (#3)
* converted import syntax to ES modules
removed unused methods
* got test sort of working (jest set up is not crashing but also not mocking correctly)
* adjusted beforeeach/beforeall so more pass
* more correct test setup
* converted import syntax to commonJS
removed unused methods
* got test sort of working (jest set up is not crashing but also not mocking correctly)
* adjusted beforeeach/beforeall so more pass
* more correct test setup
* more correct dockerfile and compose.yaml
* Revert "converted import syntax to commonJS"
This reverts commit
|