@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 +1 -1
- package/package.json +1 -1
- package/scripts/prompt_cli.py +17 -20
package/SKILL.md
CHANGED
package/package.json
CHANGED
package/scripts/prompt_cli.py
CHANGED
|
@@ -136,7 +136,7 @@ def ensure_home() -> None:
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
SCHEMA_VERSION = 1
|
|
139
|
-
COMPILER_VERSION = "0.4.
|
|
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
|
|
5575
|
+
def find_npm_binary() -> str:
|
|
5576
5576
|
npm = which("npm")
|
|
5577
|
-
if
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
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:
|