@wonderwhy-er/desktop-commander 0.2.18-alpha.10 → 0.2.18-alpha.11

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.
@@ -276,12 +276,27 @@ function getPackageSpec() {
276
276
 
277
277
  // Function to determine execution context
278
278
  function getExecutionContext() {
279
+ const debugFile = '/tmp/dc-setup-debug.log';
280
+ try {
281
+ appendFileSync(debugFile, `\n=== getExecutionContext ===\n`);
282
+ appendFileSync(debugFile, `process.env.npm_lifecycle_event: ${process.env.npm_lifecycle_event}\n`);
283
+ appendFileSync(debugFile, `process.env.npm_execpath: ${process.env.npm_execpath}\n`);
284
+ appendFileSync(debugFile, `process.env._: ${process.env._}\n`);
285
+ appendFileSync(debugFile, `import.meta.url: ${import.meta.url}\n`);
286
+ appendFileSync(debugFile, `__dirname: ${__dirname}\n`);
287
+ } catch (e) { /* ignore */ }
288
+
279
289
  // Check if running from npx
280
290
  const isNpx = process.env.npm_lifecycle_event === 'npx' ||
281
291
  process.env.npm_execpath?.includes('npx') ||
282
292
  process.env._?.includes('npx') ||
283
293
  import.meta.url.includes('node_modules');
284
294
 
295
+ try {
296
+ appendFileSync(debugFile, `isNpx: ${isNpx}\n`);
297
+ appendFileSync(debugFile, `======================\n\n`);
298
+ } catch (e) { /* ignore */ }
299
+
285
300
  // Check if installed globally
286
301
  const isGlobal = process.env.npm_config_global === 'true' ||
287
302
  process.argv[1]?.includes('node_modules/.bin');
@@ -290,6 +305,7 @@ function getExecutionContext() {
290
305
  const isNpmScript = !!process.env.npm_lifecycle_script;
291
306
 
292
307
  return {
308
+ isNpx,
293
309
  runMethod: isNpx ? 'npx' : (isGlobal ? 'global' : (isNpmScript ? 'npm_script' : 'direct')),
294
310
  isCI: !!process.env.CI || !!process.env.GITHUB_ACTIONS || !!process.env.TRAVIS || !!process.env.CIRCLECI,
295
311
  shell: detectShell()
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.2.18-alpha.10";
1
+ export declare const VERSION = "0.2.18-alpha.11";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.18-alpha.10';
1
+ export const VERSION = '0.2.18-alpha.11';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderwhy-er/desktop-commander",
3
- "version": "0.2.18-alpha.10",
3
+ "version": "0.2.18-alpha.11",
4
4
  "description": "MCP server for terminal operations and file editing",
5
5
  "mcpName": "io.github.wonderwhy-er/desktop-commander",
6
6
  "license": "MIT",