@genex-ai/cli-demo 1.2.0-dev.314 → 1.2.1-dev.316

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 +51 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5191,6 +5191,46 @@ async function borrowEvidence(meta, cwd) {
5191
5191
  return readme.includes(host) || /\b(upstream|originally by|ported from|borrowed from)\b/i.test(readme);
5192
5192
  }
5193
5193
 
5194
+ // src/lib/verify-page.ts
5195
+ async function verifyGamePage(args) {
5196
+ const { apiUrl, slug, published, expect, log } = args;
5197
+ if (!published) return;
5198
+ let item;
5199
+ try {
5200
+ const res = await fetch(`${apiUrl}/api/gallery/world/${encodeURIComponent(slug)}`, {
5201
+ cache: "no-store"
5202
+ });
5203
+ if (!res.ok) return;
5204
+ ({ item } = await res.json());
5205
+ } catch {
5206
+ return;
5207
+ }
5208
+ if (!item) return;
5209
+ const problems = [];
5210
+ if (expect) {
5211
+ if ((item.embedSdkVersion ?? null) !== expect.embedSdkVersion) {
5212
+ problems.push(
5213
+ `sign-in support: shipped ${fmt(expect.embedSdkVersion)}, page reports ${fmt(item.embedSdkVersion ?? null)}`
5214
+ );
5215
+ }
5216
+ if (item.multiplayer !== void 0 && item.multiplayer !== expect.multiplayer) {
5217
+ problems.push(`multiplayer: shipped ${expect.multiplayer}, page reports ${item.multiplayer}`);
5218
+ }
5219
+ } else {
5220
+ const local = await detectEmbedSdkVersion(args.cwd);
5221
+ if (local && !item.embedSdkVersion) {
5222
+ problems.push(`sign-in support: page reports none, though this folder ships ${local}`);
5223
+ }
5224
+ }
5225
+ if (problems.length === 0) return;
5226
+ log.plain("");
5227
+ log.warn("Your game is live, but its page describes a different build:");
5228
+ for (const p of problems) log.dim(` \xB7 ${p}`);
5229
+ log.dim(` Players may see "this game didn't finish starting" instead of your game.`);
5230
+ log.dim(" Re-run `npx genex publish`. If it persists, please report it \u2014 it's a platform bug.");
5231
+ }
5232
+ var fmt = (v) => v === null ? "none" : v;
5233
+
5194
5234
  // src/commands/publish.ts
5195
5235
  async function runPublish(opts) {
5196
5236
  const log = createLogger({ quiet: opts.quiet });
@@ -5243,6 +5283,9 @@ async function runPublish(opts) {
5243
5283
  meta.lastDeployAt = merged.lastDeployAt;
5244
5284
  } else {
5245
5285
  log.info("Skipping build + deploy (--no-push).");
5286
+ log.dim(" Listing only \u2014 this folder's code isn't shipped, so multiplayer and");
5287
+ log.dim(" embed-SDK support stay as the live build reported them.");
5288
+ log.dim(" Run `npx genex publish` without --no-push to ship this folder's changes.");
5246
5289
  }
5247
5290
  log.step("Listing it in the gallery\u2026");
5248
5291
  let res;
@@ -5257,8 +5300,6 @@ async function runPublish(opts) {
5257
5300
  if (opts.license) body.license = opts.license;
5258
5301
  if (opts.purchaseUrl) body.purchaseUrl = opts.purchaseUrl;
5259
5302
  if (opts.productName) body.productName = opts.productName;
5260
- if (detections.embedSdkVersion) body.embedSdkVersion = detections.embedSdkVersion;
5261
- body.multiplayer = detections.multiplayer;
5262
5303
  body.matchmaking = detections.matchmaking ?? null;
5263
5304
  body.gameStateUsed = detections.gameStateUsed;
5264
5305
  body.mobileControls = detections.mobileControls;
@@ -5282,6 +5323,13 @@ async function runPublish(opts) {
5282
5323
  const dashboard = meta.dashboardOrigins?.[0];
5283
5324
  if (dashboard) log.plain(` world page (share this link): ${c.cyan(`${dashboard}/world/${meta.slug}`)}`);
5284
5325
  if (meta.playUrl) log.dim(` play: ${meta.playUrl}`);
5326
+ await verifyGamePage({
5327
+ apiUrl,
5328
+ slug: meta.slug,
5329
+ published: true,
5330
+ expect: opts.noPush ? void 0 : { embedSdkVersion: detections.embedSdkVersion ?? null, multiplayer: detections.multiplayer },
5331
+ log
5332
+ });
5285
5333
  }
5286
5334
 
5287
5335
  // src/commands/preview.ts
@@ -5385,6 +5433,7 @@ async function runPromote(opts) {
5385
5433
  if (meta.status !== "published") {
5386
5434
  log.dim(" Still unlisted \u2014 run `npx genex publish` to put it in the gallery.");
5387
5435
  }
5436
+ await verifyGamePage({ apiUrl, slug: meta.slug, published: meta.status === "published", log });
5388
5437
  }
5389
5438
 
5390
5439
  // src/commands/generate.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.2.0-dev.314",
3
+ "version": "1.2.1-dev.316",
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": {