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.
This commit updates the extension of the 'shared' file from .ts to .tsx in the registry.json file. The update ensures that the 'shared' file correctly points to a TypeScript JSX file within the React package.
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.
A new attribute "shared" has been added to the 'registry.json' file in the React package. This attribute contains the URL to the shared TypeScript module for components.
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.
We have moved the vercel.json file to the root directory to standardize the project structure and improve the efficiency of referencing the file in our code.
A new file called registry.json has been created in the public react package. This file maps each component to its specific TypeScript file, acting as a repository for components like Button, Checkbox, Dialog, Input and others.
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.
Improved the format and type handling in the react/shared.tsx file. This includes adjustments to how variants are handled and formatted, enhancing type consistency and declarations. Also, ordinary parameters are given trailing commas as per the enhanced coding standards.
The typescript version was upgraded from 5.3.2 to 5.4.5 in the react package.json and yarn.lock files. This update will introduce any new features and fixes from the latest typescript version.
The fix ensures that the calculation of the 'movement' value in the Drawer component doesn't result in a negative number. The division by 'dragState.delta' is now divided by the absolute value to prevent faulty calculations.