@bitmagic/cli 0.1.38 → 0.1.40
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 +59 -12
- package/dist/auth/subscribe-flow.d.ts +59 -0
- package/dist/auth/subscribe-flow.js +102 -0
- package/dist/auth/subscribe-flow.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/login.js +27 -7
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/subscribe.d.ts +14 -0
- package/dist/commands/subscribe.js +60 -0
- package/dist/commands/subscribe.js.map +1 -0
- package/dist/commands/verify.js +16 -3
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/whoami.d.ts +10 -14
- package/dist/commands/whoami.js +17 -12
- package/dist/commands/whoami.js.map +1 -1
- package/dist/editor/asset-detail-panel.d.ts +22 -0
- package/dist/editor/asset-detail-panel.js +72 -0
- package/dist/editor/asset-detail-panel.js.map +1 -0
- package/dist/editor/asset-preview-page.d.ts +6 -0
- package/dist/editor/asset-preview-page.js +103 -0
- package/dist/editor/asset-preview-page.js.map +1 -0
- package/dist/editor/asset-viewer.d.ts +19 -0
- package/dist/editor/asset-viewer.js +218 -0
- package/dist/editor/asset-viewer.js.map +1 -0
- package/dist/editor/server.js +128 -0
- package/dist/editor/server.js.map +1 -1
- package/dist/editor/shell-page.js +309 -30
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/http/client.d.ts +10 -0
- package/dist/http/client.js +38 -3
- package/dist/http/client.js.map +1 -1
- package/dist/scaffold/project-files.d.ts +6 -0
- package/dist/scaffold/project-files.js +9 -3
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/verify/browser.js +30 -0
- package/dist/verify/browser.js.map +1 -1
- package/dist/verify/classify.d.ts +4 -0
- package/dist/verify/classify.js +26 -0
- package/dist/verify/classify.js.map +1 -1
- package/dist/verify/events.d.ts +41 -0
- package/dist/verify/events.js +72 -0
- package/dist/verify/events.js.map +1 -0
- package/dist/verify/iterate.js +3 -1
- package/dist/verify/iterate.js.map +1 -1
- package/dist/verify/result.d.ts +5 -1
- package/dist/verify/result.js.map +1 -1
- package/dist/verify/url.d.ts +12 -0
- package/dist/verify/url.js +14 -0
- package/dist/verify/url.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,14 +7,38 @@ web project or per-session pod required.
|
|
|
7
7
|
|
|
8
8
|
## Who can use it
|
|
9
9
|
|
|
10
|
-
The CLI requires an **active Bitmagic Pro subscription
|
|
11
|
-
|
|
12
|
-
immediately and prints how you were admitted, so you find out at login rather than three commands
|
|
13
|
-
later; `bitmagic whoami` shows it again at any time.
|
|
10
|
+
The CLI requires an **active Bitmagic Pro subscription**. There is no other way in — an Auth0 role
|
|
11
|
+
used to work and no longer does.
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
You do not have to go and find a signup page: `bitmagic login` checks as soon as you have
|
|
14
|
+
authenticated and, if you are not subscribed, opens Stripe Checkout in the browser you are already
|
|
15
|
+
in and waits for it to complete.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
$ bitmagic login
|
|
19
|
+
Open: https://…/activate?user_code=KLMN-PQRS
|
|
20
|
+
Code: KLMN-PQRS
|
|
21
|
+
Waiting for approval…
|
|
22
|
+
Logged in to dev as you@example.com.
|
|
23
|
+
|
|
24
|
+
The Bitmagic CLI needs a Bitmagic Pro subscription.
|
|
25
|
+
Pro gives you a weekly and a 5-hour spark allowance that refill on their own,
|
|
26
|
+
and pays for generating assets, cover art and worlds.
|
|
27
|
+
|
|
28
|
+
Opening checkout in your browser:
|
|
29
|
+
https://checkout.stripe.com/c/pay/cs_…
|
|
30
|
+
|
|
31
|
+
Waiting for your subscription… (Ctrl-C is safe — run `bitmagic subscribe` to resume)
|
|
32
|
+
|
|
33
|
+
Bitmagic Pro is active. You are ready — try `bitmagic init`.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Ctrl-C at any point is safe; your login is already stored. `bitmagic subscribe` picks up where you
|
|
37
|
+
left off, and `bitmagic whoami` says whether Pro is active and when it renews.
|
|
38
|
+
|
|
39
|
+
The spark allowance refills on a rolling basis — a weekly budget and a 5-hour one — and is what pays
|
|
40
|
+
for `bitmagic generate`, `cover` and `forge`. When an allowance runs out, generation falls back to
|
|
41
|
+
your purchased spark balance. `bitmagic usage` shows where it went.
|
|
18
42
|
|
|
19
43
|
## Install
|
|
20
44
|
|
|
@@ -46,6 +70,7 @@ browser reloads itself on every change and the assets panel shows each generatio
|
|
|
46
70
|
| Command | What it does |
|
|
47
71
|
|---|---|
|
|
48
72
|
| `bitmagic login [--env <env>]` | Device-code auth against Auth0; stores credentials per environment. |
|
|
73
|
+
| `bitmagic subscribe [--no-wait]` | Start the Bitmagic Pro subscription the CLI requires; opens checkout and waits for it. |
|
|
49
74
|
| `bitmagic usage [--days N]` | Where this account's sparks went, and what Pro allowance is left. |
|
|
50
75
|
| `bitmagic logout [--env <env>]` | Remove stored credentials for an environment. |
|
|
51
76
|
| `bitmagic whoami [--env <env>]` | Show the identity the CLI is authenticated as. |
|
|
@@ -53,7 +78,7 @@ browser reloads itself on every change and the assets panel shows each generatio
|
|
|
53
78
|
| `bitmagic check` | Typecheck (`tsc --noEmit`) against the vendored engine. Fast; does not prove the game runs. |
|
|
54
79
|
| `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. |
|
|
55
80
|
| `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. |
|
|
56
|
-
| `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 — 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). |
|
|
81
|
+
| `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). |
|
|
57
82
|
| `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. |
|
|
58
83
|
| `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.** |
|
|
59
84
|
| `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`. |
|
|
@@ -97,6 +122,17 @@ my-game/
|
|
|
97
122
|
console.retry.log # the software-GL retry's console, when a lost context forced one
|
|
98
123
|
```
|
|
99
124
|
|
|
125
|
+
### Gameplay events
|
|
126
|
+
|
|
127
|
+
Verify boots the game with `?eventlog=1`, which asks the engine to run a passive gameplay-event
|
|
128
|
+
session (`window.__bmDebug` — see the engine's `docs/debug-namespace.md`). The run's `result.json`
|
|
129
|
+
then carries an `events` block: counts by type (`player-death`, `pickup`, `match-end`, …), the
|
|
130
|
+
counts within the first 10 seconds of gameplay, when the match ended, and the last 50 raw events.
|
|
131
|
+
Two signals surface as **warnings** (never failures — verify provides no input, so only
|
|
132
|
+
spontaneous events are judged): the player dying 3+ times in the first 10 seconds of gameplay,
|
|
133
|
+
and the match ending within 5 seconds of starting. A vendored engine too old to know
|
|
134
|
+
`?eventlog=1` yields `events: null` and no output — run `bitmagic upgrade` to get the session.
|
|
135
|
+
|
|
100
136
|
## Cover art
|
|
101
137
|
|
|
102
138
|
`bitmagic cover` generates the game's cover from `GAME-DESIGN.md` — the same artwork the web
|
|
@@ -183,10 +219,21 @@ highlighted. One that fails disappears the same way, and says why on the termina
|
|
|
183
219
|
choosing the arguments can act on, so it goes there rather than onto a red card beside the game.
|
|
184
220
|
One whose process was killed drops off the list rather than spinning forever.
|
|
185
221
|
|
|
186
|
-
Thumbnails are drawn by the engine on demand — images are their own preview, meshes
|
|
187
|
-
once and cached in `.bitmagic/previews/` — so they cost nothing on later
|
|
188
|
-
feeds the editor's right-click **Add object** palette, which used to show
|
|
189
|
-
tile.
|
|
222
|
+
Thumbnails are drawn by the engine on demand — images are their own preview, meshes and voxel
|
|
223
|
+
assets are rendered once and cached in `.bitmagic/previews/` — so they cost nothing on later
|
|
224
|
+
reloads. The same cache feeds the editor's right-click **Add object** palette, which used to show
|
|
225
|
+
"No Preview" on every tile.
|
|
226
|
+
|
|
227
|
+
**Click a row to look at the asset properly.** A mesh or a voxel asset opens in a viewer you can
|
|
228
|
+
drag to turn and scroll to zoom, at full detail rather than the coarse version a 46px tile is drawn
|
|
229
|
+
from; an image opens as the image; a sound gets a player. Beside it is everything the row has no
|
|
230
|
+
room for — extent in world units, voxel count, triangle count, and the asset id, with a button to
|
|
231
|
+
copy it so you can paste it into a `bitmagic generate prop --asset …`. Escape closes it. The game
|
|
232
|
+
pauses while it is open and resumes when you close it.
|
|
233
|
+
|
|
234
|
+
The viewer is served by `bitmagic dev` itself, so it arrives with the CLI: no `bitmagic upgrade`,
|
|
235
|
+
and no dependency on how old the engine vendored into your project is. It does borrow one thing
|
|
236
|
+
from that engine — the voxel loader, so what you see is what your project's own code builds.
|
|
190
237
|
|
|
191
238
|
### Auto-reload
|
|
192
239
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { openInBrowser } from '../open-browser.js';
|
|
2
|
+
import type { Environment } from '../config/environments.js';
|
|
3
|
+
import type { Output } from '../output.js';
|
|
4
|
+
/** How long to wait for the webhook to land the subscription before giving up. */
|
|
5
|
+
export declare const SUBSCRIBE_POLL_TIMEOUT_MS: number;
|
|
6
|
+
export declare const SUBSCRIBE_POLL_INTERVAL_MS = 3000;
|
|
7
|
+
export interface WhoamiResponse {
|
|
8
|
+
userId: string;
|
|
9
|
+
roles: string[];
|
|
10
|
+
/** Whether the caller currently holds an entitled subscription. */
|
|
11
|
+
pro: boolean;
|
|
12
|
+
/** Period end of any subscription row, including a lapsed one. */
|
|
13
|
+
proUntil: string | null;
|
|
14
|
+
/** Set when the subscription is live but will not renew. Optional: older api-servers omit it. */
|
|
15
|
+
cancelAtPeriodEnd?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* PURE. One line describing where the caller's subscription stands.
|
|
19
|
+
*
|
|
20
|
+
* Covers the case a status boolean cannot: a subscription that is live TODAY
|
|
21
|
+
* but set not to renew. Finding that out when a command is refused mid-work is
|
|
22
|
+
* the worst possible moment, so every command that greets the creator says it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function describeProStatus(me: WhoamiResponse): string;
|
|
25
|
+
export interface SubscribeDeps {
|
|
26
|
+
fetch: typeof globalThis.fetch;
|
|
27
|
+
sleep: (ms: number) => Promise<void>;
|
|
28
|
+
now: () => number;
|
|
29
|
+
openInBrowser: typeof openInBrowser;
|
|
30
|
+
}
|
|
31
|
+
export declare const defaultSubscribeDeps: SubscribeDeps;
|
|
32
|
+
export declare function fetchWhoami(environment: Environment, token: string, deps: SubscribeDeps): Promise<WhoamiResponse>;
|
|
33
|
+
export interface SubscribeOptions {
|
|
34
|
+
/**
|
|
35
|
+
* Do not launch a browser — print the URL instead. Set under `--json`: an
|
|
36
|
+
* agent tool's machine spawning a window unasked is surprising, and the URL
|
|
37
|
+
* is the actionable thing there. `BITMAGIC_NO_OPEN` is honoured separately,
|
|
38
|
+
* inside openInBrowser.
|
|
39
|
+
*/
|
|
40
|
+
noOpen?: boolean;
|
|
41
|
+
/** Skip the wait entirely and return as soon as checkout is open. */
|
|
42
|
+
noWait?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface SubscribeResult {
|
|
45
|
+
/** True when the subscription was confirmed active before we returned. */
|
|
46
|
+
pro: boolean;
|
|
47
|
+
/** The checkout URL, when one was created (absent if already subscribed). */
|
|
48
|
+
checkoutUrl?: string;
|
|
49
|
+
/** Why we stopped waiting, when we did not confirm. */
|
|
50
|
+
reason?: 'timeout' | 'not-waited';
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Explain that Pro is required, open checkout, and wait for it to land.
|
|
54
|
+
*
|
|
55
|
+
* 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
|
|
57
|
+
* login are still worth keeping.
|
|
58
|
+
*/
|
|
59
|
+
export declare function runSubscribeFlow(environment: Environment, token: string, output: Output, options?: SubscribeOptions, deps?: SubscribeDeps): Promise<SubscribeResult>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Getting a logged-in creator from "no subscription" to "ready to work".
|
|
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.
|
|
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.
|
|
14
|
+
*
|
|
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.
|
|
17
|
+
*/
|
|
18
|
+
import { apiGet, apiPost } from '../http/client.js';
|
|
19
|
+
import { openInBrowser } from '../open-browser.js';
|
|
20
|
+
/** How long to wait for the webhook to land the subscription before giving up. */
|
|
21
|
+
export const SUBSCRIBE_POLL_TIMEOUT_MS = 15 * 60_000;
|
|
22
|
+
export const SUBSCRIBE_POLL_INTERVAL_MS = 3_000;
|
|
23
|
+
/**
|
|
24
|
+
* PURE. One line describing where the caller's subscription stands.
|
|
25
|
+
*
|
|
26
|
+
* Covers the case a status boolean cannot: a subscription that is live TODAY
|
|
27
|
+
* but set not to renew. Finding that out when a command is refused mid-work is
|
|
28
|
+
* the worst possible moment, so every command that greets the creator says it.
|
|
29
|
+
*/
|
|
30
|
+
export function describeProStatus(me) {
|
|
31
|
+
const day = (iso) => iso.slice(0, 10);
|
|
32
|
+
if (me.pro) {
|
|
33
|
+
if (!me.proUntil)
|
|
34
|
+
return 'Bitmagic Pro is active.';
|
|
35
|
+
return me.cancelAtPeriodEnd === true
|
|
36
|
+
? `Bitmagic Pro is active until ${day(me.proUntil)} and will NOT renew — \`bitmagic subscribe\` to keep it.`
|
|
37
|
+
: `Bitmagic Pro is active. Renews ${day(me.proUntil)}.`;
|
|
38
|
+
}
|
|
39
|
+
return me.proUntil
|
|
40
|
+
? `Bitmagic Pro ended on ${day(me.proUntil)}.`
|
|
41
|
+
: 'No Bitmagic Pro subscription.';
|
|
42
|
+
}
|
|
43
|
+
export const defaultSubscribeDeps = {
|
|
44
|
+
fetch: globalThis.fetch,
|
|
45
|
+
sleep: (ms) => new Promise((r) => setTimeout(r, ms)),
|
|
46
|
+
now: () => Date.now(),
|
|
47
|
+
openInBrowser,
|
|
48
|
+
};
|
|
49
|
+
export function fetchWhoami(environment, token, deps) {
|
|
50
|
+
return apiGet(environment, '/api/cli/v1/whoami', token, { fetch: deps.fetch });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Explain that Pro is required, open checkout, and wait for it to land.
|
|
54
|
+
*
|
|
55
|
+
* 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
|
|
57
|
+
* login are still worth keeping.
|
|
58
|
+
*/
|
|
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
|
+
});
|
|
63
|
+
output.info('');
|
|
64
|
+
output.info('The Bitmagic CLI needs a Bitmagic Pro subscription.');
|
|
65
|
+
output.info('Pro gives you a weekly and a 5-hour spark allowance that refill on their own,');
|
|
66
|
+
output.info('and pays for generating assets, cover art and worlds.');
|
|
67
|
+
output.info('');
|
|
68
|
+
// Always print the URL, opened or not: a printed URL works on a machine with
|
|
69
|
+
// no browser, in a container, and in a log an agent reads back later.
|
|
70
|
+
const opened = options.noOpen === true
|
|
71
|
+
? 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}`);
|
|
74
|
+
if (options.noWait === true) {
|
|
75
|
+
return { pro: false, checkoutUrl: checkout.url, reason: 'not-waited' };
|
|
76
|
+
}
|
|
77
|
+
output.info('');
|
|
78
|
+
output.info('Waiting for your subscription… (Ctrl-C is safe — run `bitmagic subscribe` to resume)');
|
|
79
|
+
const deadline = deps.now() + SUBSCRIBE_POLL_TIMEOUT_MS;
|
|
80
|
+
while (deps.now() < deadline) {
|
|
81
|
+
await deps.sleep(SUBSCRIBE_POLL_INTERVAL_MS);
|
|
82
|
+
// A transient failure mid-poll must not end the flow — the creator may
|
|
83
|
+
// still be typing their card in. Only a definitive "yes" stops the loop.
|
|
84
|
+
let me = null;
|
|
85
|
+
try {
|
|
86
|
+
me = await fetchWhoami(environment, token, deps);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (me.pro) {
|
|
92
|
+
output.info('');
|
|
93
|
+
output.info('Bitmagic Pro is active. You are ready — try `bitmagic init`.');
|
|
94
|
+
return { pro: true, checkoutUrl: checkout.url };
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
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' };
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=subscribe-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe-flow.js","sourceRoot":"","sources":["../../src/auth/subscribe-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,OAA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MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;IAEpG,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,yBAAyB,CAAC;IACxD,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC7C,uEAAuE;QACvE,yEAAyE;QACzE,IAAI,EAAE,GAA0B,IAAI,CAAC;QACrC,IAAI,CAAC;YACH,EAAE,GAAG,MAAM,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACnD,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;YAC5E,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;QAClD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IACnF,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACpD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACtE,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -38,6 +38,20 @@ declare const rawCommands: {
|
|
|
38
38
|
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
39
39
|
};
|
|
40
40
|
}>;
|
|
41
|
+
subscribe: CommandDef<{
|
|
42
|
+
readonly env: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly description: "Environment to subscribe in (dev, prod, local).";
|
|
45
|
+
};
|
|
46
|
+
readonly 'no-wait': {
|
|
47
|
+
readonly type: "boolean";
|
|
48
|
+
readonly description: "Open checkout and exit instead of waiting for it to complete.";
|
|
49
|
+
};
|
|
50
|
+
readonly json: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
41
55
|
usage: CommandDef<{
|
|
42
56
|
readonly days: {
|
|
43
57
|
readonly type: "string";
|
package/dist/cli.js
CHANGED
|
@@ -5,6 +5,7 @@ import { loginCommand } from './commands/login.js';
|
|
|
5
5
|
import { logoutCommand } from './commands/logout.js';
|
|
6
6
|
import { whoamiCommand } from './commands/whoami.js';
|
|
7
7
|
import { usageCommand } from './commands/usage.js';
|
|
8
|
+
import { subscribeCommand } from './commands/subscribe.js';
|
|
8
9
|
import { initCommand } from './commands/init.js';
|
|
9
10
|
import { upgradeCommand } from './commands/upgrade.js';
|
|
10
11
|
import { checkCommand } from './commands/check.js';
|
|
@@ -100,6 +101,7 @@ const rawCommands = {
|
|
|
100
101
|
login: loginCommand,
|
|
101
102
|
logout: logoutCommand,
|
|
102
103
|
whoami: whoamiCommand,
|
|
104
|
+
subscribe: subscribeCommand,
|
|
103
105
|
usage: usageCommand,
|
|
104
106
|
init: initCommand,
|
|
105
107
|
upgrade: upgradeCommand,
|
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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Ac;IACvB,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,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"}
|
package/dist/commands/login.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineCommand } from 'citty';
|
|
|
2
2
|
import { resolveEnvironment, resolveAuth0ClientId } from '../config/environments.js';
|
|
3
3
|
import { writeCredentials, writeDefaultEnvironment, readDefaultEnvironment } from '../config/credentials.js';
|
|
4
4
|
import { requestDeviceCode, pollForToken } from '../auth/device-flow.js';
|
|
5
|
-
import {
|
|
5
|
+
import { fetchWhoami, runSubscribeFlow, defaultSubscribeDeps, describeProStatus } from '../auth/subscribe-flow.js';
|
|
6
6
|
import { createOutput } from '../output.js';
|
|
7
7
|
const deps = {
|
|
8
8
|
fetch: globalThis.fetch,
|
|
@@ -35,18 +35,38 @@ export const loginCommand = defineCommand({
|
|
|
35
35
|
writeCredentials(environment.name, credentials);
|
|
36
36
|
writeDefaultEnvironment(environment.name);
|
|
37
37
|
// Prove the login rather than assuming it: a token Auth0 accepted is not the same as an
|
|
38
|
-
// account api-server admits to the CLI
|
|
39
|
-
|
|
38
|
+
// account api-server admits to the CLI, which requires an active Bitmagic Pro subscription.
|
|
39
|
+
// whoami sits OUTSIDE that gate precisely so this answer exists for someone who has not
|
|
40
|
+
// subscribed yet — otherwise the first thing a new creator would meet is a 403.
|
|
41
|
+
const me = await fetchWhoami(environment, credentials.accessToken, defaultSubscribeDeps);
|
|
40
42
|
output.info(`Logged in to ${environment.name} as ${me.userId}.`);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
if (me.pro) {
|
|
44
|
+
// Says "renews on X" — or warns when it will not, which is the only
|
|
45
|
+
// chance to mention that before a command is refused mid-work.
|
|
46
|
+
output.info(describeProStatus(me));
|
|
47
|
+
output.result({
|
|
48
|
+
ok: true, environment: environment.name, userId: me.userId, roles: me.roles,
|
|
49
|
+
pro: true, proUntil: me.proUntil, cancelAtPeriodEnd: me.cancelAtPeriodEnd ?? false,
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// A returning creator whose subscription lapsed should be told so, not
|
|
54
|
+
// greeted as though they had never subscribed.
|
|
55
|
+
if (me.proUntil)
|
|
56
|
+
output.info(describeProStatus(me));
|
|
57
|
+
// Not subscribed: carry straight on into checkout rather than ending on an
|
|
58
|
+
// error the creator has to decode. They are already in a browser — they
|
|
59
|
+
// just approved a device code in one.
|
|
60
|
+
const subscribed = await runSubscribeFlow(environment, credentials.accessToken, output, {
|
|
61
|
+
noOpen: args.json === true,
|
|
62
|
+
});
|
|
44
63
|
output.result({
|
|
45
64
|
ok: true,
|
|
46
65
|
environment: environment.name,
|
|
47
66
|
userId: me.userId,
|
|
48
67
|
roles: me.roles,
|
|
49
|
-
|
|
68
|
+
pro: subscribed.pro,
|
|
69
|
+
...(subscribed.checkoutUrl ? { checkoutUrl: subscribed.checkoutUrl } : {}),
|
|
50
70
|
});
|
|
51
71
|
},
|
|
52
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,UAAU,CAAC,KAAK;IACvB,KAAK,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;CAC/E,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,8CAA8C,EAAE;IACpF,IAAI,EAAE;QACJ,GAAG,EAAE,EAAE,IA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").CommandDef<{
|
|
2
|
+
readonly env: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly description: "Environment to subscribe in (dev, prod, local).";
|
|
5
|
+
};
|
|
6
|
+
readonly 'no-wait': {
|
|
7
|
+
readonly type: "boolean";
|
|
8
|
+
readonly description: "Open checkout and exit instead of waiting for it to complete.";
|
|
9
|
+
};
|
|
10
|
+
readonly json: {
|
|
11
|
+
readonly type: "boolean";
|
|
12
|
+
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineCommand } from 'citty';
|
|
2
|
+
import { resolveEnvironment, resolveAuth0ClientId } from '../config/environments.js';
|
|
3
|
+
import { readDefaultEnvironment } from '../config/credentials.js';
|
|
4
|
+
import { getAccessToken } from '../auth/session.js';
|
|
5
|
+
import { fetchWhoami, runSubscribeFlow, defaultSubscribeDeps } from '../auth/subscribe-flow.js';
|
|
6
|
+
import { createOutput } from '../output.js';
|
|
7
|
+
/**
|
|
8
|
+
* `bitmagic subscribe` — start (or finish) a Bitmagic Pro subscription.
|
|
9
|
+
*
|
|
10
|
+
* `login` already runs this flow for a creator who has not subscribed, so this
|
|
11
|
+
* command exists for the second attempt: someone who closed the checkout tab,
|
|
12
|
+
* whose card was declined, or whose subscription has since lapsed. Same code
|
|
13
|
+
* path, so the recovery looks exactly like the first run rather than being a
|
|
14
|
+
* differently-worded special case.
|
|
15
|
+
*/
|
|
16
|
+
const deviceFlowDeps = { fetch: globalThis.fetch, sleep: (ms) => new Promise((r) => setTimeout(r, ms)) };
|
|
17
|
+
export const subscribeCommand = defineCommand({
|
|
18
|
+
meta: { name: 'subscribe', description: 'Start a Bitmagic Pro subscription, which the CLI requires.' },
|
|
19
|
+
args: {
|
|
20
|
+
env: { type: 'string', description: 'Environment to subscribe in (dev, prod, local).' },
|
|
21
|
+
'no-wait': { type: 'boolean', description: 'Open checkout and exit instead of waiting for it to complete.' },
|
|
22
|
+
json: {
|
|
23
|
+
type: 'boolean',
|
|
24
|
+
description: 'Print the result as JSON on stdout; all progress goes to stderr.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
async run({ args }) {
|
|
28
|
+
const output = createOutput(args.json === true);
|
|
29
|
+
const environment = resolveEnvironment({
|
|
30
|
+
explicit: args.env,
|
|
31
|
+
storedDefault: readDefaultEnvironment(),
|
|
32
|
+
});
|
|
33
|
+
const clientId = resolveAuth0ClientId(environment);
|
|
34
|
+
const token = await getAccessToken(environment, clientId, deviceFlowDeps);
|
|
35
|
+
const me = await fetchWhoami(environment, token, defaultSubscribeDeps);
|
|
36
|
+
if (me.pro) {
|
|
37
|
+
// Nothing to sell. Say when it renews rather than "already subscribed",
|
|
38
|
+
// which is the question behind the question.
|
|
39
|
+
const until = me.proUntil ? ` Renews ${me.proUntil.slice(0, 10)}.` : '';
|
|
40
|
+
output.info(`Bitmagic Pro is already active for ${me.userId}.${until}`);
|
|
41
|
+
output.result({ ok: true, pro: true, userId: me.userId, proUntil: me.proUntil ?? null });
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (me.proUntil) {
|
|
45
|
+
output.info(`Your previous Bitmagic Pro subscription ended on ${me.proUntil.slice(0, 10)}.`);
|
|
46
|
+
}
|
|
47
|
+
const result = await runSubscribeFlow(environment, token, output, {
|
|
48
|
+
noOpen: args.json === true,
|
|
49
|
+
noWait: args['no-wait'] === true,
|
|
50
|
+
});
|
|
51
|
+
output.result({
|
|
52
|
+
ok: true,
|
|
53
|
+
pro: result.pro,
|
|
54
|
+
userId: me.userId,
|
|
55
|
+
...(result.checkoutUrl ? { checkoutUrl: result.checkoutUrl } : {}),
|
|
56
|
+
...(result.reason ? { reason: result.reason } : {}),
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=subscribe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe.js","s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,GAAG;YACf,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/dist/commands/verify.js
CHANGED
|
@@ -12,6 +12,7 @@ import { waitForServer } from '../verify/wait-for-server.js';
|
|
|
12
12
|
import { computeFingerprint } from '../publish/fingerprint.js';
|
|
13
13
|
import { writeVerifyRecord, decideVerifyOutcome, recordAndGateVerify } from '../verify/result.js';
|
|
14
14
|
import { runVerifyWatch } from '../verify/iterate.js';
|
|
15
|
+
import { buildVerifyUrl } from '../verify/url.js';
|
|
15
16
|
import { createOutput } from '../output.js';
|
|
16
17
|
const DEFAULT_SETTLE_MS = 15_000;
|
|
17
18
|
/**
|
|
@@ -103,6 +104,18 @@ function describeRunState(observations) {
|
|
|
103
104
|
if (snapshot.physics !== null)
|
|
104
105
|
parts.push(`${snapshot.physics.rigidBodyCount} bodies`);
|
|
105
106
|
}
|
|
107
|
+
const events = observations.events;
|
|
108
|
+
if (events) {
|
|
109
|
+
// Only non-zero parts — a run with nothing to report should not say "0 deaths".
|
|
110
|
+
const deaths = events.totalByType['player-death'] ?? 0;
|
|
111
|
+
if (deaths > 0)
|
|
112
|
+
parts.push(`${deaths} death${deaths === 1 ? '' : 's'}`);
|
|
113
|
+
const pickups = events.totalByType['pickup'] ?? 0;
|
|
114
|
+
if (pickups > 0)
|
|
115
|
+
parts.push(`${pickups} pickup${pickups === 1 ? '' : 's'}`);
|
|
116
|
+
if (events.matchEndAtSeconds !== null)
|
|
117
|
+
parts.push(`match ended at ${events.matchEndAtSeconds}s`);
|
|
118
|
+
}
|
|
106
119
|
return parts.length === 0 ? 'Run state: unobserved' : parts.join(' · ');
|
|
107
120
|
}
|
|
108
121
|
export const verifyCommand = defineCommand({
|
|
@@ -197,10 +210,8 @@ export const verifyCommand = defineCommand({
|
|
|
197
210
|
// No ?autostart=1: verify clicks the engine Play button like a real player would
|
|
198
211
|
// (startInteraction), which both proves the menu came up AND that gameplay starts from it.
|
|
199
212
|
// Autostart bypassed the menu — a game whose Play flow was broken could still pass.
|
|
200
|
-
// ?renderer= pins the pipeline so the verdict does not depend on a stale localStorage
|
|
201
|
-
// preference left by whoever opened this game in a browser last.
|
|
202
213
|
const checkOptions = {
|
|
203
|
-
url:
|
|
214
|
+
url: buildVerifyUrl(port, renderer),
|
|
204
215
|
screenshotPath,
|
|
205
216
|
consolePath,
|
|
206
217
|
settleMs,
|
|
@@ -235,6 +246,7 @@ export const verifyCommand = defineCommand({
|
|
|
235
246
|
renderer: observations.renderer,
|
|
236
247
|
settle: observations.settle,
|
|
237
248
|
snapshot: observations.snapshot,
|
|
249
|
+
events: observations.events,
|
|
238
250
|
...(retriedWithSoftwareGl ? { retriedWithSoftwareGl } : {}),
|
|
239
251
|
});
|
|
240
252
|
recordAndGateVerify(artifactDir, outcome, { consolePath, ...(fast ? {} : { screenshotPath }) }, {
|
|
@@ -255,6 +267,7 @@ export const verifyCommand = defineCommand({
|
|
|
255
267
|
retriedWithSoftwareGl: outcome.record.retriedWithSoftwareGl,
|
|
256
268
|
settle: outcome.record.settle,
|
|
257
269
|
snapshot: outcome.record.snapshot,
|
|
270
|
+
events: outcome.record.events,
|
|
258
271
|
artifactDir,
|
|
259
272
|
consolePath,
|
|
260
273
|
screenshotPath: fast ? undefined : screenshotPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAA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AC;gBACjC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;aACrC,CACF,CAAC;YACF,oFAAoF;YACpF,4EAA4E;YAC5E,MAAM,CAAC,MAAM,CAAC;gBACZ,EAAE,EAAE,IAAI;gBACR,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACjC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACjC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW;gBACvC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACjC,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB;gBAC3D,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;gBAC7B,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;gBACjC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;gBAC7B,WAAW;gBACX,WAAW;gBACX,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc;aAClD,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
access?: string;
|
|
12
|
-
pro?: boolean;
|
|
13
|
-
proUntil?: string | null;
|
|
14
|
-
}
|
|
1
|
+
import { type WhoamiResponse } from '../auth/subscribe-flow.js';
|
|
2
|
+
export type { WhoamiResponse };
|
|
3
|
+
/**
|
|
4
|
+
* `bitmagic whoami` — who the CLI is authenticated as, and whether that account
|
|
5
|
+
* may use it.
|
|
6
|
+
*
|
|
7
|
+
* The endpoint behind this sits outside the CLI's entitlement gate, so it
|
|
8
|
+
* answers for an unsubscribed creator too — that is the whole point: "why is
|
|
9
|
+
* this refusing me" needs an answer that is not itself refused.
|
|
10
|
+
*/
|
|
15
11
|
export declare function runWhoami(explicitEnv?: string): Promise<WhoamiResponse>;
|
|
16
12
|
export declare const whoamiCommand: import("citty").CommandDef<{
|
|
17
13
|
readonly env: {
|