84 Commits

Author SHA1 Message Date
de8a1129da feat(cli): make registry fetch use safeFetcher 2024-06-15 01:57:21 +09:00
b3ebcb45ee feat(cli): make getRegistry take custom branch 2024-06-15 01:45:29 +09:00
28d5f409f8 fix(cli): add url in registry fetch error message 2024-06-15 01:45:18 +09:00
7d2453b4cf feat(cli): make getRegistry take custom branch 2024-06-15 01:45:00 +09:00
c1d5c5d06b refactor(cli): make config lib path to directory pattern 2024-06-15 01:44:06 +09:00
0072836bfc feat(registry): apply new structure of registry 2024-06-15 01:43:34 +09:00
aa074d16c1 fix: add everything for eslint fix 2024-06-14 22:47:39 +09:00
bf13cf9e57 fix: add missing dependency from oclif eslint 2024-06-14 21:42:33 +09:00
Shinwoo PARK
05dc15d04e feat: bumped to 0.4.1 2024-06-13 19:55:47 +00:00
Shinwoo PARK
4523e6a419 docs: update cli docs 2024-06-13 19:55:03 +00:00
Shinwoo PARK
47160748b6 docs: add registry flag in every command 2024-06-13 19:51:36 +00:00
Shinwoo PARK
d8d61aceaa feat: add registry override flag 2024-06-13 19:43:24 +00:00
Shinwoo PARK
a966a85f62 fix: change registry url to githubusercontent 2024-06-13 19:37:44 +00:00
8e6e691308 feat: add tailwind-scrollbar dependency
Added the 'tailwind-scrollbar' dependency to the project manifest files and imported it into the Tailwind CSS configuration. This allows us to leverage the scrollbar utility features provided by 'tailwind-scrollbar'. This change is reflected in the updated yarn.lock, package.json, and tailwind.config.js files.
2024-06-11 19:31:15 +09:00
45082d4587 docs(cli): update README with latest changes
The CLI README has been updated to reflect the removal of the --forceShared flag from the available commands. Additionally, all references to the code have been updated from version 0.3.0 to version 0.4.0 to align with the current version of the application.
2024-06-11 18:11:35 +09:00
b9583a43f6 feat(cli): update version to 0.4.0
The version of the CLI for PSW/UI has been updated from 0.3.0 to 0.4.0.
2024-06-11 18:11:23 +09:00
99773f11cc refactor(cli): simplify library installation process
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.
2024-06-11 18:01:51 +09:00
89776267ad refactor(cli): remove redundant functions in registry.ts
Three functions have been removed to simplify the `registry.ts` file in the CLI package. These functions are `getComponentName`, `getComponentLibVersion`, and `getLibURL`, which are no longer required. This commit contributes to making the codebase cleaner and more maintainable.
2024-06-11 18:01:35 +09:00
dd63fcb753 refactor(cli): remove unused lib array
Deleted the unused 'lib' array from within the 'const.ts' file in the 'cli' package to clean up the codebase.
2024-06-11 17:58:50 +09:00
07d9306dde refactor(cli): update registry path and remove libVersion
Removed the 'libVersion' field from the RegistryComponent interface and updated the 'lib' path in the DEFAULT_CONFIG and 'paths' field in Registry. The 'lib' path now includes the file extension '.tsx', aiming to improve clarity and accuracy.
2024-06-11 17:53:34 +09:00
643dc6eafd feat(cli): update package version
The package version of "@psw-ui/cli" has been updated from 0.2.1 to 0.3.0.
2024-06-11 16:41:31 +09:00
7bf2578d86 docs(cli): update code reference links in README to version 0.3.0
The commit updates the README file located in the CLI package. It mainly changes the links that refer to the code of the `add`, `list`, and `search` commands. The references in those links are now pointing to the 0.3.0 version instead of the 0.2.1 version.
2024-06-11 16:40:35 +09:00
8062f02a78 refactor(cli): update import statement in add command
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.
2024-06-11 16:31:23 +09:00
fcc35223d3 refactor(cli): update shared module and import paths in config
The change includes an update to config.ts in CLI. The configuration paths for the shared module changed from 'shared' to 'lib'. Also, the import paths adjusted to reflect the path changes from 'shared' to 'lib'.
2024-06-11 15:30:23 +09:00
556556251f feat(cli): refactor add command and improve module handling
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.
2024-06-11 13:40:45 +09:00
6f5ec5042d refactor(cli): modify return type of getComponentLibVersion
Modified the return type of the function getComponentLibVersion in registry.ts. Instead of returning a string or null, it now returns an object with a boolean type 'ok' status and 'libVersion'. The 'ok' attribute indicates whether the library version is included in the registry.
2024-06-11 13:35:27 +09:00
7c3459076a feat(cli): add helper functions for registry management
This commit introduces three new async functions in the registry.ts file to assist with CLI operations. These include methods to get component names, retrieve library versions, and fetch library URLs.
2024-06-11 13:30:52 +09:00
397210462f feat(cli): update components in Registry interface
The Registry interface in the 'const.ts' file within the cli package has been updated. The 'components' property is now a record of RegistryComponent objects, which includes 'name' and 'libVersion' properties, previously it was a record of strings.
2024-06-11 13:25:36 +09:00
090fada7cd refactor(cli): update references to component name
Update the functions `getComponentURL` and `getComponentRealname` in the CLI helper `registry.ts` to access the component name through the 'name' property of each component object in the registry, instead of directly accessing the component name.
2024-06-11 13:25:23 +09:00
8a8508c8fb refactor(cli): update return value in registry helper
This commit updates the registry helper in the CLI package. It now returns the full component name from the registry, instead of only returning the last part of the component's path.
2024-06-11 13:06:06 +09:00
7a82c284fc refactor(cli): update getComponentURL function in registry helper
Change the way the component URL is formed in the getComponentURL function in the registry helper. Now, it appends the path instead of replacing it directly in the registry base.
2024-06-11 13:05:57 +09:00
fb0c33a6cb refactor(cli): update Registry interface in const.ts
The Registry interface has been refactored to include "paths" field, which is an object containing "components" and "lib" paths. Also, "lib" field is now a string array instead of a record.
2024-06-11 13:03:15 +09:00
274016035f refactor(cli): replace shared with lib in Registry
Changed the 'shared' property in the Registry interface to 'lib'. This update in 'packages/cli/src/const.ts' provides a more generic way to manage libraries with a key-value pair notation.
2024-06-11 13:00:33 +09:00
b962b02690 refactor(cli): rename shared path and import properties to lib
The commit includes an update in the cli package where we've changed the properties in paths and import objects from 'shared' to 'lib'. This refactoring also applies to the DEFAULT_CONFIG object and the configZod object, ensuring consistency across all configurations.
2024-06-11 12:52:25 +09:00
cf2675d3f1 docs(cli): update links and version in README
The links to the code for add, list, and search commands in README.md are updated to reflect the latest version of the CLI (v0.2.1). Additionally, the package version for the CLI is updated from 0.2.0-build to 0.2.1 in package.json.
2024-06-08 05:06:57 +09:00
f16a2c9564 refactor(cli): optimize SearchBox setState calls
State setting logic for SearchBox in the CLI package has been streamlined. Redundant setState calls have been eliminated while others are more appropriately placed for better state management. This refactor focuses on the selected and queryMode states. Improved handling of selection state enhances component efficiency.
2024-06-08 05:05:20 +09:00
99891c6fa3 v0.2.0-build 2024-06-08 04:41:17 +09:00
4fbb658c40 feat(cli): add prepack script
The commit introduces a "prepack" script to the CLI package's scripts within package.json. It will now run a build process before packaging.
2024-06-08 04:40:48 +09:00
3ec06170f9 v0.2.0-docs 2024-06-08 04:33:42 +09:00
86618a2628 fix(cli): update package.json meta information
This commit updates the homepage and repository URLs in the package.json file for the cli package. It also cleans up some unnecessary scripts in the "scripts" block.
2024-06-08 04:33:07 +09:00
f6acfc9380 feat(cli): update to version 0.2.0 and add search command
This update upgrades the version of the cli package from 0.1.0 to 0.2.0. It also includes the addition of a new "search" command in the CLI readme documentation. Link to relevant source code has also been updated.
2024-06-08 04:17:44 +09:00
0c79f86d80 refactor(cli): streamline component selection and overwrite process
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.
2024-06-08 04:10:13 +09:00
ec9dfb9f40 feat(cli): migrate add command to react and implement search functionality
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.
2024-06-08 03:53:15 +09:00
ae018f5176 feat(cli): add Choice component
This commit includes the addition of a new component, Choice, that presents two options yes or no to the user. The user can interact with this component using the up and down arrow keys. Based on this selection, different actions can be submitted. The feature also supports unicode if the environment supports it.
2024-06-08 03:52:56 +09:00
12b1d530c4 refactor(cli): change onSubmit typing in SearchBox
The onSubmit function typing in the SearchBox component was changed from handling a string to handling a generic T type object. Also, the onSubmit function now uses the found item in components based on the selected suggestion to submit instead of submitting directly.
2024-06-08 02:51:27 +09:00
62e606f273 fix(cli): update dependencies in SearchBox useEffect
The dependencies array in the useEffect hook within SearchBox.tsx has been updated. The 'suggestions' variable has been added to the dependencies to ensure the function updates accordingly when this state changes.
2024-06-08 02:46:23 +09:00
483930474b feat(cli): add query mode to SearchBox component
Added a new stateful variable, 'queryMode', to the 'SearchBox' component in the CLI to enhance its functionality. As a result, 'Input' and suggestion fetching are now conditioned by this mode, providing more controled user search management and interaction with the autocomplete feature.
2024-06-08 02:15:08 +09:00
f4b79f1f02 refactor(cli): adjust SearchBox styling
Decreased the marginRight property from 2 to 1 in the SearchBox component of the CLI to improve layout. Also modified the placeholder text in the Input field for better readability.
2024-06-08 02:08:44 +09:00
0fea1a50e3 fix(cli): update condition in SearchBox component
This commit modifies a conditional statement in the SearchBox component to properly manage the selected index based on the length of search results. This ensures appropriate selection even when the result length is less than or equal to the selected index.
2024-06-08 02:08:26 +09:00
803659a06b refactor(cli): remove unused Spinner import
The unnecessary Spinner import from 'ink-spinner' was removed in the SearchBox component. This reduces clutter and enhances code readability.
2024-06-08 02:05:21 +09:00