tessl install tessl/pypi-nodeenv@1.9.0Node.js virtual environment builder for creating isolated Node.js environments
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
64%
A library that determines the correct Node.js binary download URL and package name based on system architecture and platform information.
@generates
def get_platform_string(system: str, machine: str) -> str:
"""
Returns the platform string for Node.js binary selection.
Args:
system: Operating system name (e.g., 'Linux', 'Darwin', 'Windows')
machine: Machine architecture (e.g., 'x86_64', 'arm64', 'i686')
Returns:
Platform string in format 'system-arch' (e.g., 'linux-x64', 'darwin-arm64')
"""
pass
def map_architecture(machine: str) -> str:
"""
Maps machine architecture identifier to Node.js architecture naming.
Handles case-insensitive matching.
Args:
machine: Machine architecture identifier
Returns:
Normalized architecture string (e.g., 'x64', 'arm64', 'armv7l')
"""
pass
def construct_binary_url(version: str, platform: str) -> str:
"""
Constructs the download URL for a Node.js binary.
Args:
version: Node.js version string (e.g., 'v18.0.0')
platform: Platform string (e.g., 'linux-x64')
Returns:
Complete download URL for the binary tarball
"""
pass
def select_architecture_with_fallback(preferred_arch: str, available_architectures: list) -> str:
"""
Selects architecture with fallback logic (e.g., ARM64 -> x64).
Args:
preferred_arch: Preferred architecture (e.g., 'arm64')
available_architectures: List of available architectures for the version
Returns:
Selected architecture string, falling back to 'x64' if preferred unavailable
"""
passProvides Node.js virtual environment management and architecture detection capabilities.
@satisfied-by