Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/cli-fix-hook-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@astryxdesign/cli': patch
---

[fix] The documented `hook` example referenced `useToggle`, which is not a hook in the design system — running it failed with `ERR_UNKNOWN_HOOK`. It now uses `useFocusTrap`.

This shipped in two places a consumer sees: `astryx manifest --json`, which agents read to learn the CLI, and the `hook` CommandDoc that feeds `--help`. Replaced in both.
@josephfarina
2 changes: 1 addition & 1 deletion packages/cli/clients/cli/commands/hook.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const doc = {
],
examples: [
{label: 'Browse the catalog', cli: 'astryx hook --list'},
{label: 'One hook as JSON', cli: 'astryx hook useToggle --json'},
{label: 'One hook as JSON', cli: 'astryx hook useFocusTrap --json'},
],
exitCodes: [
{code: 0, when: 'success'},
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/clients/cli/lib/manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const EXAMPLES = {
build: ['astryx build', 'astryx build "analytics dashboard" --json'],
swizzle: ['astryx swizzle XDSButton'],
template: ['astryx template --json', 'astryx template dashboard ./src/app'],
hook: ['astryx hook', 'astryx hook useToggle --json'],
hook: ['astryx hook', 'astryx hook useFocusTrap --json'],
'theme build': [
'astryx theme build ./src/themes/ocean.ts --out ./dist/ocean.css',
'astryx theme build ./src/themes/ocean.ts --check',
Expand Down
Loading