fizzy-cli 0.7.0 → 0.9.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.
Files changed (137) hide show
  1. package/docs/API.md +63 -2
  2. package/package.json +2 -1
  3. package/.github/workflows/release.yml +0 -29
  4. package/.github/workflows/tests.yml +0 -24
  5. package/AGENTS.md +0 -33
  6. package/CHANGELOG.md +0 -168
  7. package/Makefile +0 -43
  8. package/bin/fizzy +0 -0
  9. package/cmd/account.go +0 -14
  10. package/cmd/account_list.go +0 -44
  11. package/cmd/account_list_test.go +0 -118
  12. package/cmd/board.go +0 -49
  13. package/cmd/board_create.go +0 -59
  14. package/cmd/board_create_test.go +0 -141
  15. package/cmd/board_delete.go +0 -40
  16. package/cmd/board_delete_test.go +0 -121
  17. package/cmd/board_list.go +0 -44
  18. package/cmd/board_list_test.go +0 -115
  19. package/cmd/board_show.go +0 -40
  20. package/cmd/board_show_test.go +0 -113
  21. package/cmd/board_test.go +0 -92
  22. package/cmd/board_update.go +0 -72
  23. package/cmd/board_update_test.go +0 -233
  24. package/cmd/card.go +0 -24
  25. package/cmd/card_assign.go +0 -55
  26. package/cmd/card_assign_test.go +0 -130
  27. package/cmd/card_close.go +0 -46
  28. package/cmd/card_close_test.go +0 -92
  29. package/cmd/card_create.go +0 -72
  30. package/cmd/card_create_test.go +0 -186
  31. package/cmd/card_delete.go +0 -46
  32. package/cmd/card_delete_test.go +0 -92
  33. package/cmd/card_golden.go +0 -46
  34. package/cmd/card_golden_test.go +0 -92
  35. package/cmd/card_list.go +0 -53
  36. package/cmd/card_list_test.go +0 -148
  37. package/cmd/card_not_now.go +0 -46
  38. package/cmd/card_not_now_test.go +0 -92
  39. package/cmd/card_reopen.go +0 -46
  40. package/cmd/card_reopen_test.go +0 -92
  41. package/cmd/card_show.go +0 -46
  42. package/cmd/card_show_test.go +0 -92
  43. package/cmd/card_tag.go +0 -51
  44. package/cmd/card_tag_test.go +0 -112
  45. package/cmd/card_triage.go +0 -46
  46. package/cmd/card_ungolden.go +0 -46
  47. package/cmd/card_ungolden_test.go +0 -92
  48. package/cmd/card_untriage.go +0 -46
  49. package/cmd/card_untriage_test.go +0 -92
  50. package/cmd/card_unwatch.go +0 -46
  51. package/cmd/card_unwatch_test.go +0 -92
  52. package/cmd/card_update.go +0 -82
  53. package/cmd/card_update_test.go +0 -149
  54. package/cmd/card_watch.go +0 -46
  55. package/cmd/card_watch_test.go +0 -92
  56. package/cmd/column.go +0 -14
  57. package/cmd/column_create.go +0 -79
  58. package/cmd/column_create_test.go +0 -178
  59. package/cmd/column_delete.go +0 -40
  60. package/cmd/column_delete_test.go +0 -121
  61. package/cmd/column_list.go +0 -44
  62. package/cmd/column_list_test.go +0 -138
  63. package/cmd/column_show.go +0 -40
  64. package/cmd/column_show_test.go +0 -111
  65. package/cmd/column_update.go +0 -67
  66. package/cmd/column_update_test.go +0 -198
  67. package/cmd/comment.go +0 -14
  68. package/cmd/comment_create.go +0 -51
  69. package/cmd/comment_create_test.go +0 -129
  70. package/cmd/comment_delete.go +0 -46
  71. package/cmd/comment_delete_test.go +0 -92
  72. package/cmd/comment_list.go +0 -51
  73. package/cmd/comment_list_test.go +0 -132
  74. package/cmd/comment_show.go +0 -46
  75. package/cmd/comment_show_test.go +0 -104
  76. package/cmd/comment_update.go +0 -51
  77. package/cmd/comment_update_test.go +0 -130
  78. package/cmd/login.go +0 -81
  79. package/cmd/login_test.go +0 -98
  80. package/cmd/notification.go +0 -14
  81. package/cmd/notification_list.go +0 -69
  82. package/cmd/notification_list_test.go +0 -288
  83. package/cmd/notification_read.go +0 -51
  84. package/cmd/notification_read_all.go +0 -38
  85. package/cmd/notification_read_all_test.go +0 -75
  86. package/cmd/notification_read_test.go +0 -138
  87. package/cmd/notification_unread.go +0 -44
  88. package/cmd/notification_unread_test.go +0 -99
  89. package/cmd/reaction.go +0 -13
  90. package/cmd/reaction_create.go +0 -46
  91. package/cmd/reaction_create_test.go +0 -113
  92. package/cmd/reaction_delete.go +0 -46
  93. package/cmd/reaction_delete_test.go +0 -92
  94. package/cmd/reaction_list.go +0 -51
  95. package/cmd/reaction_list_test.go +0 -125
  96. package/cmd/root.go +0 -38
  97. package/cmd/step.go +0 -14
  98. package/cmd/step_create.go +0 -53
  99. package/cmd/step_create_test.go +0 -171
  100. package/cmd/step_delete.go +0 -46
  101. package/cmd/step_delete_test.go +0 -92
  102. package/cmd/step_update.go +0 -66
  103. package/cmd/step_update_test.go +0 -190
  104. package/cmd/tag.go +0 -15
  105. package/cmd/tag_list.go +0 -47
  106. package/cmd/tag_list_test.go +0 -109
  107. package/cmd/use.go +0 -85
  108. package/cmd/use_test.go +0 -186
  109. package/go.mod +0 -31
  110. package/go.sum +0 -53
  111. package/internal/api/boards.go +0 -93
  112. package/internal/api/cards.go +0 -288
  113. package/internal/api/client.go +0 -99
  114. package/internal/api/columns.go +0 -113
  115. package/internal/api/comments.go +0 -108
  116. package/internal/api/identity.go +0 -24
  117. package/internal/api/notifications.go +0 -89
  118. package/internal/api/reactions.go +0 -69
  119. package/internal/api/steps.go +0 -101
  120. package/internal/api/tags.go +0 -24
  121. package/internal/api/types.go +0 -190
  122. package/internal/app/app.go +0 -49
  123. package/internal/colors/colors.go +0 -32
  124. package/internal/config/config.go +0 -70
  125. package/internal/testutil/client.go +0 -26
  126. package/internal/ui/account_list.go +0 -14
  127. package/internal/ui/account_selector.go +0 -63
  128. package/internal/ui/board_list.go +0 -14
  129. package/internal/ui/board_show.go +0 -17
  130. package/internal/ui/card_list.go +0 -14
  131. package/internal/ui/card_show.go +0 -23
  132. package/internal/ui/column_list.go +0 -28
  133. package/internal/ui/column_show.go +0 -16
  134. package/internal/ui/comment_list.go +0 -25
  135. package/internal/ui/format.go +0 -27
  136. package/internal/ui/notification_list.go +0 -27
  137. package/internal/ui/reaction_list.go +0 -14
