@flowapt/flowiq-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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowapt/flowiq-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Command-line tool for FlowIQ staff: round-trip agent prompts, questionnaires, webhooks, and more without ever touching service-role credentials.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -2,6 +2,9 @@
2
2
  // commander dispatches to src/commands/* based on argv.
3
3
 
4
4
  import { Command } from "commander";
5
+ import { readFileSync } from "node:fs";
6
+ import { fileURLToPath } from "node:url";
7
+ import path from "node:path";
5
8
  import * as authCmd from "./commands/auth.js";
6
9
  import * as promptsCmd from "./commands/prompts.js";
7
10
  import * as questionnairesCmd from "./commands/questionnaires.js";
@@ -10,12 +13,18 @@ import * as fineTuningCmd from "./commands/fine-tuning.js";
10
13
  import * as messagingWebhooksCmd from "./commands/messaging-webhooks.js";
11
14
  import * as webhooksCmd from "./commands/webhooks.js";
12
15
 
16
+ // Read version from package.json so it stays in sync with the published npm
17
+ // version automatically (single source of truth — bumping package.json on each
18
+ // `npm version patch` / `npm publish` is enough).
19
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
20
+ const pkg = JSON.parse(readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
21
+
13
22
  export function run(argv) {
14
23
  const program = new Command();
15
24
  program
16
25
  .name("flowiq")
17
26
  .description("FlowIQ staff CLI — round-trip agent prompts, webhooks, and more, without service-role credentials.")
18
- .version("0.1.0");
27
+ .version(pkg.version);
19
28
 
20
29
  // auth
21
30
  const auth = program.command("auth").description("Manage CLI authentication");