openmates 0.18.0-alpha.20 → 0.18.0-alpha.22
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 +15 -0
- package/dist/{chunk-VJRT2LPY.js → chunk-YRJHL6CY.js} +24 -11
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,6 +54,21 @@ openmates whoami --json
|
|
|
54
54
|
The CLI displays a QR code or pair PIN. Approve it in the OpenMates web app.
|
|
55
55
|
During login, the CLI never asks for your account password.
|
|
56
56
|
|
|
57
|
+
Switch to a dev account using an isolated profile; upgrading to an alpha release
|
|
58
|
+
preserves your existing login and does not change the API server:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
openmates --profile dev --api-url https://api.dev.openmates.org login
|
|
62
|
+
export OPENMATES_PROFILE=dev
|
|
63
|
+
openmates whoami
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Approve pairing in the dev web app with your dev account. The profile saves the
|
|
67
|
+
API URL. Run `unset OPENMATES_PROFILE` to return to the default profile, keeping
|
|
68
|
+
its existing production login. Without an environment selection, pass
|
|
69
|
+
`--profile dev` on each dev command. Release/update channels and login profiles
|
|
70
|
+
are independent.
|
|
71
|
+
|
|
57
72
|
Create a new account from the terminal:
|
|
58
73
|
|
|
59
74
|
```bash
|
|
@@ -81735,18 +81735,26 @@ async function handleCodeRun(client, flags, apiKey) {
|
|
|
81735
81735
|
try {
|
|
81736
81736
|
finalStatus = await streamCodeRunToTerminal(url, flags.json === true);
|
|
81737
81737
|
} catch (err) {
|
|
81738
|
-
|
|
81739
|
-
|
|
81740
|
-
|
|
81741
|
-
|
|
81742
|
-
|
|
81743
|
-
|
|
81744
|
-
|
|
81745
|
-
|
|
81738
|
+
try {
|
|
81739
|
+
if (!streamAuth.fallbackToken || streamAuth.fallbackToken === streamAuth.token) throw err;
|
|
81740
|
+
const fallbackUrl = buildCodeRunStreamUrl({
|
|
81741
|
+
apiUrl: client.apiUrl,
|
|
81742
|
+
executionId: result.execution_id,
|
|
81743
|
+
sessionId: streamAuth.sessionId,
|
|
81744
|
+
token: streamAuth.fallbackToken
|
|
81745
|
+
});
|
|
81746
|
+
finalStatus = await streamCodeRunToTerminal(fallbackUrl, flags.json === true);
|
|
81747
|
+
} catch {
|
|
81748
|
+
usedStream = false;
|
|
81749
|
+
process.stderr.write(`Code Run live stream unavailable; polling execution ${result.execution_id}. No new run started.
|
|
81750
|
+
`);
|
|
81751
|
+
finalStatus = await pollCodeRunStatus(client, result.status_path, apiKey, flags.json === true);
|
|
81752
|
+
}
|
|
81746
81753
|
}
|
|
81747
81754
|
} else {
|
|
81748
81755
|
finalStatus = await pollCodeRunStatus(client, result.status_path, apiKey, flags.json === true);
|
|
81749
81756
|
}
|
|
81757
|
+
if (usedStream) finalStatus = await client.getCodeRunStatus(result.status_path, apiKey);
|
|
81750
81758
|
const localFiles = finalStatus.status === "finished" && finalStatus.exit_code === 0 ? await downloadGeneratedFiles(finalStatus, downloadOptions) : [];
|
|
81751
81759
|
if (flags.json === true) {
|
|
81752
81760
|
printJson2({ ...result, final: finalStatus, ...localFiles.length ? { local_files: localFiles } : {} });
|
|
@@ -84188,7 +84196,7 @@ function parseArgs(argv) {
|
|
|
84188
84196
|
const positionals = [];
|
|
84189
84197
|
const flags = {};
|
|
84190
84198
|
for (let i = 0; i < argv.length; i += 1) {
|
|
84191
|
-
const arg = argv[i];
|
|
84199
|
+
const arg = ["-v", "-version"].includes(argv[i]) ? "--version" : argv[i];
|
|
84192
84200
|
if (!arg.startsWith("--")) {
|
|
84193
84201
|
positionals.push(arg);
|
|
84194
84202
|
continue;
|
|
@@ -86241,7 +86249,10 @@ Use @mentions in chat messages:
|
|
|
86241
86249
|
openmates chats new "@Code-Projects review my architecture"`);
|
|
86242
86250
|
}
|
|
86243
86251
|
function printHelp() {
|
|
86244
|
-
|
|
86252
|
+
const version = getCliPackageVersion();
|
|
86253
|
+
const releaseBranch = version === "unknown" ? "unknown" : version.includes("-") ? "dev" : "main";
|
|
86254
|
+
console.log(`OpenMates CLI ${version}
|
|
86255
|
+
Release branch: ${releaseBranch}
|
|
86245
86256
|
|
|
86246
86257
|
Commands:
|
|
86247
86258
|
openmates login Pair-auth login
|
|
@@ -86285,13 +86296,15 @@ Flags:
|
|
|
86285
86296
|
--profile <name> Use an isolated login profile (also OPENMATES_PROFILE)
|
|
86286
86297
|
--api-url <url> Override API base URL (default: installed self-host server, then https://api.openmates.org)
|
|
86287
86298
|
--api-key <key> Optional API key override (or set OPENMATES_API_KEY)
|
|
86288
|
-
--version
|
|
86299
|
+
--version, -v, -version Show CLI version and update availability
|
|
86289
86300
|
--help Show contextual help for any command`);
|
|
86290
86301
|
}
|
|
86291
86302
|
function printVersionHelp() {
|
|
86292
86303
|
console.log(`OpenMates CLI version command:
|
|
86293
86304
|
openmates version [--json]
|
|
86294
86305
|
openmates --version [--json]
|
|
86306
|
+
openmates -v [--json]
|
|
86307
|
+
openmates -version [--json]
|
|
86295
86308
|
|
|
86296
86309
|
Prints the installed CLI version, checks the latest npm version, and shows the
|
|
86297
86310
|
upgrade command when an update is available.
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED