@genex-ai/cli-demo 1.34.6-dev.717 → 1.34.7-dev.719
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
CHANGED
|
@@ -1919,6 +1919,17 @@ async function extractSourceArchive(file, dest, rootFolder) {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
1921
|
|
|
1922
|
+
// src/lib/game-page.ts
|
|
1923
|
+
function draftPageUrl(dashboard, slug) {
|
|
1924
|
+
return `${dashboard.replace(/\/+$/, "")}/draft/${slug}`;
|
|
1925
|
+
}
|
|
1926
|
+
function publicPageUrl(dashboard, slug) {
|
|
1927
|
+
return `${dashboard.replace(/\/+$/, "")}/${slug}`;
|
|
1928
|
+
}
|
|
1929
|
+
function gamePageUrl(dashboard, slug, status) {
|
|
1930
|
+
return status === "published" ? publicPageUrl(dashboard, slug) : draftPageUrl(dashboard, slug);
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1922
1933
|
// src/lib/deploy.ts
|
|
1923
1934
|
import "child_process";
|
|
1924
1935
|
|
|
@@ -5717,7 +5728,7 @@ async function createDraftProject(opts) {
|
|
|
5717
5728
|
}
|
|
5718
5729
|
log.success(`Created project ${c.cyan(project.slug)}.`);
|
|
5719
5730
|
log.plain(
|
|
5720
|
-
` \u279C Send this link to the user right now \u2014 their game's page is already live (a placeholder world until the first preview): ${c.cyan(
|
|
5731
|
+
` \u279C Send this link to the user right now \u2014 their game's page is already live (a placeholder world until the first preview): ${c.cyan(draftPageUrl(new URL(dashboardUrl).origin, project.slug))}`
|
|
5721
5732
|
);
|
|
5722
5733
|
if (project.playUrl) log.dim(` play (after preview/publish): ${project.playUrl}`);
|
|
5723
5734
|
log.dim(` dashboard: ${dashboardUrl}/dashboard`);
|
|
@@ -5819,7 +5830,7 @@ async function runPreview(opts) {
|
|
|
5819
5830
|
}
|
|
5820
5831
|
const dashboard = meta.dashboardOrigins?.[0];
|
|
5821
5832
|
if (dashboard) {
|
|
5822
|
-
log.plain(` your game's page (share this link): ${c.cyan(
|
|
5833
|
+
log.plain(` your game's page (share this link): ${c.cyan(draftPageUrl(dashboard, meta.slug))}`);
|
|
5823
5834
|
}
|
|
5824
5835
|
}
|
|
5825
5836
|
|
|
@@ -5831,7 +5842,7 @@ function parseRemixSource(input, apiUrl, dashboardUrl) {
|
|
|
5831
5842
|
try {
|
|
5832
5843
|
url = new URL(value);
|
|
5833
5844
|
} catch {
|
|
5834
|
-
throw new RemixError("invalid_source", "Use a game slug or a Genex
|
|
5845
|
+
throw new RemixError("invalid_source", "Use a game slug or a Genex game page URL (<dashboard>/<slug> or <dashboard>/draft/<slug>).");
|
|
5835
5846
|
}
|
|
5836
5847
|
if (url.username || url.password || !["https:", "http:"].includes(url.protocol)) throw new RemixError("invalid_source", "Use a Genex game page URL without credentials.");
|
|
5837
5848
|
const stand = url.origin === STANDS.dev.dashboard ? "dev" : url.origin === STANDS.prod.dashboard ? "prod" : null;
|
|
@@ -5839,8 +5850,8 @@ function parseRemixSource(input, apiUrl, dashboardUrl) {
|
|
|
5839
5850
|
const channel = stand === "dev" ? "dev" : "latest";
|
|
5840
5851
|
throw new RemixError("stand_mismatch", stand ? `This page belongs to the ${stand} stand. Run npx ${CLI_PACKAGE}@${channel} remix ${url.origin}${url.pathname} with that stand's API/auth settings.` : "This page is not on the selected Genex dashboard. Use its slug or select the intended API and auth stand explicitly.");
|
|
5841
5852
|
}
|
|
5842
|
-
const match = /^\/(world|draft)\/([a-z0-9][a-z0-9-]{0,99})\/?$/.exec(url.pathname);
|
|
5843
|
-
if (!match) throw new RemixError("invalid_source", "Use a Genex
|
|
5853
|
+
const match = /^\/(?:(world|draft)\/)?([a-z0-9][a-z0-9-]{0,99})\/?$/.exec(url.pathname);
|
|
5854
|
+
if (!match) throw new RemixError("invalid_source", "Use a Genex game page URL: <dashboard>/<slug> or <dashboard>/draft/<slug>.");
|
|
5844
5855
|
return { slug: match[2], version: match[1] === "draft" ? "draft" : "production" };
|
|
5845
5856
|
}
|
|
5846
5857
|
function loggerFor(opts) {
|
|
@@ -6901,7 +6912,7 @@ async function runRename(opts) {
|
|
|
6901
6912
|
if (project.playUrl) log.dim(` play: ${project.playUrl}`);
|
|
6902
6913
|
if (meta.status === "published") {
|
|
6903
6914
|
const dashboard = meta.dashboardOrigins?.[0];
|
|
6904
|
-
if (dashboard) log.dim(` page: ${dashboard
|
|
6915
|
+
if (dashboard) log.dim(` page: ${publicPageUrl(dashboard, project.slug)}`);
|
|
6905
6916
|
}
|
|
6906
6917
|
log.plain("");
|
|
6907
6918
|
log.info("Run `genex preview` (or `publish`) to rebuild \u2014 the new slug is baked into the bundle.");
|
|
@@ -7039,7 +7050,7 @@ async function runList(opts) {
|
|
|
7039
7050
|
log.plain("");
|
|
7040
7051
|
for (const p of projects) {
|
|
7041
7052
|
const published = p.status === "published";
|
|
7042
|
-
const pageUrl =
|
|
7053
|
+
const pageUrl = gamePageUrl(dashOrigin, p.slug, p.status);
|
|
7043
7054
|
const isHere = Boolean(meta && (meta.id === p.id || meta.slug === p.slug));
|
|
7044
7055
|
const bits = [
|
|
7045
7056
|
published ? c.green("published") : c.dim("draft"),
|
|
@@ -7128,8 +7139,7 @@ async function runMakeRemixable(opts) {
|
|
|
7128
7139
|
log.success("Your game is public \u2014 anyone can remix it now. \u{1F310}");
|
|
7129
7140
|
const dashboard = meta.dashboardOrigins?.[0];
|
|
7130
7141
|
if (dashboard) {
|
|
7131
|
-
|
|
7132
|
-
log.plain(` your game's page: ${c.cyan(`${dashboard}/${page}/${meta.slug}`)}`);
|
|
7142
|
+
log.plain(` your game's page: ${c.cyan(gamePageUrl(dashboard, meta.slug, meta.status))}`);
|
|
7133
7143
|
}
|
|
7134
7144
|
}
|
|
7135
7145
|
|
|
@@ -7648,7 +7658,7 @@ async function runPublish(opts) {
|
|
|
7648
7658
|
log.plain("");
|
|
7649
7659
|
log.success("Published. \u{1F389}");
|
|
7650
7660
|
const dashboard = meta.dashboardOrigins?.[0];
|
|
7651
|
-
if (dashboard) log.plain(` game page (share this link): ${c.cyan(
|
|
7661
|
+
if (dashboard) log.plain(` game page (share this link): ${c.cyan(publicPageUrl(dashboard, meta.slug))}`);
|
|
7652
7662
|
if (meta.playUrl) log.dim(` play: ${meta.playUrl}`);
|
|
7653
7663
|
await verifyGamePage({
|
|
7654
7664
|
apiUrl,
|
|
@@ -7687,8 +7697,7 @@ async function runPromote(opts) {
|
|
|
7687
7697
|
log.success("Live \u2014 players are now on the build you previewed.");
|
|
7688
7698
|
const dashboard = meta.dashboardOrigins?.[0];
|
|
7689
7699
|
if (dashboard) {
|
|
7690
|
-
|
|
7691
|
-
log.plain(` your game's page: ${c.cyan(`${dashboard}/${page}/${meta.slug}`)}`);
|
|
7700
|
+
log.plain(` your game's page: ${c.cyan(gamePageUrl(dashboard, meta.slug, meta.status))}`);
|
|
7692
7701
|
}
|
|
7693
7702
|
if (meta.status !== "published") {
|
|
7694
7703
|
log.dim(" Still unlisted \u2014 run `npx genex publish` to put it in the gallery.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/cli-demo",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.7-dev.719",
|
|
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": {
|
|
@@ -265,7 +265,8 @@ document.addEventListener("keydown", (e) => {
|
|
|
265
265
|
non-negotiable part.
|
|
266
266
|
- **Dashboard embed:** no setup needed — the platform's game frame grants keyboard
|
|
267
267
|
lock (and pointer lock + fullscreen), so Escape-to-pause works the same inside
|
|
268
|
-
|
|
268
|
+
the game's page (`<dashboard>/<slug>`, `/draft/<slug>`) as it does standalone
|
|
269
|
+
(`<slug>.genex.technology`).
|
|
269
270
|
|
|
270
271
|
A mouse-aim game earns its keep with a **look-sensitivity slider** in the pause
|
|
271
272
|
menu — trackpads feel slower than mice, so let the player tune it. On the bundled
|
|
@@ -43,7 +43,7 @@ paths the hosted build will not), then hand over the link.
|
|
|
43
43
|
never localhost, never a file path:**
|
|
44
44
|
|
|
45
45
|
- draft: `<dashboard>/draft/<slug>`
|
|
46
|
-
- public, once published: `<dashboard
|
|
46
|
+
- public, once published: `<dashboard>/<slug>`
|
|
47
47
|
|
|
48
48
|
`<dashboard>` is the first `dashboardOrigins` entry in `.genex/project.json`
|
|
49
49
|
and `<slug>` is the `slug` there. `preview` prints the exact page link as
|