The shared file extension has been updated from .ts to .tsx in the path constants and the default configuration within the CLI package. This change aligns with our efforts to standardize the file types across the project.
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.
Modified the 'loadConfig' method to support '.cjs' and '.mjs' config files. Also, a 'changeExtension' function is added to helpers/path.ts to manipulate file extensions. An error will be thrown if a specified user config file is not found. The application defaults to the default config file if no user config file is provided.
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.
The validateConfig function in the cli module has been updated to include logging. The logs show the locations where the component and shared module will be installed, as well as the import path for the shared module.
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.
A new field "shared" has been added to the Registry interface within the const.ts file located in the cli package. This extends the existing interface to hold more diverse data.
The commit removes the unnecessary "@oclif/plugin-plugins" from the plugin list within the cli's package.json file. This refactor enhances the code cleanliness, and potentially improves the cli performance by reducing the number of plugins loaded at runtime.
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 removes deprecated dependencies from the CLI and updates the yarn.lock file to reflect these changes. It also adds new dependencies that are needed for the project. The dependencies removed are "@types/mocha", "ansi-colors", "browser-stdout", "camelcase", "chokidar", "cliui", "debug", "decamelize", "diff", "find-up", "flat", "glob", "he", and "is-plain-obj". The dependencies added include "@types/treeify", "cli-cursor", "emoji-regex", "is-interactive", "is-unicode-supported",
This commit introduces configuration and path management functionality in the CLI by adding the helper functions to load and validate configuration. It also provides the logic to retrieve available components from a given registry. Additionally, it exposes these functionalities in public API.
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.