Consolidated the process of installing the library in the "add" command. Simplified the path handling by using the dirname function. Also, the shared-file version dependent part has been removed. Library installation is now based on a singular registry url path instead of component specific versions.
The import statement in the add.tsx file of the CLI package has been updated to use the correct library name and version. This change ensures accurate reference to shared libraries, leading to better stability and interoperability.
Import additional helper methods in add.tsx. Remove forceShared flag as it could potentially break components. Instead of planning for a shared module, this commit plans for version-specific libraries, which exist in a separate lib folder. This ensures that the right version of the library required by the component is installed. Also, handle potential errors related to absence of lib version in the registry. Fixed component installation path.
Refactored the 'cli add' command to streamline the process of component selection and the decision to overwrite an already installed one. The task has been split into two separate interactive choices to enhance the user experience and simplify the codebase. The force option is now also evaluated separately which results in cleaner code.
Renamed 'add.ts' to 'add.tsx' and converted it to a React component. This change includes implementing search functionality through installed components and handling the case if the component is already installed. Added search options and overwriting prompt in CLI interface.
Changed the 'components' prop passed to 'SearchBox' in 'search.tsx' to have 'key' and 'displayName' properties instead of simple component names. This refactoring aims to better align with the expected prop structure.
The search command in the CLI is enhanced to recognize search queries as command arguments. An improved interaction with the search box is also introduced, including key event handlers for up and down arrows and escape key, allowing users to navigate more intuitively. keyboard-based selection of suggestions is now implemented and the helper message is updated to match these interaction changes.
A new command has been added to the CLI package to search for components. This command fetches the registry and lists accessible components through the SearchBox component. The SearchBox component has also been updated to show a helper text and a new styled border for better user interaction.
This change includes normalization of user input for component name by converting it to lowercase during the installation process. This is done to ensure that component names are not case sensitive and that any input will match the existing component names in the registry.
The update enhances the CLI functionality by introducing the realname resolution for components. This is done in the 'list.ts' file, through a new helper function 'getComponentRealName' that is called whenever list of installed components is required. This ensures the correct identifiers are always considered, regardless of them being aliases or actual names.
The commit removes the default path for config in the CLI 'list' command. This change improves flexibility by allowing the user to define their own path without overriding the default one.
Replaced direct log reference in validateConfig function calls with an anonymous function that logs a message. This change has been made in the add and list commands of the CLI package to ensure proper logging.
This commit introduces a new command 'add' to the CLI. The 'add' command allows users to add a component to the project with options for custom configurations, and it performs validation checks to ensure the component exists in the registry before installing.
This commit adds error handling for fetching operations from the registry in the CLI 'list' command. Now, any failure in retrieving the registry results in a failed spinner with a clear descriptive message, thus making the failure more apparent to the user.
This adds a new 'list' command in the CLI package to print all available components in the registry as well as components installed in the project. This command includes additional options to include component file URL and specify a custom path to the config file.
This commit deletes all template commands and related tests from the CLI package. The template command implementation and its associated tests have been fully removed to make way for new feature implementation.