Conversation
| @@ -27,22 +31,22 @@ const globalConfigSchema = z.object({ | |||
| }); | |||
| | |||
There was a problem hiding this comment.
Ditch this entirely. It should default to using the robochimp .env.test file if not in production. (you can create + add to git .env.test to the local robochimp directory if it doesn't exist.
| | ||
| dotenv.config({ path: path.resolve(process.cwd(), process.env.TEST ? '.env.test' : '.env') }); | ||
| | ||
| function devOrEnv(value: string | undefined, fallback: string): string { |
There was a problem hiding this comment.
don't think this will be needed with the .env.test file as described elsewhere
| "test:watch": "vitest --config vitest.unit.config.mts --coverage", | ||
| "test:ci:unit": "pnpm concurrent \"pnpm test:unit\" \"pnpm test:lint\" \"tsc -p tests/integration\" \"tsc -p tests/unit\"", | ||
| "wiki:testbot": "node scripts/wiki-testbot.mjs", | ||
| "wiki:testbot:pg": "node scripts/wiki-testbot.mjs --real-pg", |
There was a problem hiding this comment.
is it possible to make this just a single script that checks the USE_REAL_PG variable from the .env file?
| | ||
| `pnpm spritesheet`: Run this to update the spritesheets. | ||
| | ||
| ### Wiki testing (CA/Fishing lookups) |
There was a problem hiding this comment.
I'm okay with this staying in this PR, and i'm guessing those robochimp changes may be required for some of this to work; so just rip out the robochimp stuff, change this to in development, and make a new pr for the robochimp stuff. keeping in mind the robochimp comments i made.
| const args = new Set(process.argv.slice(2)); | ||
| const port = process.env.HTTP_PORT ?? '3002'; | ||
| | ||
| const env = { |
There was a problem hiding this comment.
again, this really should be using .env.test and not hardcoded defaults
| await redis.del(RedisKeys.BlacklistedGuilds); | ||
| if (a.guild) { | ||
| await redis.sadd(RedisKeys.BlacklistedGuilds, ...a.guild.map(b => b.id.toString())); | ||
| try { |
There was a problem hiding this comment.
Not sure if you need this now that I've improved the MockedRedis() class; it should actually work now. Just make sure it properly falls back to the MockedRedis() class, then i think you'll find it works
| const shouldUseRealPostgres = globalConfig.isProduction || process.env.USE_REAL_PG === '1'; | ||
| if (shouldUseRealPostgres) { | ||
| return new PrismaPg({ connectionString: process.env[`${type.toUpperCase()}_DATABASE_URL`] }); | ||
| const connectionString = |
There was a problem hiding this comment.
Rip this out.
The .env file in packages/modules/robochimp is totally different from the one in the root directory.
When properly building the robochimp project, it uses the .env file in the local robochimp directory.
The robochimp .env.test file (which does exist already btw) has separate OSB and BSO entries, which is absolutely ESSENTIAL as robochimp communicates with both simultaneously.
| gear: { | ||
| pet: botUser.minion_equippedPet | ||
| pet: botUser.minion_equippedPet, | ||
| melee: (gear.melee ?? null) as any, |
There was a problem hiding this comment.
instead of 'as any' does it work if you do as (FullMinionGearSetup | null) (or whatever the type for that gear is)
| @@ -1,4 +1,5 @@ | |||
| import { serve } from '@hono/node-server'; | |||
There was a problem hiding this comment.
This file and the other robochimp stuff should be it's own PR, unless it's directly relevent to you the fishing update.
But because it's a dependency, it needs to be merged first. I'll stop saying it, I just wanted to highlight the file
| @@ -9,6 +9,13 @@ export type AuthenticatedUser = { | |||
| bits: number[]; | |||
| }; | |||
Following the 2t fishing merge, I've updated the fishing sections of the wiki and made some improvements.
The main new feature is the following a new Fishing Method BIS XP/HR Finder:
I have ensured the tool doesn't leak any bank values etc as you can type other peoples IDs in etc
In order to achieve the above and test it all I had to do the following:
As always, I've had to use AI for this but tested all I can. It will definitely need double checking over all the changes especially as it's touched the blacklist file etc.