CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-nodeenv

tessl install tessl/pypi-nodeenv@1.9.0

Node.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%

task.mdevals/scenario-3/

Node Environment Setup Tool

A Python-based tool that automates the creation of Node.js virtual environments for multiple project configurations.

Capabilities

Environment Creation

Creates isolated Node.js environments with specified configurations.

  • Creates an environment at the path "test_env" with the latest Node.js version and npm enabled @test
  • Creates an environment at the path "custom_env" with Node.js version "16.20.0" @test

Environment Validation

Validates that created environments have the correct structure and contain expected executables.

  • Verifies that the environment directory exists and contains the appropriate bin directory (Unix) or Scripts directory (Windows) @test
  • Verifies that the node executable exists and is accessible in the created environment @test

Implementation

@generates

API

def create_node_env(target_dir, node_version='latest', with_npm=True):
    """
    Create a Node.js virtual environment.

    Parameters:
    target_dir (str): Path where the environment should be created
    node_version (str): Node.js version to install (default: 'latest')
    with_npm (bool): Whether to install npm (default: True)

    Returns:
    str: Absolute path to the created environment directory

    Raises:
    Exception: If environment creation fails
    """
    pass

def verify_environment(env_dir):
    """
    Verify that a Node.js environment was created successfully.

    Parameters:
    env_dir (str): Path to the environment directory

    Returns:
    dict: Dictionary containing 'exists' (bool), 'has_bin_dir' (bool),
          and 'has_node' (bool) to indicate validation results
    """
    pass

Dependencies { .dependencies }

nodeenv { .dependency }

Provides Node.js virtual environment creation capabilities.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/nodeenv@1.9.x
tile.json