openfix-cli 0.4.0 → 0.5.0

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/README.md CHANGED
@@ -20,7 +20,8 @@ uv), so you need one of those installed. Python users can skip it:
20
20
  pip install "openfix-cli[all]"
21
21
  ```
22
22
 
23
- Set `OPENFIX_SPEC` to pin a version, for example `OPENFIX_SPEC="openfix-cli[all]==0.4.0"`.
23
+ Each version of this package runs the same version of OpenFix, so `npx openfix-cli@X.Y.Z` runs OpenFix X.Y.Z.
24
+ Set `OPENFIX_SPEC` to run something else, for example `OPENFIX_SPEC="openfix-cli[all]>=0.4"`.
24
25
 
25
26
  - Site: <https://openfix.dev>
26
27
  - Docs and source: <https://github.com/markusweldon/openfix>
package/bin/openfix.js CHANGED
@@ -1,9 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  // Runs the OpenFix CLI, which is a Python package (openfix-cli on PyPI), through uvx or pipx.
3
3
  // Every argument is passed through unchanged, and the exit code is OpenFix's.
4
+ // It runs the OpenFix release with this package's version, so `npx openfix-cli@X` always runs OpenFix X.
4
5
  import { spawn, spawnSync } from "node:child_process";
6
+ import { readFileSync } from "node:fs";
5
7
 
6
- const SPEC = process.env.OPENFIX_SPEC || "openfix-cli[all]";
8
+ const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
9
+ const SPEC = process.env.OPENFIX_SPEC || `openfix-cli[all]==${version}`;
7
10
  const args = process.argv.slice(2);
8
11
 
9
12
  const has = (cmd) => spawnSync(cmd, ["--version"], { stdio: "ignore", shell: process.platform === "win32" }).status === 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfix-cli",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Turn scanner findings into verified fixes, with any model, under your policy. Runs the OpenFix CLI through uvx or pipx.",
5
5
  "keywords": [
6
6
  "security",