@zaisma/cli 0.28.0 → 0.29.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/README.md +1 -1
- package/package.json +1 -1
- package/zaisma.mjs +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Run it with `npx @zaisma/cli <command>`, or install it once with `npm install -g
|
|
|
6
6
|
|
|
7
7
|
Before anything else, `zaisma check ./build` lists anything in the game Zaisma would refuse or that won't work on Zaisma (threaded engine builds, `alert()`, forms, servers the game hasn't listed…), each with how to fix it. It needs no key and sends nothing.
|
|
8
8
|
|
|
9
|
-
1. Make an API key at https://zaisma.com/
|
|
9
|
+
1. Make an API key at https://zaisma.com/dashboard/settings, under Keys, and set it: `export ZAISMA_KEY=zsk_…`
|
|
10
10
|
2. Make a game: `zaisma new "Sky Hopper"`
|
|
11
11
|
3. Upload your build folder (the one with `index.html`): `zaisma upload ./build --game sky-hopper --patch-notes "First version"`. Only new or changed files are sent. It runs the check first, and in what it sends (never in your folder) it downloads scripts, styles and fonts the game loads from other sites and unpacks pre-compressed builds (`.gz`, `.br`, `.unityweb`), then says what it changed. Once the scan passes you get a private preview link.
|
|
12
12
|
4. Publish it: `zaisma publish sky-hopper <version_id>`, then show it to everyone: `zaisma visibility sky-hopper listed`
|
package/package.json
CHANGED
package/zaisma.mjs
CHANGED
|
@@ -458,7 +458,7 @@ function helpText() {
|
|
|
458
458
|
"Exit codes:",
|
|
459
459
|
...Object.values(EXIT_CODES).map((exit) => ` ${exit.exitCode} ${exit.meaning}`),
|
|
460
460
|
"",
|
|
461
|
-
"Set ZAISMA_KEY to an API key from https://zaisma.com/
|
|
461
|
+
"Set ZAISMA_KEY to an API key from https://zaisma.com/dashboard/settings (under Keys).",
|
|
462
462
|
"Without installing: npx @zaisma/cli <command>. Installed (npm i -g @zaisma/cli): zaisma <command>.",
|
|
463
463
|
);
|
|
464
464
|
return lines.join("\n");
|
|
@@ -489,7 +489,7 @@ function helpAnswer() {
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
async function api(method, path, body) {
|
|
492
|
-
if (!KEY) refuse("no_key", { message: "ZAISMA_KEY isn't set.", field: "ZAISMA_KEY", fix: "Make an API key at https://zaisma.com/
|
|
492
|
+
if (!KEY) refuse("no_key", { message: "ZAISMA_KEY isn't set.", field: "ZAISMA_KEY", fix: "Make an API key at https://zaisma.com/dashboard/settings (under Keys) and set it: export ZAISMA_KEY=zsk_…" }, EXIT_CODES.failed);
|
|
493
493
|
let response;
|
|
494
494
|
try {
|
|
495
495
|
response = await fetch(`${API}/api/dev${path}`, {
|
|
@@ -1479,7 +1479,7 @@ async function exportGame({ slug }, flags) {
|
|
|
1479
1479
|
const folder = flags.folder ?? `${slug}-export`;
|
|
1480
1480
|
const there = await readdir(folder).catch(() => null);
|
|
1481
1481
|
if (there?.length) refuse("folder_not_empty", { message: `${folder} isn't empty.`, field: "folder", fix: "Give a new or empty folder with --folder, or move what's in it." });
|
|
1482
|
-
if (!KEY) refuse("no_key", { message: "ZAISMA_KEY isn't set.", field: "ZAISMA_KEY", fix: "Make an API key at https://zaisma.com/
|
|
1482
|
+
if (!KEY) refuse("no_key", { message: "ZAISMA_KEY isn't set.", field: "ZAISMA_KEY", fix: "Make an API key at https://zaisma.com/dashboard/settings (under Keys) and set it: export ZAISMA_KEY=zsk_…" }, EXIT_CODES.failed);
|
|
1483
1483
|
let response;
|
|
1484
1484
|
try {
|
|
1485
1485
|
response = await fetch(`${API}/api/dev/games/${encodeURIComponent(slug)}/export/download`, { headers: { authorization: `Bearer ${KEY}`, "x-zaisma-client": "cli", "user-agent": `zaisma-cli/${CLI_VERSION}` } });
|