@weaxs/openclaw-stock-analysis 0.1.6 → 0.1.7

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/dist/index.js CHANGED
@@ -4438,12 +4438,13 @@ var here = dirname(fileURLToPath(import.meta.url));
4438
4438
  var toolsDir = existsSync(join(here, "tools")) ? join(here, "tools") : join(here, "..", "tools");
4439
4439
  var repoRoot = dirname(toolsDir);
4440
4440
  var isWin = process.platform === "win32";
4441
- var venvPython = join(repoRoot, ".venv", isWin ? "Scripts" : "bin", "python3");
4442
- var parentVenvPython = join(repoRoot, "..", ".venv", isWin ? "Scripts" : "bin", "python3");
4441
+ var venvBin = join(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
4442
+ var venvPython = join(repoRoot, venvBin);
4443
+ var parentVenvPython = join(repoRoot, "..", venvBin);
4443
4444
  function pythonBin() {
4444
4445
  if (existsSync(venvPython)) return venvPython;
4445
4446
  if (existsSync(parentVenvPython)) return parentVenvPython;
4446
- return "python3";
4447
+ return isWin ? "python" : "python3";
4447
4448
  }
4448
4449
  async function runPy(script, args) {
4449
4450
  return executor(pythonBin(), [join(toolsDir, script), ...args]);
package/index.ts CHANGED
@@ -27,15 +27,18 @@ const toolsDir = existsSync(join(here, "tools"))
27
27
  : join(here, "..", "tools");
28
28
  const repoRoot = dirname(toolsDir);
29
29
  const isWin = process.platform === "win32";
30
- const venvPython = join(repoRoot, ".venv", isWin ? "Scripts" : "bin", "python3");
30
+ // Windows venvs ship Scripts/python.exe (there is no python3); POSIX venvs ship bin/python3.
31
+ const venvBin = join(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
32
+ const venvPython = join(repoRoot, venvBin);
31
33
  // Staged-payload layout (openclaw/tools present in a dev checkout): the venv
32
34
  // still lives at the repo root one level up.
33
- const parentVenvPython = join(repoRoot, "..", ".venv", isWin ? "Scripts" : "bin", "python3");
35
+ const parentVenvPython = join(repoRoot, "..", venvBin);
34
36
 
35
37
  function pythonBin(): string {
36
38
  if (existsSync(venvPython)) return venvPython;
37
39
  if (existsSync(parentVenvPython)) return parentVenvPython;
38
- return "python3";
40
+ // On Windows "python3" is usually the Microsoft Store stub — prefer "python".
41
+ return isWin ? "python" : "python3";
39
42
  }
40
43
 
41
44
  async function runPy(script: string, args: string[]): Promise<string> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weaxs/openclaw-stock-analysis",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "OpenClaw plugin for stock analysis, screening, and strategy backtesting across A/HK/US/JP/KR/TW markets",
5
5
  "type": "module",
6
6
  "main": "./index.ts",