Files
PluralFlux-infra/package.json

33 lines
718 B
JSON
Raw Normal View History

{
"name": "pluralflux",
"version": "1.0.0",
"description": "",
"main": "src/bot.js",
"repository": {
"type": "git",
"url": "https://github.com/pieartsy/PluralFlux.git"
},
"private": true,
"dependencies": {
"@fluxerjs/core": "^1.2.2",
2026-02-16 10:36:38 -05:00
"dotenv": "^17.3.1",
"pg": "^8.18.0",
"pg-hstore": "^2.3.4",
"pm2": "^6.0.14",
"sequelize": "^6.37.7",
"tmp": "^0.2.5"
2026-02-14 18:11:19 -05:00
},
"devDependencies": {
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 5ab0d62b * updated jest to sort of work with es6 * separating out enum return from method return * mostly working except for the weirdest error * nevermind it wasn't actually working, gonna move on for now * added babel to convert es modules to cjs * finally figured out issue with tests (referencing the method directly in the test.each calls the real method not the mock in beforeEach()) * setup fixed more * added error handling parseMemberCommand test * renamed db to database more tests and fixing logic for memberhelper * upgraded fluxer.js * moved import to helpers folder * moved import to helpers folder * more tests for member helper * think i fixed weird error with webhook sending error when a user has no members * simplified sendMessageAsAttachment * added return to addFullMember so that addNewMember can reference it properly in strings * test setup for messagehelper and webhookhelper * readded line i shouldn't have removed in sendMessageAsMember * fixed test and logic * added test for memberHelper * updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly * added tests for parseProxyTags and updated logic * added "return" so tests dont terminate on failure and deleted env.jest * finished tests for messageHelper! * more cases for messageHelper just in case * updating docstring for messageHelper parseProxyTags * more tests for webhookhelper * deleted extra file added during merge * removed confusing brackets from enum docs * finally mocking correctly * adding more cases to messageHelper tests * updating enums * removed error response when proxy is sent without content * , updated tests for webhookHelper and removed error response when proxy is sent without content * added debounce to count guilds properly * added todo note * added tests for updateDisplayName * edited help message trigger for updatePropic * update message helper test to include space case * update bot to suppress errors from API * fixed bug for import not sending help text, added help text if you type a unrecognized command * updated to be enum * updated member helper and tests * edit enums, tweak import content command * removed unnecessary await and console.log * made it easier to make a member * added nicer error listing to importHelper * updated documentation * Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-19 21:45:10 -05:00
"@babel/core": "^7.29.0",
"@babel/plugin-transform-modules-commonjs": "^7.28.6",
"@babel/preset-env": "^7.29.0",
"@fetch-mock/jest": "^0.2.20",
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 5ab0d62b * updated jest to sort of work with es6 * separating out enum return from method return * mostly working except for the weirdest error * nevermind it wasn't actually working, gonna move on for now * added babel to convert es modules to cjs * finally figured out issue with tests (referencing the method directly in the test.each calls the real method not the mock in beforeEach()) * setup fixed more * added error handling parseMemberCommand test * renamed db to database more tests and fixing logic for memberhelper * upgraded fluxer.js * moved import to helpers folder * moved import to helpers folder * more tests for member helper * think i fixed weird error with webhook sending error when a user has no members * simplified sendMessageAsAttachment * added return to addFullMember so that addNewMember can reference it properly in strings * test setup for messagehelper and webhookhelper * readded line i shouldn't have removed in sendMessageAsMember * fixed test and logic * added test for memberHelper * updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly * added tests for parseProxyTags and updated logic * added "return" so tests dont terminate on failure and deleted env.jest * finished tests for messageHelper! * more cases for messageHelper just in case * updating docstring for messageHelper parseProxyTags * more tests for webhookhelper * deleted extra file added during merge * removed confusing brackets from enum docs * finally mocking correctly * adding more cases to messageHelper tests * updating enums * removed error response when proxy is sent without content * , updated tests for webhookHelper and removed error response when proxy is sent without content * added debounce to count guilds properly * added todo note * added tests for updateDisplayName * edited help message trigger for updatePropic * update message helper test to include space case * update bot to suppress errors from API * fixed bug for import not sending help text, added help text if you type a unrecognized command * updated to be enum * updated member helper and tests * edit enums, tweak import content command * removed unnecessary await and console.log * made it easier to make a member * added nicer error listing to importHelper * updated documentation * Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests --------- Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-19 21:45:10 -05:00
"babel-jest": "^30.2.0",
"fetch-mock": "^12.6.0",
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>
2026-02-25 19:30:39 -05:00
"jest": "^30.2.0"
2026-02-14 18:16:10 -05:00
},
"scripts": {
"test": "jest"
}
}