@porte/cli 0.1.3 → 0.1.4

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/dist/main.js CHANGED
@@ -11,7 +11,7 @@ setLogSink((_level, line) => {
11
11
  });
12
12
  const verbose = process.argv.includes("--verbose") || process.argv.includes("-v");
13
13
  process.env.LOG_LEVEL ??= verbose ? "DEBUG" : "WARN";
14
- const { run } = await import("./run-cli-CEPB1b8j.js");
14
+ const { run } = await import("./run-cli-DanRHSxL.js");
15
15
  const code = await run(process.argv.slice(2), {
16
16
  stdout: process.stdout,
17
17
  stderr: process.stderr,
@@ -168,7 +168,7 @@ var WebSocketHandlerError = class extends h("WebSocketHandlerError") {
168
168
  //#endregion
169
169
  //#region src/entrypoints/cli/version.ts
170
170
  /** Package version. Source is `package.json`. */
171
- const VERSION = "0.1.3";
171
+ const VERSION = "0.1.4";
172
172
  //#endregion
173
173
  //#region src/entrypoints/cli/cli-error.ts
174
174
  /** Bad arguments or missing required flags. */
@@ -4186,17 +4186,23 @@ async function run(argv, io) {
4186
4186
  return reportUnexpectedCliError(io.stderr, cause);
4187
4187
  }
4188
4188
  }
4189
+ /** What a bug report needs: version, runtime, platform, and which relay this machine is paired with. */
4190
+ async function versionReport(config) {
4191
+ const stored = await createPairingResources(config).credentials.read();
4192
+ const pairing = stored === null ? "not paired" : `paired with ${new URL(stored.baseUrl).host}`;
4193
+ return [`porte ${VERSION} · node ${process.versions.node} · ${process.platform} ${process.arch}`, pairing].join("\n");
4194
+ }
4189
4195
  async function dispatch(argv, io) {
4190
4196
  const command = parseCommand(argv);
4191
4197
  if (command.kind === "help") {
4192
4198
  io.stdout.write(`${command.text}\n`);
4193
4199
  return 0;
4194
4200
  }
4201
+ const config = loadConfig(io.env);
4195
4202
  if (command.kind === "version") {
4196
- io.stdout.write(`${VERSION}\n`);
4203
+ io.stdout.write(`${await versionReport(config)}\n`);
4197
4204
  return 0;
4198
4205
  }
4199
- const config = loadConfig(io.env);
4200
4206
  if (command.kind === "up") {
4201
4207
  await runUpCommand({
4202
4208
  config,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@porte/cli",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "description": "Run your local Grok sessions from your phone. The daemon that pairs a machine with useporte.dev.",
6
6
  "keywords": [
7
7
  "acp",