kankaku-tui 0.2.0 → 0.2.1

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 (2) hide show
  1. package/dist/cli.js +10 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -257,6 +257,10 @@ function makeAsker(yes, prompter) {
257
257
  * report as `kankaku doctor`. `--dry-run` prints the plan and writes
258
258
  * nothing — no prompt is asked and no default is applied.
259
259
  */
260
+ /** Tell the user what setup just did to a file: nothing is written silently. */
261
+ function announceWrite(deps, file, result) {
262
+ deps.stdout(result.changed ? `wrote ${file}` : `unchanged ${file}`);
263
+ }
260
264
  async function runSetupCommand(args, deps) {
261
265
  const dryRun = args.includes("--dry-run");
262
266
  const yes = args.includes("--yes");
@@ -281,12 +285,12 @@ async function runSetupCommand(args, deps) {
281
285
  const guessed = guessClaudeCheckout(readAgentFacts(deps.homeDir).claudeCode?.statusLineCommand) ?? "";
282
286
  const checkoutPath = await ask.text("Path to your kankaku-claude checkout", guessed);
283
287
  if (checkoutPath !== "")
284
- writeStatusLine(step.file, checkoutPath);
288
+ announceWrite(deps, step.file, writeStatusLine(step.file, checkoutPath));
285
289
  continue;
286
290
  }
287
291
  const doIt = await ask.confirm(`Install kankaku in ${step.title} (${step.file})?`, true);
288
292
  if (doIt)
289
- addKankakuPackage(step.file);
293
+ announceWrite(deps, step.file, addKankakuPackage(step.file));
290
294
  }
291
295
  if (byId["hub"].state === "todo" && !initial.hub.credentialsPresent) {
292
296
  const doIt = await ask.confirm("Configure hub credentials now?", false);
@@ -295,7 +299,7 @@ async function runSetupCommand(args, deps) {
295
299
  if (url !== "") {
296
300
  const email = await ask.text("Email", "");
297
301
  const password = await ask.secret("Password");
298
- writeHubCredentials(deps.homeDir, { url, email, password });
302
+ announceWrite(deps, credentialsPath(deps.homeDir), writeHubCredentials(deps.homeDir, { url, email, password }));
299
303
  }
300
304
  }
301
305
  }
@@ -309,7 +313,7 @@ async function runSetupCommand(args, deps) {
309
313
  .map((root) => root.trim())
310
314
  .filter((root) => root.length > 0);
311
315
  if (roots.length > 0)
312
- writeTuiConfig(deps.homeDir, roots);
316
+ announceWrite(deps, tuiConfigPath(deps.homeDir), writeTuiConfig(deps.homeDir, roots));
313
317
  }
314
318
  }
315
319
  const finalHub = resolveHub({ env: deps.env ?? {}, homeDir: () => deps.homeDir });
@@ -318,7 +322,8 @@ async function runSetupCommand(args, deps) {
318
322
  if (doRefresh) {
319
323
  const { now, fetch: fetchOverride } = envDeps(deps);
320
324
  const catalog = createCatalog(finalHub.credentials, { homeDir: () => deps.homeDir, now, ...(fetchOverride ? { fetch: fetchOverride } : {}) });
321
- await refreshCatalogAdapter(catalog);
325
+ const snapshot = await refreshCatalogAdapter(catalog);
326
+ deps.stdout(formatCatalogRefreshLines(snapshot).join("\n"));
322
327
  }
323
328
  }
324
329
  await runDoctorCommand(deps);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kankaku-tui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Terminal app that shows today's kankaku work across every project on disk",
5
5
  "license": "MIT",
6
6
  "type": "module",