Add the Sokko TCG collectible card mini-game

Add the server-backed card game: Discord login, recharging pack openings,
album, trades, gifts, stardust shop, campaign codes and its administration,
stored in SQLite and disabled in production until configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 17:47:35 +01:00
parent 243465720f
commit 5ce35cd7ba
193 changed files with 12159 additions and 28 deletions

View file

@ -0,0 +1,18 @@
// Rôle : sauvegarde ou vérifie la base Sokko TCG depuis les tâches d'exploitation.
import { resolve } from "node:path";
import { backupCardsDatabase, restoreCardsDatabase, verifyCardsDatabase } from "../services/cards/backup.js";
const [mode, source, destination] = process.argv.slice(2);
if (mode === "backup" && source && destination) {
await backupCardsDatabase(resolve(source), resolve(destination));
console.log(`Sokko TCG backup written to ${resolve(destination)}`);
} else if (mode === "verify" && source) {
verifyCardsDatabase(resolve(source));
console.log(`Sokko TCG backup verified: ${resolve(source)}`);
} else if (mode === "restore" && source && destination) {
restoreCardsDatabase(resolve(source), resolve(destination));
console.log(`Sokko TCG database restored to ${resolve(destination)}`);
} else {
console.error("Usage: node scripts/backup-nebula-cards.mjs backup <database> <backup> | verify <backup> | restore <backup> <database>");
process.exitCode = 1;
}