@vwork/cli 0.1.4 → 0.1.5

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.
@@ -18,7 +18,7 @@ import { renderJson, renderTable } from "./output.js";
18
18
  import { runQueueCommand } from "./queues.js";
19
19
  import { runRuntimeCommand } from "./runtime.js";
20
20
  import { runSecretCommand } from "./secrets.js";
21
- const COMMAND_ROOTS = new Set(["apps", "db", "migrations", "functions", "codegen", "secrets", "kv", "queues", "runtime", "observability", "login", "whoami"]);
21
+ const COMMAND_ROOTS = new Set(["apps", "db", "migrations", "functions", "codegen", "secrets", "kv", "queues", "runtime", "observability", "login", "whoami", "version"]);
22
22
  export class VWorkCliCommand extends Command {
23
23
  static description = "Manage VWork apps, database rows, migrations, and functions.";
24
24
  static strict = false;
@@ -102,6 +102,10 @@ export class VWorkCliCommand extends Command {
102
102
  this.log(helpText());
103
103
  return;
104
104
  }
105
+ if (command.path[0] === "version") {
106
+ this.log(packageVersion());
107
+ return;
108
+ }
105
109
  if (command.path[0] === "login") {
106
110
  const config = resolveCliConfigFromFlags(command.flags, process.env, process.cwd());
107
111
  const root = process.env.VWORK_HOME ?? join(homedir(), ".vwork");
@@ -253,6 +257,12 @@ function helpText() {
253
257
  " observability access-logs",
254
258
  " login authenticate with VWork",
255
259
  " whoami show the authenticated VWork user",
260
+ " version show CLI version",
261
+ "",
262
+ "Version:",
263
+ " vwork --version",
264
+ " vwork -v",
265
+ " vwork version",
256
266
  ""
257
267
  ].join("\n");
258
268
  }
@@ -335,6 +345,9 @@ function resourceHelpText(resource) {
335
345
  ],
336
346
  whoami: [
337
347
  "whoami"
348
+ ],
349
+ version: [
350
+ "version"
338
351
  ]
339
352
  };
340
353
  const resourceCommands = commands[resource];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vwork/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/*.js",