@genex-ai/cli-demo 1.2.2-dev.335 → 1.2.3-dev.337
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/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4238,6 +4238,13 @@ async function deployGame(ctx, opts, log) {
|
|
|
4238
4238
|
log.step("Requesting an upload token\u2026");
|
|
4239
4239
|
const grant = await getUploadToken(ctx, commit, log);
|
|
4240
4240
|
if (!grant) return false;
|
|
4241
|
+
const wanted = opts.channel ?? "production";
|
|
4242
|
+
if (wanted !== "production" && !grant.channels?.includes(wanted)) {
|
|
4243
|
+
log.error(`This Genex API doesn't support release channels yet, so a ${wanted} deploy would replace your live game.`);
|
|
4244
|
+
log.dim(" Nothing was uploaded and nothing changed. Try again in a few minutes \u2014");
|
|
4245
|
+
log.dim(" the API is likely mid-deploy and will accept it once it finishes.");
|
|
4246
|
+
return false;
|
|
4247
|
+
}
|
|
4241
4248
|
const totalBytes = files.reduce((n, f) => n + f.bytes.length, 0);
|
|
4242
4249
|
const mb = (n) => (n / 1048576).toFixed(n < 1048576 ? 2 : 1);
|
|
4243
4250
|
if (files.length > grant.limits.maxFiles) {
|
|
@@ -4491,10 +4498,11 @@ async function callPublish(ctx, commit, opts, log) {
|
|
|
4491
4498
|
}
|
|
4492
4499
|
const body = await res.json().catch(() => null);
|
|
4493
4500
|
const asked = opts.channel ?? "production";
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
);
|
|
4501
|
+
const applied = body?.channel ?? "production";
|
|
4502
|
+
if (applied !== asked) {
|
|
4503
|
+
log.error(`Asked for a ${asked} deploy and the server applied ${applied}.`);
|
|
4504
|
+
log.dim(` Your live game may already have been replaced${body?.url ? ` \u2014 open ${body.url} to check` : ""}.`);
|
|
4505
|
+
log.dim(" Re-run once the API finishes deploying; the build you meant to keep is still in R2.");
|
|
4498
4506
|
return null;
|
|
4499
4507
|
}
|
|
4500
4508
|
return { url: body?.url ?? "" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/cli-demo",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3-dev.337",
|
|
4
4
|
"description": "Set up your project's agent workspace (.claude/.codex/.cursor in the game folder), authorize, create a game project, generate AI assets, and publish (genex CLI).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|