Commit Graph

19 Commits

Author SHA1 Message Date
Gnuxie
4015543f66 Filesystem config improvements (#604)
* Rename read to configRead as it should have always been.

* Got a way to extract non-default values.

Now let's try unknown configuration values.

* Show unknown property paths with a warning.

Now we just need to make this scrap available in commands.

* Remove the old Mjolnir horrible RUNTIME client.

* Make the path that is used to load the config available.

* Warn when `--draupnir-config` isn't used.

* Introduce configMeta so that we can log meta on process.exit later.

* Only show non-default config values when draupnir is exiting.

to reduce noise.

* Get consistent with logging.

So it turns out that mps4bot-sdk is using a different instance
of the bot-sdk module than Draupnir, i think.

Since we used to tell MPS's logger to use the bot-sdk's `LogService`,
but the `setLogger` that was used was obviously inconsistent with
Draupnir's.

Obviously the bot-sdk should be a peer dependency in the bot-sdk
to prevent this happening in future.
2024-10-09 11:38:24 +01:00
gnuxie
0895c58882 Allow manual launch script to use safe mode. 2024-09-18 18:47:13 +01:00
gnuxie
35ccf94794 Make integration test harness use the BotModeToggle. 2024-09-18 18:29:49 +01:00
gnuxie
bd209848a3 Fix integration test fixtures now safe mode toggle controls draupnir. 2024-09-18 15:37:45 +01:00
gnuxie
de6e4d7416 Add restart command to safe mode.
Currently integration tests will be broken because we took control
over "who starts Draupnir?" away and gave it to the `SafeModeToggle`.

So we need to fix that.
2024-09-18 15:28:05 +01:00
gnuxie
bdbfadc095 Move to @the-draupnir-project/interface-manager for defining commands. 2024-09-06 17:18:53 +01:00
Gnuxie
337a6a3b76 Add reuse.software (#486)
We have a lot of verbose headers, and i think now is the best opportunity we have to become reuse compliant given that we just did two other similar maintenance changes (prettier, typescirpt5 & eslint9 & typescript-eslint).

* synapse_antispam resuse headers.

* delete old unused tslint.json.

* Add REUSE to pre-commit config.

* reuse info for config directory.
2024-07-25 10:58:40 +01:00
pre-commit-ci[bot]
3b2036c2db prettier all files 2024-07-22 19:13:57 +01:00
Gnuxie
8973db487b Migrate to eslint-9 flat config, typescript 5, typescript-eslint strictTypeChecked (#476)
* Migrate to eslint-9 strictTypeChecked & typescript 5.

* Update to MPS 0.23.0.

Required for strict type checks.

* Looks like we found a test that was complete garbage, amazing really.

* FIXUP

* Well, the command handler was bugged previously...

The command handler used to always only return the command
without the prefix due to an operator precedence bug.
This meant that when we made the order of operations explicit,
we were now including the prefix of the command in the copy.
So when we parsed arguments the code wasn't expecting the prefix
to be there.

* update to MPS 0.23.1.

MPS 0.23.0 was bugged because we didn't enable
`noUncheckedIndexedAccess` while upgrading to typescript 5.

* Make sure eslint runs on all ts files.

* eslint fixes.

* enable `noUncheckedIndexedAccess` & `exactOptionalPropertyTypes`.

* eslint ignores is clearly not understood by me.

* Update SuperCoolStream for eslint and ts5.

* stricter eslint done i thinks

* Whoops, added on .only somewhere.

* Update MPS.

* fix broken test realted things.

* Well I guess that part of getMessagesByUserIn was part of the interface.

* Fix redactionCommandTest.

* Account for escapeHTML in tests.

* Fix tests.

* stuff not matching with .editorconfig fixes.

* Fix appservice webAPI test.

* Update for MPS 0.23.3.
2024-07-22 16:54:04 +01:00
gnuxie
80ccb64330 Implement RoomStateBackingStore with BetterSqlite. 2024-04-06 20:03:38 +01:00
gnuxie
ad01b09773 Fix appservice provisioning. 2024-04-06 20:03:37 +01:00
gnuxie
979bef6013 Revert "Attempt make draupnirFactory accessible to integration tests"
This reverts commit 68ca69882bd7627414951aef11985408fd29dec8.
2024-04-06 20:03:37 +01:00
gnuxie
6d52137501 Attempt make draupnirFactory accessible to integration tests
But this won't work as we'd have to mess about a lot with
the clientsinroommap
2024-04-06 20:03:37 +01:00
gnuxie
3eb3bae085 Instantiate web apis in an appropriate place. 2024-04-06 20:03:36 +01:00
gnuxie
ac4c447637 Start client in manual launch script.
Not doing this would just cause draupnir to exit.
2024-04-06 20:03:35 +01:00
Jess Porter
4376679b99 load config yaml manually, remove more references to static config (#347) 2022-08-16 15:51:18 +01:00
Gnuxie
21aabc879a Stop the config being global (in almost all contexts). (#334)
* Stop the config being global (in almost all contexts).

* make sure unit test has a config

* Make failing word list more visible

* Only use Healthz from index.ts

Not really sure how useful it is anyways?
2022-08-09 11:29:27 +01:00
David Teller
a21415a04c Give the ability to moderators to react quickly to /report abuse reports. (#137) 2021-11-09 13:15:49 +01:00
gnuxie
21d79475e3 Add manual launch script for working with mx-tester 2021-09-27 15:33:15 +01:00