@bitmagic/cli 0.1.53-dev.4 → 0.1.53-dev.6
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/README.md +88 -18
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/publish.d.ts +7 -2
- package/dist/commands/publish.js +39 -7
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reset-account.js +25 -8
- package/dist/commands/reset-account.js.map +1 -1
- package/dist/commands/self-update.d.ts +67 -0
- package/dist/commands/self-update.js +196 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/upgrade.js +5 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/editor/cli-update.d.ts +32 -0
- package/dist/editor/cli-update.js +67 -0
- package/dist/editor/cli-update.js.map +1 -0
- package/dist/editor/publish-panel.d.ts +31 -0
- package/dist/editor/publish-panel.js +69 -0
- package/dist/editor/publish-panel.js.map +1 -0
- package/dist/editor/server.js +38 -0
- package/dist/editor/server.js.map +1 -1
- package/dist/editor/shell-page.js +112 -3
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/publish/record.d.ts +22 -0
- package/dist/publish/record.js +62 -0
- package/dist/publish/record.js.map +1 -0
- package/dist/render/qr-output.d.ts +44 -0
- package/dist/render/qr-output.js +71 -0
- package/dist/render/qr-output.js.map +1 -0
- package/dist/render/qr-png.d.ts +37 -0
- package/dist/render/qr-png.js +111 -0
- package/dist/render/qr-png.js.map +1 -0
- package/dist/render/qr-terminal.d.ts +8 -1
- package/dist/render/qr-terminal.js +8 -1
- package/dist/render/qr-terminal.js.map +1 -1
- package/dist/scaffold/project-files.js +36 -27
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/update/check.js +2 -1
- package/dist/update/check.js.map +1 -1
- package/dist/update/notice.d.ts +31 -1
- package/dist/update/notice.js +39 -5
- package/dist/update/notice.js.map +1 -1
- package/dist/update/self-install.d.ts +175 -0
- package/dist/update/self-install.js +335 -0
- package/dist/update/self-install.js.map +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -49,6 +49,9 @@ npm install -g @bitmagic/cli
|
|
|
49
49
|
bitmagic --version
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
That is the only time you need npm. From then on, `bitmagic self-update` updates the CLI — see
|
|
53
|
+
[Staying current](#staying-current) for why the npm line is the wrong tool for the second install.
|
|
54
|
+
|
|
52
55
|
### The dev line
|
|
53
56
|
|
|
54
57
|
```bash
|
|
@@ -61,9 +64,10 @@ installs the unreleased build the Bitmagic team and external testers run — a p
|
|
|
61
64
|
production, so a CLI that uses them has to be installable before it is released. Pair it with
|
|
62
65
|
`bitmagic login --env dev`.
|
|
63
66
|
|
|
64
|
-
`
|
|
65
|
-
single `bitmagic` on your PATH, so `bitmagic --version`
|
|
66
|
-
`-dev.N` suffix means the dev line. To have both at once,
|
|
67
|
+
`bitmagic self-update --tag latest` puts you back on the release at any time, and `--tag dev` takes
|
|
68
|
+
you the other way. One global install is a single `bitmagic` on your PATH, so `bitmagic --version`
|
|
69
|
+
is how you tell which line you are on: a `-dev.N` suffix means the dev line. To have both at once,
|
|
70
|
+
see below.
|
|
67
71
|
|
|
68
72
|
### Running both lines side by side
|
|
69
73
|
|
|
@@ -113,6 +117,11 @@ env=local
|
|
|
113
117
|
apiUrl=http://localhost:3102
|
|
114
118
|
```
|
|
115
119
|
|
|
120
|
+
`bitmagic self-update` works inside this setup unchanged: it reinstalls into the root the
|
|
121
|
+
`bitmagic` you just ran came from, with the same `--global-dir` and `--global-bin-dir`, so updating
|
|
122
|
+
from `dev-games/` cannot disturb the prod root. (Running `pnpm add -g` by hand would, unless you
|
|
123
|
+
repeat both flags.)
|
|
124
|
+
|
|
116
125
|
`direnv allow` each, and both halves are right in each tree:
|
|
117
126
|
|
|
118
127
|
```
|
|
@@ -184,11 +193,12 @@ browser reloads itself on every change and the assets panel shows each generatio
|
|
|
184
193
|
| `bitmagic whoami [--env <env>]` | Show the identity the CLI is authenticated as — the account's email address alongside its user id — and which environment answered, including where that environment was chosen from. |
|
|
185
194
|
| `bitmagic init [dir] [--template <id>] [--name <name>] [--idea "<pitch>"] [--env <env>] [--force]` | Scaffold a new project: mints a game, downloads the vendored engine, writes `AGENTS.md`, `GAME-DESIGN.md` and templates. Starts from `empty-3d` unless told otherwise. `--idea` seeds the design doc's pitch **and** picks the template whose camera and controls fit it — "a doom-like corridor shooter" scaffolds `first-person`, "jump between floating islands" scaffolds `sidescroller`. `--template` overrides both; a suggestion that fails for any reason falls back to `empty-3d` rather than failing the scaffold. Dependencies are installed with **pnpm** when your machine has it and npm otherwise — the lockfile that produces is what every later command reads, so it never tells you to run the wrong one. |
|
|
186
195
|
| `bitmagic check` | Typecheck (`tsc --noEmit`) against the vendored engine. Fast; does not prove the game runs. |
|
|
187
|
-
| `bitmagic dev [--port <port>] [--editor-port <port>] [--no-open]` | Build, then serve everything and keep it running: `tsc --watch`, `vite` on 3010, and a **Game / Editor** view on 3011 that reloads itself when the project changes. Opens the view in your browser; `--no-open` (or `BITMAGIC_NO_OPEN=1`) skips that. The one command to leave open. See **The dev view** below. |
|
|
196
|
+
| `bitmagic dev [--port <port>] [--editor-port <port>] [--no-open]` | Build, then serve everything and keep it running: `tsc --watch`, `vite` on 3010, and a **Game / Editor** view on 3011 that reloads itself when the project changes, and shows where the game is published (with a QR code) once it has been. Opens the view in your browser; `--no-open` (or `BITMAGIC_NO_OPEN=1`) skips that. The one command to leave open. See **The dev view** below. |
|
|
188
197
|
| `bitmagic reload [--port <port>]` | Tell a running `bitmagic dev` to reload the browser now. For agents: run it when you finish a round of edits. Exits 0 and does nothing when no dev server is running. |
|
|
189
198
|
| `bitmagic verify [--timeout <ms>] [--renderer webgpu\|webgl] [--platform desktop\|mobile\|both] [--fast] [--watch]` | Build, boot the game in a headless browser, press the engine's Play button like a player would, and report what broke. A game without the button passes as long as gameplay starts by itself (auto-starting genres, custom start UIs); a run where gameplay never starts fails. The settle is adaptive: the run ends as soon as the live engine proves stable gameplay (state, rendered frames, no fresh errors, player standing), with `--timeout` as the cap. The verdict includes live engine state — actual GPU backend, fps, player position, physics body count, gameplay events (see **Gameplay events** below) — recorded in `result.json`. `--renderer` pins the pipeline (default `webgpu`, what players run; a silent WebGPU→WebGL2 fallback **fails** the run, and `--renderer webgl` is the deliberate escape hatch). A run failing on a lost WebGL context retries once on software rendering automatically. `--fast` skips the screenshot pipeline (then there is no thumbnail candidate from this run). `--watch` keeps everything warm — incremental `tsc --watch`, one vite, one browser — and re-verifies on file change in seconds; `--fast` is the watch default (`--no-fast` restores the screenshot). `--platform` picks what the run emulates — see **Verifying the mobile path** below. Every run also reports the engine's mobile-parity check: a desktop action with no touch button is a warning, and a **failure** when `game.json` declares `primaryPlatform: "mobile"`. Writes the artifacts the publish gate reads (see below). |
|
|
190
199
|
| `bitmagic build` | Bundle the game into one self-contained `.bitmagic/build/index.html`. Rarely needs to be run by hand — `publish` builds automatically when the project changed. |
|
|
191
|
-
| `bitmagic publish [--visibility public\|private] [--name <name>] [--description <desc>] [--force] [--no-qr]` | Verify-gate, build if needed, and upload straight to GCS. **Keeps the game's current visibility**; a new game is private until published with `--visibility public`.
|
|
200
|
+
| `bitmagic publish [--visibility public\|private] [--name <name>] [--description <desc>] [--force] [--no-qr]` | Verify-gate, build if needed, and upload straight to GCS. **Keeps the game's current visibility**; a new game is private until published with `--visibility public`. Shows the published URL as a QR code so you can scan it onto a phone — drawn in the terminal, or written to `.bitmagic/publish-qr.png` when it cannot be. `--no-qr` skips both. |
|
|
201
|
+
| `bitmagic self-update [--tag latest\|dev]` | Update the **CLI itself** to the newest build of its line, installing into the place this CLI actually lives rather than wherever the `npm` on your `PATH` would put it — which under nvm is routinely somewhere else. Reads the project's line from `bitmagic.json` when there is one, so it also fixes a wrong-line install; `--tag` overrides. Verifies the version on disk moved, and refuses (naming the path) for an `npx` run, a source checkout, or an install shape it cannot recognise. Not to be confused with `upgrade`, which is about the project's engine. |
|
|
192
202
|
| `bitmagic upgrade [--engine <version>] [--force]` | Refresh vendored platform files and the CLI's own skills to the currently published engine. Refuses a dirty git tree unless `--force`. Also records the project's `environment` in `bitmagic.json` if it has none yet — the engine it just vendored came from that api-server — and says so when it does. |
|
|
193
203
|
| `bitmagic generate <skybox\|background\|block-type\|sound\|image\|character\|animation\|model\|prop\|vehicle> ...` | Generate one asset directly into `src/work/world.json`. Costs sparks. `model` mints a **new** 3D object from a prompt, `prop` upgrades an existing placeholder **in place**, `vehicle` adds a new drivable one, `animation` takes a parameter spec rather than a prompt, `block-type` registers a custom voxel block — see below. `skybox` and `background` write the **same** field: pick one. |
|
|
194
204
|
| `bitmagic assets add <file> [--name <n>] [--asset-id <id>] [--keep-glb] [--voxel-size <m>] [--max-voxel-size <m>] [--height <m>] [--hollow\|--solid] [--force]` | Upload **your own** file — `.glb`, `.vxl`, `.png/.jpg/.webp`, `.opus/.ogg/.m4a/.mp3`, `.json` — into the game's assets and write its entry into `src/work/world.json`. A `.glb` is voxelized in a headless browser (Chrome + a free port in 3000–3199, like `prop`) unless `--keep-glb`. Free — no sparks. See **Adding your own assets** below. |
|
|
@@ -411,6 +421,21 @@ While the game boots, the mark hops over the stage — the first time only. Late
|
|
|
411
421
|
still, and only if the reload is slow enough to be worth explaining. If a boot fails it stays put,
|
|
412
422
|
says what went wrong and offers to try again, instead of leaving you a black rectangle.
|
|
413
423
|
|
|
424
|
+
### Where your game is published
|
|
425
|
+
|
|
426
|
+
Once the project has been published, a **Published** pill appears in the top bar. It opens the
|
|
427
|
+
game's address, the visibility it went out with, which publish this is and how long ago — and the
|
|
428
|
+
same QR code the terminal draws, so the phone in your hand can reach the build without you typing
|
|
429
|
+
anything.
|
|
430
|
+
|
|
431
|
+
The pill lights up on its own within a second or two of a publish finishing, with no reload: the
|
|
432
|
+
page polls, and the publish it should show almost always happens in another terminal — often your
|
|
433
|
+
agent's, which you never look at. Until the first publish the pill is there but dead, because a
|
|
434
|
+
control that opens an empty dialog is worse than one that is plainly not ready.
|
|
435
|
+
|
|
436
|
+
It works even when the game will not boot, which is deliberate: that is the moment the link matters
|
|
437
|
+
most, since the last good build is still live at that address.
|
|
438
|
+
|
|
414
439
|
Put the page beside your agent's window. It is one page with
|
|
415
440
|
two tabs over the same running game, so switching costs nothing and does not restart anything:
|
|
416
441
|
|
|
@@ -735,7 +760,7 @@ is, so shipping an update to a public game leaves it public. You only need `--vi
|
|
|
735
760
|
want to *change* something: `public` to list it, `private` to take it out of service.
|
|
736
761
|
|
|
737
762
|
**Managing a published game** — changing its visibility, or taking it down for good — happens on
|
|
738
|
-
the web, at the **My games** page `publish` prints a link to (`bitmagic.ai/my-games
|
|
763
|
+
the web, at the **My games** page `publish` prints a link to (`bitmagic.ai/my-games/`). It is
|
|
739
764
|
the same page web-lane creators use, so there is one place to manage a game regardless of how it
|
|
740
765
|
was built. Withdrawing a game there unlists it and frees any custom `/play/` address; it does not
|
|
741
766
|
touch your project, and you can publish it again afterwards.
|
|
@@ -759,10 +784,19 @@ This is the pro lane's "try it on my phone" loop, and `--visibility private` is
|
|
|
759
784
|
private game is *unlisted*, not access-controlled, so its URL works from any device while the game
|
|
760
785
|
stays off bitmagic.ai. Publish as often as you like and scan the code each time.
|
|
761
786
|
|
|
787
|
+
**When the code cannot be drawn, publish writes it as a file instead** — `.bitmagic/publish-qr.png`
|
|
788
|
+
— and names the path (`qrPath` in the `--json` result). That is the normal case for an agent-driven
|
|
789
|
+
publish: your agent's stdout is a pipe, not a terminal, so there is nothing to paint a code onto,
|
|
790
|
+
and the person who would scan it is on the other side of that pipe. The image is how it reaches
|
|
791
|
+
them. The same happens under `--json`, for `TERM=dumb`, and when the terminal is narrower than the
|
|
792
|
+
code (37 columns for a typical publish URL), since a wrapped code cannot be scanned anyway. A
|
|
793
|
+
terminal that draws the code successfully writes no file.
|
|
794
|
+
|
|
795
|
+
`.bitmagic/` is excluded from the publish fingerprint, so the image cannot invalidate a verify.
|
|
796
|
+
|
|
762
797
|
The code is extra, never a substitute — the URL is always printed as a plain line above it, and
|
|
763
|
-
everything still works if
|
|
764
|
-
|
|
765
|
-
the code (37 columns for a typical publish URL), because a wrapped code cannot be scanned anyway.
|
|
798
|
+
everything still works if neither a drawing nor a file appears. `--no-qr` and `BITMAGIC_NO_QR`
|
|
799
|
+
suppress both.
|
|
766
800
|
|
|
767
801
|
`bitmagic dev` deliberately has no equivalent. Its servers bind `127.0.0.1`, and the asset CDN
|
|
768
802
|
only serves assets to `localhost` origins — a phone pointed at your machine's LAN address would
|
|
@@ -891,10 +925,12 @@ parses one stream whether the command succeeded or not. The exit code remains au
|
|
|
891
925
|
|
|
892
926
|
Without `--json` nothing changes: prose goes to stdout as before and no JSON is emitted.
|
|
893
927
|
|
|
894
|
-
`--json`
|
|
895
|
-
`--json` stdout carries the result document and nothing else.
|
|
928
|
+
`--json` suppresses `publish`'s *drawn* QR code, which uses terminal escape sequences: under
|
|
929
|
+
`--json` stdout carries the result document and nothing else. The image is still written, and
|
|
930
|
+
`qrPath` in the result names it — that is the only way an agent learns the file exists.
|
|
896
931
|
|
|
897
|
-
The result shape is per-command — `publish` reports
|
|
932
|
+
The result shape is per-command — `publish` reports
|
|
933
|
+
`url`/`visibility`/`publishVersion`/`manageUrl`, plus `qrPath` when it wrote a QR image, `init`
|
|
898
934
|
reports `gameId`/`root`/`dependenciesInstalled`/`packageManager`, `upgrade` reports `replaced` and any
|
|
899
935
|
`missingDependencies` as structured entries rather than only as a printed install command, plus
|
|
900
936
|
`cliUpdate` (`{ current, latest, updateAvailable }`, or `null` when the engine did not move and so
|
|
@@ -904,7 +940,39 @@ no check was made — which is not the same as "no update"), and `legacyAssetsRe
|
|
|
904
940
|
|
|
905
941
|
## Staying current
|
|
906
942
|
|
|
907
|
-
|
|
943
|
+
```bash
|
|
944
|
+
bitmagic self-update
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
updates the CLI itself. Use it rather than `npm install -g @bitmagic/cli`, which is only for the
|
|
948
|
+
first install — see [Why self-update and not npm](#why-self-update-and-not-npm) below.
|
|
949
|
+
|
|
950
|
+
It installs into the exact place this CLI is already installed, on the line it is already on. Inside
|
|
951
|
+
a project it uses that project's line instead (`environment` in `bitmagic.json`), so running it in a
|
|
952
|
+
`dev` project from a release build crosses you over; `--tag dev` / `--tag latest` overrides both. It
|
|
953
|
+
reads back the version on disk afterwards and fails if it did not move, so a successful-looking
|
|
954
|
+
update that changed nothing is reported rather than believed.
|
|
955
|
+
|
|
956
|
+
It refuses, with the path it looked at, when there is nothing for it to do: a run through `npx`
|
|
957
|
+
(nothing is installed), a source checkout (`git pull` and rebuild), or an install shape it does not
|
|
958
|
+
recognise — it will not guess at where to write.
|
|
959
|
+
|
|
960
|
+
### Why self-update and not npm
|
|
961
|
+
|
|
962
|
+
`npm install -g @bitmagic/cli` installs into whichever Node the `npm` on your `PATH` belongs to,
|
|
963
|
+
which is not necessarily the one this CLI is installed in. Under a version manager — nvm, fnm,
|
|
964
|
+
Volta — those two are routinely different, and a coding agent's non-interactive shell makes it
|
|
965
|
+
worse: it sources no profile, so nvm never loads and `npm` is whatever else is on the system path.
|
|
966
|
+
The install then succeeds, into a prefix nothing on your `PATH` points at, and `bitmagic --version`
|
|
967
|
+
never moves. The same applies to the two-root pnpm setup below, where a bare `npm i -g` writes to a
|
|
968
|
+
third place entirely.
|
|
969
|
+
|
|
970
|
+
`self-update` resolves its own install from the Node binary running it, so it cannot be aimed
|
|
971
|
+
anywhere else.
|
|
972
|
+
|
|
973
|
+
### The nudges
|
|
974
|
+
|
|
975
|
+
Three, all advisory — nothing is ever blocked because something is out of date.
|
|
908
976
|
|
|
909
977
|
- **The CLI itself.** Commands print a line when a newer `@bitmagic/cli` is on npm. The check reads
|
|
910
978
|
a cache written by an earlier run, so it costs no time; the cache refreshes in the background at
|
|
@@ -912,15 +980,17 @@ Three nudges, all advisory — nothing is ever blocked because something is out
|
|
|
912
980
|
every merge to `main` and can move several times an hour, so an older answer there is usually
|
|
913
981
|
about a build several versions back. It asks about the line you are actually on — a build
|
|
914
982
|
installed from `@dev` asks the `dev` dist-tag and hears about the next dev build, rather than
|
|
915
|
-
being told the production release is "newer"
|
|
916
|
-
|
|
917
|
-
|
|
983
|
+
being told the production release is "newer". An unreachable registry, a first-ever run, and a
|
|
984
|
+
version with no recognisable numeric core all stay quiet. `bitmagic dev` also shows it as a
|
|
985
|
+
banner in the browser, because that command runs for hours and the terminal line scrolls away.
|
|
918
986
|
- **The CLI, after an engine bump.** When `bitmagic upgrade` actually moves the engine version, it
|
|
919
987
|
asks npm there and then instead of trusting that cache — which can be a whole interval stale, and
|
|
920
988
|
so silent about the CLI published alongside the engine you just vendored. The CLI and the engine
|
|
921
989
|
ship together, so a newer engine can need build config or a command only the newer CLI has, and
|
|
922
|
-
finding that out as a failed `bitmagic build` is worse than being told here.
|
|
923
|
-
|
|
990
|
+
finding that out as a failed `bitmagic build` is worse than being told here. It names the line the
|
|
991
|
+
*project* is on rather than the one you happen to be running, so it says `bitmagic self-update
|
|
992
|
+
--tag dev` where that is the crossing you need. No request is made when the engine version did not
|
|
993
|
+
change, and an unreachable registry costs the hint and nothing else.
|
|
924
994
|
- **The vendored engine.** `bitmagic dev` and `bitmagic publish` say when a newer engine exists and
|
|
925
995
|
suggest `bitmagic upgrade`. Publishing is never refused for an old engine — the prompt belongs
|
|
926
996
|
where rebuilding is cheap, not at the moment you ship.
|
package/dist/cli.d.ts
CHANGED
|
@@ -176,6 +176,16 @@ declare const rawCommands: {
|
|
|
176
176
|
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
177
177
|
};
|
|
178
178
|
}>;
|
|
179
|
+
'self-update': CommandDef<{
|
|
180
|
+
readonly tag: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
readonly description: string;
|
|
183
|
+
};
|
|
184
|
+
readonly json: {
|
|
185
|
+
readonly type: "boolean";
|
|
186
|
+
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
187
|
+
};
|
|
188
|
+
}>;
|
|
179
189
|
check: CommandDef<{
|
|
180
190
|
readonly json: {
|
|
181
191
|
readonly type: "boolean";
|
package/dist/cli.js
CHANGED
|
@@ -13,6 +13,7 @@ import { allowanceCommand } from './commands/allowance.js';
|
|
|
13
13
|
import { subscribeCommand } from './commands/subscribe.js';
|
|
14
14
|
import { initCommand } from './commands/init.js';
|
|
15
15
|
import { upgradeCommand } from './commands/upgrade.js';
|
|
16
|
+
import { selfUpdateCommand } from './commands/self-update.js';
|
|
16
17
|
import { checkCommand } from './commands/check.js';
|
|
17
18
|
import { devCommand } from './commands/dev.js';
|
|
18
19
|
import { reloadCommand } from './commands/reload.js';
|
|
@@ -206,6 +207,7 @@ const rawCommands = {
|
|
|
206
207
|
allowance: allowanceCommand,
|
|
207
208
|
init: initCommand,
|
|
208
209
|
upgrade: upgradeCommand,
|
|
210
|
+
'self-update': selfUpdateCommand,
|
|
209
211
|
check: checkCommand,
|
|
210
212
|
dev: devCommand,
|
|
211
213
|
reload: reloadCommand,
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,YAAY,EAA0B,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAA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
38
|
-
*
|
|
38
|
+
* Shows the published URL as a scannable code — drawn in the terminal, or written as a PNG when
|
|
39
|
+
* it cannot be. Returns the image path when a file was written, else null.
|
|
39
40
|
*
|
|
40
41
|
* Additional output, exactly like `bitmagic cover`'s inline image — never a failure, and never a
|
|
41
42
|
* replacement for the plain `Published …` line above it.
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
emitQr: (url: string, options: {
|
|
45
|
+
root: string;
|
|
46
|
+
json: boolean;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
}) => string | null;
|
|
44
49
|
}
|
|
45
50
|
export interface PublishArgs {
|
|
46
51
|
visibility?: string;
|
package/dist/commands/publish.js
CHANGED
|
@@ -34,7 +34,8 @@ import * as fs from 'fs';
|
|
|
34
34
|
import * as path from 'path';
|
|
35
35
|
import { CliError } from '../errors.js';
|
|
36
36
|
import { engineUpdateNotice } from '../project/engine-update.js';
|
|
37
|
-
import {
|
|
37
|
+
import { emitQr } from '../render/qr-output.js';
|
|
38
|
+
import { writePublishRecord } from '../publish/record.js';
|
|
38
39
|
import { createOutput } from '../output.js';
|
|
39
40
|
import { loadProjectContext } from '../project/context.js';
|
|
40
41
|
import { coverImagePath } from './cover.js';
|
|
@@ -85,7 +86,7 @@ function defaultDeps() {
|
|
|
85
86
|
const { runSmokeCheck } = await import('../smoke/run.js');
|
|
86
87
|
return runSmokeCheck(options);
|
|
87
88
|
},
|
|
88
|
-
|
|
89
|
+
emitQr,
|
|
89
90
|
};
|
|
90
91
|
}
|
|
91
92
|
/**
|
|
@@ -348,11 +349,41 @@ export async function runPublish(args, deps = defaultDeps()) {
|
|
|
348
349
|
// creator from retyping it into a phone. Drawn beside the URL rather than after the smoke check
|
|
349
350
|
// so it is there immediately, and on `--skip-smoke` too.
|
|
350
351
|
//
|
|
351
|
-
// `--json` is
|
|
352
|
-
//
|
|
353
|
-
//
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
// `--json` is passed rather than left to the isTTY gate inside the terminal renderer: `--json` on
|
|
353
|
+
// a terminal still HAS a TTY stdout, and that stream must carry exactly one document. It does not
|
|
354
|
+
// suppress the IMAGE, though — an agent run is a pipe, and the creator on the other side of it is
|
|
355
|
+
// the one person here who can actually scan something.
|
|
356
|
+
// Recorded before anything below can fail: `complete` has written the bytes and the row, so the
|
|
357
|
+
// game IS live at this URL whatever the smoke check goes on to say. The `bitmagic dev` view reads
|
|
358
|
+
// this to show the creator where their game is without them going to find the terminal they
|
|
359
|
+
// published from. Best-effort — a publish is not worth failing over a file nothing gates on.
|
|
360
|
+
try {
|
|
361
|
+
writePublishRecord(context.root, {
|
|
362
|
+
url: done.url,
|
|
363
|
+
visibility: done.visibility,
|
|
364
|
+
publishVersion: done.publishVersion,
|
|
365
|
+
gameId: context.metadata.gameId,
|
|
366
|
+
at: new Date().toISOString(),
|
|
367
|
+
...(done.manageUrl ? { manageUrl: done.manageUrl } : {}),
|
|
368
|
+
// Only when this publish named the game explicitly. The project's own name lives in
|
|
369
|
+
// game.json and is not worth a read here — the view shows the URL and version, and a
|
|
370
|
+
// label it cannot vouch for is worse than none.
|
|
371
|
+
...(args.name ? { name: args.name } : {}),
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
catch {
|
|
375
|
+
// A read-only or full disk costs a link in the dev view, not the publish.
|
|
376
|
+
}
|
|
377
|
+
const qrPath = deps.emitQr(done.url, {
|
|
378
|
+
root: context.root,
|
|
379
|
+
json: args.json === true,
|
|
380
|
+
disabled: args['no-qr'] === true,
|
|
381
|
+
});
|
|
382
|
+
// Named on stdout AND carried in the result below, because those are two different readers: an
|
|
383
|
+
// agent parsing `--json` never sees this line, and has no other way to learn the file exists.
|
|
384
|
+
if (qrPath !== null) {
|
|
385
|
+
log(`QR code: ${qrPath} — show it to your creator to open the game on a phone.`);
|
|
386
|
+
}
|
|
356
387
|
output.result({
|
|
357
388
|
ok: true,
|
|
358
389
|
url: done.url,
|
|
@@ -361,6 +392,7 @@ export async function runPublish(args, deps = defaultDeps()) {
|
|
|
361
392
|
gameId: context.metadata.gameId,
|
|
362
393
|
thumbnailSource: thumbnail.source,
|
|
363
394
|
...(done.manageUrl ? { manageUrl: done.manageUrl } : {}),
|
|
395
|
+
...(qrPath !== null ? { qrPath } : {}),
|
|
364
396
|
...(done.sourceChecks ? { sourceChecks: done.sourceChecks } : {}),
|
|
365
397
|
});
|
|
366
398
|
// Everything below runs AFTER the game is live. `complete` has written the bytes and the row,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AACjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAsB,MAAM,0BAA0B,CAAC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AAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,0EAA0E;KACxF;IACD,IAAI,EAAE;QACJ,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,qFAAqF;kBACnF,6DAA6D;SAClE;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iFAAiF;SAC/F;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wFAAwF;SACtG;QACD,KAAK,EAAE;YACL,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,oFAAoF;SAClG;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,WAAW,EACT,qGAAqG;SACxG;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,WAAW,EACT,2FAA2F;SAC9F;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,kEAAkE;SAChF;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineCommand } from 'citty';
|
|
2
|
-
import { spawnSync } from 'child_process';
|
|
3
2
|
import { createInterface } from 'readline/promises';
|
|
3
|
+
import { isUpdatable, managerFor, readInstalledVersion, realSpawnManager, resolveInstall, uninstallArgs, } from '../update/self-install.js';
|
|
4
4
|
import { selectEnvironmentForCommand, resolveAuth0ClientId } from '../config/environments.js';
|
|
5
5
|
import { clearCredentials } from '../config/credentials.js';
|
|
6
6
|
import { getAccessToken } from '../auth/session.js';
|
|
@@ -16,16 +16,33 @@ async function askOnStdin(question) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* Remove the global install — the one this CLI is actually running from.
|
|
20
|
+
*
|
|
21
|
+
* This used to spawn a bare `npm`, and had exactly the bug `bitmagic self-update` was written to
|
|
22
|
+
* fix: on a machine using nvm, the `npm` a non-interactive shell resolves is not the one that owns
|
|
23
|
+
* this install, so the uninstall quietly removed nothing while the command went on to report that
|
|
24
|
+
* the reset had succeeded — leaving the creator with the old CLI and no sign of it. The location
|
|
25
|
+
* and the executable now come from the running process instead (see update/self-install.ts).
|
|
26
|
+
*
|
|
27
|
+
* npm's output is CAPTURED, not inherited. Under `--json` this command's stdout is contractually
|
|
28
|
+
* one JSON document (see output.ts), and a subprocess writing its own progress there would corrupt
|
|
29
|
+
* it — the exact hazard the Output seam exists to prevent, reintroduced by spawning a process
|
|
30
|
+
* instead of calling console.log. Nothing is printed unless it fails, and then it goes through
|
|
24
31
|
* `output.info` like every other line.
|
|
25
32
|
*/
|
|
26
33
|
function uninstallGlobally() {
|
|
27
|
-
const
|
|
28
|
-
|
|
34
|
+
const location = resolveInstall(import.meta.url);
|
|
35
|
+
// An npx run, a checkout, or a shape this does not recognise: there is no install to remove, and
|
|
36
|
+
// guessing at one is how the old version got this wrong. Reported as "not uninstalled", which is
|
|
37
|
+
// the truth, and the command's existing warning then says so.
|
|
38
|
+
if (!isUpdatable(location))
|
|
39
|
+
return false;
|
|
40
|
+
const command = managerFor(location, process.execPath);
|
|
41
|
+
const outcome = realSpawnManager(command.command, [...command.leadingArgs, ...uninstallArgs(location)]);
|
|
42
|
+
if (outcome.error !== undefined || outcome.status !== 0)
|
|
43
|
+
return false;
|
|
44
|
+
// Same rule as the update: the manager saying it worked is not evidence that it did.
|
|
45
|
+
return readInstalledVersion(location.verifyDir) === null;
|
|
29
46
|
}
|
|
30
47
|
export const defaultResetDeps = {
|
|
31
48
|
fetch: globalThis.fetch,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-account.js","sourceRoot":"","sources":["../../src/commands/reset-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"reset-account.js","sourceRoot":"","sources":["../../src/commands/reset-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAe,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA0ExC,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7E,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAS,iBAAiB;IACxB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,iGAAiG;IACjG,iGAAiG;IACjG,8DAA8D;IAC9D,IAAI,CAAC,WA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EAAE,6DAA6D,EAAE;QACpG,UAAU,EAAE;YACV,IAAI,EAAE,SAAS;YACf,WAAW,EACT,kEAAkE;gBAClE,kGAAkG;SACrG;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,kEAAkE;SAChF;KACF;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE;QAChB,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;QAC1C,MAAM,MAAM,GAAG,MAAM,eAAe,CAClC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,KAAK,IAAI,EAAE,OAAO,EAAE,EAClD,MAAM,CACP,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;QAEvC,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YACvC,wEAAwE;YACxE,4DAA4D;YAC5D,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CACT,4FAA4F;gBAC1F,kFAAkF,CACrF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type Output } from '../output.js';
|
|
2
|
+
import { type UpdateCheckCache, type UpdateTag } from '../update/notice.js';
|
|
3
|
+
import { type EnvironmentName } from '../config/environments.js';
|
|
4
|
+
import { type Exists, type InstallLocation, type SpawnManager } from '../update/self-install.js';
|
|
5
|
+
/**
|
|
6
|
+
* Everything this command touches outside itself, in one place — including the two reads that look
|
|
7
|
+
* like constants (`currentVersion`, `pinned`) but are both facts about the machine it happens to be
|
|
8
|
+
* running on, and the cache write, which would otherwise reach into the real `~/.bitmagic` from a
|
|
9
|
+
* test run.
|
|
10
|
+
*/
|
|
11
|
+
export interface SelfUpdateDeps {
|
|
12
|
+
currentVersion: () => string;
|
|
13
|
+
pinned: () => EnvironmentName | undefined;
|
|
14
|
+
resolve: () => InstallLocation;
|
|
15
|
+
fetchTag: (tag: UpdateTag) => Promise<string | null>;
|
|
16
|
+
spawn: SpawnManager;
|
|
17
|
+
readVersion: (dir: string) => string | null;
|
|
18
|
+
writable: (dir: string) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Path probe used to locate the package manager. Injected for the same reason as everything else
|
|
21
|
+
* here: the tests describe machines that do not exist, and a real `existsSync` would answer for
|
|
22
|
+
* this one instead — silently dropping every case into the PATH fallback.
|
|
23
|
+
*/
|
|
24
|
+
exists: Exists;
|
|
25
|
+
writeCache: (cache: UpdateCheckCache) => void;
|
|
26
|
+
sleep: (ms: number) => Promise<void>;
|
|
27
|
+
now: () => number;
|
|
28
|
+
execPath: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const defaultSelfUpdateDeps: SelfUpdateDeps;
|
|
31
|
+
/**
|
|
32
|
+
* Which npm line to install from, and never a question put to the creator.
|
|
33
|
+
*
|
|
34
|
+
* The order is the same rule the startup nudge already applies, just acted on instead of printed:
|
|
35
|
+
* an explicit `--tag` is a deliberate override; otherwise a project's committed pin decides,
|
|
36
|
+
* because the project is where a wrong line actually bites (a prerelease against `prod` calls
|
|
37
|
+
* `/api/cli/v1` endpoints that are not deployed there yet); and outside a project the only honest
|
|
38
|
+
* answer is the line this build is already on.
|
|
39
|
+
*
|
|
40
|
+
* That middle case is what makes this command the fix for `cliLineMismatchNotice` too: run inside
|
|
41
|
+
* a project on the wrong line, it crosses over without being told to.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveTargetTag(explicit: string | undefined, pinned: 'dev' | 'prod' | 'local' | undefined, currentVersion: string): UpdateTag;
|
|
44
|
+
/** What `--json` reports, and what the human lines above it say in prose. */
|
|
45
|
+
export interface SelfUpdateResult {
|
|
46
|
+
ok: true;
|
|
47
|
+
/** The version that was running when the command started. */
|
|
48
|
+
from: string;
|
|
49
|
+
/** The version now on disk. Equal to `from` when there was nothing newer. */
|
|
50
|
+
to: string;
|
|
51
|
+
tag: UpdateTag;
|
|
52
|
+
/** True when an install actually ran. False when the CLI was already current. */
|
|
53
|
+
updated: boolean;
|
|
54
|
+
manager: 'npm' | 'pnpm';
|
|
55
|
+
packageDir: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function runSelfUpdate(explicitTag: string | undefined, output: Output, deps?: SelfUpdateDeps): Promise<SelfUpdateResult>;
|
|
58
|
+
export declare const selfUpdateCommand: import("citty").CommandDef<{
|
|
59
|
+
readonly tag: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
readonly description: string;
|
|
62
|
+
};
|
|
63
|
+
readonly json: {
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
66
|
+
};
|
|
67
|
+
}>;
|