@bitmagic/cli 0.1.57 → 0.1.58-dev.1
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 +2 -2
- package/dist/auth/subscribe-flow.d.ts +10 -0
- package/dist/auth/subscribe-flow.js +11 -1
- package/dist/auth/subscribe-flow.js.map +1 -1
- package/dist/commands/login.js +14 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/open-browser.js +6 -3
- package/dist/open-browser.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -16,8 +16,8 @@ in and waits for it to complete.
|
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
$ bitmagic login
|
|
19
|
-
|
|
20
|
-
Code:
|
|
19
|
+
Opened https://…/activate?user_code=KLMN-PQRS
|
|
20
|
+
Code: KLMN-PQRS
|
|
21
21
|
Waiting for approval…
|
|
22
22
|
Logged in to dev as you@example.com.
|
|
23
23
|
|
|
@@ -78,6 +78,16 @@ export interface SubscribeResult {
|
|
|
78
78
|
* in to the browser. That mismatch was impossible while the CLI minted the
|
|
79
79
|
* Stripe session from its own token, and it is invisible from here: the creator
|
|
80
80
|
* would subscribe the wrong account and this poll would run to its timeout.
|
|
81
|
+
*
|
|
82
|
+
* `signin=1` asks the portal to resume the Auth0 session the creator just
|
|
83
|
+
* created by approving the device code. That session lives on the Auth0 tenant
|
|
84
|
+
* origin, NOT on bitmagic.ai, so the storefront's own signed-in check — a local
|
|
85
|
+
* read of the SPA cache for its own origin — finds nothing and greets someone
|
|
86
|
+
* who logged in thirty seconds ago as a stranger. The portal answers the hint
|
|
87
|
+
* with one silent top-level redirect (see portal/src/auto-signin.ts); when
|
|
88
|
+
* there is no session to resume it comes straight back and nothing is shown.
|
|
89
|
+
* The portal treats a bare `cli=1` as the same request, so every CLI already
|
|
90
|
+
* installed is fixed by the portal deploy alone — this only states it.
|
|
81
91
|
*/
|
|
82
92
|
export declare function storefrontUrlFor(subscribeUrl: string, userId: string): string;
|
|
83
93
|
/**
|
|
@@ -72,10 +72,20 @@ export function fetchWhoami(environment, token, deps) {
|
|
|
72
72
|
* in to the browser. That mismatch was impossible while the CLI minted the
|
|
73
73
|
* Stripe session from its own token, and it is invisible from here: the creator
|
|
74
74
|
* would subscribe the wrong account and this poll would run to its timeout.
|
|
75
|
+
*
|
|
76
|
+
* `signin=1` asks the portal to resume the Auth0 session the creator just
|
|
77
|
+
* created by approving the device code. That session lives on the Auth0 tenant
|
|
78
|
+
* origin, NOT on bitmagic.ai, so the storefront's own signed-in check — a local
|
|
79
|
+
* read of the SPA cache for its own origin — finds nothing and greets someone
|
|
80
|
+
* who logged in thirty seconds ago as a stranger. The portal answers the hint
|
|
81
|
+
* with one silent top-level redirect (see portal/src/auto-signin.ts); when
|
|
82
|
+
* there is no session to resume it comes straight back and nothing is shown.
|
|
83
|
+
* The portal treats a bare `cli=1` as the same request, so every CLI already
|
|
84
|
+
* installed is fixed by the portal deploy alone — this only states it.
|
|
75
85
|
*/
|
|
76
86
|
export function storefrontUrlFor(subscribeUrl, userId) {
|
|
77
87
|
const separator = subscribeUrl.includes('?') ? '&' : '?';
|
|
78
|
-
return `${subscribeUrl}${separator}cli=1&u=${encodeURIComponent(userId)}`;
|
|
88
|
+
return `${subscribeUrl}${separator}cli=1&signin=1&u=${encodeURIComponent(userId)}`;
|
|
79
89
|
}
|
|
80
90
|
/**
|
|
81
91
|
* Explain that Pro is required, open the storefront, and wait for it to land.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-flow.js","sourceRoot":"","sources":["../../src/auth/subscribe-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;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,EAA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D,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/commands/login.js
CHANGED
|
@@ -21,11 +21,23 @@ export const loginCommand = defineCommand({
|
|
|
21
21
|
// defaultSubscribeDeps is a superset of DeviceFlowDeps (fetch + sleep), so the
|
|
22
22
|
// whole command runs on one injected set rather than a second local literal.
|
|
23
23
|
const grant = await requestDeviceCode(environment, clientId, defaultSubscribeDeps);
|
|
24
|
+
// Open the approval page as well as printing it, unless --json. A device code can still be
|
|
25
|
+
// finished anywhere — on a phone, in another browser — but when it is finished in the browser
|
|
26
|
+
// this machine opens, the Auth0 session it creates is in the SAME browser the Pro storefront
|
|
27
|
+
// opens into a moment later, and that is what lets bitmagic.ai greet a creator who signed in
|
|
28
|
+
// thirty seconds ago as signed in. Approving in one browser while the storefront opens in the
|
|
29
|
+
// default one is a signed-out storefront no portal change can fix.
|
|
30
|
+
//
|
|
31
|
+
// Best effort, never load-bearing: on a machine with no opener — a container, SSH, CI — this
|
|
32
|
+
// returns false and the printed URL was always the answer. BITMAGIC_NO_OPEN turns it off.
|
|
33
|
+
const openedApproval = args.json === true
|
|
34
|
+
? false
|
|
35
|
+
: defaultSubscribeDeps.openInBrowser(grant.verificationUriComplete, { log: (m) => output.info(m) });
|
|
24
36
|
// Always print the URL: agent tools frequently run without a browser. Under --json these go
|
|
25
37
|
// to stderr like all prose — a human still has to read and act on them, and stdout is
|
|
26
38
|
// reserved for the single result document a caller redirects to a file.
|
|
27
|
-
output.info(
|
|
28
|
-
output.info(`Code:
|
|
39
|
+
output.info(`${openedApproval ? 'Opened' : 'Open: '} ${grant.verificationUriComplete}`);
|
|
40
|
+
output.info(`Code: ${grant.userCode}`);
|
|
29
41
|
output.info('Waiting for approval…');
|
|
30
42
|
const credentials = await pollForToken(environment, clientId, grant, defaultSubscribeDeps);
|
|
31
43
|
writeCredentials(environment.name, credentials);
|
|
@@ -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,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACrF,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,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,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;QACpF,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,SAAS,GAAG,2BAA2B,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,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C/C,IAAI,EAAE,CAAC,QAAQ;YAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;QAEpD,0EAA0E;QAC1E,2EAA2E;QAC3E,qDAAqD;QACrD,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE;YAC1F,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;SAC3B,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC;YACZ,EAAE,EAAE,IAAI;YACR,WAAW,EAAE,WAAW,CAAC,IAAI;YAC7B,MAAM,EAAE,EAAE,CAAC,MAAM;YACjB,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI;YACvB,KAAK,EAAE,EAAE,CAAC,KAAK;YACf,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,YAAY,EAAE,UAAU,CAAC,YAAY;SACtC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/dist/open-browser.js
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* ── Why this exists, when `login` deliberately does the opposite ─────────────────────────────
|
|
5
5
|
*
|
|
6
|
-
* `bitmagic login` prints its URL and
|
|
7
|
-
* frequently run without
|
|
8
|
-
* it
|
|
6
|
+
* `bitmagic login` prints its URL and ALSO opens it (except under --json). Printing alone is what
|
|
7
|
+
* always works — agent tools frequently run without a browser, and a device code can be finished on
|
|
8
|
+
* a phone — but it is not enough on its own: approving in one browser while the Pro storefront
|
|
9
|
+
* opens in the default one leaves the creator on a signed-out bitmagic.ai, because the Auth0
|
|
10
|
+
* session the approval creates lives in whichever browser did it. Opening both from here is what
|
|
11
|
+
* makes them the same browser by default.
|
|
9
12
|
*
|
|
10
13
|
* `bitmagic dev` is the other case entirely. Its whole product is a page to look at, and the URL is
|
|
11
14
|
* now printed into a place the human cannot see: agents are told to start `dev` as a BACKGROUND
|
package/dist/open-browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-browser.js","sourceRoot":"","sources":["../src/open-browser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"open-browser.js","sourceRoot":"","sources":["../src/open-browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,8GAA8G;AAC9G,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAO9C,kGAAkG;AAClG,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,GAAW;IACrD,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACnE,gGAAgG;IAChG,8EAA8E;IAC9E,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;IACpF,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACtE,OAAO,IAAI,CAAC;AACd,CAAC;AAUD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,UAA8B,EAAE;IACzE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IACtD,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IAElF,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACxC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAElC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACtF,wFAAwF;QACxF,6EAA6E;QAC7E,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACrB,OAAO,CAAC,GAAG,EAAE,CAAC,mCAAmC,GAAG,YAAY,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitmagic/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58-dev.1",
|
|
4
4
|
"description": "Build Bitmagic games from your own agent tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Bitmagic Oy",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"fflate": "^0.8.2",
|
|
24
24
|
"playwright-core": "^1.59.1",
|
|
25
25
|
"tar": "^7.4.3",
|
|
26
|
-
"@bitmagic/
|
|
27
|
-
"@bitmagic/
|
|
28
|
-
"@bitmagic/world-forger": "0.1.
|
|
26
|
+
"@bitmagic/asset-core": "0.2.13-dev.1",
|
|
27
|
+
"@bitmagic/animation-forger": "0.1.13-dev.1",
|
|
28
|
+
"@bitmagic/world-forger": "0.1.18-dev.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.38.0",
|