mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-11-18 16:58:18 -06:00
The Worker's lanes, RegionAuth renewals and direct archive writes replace app/cron.mjs, warmCaches and DataArchiver, which only spectre used. Local runs keep every updater, social, screenshot and archive tool; there is no local scheduler, and local snapshots stay in storage/archive/. ARCHIVE_DATA now has to be "true": any value, including the "false" in .env.example, used to turn archiving on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.8 KiB
JavaScript
45 lines
1.8 KiB
JavaScript
import dotenv from 'dotenv';
|
|
import consoleStamp from 'console-stamp';
|
|
import { sendStatuses, testStatuses } from './social/index.mjs';
|
|
import { update } from './data/index.mjs';
|
|
import MastodonClient from './social/clients/MastodonClient.mjs';
|
|
import ImageWriter from './social/clients/ImageWriter.mjs';
|
|
import BlueskyClient from './social/clients/BlueskyClient.mjs';
|
|
import ThreadsClient from './social/clients/ThreadsClient.mjs';
|
|
import { compressArchivesFromCli } from './data/ArchiveCompressor.mjs';
|
|
import { pruneArchivesFromCli } from './data/ArchivePruner.mjs';
|
|
import { reportArchiveStatsFromCli } from './data/ArchiveStats.mjs';
|
|
import { verifyArchivesFromCli } from './data/ArchiveVerifyCommand.mjs';
|
|
import { configureFilesystemStorage } from './common/storage/filesystem.mjs';
|
|
import { updateAvatars } from './social/updateAvatars.mjs';
|
|
import listBufferChannels from './social/buffer/listChannels.mjs';
|
|
|
|
consoleStamp(console);
|
|
dotenv.config({ quiet: true });
|
|
configureFilesystemStorage();
|
|
|
|
const actions = {
|
|
social: sendStatuses,
|
|
socialTest: testStatuses,
|
|
socialTestMastodon: () => testStatuses([new MastodonClient]),
|
|
socialTestBluesky: () => testStatuses([new BlueskyClient]),
|
|
socialTestImage: () => testStatuses([new ImageWriter]),
|
|
socialTestThreads: () => testStatuses([new ThreadsClient]),
|
|
bufferChannels: listBufferChannels,
|
|
splatnet: update,
|
|
archiveCompress: (...args) => compressArchivesFromCli(args),
|
|
archivePrune: (...args) => pruneArchivesFromCli(args),
|
|
archiveStats: (...args) => reportArchiveStatsFromCli(args),
|
|
archiveVerify: (...args) => verifyArchivesFromCli(args),
|
|
updateAvatars,
|
|
};
|
|
|
|
const command = process.argv[2];
|
|
const params = process.argv.slice(3);
|
|
const action = actions[command];
|
|
if (action) {
|
|
await action(...params);
|
|
} else {
|
|
console.error(`Unrecognized command: ${command}`);
|
|
}
|