@zaisma/cli 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/zaisma.mjs +3 -3
package/package.json
CHANGED
package/zaisma.mjs
CHANGED
|
@@ -1465,7 +1465,7 @@ async function exportDatabase({ slug, file }) {
|
|
|
1465
1465
|
if (partCount > 1 && file && !isJson) process.stdout.write("\n");
|
|
1466
1466
|
if (isJson) return printJson({ dump_sql: file ? null : dumpParts.join(""), file: file ?? null, part_count: partCount, read_row_count: readRowCount });
|
|
1467
1467
|
if (!file) return process.stdout.write(dumpParts.join(""));
|
|
1468
|
-
console.log(`Saved ${slug}'s database to ${file} (${partCount} part${partCount === 1 ? "" : "s"}, ${readRowCount.toLocaleString("en-US")} rows read).${sqlite ? ` Run your game server on it with:
|
|
1468
|
+
console.log(`Saved ${slug}'s database to ${file} (${partCount} part${partCount === 1 ? "" : "s"}, ${readRowCount.toLocaleString("en-US")} rows read).${sqlite ? ` Run your game server on it with: npx @zaisma/game-server <server.ts> --game ${slug} --database-file ${file}` : ""}`);
|
|
1469
1469
|
}
|
|
1470
1470
|
|
|
1471
1471
|
/** The biggest database.sql export turns into a .sqlite file itself; past it, sqlite3 does it (Node's text tops out near this). */
|
|
@@ -1473,7 +1473,7 @@ const MAXIMUM_SQLITE_DUMP_SIZE_BYTES = 400 * 1024 * 1024;
|
|
|
1473
1473
|
|
|
1474
1474
|
/**
|
|
1475
1475
|
* export: the .zip of everything about a game (GET …/export/download), downloaded and saved as a folder,
|
|
1476
|
-
* with database.sql also made into database.sqlite, ready for the Node runner's --database.
|
|
1476
|
+
* with database.sql also made into database.sqlite, ready for the Node runner's --database-file.
|
|
1477
1477
|
*/
|
|
1478
1478
|
async function exportGame({ slug }, flags) {
|
|
1479
1479
|
const folder = flags.folder ?? `${slug}-export`;
|
|
@@ -1527,7 +1527,7 @@ async function exportGame({ slug }, flags) {
|
|
|
1527
1527
|
return EXIT_CODES.done;
|
|
1528
1528
|
}
|
|
1529
1529
|
console.log(`Saved everything about ${slug} in ${folder}: ${entries.length.toLocaleString("en-US")} files, ${(sizeBytes / 1024 / 1024).toFixed(1)} MB. README.txt says what's where.`);
|
|
1530
|
-
if (databaseFile) console.log(`Run your game server on its database with:
|
|
1530
|
+
if (databaseFile) console.log(`Run your game server on its database with: npx @zaisma/game-server <server.ts> --game ${slug} --database-file ${databaseFile}`);
|
|
1531
1531
|
else if (dumpSizeBytes) console.log(`Make its database a .sqlite file with: sqlite3 ${join(folder, "database.sqlite")} < ${dumpFile}`);
|
|
1532
1532
|
return EXIT_CODES.done;
|
|
1533
1533
|
} finally {
|