@promptctl/cc-candybar 1.56.0 → 1.56.2
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/README.md +1 -1
- package/dist/index.mjs +115 -114
- package/package.json +5 -5
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/bin/preview.sh +118 -255
- package/plugin/commands/candybar.md +112 -246
- package/plugin/templates/config.json +8 -0
- package/plugin/templates/nerd-fonts-sample.txt +5 -3
- package/plugin/templates/config-essential.json +0 -36
- package/plugin/templates/config-full.json +0 -55
- package/plugin/templates/config-standard.json +0 -39
- package/plugin/templates/config-tui-compact.json +0 -48
- package/plugin/templates/config-tui-full.json +0 -89
- package/plugin/templates/config-tui-standard.json +0 -56
- package/plugin/templates/config-tui.json +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptctl/cc-candybar",
|
|
3
|
-
"version": "1.56.
|
|
3
|
+
"version": "1.56.2",
|
|
4
4
|
"description": "Statusline renderer for Claude Code — a JSON5-configurable DSL with daemon-cached data sources, byte-clean palette-aware composition, and OSC8 click verbs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"mobx": "^6.15.0"
|
|
91
91
|
},
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@promptctl/cc-candybar-darwin-arm64": "1.56.
|
|
94
|
-
"@promptctl/cc-candybar-darwin-x64": "1.56.
|
|
95
|
-
"@promptctl/cc-candybar-linux-x64": "1.56.
|
|
96
|
-
"@promptctl/cc-candybar-linux-arm64": "1.56.
|
|
93
|
+
"@promptctl/cc-candybar-darwin-arm64": "1.56.2",
|
|
94
|
+
"@promptctl/cc-candybar-darwin-x64": "1.56.2",
|
|
95
|
+
"@promptctl/cc-candybar-linux-x64": "1.56.2",
|
|
96
|
+
"@promptctl/cc-candybar-linux-arm64": "1.56.2"
|
|
97
97
|
}
|
|
98
98
|
}
|
package/plugin/bin/preview.sh
CHANGED
|
@@ -1,305 +1,168 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Render the wizard's template config against a fixture session so the user can
|
|
3
|
+
# see a real bar before committing to a theme, style, charset, or preset.
|
|
4
|
+
#
|
|
5
|
+
# The config rendered here IS the template the wizard writes — templates/config.json
|
|
6
|
+
# with its four placeholders filled by the same substitution the wizard performs —
|
|
7
|
+
# so the preview cannot drift from what the wizard installs.
|
|
8
|
+
# (test/plugin-templates.test.ts drives every name below through `cc-candybar check`.)
|
|
2
9
|
|
|
3
10
|
set -euo pipefail
|
|
4
11
|
|
|
5
12
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
13
|
readonly SCRIPT_DIR
|
|
7
14
|
readonly PLUGIN_ROOT="${SCRIPT_DIR}/.."
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
git -C "${fake_repo}" checkout -b feat/my-feature --quiet 2>/dev/null
|
|
29
|
-
touch "${fake_repo}/newfile.txt"
|
|
30
|
-
printf 'change\n' > "${fake_repo}/README.md"
|
|
31
|
-
git -C "${fake_repo}" add README.md 2>/dev/null
|
|
32
|
-
|
|
33
|
-
# Use native path for Node.js compatibility (Windows needs C:\... not /c/...)
|
|
34
|
-
preview_cwd="$(cd "${fake_repo}" && pwd -W 2>/dev/null || pwd)"
|
|
35
|
-
cwd_encoded="$(printf '%s' "${preview_cwd}" | sed 's|[/\\]|-|g; s|:||g')"
|
|
36
|
-
TUI_PREVIEW_CWD="${preview_cwd}"
|
|
37
|
-
|
|
38
|
-
transcript_dir="${HOME}/.claude/projects/${cwd_encoded}"
|
|
39
|
-
TUI_TRANSCRIPT="${transcript_dir}/preview-123.jsonl"
|
|
40
|
-
mkdir -p "${transcript_dir}"
|
|
41
|
-
printf '{"timestamp":"%s","type":"user","message":{"role":"user","content":[{"type":"text","text":"hello"}]}}\n' "${user_iso}" > "${TUI_TRANSCRIPT}"
|
|
42
|
-
printf '{"timestamp":"%s","type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"done"}]}}\n' "${now_iso}" >> "${TUI_TRANSCRIPT}"
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
make_tui_sample_json() {
|
|
46
|
-
local resets_5h resets_7d
|
|
47
|
-
resets_5h=$(( $(date +%s) + 15480 ))
|
|
48
|
-
resets_7d=$(( $(date +%s) + 432000 ))
|
|
49
|
-
|
|
50
|
-
printf '{"model":{"id":"claude-sonnet-4-20250514","display_name":"Sonnet 4"},"cost":{"total_cost_usd":2.85,"message_cost_usd":0.12,"total_duration_ms":16200000,"total_api_duration_ms":480000,"total_lines_added":342,"total_lines_removed":87},"context_window":{"context_window_size":200000,"used_percentage":42,"total_input_tokens":72000,"total_output_tokens":12000,"current_usage":{"input_tokens":72000,"output_tokens":12000,"cache_creation_input_tokens":15000,"cache_read_input_tokens":8000}},"rate_limits":{"five_hour":{"used_percentage":35,"resets_at":%d},"seven_day":{"used_percentage":28,"resets_at":%d}},"cwd":"%s","workspace":{"current_dir":"%s","project_dir":"%s"},"session_id":"preview-123","version":"1.0.47"}' \
|
|
51
|
-
"${resets_5h}" "${resets_7d}" "${TUI_PREVIEW_CWD}" "${TUI_PREVIEW_CWD}" "${TUI_PREVIEW_CWD}"
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
readonly PREVIEW_CONFIG='{
|
|
55
|
-
"theme": "dark",
|
|
56
|
-
"display": {
|
|
57
|
-
"style": "minimal",
|
|
58
|
-
"charset": "unicode",
|
|
59
|
-
"colorCompatibility": "auto",
|
|
60
|
-
"autoWrap": true,
|
|
61
|
-
"padding": 1,
|
|
62
|
-
"lines": [
|
|
63
|
-
{
|
|
64
|
-
"segments": {
|
|
65
|
-
"directory": { "enabled": true, "style": "fish" },
|
|
66
|
-
"git": { "enabled": true },
|
|
67
|
-
"model": { "enabled": true },
|
|
68
|
-
"session": { "enabled": true, "type": "cost", "costSource": "calculated" },
|
|
69
|
-
"today": { "enabled": true, "type": "cost" },
|
|
70
|
-
"context": { "enabled": true, "showPercentageOnly": false, "displayStyle": "text", "autocompactBuffer": 33000 }
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"budget": {
|
|
76
|
-
"session": { "warningThreshold": 80 },
|
|
77
|
-
"today": { "amount": 50, "warningThreshold": 80 }
|
|
78
|
-
}
|
|
79
|
-
}'
|
|
80
|
-
|
|
81
|
-
THEME="dark"
|
|
82
|
-
STYLE="minimal"
|
|
83
|
-
CHARSET="unicode"
|
|
84
|
-
COMPARE_STYLES=false
|
|
85
|
-
COMPARE_THEMES=false
|
|
86
|
-
COMPARE_TUI_LAYOUTS=false
|
|
87
|
-
BIN=""
|
|
88
|
-
TEMP_FILES=()
|
|
15
|
+
readonly TEMPLATE="${PLUGIN_ROOT}/templates/config.json"
|
|
16
|
+
|
|
17
|
+
# The options the wizard offers, one list per template placeholder. Each name
|
|
18
|
+
# must be one the daemon accepts; the test pins that against the real domains.
|
|
19
|
+
readonly THEMES=(dark light nord tokyo-night rose-pine gruvbox catppuccin-mocha dracula solarized-dark monokai)
|
|
20
|
+
readonly STYLES=(powerline capsule plain)
|
|
21
|
+
readonly CHARSETS=(unicode ascii)
|
|
22
|
+
readonly PRESETS=(default compact verbose)
|
|
23
|
+
|
|
24
|
+
THEME="${THEMES[0]}"
|
|
25
|
+
STYLE="${STYLES[0]}"
|
|
26
|
+
CHARSET="${CHARSETS[0]}"
|
|
27
|
+
PRESET="${PRESETS[0]}"
|
|
28
|
+
COMPARE=""
|
|
29
|
+
|
|
30
|
+
WORK="$(mktemp -d)"
|
|
31
|
+
readonly WORK
|
|
32
|
+
readonly REPO="${WORK}/my-project"
|
|
33
|
+
readonly TRANSCRIPT="${WORK}/preview.jsonl"
|
|
34
|
+
CLIENT=()
|
|
89
35
|
|
|
90
36
|
# shellcheck disable=SC2329
|
|
91
37
|
cleanup() {
|
|
92
|
-
|
|
93
|
-
rm -f "${f}"
|
|
94
|
-
done
|
|
38
|
+
rm -rf "${WORK}"
|
|
95
39
|
}
|
|
96
40
|
trap cleanup EXIT
|
|
97
41
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
local npm_bin="${PLUGIN_ROOT}/../bin/cc-candybar"
|
|
105
|
-
local dist_file="${PLUGIN_ROOT}/../dist/index.mjs"
|
|
106
|
-
if [[ -f "${npm_bin}" ]] && [[ -f "${dist_file}" ]] && test_binary "${npm_bin}"; then
|
|
107
|
-
printf '%s' "${npm_bin}"
|
|
42
|
+
# The statusline client: this checkout's shim (developing against a checkout),
|
|
43
|
+
# an installed cc-candybar on PATH, else the published package via npx.
|
|
44
|
+
find_client() {
|
|
45
|
+
local checkout_bin="${PLUGIN_ROOT}/../bin/cc-candybar"
|
|
46
|
+
if [[ -x "${checkout_bin}" ]] && [[ -f "${PLUGIN_ROOT}/../dist/index.mjs" ]]; then
|
|
47
|
+
CLIENT=("${checkout_bin}")
|
|
108
48
|
return 0
|
|
109
49
|
fi
|
|
110
|
-
|
|
111
50
|
local path_bin
|
|
112
|
-
if path_bin="$(command -v cc-candybar
|
|
113
|
-
|
|
51
|
+
if path_bin="$(command -v cc-candybar)"; then
|
|
52
|
+
CLIENT=("${path_bin}")
|
|
114
53
|
return 0
|
|
115
54
|
fi
|
|
116
|
-
|
|
117
|
-
printf 'npx'
|
|
118
|
-
return 0
|
|
55
|
+
CLIENT=(npx -y @promptctl/cc-candybar@latest)
|
|
119
56
|
}
|
|
120
57
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
printf '%s' "${tmp}"
|
|
58
|
+
# A git repo on a feature branch with one untracked file, so the git segment has
|
|
59
|
+
# something to show, and a two-turn transcript for the session-derived segments.
|
|
60
|
+
make_fixture() {
|
|
61
|
+
mkdir -p "${REPO}"
|
|
62
|
+
git -C "${REPO}" init -b main --quiet
|
|
63
|
+
git -C "${REPO}" -c user.name="User" -c user.email="u@e.co" commit --allow-empty -m "init" --quiet
|
|
64
|
+
git -C "${REPO}" checkout -b feat/my-feature --quiet
|
|
65
|
+
touch "${REPO}/newfile.txt"
|
|
66
|
+
|
|
67
|
+
local now_iso
|
|
68
|
+
now_iso="$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")"
|
|
69
|
+
printf '{"timestamp":"%s","type":"user","message":{"role":"user","content":[{"type":"text","text":"hello"}]}}\n' "${now_iso}" >"${TRANSCRIPT}"
|
|
70
|
+
printf '{"timestamp":"%s","type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"done"}]}}\n' "${now_iso}" >>"${TRANSCRIPT}"
|
|
135
71
|
}
|
|
136
72
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
tmp_config="$(make_temp_config "${preview_theme}" "${preview_style}" "${preview_charset}")"
|
|
144
|
-
|
|
145
|
-
if [[ "${BIN}" == "npx" ]]; then
|
|
146
|
-
printf '%s' "${SAMPLE_JSON}" | FORCE_COLOR=3 npx -y @promptctl/cc-candybar@latest \
|
|
147
|
-
--config="${tmp_config}"
|
|
148
|
-
else
|
|
149
|
-
printf '%s' "${SAMPLE_JSON}" | FORCE_COLOR=3 "${BIN}" \
|
|
150
|
-
--config="${tmp_config}"
|
|
151
|
-
fi
|
|
73
|
+
# One Claude Code status hook payload, shaped like the daemon's required input.
|
|
74
|
+
sample_json() {
|
|
75
|
+
printf '{"hook_event_name":"Status","session_id":"preview-123","transcript_path":"%s","cwd":"%s","workspace":{"current_dir":"%s","project_dir":"%s"},"model":{"id":"claude-opus-4-8","display_name":"Opus 4.8"},"version":"1.0.47","cost":{"total_cost_usd":2.85,"total_duration_ms":16200000,"total_api_duration_ms":480000,"total_lines_added":342,"total_lines_removed":87},"context_window":{"context_window_size":200000,"used_percentage":42,"total_input_tokens":72000,"total_output_tokens":12000,"current_usage":{"input_tokens":72000,"output_tokens":12000,"cache_creation_input_tokens":15000,"cache_read_input_tokens":8000}},"rate_limits":{"five_hour":{"used_percentage":35,"resets_at":%d},"seven_day":{"used_percentage":28,"resets_at":%d}}}' \
|
|
76
|
+
"${TRANSCRIPT}" "${REPO}" "${REPO}" "${REPO}" \
|
|
77
|
+
"$(($(date +%s) + 15480))" "$(($(date +%s) + 432000))"
|
|
152
78
|
}
|
|
153
79
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
if [[ "${BIN}" == "npx" ]]; then
|
|
159
|
-
printf '%s' "${sample_data}" | FORCE_COLOR=3 npx -y @promptctl/cc-candybar@latest \
|
|
160
|
-
--config="${config_file}"
|
|
161
|
-
else
|
|
162
|
-
printf '%s' "${sample_data}" | FORCE_COLOR=3 "${BIN}" \
|
|
163
|
-
--config="${config_file}"
|
|
164
|
-
fi
|
|
80
|
+
# The one render request, sent from inside the fixture repo (the daemon reads
|
|
81
|
+
# git state from the client's working directory).
|
|
82
|
+
render_request() {
|
|
83
|
+
(cd "${REPO}" && sample_json | "${CLIENT[@]}" "$@")
|
|
165
84
|
}
|
|
166
85
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
local template_file tmp tui_json fake_repo
|
|
171
|
-
|
|
172
|
-
setup_tui_transcript
|
|
173
|
-
tui_json="$(make_tui_sample_json)"
|
|
174
|
-
fake_repo="${TUI_PREVIEW_CWD}"
|
|
86
|
+
probe_daemon() {
|
|
87
|
+
{ "${CLIENT[@]}" daemon-stats --json >/dev/null; } 2>&1
|
|
88
|
+
}
|
|
175
89
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
90
|
+
# The first request on a cold daemon spawns it in the background and prints an
|
|
91
|
+
# empty line; a preview must not be that line. Kick once, then wait until the
|
|
92
|
+
# daemon answers or the deadline passes. The bound is wall-clock, not a probe
|
|
93
|
+
# count: a probe through npx costs seconds, a native one milliseconds.
|
|
94
|
+
ensure_daemon() {
|
|
95
|
+
local probe deadline=$((SECONDS + 15))
|
|
96
|
+
if probe="$(probe_daemon)"; then
|
|
97
|
+
return 0
|
|
98
|
+
fi
|
|
99
|
+
render_request >/dev/null
|
|
100
|
+
until probe="$(probe_daemon)"; do
|
|
101
|
+
if ((SECONDS >= deadline)); then
|
|
102
|
+
printf 'preview: the cc-candybar daemon did not start within 15s: %s\n' "${probe}" >&2
|
|
103
|
+
exit 1
|
|
181
104
|
fi
|
|
182
|
-
|
|
183
|
-
tmp="$(mktemp)"
|
|
184
|
-
TEMP_FILES+=("${tmp}")
|
|
185
|
-
sed -e "s/replace:THEME/${THEME}/g" \
|
|
186
|
-
-e "s/replace:CHARSET/${CHARSET}/g" \
|
|
187
|
-
-e "s/\"replace:TODAY_BUDGET\"/50/g" \
|
|
188
|
-
"${template_file}" >"${tmp}"
|
|
189
|
-
|
|
190
|
-
printf '%s:\n' "${label}"
|
|
191
|
-
run_preview_config "${tmp}" "${tui_json}"
|
|
192
|
-
printf '\n\n'
|
|
105
|
+
sleep 0.1
|
|
193
106
|
done
|
|
194
|
-
|
|
195
|
-
# Clean up fake transcript and git repo
|
|
196
|
-
rm -f "${TUI_TRANSCRIPT}" 2>/dev/null
|
|
197
|
-
rm -rf "${fake_repo%/my-project}" 2>/dev/null
|
|
198
107
|
}
|
|
199
108
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
109
|
+
# The wizard's substitution, exactly: the template with its four placeholders
|
|
110
|
+
# filled. Prints the written path.
|
|
111
|
+
fill_template() {
|
|
112
|
+
local theme="$1" style="$2" charset="$3" preset="$4"
|
|
113
|
+
local out="${WORK}/config-${theme}-${style}-${charset}-${preset}.json"
|
|
114
|
+
sed -e "s/replace:THEME/${theme}/" \
|
|
115
|
+
-e "s/replace:STYLE/${style}/" \
|
|
116
|
+
-e "s/replace:CHARSET/${charset}/" \
|
|
117
|
+
-e "s/replace:PRESET/${preset}/" \
|
|
118
|
+
"${TEMPLATE}" >"${out}"
|
|
119
|
+
printf '%s' "${out}"
|
|
209
120
|
}
|
|
210
121
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
for t in "${themes[@]}"; do
|
|
216
|
-
printf '%s:\n' "${t}"
|
|
217
|
-
run_preview "${t}" "${STYLE}" "${CHARSET}"
|
|
218
|
-
printf '\n\n'
|
|
219
|
-
done
|
|
122
|
+
render() {
|
|
123
|
+
render_request --config="$(fill_template "$@")"
|
|
124
|
+
printf '\n'
|
|
220
125
|
}
|
|
221
126
|
|
|
222
127
|
parse_args() {
|
|
223
128
|
while [[ $# -gt 0 ]]; do
|
|
224
129
|
case "$1" in
|
|
225
|
-
--theme=*)
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
--
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
THEME="$2"
|
|
235
|
-
shift 2
|
|
236
|
-
;;
|
|
237
|
-
--style=*)
|
|
238
|
-
STYLE="${1#*=}"
|
|
239
|
-
shift
|
|
240
|
-
;;
|
|
241
|
-
--style)
|
|
242
|
-
[[ $# -ge 2 ]] || {
|
|
243
|
-
printf 'Missing value for --style\n' >&2
|
|
244
|
-
exit 1
|
|
245
|
-
}
|
|
246
|
-
STYLE="$2"
|
|
247
|
-
shift 2
|
|
248
|
-
;;
|
|
249
|
-
--charset=*)
|
|
250
|
-
CHARSET="${1#*=}"
|
|
251
|
-
shift
|
|
252
|
-
;;
|
|
253
|
-
--charset)
|
|
254
|
-
[[ $# -ge 2 ]] || {
|
|
255
|
-
printf 'Missing value for --charset\n' >&2
|
|
256
|
-
exit 1
|
|
257
|
-
}
|
|
258
|
-
CHARSET="$2"
|
|
259
|
-
shift 2
|
|
260
|
-
;;
|
|
261
|
-
--compare-styles)
|
|
262
|
-
COMPARE_STYLES=true
|
|
263
|
-
shift
|
|
264
|
-
;;
|
|
265
|
-
--compare-themes)
|
|
266
|
-
COMPARE_THEMES=true
|
|
267
|
-
shift
|
|
268
|
-
;;
|
|
269
|
-
--compare-tui-layouts)
|
|
270
|
-
COMPARE_TUI_LAYOUTS=true
|
|
271
|
-
shift
|
|
272
|
-
;;
|
|
130
|
+
--theme=*) THEME="${1#*=}" ;;
|
|
131
|
+
--style=*) STYLE="${1#*=}" ;;
|
|
132
|
+
--charset=*) CHARSET="${1#*=}" ;;
|
|
133
|
+
--preset=*) PRESET="${1#*=}" ;;
|
|
134
|
+
--compare-themes) COMPARE="themes" ;;
|
|
135
|
+
--compare-styles) COMPARE="styles" ;;
|
|
136
|
+
--compare-charsets) COMPARE="charsets" ;;
|
|
137
|
+
--compare-presets) COMPARE="presets" ;;
|
|
273
138
|
*)
|
|
274
139
|
printf 'Unknown option: %s\n' "$1" >&2
|
|
275
|
-
|
|
140
|
+
printf 'Usage: preview.sh [--theme=NAME] [--style=NAME] [--charset=NAME] [--preset=NAME] [--compare-themes|--compare-styles|--compare-charsets|--compare-presets]\n' >&2
|
|
141
|
+
exit 2
|
|
276
142
|
;;
|
|
277
143
|
esac
|
|
144
|
+
shift
|
|
278
145
|
done
|
|
279
146
|
}
|
|
280
147
|
|
|
281
148
|
main() {
|
|
282
149
|
parse_args "$@"
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
run_preview "${THEME}" "${STYLE}" "${CHARSET}"
|
|
301
|
-
printf '\n'
|
|
302
|
-
exit 0
|
|
150
|
+
find_client
|
|
151
|
+
make_fixture
|
|
152
|
+
ensure_daemon
|
|
153
|
+
# The flag values are checked once, as the wizard's user would see them
|
|
154
|
+
# (exit 1 names the error). A compare varies one axis over its array, whose
|
|
155
|
+
# members test/plugin-templates.test.ts pins to the loader's own domain.
|
|
156
|
+
"${CLIENT[@]}" check "$(fill_template "${THEME}" "${STYLE}" "${CHARSET}" "${PRESET}")" >/dev/null
|
|
157
|
+
|
|
158
|
+
local name
|
|
159
|
+
case "${COMPARE}" in
|
|
160
|
+
"") render "${THEME}" "${STYLE}" "${CHARSET}" "${PRESET}" ;;
|
|
161
|
+
themes) for name in "${THEMES[@]}"; do printf '%s:\n' "${name}"; render "${name}" "${STYLE}" "${CHARSET}" "${PRESET}"; printf '\n'; done ;;
|
|
162
|
+
styles) for name in "${STYLES[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${name}" "${CHARSET}" "${PRESET}"; printf '\n'; done ;;
|
|
163
|
+
charsets) for name in "${CHARSETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${STYLE}" "${name}" "${PRESET}"; printf '\n'; done ;;
|
|
164
|
+
presets) for name in "${PRESETS[@]}"; do printf '%s:\n' "${name}"; render "${THEME}" "${STYLE}" "${CHARSET}" "${name}"; printf '\n'; done ;;
|
|
165
|
+
esac
|
|
303
166
|
}
|
|
304
167
|
|
|
305
168
|
main "$@"
|