@genex-ai/cli-demo 1.6.5-dev.434 → 1.6.6-dev.435
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
|
@@ -1886,7 +1886,8 @@ function reportStale(log, slug, local, remote) {
|
|
|
1886
1886
|
if (remote && local) {
|
|
1887
1887
|
log.dim(` the draft is on ${remote.slice(0, 7)}, this folder last shipped ${local.slice(0, 7)}`);
|
|
1888
1888
|
}
|
|
1889
|
-
log.dim(`
|
|
1889
|
+
log.dim(` ${c.cyan("npx genex pull")} \u2014 take the other device's work (refuses if you have unshipped changes)`);
|
|
1890
|
+
log.dim(` ${c.cyan("npx genex preview --force")} \u2014 keep yours and replace theirs`);
|
|
1890
1891
|
}
|
|
1891
1892
|
async function sourceTreeHash(cwd) {
|
|
1892
1893
|
const gitDir = await fs11.mkdtemp(path11.join(os6.tmpdir(), "genex-tree-"));
|
|
@@ -2206,7 +2207,8 @@ async function runPull(opts) {
|
|
|
2206
2207
|
}
|
|
2207
2208
|
if (tree2 !== meta.sourceTree) {
|
|
2208
2209
|
log.error("This folder has changes that were never deployed.");
|
|
2209
|
-
log.dim(` ${c.cyan("npx genex preview")}
|
|
2210
|
+
log.dim(` ${c.cyan("npx genex preview")} ships them first (add ${c.cyan("--force")} if it says another device updated this)`);
|
|
2211
|
+
log.dim(` ${c.cyan("npx genex pull --force")} throws them away and takes the draft`);
|
|
2210
2212
|
process.exitCode = 1;
|
|
2211
2213
|
return;
|
|
2212
2214
|
}
|
|
@@ -4701,7 +4703,7 @@ function isSecretEnvFile(name) {
|
|
|
4701
4703
|
async function deployGame(ctx, opts, log) {
|
|
4702
4704
|
const cwd = process.cwd();
|
|
4703
4705
|
const meta = await readProject(cwd);
|
|
4704
|
-
const expectStagingCommit = meta?.stagingCommit;
|
|
4706
|
+
const expectStagingCommit = opts.force ? void 0 : meta?.stagingCommit;
|
|
4705
4707
|
if (expectStagingCommit) {
|
|
4706
4708
|
const remote = await readRemoteSource(ctx.apiUrl, ctx.token, ctx.projectId);
|
|
4707
4709
|
if (remote && isStale(expectStagingCommit, remote.stagingCommit)) {
|
|
@@ -6119,6 +6121,7 @@ async function runPublish(opts) {
|
|
|
6119
6121
|
// staging — the owner would publish and then see a stale game.
|
|
6120
6122
|
channel: "staging",
|
|
6121
6123
|
noBuild: opts.noBuild,
|
|
6124
|
+
force: opts.force,
|
|
6122
6125
|
matchmaking: detections.matchmaking,
|
|
6123
6126
|
embedSdkVersion: detections.embedSdkVersion,
|
|
6124
6127
|
multiplayer: detections.multiplayer,
|
|
@@ -6223,6 +6226,7 @@ async function runPreview(opts) {
|
|
|
6223
6226
|
// was inside, and the only protection was a warning line below.
|
|
6224
6227
|
channel: "staging",
|
|
6225
6228
|
noBuild: opts.noBuild,
|
|
6229
|
+
force: opts.force,
|
|
6226
6230
|
matchmaking: detections.matchmaking,
|
|
6227
6231
|
embedSdkVersion: detections.embedSdkVersion,
|
|
6228
6232
|
multiplayer: detections.multiplayer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/cli-demo",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6-dev.435",
|
|
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": {
|
|
@@ -150,23 +150,41 @@ If unsure, use `games` (also the server's fallback for anything unrecognized).
|
|
|
150
150
|
Your own files were left untouched. `genex init` only adds missing files and
|
|
151
151
|
refreshes the genex-owned ones.
|
|
152
152
|
|
|
153
|
-
##
|
|
153
|
+
## Working on one game from more than one machine
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
A game's connection to its live page is folder-local (`.genex/project.json`), so
|
|
156
|
+
a new machine — or a folder that got deleted — has no link. **Never run `init`
|
|
157
|
+
to "recover" a game**: that creates a brand-new game at a new URL.
|
|
158
|
+
|
|
159
|
+
**Picking the game up somewhere new** — run `link` in an EMPTY folder and it
|
|
160
|
+
downloads the game too, binary assets and all:
|
|
160
161
|
|
|
161
162
|
```bash
|
|
162
|
-
|
|
163
|
-
npm install
|
|
163
|
+
mkdir my-game && cd my-game
|
|
164
164
|
npx @genex-ai/cli-demo@dev link <slug> # slug = the name in the play URL
|
|
165
|
+
npm install
|
|
165
166
|
```
|
|
166
167
|
|
|
167
168
|
Don't know the slug? **`npx genex list`** prints every game on your account —
|
|
168
|
-
slug, status, and page link for each
|
|
169
|
-
|
|
169
|
+
slug, status, and page link for each. In a folder that already has files, `link`
|
|
170
|
+
writes the link and downloads nothing, so it can never overwrite work.
|
|
171
|
+
|
|
172
|
+
**Catching a folder up** — `npx genex pull` replaces this folder with the
|
|
173
|
+
game's current draft. It refuses if the folder holds changes you never deployed,
|
|
174
|
+
because there is nothing to merge them against.
|
|
175
|
+
|
|
176
|
+
**If two machines have both moved on**, `preview` refuses rather than
|
|
177
|
+
overwriting the other one, and tells you both ways forward:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
✗ my-game was updated from another device — nothing was deployed.
|
|
181
|
+
npx genex pull — take the other device's work (refuses if you have unshipped changes)
|
|
182
|
+
npx genex preview --force — keep yours and replace theirs
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Pick one deliberately: `pull` throws away what is in this folder, `--force`
|
|
186
|
+
throws away what the other machine put on staging. **Ask the user which**, and
|
|
187
|
+
say plainly which side is about to be lost — don't guess for them.
|
|
170
188
|
|
|
171
189
|
`link` never creates a project: it signs in if needed (the browser opens once)
|
|
172
190
|
and rewrites the local link (source pushes authorize over HTTPS, so there's no
|