reelforge 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,9 +4,14 @@
4
4
  * Every leaf command supports `--help`. Sub-groups (e.g. `reelforge llm`) print
5
5
  * a list of their sub-commands when invoked without arguments OR with `--help`.
6
6
  */
7
+ import { readFileSync } from "node:fs";
8
+ import { fileURLToPath } from "node:url";
9
+ import path from "node:path";
7
10
  import { Command } from "commander";
8
11
  import { setServer, setApiKey } from "./client.js";
9
12
  import { setOutputOptions } from "./utils/output.js";
13
+ const pkgPath = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json");
14
+ const pkgVersion = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
10
15
  import { registerAuth } from "./commands/auth.js";
11
16
  import { registerCreate } from "./commands/create.js";
12
17
  import { registerLlm } from "./commands/llm.js";
@@ -39,7 +44,7 @@ program
39
44
  "",
40
45
  "Run `reelforge <command> --help` for sub-command details, e.g. `reelforge llm chat --help`.",
41
46
  ].join("\n"))
42
- .version("0.1.0", "-v, --version", "show CLI version")
47
+ .version(pkgVersion, "-v, --version", "show CLI version")
43
48
  .helpOption("-h, --help", "show help")
44
49
  .addHelpCommand("help [command]", "show help for a command")
45
50
  .showHelpAfterError("(use `reelforge <command> --help` to see usage)")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reelforge",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI for ReelForge Studio — AI video engine. Every REST API exposed as a command, with --help on every level.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",