@zaflun/lumio-cli 0.5.2 → 0.10.0
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 +3 -2
- package/dist/index.d.ts +13 -0
- package/dist/index.js +3267 -396
- package/dist/sandbox/index.html +14 -0
- package/dist/sandbox/sandbox.css +2 -0
- package/dist/sandbox/sandbox.js +11 -0
- package/package.json +31 -17
package/README.md
CHANGED
|
@@ -35,10 +35,11 @@ lumio deploy -v 1.0.0
|
|
|
35
35
|
| `lumio logout` | Remove local credentials |
|
|
36
36
|
| `lumio whoami` | Show current user and account |
|
|
37
37
|
| `lumio init [name]` | Create a new extension project (interactive wizard) |
|
|
38
|
-
| `lumio dev` |
|
|
38
|
+
| `lumio dev` | Run the extension locally: sandbox on `127.0.0.1:3100`, REPL and bot-module runtime in one session |
|
|
39
|
+
| `lumio trigger <type\|@preset\|chat\|reward\|music\|scenario …>` | Send input to the running `lumio dev` from a second terminal (`--field a.b=v`, `--tier 2`, `--data`, `--file`, `--user/--role/--platform`, `--timer`, `--storage`; load: `--count N`, `--rate 5/s`, `--random`) |
|
|
39
40
|
| `lumio build` | Bundle extension for deployment |
|
|
40
41
|
| `lumio deploy` | Upload extension version (flags: `-v`, `-d`, `--breaking`, `--draft`) |
|
|
41
|
-
| `lumio env set <KEY>
|
|
42
|
+
| `lumio env set <KEY> [VALUE]` | Set a secret (no `VALUE`: reads `LUMIO_SECRET` or prompts) |
|
|
42
43
|
| `lumio env list` | List secret keys |
|
|
43
44
|
| `lumio env delete <KEY>` | Delete a secret |
|
|
44
45
|
| `lumio run <type:name>` | Execute a server function locally |
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,17 @@ declare class CredentialStore {
|
|
|
9
9
|
getApiUrl(): string;
|
|
10
10
|
isAuthenticated(): boolean;
|
|
11
11
|
saveToken(token: string, apiUrl?: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Persist a full session from the browser PKCE flow — the short-lived JWT plus
|
|
14
|
+
* the long-lived refresh token and the JWT's expiry — so a later refresh can
|
|
15
|
+
* mint a fresh JWT without re-opening the browser.
|
|
16
|
+
*/
|
|
17
|
+
saveSession(session: {
|
|
18
|
+
token: string;
|
|
19
|
+
refreshToken?: string;
|
|
20
|
+
expiresAt?: string;
|
|
21
|
+
apiUrl?: string;
|
|
22
|
+
}): void;
|
|
12
23
|
clear(): void;
|
|
13
24
|
private readCredentials;
|
|
14
25
|
}
|
|
@@ -20,6 +31,8 @@ declare class LumioApiClient {
|
|
|
20
31
|
url(endpoint: string): string;
|
|
21
32
|
authHeaders(): Record<string, string>;
|
|
22
33
|
uploadHeaders(): Record<string, string>;
|
|
34
|
+
/** Throw an {@link ApiError} (with status) when the response is not ok. */
|
|
35
|
+
private ensureOk;
|
|
23
36
|
get<T>(endpoint: string): Promise<T>;
|
|
24
37
|
post<T>(endpoint: string, body?: unknown): Promise<T>;
|
|
25
38
|
put<T>(endpoint: string, body?: unknown): Promise<T>;
|