kicad-mcp-pro 1.0.0 → 3.5.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.
package/README.md CHANGED
@@ -10,5 +10,5 @@ Thin npm launcher for the `kicad-mcp-pro` Python package.
10
10
  The wrapper resolves the Python package version from `KICAD_MCP_PRO_PYPI_VERSION` or from this package version.
11
11
 
12
12
  ```bash
13
- npx kicad-mcp-pro@1.0.0 --help
13
+ npx kicad-mcp-pro@3.5.2 --help
14
14
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kicad-mcp-pro",
3
- "version": "1.0.0",
3
+ "version": "3.5.2",
4
4
  "description": "npm wrapper for the KiCad MCP Pro Python package.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://oaslananka.github.io/kicad-studio-kit",
@@ -13,40 +13,56 @@ const result = spawnSync(process.execPath, [wrapperPath, "--help"], {
13
13
  windowsHide: true,
14
14
  });
15
15
 
16
- if (result.stdout) {
17
- process.stdout.write(result.stdout);
18
- }
16
+ function writeChildOutput() {
17
+ if (result.stdout) {
18
+ process.stdout.write(result.stdout);
19
+ }
19
20
 
20
- if (result.stderr) {
21
- process.stderr.write(result.stderr);
21
+ if (result.stderr) {
22
+ process.stderr.write(result.stderr);
23
+ }
22
24
  }
23
25
 
24
26
  if (result.error) {
25
- console.error(`Failed to execute npm launcher smoke: ${result.error.message}`);
27
+ console.error(
28
+ `Failed to execute npm launcher smoke: ${result.error.message}`,
29
+ );
26
30
  process.exit(1);
27
31
  }
28
32
 
29
33
  if (result.signal) {
30
- console.error(`npm launcher smoke was interrupted by signal ${result.signal}.`);
34
+ console.error(
35
+ `npm launcher smoke was interrupted by signal ${result.signal}.`,
36
+ );
31
37
  process.exit(1);
32
38
  }
33
39
 
34
40
  if (result.status === 0) {
41
+ writeChildOutput();
35
42
  process.exit(0);
36
43
  }
37
44
 
38
- const knownPrepublishFailure =
39
- result.stderr.includes("uvx was not found on PATH.") ||
40
- result.stderr.includes("Publish the matching Python package before publishing this npm wrapper");
45
+ const uvxMissing = result.stderr.includes("uvx was not found on PATH.");
46
+ const pythonPackageUnavailable = result.stderr.includes(
47
+ "Publish the matching Python package before publishing this npm wrapper",
48
+ );
49
+ const knownPrepublishFailure = uvxMissing || pythonPackageUnavailable;
41
50
 
42
51
  if (!knownPrepublishFailure) {
43
- console.error(`npm launcher smoke failed with unexpected exit code ${result.status ?? 1}.`);
52
+ writeChildOutput();
53
+ console.error(
54
+ `npm launcher smoke failed with unexpected exit code ${result.status ?? 1}.`,
55
+ );
44
56
  process.exit(result.status ?? 1);
45
57
  }
46
58
 
59
+ const reason = uvxMissing
60
+ ? "uvx is not available on PATH"
61
+ : "the matching Python package is not available yet";
62
+
47
63
  console.error(
48
64
  [
49
- "npm launcher smoke completed with a non-zero wrapper exit.",
65
+ `npm launcher smoke skipped: ${reason}.`,
50
66
  "This is tolerated during repository builds because the matching Python package",
51
67
  "may not be published yet. The wrapper itself still exits non-zero for users.",
52
68
  ].join("\n"),