@@ -1,63 +0,0 @@
1
- // Package ui
2
- package ui
3
-
4
- import (
5
- "fmt"
6
-
7
- tea "github.com/charmbracelet/bubbletea"
8
- "github.com/rogeriopvl/fizzy/internal/api"
9
- )
10
-
11
- type accountModel struct {
12
- accounts []api.Account
13
- cursor int
14
- }
15
-
16
- func (m accountModel) Init() tea.Cmd {
17
- return nil
18
- }
19
-
20
- func (m accountModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
21
- switch msg := msg.(type) {
22
- case tea.KeyMsg:
23
- switch msg.String() {
24
- case "ctrl+c", "q":
25
- return m, tea.Quit
26
- case "up", "k":
27
- if m.cursor > 0 {
28
- m.cursor--
29
- }
30
- case "down", "j":
31
- if m.cursor < len(m.accounts)-1 {
32
- m.cursor++
33
- }
34
- case "enter":
35
- return m, tea.Quit
36
- }
37
- }
38
- return m, nil
39
- }
40
-
41
- func (m accountModel) View() string {
42
- s := "Select an account:\n\n"
43
- for i, account := range m.accounts {
44
- cursor := " "
45
- if i == m.cursor {
46
- cursor = "> "
47
- }
48
- s += fmt.Sprintf("%s%s (%s)\n", cursor, account.Name, account.Slug)
49
- }
50
- s += "\nUse ↑/↓ or k/j to navigate, Enter to select, q to quit"
51
- return s
52
- }
53
-
54
- func SelectAccount(accounts []api.Account) (api.Account, error) {
55
- m := accountModel{accounts: accounts, cursor: 0}
56
- p, err := tea.NewProgram(m).Run()
57
- if err != nil {
58
- return api.Account{}, err
59
- }
60
-
61
- finalModel := p.(accountModel)
62
- return finalModel.accounts[finalModel.cursor], nil
63
- }
@@ -1,14 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/rogeriopvl/fizzy/internal/api"
7
- )
8
-
9
- func DisplayBoards(boards []api.Board) error {
10
- for _, board := range boards {
11
- fmt.Printf("%s (%s)\n", board.Name, DisplayID(board.ID))
12
- }
13
- return nil
14
- }
@@ -1,17 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
- "io"
6
-
7
- "github.com/rogeriopvl/fizzy/internal/api"
8
- )
9
-
10
- func DisplayBoard(w io.Writer, board *api.Board) error {
11
- fmt.Fprintf(w, "Board: %s\n", board.Name)
12
- fmt.Fprintf(w, "ID: %s\n", board.ID)
13
- fmt.Fprintf(w, "All Access: %v\n", board.AllAccess)
14
- fmt.Fprintf(w, "Created At: %s\n", FormatTime(board.CreatedAt))
15
- fmt.Fprintf(w, "Created By: %s\n", board.Creator.Name)
16
- return nil
17
- }
@@ -1,14 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/rogeriopvl/fizzy/internal/api"
7
- )
8
-
9
- func DisplayCards(cards []api.Card) error {
10
- for _, card := range cards {
11
- fmt.Printf("%d - %s\n", card.Number, card.Title)
12
- }
13
- return nil
14
- }
@@ -1,23 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/charmbracelet/lipgloss"
7
- "github.com/rogeriopvl/fizzy/internal/api"
8
- )
9
-
10
- func DisplayCard(card *api.Card) error {
11
- boldStyle := lipgloss.NewStyle().Bold(true)
12
- dimStyle := lipgloss.NewStyle().Bold(true).Faint(true)
13
- fmt.Printf("%s\n", boldStyle.Render(fmt.Sprintf("%s (#%d)", card.Title, card.Number)))
14
- fmt.Println("─────────────────────────────────────")
15
- fmt.Printf("%s %s\n", dimStyle.Render("Description:"), card.Description)
16
- fmt.Printf("%s %v\n", dimStyle.Render("Tags:"), card.Tags)
17
- fmt.Printf("%s %v\n", dimStyle.Render("Golden:"), card.Golden)
18
- fmt.Printf("%s %s\n", dimStyle.Render("Status:"), card.Status)
19
- fmt.Printf("%s %s\n", dimStyle.Render("Created:"), card.CreatedAt)
20
- fmt.Printf("%s %s\n", dimStyle.Render("Last Active:"), card.LastActiveAt)
21
- fmt.Printf("%s %s\n", dimStyle.Render("URL:"), card.URL)
22
- return nil
23
- }
@@ -1,28 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/charmbracelet/lipgloss"
7
- "github.com/rogeriopvl/fizzy/internal/api"
8
- "github.com/rogeriopvl/fizzy/internal/colors"
9
- )
10
-
11
- func DisplayColumns(columns []api.Column) error {
12
- for _, column := range columns {
13
- colorName := column.Color.Name
14
- colorDef := colors.ByName(colorName)
15
-
16
- termColor := lipgloss.Color("7") // default to white
17
- if colorDef != nil {
18
- termColor = colorDef.TermColor
19
- }
20
-
21
- styledName := lipgloss.NewStyle().
22
- Foreground(termColor).
23
- Render(column.Name)
24
-
25
- fmt.Printf("%s (%s)\n", styledName, DisplayID(column.ID))
26
- }
27
- return nil
28
- }
@@ -1,16 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
- "io"
6
-
7
- "github.com/rogeriopvl/fizzy/internal/api"
8
- )
9
-
10
- func DisplayColumn(w io.Writer, column *api.Column) error {
11
- fmt.Fprintf(w, "Column: %s\n", column.Name)
12
- fmt.Fprintf(w, "ID: %s\n", column.ID)
13
- fmt.Fprintf(w, "Color: %s (%s)\n", column.Color.Name, column.Color.Value)
14
- fmt.Fprintf(w, "Created At: %s\n", FormatTime(column.CreatedAt))
15
- return nil
16
- }
@@ -1,25 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/rogeriopvl/fizzy/internal/api"
7
- )
8
-
9
- func DisplayComments(comments []api.Comment) error {
10
- for _, comment := range comments {
11
- fmt.Printf("%s - %s (%s)\n", comment.Creator.Name, comment.Body.PlainText, DisplayID(comment.ID))
12
- }
13
- return nil
14
- }
15
-
16
- func DisplayComment(comment *api.Comment) error {
17
- fmt.Printf("Author: %s\n", comment.Creator.Name)
18
- fmt.Printf("Created: %s\n", comment.CreatedAt)
19
- if comment.UpdatedAt != comment.CreatedAt {
20
- fmt.Printf("Updated: %s\n", comment.UpdatedAt)
21
- }
22
- fmt.Printf("Card: %s\n", comment.Card.Title)
23
- fmt.Printf("\n%s\n", comment.Body.PlainText)
24
- return nil
25
- }
@@ -1,27 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "github.com/charmbracelet/lipgloss"
5
- "time"
6
- )
7
-
8
- // DisplayMeta returns a formatted metadata string with greyed out styling
9
- func DisplayMeta(label string, value string) string {
10
- return lipgloss.NewStyle().
11
- Foreground(lipgloss.Color("8")). // Grey color
12
- Render(label + ": " + value)
13
- }
14
-
15
- func DisplayID(id string) string {
16
- return DisplayMeta("id", id)
17
- }
18
-
19
- // FormatTime converts an RFC3339 timestamp string to a human-readable format.
20
- // If parsing fails, returns the original string.
21
- func FormatTime(timeStr string) string {
22
- t, err := time.Parse(time.RFC3339, timeStr)
23
- if err != nil {
24
- return timeStr
25
- }
26
- return t.Format("2006-01-02 15:04:05")
27
- }
@@ -1,27 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/rogeriopvl/fizzy/internal/api"
7
- )
8
-
9
- func DisplayNotifications(notifications []api.Notification) error {
10
- for _, notification := range notifications {
11
- fmt.Printf("%s (%s)\n", notification.Title, DisplayID(notification.ID))
12
- }
13
- return nil
14
- }
15
-
16
- func DisplayNotification(notification *api.Notification) error {
17
- status := "read"
18
- if !notification.Read {
19
- status = "unread"
20
- }
21
- fmt.Printf("%s (%s)\n", notification.Title, DisplayID(notification.ID))
22
- fmt.Printf("Status: %s\n", status)
23
- fmt.Printf("Card: %s\n", notification.Card.Title)
24
- fmt.Printf("From: %s\n", notification.Creator.Name)
25
- fmt.Printf("Message: %s\n", notification.Body)
26
- return nil
27
- }
@@ -1,14 +0,0 @@
1
- package ui
2
-
3
- import (
4
- "fmt"
5
-
6
- "github.com/rogeriopvl/fizzy/internal/api"
7
- )
8
-
9
- func DisplayReactions(reactions []api.Reaction) error {
10
- for _, reaction := range reactions {
11
- fmt.Printf("%s %s (%s)\n", reaction.Content, reaction.Reacter.Name, DisplayID(reaction.ID))
12
- }
13
- return nil
14
- }