@devness/useai 0.5.47 → 0.5.48

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/dist/index.js +19 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -684,7 +684,7 @@ var VERSION;
684
684
  var init_version = __esm({
685
685
  "../shared/dist/constants/version.js"() {
686
686
  "use strict";
687
- VERSION = "0.5.47";
687
+ VERSION = "0.5.48";
688
688
  }
689
689
  });
690
690
 
@@ -5535,13 +5535,28 @@ import { existsSync as existsSync2 } from "fs";
5535
5535
  import { join as join2 } from "path";
5536
5536
  import { homedir as homedir2 } from "os";
5537
5537
  function resolveNpxPath() {
5538
- const whichCmd = isWindows ? "where npx" : "which npx";
5538
+ const whichCmd = isWindows ? "where npx.cmd" : "which npx";
5539
5539
  try {
5540
5540
  const result = execSync(whichCmd, { stdio: ["pipe", "pipe", "ignore"], encoding: "utf-8" }).trim();
5541
5541
  if (result)
5542
5542
  return result.split("\n")[0].trim();
5543
5543
  } catch {
5544
5544
  }
5545
+ if (isWindows) {
5546
+ try {
5547
+ const result = execSync("where npx", { stdio: ["pipe", "pipe", "ignore"], encoding: "utf-8" }).trim();
5548
+ if (result) {
5549
+ const first = result.split("\n")[0].trim();
5550
+ if (!first.toLowerCase().endsWith(".cmd")) {
5551
+ const cmdPath = first + ".cmd";
5552
+ if (existsSync2(cmdPath))
5553
+ return cmdPath;
5554
+ }
5555
+ return first;
5556
+ }
5557
+ } catch {
5558
+ }
5559
+ }
5545
5560
  if (!isWindows && process.env["SHELL"]) {
5546
5561
  try {
5547
5562
  const result = execSync(`${process.env["SHELL"]} -lc "which npx"`, {
@@ -5721,7 +5736,8 @@ async function ensureDaemon(options) {
5721
5736
  npxArgs.push("@devness/useai@latest", "daemon", "--port", String(DAEMON_PORT));
5722
5737
  const child = spawn(npxPath, npxArgs, {
5723
5738
  detached: true,
5724
- stdio: "ignore"
5739
+ stdio: "ignore",
5740
+ shell: process.platform === "win32"
5725
5741
  });
5726
5742
  child.unref();
5727
5743
  const start = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.5.47",
3
+ "version": "0.5.48",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",