@curdx/flow 1.1.2 → 1.1.3

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/cli/utils.js +13 -4
  2. package/package.json +1 -1
package/cli/utils.js CHANGED
@@ -5,8 +5,17 @@
5
5
 
6
6
  import { spawn, spawnSync } from "node:child_process";
7
7
  import { createInterface } from "node:readline";
8
-
9
- export const VERSION = "1.1.1";
8
+ import { readFileSync } from "node:fs";
9
+ import { fileURLToPath } from "node:url";
10
+ import { dirname, join } from "node:path";
11
+
12
+ // Read version dynamically from package.json so `curdx-flow --version` always
13
+ // reflects the installed package version (avoids drift after npm version bumps).
14
+ const __dirname = dirname(fileURLToPath(import.meta.url));
15
+ const pkgJson = JSON.parse(
16
+ readFileSync(join(__dirname, "..", "package.json"), "utf-8")
17
+ );
18
+ export const VERSION = pkgJson.version;
10
19
 
11
20
  // ---------- Color helpers (no chalk dep) ----------
12
21
  const isTTY = process.stdout.isTTY && process.env.TERM !== "dumb";
@@ -238,8 +247,8 @@ export function pluginCacheDir(pluginName = "curdx-flow", marketplace = "curdx-f
238
247
  // detection + self-healing: create a symlink to the user-level bun install
239
248
  // in a PATH-visible directory.
240
249
 
241
- import { existsSync, mkdirSync, symlinkSync, lstatSync, unlinkSync, readlinkSync } from "node:fs";
242
- import { join } from "node:path";
250
+ import { mkdirSync, symlinkSync, lstatSync, unlinkSync, readlinkSync } from "node:fs";
251
+ // `existsSync` and `join` already imported at the top of this file.
243
252
 
244
253
  const HOME = process.env.HOME || "";
245
254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "CLI installer for CurDX-Flow — AI engineering workflow meta-framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {