Metadata-Version: 2.3
Name: ensure-node
Version: 0.0.0
Summary: Ensure Node.js to be installed.
Author: Kl1nge5
Author-email: Kl1nge5 <ninthseason@qq.com>
Requires-Dist: httpx>=0.28.1
Requires-Dist: tqdm>=4.67.3
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# ensure-node

`ensure-node` 是一个轻量 Python 工具库，用来确保指定版本的 Node.js 发行包就绪。

```python
from ensure_node import ensure_node
import subprocess
# 安装指定版本的 Node.js
npx, node, npm = ensure_node("https://nodejs.org/dist/latest/node-v25.8.2-win-x64.zip")
# 使用相关工具
completed_process = subprocess.run([
    str(npx),
    "--version"
], capture_output=True)
print(completed_process.stdout.decode())
```

目前仅在 Windows 平台上测试过，可能支持 Linux 平台，不支持 MacOS 平台。

只支持 .zip / .tar.gz / .tar.xz 格式的文件。
