code-guardrails 0.3.1 → 0.3.2

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/bin/guardrails +5 -1
  2. package/package.json +6 -6
package/bin/guardrails CHANGED
@@ -34,7 +34,11 @@ function getBinaryPath() {
34
34
  const binaryName = process.platform === "win32" ? "guardrails.exe" : "guardrails";
35
35
 
36
36
  try {
37
- return require.resolve(path.join(pkg, binaryName));
37
+ // Resolve from the package's node_modules, not the script's location
38
+ const pkgDir = path.resolve(__dirname, "..");
39
+ return require.resolve(path.join(pkg, binaryName), {
40
+ paths: [pkgDir, path.join(pkgDir, "node_modules"), ...require.resolve.paths(pkg) || []],
41
+ });
38
42
  } catch {
39
43
  console.error(
40
44
  `Could not find the binary for ${pkg}.\n` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-guardrails",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Enforce architectural decisions AI coding tools keep ignoring",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,11 +14,11 @@
14
14
  "bin/guardrails"
15
15
  ],
16
16
  "optionalDependencies": {
17
- "code-guardrails-darwin-arm64": "0.3.1",
18
- "code-guardrails-darwin-x64": "0.3.1",
19
- "code-guardrails-linux-x64": "0.3.1",
20
- "code-guardrails-linux-arm64": "0.3.1",
21
- "code-guardrails-win32-x64": "0.3.1"
17
+ "code-guardrails-darwin-arm64": "0.3.2",
18
+ "code-guardrails-darwin-x64": "0.3.2",
19
+ "code-guardrails-linux-x64": "0.3.2",
20
+ "code-guardrails-linux-arm64": "0.3.2",
21
+ "code-guardrails-win32-x64": "0.3.2"
22
22
  },
23
23
  "keywords": [
24
24
  "linter",