deveco-mcp-server 0.1.14 → 0.1.15

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/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -37,9 +37,15 @@ function isOfficialChannelInvocation() {
37
37
  const forwardTarget = isOfficialChannelInvocation()
38
38
  ? NEW_PACKAGE_LATEST_SPEC
39
39
  : NEW_PACKAGE_BETA_SPEC;
40
- const args = ['-y', forwardTarget, ...process.argv.slice(2)];
40
+ const passthroughArgs = process.argv.slice(2);
41
+ const npmExecPath = process.env.npm_execpath;
41
42
 
42
- const child = spawn(npxCommand, args, {
43
+ const command = npmExecPath ? process.execPath : npxCommand;
44
+ const args = npmExecPath
45
+ ? [npmExecPath, 'exec', '--yes', forwardTarget, '--', ...passthroughArgs]
46
+ : ['-y', forwardTarget, ...passthroughArgs];
47
+
48
+ const child = spawn(command, args, {
43
49
  stdio: 'inherit',
44
50
  env: { ...process.env }
45
51
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deveco-mcp-server",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "NPM wrapper for deveco-mcp-server - HarmonyOS development MCP server with platform-specific binaries",
5
5
  "keywords": [
6
6
  "mcp",