@genex-ai/cli-demo 1.14.3-dev.573 → 1.14.3-dev.575

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5106,6 +5106,15 @@ function retryAfterHint(res) {
5106
5106
  const secs = Math.ceil(raw);
5107
5107
  return ` Try again in ${secs < 90 ? `${secs}s` : `~${Math.ceil(secs / 60)} min`}.`;
5108
5108
  }
5109
+ async function serverReason(res) {
5110
+ try {
5111
+ const body = await res.clone().json();
5112
+ if (typeof body?.message === "string" && body.message.trim()) return body.message.trim();
5113
+ if (typeof body?.error === "string" && body.error.trim()) return body.error.trim();
5114
+ } catch {
5115
+ }
5116
+ return null;
5117
+ }
5109
5118
  async function getUploadToken(ctx, commit, log) {
5110
5119
  let res;
5111
5120
  try {
@@ -5133,7 +5142,9 @@ async function getUploadToken(ctx, commit, log) {
5133
5142
  return null;
5134
5143
  }
5135
5144
  if (!res.ok) {
5145
+ const reason = await serverReason(res);
5136
5146
  log.error(`Couldn't get an upload token (HTTP ${res.status}).`);
5147
+ if (reason) log.dim(` ${reason}`);
5137
5148
  return null;
5138
5149
  }
5139
5150
  return await res.json();
@@ -5438,7 +5449,9 @@ async function fetchPushUrl(ctx, log, expectStagingCommit) {
5438
5449
  return null;
5439
5450
  }
5440
5451
  if (!res.ok) {
5452
+ const reason = await serverReason(res);
5441
5453
  log.error(`Couldn't authorize the source push (HTTP ${res.status}).`);
5454
+ if (reason) log.dim(` ${reason}`);
5442
5455
  return null;
5443
5456
  }
5444
5457
  const data = await res.json().catch(() => null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.14.3-dev.573",
3
+ "version": "1.14.3-dev.575",
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": {