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 Python script that creates Node.js virtual environments with configurable network resilience settings for unreliable or restricted network conditions.
Your script must create Node.js virtual environments with support for custom network configurations. The script should handle scenarios where network connections are unreliable or where corporate firewalls and proxies restrict access to standard Node.js download sources.
Create a Python script setup_node_env.py that accepts the following command-line arguments:
--env-dir DIR - Directory path where the Node.js environment should be created (required)--node-version VERSION - Node.js version to install (e.g., "18.0.0", "latest", "lts")--mirror URL - Alternative mirror URL for downloading Node.js packages--ignore-ssl - Flag to bypass SSL certificate verification (for corporate proxies)--requirements FILE - Path to a requirements file containing npm packages to installThe script must properly configure the environment creation to:
@generates
#!/usr/bin/env python
"""
Node environment setup script with network resilience features.
"""
import argparse
import sys
def parse_arguments():
"""
Parse command-line arguments for environment setup.
Returns:
argparse.Namespace: Parsed arguments
"""
pass
def create_node_environment(env_dir, node_version=None, mirror=None,
ignore_ssl=False, requirements=None):
"""
Create a Node.js virtual environment with custom network settings.
Args:
env_dir (str): Directory path for the environment
node_version (str): Node.js version to install
mirror (str): Alternative mirror URL
ignore_ssl (bool): Whether to ignore SSL certificate verification
requirements (str): Path to npm requirements file
Returns:
bool: True if successful, False otherwise
"""
pass
def main():
"""
Main entry point for the script.
"""
pass
if __name__ == "__main__":
main()Provides Node.js virtual environment creation and management capabilities.
@satisfied-by