synthesisui 0.16.383 → 0.16.385
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/dist/baseline-craft.js +24 -3
- package/dist/commands/align.js +28 -5
- package/dist/commands/doctor.js +24 -1
- package/package.json +1 -1
package/dist/baseline-craft.js
CHANGED
|
@@ -27,9 +27,30 @@ export function craftLines(craft) {
|
|
|
27
27
|
if (craft.score === null) {
|
|
28
28
|
return bodyWrapped("No component of yours was read yet, so there is no line to draw. Your tokens came through - the components are next.").map(body);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
/**
|
|
31
|
+
* O DENOMINADOR EM PALAVRAS, e ele existe para a nota não subir calada.
|
|
32
|
+
*
|
|
33
|
+
* Um componente sem receita nenhuma sai da média desde 06/09 - ninguém o escreveu ainda, e
|
|
34
|
+
* contá-lo como zero afirma que o código dele é ruim onde não há código. Mas uma nota que
|
|
35
|
+
* melhora sem explicação lê como régua afrouxada, então a frase diz sobre QUANTOS ela foi
|
|
36
|
+
* tirada.
|
|
37
|
+
*
|
|
38
|
+
* SÓ QUANDO EXISTE, e `unwritten` ausente é diferente de zero: um servidor anterior a esta
|
|
39
|
+
* versão não manda o campo, e afirmar "todos têm receita" ali seria inventar.
|
|
40
|
+
*/
|
|
41
|
+
const plural = craft.authored === 1 ? "" : "s";
|
|
42
|
+
const written = craft.unwritten === undefined ? null : craft.authored - craft.unwritten;
|
|
43
|
+
const apart = written !== null && craft.unwritten ? craft.unwritten : 0;
|
|
44
|
+
const lines = bodyWrapped(`${paint.strong(`${craft.score}/100`)} on ${apart ? `${written} of your ${craft.authored}` : `your ${craft.authored}`} component${plural} - never on our kit, never on a demo.`).map(body);
|
|
45
|
+
/**
|
|
46
|
+
* A LINHA PRÓPRIA, e não uma oração dentro da primeira.
|
|
47
|
+
*
|
|
48
|
+
* Escrita junto, a frase ocupava três linhas no terminal e o fato principal - a nota - ficava
|
|
49
|
+
* enterrado no meio da ressalva. A nota é o que ele veio ver; por que ela é sobre 49 e não 62 é
|
|
50
|
+
* a segunda pergunta, e ela merece a segunda linha.
|
|
51
|
+
*/
|
|
52
|
+
if (apart)
|
|
53
|
+
lines.push(...bodyWrapped(`${apart} have no recipe yet: counted apart, never against you.`).map((l) => body(paint.dim(l))));
|
|
33
54
|
/**
|
|
34
55
|
* OS RÓTULOS ALINHADOS PELO MAIS LONGO, e a largura é medida e não estimada: os nomes chegam do
|
|
35
56
|
* servidor, então um padding fixo desalinharia no dia em que uma lente for renomeada lá.
|
package/dist/commands/align.js
CHANGED
|
@@ -278,6 +278,8 @@ opts = {}) {
|
|
|
278
278
|
? "This run measured the app, and that reading is still on this machine - the platform keeps scoring the previous one until you send it."
|
|
279
279
|
: `${events.length} checked write${events.length === 1 ? "" : "s"} recorded here and not sent - the platform is scoring this repo on older evidence.`,
|
|
280
280
|
run: "npx synthesisui sync",
|
|
281
|
+
/** Ver `Misalignment.fromThisRun`: o cabeçalho lê daqui, e não reimplementa a pergunta. */
|
|
282
|
+
fromThisRun: allFromThisRun,
|
|
281
283
|
});
|
|
282
284
|
}
|
|
283
285
|
/**
|
|
@@ -570,12 +572,33 @@ export function describeMisalignments(items,
|
|
|
570
572
|
from = "session") {
|
|
571
573
|
if (items.length === 0)
|
|
572
574
|
return "";
|
|
575
|
+
/**
|
|
576
|
+
* "STILL OUT OF ALIGNMENT" SOBRE O QUE O PRÓPRIO COMANDO ACABOU DE PRODUZIR - achado do dono em
|
|
577
|
+
* 06/09, e ele o descreveu na hora: *"depois do upgrade (pediu o sync novamente)"*.
|
|
578
|
+
*
|
|
579
|
+
* O QUE ELE VIU: o `sync` disse que as regras mudaram e mandou rodar `upgrade`. O `upgrade`
|
|
580
|
+
* materializou, MEDIU o app - e a medição nova é evidência que ainda não subiu -, então fechou
|
|
581
|
+
* dizendo "Still out of alignment" e mandou rodar `sync`. Dois comandos apontando um para o
|
|
582
|
+
* outro, com um cabeçalho que afirma que algo continua errado.
|
|
583
|
+
*
|
|
584
|
+
* NÃO É LOOP: o segundo `sync` fecha, porque o que falta é enviar o que este `upgrade` acabou de
|
|
585
|
+
* medir. Mas isso não está em lugar nenhum da tela, e quem lê não tem como distinguir progresso
|
|
586
|
+
* de giro - a diferença entre as duas é a única coisa que decide se ele roda de novo ou desiste.
|
|
587
|
+
*
|
|
588
|
+
* A INFORMAÇÃO JÁ EXISTIA UMA LINHA ABAIXO. `allFromThisRun` distingue "havia evidência velha
|
|
589
|
+
* parada aqui" de "esta execução acabou de medir", e a frase do item já diz *"This run measured
|
|
590
|
+
* the app"*. Só o CABEÇALHO tratava os dois casos como o mesmo. Quando todo achado é consequência
|
|
591
|
+
* desta execução, ele passa a dizer o que a próxima linha resolve - e não que algo falhou.
|
|
592
|
+
*/
|
|
593
|
+
const consequencia = from === "after" && items.every((i) => i.fromThisRun === true);
|
|
573
594
|
return [
|
|
574
|
-
|
|
575
|
-
? "
|
|
576
|
-
: from === "
|
|
577
|
-
? "
|
|
578
|
-
:
|
|
595
|
+
consequencia
|
|
596
|
+
? "One step left, and it closes what this run produced:"
|
|
597
|
+
: from === "after"
|
|
598
|
+
? "Still out of alignment:"
|
|
599
|
+
: from === "shell"
|
|
600
|
+
? "This repo is out of alignment with the design system that governs it:"
|
|
601
|
+
: "Before this session starts, this environment is out of alignment with the design system that governs it:",
|
|
579
602
|
...grouped(items),
|
|
580
603
|
].join("\n");
|
|
581
604
|
}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -22,6 +22,7 @@ import { actingSlug, describeScope, measuredScope, scopePaths, } from "../measur
|
|
|
22
22
|
import { body, paint, section, snippet } from "../output.js";
|
|
23
23
|
import { resolveDeps } from "../stack.js";
|
|
24
24
|
import { danglingTheirVars } from "../their-vars.js";
|
|
25
|
+
import { wiringPrompt } from "../wiring-prompt.js";
|
|
25
26
|
/**
|
|
26
27
|
* `synthesisui doctor` - the check nobody else ships.
|
|
27
28
|
*
|
|
@@ -995,7 +996,29 @@ export async function doctor(opts) {
|
|
|
995
996
|
console.log(body("are declared and nothing points at them, so the page renders in"));
|
|
996
997
|
console.log(body("whatever the framework picked."));
|
|
997
998
|
}
|
|
998
|
-
|
|
999
|
+
/**
|
|
1000
|
+
* A FIAÇÃO SAI DAQUI, e não de outro comando - achado do dono em 06/09, rodando o `upgrade`.
|
|
1001
|
+
*
|
|
1002
|
+
* O QUE ELE VIU: o doctor diz `installed - but not wired up yet` e *"none of the 66 tokens
|
|
1003
|
+
* reach the browser"*, e a linha seguinte mandava ler *"the output of `init`"*. `init` é o
|
|
1004
|
+
* comando de PRIMEIRA VEZ - ele instala um sistema em quem não tem nenhum. Quem chegou até
|
|
1005
|
+
* aqui já importou, materializou e rodou upgrade: mandá-lo ao `init` é devolver ao começo
|
|
1006
|
+
* alguém que está a um passo do fim.
|
|
1007
|
+
*
|
|
1008
|
+
* E O PASSO JÁ EXISTIA PRONTO. `wiringPrompt` mora em `wiring-prompt.ts`, exportado, e era
|
|
1009
|
+
* usado só pelo `init`. Imprimi-lo aqui não é texto novo: é a MESMA fonte chegando na tela
|
|
1010
|
+
* onde a pergunta nasce. Duas redações do mesmo passo divergiriam no primeiro conserto.
|
|
1011
|
+
*
|
|
1012
|
+
* O PROMPT E NÃO O SNIPPET, porque o caminho do `@import` é relativo à folha global DELE e
|
|
1013
|
+
* ninguém aqui sabe onde ela está. O prompt manda o agente rodar o doctor, ler o que ele
|
|
1014
|
+
* nomeia e fazer - que é o que funciona em projeto arbitrário.
|
|
1015
|
+
*/
|
|
1016
|
+
if (table.slug) {
|
|
1017
|
+
console.log("");
|
|
1018
|
+
console.log(body("Paste this into your agent - it does the wiring:"));
|
|
1019
|
+
console.log("");
|
|
1020
|
+
console.log(snippet(wiringPrompt(table.slug).split("\n")));
|
|
1021
|
+
}
|
|
999
1022
|
}
|
|
1000
1023
|
/**
|
|
1001
1024
|
* A FOLHA APONTA PARA O VOCABULÁRIO DELE, E UM NOME SUMIU - ver `their-vars.ts`.
|
package/package.json
CHANGED