This is now done here:
https://github.com/discourse/discourse/pull/36139
OP will still be a ways to go.