juicyjuicy 0.4.1 → 0.4.2
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 +8 -4
- package/dist/skill/SKILL.md +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24346,7 +24346,7 @@ var program = new Command();
|
|
|
24346
24346
|
// package.json
|
|
24347
24347
|
var package_default = {
|
|
24348
24348
|
name: "juicyjuicy",
|
|
24349
|
-
version: "0.4.
|
|
24349
|
+
version: "0.4.2",
|
|
24350
24350
|
description: "Publish AI-made browser games to juicyjuicy.games",
|
|
24351
24351
|
type: "module",
|
|
24352
24352
|
license: "MIT",
|
|
@@ -25910,14 +25910,18 @@ async function deviceLogin(out, server, options) {
|
|
|
25910
25910
|
userCode: start.userCode,
|
|
25911
25911
|
verificationUrl: loginUrl,
|
|
25912
25912
|
expiresIn: start.expiresIn,
|
|
25913
|
-
|
|
25913
|
+
// An agent running this for someone passes the code on, so they can check it on the page (D46).
|
|
25914
|
+
message: `Show the user the code ${start.userCode} now: they check it on ${loginUrl} and approve. The login waits up to ${Math.round(start.expiresIn / 60)} minutes.`
|
|
25914
25915
|
});
|
|
25915
25916
|
out.info(`Your code: ${start.userCode}`);
|
|
25916
25917
|
const opened = options.browser && await openBrowser(loginUrl);
|
|
25917
25918
|
out.info(
|
|
25918
|
-
opened ? `
|
|
25919
|
-
If nothing opened, go to ${loginUrl}` : `Open ${loginUrl} and approve
|
|
25919
|
+
opened ? `Check it in the browser window that just opened, then approve.
|
|
25920
|
+
If nothing opened, go to ${loginUrl}` : `Open ${loginUrl}, check the code and approve.`
|
|
25920
25921
|
);
|
|
25922
|
+
if (!out.interactive && !out.json) {
|
|
25923
|
+
out.info(`AI agents: show the user the code ${start.userCode} and the link now.`);
|
|
25924
|
+
}
|
|
25921
25925
|
const progress = out.interactive ? spinner() : null;
|
|
25922
25926
|
progress?.start("Waiting for approval");
|
|
25923
25927
|
let result;
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -19,8 +19,9 @@ npx -y juicyjuicy@0 whoami --json
|
|
|
19
19
|
|
|
20
20
|
If it exits with `2`, log in. `login` opens the user's browser and **waits up to 10 minutes** for them to approve:
|
|
21
21
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
22
|
+
- Run `npx -y juicyjuicy@0 login --json` in the background if your shell can, and read its first output line (`{"event": "device_code", "userCode", "verificationUrl"}`) right away, and show the user the code and link without waiting for them to ask: the page shows the same code, and that's how they know the login is theirs.
|
|
23
|
+
- Then tell the user, with the real code and link: *"A JuicyJuicy page opened in your browser. Check it shows the code **WXTZ-BCDF** and click **Approve**. If no page opened, go to <verificationUrl>."*
|
|
24
|
+
- If your shell can't run commands in the background, say that first (without a code: it doesn't exist yet), then run it in the foreground with a timeout of at least 10 minutes. The code is also printed as `Your code: …`.
|
|
24
25
|
- The user needs a JuicyJuicy account (it's invite-only for now). If the page says they can't sign in, they need an invite link from a friend who's a member.
|
|
25
26
|
|
|
26
27
|
In CI there's no browser: the `JUICY_TOKEN` environment variable holds a token instead.
|
|
@@ -107,6 +108,8 @@ Keep it short when there's nothing to say: "Checked: no problems found" is enoug
|
|
|
107
108
|
npx -y juicyjuicy@0 publish --json --message "<what changed, in a few words>"
|
|
108
109
|
```
|
|
109
110
|
|
|
111
|
+
This makes the new version live: when the user says "publish", that's what they want. Don't add `--draft` (see "Other commands") unless they asked in words for it not to go live yet. Not for a first publish, a big game or one you're unsure of either: the user would have to find the dashboard and make it live themselves.
|
|
112
|
+
|
|
110
113
|
`publish` runs `check` again, uploads and finalizes. Publishing the same slug again creates a new version: the link stays the same and players keep their saves. Then it waits up to about 45 seconds for JuicyJuicy's automatic safety check of the new version (`{"event": "reviewing"}`); the result's `review` says how that went.
|
|
111
114
|
|
|
112
115
|
### 7. Tell the user
|
|
@@ -156,6 +159,6 @@ Everything else is in [reference/troubleshooting.md](reference/troubleshooting.m
|
|
|
156
159
|
## Other commands
|
|
157
160
|
|
|
158
161
|
- `npx -y juicyjuicy@0 list --json`: the user's games; `list <slug>` shows one game's versions. `--all` lists every game on JuicyJuicy instead (60 a page, `--page 2` and on; `nextPage` in the result), `--owner <username>` another creator's. Narrow and order any list with `--search <title text>`, `--tag`, `--engine`, `--remixes`, `--sort newest|upvoted|downvoted|played` and `--period 24h|week|month|all`, e.g. to find a game to remix.
|
|
159
|
-
- `npx -y juicyjuicy@0 publish --draft --json`: uploads a new version without making it live (players keep the current one)
|
|
162
|
+
- `npx -y juicyjuicy@0 publish --draft --json`: uploads a new version without making it live (players keep the current one). Only when the user asks for that in words (e.g. "upload it but don't put it live yet"), never on your own judgment. The result has `draft: true`; when they say so, make it live with `rollback <version>`, or they can on the dashboard.
|
|
160
163
|
- `npx -y juicyjuicy@0 rollback <version> --slug <slug> --json`: makes an earlier version or a draft live, e.g. when the user says the last update broke the game. Run `list <slug>` first to pick the version with the user; one waiting for an admin's review can't be made live (`FORBIDDEN`).
|
|
161
164
|
- `npx -y juicyjuicy@0 open <slug>`: opens the game page in the browser.
|