Module utils

Module utils 

Source
Expand description

Shared utilities for command implementations.

This module provides common functionality used across multiple commands:

  • Path resolution and validation
  • Configuration loading and merging
  • Directory cleaning operations
  • Entry point validation
  • Package manager detection

Enums§

PackageManager
Detect which package manager is being used in a project.

Functions§

clean_output_dir
Clean an output directory by removing all its contents.
ensure_output_dir
Ensure an output directory exists, creating it if necessary.
find_package_json
Walks up the directory tree to find the nearest package.json.
get_cwd
Get the current working directory.
resolve_path
Resolve a path relative to a working directory.
resolve_project_root
Resolves the project root directory using smart auto-detection.
validate_entry
Validate that an entry point file exists.