diff --git a/.github/workflows/orders-ci.yml b/.github/workflows/orders-ci.yml index 3a78323..a7f513d 100644 --- a/.github/workflows/orders-ci.yml +++ b/.github/workflows/orders-ci.yml @@ -18,10 +18,12 @@ jobs: check: runs-on: ubuntu-latest container: - image: ghcr.io/frantic1048/blend:0.2.14@sha256:21d9000745aafebf02633d88f06a728d4a0e9c1fae4603add67047646b64489e + image: ghcr.io/frantic1048/blend:0.2.15@sha256:8a67c80e66bae598818a1b648c01921dd70c748f48fc5c9d52da0506461cdad9 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - run: blend --version + - name: Check orders run: blend check diff --git a/orders/blend/order.ncl b/orders/blend/order.ncl index cd0bd69..cc102b7 100644 --- a/orders/blend/order.ncl +++ b/orders/blend/order.ncl @@ -1,12 +1,7 @@ -let { Order, .. } = import "../order.contract.ncl" in +let { Order, BlendOrder, .. } = import "../order.contract.ncl" in { blend = { prefix = ["~/.config/blend/"], - ignore = [ - # This points to the local checkout location. Most people do not need to - # persist changes to it in their dotfile repo; remove this ignore if you - # intentionally keep blend at a stable path such as ~/dotfiles. - ], files = [ { name = "config.toml", @@ -16,4 +11,4 @@ let { Order, .. } = import "../order.contract.ncl" in }, ], }, -} | Order +} | Order | BlendOrder diff --git a/orders/order.contract.ncl b/orders/order.contract.ncl index 564ba92..68a73d1 100644 --- a/orders/order.contract.ncl +++ b/orders/order.contract.ncl @@ -3,7 +3,7 @@ # Regenerate with: blend init (or any sync run). { - contract_version = 2, + contract_version = 3, Format = std.contract.from_predicate (fun x => std.is_string x && @@ -28,7 +28,7 @@ from_config | Dyn | optional, # Inline structured config data prefix | Array String | optional, # Destination prefixes (overrides global) format | Format | optional, # Override format (inferred from name if omitted) - ignore | Array String | optional, # Keys to exclude from diff + ignore | Array String | optional, # Legacy compatibility; prefer resolution primitives when | WhenCondition | optional, # Per-file condition symlink | Bool | optional, # Create symlink instead of copying (from_file only) exclude | Array String | optional, # Glob patterns to skip in from_file directories @@ -40,7 +40,11 @@ files | Array FileEntry | optional, prefix | Array String | optional, # Default prefix for all files when | WhenCondition | optional, # Global condition - ignore | Array String | optional, # Global ignore keys + ignore | Array String | optional, # Legacy compatibility; prefer resolution primitives + with_target_only | default | not_exported = fun policy value => + let selected_policy = policy in + let selected_value = value in + 'BlendTargetOnly { resolver = selected_policy, value = selected_value }, }, Order = { diff --git a/orders/starship/order.ncl b/orders/starship/order.ncl index 1909110..523e430 100644 --- a/orders/starship/order.ncl +++ b/orders/starship/order.ncl @@ -1,4 +1,4 @@ -# Kitty terminal configuration +# Starship prompt configuration let { Order, .. } = import "../order.contract.ncl" in { blend = { @@ -6,117 +6,34 @@ let { Order, .. } = import "../order.contract.ncl" in files = [ { name = "starship.toml", - format = "space_pair_lines", - from_config = [ - [ - "format", - "= \"\"\"", - ], - [ - "$directory\\", - "", - ], - [ - "$git_branch\\", - "", - ], - [ - "$git_status\\", - "", - ], - [ - "$php\\", - "", - ], - [ - "$nodejs\\", - "", - ], - [ - "$docker_context\\", - "", - ], - [ - "$cmd_duration\\", - "", - ], - [ - "$line_break\\", - "", - ], - [ - "$character\"\"\"", - "", - ], - [ - "[directory]", - "", - ], - [ - "truncation_length", - "= 3", - ], - [ - "truncate_to_repo", - "= true", - ], - [ - "[git_branch]", - "", - ], - [ - "format", - "= \"[$symbol$branch(:$remote_branch)]($style) \"", - ], - [ - "[git_status]", - "", - ], - [ - "format", - "= '([\\[$all_status$ahead_behind\\]]($style) )'", - ], - [ - "[php]", - "", - ], - [ - "format", - "= \"[$symbol($version)]($style) \"", - ], - [ - "[nodejs]", - "", - ], - [ - "format", - "= \"[$symbol($version)]($style) \"", - ], - [ - "detect_extensions", - "= []", - ], - [ - "[cmd_duration]", - "", - ], - [ - "min_time", - "= 2_000", - ], - [ - "[character]", - "", - ], - [ - "success_symbol", - "= \"[>](bold green)\"", - ], - [ - "error_symbol", - "= \"[>](bold red)\"", - ], - ], + format = "toml", + from_config = { + format = "$directory$git_branch$git_status$php$nodejs$docker_context$cmd_duration$line_break$character", + directory = { + truncation_length = 3, + truncate_to_repo = true, + }, + git_branch = { + format = "[$symbol$branch(:$remote_branch)]($style) ", + }, + git_status = { + format = "([\\[$all_status$ahead_behind\\]]($style) )", + }, + php = { + format = "[$symbol($version)]($style) ", + }, + nodejs = { + format = "[$symbol($version)]($style) ", + detect_extensions = [], + }, + cmd_duration = { + min_time = 2000, + }, + character = { + success_symbol = "[>](bold green)", + error_symbol = "[>](bold red)", + }, + }, }, ], when = { os = ["darwin", "linux"] }, diff --git a/orders/vscode/order.ncl b/orders/vscode/order.ncl index f718b9e..80034b9 100644 --- a/orders/vscode/order.ncl +++ b/orders/vscode/order.ncl @@ -14,15 +14,15 @@ let { Order, .. } = import "../order.contract.ncl" in { name = "settings.json", format = "jsonc", - # These settings are not suitable for sync. - ignore = [ - "window.zoomLevel", - "workbench.colorTheme", - "workbench.iconTheme", - "playwright.env", - "chat.commandCenter.enabled", - ], from_config = { + # Keep these machine-local settings in Target without syncing them back. + # Missing settings stay absent on a new machine. + "window.zoomLevel" = 'Unmanaged, + "workbench.colorTheme" = 'Unmanaged, + "workbench.iconTheme" = 'Unmanaged, + "playwright.env" = 'Unmanaged, + "chat.commandCenter.enabled" = 'Unmanaged, + # Editor settings # JetBrains Mono # https://github.com/JetBrains/JetBrainsMono/wiki/OpenType-features