@yuhan1124/draw-prompt 0.4.5 → 0.4.6

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/SKILL.md CHANGED
@@ -8,7 +8,7 @@ description: >-
8
8
  画图的指令"、"优化我的出图 prompt"、"按我的风格生成 prompt",或在用 GPT Image 2 /
9
9
  gpt-image-2 出图前需要一段精准提示词时,使用本 skill。
10
10
  metadata:
11
- version: 0.4.5
11
+ version: 0.4.6
12
12
  openclaw:
13
13
  anyBins: ["uv", "python3"]
14
14
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuhan1124/draw-prompt",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Convert natural-language image requests into high-quality gpt-image-2 prompts and Codex handoff blocks.",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -136,7 +136,7 @@ def ensure_home() -> None:
136
136
 
137
137
 
138
138
  SCHEMA_VERSION = 1
139
- COMPILER_VERSION = "0.4.5"
139
+ COMPILER_VERSION = "0.4.6"
140
140
 
141
141
 
142
142
  PACKAGED_SKILL_FILES = [
@@ -5572,26 +5572,23 @@ def cmd_install_skill(args: argparse.Namespace) -> int:
5572
5572
  # --------------------------------------------------------------------------- #
5573
5573
  # status
5574
5574
  # --------------------------------------------------------------------------- #
5575
- def npm_registry_status() -> str:
5575
+ def find_npm_binary() -> str:
5576
5576
  npm = which("npm")
5577
- if not npm:
5578
- try:
5579
- probe = subprocess.run(
5580
- ["/bin/zsh", "-lic", "command -v npm"],
5581
- text=True,
5582
- capture_output=True,
5583
- check=False,
5584
- timeout=5,
5585
- )
5586
- except Exception:
5587
- probe = None
5588
- npm = ""
5589
- if probe and probe.stdout:
5590
- for line in probe.stdout.splitlines():
5591
- candidate = line.strip()
5592
- if candidate and Path(candidate).name == "npm" and Path(candidate).exists():
5593
- npm = candidate
5594
- break
5577
+ if npm:
5578
+ return npm
5579
+ candidates = [
5580
+ Path("/opt/homebrew/bin/npm"),
5581
+ Path("/usr/local/bin/npm"),
5582
+ ]
5583
+ candidates.extend(sorted(Path.home().glob(".nvm/versions/node/*/bin/npm"), reverse=True))
5584
+ for candidate in candidates:
5585
+ if candidate.exists():
5586
+ return str(candidate)
5587
+ return ""
5588
+
5589
+
5590
+ def npm_registry_status() -> str:
5591
+ npm = find_npm_binary()
5595
5592
  if not npm:
5596
5593
  return "未找到 npm(如需 npx 安装,请确认 npm 在 PATH 中)"
5597
5594
  try: