ui-thing 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -0
- package/.prettierrc +1 -1
- package/CHANGELOG.md +32 -0
- package/bun.lock +171 -134
- package/package.json +15 -14
- package/src/commands/add.ts +9 -5
- package/src/commands/block.ts +5 -3
- package/src/commands/list.ts +48 -0
- package/src/commands/prose.ts +7 -3
- package/src/commands/remove.ts +109 -0
- package/src/commands/theme.ts +5 -14
- package/src/commands/update.ts +81 -0
- package/src/index.ts +6 -0
- package/src/utils/config.ts +9 -16
- package/src/utils/constants.ts +1 -0
- package/src/utils/fetchBlockCategories.ts +13 -11
- package/src/utils/fetchBlocks.ts +13 -11
- package/src/utils/fetchComponents.ts +13 -11
- package/src/utils/fetchProseComponents.ts +13 -11
- package/src/utils/installPackages.ts +30 -4
- package/src/utils/installValidator.ts +3 -3
- package/src/utils/logger.ts +9 -0
- package/src/utils/uiConfigPrompt.ts +3 -6
- package/tests/commands/list.test.ts +111 -0
- package/tests/commands/remove.test.ts +151 -0
- package/tests/commands/update.test.ts +127 -0
- package/tests/utils/fetchBlockCategories.test.ts +14 -2
- package/tests/utils/fetchBlocks.test.ts +14 -2
- package/tests/utils/fetchComponents.test.ts +10 -4
- package/tests/utils/fetchProseComponents.test.ts +14 -2
- package/tests/utils/installPackages.test.ts +36 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1348
- package/dist/index.js.map +0 -1
package/.prettierrc
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.3.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.2.9...v0.3.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **Deno support:** Deno is now a valid package manager choice during `init`. The CLI uses `deno add npm:<pkg>` for dependencies, `--dev` instead of `-D` for dev dependencies, and `deno run -A npm:nuxt prepare` for the post-install step ([e94c67d](https://github.com/BayBreezy/ui-thing-cli/commit/e94c67d))
|
|
10
|
+
- **`list` command:** New `ui-thing list` command displays all available components. Pass `--installed` to filter to only components whose files are already present in your project ([fdf5784](https://github.com/BayBreezy/ui-thing-cli/commit/fdf5784))
|
|
11
|
+
- **`update` command:** New `ui-thing update [names...]` command re-fetches component files from the API and overwrites them in place. Omit names to pick from a list of installed components ([c1ee7ab](https://github.com/BayBreezy/ui-thing-cli/commit/c1ee7ab))
|
|
12
|
+
- **`remove` command:** New `ui-thing remove [names...]` command deletes installed component files (including utils and composables). Omit names to pick from a list of installed components. Prompts for confirmation before deleting ([653d897](https://github.com/BayBreezy/ui-thing-cli/commit/653d897))
|
|
13
|
+
- **Docs links after install:** After successfully installing a component via `add` or `prose`, the CLI now prints the documentation URL so you can jump straight to the component docs ([7f85822](https://github.com/BayBreezy/ui-thing-cli/commit/7f85822))
|
|
14
|
+
|
|
15
|
+
### 🩹 Fixes
|
|
16
|
+
|
|
17
|
+
- **`bun` and `pnpm` add command:** Both package managers were incorrectly using `install` instead of `add` when installing component dependencies. This is now fixed ([e94c67d](https://github.com/BayBreezy/ui-thing-cli/commit/e94c67d))
|
|
18
|
+
- **Exit codes:** Error paths (missing config file, incomplete configuration) now correctly exit with code `1` instead of `0`, making the CLI usable in CI pipelines ([dfea222](https://github.com/BayBreezy/ui-thing-cli/commit/dfea222))
|
|
19
|
+
- **`spawnSync` exit status:** The `prose` and `block` commands now check `result.status !== 0` in addition to `result.error`, so a failed component installer script no longer silently passes ([a9e92ff](https://github.com/BayBreezy/ui-thing-cli/commit/a9e92ff))
|
|
20
|
+
- **API error handling:** All four fetch utilities (`fetchComponents`, `fetchProseComponents`, `fetchBlocks`, `fetchBlockCategories`) now catch network errors and print a clear message instead of crashing with an unhandled rejection ([78b1070](https://github.com/BayBreezy/ui-thing-cli/commit/78b1070))
|
|
21
|
+
- **`.npmrc` safe merge (pnpm):** When using pnpm, the CLI previously overwrote `.npmrc` entirely. It now reads the existing file and only appends the lines that are not already present ([9a6af69](https://github.com/BayBreezy/ui-thing-cli/commit/9a6af69))
|
|
22
|
+
|
|
23
|
+
### 💅 Refactors
|
|
24
|
+
|
|
25
|
+
- **Centralized logger:** All ad-hoc `console.log(kleur...)` calls have been replaced with a new `logger` utility (`src/utils/logger.ts`) that wraps consola. This gives consistent formatting across every command and makes it easy to redirect output in the future ([748650b](https://github.com/BayBreezy/ui-thing-cli/commit/748650b))
|
|
26
|
+
|
|
27
|
+
### 🏡 Chore
|
|
28
|
+
|
|
29
|
+
- Update all dependencies to latest versions ([8799650](https://github.com/BayBreezy/ui-thing-cli/commit/8799650))
|
|
30
|
+
|
|
31
|
+
### ❤️ Contributors
|
|
32
|
+
|
|
33
|
+
- Behon Baker ([@BayBreezy](https://github.com/BayBreezy))
|
|
34
|
+
|
|
3
35
|
## v0.2.9
|
|
4
36
|
|
|
5
37
|
[compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.2.8...v0.2.9)
|