mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-03-22 02:04:18 -05:00
add a mastodon test command
This commit is contained in:
parent
ef6e8c1b0d
commit
cef8551a35
|
|
@ -4,6 +4,7 @@ import cron from './cron.mjs';
|
|||
import { sendStatuses, testStatuses } from './social/index.mjs';
|
||||
import { updateAll } from './data/index.mjs';
|
||||
import { warmCaches } from "./splatnet/index.mjs";
|
||||
import MastodonClient from './social/clients/MastodonClient.mjs';
|
||||
|
||||
consoleStamp(console);
|
||||
dotenv.config();
|
||||
|
|
@ -12,6 +13,7 @@ const actions = {
|
|||
cron,
|
||||
social: sendStatuses,
|
||||
socialTest: testStatuses,
|
||||
socialTestMastodon: () => testStatuses([new MastodonClient]),
|
||||
splatnet: updateAll,
|
||||
warmCaches,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ export function defaultStatusGeneratorManager() {
|
|||
);
|
||||
}
|
||||
|
||||
export function testStatusGeneratorManager() {
|
||||
export function testStatusGeneratorManager(additionalClients) {
|
||||
return new StatusGeneratorManager(
|
||||
defaultStatusGenerators(),
|
||||
[new FileWriter],
|
||||
[new FileWriter, ...additionalClients],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +45,6 @@ export function sendStatuses() {
|
|||
return defaultStatusGeneratorManager().sendStatuses();
|
||||
}
|
||||
|
||||
export function testStatuses() {
|
||||
return testStatusGeneratorManager().sendStatuses(true);
|
||||
export function testStatuses(additionalClients = []) {
|
||||
return testStatusGeneratorManager(additionalClients).sendStatuses(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"cron": "node app/index.mjs cron",
|
||||
"social": "node app/index.mjs social",
|
||||
"social:test": "node app/index.mjs socialTest",
|
||||
"social:test:mastodon": "node app/index.mjs socialTestMastodon",
|
||||
"splatnet": "node app/index.mjs splatnet",
|
||||
"warmCaches": "node app/index.mjs warmCaches"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user