synthesisui 0.16.447 → 0.16.448

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.
@@ -359,7 +359,22 @@ home = homedir()) {
359
359
  const settings = await readJson(path);
360
360
  const current = settings.statusLine;
361
361
  const command = typeof current?.command === "string" ? current.command : "";
362
- if (command.includes(rel))
362
+ /**
363
+ * "JÁ ESTÁ LÁ" SÃO DUAS COISAS: o ponteiro é nosso E o arquivo existe - 21/09, com o repositório
364
+ * dele na mão.
365
+ *
366
+ * Ele apagou o `_synthesisui/statusline.mjs` para recuperar a barra e rodou o `connect` de novo.
367
+ * A checagem olhava só o `statusLine` do settings, que continuava apontando para o nosso caminho:
368
+ * o comando respondeu "já está lá" e não escreveu nada. Sobrou uma configuração apontando para um
369
+ * arquivo ausente, e o Claude Code tenta rodá-lo a cada respiração da barra.
370
+ *
371
+ * Um ponteiro sem o arquivo é pior que nenhum dos dois - por isso ele é reescrito em vez de
372
+ * aceito como pronto.
373
+ */
374
+ const jaEscrito = await access(join(root, rel))
375
+ .then(() => true)
376
+ .catch(() => false);
377
+ if (command.includes(rel) && jaEscrito)
363
378
  return { status: "already there", command: ours };
364
379
  /**
365
380
  * A BARRA DELE PODE MORAR NO SETTINGS GLOBAL, E QUASE SEMPRE MORA - achado em 21/09, com o print
@@ -377,7 +392,13 @@ home = homedir()) {
377
392
  const globalSettings = await readJson(globalPath);
378
393
  const globalLine = globalSettings.statusLine;
379
394
  const fallback = typeof globalLine?.command === "string" ? globalLine.command : "";
380
- const was = command.trim() ? command : fallback.trim() ? fallback : null;
395
+ /**
396
+ * E O NOSSO PRÓPRIO COMANDO NUNCA VIRA "O ANTERIOR": se o `statusLine` aponta para o invólucro e
397
+ * o arquivo sumiu, guardar aquilo faria o script novo chamar a si mesmo. A barra dele, nesse
398
+ * caso, é a do global - que é onde ela estava antes de tudo isto.
399
+ */
400
+ const dele = command.includes(rel) ? "" : command;
401
+ const was = dele.trim() ? dele : fallback.trim() ? fallback : null;
381
402
  await mkdir(join(root, "_synthesisui"), { recursive: true });
382
403
  await writeFile(join(root, rel), wrapperSource(was), "utf8");
383
404
  await mkdir(dir, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.447",
3
+ "version": "0.16.448",
4
4
  "description": "Bring SynthesisUI design systems into any project - tokens, typed components, whole pages and an agent-ready CLAUDE.md manifest.",
5
5
  "type": "module",
6
6
  "bin": {