mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-04-25 07:18:35 -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 { sendStatuses, testStatuses } from './social/index.mjs';
|
||||||
import { updateAll } from './data/index.mjs';
|
import { updateAll } from './data/index.mjs';
|
||||||
import { warmCaches } from "./splatnet/index.mjs";
|
import { warmCaches } from "./splatnet/index.mjs";
|
||||||
|
import MastodonClient from './social/clients/MastodonClient.mjs';
|
||||||
|
|
||||||
consoleStamp(console);
|
consoleStamp(console);
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
@ -12,6 +13,7 @@ const actions = {
|
||||||
cron,
|
cron,
|
||||||
social: sendStatuses,
|
social: sendStatuses,
|
||||||
socialTest: testStatuses,
|
socialTest: testStatuses,
|
||||||
|
socialTestMastodon: () => testStatuses([new MastodonClient]),
|
||||||
splatnet: updateAll,
|
splatnet: updateAll,
|
||||||
warmCaches,
|
warmCaches,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,10 @@ export function defaultStatusGeneratorManager() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function testStatusGeneratorManager() {
|
export function testStatusGeneratorManager(additionalClients) {
|
||||||
return new StatusGeneratorManager(
|
return new StatusGeneratorManager(
|
||||||
defaultStatusGenerators(),
|
defaultStatusGenerators(),
|
||||||
[new FileWriter],
|
[new FileWriter, ...additionalClients],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,6 +45,6 @@ export function sendStatuses() {
|
||||||
return defaultStatusGeneratorManager().sendStatuses();
|
return defaultStatusGeneratorManager().sendStatuses();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function testStatuses() {
|
export function testStatuses(additionalClients = []) {
|
||||||
return testStatusGeneratorManager().sendStatuses(true);
|
return testStatusGeneratorManager(additionalClients).sendStatuses(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
"cron": "node app/index.mjs cron",
|
"cron": "node app/index.mjs cron",
|
||||||
"social": "node app/index.mjs social",
|
"social": "node app/index.mjs social",
|
||||||
"social:test": "node app/index.mjs socialTest",
|
"social:test": "node app/index.mjs socialTest",
|
||||||
|
"social:test:mastodon": "node app/index.mjs socialTestMastodon",
|
||||||
"splatnet": "node app/index.mjs splatnet",
|
"splatnet": "node app/index.mjs splatnet",
|
||||||
"warmCaches": "node app/index.mjs warmCaches"
|
"warmCaches": "node app/index.mjs warmCaches"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user