16 Commits

Author SHA1 Message Date
2d68a5051f feat(cli): add ability to make dir component URL in getComponentURL 2024-06-15 02:30:29 +09:00
f6d2e2335d refactor(cli): safeFetcher return response instead of json 2024-06-15 01:59:10 +09:00
de8a1129da feat(cli): make registry fetch use safeFetcher 2024-06-15 01:57:21 +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
aa074d16c1 fix: add everything for eslint fix 2024-06-14 22:47:39 +09:00
Shinwoo PARK
d8d61aceaa feat: add registry override flag 2024-06-13 19:43:24 +00: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
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
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
5f50d1d8f6 feat(cli): add realname resolution for components
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.
2024-06-07 00:48:14 +09:00
acca348e1e feat(cli): handle registry fetching errors
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.
2024-06-07 00:11:01 +09:00
c59c80007a feat(cli): add configuration and path management functionality
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.
2024-06-06 22:07:19 +09:00