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
6 changes: 6 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Palette's Journal - Critical Learnings

## 2025-12-29 - [CLI UI Constraints]

**Learning:** Visual verification of CLI output requires reliable build environments; when builds are fragile, rely on existing libraries like `Rainbow` for styling but double-check their availability in the target module.
**Action:** Always verify dependencies in `Package.swift` before adding imports, especially in environments where running the build is difficult.
33 changes: 26 additions & 7 deletions Sources/ExFig/Subcommands/checkForUpdate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import ArgumentParser
import FigmaAPI
import Foundation
import Logging
import Rainbow

func checkForUpdate(logger: Logger) async {
let client = GitHubClient()
Expand All @@ -12,13 +13,31 @@ func checkForUpdate(logger: Logger) async {
let latestVersion = latestRelease.tagName

if ExFigCommand.version != latestVersion {
logger.info("""
if TTYDetector.colorsEnabled {
let border = "──────────────────────────────────────────────────────────────"

----------------------------------------------------------------------------
exfig \(latestVersion) is available. You are on \(ExFigCommand.version).
You should use the latest version.
To update, visit https://github.com/alexey1312/ExFig/releases
----------------------------------------------------------------------------
""")
let message = """

\("╭\(border)".cyan)
\("│".cyan)
\("│".cyan) \("🚀 Update Available: \(latestVersion)".bold.green)
\("│".cyan) Current version: \(ExFigCommand.version)
\("│".cyan)
\("│".cyan) To update, visit:
\("│".cyan) \("https://github.com/alexey1312/ExFig/releases".blue.underline)
\("│".cyan)
\("╰\(border)".cyan)
"""
logger.info(Logger.Message(stringLiteral: message))
} else {
logger.info("""

----------------------------------------------------------------------------
exfig \(latestVersion) is available. You are on \(ExFigCommand.version).
You should use the latest version.
To update, visit https://github.com/alexey1312/ExFig/releases
----------------------------------------------------------------------------
""")
}
}
}
1 change: 1 addition & 0 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading