Skip to content

Releases: mateusmed/custom-menu-cli

v4.0.0 - Enhanced Action Management & Recursion Depth Validation

16 Dec 18:29

Choose a tag to compare

Release Notes

This release delivers substantial internal improvements, stronger validation, and new automation capabilities, making custom menus more robust, easier to maintain, and significantly more powerful for scripting and automation workflows.

Key Changes

  • Command-Line Execution of Custom Actions (Automation Support)
    You can now execute sequences of custom actions directly from the command line, bypassing the interactive menu. This enables seamless integration with scripts, CI pipelines, and automated workflows, reducing manual interaction and improving productivity.
    Example:
    custom-menu-cli --menu=<path-to-menu> --actions=<action_id_1>,<action_id_2>,...

  • Unified Action Execution Architecture
    The core action execution logic has been refactored and consolidated. Previously separate modules (actionExecutor.js, actionSequencer.js, actions.js) are now merged into a single, cohesive module: actionRunner.js. This simplifies the codebase, improves maintainability, and makes future extensions easier and safer.

  • Enhanced Dependency Validation with Recursion Depth Protection
    The dependency validation system has been fully reworked. It now includes recursion depth checks to proactively detect and prevent excessively deep or problematic custom action chains. This greatly reduces the risk of infinite loops and improves overall system stability in complex menu configurations.

  • Improved Error Diagnostics
    Recursion-related errors now provide clearer, more actionable messages, including the execution path that led to the issue, making debugging faster and more straightforward.

  • Codebase Cleanup
    Redundant files were removed, and internal references were updated to reflect the new architecture, resulting in a cleaner and more consistent internal structure.

These changes provide a more reliable, efficient, and developer-friendly experience when building and managing custom CLI menus, with added flexibility for automation and advanced workflows.

Folder-based Menu Generation & Robust Validation

18 Aug 21:07

Choose a tag to compare

Summary of Modifications for @custom-menu-cli (Version 3.0.0)

This release introduces significant enhancements to the @custom-menu-cli tool, focusing on improved menu generation flexibility, robust validation, and better user feedback.

Key Changes:

  1. Folder-based Menu Generation:

    • The CLI now supports generating menus from a structured folder containing JSON files. Users can pass a directory path as an argument (e.g., custom-menu-cli ./my_menu_folder).
    • The tool recursively reads all valid .json files within the specified folder and its subdirectories.
    • Directories are automatically converted into navigation type menu options, allowing for intuitive nested menu structures.
    • This feature significantly enhances menu organization and modularity, moving away from a single monolithic menu.json file.
  2. Robust Menu Validation:

    • Comprehensive validation has been added to ensure that each parsed JSON menu option adheres to the expected structure and data types.
    • Validation checks include the presence and correctness of fields like id, name, type, command (for action types), and idList (for custom-action types).
    • Error messages for validation failures are now clear, descriptive, and in English, guiding the user to identify and fix issues in their JSON files.
    • The core validation logic has been isolated into a new, dedicated file (src/menuValidator.js) for better code organization.
  3. Version Update:

    • The project version has been incremented to 3.0.0 to reflect these major new features and improvements.
  4. Enhanced Test Structure:

    • An elaborate test_menus directory has been created within the project to serve as a comprehensive example and testing ground for the new folder-based menu generation and validation
      capabilities. This structure mirrors the README.md example, showcasing nested navigation and various action types.

These updates make @custom-menu-cli a more powerful, user-friendly, and maintainable tool for generating interactive terminal menus.

Release 2.0.1 - Enhanced Menu Flexibility and Security

09 Jul 12:32

Choose a tag to compare

Release 2.0.1 - Enhanced Menu Flexibility and Security

This version introduces significant improvements to the custom-action functionality, allowing for greater flexibility in creating complex workflows while ensuring application security.

New Features and Improvements:

  • Nested custom-action Support: It is now possible to reference one custom-action within another. This enables the creation of more sophisticated and reusable command chains, simplifying
    the organization of your menu.json.
  • Recursion Depth Limit (3 Levels): To ensure stability and prevent infinite recursion, a depth limit of 3 levels has been implemented for nested custom-action calls.
  • Updated Documentation: The README.md and README-pt.md files have been updated with clear examples of the new nested custom-action structure, making it easier to understand and utilize
    the new functionalities.

custom-menu-v1.0.4

08 Jul 17:36

Choose a tag to compare

Release v1.0.3 - Executables & CommonJS Refactor

This release brings significant architectural updates, focusing on portability and ease of distribution. custom-menu-cli now generates standalone executables for Linux, macOS, and
Windows, allowing you to run the tool without needing Node.js installed.

✨ Highlights

  • Standalone Executables: Run the CLI on any machine, even without Node.js, thanks to pkg integration.
  • Versioned Builds: Executables are now named with the package version (e.g., custom-menu-v1.0.3-linux).
  • Updated Documentation: The README now clearly explains how to use the tool via executables, global NPM install, or programmatic require.

🛠️ Technical Changes

  • CommonJS Migration: The entire codebase was converted from ES Modules (import) to CommonJS (require) for pkg compatibility.
  • Dependency Adjustments: chalk and inquirer were downgraded to CommonJS-compatible versions to fix build errors.
  • pkg is now a devDependency.

⚠️ BREAKING CHANGE

If you use custom-menu-cli programmatically, update your import syntax:

Before (ESM):

1 import { runCli } from 'custom-menu-cli';

Now (CommonJS):

1 const { runCli } = require('custom-menu-cli');