@bitmagic/cli 0.1.46-dev.1 → 0.1.46-dev.3

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/LICENSE.md ADDED
@@ -0,0 +1,204 @@
1
+ # @bitmagic/cli License
2
+
3
+ Copyright © 2026 Bitmagic Oy. All rights reserved.
4
+
5
+ Required Notice: Copyright Bitmagic Oy (https://bitmagic.ai)
6
+
7
+ `@bitmagic/cli` is the Bitmagic command-line tool, which scaffolds, builds, verifies and
8
+ publishes Bitmagic games from your own machine. It is licensed under the **PolyForm Shield License 1.0.0**, reproduced in full
9
+ below, as modified by the Additional Permission immediately following this notice.
10
+
11
+ ---
12
+
13
+ ## Additional Permission: your games
14
+
15
+ **This section grants you rights in addition to the licence text below. Where the two disagree,
16
+ this section wins.**
17
+
18
+ Notwithstanding the Noncompete and Competition sections, the following are **permitted purposes**,
19
+ and no game you build is ever treated as a competing product:
20
+
21
+ 1. **Building, publishing and selling games.** You may use this software to create games and other
22
+ interactive works, distribute them to any audience, and charge whatever you like for them.
23
+ 2. **Distributing anywhere.** You may distribute those games through any channel — bitmagic.ai,
24
+ your own site, Steam, itch.io, a console store, a desktop or mobile build, anywhere. Publishing
25
+ through Bitmagic is never a condition of this licence.
26
+ 3. **Modifying it.** You may change this software however you need for your game, and distribute
27
+ your game with those changes in it.
28
+ 4. **Keeping what you were given.** Each version you legitimately obtained is licensed to you
29
+ perpetually. A Bitmagic subscription pays for access to *new* versions and for Bitmagic's hosted
30
+ services; ending it does not end this licence, and does not affect games you have already
31
+ shipped.
32
+
33
+ What this permission does **not** cover is providing the software *as* the software: distributing,
34
+ selling, sublicensing or hosting it — modified or not, for a fee or for free — as a game engine,
35
+ framework, SDK, library, template, starter kit, or game-creation tool or service.
36
+
37
+ The short version, which is a summary and not itself binding: **ship the games, not the engine.**
38
+
39
+ ---
40
+
41
+ # PolyForm Shield License 1.0.0
42
+
43
+ <https://polyformproject.org/licenses/shield/1.0.0>
44
+
45
+ ## Acceptance
46
+
47
+ In order to get any license under these terms, you must agree
48
+ to them as both strict obligations and conditions to all
49
+ your licenses.
50
+
51
+ ## Copyright License
52
+
53
+ The licensor grants you a copyright license for the
54
+ software to do everything you might do with the software
55
+ that would otherwise infringe the licensor's copyright
56
+ in it for any permitted purpose. However, you may
57
+ only distribute the software according to [Distribution
58
+ License](#distribution-license) and make changes or new works
59
+ based on the software according to [Changes and New Works
60
+ License](#changes-and-new-works-license).
61
+
62
+ ## Distribution License
63
+
64
+ The licensor grants you an additional copyright license
65
+ to distribute copies of the software. Your license
66
+ to distribute covers distributing the software with
67
+ changes and new works permitted by [Changes and New Works
68
+ License](#changes-and-new-works-license).
69
+
70
+ ## Notices
71
+
72
+ You must ensure that anyone who gets a copy of any part of
73
+ the software from you also gets a copy of these terms or the
74
+ URL for them above, as well as copies of any plain-text lines
75
+ beginning with `Required Notice:` that the licensor provided
76
+ with the software. For example:
77
+
78
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
79
+
80
+ ## Changes and New Works License
81
+
82
+ The licensor grants you an additional copyright license to
83
+ make changes and new works based on the software for any
84
+ permitted purpose.
85
+
86
+ ## Patent License
87
+
88
+ The licensor grants you a patent license for the software that
89
+ covers patent claims the licensor can license, or becomes able
90
+ to license, that you would infringe by using the software.
91
+
92
+ ## Noncompete
93
+
94
+ Any purpose is a permitted purpose, except for providing any
95
+ product that competes with the software or any product the
96
+ licensor or any of its affiliates provides using the software.
97
+
98
+ ## Competition
99
+
100
+ Goods and services compete even when they provide functionality
101
+ through different kinds of interfaces or for different technical
102
+ platforms. Applications can compete with services, libraries
103
+ with plugins, frameworks with development tools, and so on,
104
+ even if they're written in different programming languages
105
+ or for different computer architectures. Goods and services
106
+ compete even when provided free of charge. If you market a
107
+ product as a practical substitute for the software or another
108
+ product, it definitely competes.
109
+
110
+ ## New Products
111
+
112
+ If you are using the software to provide a product that does
113
+ not compete, but the licensor or any of its affiliates brings
114
+ your product into competition by providing a new version of
115
+ the software or another product using the software, you may
116
+ continue using versions of the software available under these
117
+ terms beforehand to provide your competing product, but not
118
+ any later versions.
119
+
120
+ ## Discontinued Products
121
+
122
+ You may begin using the software to compete with a product
123
+ or service that the licensor or any of its affiliates has
124
+ stopped providing, unless the licensor includes a plain-text
125
+ line beginning with `Licensor Line of Business:` with the
126
+ software that mentions that line of business. For example:
127
+
128
+ > Licensor Line of Business: YoyodyneCMS Content Management
129
+ System (http://example.com/cms)
130
+
131
+ ## Sales of Business
132
+
133
+ If the licensor or any of its affiliates sells a line of
134
+ business developing the software or using the software
135
+ to provide a product, the buyer can also enforce
136
+ [Noncompete](#noncompete) for that product.
137
+
138
+ ## Fair Use
139
+
140
+ You may have "fair use" rights for the software under the
141
+ law. These terms do not limit them.
142
+
143
+ ## No Other Rights
144
+
145
+ These terms do not allow you to sublicense or transfer any of
146
+ your licenses to anyone else, or prevent the licensor from
147
+ granting licenses to anyone else. These terms do not imply
148
+ any other licenses.
149
+
150
+ ## Patent Defense
151
+
152
+ If you make any written claim that the software infringes or
153
+ contributes to infringement of any patent, your patent license
154
+ for the software granted under these terms ends immediately. If
155
+ your company makes such a claim, your patent license ends
156
+ immediately for work on behalf of your company.
157
+
158
+ ## Violations
159
+
160
+ The first time you are notified in writing that you have
161
+ violated any of these terms, or done anything with the software
162
+ not covered by your licenses, your licenses can nonetheless
163
+ continue if you come into full compliance with these terms,
164
+ and take practical steps to correct past violations, within
165
+ 32 days of receiving notice. Otherwise, all your licenses
166
+ end immediately.
167
+
168
+ ## No Liability
169
+
170
+ ***As far as the law allows, the software comes as is, without
171
+ any warranty or condition, and the licensor will not be liable
172
+ to you for any damages arising out of these terms or the use
173
+ or nature of the software, under any kind of legal claim.***
174
+
175
+ ## Definitions
176
+
177
+ The **licensor** is the individual or entity offering these
178
+ terms, and the **software** is the software the licensor makes
179
+ available under these terms.
180
+
181
+ A **product** can be a good or service, or a combination
182
+ of them.
183
+
184
+ **You** refers to the individual or entity agreeing to these
185
+ terms.
186
+
187
+ **Your company** is any legal entity, sole proprietorship,
188
+ or other kind of organization that you work for, plus all
189
+ its affiliates.
190
+
191
+ **Affiliates** means the other organizations than an
192
+ organization has control over, is under the control of, or is
193
+ under common control with.
194
+
195
+ **Control** means ownership of substantially all the assets of
196
+ an entity, or the power to direct its management and policies
197
+ by vote, contract, or otherwise. Control can be direct or
198
+ indirect.
199
+
200
+ **Your licenses** are all the licenses granted to you for the
201
+ software under these terms.
202
+
203
+ **Use** means anything you do with the software requiring one
204
+ of your licenses.
package/README.md CHANGED
@@ -92,7 +92,8 @@ browser reloads itself on every change and the assets panel shows each generatio
92
92
  | `bitmagic usage [--days N]` | Where this account's sparks went, and what Pro allowance is left. |
93
93
  | `bitmagic allowance [--allow-sparks \| --block-sparks]` | The two Pro allowance windows, and whether your purchased sparks may fund work once they run out. `--allow-sparks` needs a real terminal — it authorises spending your money, so an agent cannot run it for you. |
94
94
  | `bitmagic logout [--env <env>]` | Remove stored credentials for an environment. |
95
- | `bitmagic whoami [--env <env>]` | Show the identity the CLI is authenticated as. |
95
+ | `bitmagic reset-account [--env <env>] [--yes] [--uninstall]` | **Deletes your account** on `dev` or `local` so the first-run experience can be tested again — games, sparks, profile, terms acceptance and Bitmagic Pro (cancelled in Stripe first). Then clears that environment's stored credentials. Refuses `prod`, where the endpoint is not deployed at all. Asks you to type the environment name; `--yes` skips that and is required in a shell with no terminal. `--uninstall` also removes the global CLI afterwards, so the next run starts at `npm install -g`. Your project directory is left alone — its `gameId` no longer exists, so start the fresh run in a new one. |
96
+ | `bitmagic whoami [--env <env>]` | Show the identity the CLI is authenticated as, and which environment answered — including where that environment was chosen from. |
96
97
  | `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. |
97
98
  | `bitmagic check` | Typecheck (`tsc --noEmit`) against the vendored engine. Fast; does not prove the game runs. |
98
99
  | `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. |
@@ -100,10 +101,10 @@ browser reloads itself on every change and the assets panel shows each generatio
100
101
  | `bitmagic verify [--timeout <ms>] [--renderer webgpu\|webgl] [--fast] [--watch]` | Build, boot the game in a headless browser, click 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). Writes the artifacts the publish gate reads (see below). |
101
102
  | `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. |
102
103
  | `bitmagic publish [--visibility public\|private] [--name <name>] [--description <desc>] [--force]` | Verify-gate, build if needed, and upload straight to GCS. **Private unless `--visibility public` is passed.** |
103
- | `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`. |
104
+ | `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. |
104
105
  | `bitmagic generate <skybox\|sound\|image\|character\|animation\|prop\|vehicle> ...` | Generate one asset directly into `src/work/world.json`. Costs sparks. `prop` upgrades an existing placeholder asset in place, `vehicle` adds a new drivable one, `animation` takes a parameter spec rather than a prompt — see below. |
105
106
  | `bitmagic cover [--prompt "..."] [--force] [--no-start-screen]` | Generate the game's cover art from `GAME-DESIGN.md`: sets the start screen, saves `.bitmagic/cover.webp`, becomes the publish thumbnail. Costs sparks. |
106
- | `bitmagic forge --prompt "..." [--city\|--dungeon\|--platformer\|--freeform] [--name <name>] [--resume <jobId>]` | Design and bake a whole playable level into `world.json`. Slow and expensive; supports `--resume`. |
107
+ | `bitmagic forge --prompt "..." [--city\|--dungeon\|--platformer\|--freeform] [--name <name>] [--resume <jobId>]` | Design and bake a whole playable level into `world.json`. Costs sparks, and takes many minutes — the bake alone can take twenty. `--resume <jobId>` picks a failed run back up from the last step that finished, rather than redoing the whole thing. |
107
108
 
108
109
  Every command exits non-zero on failure with a single-line message (no stack trace) and, where a
109
110
  distinction is useful to an automated caller, a specific exit code — see **Exit codes** below.
@@ -180,6 +181,8 @@ up fails on endpoints that are not there yet — so pair `@dev` with `bitmagic l
180
181
  my-game/
181
182
  src/work/ # your game — Game.ts, game.json, world.json
182
183
  engine/ # vendored engine, read-only, replaced wholesale by `bitmagic upgrade`
184
+ LICENSE.md # the engine's licence — see Licensing below
185
+ THIRD-PARTY-NOTICES.md # three.js, Rapier and the rest
183
186
  AGENTS.md # guidance for the agent editing this project
184
187
  GAME-DESIGN.md # what the game is — yours to write; bitmagic cover reads it
185
188
  .claude/
@@ -559,6 +562,28 @@ Three nudges, all advisory — nothing is ever blocked because something is out
559
562
  suggest `bitmagic upgrade`. Publishing is never refused for an old engine — the prompt belongs
560
563
  where rebuilding is cheap, not at the moment you ship.
561
564
 
565
+ ## Licensing
566
+
567
+ `bitmagic init` vendors the engine into your project as readable source. It is Bitmagic's IP,
568
+ licensed to you — not assigned — under the [PolyForm Shield License
569
+ 1.0.0](https://polyformproject.org/licenses/shield/1.0.0) plus an additional permission covering
570
+ games. The full text lands in your project as `engine/LICENSE.md`.
571
+
572
+ **You may** build games with it and sell them, modify the engine however your game needs, and ship
573
+ your games anywhere — bitmagic.ai, your own site, Steam, itch.io, a desktop build. Publishing
574
+ through Bitmagic is never a condition. Every engine version you obtained stays licensed to you
575
+ permanently; a lapsed subscription ends access to *new* versions and the hosted services, not your
576
+ right to keep shipping what you already built.
577
+
578
+ **You may not** provide the engine as the engine — distributing, selling, sublicensing or hosting
579
+ it, modified or not, free or paid, as a game engine, framework, SDK, library, starter kit or
580
+ game-creation tool.
581
+
582
+ One practical consequence: a published game contains compiled engine code, so the licence requires
583
+ the notice to travel with it. `vite.publish.config.js` carries a `banner` that does this
584
+ automatically, along with the attribution three.js, Rapier and the other bundled libraries require.
585
+ Leave it in place. `engine/THIRD-PARTY-NOTICES.md` has the full texts.
586
+
562
587
  ## Development
563
588
 
564
589
  ```bash
@@ -13,6 +13,15 @@ export interface WhoamiResponse {
13
13
  proUntil: string | null;
14
14
  /** Set when the subscription is live but will not renew. Optional: older api-servers omit it. */
15
15
  cancelAtPeriodEnd?: boolean;
16
+ /**
17
+ * The Bitmagic Pro storefront — where Pro is bought OR a Pro voucher redeemed.
18
+ *
19
+ * Optional for the same reason `cancelAtPeriodEnd` is: a CLI published today
20
+ * can be pointed at an api-server deployed before the storefront existed, and
21
+ * must still be able to sell a subscription. Absent means "fall back to
22
+ * minting Stripe Checkout myself".
23
+ */
24
+ subscribeUrl?: string;
16
25
  }
17
26
  /**
18
27
  * PURE. One line describing where the caller's subscription stands.
@@ -42,18 +51,32 @@ export interface SubscribeOptions {
42
51
  noWait?: boolean;
43
52
  }
44
53
  export interface SubscribeResult {
45
- /** True when the subscription was confirmed active before we returned. */
54
+ /** True when Pro was confirmed active before we returned. */
46
55
  pro: boolean;
47
- /** The checkout URL, when one was created (absent if already subscribed). */
48
- checkoutUrl?: string;
56
+ /**
57
+ * Where the creator finishes subscribing: the storefront, or — against an
58
+ * api-server predating it — a Stripe Checkout URL. Absent if already subscribed.
59
+ */
60
+ subscribeUrl?: string;
49
61
  /** Why we stopped waiting, when we did not confirm. */
50
62
  reason?: 'timeout' | 'not-waited';
51
63
  }
52
64
  /**
53
- * Explain that Pro is required, open checkout, and wait for it to land.
65
+ * PURE. The storefront URL to open for this caller.
66
+ *
67
+ * `cli=1` only changes the page's wording — it says "go back to your terminal"
68
+ * once Pro is active. `u` is the account this CLI is authenticated as, so the
69
+ * page can refuse to sell Pro to a DIFFERENT account that happens to be signed
70
+ * in to the browser. That mismatch was impossible while the CLI minted the
71
+ * Stripe session from its own token, and it is invisible from here: the creator
72
+ * would subscribe the wrong account and this poll would run to its timeout.
73
+ */
74
+ export declare function storefrontUrlFor(subscribeUrl: string, userId: string): string;
75
+ /**
76
+ * Explain that Pro is required, open the storefront, and wait for it to land.
54
77
  *
55
78
  * Returns rather than throwing when the creator does not finish: abandoning
56
- * checkout is a decision, not an error, and the credentials from a successful
79
+ * the flow is a decision, not an error, and the credentials from a successful
57
80
  * login are still worth keeping.
58
81
  */
59
- export declare function runSubscribeFlow(environment: Environment, token: string, output: Output, options?: SubscribeOptions, deps?: SubscribeDeps): Promise<SubscribeResult>;
82
+ export declare function runSubscribeFlow(environment: Environment, token: string, me: WhoamiResponse, output: Output, options?: SubscribeOptions, deps?: SubscribeDeps): Promise<SubscribeResult>;
@@ -1,19 +1,33 @@
1
1
  /**
2
2
  * Getting a logged-in creator from "no subscription" to "ready to work".
3
3
  *
4
- * The Bitmagic CLI requires an active Bitmagic Pro subscription, so for a new
5
- * creator the very first command would otherwise be a 403. Rather than print an
6
- * error and a URL to retype, the CLI creates the Stripe Checkout session itself
7
- * and opens it: `bitmagic login` flows straight from the device-code approval
8
- * into paying, in the same browser, and then confirms.
4
+ * The Bitmagic CLI requires active Bitmagic Pro, so for a new creator the very
5
+ * first command would otherwise be a 403. Rather than print an error and a URL
6
+ * to retype, the CLI opens the Bitmagic Pro storefront: `bitmagic login` flows
7
+ * straight from the device-code approval into subscribing, in the same browser,
8
+ * and then confirms.
9
9
  *
10
- * Two api-server routes make this possible, and both live OUTSIDE the CLI's
11
- * entitlement gate for exactly this reason (see cli-onboarding-routes.ts):
12
- * `GET /whoami` answers whether the caller is entitled, and
13
- * `POST /pro/checkout` mints a checkout URL for the caller's own account.
10
+ * ── Why a storefront and not Stripe Checkout ─────────────────────────────────
14
11
  *
15
- * Shared by `login` and by `subscribe`, so a creator who abandoned checkout
16
- * gets an identical second run rather than a different-looking recovery path.
12
+ * This used to POST /pro/checkout and open the Stripe URL directly. That made a
13
+ * comped-Pro voucher unreachable from the CLI even though `pro_days` satisfies
14
+ * the entitlement gate exactly as a subscription does — someone holding a code
15
+ * was shown a card form and nothing else. The storefront offers both, and the
16
+ * poll below does not care which one the creator picked: `whoami` reports a
17
+ * grant and a subscription identically.
18
+ *
19
+ * The URL comes from `whoami` rather than from the CLI's own config, because
20
+ * PORTAL_URL is the api-server's to know. Deriving it from `apiUrl` would be
21
+ * wrong locally, where the api-server is on 3002 and the portal on 4000.
22
+ *
23
+ * Both routes live OUTSIDE the CLI's entitlement gate for the obvious reason
24
+ * (see cli-onboarding-routes.ts): `GET /whoami` answers whether the caller is
25
+ * entitled and where to fix it, and `POST /pro/checkout` — now called by the
26
+ * storefront, and by this file only against an api-server too old to have one —
27
+ * mints a checkout URL for the caller's own account.
28
+ *
29
+ * Shared by `login` and by `subscribe`, so a creator who abandoned the flow gets
30
+ * an identical second run rather than a different-looking recovery path.
17
31
  */
18
32
  import { apiGet, apiPost } from '../http/client.js';
19
33
  import { openInBrowser } from '../open-browser.js';
@@ -50,18 +64,34 @@ export function fetchWhoami(environment, token, deps) {
50
64
  return apiGet(environment, '/api/cli/v1/whoami', token, { fetch: deps.fetch });
51
65
  }
52
66
  /**
53
- * Explain that Pro is required, open checkout, and wait for it to land.
67
+ * PURE. The storefront URL to open for this caller.
68
+ *
69
+ * `cli=1` only changes the page's wording — it says "go back to your terminal"
70
+ * once Pro is active. `u` is the account this CLI is authenticated as, so the
71
+ * page can refuse to sell Pro to a DIFFERENT account that happens to be signed
72
+ * in to the browser. That mismatch was impossible while the CLI minted the
73
+ * Stripe session from its own token, and it is invisible from here: the creator
74
+ * would subscribe the wrong account and this poll would run to its timeout.
75
+ */
76
+ export function storefrontUrlFor(subscribeUrl, userId) {
77
+ const separator = subscribeUrl.includes('?') ? '&' : '?';
78
+ return `${subscribeUrl}${separator}cli=1&u=${encodeURIComponent(userId)}`;
79
+ }
80
+ /**
81
+ * Explain that Pro is required, open the storefront, and wait for it to land.
54
82
  *
55
83
  * Returns rather than throwing when the creator does not finish: abandoning
56
- * checkout is a decision, not an error, and the credentials from a successful
84
+ * the flow is a decision, not an error, and the credentials from a successful
57
85
  * login are still worth keeping.
58
86
  */
59
- export async function runSubscribeFlow(environment, token, output, options = {}, deps = defaultSubscribeDeps) {
60
- const checkout = await apiPost(environment, '/api/cli/v1/pro/checkout', token, {}, {
61
- fetch: deps.fetch,
62
- });
87
+ export async function runSubscribeFlow(environment, token, me, output, options = {}, deps = defaultSubscribeDeps) {
88
+ // An api-server too old to serve a storefront still has to be able to sell a
89
+ // subscription, so fall back to minting Checkout the way this flow used to.
90
+ const url = me.subscribeUrl
91
+ ? storefrontUrlFor(me.subscribeUrl, me.userId)
92
+ : (await apiPost(environment, '/api/cli/v1/pro/checkout', token, {}, { fetch: deps.fetch })).url;
63
93
  output.info('');
64
- output.info('The Bitmagic CLI needs a Bitmagic Pro subscription.');
94
+ output.info('The Bitmagic CLI needs Bitmagic Pro.');
65
95
  output.info('Pro gives you a weekly and a 5-hour spark allowance that refill on their own,');
66
96
  output.info('and pays for generating assets, cover art and worlds.');
67
97
  output.info('');
@@ -69,34 +99,39 @@ export async function runSubscribeFlow(environment, token, output, options = {},
69
99
  // no browser, in a container, and in a log an agent reads back later.
70
100
  const opened = options.noOpen === true
71
101
  ? false
72
- : deps.openInBrowser(checkout.url, { log: (m) => output.info(m) });
73
- output.info(opened ? `Opening checkout in your browser:\n ${checkout.url}` : `Subscribe at:\n ${checkout.url}`);
102
+ : deps.openInBrowser(url, { log: (m) => output.info(m) });
103
+ // Naming the voucher here and not only on the page matters: an agent driving
104
+ // the CLI reads this text, and the human it is working for may be holding a code.
105
+ output.info(opened
106
+ ? `Opening Bitmagic Pro in your browser — subscribe, or redeem a Pro voucher there:\n ${url}`
107
+ : `Subscribe, or redeem a Pro voucher, at:\n ${url}`);
74
108
  if (options.noWait === true) {
75
- return { pro: false, checkoutUrl: checkout.url, reason: 'not-waited' };
109
+ return { pro: false, subscribeUrl: url, reason: 'not-waited' };
76
110
  }
77
111
  output.info('');
78
- output.info('Waiting for your subscription… (Ctrl-C is safe — run `bitmagic subscribe` to resume)');
112
+ output.info('Waiting for Bitmagic Pro… (Ctrl-C is safe — run `bitmagic subscribe` to resume)');
79
113
  const deadline = deps.now() + SUBSCRIBE_POLL_TIMEOUT_MS;
80
114
  while (deps.now() < deadline) {
81
115
  await deps.sleep(SUBSCRIBE_POLL_INTERVAL_MS);
82
116
  // A transient failure mid-poll must not end the flow — the creator may
83
117
  // still be typing their card in. Only a definitive "yes" stops the loop.
84
- let me = null;
118
+ // This answers for a redeemed voucher too: `pro` is entitlement, not billing.
119
+ let current = null;
85
120
  try {
86
- me = await fetchWhoami(environment, token, deps);
121
+ current = await fetchWhoami(environment, token, deps);
87
122
  }
88
123
  catch {
89
124
  continue;
90
125
  }
91
- if (me.pro) {
126
+ if (current.pro) {
92
127
  output.info('');
93
128
  output.info('Bitmagic Pro is active. You are ready — try `bitmagic init`.');
94
- return { pro: true, checkoutUrl: checkout.url };
129
+ return { pro: true, subscribeUrl: url };
95
130
  }
96
131
  }
97
132
  output.info('');
98
- output.info('Still waiting on Stripe. Run `bitmagic usage` once it completes, or');
99
- output.info('`bitmagic subscribe` to start again.');
100
- return { pro: false, checkoutUrl: checkout.url, reason: 'timeout' };
133
+ output.info('Still waiting. If you paid, run `bitmagic usage` once Stripe confirms; otherwise');
134
+ output.info('run `bitmagic subscribe` to start again.');
135
+ return { pro: false, subscribeUrl: url, reason: 'timeout' };
101
136
  }
102
137
  //# sourceMappingURL=subscribe-flow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribe-flow.js","sourceRoot":"","sources":["../../src/auth/subscribe-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,kFAAkF;AAClF,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC;AAahD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAkB;IAClD,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9C,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,EAAE,CAAC,QAAQ;YAAE,OAAO,yBAAyB,CAAC;QACnD,OAAO,EAAE,CAAC,iBAAiB,KAAK,IAAI;YAClC,CAAC,CAAC,gCAAgC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,0DAA0D;YAC5G,CAAC,CAAC,kCAAkC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,CAAC,QAAQ;QAChB,CAAC,CAAC,yBAAyB,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG;QAC9C,CAAC,CAAC,+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W,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACxD,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;YAC5E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;IAChG,MAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACxD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC9D,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -28,6 +28,24 @@ declare const rawCommands: {
28
28
  readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
29
29
  };
30
30
  }>;
31
+ 'reset-account': CommandDef<{
32
+ readonly env: {
33
+ readonly type: "string";
34
+ readonly description: "Environment to reset in (dev, local). Never prod.";
35
+ };
36
+ readonly yes: {
37
+ readonly type: "boolean";
38
+ readonly description: "Skip the confirmation. Required in a non-interactive shell.";
39
+ };
40
+ readonly uninstall: {
41
+ readonly type: "boolean";
42
+ readonly description: "Also `npm uninstall -g @bitmagic/cli` afterwards, so the next run starts at the install.";
43
+ };
44
+ readonly json: {
45
+ readonly type: "boolean";
46
+ readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
47
+ };
48
+ }>;
31
49
  whoami: CommandDef<{
32
50
  readonly env: {
33
51
  readonly type: "string";
@@ -45,7 +63,7 @@ declare const rawCommands: {
45
63
  };
46
64
  readonly 'no-wait': {
47
65
  readonly type: "boolean";
48
- readonly description: "Open checkout and exit instead of waiting for it to complete.";
66
+ readonly description: "Open the Bitmagic Pro page and exit instead of waiting for it to complete.";
49
67
  };
50
68
  readonly json: {
51
69
  readonly type: "boolean";
package/dist/cli.js CHANGED
@@ -3,6 +3,7 @@ import { CliError } from './errors.js';
3
3
  import { jsonErrorResult } from './output.js';
4
4
  import { loginCommand } from './commands/login.js';
5
5
  import { logoutCommand } from './commands/logout.js';
6
+ import { resetAccountCommand } from './commands/reset-account.js';
6
7
  import { whoamiCommand } from './commands/whoami.js';
7
8
  import { usageCommand } from './commands/usage.js';
8
9
  import { allowanceCommand } from './commands/allowance.js';
@@ -101,6 +102,7 @@ export function isWrappedWithCleanErrors(command) {
101
102
  const rawCommands = {
102
103
  login: loginCommand,
103
104
  logout: logoutCommand,
105
+ 'reset-account': resetAccountCommand,
104
106
  whoami: whoamiCommand,
105
107
  subscribe: subscribeCommand,
106
108
  usage: usageCommand,
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,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAA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AE,UAAU;IACf,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;CACxB,CAAC;AAIF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAC1C,MAAM,CAAC,OAAO,CAAC,WAAW,CAA+C,CAAC,GAAG,CAC5E,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CACtD,CAC0C,CAAC;AAE9C,iGAAiG;AACjG,8FAA8F;AAC9F,uFAAuF;AACvF,4FAA4F;AAC5F,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,gDAAgD;KAC9D;IACD,WAAW;CACZ,CAAC,CAAC"}
@@ -69,6 +69,12 @@ function installDependencies(dir) {
69
69
  function printNextSteps(output, dir, gameId, installSucceeded, hasIdea) {
70
70
  output.info('');
71
71
  output.info(`Created ${dir} (game ${gameId}).`);
72
+ // Notice at the moment the engine actually lands on their disk, which is the strongest place
73
+ // to give it: the terms are contemporaneous with receiving the software and are written into
74
+ // the project itself, not linked from a page read once months ago. Sell your games, modify the
75
+ // engine, ship anywhere — the one thing the licence withholds is shipping the engine as an
76
+ // engine. See engine/LICENSE.md and docs/engine-license.md.
77
+ output.info('The engine is licensed to you under engine/LICENSE.md — your games are yours to sell.');
72
78
  output.info('');
73
79
  output.info('Next steps:');
74
80
  output.info(` cd ${dir}`);
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAe,MAAM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