@kubbisec/naus 1.0.29 → 1.0.31

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/naus.js +12 -10
  2. package/package.json +5 -5
package/bin/naus.js CHANGED
@@ -28,6 +28,9 @@ if (!packageName) {
28
28
 
29
29
  const binaryName = process.platform === "win32" ? "naus.exe" : "naus";
30
30
 
31
+ /** @type {string[]} */
32
+ const scopedParts = packageName.split("/");
33
+
31
34
  let binaryPath = null;
32
35
 
33
36
  try {
@@ -42,16 +45,11 @@ try {
42
45
  }
43
46
 
44
47
  if (!binaryPath) {
48
+ // Optional dep may be missing, or layout may differ; never pass `packageName`
49
+ // as a single path segment (breaks scoped names → .../@kubbisec/@kubbisec/...).
45
50
  const globalSearchPaths = [
46
- path.resolve(__dirname, "..", "..", packageName, "bin", binaryName),
47
- path.resolve(
48
- __dirname,
49
- "..",
50
- "node_modules",
51
- packageName,
52
- "bin",
53
- binaryName
54
- ),
51
+ path.resolve(__dirname, "..", "node_modules", ...scopedParts, "bin", binaryName),
52
+ path.resolve(__dirname, "..", "..", "..", ...scopedParts, "bin", binaryName),
55
53
  ];
56
54
  for (const candidate of globalSearchPaths) {
57
55
  if (fs.existsSync(candidate)) {
@@ -65,7 +63,11 @@ if (!binaryPath) {
65
63
  console.error(
66
64
  `[naus] Native binary not found for ${process.platform}/${process.arch}.\n` +
67
65
  `Expected package: ${packageName}\n` +
68
- `Try reinstalling: npm install -g @kubbisec/naus`
66
+ `Install the platform binary (optional dependency), then retry:\n` +
67
+ ` npm install -g ${packageName}\n` +
68
+ `Or reinstall the meta package including optional deps:\n` +
69
+ ` npm install -g @kubbisec/naus --include=optional\n` +
70
+ `If optional installs are disabled globally, run: npm config delete omit`
69
71
  );
70
72
  process.exit(1);
71
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubbisec/naus",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "KubbiSec Naus CI/CD Runner — install globally, run anywhere",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -12,10 +12,10 @@
12
12
  "LICENSE"
13
13
  ],
14
14
  "optionalDependencies": {
15
- "@kubbisec/naus-linux-x64": "1.0.29",
16
- "@kubbisec/naus-linux-arm64": "1.0.29",
17
- "@kubbisec/naus-darwin-arm64": "1.0.29",
18
- "@kubbisec/naus-win32-x64": "1.0.29"
15
+ "@kubbisec/naus-linux-x64": "1.0.31",
16
+ "@kubbisec/naus-linux-arm64": "1.0.31",
17
+ "@kubbisec/naus-darwin-arm64": "1.0.31",
18
+ "@kubbisec/naus-win32-x64": "1.0.31"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=18"